@riverbankcms/sdk 0.182.0 → 0.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +49 -3
  3. package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-X1_G96iN.d.ts} +1 -1
  4. package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-CEqZJZEE.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-DQejfbXL.d.ts} +2 -2
  6. package/dist/_dts/{client-D6T430bk.d.ts → client-B_B_amKD.d.ts} +2 -1
  7. package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-Dhx5Ocvx.d.ts} +9 -16
  8. package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-FeOnfoa1.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-m70J6tit.d.ts} +2 -2
  10. package/dist/_dts/{index-CEyYMhLJ.d.ts → index-BOpUh8kO.d.ts} +1 -1
  11. package/dist/_dts/{index-DIU-wL1M.d.ts → index-Bizdaxji.d.ts} +2 -2
  12. package/dist/_dts/{index-Cqxis-nv.d.ts → index-BxCmCit0.d.ts} +1 -1
  13. package/dist/_dts/{index-CQrb3Ccc.d.ts → index-CjAkEWAp.d.ts} +4 -4
  14. package/dist/_dts/{index-DqPKdeTk.d.ts → index-iuFrbIjt.d.ts} +1 -1
  15. package/dist/_dts/{index-CciRW_w1.d.ts → index-liuhlOX7.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-D4wrTIIw.d.ts} +7 -7
  17. package/dist/_dts/{request-DEwxUSw8.d.ts → request-Gn0O1blj.d.ts} +24912 -23733
  18. package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D5duwuqS.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-xzJ3c9Na.d.ts} +1 -1
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  29. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  38. package/dist/_dts/sdk/src/portal/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +91 -2
  55. package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-B1gyJon_.d.ts} +7 -7
  56. package/dist/_dts/{types-B3RjeBLV.d.ts → types-BoITy0rA.d.ts} +41 -4
  57. package/dist/_dts/{types-BvUSGQrw.d.ts → types-DBNuMtSk.d.ts} +16 -5
  58. package/dist/_dts/{types-CkRFtBqd.d.ts → types-DHMcuoeQ.d.ts} +7 -7
  59. package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-BIPO-XlE.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-Ct8slgRk.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-qqTxGGS4.mjs} +7 -7
  62. package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DCh9MUIF.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-RcdaStG7.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-D7Wt-Oaa.mjs} +25 -8
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-BdGxZWeg.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-HFVkoOac.mjs} +5 -5
  67. package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-BtkJW8bA.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DxaGjFFS.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-B2c5dR49.mjs} +1 -1
  70. package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-Fr2qi2C2.mjs} +29 -14
  71. package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-BRMaq0ky.mjs} +1 -1
  72. package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-BhGxfbjt.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-COuEJzbO.mjs} +6 -6
  74. package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-BTLYhVxD.mjs} +21 -42
  75. package/dist/client/{Page-sV6BJkXX.mjs → Page-CgbQZP5g.mjs} +2786 -927
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-DQNkfNLA.mjs} +3 -3
  78. package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-DvPekKeM.mjs} +1 -1
  79. package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DyXoI3ob.mjs} +7 -7
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-Bc9DBbVp.mjs} +42 -9
  81. package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-wj4Rloo5.mjs} +336 -119
  82. package/dist/client/{accordion-6cuswD_s.mjs → accordion-BVXfjnh-.mjs} +1 -1
  83. package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-DycPGtke.mjs} +191 -71
  84. package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-DrWSUqL3.mjs} +4 -4
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CduDRcIk.mjs} +2 -2
  87. package/dist/client/buttonParts-CJEtVOUy.mjs +1511 -0
  88. package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DyCLMP8s.mjs} +2 -2
  89. package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DffP_Nv0.mjs} +1 -1
  90. package/dist/client/{cart-BYOe7MCh.mjs → cart-BuEp_cj4.mjs} +3 -3
  91. package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-CAO39uDG.mjs} +1 -1
  92. package/dist/client/{checkout-Dwd7Di77.mjs → checkout-BoxzT64s.mjs} +3 -3
  93. package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-IGUy7XOx.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-D0UsiFmm.mjs} +1 -1
  95. package/dist/client/client.mjs +446 -93
  96. package/dist/client/{constants-DdxFG3Ic.mjs → constants-C_8AxMdm.mjs} +1 -1
  97. package/dist/client/{context-Hi1RuYEM.mjs → context-D1L0pe__.mjs} +2 -2
  98. package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-BunFTnIq.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CtLAG651.mjs} +4 -4
  101. package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DiSxkBUP.mjs} +15 -15
  102. package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-DUnhwZ1o.mjs} +4 -4
  103. package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-BvBQo0nF.mjs} +4 -4
  104. package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-aTLifOX7.mjs} +4 -4
  105. package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-DFd7pr09.mjs} +4 -4
  106. package/dist/client/{form-DWnlEVSK.mjs → form-Dikmc2AO.mjs} +3 -3
  107. package/dist/client/{form.client-D7zmeqNI.mjs → form.client-zHaQK5I9.mjs} +5 -5
  108. package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-BLl9n8TH.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-Cn0jidP5.mjs → gifting-CufPM38H.mjs} +4 -4
  111. package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--N1GaSY8.mjs} +155 -84
  112. package/dist/client/gifting.interactive-D9MK4HkV.mjs +157 -0
  113. package/dist/client/gifting.parts-CRtiRzo-.mjs +119 -0
  114. package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-BIaBpmk3.mjs} +2 -2
  115. package/dist/client/{noop-jesvJXEE.mjs → islands-DJDLGQEm.mjs} +14007 -6685
  116. package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-wg_JHTxm.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-hzpkW9NQ.mjs} +226 -195
  118. package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-CgzpSv9p.mjs} +2 -2
  119. package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CvxLiEBT.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +31 -27
  121. package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DTHlWg_F.mjs} +22 -7
  123. package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-22Q7zgjN.mjs} +1 -1
  124. package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-DFWYvK8z.mjs} +1 -1
  125. package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-DhZAwo60.mjs} +3 -3
  126. package/dist/client/{productList-BuLemmod.mjs → productList-BiVpbZK2.mjs} +3 -3
  127. package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-DFYqKnLy.mjs} +4 -2
  128. package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-C3OBRg7x.mjs} +2027 -781
  129. package/dist/client/rendering/client.mjs +29 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +5 -5
  132. package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-ms477Z08.mjs} +2 -2
  133. package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-B6nQeqvH.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-BYqsV1Kb.mjs} +1 -1
  135. package/dist/client/runtimeResponse-CUX_lldL.mjs +3 -0
  136. package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-DVsIcPaI.mjs} +16 -15
  137. package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-7mO6KY7_.mjs} +1 -1
  138. package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-L1Vge8tG.mjs} +2 -2
  139. package/dist/client/{shop-GuMqnDL-.mjs → shop-xt4dQ3HH.mjs} +3 -3
  140. package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-DNJfD3VQ.mjs} +28 -17
  141. package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-DS8t6749.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
  144. package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-Dy3nNfTG.mjs} +11 -8
  145. package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-DcjtDpUu.mjs} +2 -2
  146. package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-DvdFFWOT.mjs} +1 -1
  147. package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Cq-7sU5_.mjs} +8 -8
  148. package/dist/client/{view-DOyZc-DF.mjs → view-4gnPcpWJ.mjs} +24 -9
  149. package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-DDvL3iza.mjs} +76 -159
  150. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CLqSRUpt.mjs} +1 -1
  151. package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-CIdAg-Tm.mjs} +1 -1
  152. package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-Bm85jX35.mjs} +2 -2
  153. package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-D8srnz9R.mjs} +445 -18
  154. package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-DVpk5cqp.mjs} +3864 -1943
  155. package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-XoTtHSFH.mjs} +11 -36
  156. package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-VQHsRg2u.mjs} +40 -35
  157. package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CLdF9f6o.mjs} +12 -8
  158. package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-ORNN4x-3.mjs} +782 -16
  159. package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-eAi3tDAr.mjs} +11 -1
  160. package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-CqH91EwA.mjs} +17988 -6757
  161. package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-B3ySEu6p.mjs} +3 -90
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-CdpSupcr.mjs} +2 -2
  164. package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-C6eOP6QW.mjs} +35 -6
  165. package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-BhPg4e-r.mjs} +49 -3
  166. package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-BaWUF9D7.mjs} +2007 -448
  167. package/dist/preview-next/container-responsive.css +320 -0
  168. package/dist/preview-next/editor-chrome.css +23 -2
  169. package/dist/preview-next/keepAlive.mjs +1 -1
  170. package/dist/preview-next/middleware.mjs +1 -1
  171. package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-Ch0X99vE.mjs} +163 -17
  172. package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-B2FmczLO.mjs} +5 -5
  173. package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DtAyv9qA.mjs} +17 -7
  174. package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-BtPqb76u.mjs} +418 -31
  175. package/dist/server/{accordions-By_0Ykks.mjs → accordions-vzdZ2Wt1.mjs} +1 -1
  176. package/dist/server/{bindings-DMJH4bvo.mjs → bindings-B_9JuU66.mjs} +7 -7
  177. package/dist/server/{client-DrwlRNAH.mjs → client-DC7cjiSw.mjs} +469 -92
  178. package/dist/server/config-validation.mjs +1 -1
  179. package/dist/server/config.mjs +2 -2
  180. package/dist/server/{constants-CeMywaiD.mjs → constants-d6nPNJpe.mjs} +22 -6
  181. package/dist/server/{customCss-C9kgPHvr.mjs → customCss-rtIfEYwQ.mjs} +1 -18
  182. package/dist/server/data/resolveBlockData.mjs +1 -1
  183. package/dist/server/{expandPalette-ehuW8r2g.mjs → expandPalette-DxPrNOAB.mjs} +182 -90
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-D0prFflT.mjs → loadContent-hb27HYic.mjs} +11 -10
  186. package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-JToD8wDD.mjs} +3 -3
  187. package/dist/server/{lookMediaFrame-H0fi4bJk.mjs → lookMediaFrame-CTsycLLK.mjs} +94 -39
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-wrcuWmgp.mjs → navigation-B2WhGofA.mjs} +1 -1
  190. package/dist/server/navigation.mjs +1 -1
  191. package/dist/server/next.mjs +8 -8
  192. package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-vD5KTClL.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +3 -3
  194. package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-CdqJ1NQZ.mjs} +86 -97
  195. package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-CAhr4oOf.mjs} +3 -3
  196. package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-m80Xu2pd.mjs} +429 -247
  197. package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CRwOZfpa.mjs} +3 -3
  198. package/dist/server/{portal-pG_uhsI2.mjs → portal-B2wCQno_.mjs} +1 -1
  199. package/dist/server/portal.mjs +2 -2
  200. package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-BWIkFaXq.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-D1PHU-K9.mjs} +3 -3
  203. package/dist/server/{registry-Cc88-23f.mjs → registry-KtsOsAzY.mjs} +20113 -9774
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +9 -9
  209. package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-sjIDJYl7.mjs} +1 -1
  210. package/dist/server/{schema-CwfxQjc4.mjs → schema-BBEqquBM.mjs} +44 -28
  211. package/dist/server/server.mjs +3 -3
  212. package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-ChEZDRwU.mjs} +37 -14
  213. package/dist/server/theme-bridge.mjs +3 -3
  214. package/dist/server/theme.mjs +2 -2
  215. package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-DKCIBeb1.mjs} +2 -2
  216. package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-DybHErxH.mjs} +4 -4
  217. package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
  218. package/dist/server/{types-BKaBZFjD.mjs → types-vyz09w64.mjs} +479 -8
  219. package/dist/server/{validation-BovmbS8N.mjs → validation-Cvi-1TZZ.mjs} +13 -9
  220. package/dist/server/{version-hws4hgyX.mjs → version-B-icAIV1.mjs} +1 -1
  221. package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
  222. package/dist/styles/index.css +2482 -108
  223. package/package.json +1 -1
  224. package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
  225. package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
  226. package/dist/client/types-BEaKfam_.mjs +0 -778
@@ -1,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 { wc as parseSiteId } from "./wizardSteps-DDvL3iza.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-CgbQZP5g.mjs";
4
+ import { cr as publicMapLocationParamsSchema } from "./registry.server-C3OBRg7x.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-BYqsV1Kb.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,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({
779
825
  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
- ])
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"),
855
+ weekday,
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,44 @@ 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
+ },
3407
3543
  changeGiftExpiry: {
3408
3544
  path: "/sites/{siteId}/gifting/gifts/{giftId}/expiry",
3409
3545
  method: "POST",
@@ -5967,6 +6103,22 @@ const API_ENDPOINTS$1 = {
5967
6103
  auth: "user",
5968
6104
  responseKind: "json"
5969
6105
  },
6106
+ getRegisteredDomainContact: {
6107
+ errors: [
6108
+ "resource:not_found",
6109
+ "auth:forbidden",
6110
+ "validation:invalid_input"
6111
+ ],
6112
+ path: "/domains/{domainId}/registrar/contact",
6113
+ method: "GET",
6114
+ auth: "user",
6115
+ tags: [
6116
+ "domains",
6117
+ "domain-{domainId}",
6118
+ "domain-registrar"
6119
+ ],
6120
+ responseKind: "json"
6121
+ },
5970
6122
  updateRegisteredDomainContact: {
5971
6123
  path: "/domains/{domainId}/registrar/contact",
5972
6124
  method: "POST",
@@ -6051,6 +6203,18 @@ const API_ENDPOINTS$1 = {
6051
6203
  auth: "user",
6052
6204
  responseKind: "json"
6053
6205
  },
6206
+ retryDomainEmailSending: {
6207
+ errors: [],
6208
+ path: "/sites/{siteId}/domains/{domainId}/email/retry",
6209
+ method: "POST",
6210
+ tags: [
6211
+ "domains",
6212
+ "domain-{domainId}",
6213
+ "domain-dns"
6214
+ ],
6215
+ auth: "user",
6216
+ responseKind: "json"
6217
+ },
6054
6218
  retryDomainResend: {
6055
6219
  path: "/domains/{domainId}/resend",
6056
6220
  method: "POST",
@@ -10407,6 +10571,9 @@ function resolveApiBaseUrl() {
10407
10571
  }
10408
10572
  //#endregion
10409
10573
  //#region ../api/src/pageReadResponseCache.ts
10574
+ function pageReadPolicy(siteId, policy) {
10575
+ return policy === "retry" ? buildPageReadRetryPolicy(siteId) : buildPageReadCachePolicy(siteId, policy);
10576
+ }
10410
10577
  function isRecord(value) {
10411
10578
  return typeof value === "object" && value !== null && !Array.isArray(value);
10412
10579
  }
@@ -10417,8 +10584,20 @@ function isResolvedPage(page) {
10417
10584
  "system_service"
10418
10585
  ].includes(String(page.result.kind));
10419
10586
  }
10587
+ /**
10588
+ * The key `serializeSurfaceTree` (theme-core) wraps a response in when it carries surface revisions. This package
10589
+ * can't depend on theme-core, so the SDK's tests check the two stay equal.
10590
+ */
10591
+ const SURFACE_TRANSPORT_ENVELOPE_KEY = "$surfaceTransport";
10592
+ /** A revision-transport body keeps the page's own fields under the envelope's `value`. */
10593
+ function withoutSurfaceTransport(data) {
10594
+ const envelope = data[SURFACE_TRANSPORT_ENVELOPE_KEY];
10595
+ if (envelope === void 0) return data;
10596
+ return isRecord(envelope) && Array.isArray(envelope.revisions) && envelope.revisions.length > 0 && isRecord(envelope.value) ? envelope.value : null;
10597
+ }
10420
10598
  function envelopePage(body) {
10421
- const data = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10599
+ const raw = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10600
+ const data = raw ? withoutSurfaceTransport(raw) : null;
10422
10601
  return data?.type === "content" && isRecord(data.content) ? data.content : data;
10423
10602
  }
10424
10603
  function parseBody(body) {
@@ -10435,40 +10614,44 @@ function admit(snapshot) {
10435
10614
  if (snapshot.status === 200 && isResolvedPage(page)) {
10436
10615
  if (header(snapshot, "x-riverbank-page-storage") === "no-store") return {
10437
10616
  kind: "pass-through",
10438
- dependencies: "availability"
10617
+ policy: "retry"
10439
10618
  };
10440
10619
  return {
10441
10620
  kind: "store",
10442
- dependencies: page.dependencies
10621
+ policy: page.dependencies
10443
10622
  };
10444
10623
  }
10624
+ if (snapshot.status === 200) return {
10625
+ kind: "pass-through",
10626
+ policy: "retry"
10627
+ };
10445
10628
  return {
10446
10629
  kind: "pass-through",
10447
- dependencies: snapshot.status === 200 || header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10630
+ policy: header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10448
10631
  };
10449
10632
  }
10450
10633
  /**
10451
10634
  * One cache entry per request, judged by the policy it is looked up with. Content is looked up first, so a
10452
10635
  * 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
10636
+ * availability (or must be retried soon) is looked up again under that policy, which checks its tags and budget. A snapshot
10454
10637
  * past its own budget is never served: the live read replaces it.
10455
10638
  */
10456
10639
  function planPageRead(state, now, budgetSeconds) {
10457
10640
  const subject = state.live ?? state.cached;
10458
10641
  if (!subject) return {
10459
10642
  kind: "lookup",
10460
- dependencies: "content"
10643
+ policy: "content"
10461
10644
  };
10462
- const { dependencies } = admit(subject);
10463
- if (!state.lookedUp.includes(dependencies)) return {
10645
+ const { policy } = admit(subject);
10646
+ if (!state.lookedUp.includes(policy)) return {
10464
10647
  kind: "lookup",
10465
- dependencies
10648
+ policy
10466
10649
  };
10467
10650
  if (state.live) return {
10468
10651
  kind: "serve",
10469
10652
  snapshot: state.live
10470
10653
  };
10471
- return now - subject.cachedAt < budgetSeconds(dependencies) * 1e3 ? {
10654
+ return now - subject.cachedAt < budgetSeconds(policy) * 1e3 ? {
10472
10655
  kind: "serve",
10473
10656
  snapshot: subject
10474
10657
  } : { kind: "read-live" };
@@ -10479,12 +10662,21 @@ function planPageRead(state, now, budgetSeconds) {
10479
10662
  */
10480
10663
  var PassThroughResponse = class extends Error {
10481
10664
  constructor(snapshot) {
10482
- super("Page read must not be stored");
10665
+ super("Read must not be stored");
10483
10666
  this.snapshot = snapshot;
10484
10667
  }
10485
10668
  };
10486
- async function lookup(input, dependencies) {
10487
- const { tags } = buildPageReadCachePolicy(input.siteId, dependencies);
10669
+ /**
10670
+ * Names this cache's entries. Next keys an entry by these parts plus the callback's source text, and neither
10671
+ * changes when the response contract does, so a contract change bumps this name: otherwise a deploy keeps
10672
+ * serving responses the previous release cached, in the old shape, for up to their whole budget.
10673
+ *
10674
+ * - v4: a resolved page carries its own mailing-list support (`mailingList`); the hosted frontend no longer
10675
+ * asks the site read for it, so a v3 response would leave the page's newsletter forms without their lists.
10676
+ */
10677
+ const PAGE_READ_RESPONSE_CACHE_NAME = "page-read-envelope-v4";
10678
+ async function lookup(input, policy) {
10679
+ const { tags } = pageReadPolicy(input.siteId, policy);
10488
10680
  const load = async () => {
10489
10681
  const snapshot = await input.live();
10490
10682
  if (admit(snapshot).kind === "pass-through") throw new PassThroughResponse(snapshot);
@@ -10492,8 +10684,8 @@ async function lookup(input, dependencies) {
10492
10684
  };
10493
10685
  try {
10494
10686
  return {
10495
- cached: await input.cache(load, ["page-read-envelope-v3", input.key], {
10496
- revalidate: input.budgetSeconds(dependencies),
10687
+ cached: await input.cache(load, [PAGE_READ_RESPONSE_CACHE_NAME, input.key], {
10688
+ revalidate: input.budgetSeconds(policy),
10497
10689
  tags
10498
10690
  })(),
10499
10691
  live: null
@@ -10515,9 +10707,9 @@ async function runPlan(input, state) {
10515
10707
  live: await input.live()
10516
10708
  });
10517
10709
  case "lookup": {
10518
- const found = await lookup(input, step.dependencies);
10710
+ const found = await lookup(input, step.policy);
10519
10711
  return runPlan(input, {
10520
- lookedUp: [...state.lookedUp, step.dependencies],
10712
+ lookedUp: [...state.lookedUp, step.policy],
10521
10713
  cached: found.cached ?? state.cached,
10522
10714
  live: state.live ?? found.live
10523
10715
  });
@@ -10549,9 +10741,9 @@ async function frameworkCacheKey(request) {
10549
10741
  async function cachePageReadResponse(input) {
10550
10742
  if (!input.cache || input.maxAge !== void 0 && input.maxAge <= 0) return input.read();
10551
10743
  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);
10744
+ const budgetSeconds = (policy) => {
10745
+ const revalidate = pageReadPolicy(input.siteId, policy).revalidate;
10746
+ return maxAge === void 0 ? revalidate : Math.min(revalidate, maxAge);
10555
10747
  };
10556
10748
  const key = await frameworkCacheKey(input.key);
10557
10749
  const result = await runPlan({
@@ -10570,15 +10762,53 @@ async function cachePageReadResponse(input) {
10570
10762
  headers: result.headers
10571
10763
  });
10572
10764
  }
10765
+ /**
10766
+ * Names the site read's entries, for the same reason as `PAGE_READ_RESPONSE_CACHE_NAME`. A site read only
10767
+ * enters this cache when the host can answer it from its durable copy; otherwise it stays in Next's fetch cache.
10768
+ */
10769
+ const SITE_READ_RESPONSE_CACHE_NAME = "site-read-envelope-v1";
10770
+ /**
10771
+ * A site read through the framework cache, with the fetch cache's lifetime and tags, so its fill can come from
10772
+ * the host's durable copy. As in Next's fetch cache, only a 200 is kept: an incomplete site (207) or a failure
10773
+ * passes through and the next read asks again.
10774
+ */
10775
+ async function cacheSiteReadResponse(input) {
10776
+ const live = sharedRead(input.read);
10777
+ const load = async () => {
10778
+ const snapshot = await live();
10779
+ if (snapshot.status !== 200) throw new PassThroughResponse(snapshot);
10780
+ return snapshot;
10781
+ };
10782
+ const key = await frameworkCacheKey(input.key);
10783
+ const found = await input.cache(load, [SITE_READ_RESPONSE_CACHE_NAME, key], {
10784
+ revalidate: input.policy.revalidate,
10785
+ tags: input.policy.tags
10786
+ })().catch((error) => {
10787
+ if (error instanceof PassThroughResponse) return error.snapshot;
10788
+ throw error;
10789
+ });
10790
+ const snapshot = Date.now() - found.cachedAt < input.policy.revalidate * 1e3 ? found : await live();
10791
+ return new Response(snapshot.body, {
10792
+ status: snapshot.status,
10793
+ headers: snapshot.headers
10794
+ });
10795
+ }
10573
10796
  /** Result adapters use this when the SDK served a page without the HTTP transport (memory, durable or prebuild fallback). */
10574
10797
  async function observePageReadPolicy(cache, siteId, payload) {
10575
10798
  if (!cache) return;
10576
- const dependency = pageReadDependencies(payload);
10799
+ const policy = observedPageReadPolicy(pageReadDependencies(payload));
10577
10800
  await cache(async () => true, [
10578
- "page-read-policy-v2",
10801
+ "page-read-policy-v3",
10579
10802
  siteId,
10580
- dependency
10581
- ], buildPageReadCachePolicy(siteId, dependency))();
10803
+ policy
10804
+ ], pageReadPolicy(siteId, policy))();
10805
+ }
10806
+ /**
10807
+ * A page served without the tagged transport (memory, durable or prebuild) may predate a write's purge, so an
10808
+ * availability page only earns the retry window, not the rendered-availability backstop a purge would end.
10809
+ */
10810
+ function observedPageReadPolicy(dependency) {
10811
+ return dependency === "availability" ? "retry" : "content";
10582
10812
  }
10583
10813
  //#endregion
10584
10814
  //#region ../api/src/common/operationId.ts
@@ -10873,19 +11103,88 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
10873
11103
  function isPublishedPageRead(endpoint, params, options) {
10874
11104
  return (endpoint === "getContentByPath" || endpoint === "resolveRouteOutcome") && params?.preview !== true && params?.preview !== "true" && options.cache !== "no-store";
10875
11105
  }
11106
+ /** The dashboard's reading of a boolean query flag, so a host never treats `force=1` as unforced. */
11107
+ const isTruthyRequestParam = (value) => value === true || value === "true" || value === 1 || value === "1";
11108
+ /** Forced reads skip every cache, and an id-only lookup is a different response the durable cache never holds. */
11109
+ function isFullSiteRead(params) {
11110
+ return !isTruthyRequestParam(params.force) && (params.scope === void 0 || params.scope === "full");
11111
+ }
11112
+ /** A published, full site read with a lifetime: the host's durable copy may answer it, under the fetch's policy. */
11113
+ function publishedSiteReadPolicy(endpoint, params, plan) {
11114
+ const next = plan.init.cache === "no-store" ? void 0 : plan.init.next;
11115
+ const revalidate = typeof next?.revalidate === "number" && next.revalidate > 0 ? next.revalidate : null;
11116
+ return endpoint === "getSite" && revalidate !== null && isFullSiteRead(params) ? {
11117
+ revalidate,
11118
+ tags: next?.tags ?? []
11119
+ } : null;
11120
+ }
11121
+ /** The dashboard's success envelope around a durable copy, so admission and parsing treat it like a live response. */
11122
+ function freshPublishedResponse(data) {
11123
+ return new Response(JSON.stringify(buildSuccessEnvelope(data, void 0)), {
11124
+ status: 200,
11125
+ headers: {
11126
+ "content-type": "application/json",
11127
+ "x-riverbank-cache": "frontend-hit"
11128
+ }
11129
+ });
11130
+ }
11131
+ /** The cache fill's read: the host's fresh durable copy when it has one, otherwise the dashboard. */
11132
+ function freshPublishedFirst(read, request, live) {
11133
+ if (!read) return live;
11134
+ return async () => {
11135
+ const found = await read(request).catch(() => null);
11136
+ return found ? freshPublishedResponse(found.data) : live();
11137
+ };
11138
+ }
11139
+ function publishedPageResponse(read) {
11140
+ const revalidate = read.plan.init.next?.revalidate;
11141
+ return cachePageReadResponse({
11142
+ cache: read.frameworkCache?.cache ?? null,
11143
+ key: read.key,
11144
+ siteId: typeof read.params.siteId === "string" ? read.params.siteId : "",
11145
+ maxAge: typeof revalidate === "number" ? revalidate : void 0,
11146
+ read: read.endpoint === "getContentByPath" ? freshPublishedFirst(read.frameworkCache?.readFreshPublished, {
11147
+ endpoint: "getContentByPath",
11148
+ params: read.params
11149
+ }, read.uncachedFetch) : read.uncachedFetch
11150
+ });
11151
+ }
11152
+ /** Without a durable reader, a site read stays in Next's fetch cache exactly as before. */
11153
+ function siteOrFetchResponse(read) {
11154
+ const durable = read.frameworkCache?.readFreshPublished;
11155
+ const policy = durable ? publishedSiteReadPolicy(read.endpoint, read.params, read.plan) : null;
11156
+ return read.frameworkCache && policy ? cacheSiteReadResponse({
11157
+ cache: read.frameworkCache.cache,
11158
+ key: read.key,
11159
+ policy,
11160
+ read: freshPublishedFirst(durable, {
11161
+ endpoint: "getSite",
11162
+ params: read.params
11163
+ }, read.uncachedFetch)
11164
+ }) : observedFetch(read.plan, read.endpoint, read.frameworkCache);
11165
+ }
10876
11166
  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,
11167
+ const { next: _fetchPolicy, ...uncachedInit } = plan.init;
11168
+ const read = {
11169
+ plan,
11170
+ endpoint,
11171
+ params: params ?? {},
11172
+ frameworkCache,
10881
11173
  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, {
11174
+ uncachedFetch: () => fetch(plan.url, {
10885
11175
  ...uncachedInit,
10886
11176
  cache: "no-store"
10887
11177
  })
10888
- }) : fetch(plan.url, plan.init);
11178
+ };
11179
+ return isPublishedPageRead(endpoint, params, options) ? publishedPageResponse(read) : siteOrFetchResponse(read);
11180
+ }
11181
+ function observedFetch(plan, endpoint, frameworkCache) {
11182
+ const revalidate = plan.init.next?.revalidate;
11183
+ if (typeof revalidate === "number" && plan.init.cache !== "no-store") frameworkCache?.observeFetchLifetime?.({
11184
+ endpoint: String(endpoint),
11185
+ revalidate
11186
+ });
11187
+ return fetch(plan.url, plan.init);
10889
11188
  }
10890
11189
  const batchReadPolicyBodySchema = z.object({ requests: z.array(z.object({
10891
11190
  endpoint: z.string(),
@@ -11667,7 +11966,7 @@ var SimpleCache = class {
11667
11966
  //#endregion
11668
11967
  //#region src/request-options.ts
11669
11968
  /** Every API client the SDK creates sends its version as `x-sdk-version`. */
11670
- const sdkRequestOptions = { sdkVersion: "0.182.0" };
11969
+ const sdkRequestOptions = { sdkVersion: "0.183.0" };
11671
11970
  //#endregion
11672
11971
  //#region src/public-api/runtime.ts
11673
11972
  const PUBLIC_ENDPOINT_NAMES = [
@@ -11854,6 +12153,10 @@ function normalizeRuntimePublicPath(value) {
11854
12153
  const collapsed = (withoutQuery.startsWith("/") ? withoutQuery : `/${withoutQuery}`).replace(/\/{2,}/g, "/");
11855
12154
  return (collapsed.length > 1 ? collapsed.replace(/\/+$/g, "") : collapsed) || "/";
11856
12155
  }
12156
+ /** The site read's variant: `null` is the site-wide read; a path adds that page's runtime support. */
12157
+ function decideSiteReadPath(currentPath) {
12158
+ return toNonEmptyString(currentPath) === null ? null : normalizeRuntimePublicPath(currentPath);
12159
+ }
11857
12160
  function normalizeRuntimeHostname(value) {
11858
12161
  const trimmed = value.trim().toLowerCase();
11859
12162
  return (/^[a-z][a-z0-9+.-]*:\/\//.test(trimmed) ? new URL(trimmed) : new URL(`http://${trimmed}`)).hostname.replace(/\.$/, "");
@@ -11889,9 +12192,10 @@ function deriveGetSiteKey(params) {
11889
12192
  ]
11890
12193
  }
11891
12194
  };
12195
+ const path = decideSiteReadPath(params.currentPath);
11892
12196
  const normalizedParams = {
11893
12197
  ...identity,
11894
- ...toNonEmptyString(params.currentPath) === null ? {} : { currentPath: normalizeRuntimePublicPath(params.currentPath) }
12198
+ ...path === null ? {} : { currentPath: path }
11895
12199
  };
11896
12200
  return {
11897
12201
  ok: true,
@@ -12528,32 +12832,77 @@ var CircuitBreaker = class {
12528
12832
  }
12529
12833
  }
12530
12834
  };
12835
+ /** The SDK's read deadline when the caller sets none. */
12836
+ const DEFAULT_READ_DEADLINE_MS = 8e3;
12837
+ function createReadTimeoutError(timeoutMs) {
12838
+ return Object.assign(/* @__PURE__ */ new Error(`Request timed out after ${timeoutMs}ms`), { name: "AbortError" });
12839
+ }
12840
+ /**
12841
+ * One attempt, ended at the read's deadline even when the fetch ignores its signal.
12842
+ *
12843
+ * The signal alone isn't enough: Next drops it when it refreshes stale fetch data
12844
+ * (as an ISR regeneration does), and the read would then wait as long as the
12845
+ * origin takes. The signal is still aborted so a fetch that honours it stops.
12846
+ */
12847
+ function raceReadDeadline(fetcher, remainingMs, timeoutError) {
12848
+ const controller = new AbortController();
12849
+ return new Promise((resolve, reject) => {
12850
+ const timeoutId = setTimeout(() => {
12851
+ controller.abort();
12852
+ reject(timeoutError());
12853
+ }, remainingMs);
12854
+ fetcher(controller.signal).then((value) => {
12855
+ clearTimeout(timeoutId);
12856
+ resolve(value);
12857
+ }, (error) => {
12858
+ clearTimeout(timeoutId);
12859
+ reject(error);
12860
+ });
12861
+ });
12862
+ }
12863
+ function decideRetry(input) {
12864
+ if (input.attempt >= input.maxAttempts) return { kind: "give_up" };
12865
+ if (!shouldRetryError(input.error, input.config.retryOn)) return { kind: "give_up" };
12866
+ const delayMs = getRetryDelay(input.error, input.attempt, input.config);
12867
+ return delayMs < input.remainingMs ? {
12868
+ kind: "retry",
12869
+ delayMs
12870
+ } : { kind: "give_up" };
12871
+ }
12531
12872
  /**
12532
- * Fetch with timeout and retry logic
12873
+ * Fetch with one deadline and retry logic
12874
+ *
12875
+ * `requestTimeoutMs` bounds the whole read, so retries share what the first
12876
+ * attempt left rather than each getting a fresh budget. A timeout is never
12877
+ * retried: the deadline has passed.
12533
12878
  *
12534
12879
  * @param fetcher - Function that performs the fetch, receives AbortSignal for timeout
12535
12880
  * @param config - Retry configuration
12536
12881
  * @returns Result from successful fetch
12537
- * @throws Last error after all retries exhausted
12882
+ * @throws The last attempt's error, or a timeout once the deadline passes
12538
12883
  */
12539
- async function fetchWithTimeoutAndRetry(fetcher, config) {
12884
+ function fetchWithTimeoutAndRetry(fetcher, config) {
12540
12885
  const maxAttempts = config.maxAttempts ?? DEFAULT_RETRY_CONFIG.maxAttempts;
12541
12886
  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);
12887
+ const deadline = Date.now() + requestTimeoutMs;
12888
+ const timeoutError = () => createReadTimeoutError(requestTimeoutMs);
12889
+ const attemptFrom = async (attempt) => {
12546
12890
  try {
12547
- return await fetcher(controller.signal);
12548
- } finally {
12549
- clearTimeout(timeoutId);
12891
+ return await raceReadDeadline(fetcher, Math.max(0, deadline - Date.now()), timeoutError);
12892
+ } catch (error) {
12893
+ const decision = decideRetry({
12894
+ error,
12895
+ attempt,
12896
+ maxAttempts,
12897
+ remainingMs: deadline - Date.now(),
12898
+ config
12899
+ });
12900
+ if (decision.kind === "give_up") throw error;
12901
+ await sleep(decision.delayMs);
12902
+ return attemptFrom(attempt + 1);
12550
12903
  }
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;
12904
+ };
12905
+ return attemptFrom(1);
12557
12906
  }
12558
12907
  /**
12559
12908
  * Check if an error is an AbortError (from AbortController.abort() or timeout)
@@ -12656,7 +13005,7 @@ function withDefaultHeaders(apiClient, defaultHeaders) {
12656
13005
  });
12657
13006
  }
12658
13007
  const DEFAULT_BROWSER_TIMEOUT_MS = 5e3;
12659
- const DEFAULT_SERVER_TIMEOUT_MS = 8e3;
13008
+ const DEFAULT_SERVER_TIMEOUT_MS = DEFAULT_READ_DEADLINE_MS;
12660
13009
  const MAX_GET_ENTRIES_BY_IDENTIFIERS_REFS = 50;
12661
13010
  function isDurableRuntimeCacheTier(cacheTier) {
12662
13011
  return cacheTier === "durable-fresh" || cacheTier === "durable-stale";
@@ -12681,7 +13030,7 @@ function publishedCacheLifetime(plan, payload) {
12681
13030
  freshTtlSec: plan.freshTtlSec,
12682
13031
  staleTtlSec: plan.staleTtlSec
12683
13032
  };
12684
- const ttl = buildPageReadCachePolicy(plan.siteId ?? "", "availability").revalidate;
13033
+ const ttl = 60;
12685
13034
  return {
12686
13035
  freshTtlSec: ttl,
12687
13036
  staleTtlSec: ttl
@@ -12693,11 +13042,10 @@ function reusableDurablePayload(plan, payload, freshness) {
12693
13042
  function memoryWritePolicy(pageRead, data, tags, cacheTTL) {
12694
13043
  if (!pageRead) return { tags };
12695
13044
  const dependency = pageReadDependencies(data);
12696
- const policy = buildPageReadCachePolicy(pageRead.siteId, dependency);
12697
13045
  return {
12698
- tags: policy.tags,
13046
+ tags: buildPageReadCachePolicy(pageRead.siteId, dependency).tags,
12699
13047
  ...dependency === "availability" ? {
12700
- ttl: Math.min(cacheTTL, policy.revalidate * 1e3),
13048
+ ttl: Math.min(cacheTTL, 60 * 1e3),
12701
13049
  staleTtl: 0
12702
13050
  } : {}
12703
13051
  };
@@ -13017,7 +13365,7 @@ function createRiverbankClientWithDeps(deps, config) {
13017
13365
  const result = await reader({
13018
13366
  cacheKey: plan.cacheKey,
13019
13367
  endpoint: plan.endpoint,
13020
- payloadSchemaVersion: 5
13368
+ payloadSchemaVersion: 6
13021
13369
  });
13022
13370
  if (result.kind === "miss") return {
13023
13371
  kind: "miss",
@@ -13066,7 +13414,7 @@ function createRiverbankClientWithDeps(deps, config) {
13066
13414
  payload,
13067
13415
  siteId: plan.siteId ?? getRuntimePayloadSiteId(payload),
13068
13416
  ...publishedCacheLifetime(plan, payload),
13069
- payloadSchemaVersion: 5,
13417
+ payloadSchemaVersion: 6,
13070
13418
  writeReason: "live_success"
13071
13419
  });
13072
13420
  } catch {}
@@ -13080,6 +13428,11 @@ function createRiverbankClientWithDeps(deps, config) {
13080
13428
  error: input.error
13081
13429
  })) : null;
13082
13430
  }
13431
+ /** Every fallback leaves through here, so the caller's hook sees each one. */
13432
+ async function serveFallback(fallback) {
13433
+ await config.resilience?.beforeFallbackServed?.(fallback.resilience);
13434
+ return fallback;
13435
+ }
13083
13436
  async function resilientFetch(cacheKey, fetcher, options) {
13084
13437
  const requestId = generateRequestId();
13085
13438
  const startTime = Date.now();
@@ -13099,21 +13452,21 @@ function createRiverbankClientWithDeps(deps, config) {
13099
13452
  if (resilienceEnabled && circuitBreaker.isOpen()) {
13100
13453
  if (allowFallbacks && !isPreview && staleIfError) {
13101
13454
  const stale = cache.getStale(cacheKey);
13102
- if (stale) return emitStatus("stale", stale.value, statusDetails({
13455
+ if (stale) return serveFallback(emitStatus("stale", stale.value, statusDetails({
13103
13456
  staleAgeSec: stale.staleAgeSec,
13104
13457
  cacheTier: "memory-stale",
13105
13458
  error: {
13106
13459
  code: "circuit_open",
13107
13460
  message: "Circuit breaker is open"
13108
13461
  }
13109
- }));
13462
+ })));
13110
13463
  }
13111
13464
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, {
13112
13465
  code: "circuit_open",
13113
13466
  message: "Circuit breaker is open"
13114
13467
  }) : null;
13115
13468
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
13116
- if (durableFallback?.kind === "hit") return durableFallback.result;
13469
+ if (durableFallback?.kind === "hit") return serveFallback(durableFallback.result);
13117
13470
  const prebuild = tryPrebuildFallback({
13118
13471
  allowed: allowFallbacks,
13119
13472
  preview: isPreview,
@@ -13125,7 +13478,7 @@ function createRiverbankClientWithDeps(deps, config) {
13125
13478
  message: "Circuit breaker is open"
13126
13479
  }
13127
13480
  });
13128
- if (prebuild) return prebuild;
13481
+ if (prebuild) return serveFallback(prebuild);
13129
13482
  const circuitState = circuitBreaker.getState();
13130
13483
  emitStatus("error", null, statusDetails({
13131
13484
  durableCache,
@@ -13173,17 +13526,17 @@ function createRiverbankClientWithDeps(deps, config) {
13173
13526
  const stale = cache.getStale(cacheKey);
13174
13527
  if (stale) {
13175
13528
  const errorInfo = getRiverbankErrorInfo(error);
13176
- return emitStatus("stale", stale.value, statusDetails({
13529
+ return serveFallback(emitStatus("stale", stale.value, statusDetails({
13177
13530
  staleAgeSec: stale.staleAgeSec,
13178
13531
  cacheTier: "memory-stale",
13179
13532
  error: errorInfo
13180
- }));
13533
+ })));
13181
13534
  }
13182
13535
  }
13183
13536
  const errorInfo = getRiverbankErrorInfo(error);
13184
13537
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, errorInfo) : null;
13185
13538
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
13186
- if (durableFallback?.kind === "hit") return durableFallback.result;
13539
+ if (durableFallback?.kind === "hit") return serveFallback(durableFallback.result);
13187
13540
  const prebuild = tryPrebuildFallback({
13188
13541
  allowed: allowFallbacks,
13189
13542
  preview: isPreview,
@@ -13192,7 +13545,7 @@ function createRiverbankClientWithDeps(deps, config) {
13192
13545
  durableCache,
13193
13546
  error: errorInfo
13194
13547
  });
13195
- if (prebuild) return prebuild;
13548
+ if (prebuild) return serveFallback(prebuild);
13196
13549
  throw attachResilienceStatusToError(error, emitStatus("error", null, statusDetails({
13197
13550
  error: errorInfo,
13198
13551
  durableCache