@riverbankcms/sdk 0.177.0 → 0.179.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 (225) hide show
  1. package/README.md +15 -8
  2. package/dist/_dts/{BlocksIslandsHydrator-sYraeqm9.d.ts → BlocksIslandsHydrator-DKwgs95u.d.ts} +1 -1
  3. package/dist/_dts/{Page-Bp7hTDTy.d.ts → Page-lWenra5i.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-CxkCCyKw.d.ts → SdkPreviewMode-BRxhRw4I.d.ts} +2 -2
  5. package/dist/_dts/{client-K6UhbL3t.d.ts → client-qWn7xAwJ.d.ts} +77 -23
  6. package/dist/_dts/{content-types-BLAdIMyr.d.ts → content-types-DL6GIvTm.d.ts} +2 -2
  7. package/dist/_dts/{contracts-BG7yTZ6t.d.ts → contracts-CzWyAiJj.d.ts} +6 -116
  8. package/dist/_dts/{generatePageMetadata-X_WpGzZZ.d.ts → generatePageMetadata-CBKd0cJ4.d.ts} +2 -2
  9. package/dist/_dts/{index--n-wV8Xd.d.ts → index-7CDBZGb-.d.ts} +1 -1
  10. package/dist/_dts/{index-Bygd2RCg.d.ts → index-BU9uAkHB.d.ts} +4 -4
  11. package/dist/_dts/{index-BMGif2r3.d.ts → index-BYnG_vF5.d.ts} +1 -1
  12. package/dist/_dts/{index-CBRbZJ6u.d.ts → index-CZgJrhzT.d.ts} +4 -2
  13. package/dist/_dts/{index-BLseXObg.d.ts → index-CaCum9mM.d.ts} +2 -2
  14. package/dist/_dts/{index-BpAW9AKB.d.ts → index-DCiSHd-C.d.ts} +1 -1
  15. package/dist/_dts/{index-CX9bp60k.d.ts → index-DVSipdrT.d.ts} +3 -3
  16. package/dist/_dts/{loadContent-uhUThWaq.d.ts → loadContent-CPKbFQyq.d.ts} +15 -13
  17. package/dist/_dts/{request-Bf9YImJw.d.ts → request-BjKBCS7t.d.ts} +1687 -373
  18. package/dist/_dts/{resolveBlockData-D6M5NMZB.d.ts → resolveBlockData-DupbMCup.d.ts} +8 -5
  19. package/dist/_dts/resolvePageContent-BqNyCHi8.d.ts +61 -0
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +3 -3
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  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 +7 -2
  29. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  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 +32 -12
  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 +56 -4
  38. package/dist/_dts/sdk/src/portal/index.d.ts +95 -13
  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 +7 -7
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +19 -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 +1 -1
  55. package/dist/_dts/serviceBookingOutline-YcsIjvn1.d.ts +582 -0
  56. package/dist/_dts/{types-C1l2Sm2h.d.ts → types-B7e6Lmo5.d.ts} +3 -3
  57. package/dist/_dts/{types-DgV8P2mz.d.ts → types-BOxSq-Bq.d.ts} +8 -7
  58. package/dist/_dts/{types-BdZ5pJSk.d.ts → types-CT-KOxl_.d.ts} +5 -39
  59. package/dist/_dts/{validation-BtbZIT5f.d.ts → validation-Dz6qccue.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CeYQQQs7.mjs → BlocksIslandsHydrator-1XifJg6V.mjs} +17 -18
  61. package/dist/client/{BookingMailingListNote-CDDWrY_W.mjs → BookingMailingListNote-BsbEgagJ.mjs} +7 -7
  62. package/dist/client/{BookingQuestionFields-MbvIo2jS.mjs → BookingQuestionFields-C8IbeLHj.mjs} +4 -4
  63. package/dist/client/{CalendarNavigationChevron-C6CSVfEB.mjs → CalendarNavigationChevron-Bbqij1XQ.mjs} +43 -10
  64. package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-C9Ggcfx3.mjs → DemoBookingPortalAccess-uA9H8LIL.mjs} +4 -4
  66. package/dist/client/{EventCalendar.client-BSMuSqg0.mjs → EventCalendar.client-yoSI77ov.mjs} +11 -11
  67. package/dist/client/{EventCombined.client-BTrmSyUB.mjs → EventCombined.client-HeCNlliq.mjs} +11 -11
  68. package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
  69. package/dist/client/{EventItem-B0WjGXsH.mjs → EventItem-Duhk1vnF.mjs} +247 -7
  70. package/dist/client/{EventListWeekNavigation-8Ij7vuxY.mjs → EventListWeekNavigation-BiutEqPK.mjs} +1 -1
  71. package/dist/client/{EventListing.client-CWk2NEwd.mjs → EventListing.client-B5ln77jG.mjs} +3 -3
  72. package/dist/client/{EventListing.view-BEH4UbSL.mjs → EventListing.view-hUDhNtMv.mjs} +203 -9
  73. package/dist/client/{EventRegistrationPayment-B2EikR3f.mjs → EventRegistrationPayment-DqtX1vB2.mjs} +439 -123
  74. package/dist/client/{Page-C03rc6jw.mjs → Page-ChJ2TGVk.mjs} +24314 -20226
  75. package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
  76. package/dist/client/{SiteTermsAgreementField-BYACYP0T.mjs → SiteTermsAgreementField-CDBU31xW.mjs} +3 -3
  77. package/dist/client/{StepIndicator-Bb7rPtSq.mjs → StepIndicator-2Dl9zon2.mjs} +80 -33
  78. package/dist/client/{BookingPanelArrangement-BShQSial.mjs → StepIndicator-JQA-VuEH.mjs} +12 -12
  79. package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
  80. package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
  81. package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
  82. package/dist/client/{accordion-BfsOiweL.mjs → accordion-B6SqU49k.mjs} +1 -1
  83. package/dist/client/{booking-form.client-B8ohIj13.mjs → booking-form.client-DrEOjQ3N.mjs} +15 -15
  84. package/dist/client/{bookingForm-CXsck2oH.mjs → bookingForm-drZBwEZW.mjs} +4 -4
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-B_hcuT06.mjs → boxStyleClassNames-DEh45w16.mjs} +19 -19
  87. package/dist/client/{carousel-Cz5Ddbsx.mjs → carousel-C-YJliD-.mjs} +2 -2
  88. package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
  89. package/dist/client/{cart-CTC2oS3p.mjs → cart-acGFWK9R.mjs} +3 -3
  90. package/dist/client/{cart.client-c1YkTC-Q.mjs → cart.client-BzlOGP2j.mjs} +1 -1
  91. package/dist/client/{checkout-BeW1ufaH.mjs → checkout-SEontwhy.mjs} +3 -3
  92. package/dist/client/{checkout.client-BeU32khQ.mjs → checkout.client-C0Qvh-d4.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-DVfSUSKp.mjs → checkoutUrls-yUKeq1N9.mjs} +1 -1
  94. package/dist/client/client.mjs +469 -320
  95. package/dist/client/{context-R9p5c8IH.mjs → context-DTrwaQtg.mjs} +2 -1
  96. package/dist/client/{dateFormatting-CF6FWCoo.mjs → dateFormatting-Cg8E1r9l.mjs} +1 -1
  97. package/dist/client/{demoPortalMagicLink-tZxIm3RL.mjs → demoPortalMagicLink-D0kOJYOX.mjs} +5 -4
  98. package/dist/client/{enhanceHeaderSection-DEYDI54E.mjs → enhanceHeaderSection-DyrpZ7ks.mjs} +4 -4
  99. package/dist/client/{event-registration.client-DWvSODTI.mjs → event-registration.client-RLZQWi2V.mjs} +121 -183
  100. package/dist/client/{eventCalendar-C9Pn9eeZ.mjs → eventCalendar-CphYnImh.mjs} +4 -4
  101. package/dist/client/{eventCombined-Bdhk0fp0.mjs → eventCombined-BvqjASB_.mjs} +4 -4
  102. package/dist/client/{eventListing-B-bJOQUk.mjs → eventListing-BaNAoC_M.mjs} +4 -4
  103. package/dist/client/{eventRegistration-CbdmUiDT.mjs → eventRegistration-COMHoRl6.mjs} +4 -4
  104. package/dist/client/events-9LPvwbWp.mjs +28 -0
  105. package/dist/client/{form-BbUUt784.mjs → form-DyH2juYT.mjs} +3 -3
  106. package/dist/client/{form.client-BVlz-9_t.mjs → form.client-DBwzkB0M.mjs} +5 -5
  107. package/dist/client/{form.parts-TB4UIrML.mjs → form.parts-CY4kX3mh.mjs} +3 -3
  108. package/dist/client/{formatDate-TDHhFjFN.mjs → formatDate-CTEN7gxW.mjs} +1 -1
  109. package/dist/client/gifting/client.mjs +7 -6
  110. package/dist/client/{gifting-CbNSrp7C.mjs → gifting-CIx4V378.mjs} +4 -4
  111. package/dist/client/{gifting.client-B__bGhFc.mjs → gifting.client-BEVPpzJM.mjs} +5 -5
  112. package/dist/client/{gifting.parts-CTA1sDW6.mjs → gifting.parts-VnORjnZK.mjs} +2 -2
  113. package/dist/client/{headerSection-5Wn9nUW_.mjs → headerSection-DGcJfRS8.mjs} +2 -2
  114. package/dist/client/{lookSurfaces-BwiNdgMU.mjs → lookSurfaces-IqT_SVnX.mjs} +167 -85
  115. package/dist/client/{newsletter-form.client-B17WYHxZ.mjs → newsletter-form.client-BvEDkjiD.mjs} +6 -6
  116. package/dist/client/{shop.interactive-CxDJ8P2r.mjs → newsletter-form.interactive-DCO1lErD.mjs} +3970 -3997
  117. package/dist/client/{newsletter-form.parts-DN9wD1ZG.mjs → newsletter-form.parts-BIy4IUT3.mjs} +2 -2
  118. package/dist/client/{newsletterForm-DLMlxInp.mjs → newsletterForm-CoTXDNFS.mjs} +3 -3
  119. package/dist/client/portal/client.mjs +346 -21
  120. package/dist/client/{product-detail.client-Di_anRGR.mjs → product-detail.client-YHQ2aKX1.mjs} +1 -1
  121. package/dist/client/{product-list.client-Duhl6rtL.mjs → product-list.client-DxoZw1vF.mjs} +1 -1
  122. package/dist/client/{productDetail-BgKmCwA8.mjs → productDetail-DjuFvkey.mjs} +3 -3
  123. package/dist/client/{productList-C_wMKsYS.mjs → productList-DE9GEFoZ.mjs} +3 -3
  124. package/dist/client/{propsDecoder-y3LvxaiG.mjs → propsDecoder-Cyag_HOs.mjs} +2 -48
  125. package/dist/client/{registry.server-CIWYKz1V.mjs → registry.server-BPwV-0Pp.mjs} +10426 -9114
  126. package/dist/client/rendering/client.mjs +41 -27
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +23 -2836
  129. package/dist/client/{richText-coerce-DkPBFb_a.mjs → richText-coerce-NrRqDeOg.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-BgO0rZce.mjs → routeIslandApiConfig-BWq5gKFK.mjs} +1 -1
  131. package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
  132. package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
  133. package/dist/client/{shop-CFbWlv_W.mjs → shop-C3wM0Hr4.mjs} +3 -3
  134. package/dist/client/{shop-commerce-C-I29eaA.mjs → shop-commerce-34YvcpbX.mjs} +14 -14
  135. package/dist/client/{shop-commerce-store-DGcc7twO.mjs → shop-commerce-store-B7xHksOs.mjs} +1 -1
  136. package/dist/client/{shop-discount-apply.state-DOm7vx0X.mjs → shop-discount-apply.state-BiBnozfO.mjs} +2 -2
  137. package/dist/client/{shop.client-GHTWUKD6.mjs → shop.client-C0v88nLd.mjs} +14 -14
  138. package/dist/client/{shopShared-Be9QJJpT.mjs → shopShared-Ct-BRNez.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/{noop-CaQxI-Js.mjs → src-CCtanNlD.mjs} +462 -455
  141. package/dist/client/src-DqMbCjI1.mjs +3 -0
  142. package/dist/client/{src-xrjaKaCj.mjs → src-uwCpbHXG.mjs} +2 -1
  143. package/dist/client/{timetableModel--R0zVzZO.mjs → timetableModel-lhE29TNT.mjs} +66 -12
  144. package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
  145. package/dist/client/{useAvailableSlots-BGu_2F50.mjs → useAvailableSlots-BelJviOT.mjs} +2 -2
  146. package/dist/client/useDiscountCodeUi-rQRE1-Ho.mjs +196 -0
  147. package/dist/client/{useEventPagination-DxIJ--JZ.mjs → useEventPagination-C4rS2Xxl.mjs} +8 -8
  148. package/dist/client/{view-3foOzGWR.mjs → view-LJVHVqsy.mjs} +4 -4
  149. package/dist/client/{display-4HYOb-AK.mjs → wizardSteps-CNDsxeJH.mjs} +9168 -8981
  150. package/dist/preview-next/before-render.mjs +4 -3
  151. package/dist/preview-next/client/{PageSectionToolbar-D6-jojqh.mjs → PageSectionToolbar-C4TtBPN-.mjs} +3 -3
  152. package/dist/preview-next/client/{PreviewEditorSidebar-BUVFKZ4k.mjs → PreviewEditorSidebar-D6fkE59-.mjs} +15 -13
  153. package/dist/preview-next/client/{PreviewEditorUI-292pOiSt.mjs → PreviewEditorUI-amcDlj0O.mjs} +4 -4
  154. package/dist/preview-next/client/{PreviewShell-CW0Yzj3h.mjs → PreviewShell-DeQjx4zk.mjs} +5 -5
  155. package/dist/preview-next/client/{SdkPreviewModeRuntime-Dba7zoZK.mjs → SdkPreviewModeRuntime-Cx0SXnoX.mjs} +5 -5
  156. package/dist/preview-next/client/{previewAssistantSlot-B-utyhbS.mjs → previewAssistantSlot-aqpU34WI.mjs} +1764 -1090
  157. package/dist/preview-next/client/{previewChromeRoot-CCoGydUD.mjs → previewChromeRoot-D3Gy_Rs0.mjs} +1 -1
  158. package/dist/preview-next/client/runtime.mjs +3 -3
  159. package/dist/preview-next/client/{sdk-runtime-DCpXVcA0.mjs → sdk-runtime-Dzx_RrN7.mjs} +2 -2
  160. package/dist/preview-next/client/{siteStyleAccess-sjOvRAHY.mjs → siteStyleAccess-LHedw83e.mjs} +1 -1
  161. package/dist/preview-next/client/src-EO5QoRlU.mjs +3 -0
  162. package/dist/preview-next/client/{src-DzXUmsyK.mjs → src-lX6heoDA.mjs} +2 -1
  163. package/dist/preview-next/client/{useAutosaveStatus-R1rZ9-IZ.mjs → useAutosaveStatus-DpSd9aVk.mjs} +1 -1
  164. package/dist/preview-next/client/{useOpenBlockForSetup-BS7CANPv.mjs → useOpenBlockForSetup-BGZn5AT1.mjs} +1 -1
  165. package/dist/preview-next/keepAlive.mjs +1 -1
  166. package/dist/preview-next/middleware.mjs +1 -1
  167. package/dist/preview-next/{route-contract-BSSbtz6A.mjs → route-contract-DnL-FgSV.mjs} +83 -11
  168. package/dist/server/{Block.shared-Dc3DX7Cf.mjs → Block.shared-BEbq6EwO.mjs} +5 -5
  169. package/dist/server/{bindings-VGgS6UvF.mjs → bindings-Bly0dRs7.mjs} +36 -5
  170. package/dist/server/{client-BPLLL22F.mjs → client-CGJ2ztYp.mjs} +1021 -1118
  171. package/dist/server/config-validation.mjs +1 -1
  172. package/dist/server/config.mjs +2 -2
  173. package/dist/server/constants-Cj7hfbrA.mjs +41 -0
  174. package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
  175. package/dist/server/data/dataLoaderContext.mjs +1 -1
  176. package/dist/server/data/resolveBlockData.mjs +1 -1
  177. package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
  178. package/dist/server/error-f4g44bKx.mjs +387 -0
  179. package/dist/server/index.mjs +3 -2
  180. package/dist/server/loadContent-BkK1w3QQ.mjs +692 -0
  181. package/dist/server/{loadPage-CQgde5DN.mjs → loadPage-DTLe0FEs.mjs} +22 -4
  182. package/dist/server/{navigation-iC_hXjJI.mjs → navigation-BcNfYYuu.mjs} +1 -1
  183. package/dist/server/navigation.mjs +1 -1
  184. package/dist/server/next.mjs +103 -100
  185. package/dist/server/{overrideResolution-CkpwAHvW.mjs → overrideResolution-Uy9Zp2Ks.mjs} +1 -1
  186. package/dist/server/page-converter.mjs +1 -1
  187. package/dist/server/{pageRenderPlan-CfSnAkCO.mjs → pageRenderPlan-JzxBnqfV.mjs} +19 -7
  188. package/dist/server/{pageRuntimeSupport-uz4gzBOo.mjs → pageRuntimeSupport-DyNSd2Yj.mjs} +50 -2
  189. package/dist/server/{pageShared-6z6JBU41.mjs → pageShared-DU4ETFPS.mjs} +89 -83
  190. package/dist/server/portal-B4JVkdjc.mjs +783 -0
  191. package/dist/server/portal.mjs +3 -3
  192. package/dist/server/{prebuild-B4_Llisx.mjs → prebuild-8jNtDXmS.mjs} +5 -4
  193. package/dist/server/prebuild.mjs +1 -1
  194. package/dist/server/{prefetchBlockData-CCiYV8_s.mjs → prefetchBlockData-xeMG42aw.mjs} +3 -2
  195. package/dist/server/{registry-CXRXsFSx.mjs → registry-DH1VrsCl.mjs} +587 -329
  196. package/dist/server/rendering/components/pageShared.mjs +1 -1
  197. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  198. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  199. package/dist/server/rendering/server.mjs +5 -4
  200. package/dist/server/rendering.mjs +9 -8
  201. package/dist/server/{resolveBlockData-yfe8WLEA.mjs → resolveBlockData-BN8tweTx.mjs} +24 -5
  202. package/dist/server/resolvePageContent-DnM16_f9.mjs +89 -0
  203. package/dist/server/routing.mjs +271 -57
  204. package/dist/server/server.mjs +3 -3
  205. package/dist/server/{loadContent-CxASA3PE.mjs → servicePageContent-B-FezJmH.mjs} +709 -453
  206. package/dist/server/{validation-BvHio6QI.mjs → validation-3jOzYdPL.mjs} +3 -3
  207. package/dist/server/{version-SuFlio6n.mjs → version-8t0o6_jd.mjs} +1 -1
  208. package/dist/styles/index.css +19 -0
  209. package/package.json +1 -1
  210. package/dist/_dts/footerPageOutline-DwMHeYmQ.d.ts +0 -256
  211. package/dist/_dts/resolvePageContent-DkzWvFbG.d.ts +0 -162
  212. package/dist/client/LocationMapActions-myIQIvQL.mjs +0 -62
  213. package/dist/client/MapDrawingSvg-BfsVyPvB.mjs +0 -200
  214. package/dist/client/course-CUFVJEAc.mjs +0 -237
  215. package/dist/client/duration-Q6_QNgiv.mjs +0 -37
  216. package/dist/client/event-details.client-BwjBJP-f.mjs +0 -53
  217. package/dist/client/eventDetails-C2LfNW_o.mjs +0 -13
  218. package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
  219. package/dist/client/src-BozhJ43Z.mjs +0 -3
  220. package/dist/client/useDiscountCodeUi-I_mXI9Yd.mjs +0 -237
  221. package/dist/client/view-BbzH5MQb.mjs +0 -1371
  222. package/dist/preview-next/client/src-LUhVXBEQ.mjs +0 -3
  223. package/dist/server/constants-hl17xz6x.mjs +0 -22
  224. package/dist/server/portal-BjVHMAUC.mjs +0 -371
  225. package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
@@ -1,2 +1,2 @@
1
- import { n as toPageHydrationBootstrapConfig, t as PageContent } from "../../pageShared-6z6JBU41.mjs";
1
+ import { n as toPageHydrationBootstrapConfig, t as PageContent } from "../../pageShared-DU4ETFPS.mjs";
2
2
  export { PageContent, toPageHydrationBootstrapConfig };
@@ -1,2 +1,2 @@
1
- import { n as loadPageWithDeps, t as loadPage } from "../../loadPage-CQgde5DN.mjs";
1
+ import { n as loadPageWithDeps, t as loadPage } from "../../loadPage-DTLe0FEs.mjs";
2
2
  export { loadPage, loadPageWithDeps };
@@ -1,2 +1,2 @@
1
- import { a as invalidRenderableBlock, c as readSdkPreviewPublishedPlacement, d as siteBlockRenderContext, i as collectMediaAssetSidecar, l as resolveSdkBlockManifest, n as buildRenderablePageOutline, o as projectRenderablePageOutline, r as buildSiteRenderSupport, s as readInvalidBlockAdmission, t as buildPageOutline, u as sanitizeSdkRuntimeBlockContent } from "../../pageRuntimeSupport-uz4gzBOo.mjs";
1
+ import { a as invalidRenderableBlock, c as readSdkPreviewPublishedPlacement, d as siteBlockRenderContext, i as collectMediaAssetSidecar, l as resolveSdkBlockManifest, n as buildRenderablePageOutline, o as projectRenderablePageOutline, r as buildSiteRenderSupport, s as readInvalidBlockAdmission, t as buildPageOutline, u as sanitizeSdkRuntimeBlockContent } from "../../pageRuntimeSupport-DyNSd2Yj.mjs";
2
2
  export { buildPageOutline, buildRenderablePageOutline, buildSiteRenderSupport, collectMediaAssetSidecar, invalidRenderableBlock, projectRenderablePageOutline, readInvalidBlockAdmission, readSdkPreviewPublishedPlacement, resolveSdkBlockManifest, sanitizeSdkRuntimeBlockContent, siteBlockRenderContext };
@@ -1,8 +1,9 @@
1
- import { d as MissingBlockOverrideError } from "../pageShared-6z6JBU41.mjs";
1
+ import { d as MissingBlockOverrideError } from "../pageShared-DU4ETFPS.mjs";
2
+ import { a as bookingDetailEvents, c as buildBookingPageOutline, d as buildCodeOwnedPageBlocks, f as createPublicBlockContentContractResolver, g as bookingSectionBlocks, h as bookingPageDesign, i as BOOKING_PAGE_BLOCK_IDS, l as bookingPageIdentity, m as bookingHero, n as SERVICE_BOOKING_BLOCK_IDS, o as bookingPageFacts, p as bookingDescription, r as buildServiceBookingOutline, s as bookingPageSeedData, t as parseServicePageContent, u as plainTextDoc } from "../servicePageContent-B-FezJmH.mjs";
2
3
  import { n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE } from "../themeAdmission-DGSAlFUK.mjs";
3
4
  import { n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations } from "../overrides-CD4d-1w7.mjs";
4
- import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, o as prefetchFooterBlockData, r as Layout, t as BlockContent } from "../Block.shared-Dc3DX7Cf.mjs";
5
- import { i as Page, n as collectUsedBlockKindsFromPageOutline, r as resolveBlockOverridesForPage, t as buildPageBlockKindIndex } from "../overrideResolution-CkpwAHvW.mjs";
5
+ import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, o as prefetchFooterBlockData, r as Layout, t as BlockContent } from "../Block.shared-BEbq6EwO.mjs";
6
+ import { i as Page, n as collectUsedBlockKindsFromPageOutline, r as resolveBlockOverridesForPage, t as buildPageBlockKindIndex } from "../overrideResolution-Uy9Zp2Ks.mjs";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  //#region src/rendering/components/Block.server.tsx
8
9
  /**
@@ -15,4 +16,4 @@ function Block(props) {
15
16
  return /* @__PURE__ */ jsx(BlockContent, { ...props });
16
17
  }
17
18
  //#endregion
18
- export { Block, Layout, MISSING_SDK_THEME_ERROR_CODE, MissingBlockOverrideError, MissingSdkThemeError, Page, UnsupportedOverrideOnlyLayoutChromeError, buildFooterRenderablePageOutline, buildPageBlockKindIndex, collectUsedBlockKindsFromPageOutline, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, prefetchFooterBlockData, resolveBlockOverridesForPage };
19
+ export { BOOKING_PAGE_BLOCK_IDS, Block, Layout, MISSING_SDK_THEME_ERROR_CODE, MissingBlockOverrideError, MissingSdkThemeError, Page, SERVICE_BOOKING_BLOCK_IDS, UnsupportedOverrideOnlyLayoutChromeError, bookingDescription, bookingDetailEvents, bookingHero, bookingPageDesign, bookingPageFacts, bookingPageIdentity, bookingPageSeedData, bookingSectionBlocks, buildBookingPageOutline, buildCodeOwnedPageBlocks, buildFooterRenderablePageOutline, buildPageBlockKindIndex, buildServiceBookingOutline, collectUsedBlockKindsFromPageOutline, createPublicBlockContentContractResolver, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, parseServicePageContent, plainTextDoc, prefetchFooterBlockData, resolveBlockOverridesForPage };
@@ -1,13 +1,14 @@
1
- import { v as resolveAuthoredLinkHref } from "./pageRenderPlan-CfSnAkCO.mjs";
2
- import { at as computeMediaTransformStyle, ct as resolveImageUrlWithContext$1, ds as sanitizeHref, ft as buildResolveImageUrlContext, nt as RichText$2, ot as resolveImageSourceSetWithContext$1, qi as parseFieldDefinition, st as resolveImageUrl$1 } from "./registry-CXRXsFSx.mjs";
1
+ import { x as resolveAuthoredLinkHref } from "./pageRenderPlan-JzxBnqfV.mjs";
2
+ import { Zi as parseFieldDefinition, at as computeMediaTransformStyle, ct as resolveImageUrlWithContext$1, ft as buildResolveImageUrlContext, nt as RichText$2, ot as resolveImageSourceSetWithContext$1, st as resolveImageUrl$1, xs as sanitizeHref } from "./registry-DH1VrsCl.mjs";
3
3
  import { _ as parseMediaIdentifier, a as persistableMediaSchema, c as buildRenderableMediaAssetIndex, d as resolveManagedMediaReference, g as parseCanonicalMediaIdentifier, h as mediaIdentifierSchema, i as mediaSchema, l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
4
- import { d as MissingBlockOverrideError, f as PageRenderer, g as buildThemeRuntime, h as toBlocksMediaAssets, l as ThemeScope, m as toBlocksImageResolveContextInput, n as toPageHydrationBootstrapConfig, p as toBlocksPageRendererDataContext, t as PageContent, u as EditorPageRenderer } from "./pageShared-6z6JBU41.mjs";
5
- import { _ as admitLayoutGridForPlan, b as projectRepeaterGridLayout$1, v as deriveFieldValidationPlan, x as projectRepeaterGridLayoutForRendering$1 } from "./pageRuntimeSupport-uz4gzBOo.mjs";
6
- import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-CxASA3PE.mjs";
4
+ import { d as MissingBlockOverrideError, f as PageRenderer, g as buildThemeRuntime, h as toBlocksMediaAssets, l as ThemeScope, m as toBlocksImageResolveContextInput, n as toPageHydrationBootstrapConfig, p as toBlocksPageRendererDataContext, t as PageContent, u as EditorPageRenderer } from "./pageShared-DU4ETFPS.mjs";
5
+ import { C as projectRepeaterGridLayout$1, b as admitLayoutGridForPlan, w as projectRepeaterGridLayoutForRendering$1, x as deriveFieldValidationPlan } from "./pageRuntimeSupport-DyNSd2Yj.mjs";
6
+ import { a as bookingDetailEvents, c as buildBookingPageOutline, d as buildCodeOwnedPageBlocks, f as createPublicBlockContentContractResolver, g as bookingSectionBlocks, h as bookingPageDesign, i as BOOKING_PAGE_BLOCK_IDS, l as bookingPageIdentity, m as bookingHero, n as SERVICE_BOOKING_BLOCK_IDS, o as bookingPageFacts, p as bookingDescription, r as buildServiceBookingOutline, s as bookingPageSeedData, t as parseServicePageContent, u as plainTextDoc } from "./servicePageContent-B-FezJmH.mjs";
7
7
  import { n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE } from "./themeAdmission-DGSAlFUK.mjs";
8
- import { t as loadPage } from "./loadPage-CQgde5DN.mjs";
8
+ import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-BkK1w3QQ.mjs";
9
+ import { t as loadPage } from "./loadPage-DTLe0FEs.mjs";
9
10
  import { n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations } from "./overrides-CD4d-1w7.mjs";
10
- import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, n as toBlockHydrationBootstrapConfig, r as Layout, t as BlockContent } from "./Block.shared-Dc3DX7Cf.mjs";
11
+ import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, n as toBlockHydrationBootstrapConfig, r as Layout, t as BlockContent } from "./Block.shared-BEbq6EwO.mjs";
11
12
  import "react";
12
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
14
  import { BlocksIslandsHydrator } from "#sdk-rendering-client";
@@ -158,4 +159,4 @@ function projectRepeaterGridLayoutForRendering(layout, columns = layout.columns)
158
159
  return projectRepeaterGridLayoutForRendering$1(layout, columns);
159
160
  }
160
161
  //#endregion
161
- export { Block, EditorPageRenderer, ImagePresets, Layout, MISSING_SDK_THEME_ERROR_CODE, MissingBlockOverrideError, MissingSdkThemeError, Page, PageRenderer, RichText, ThemeScope, UnsupportedOverrideOnlyLayoutChromeError, buildFooterRenderablePageOutline, buildRenderableMediaAssetIndex, buildRepeaterGridLayoutForRendering, buildThemeRuntime, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage, mediaIdentifierSchema, mediaSchema, parseCanonicalMediaIdentifier, parseMediaIdentifier, persistableMediaSchema, projectRepeaterGridLayout, projectRepeaterGridLayoutForRendering, renderableMediaAssetSchema, resolveImageRenderProps, resolveImageSourceSetWithContext, resolveImageUrl, resolveImageUrlWithContext, resolveLinkHref, resolveManagedMediaReference, runtimeMediaSchema, toBlocksImageResolveContextInput, toBlocksMediaAssets, toBlocksPageRendererDataContext };
162
+ export { BOOKING_PAGE_BLOCK_IDS, Block, EditorPageRenderer, ImagePresets, Layout, MISSING_SDK_THEME_ERROR_CODE, MissingBlockOverrideError, MissingSdkThemeError, Page, PageRenderer, RichText, SERVICE_BOOKING_BLOCK_IDS, ThemeScope, UnsupportedOverrideOnlyLayoutChromeError, bookingDescription, bookingDetailEvents, bookingHero, bookingPageDesign, bookingPageFacts, bookingPageIdentity, bookingPageSeedData, bookingSectionBlocks, buildBookingPageOutline, buildCodeOwnedPageBlocks, buildFooterRenderablePageOutline, buildRenderableMediaAssetIndex, buildRepeaterGridLayoutForRendering, buildServiceBookingOutline, buildThemeRuntime, createPublicBlockContentContractResolver, defineBlockOverrideRegistrations, defineBlockOverrides, defineLazyBlockOverride, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage, mediaIdentifierSchema, mediaSchema, parseCanonicalMediaIdentifier, parseMediaIdentifier, parseServicePageContent, persistableMediaSchema, plainTextDoc, projectRepeaterGridLayout, projectRepeaterGridLayoutForRendering, renderableMediaAssetSchema, resolveImageRenderProps, resolveImageSourceSetWithContext, resolveImageUrl, resolveImageUrlWithContext, resolveLinkHref, resolveManagedMediaReference, runtimeMediaSchema, toBlocksImageResolveContextInput, toBlocksMediaAssets, toBlocksPageRendererDataContext };
@@ -1,7 +1,8 @@
1
1
  import { t as allOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
2
- import { n as prefetchBlockDataWithFailures } from "./prefetchBlockData-CCiYV8_s.mjs";
2
+ import { n as prefetchBlockDataWithFailures } from "./prefetchBlockData-xeMG42aw.mjs";
3
+ import { c as toEntrySubrouteContext } from "./resolvePageContent-DnM16_f9.mjs";
3
4
  import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-BCY9z3oB.mjs";
4
- import { a as defineOwnDataProperty, i as resolveDataLoaderBlockContent, n as getDataLoaderOwnerPageId, t as createDataLoaderContext } from "./dataLoaderContext-B3fXA54R.mjs";
5
+ import { a as defineOwnDataProperty, i as resolveDataLoaderBlockContent, n as getDataLoaderOwnerPageId, t as createDataLoaderContext } from "./dataLoaderContext-lMRTfG5Z.mjs";
5
6
  //#region src/data/dataLoaderValue.ts
6
7
  const MAX_DATA_LOADER_VALUE_NODES = 1e4;
7
8
  const MAX_DATA_LOADER_VALUE_DEPTH = 100;
@@ -396,6 +397,11 @@ function configLoaderRoot(renderTarget, bookingTimeZone, now) {
396
397
  switch (renderTarget.kind) {
397
398
  case "page":
398
399
  case "entry-template": return Object.keys(zone).length ? zone : void 0;
400
+ case "system-page": return {
401
+ ...zone,
402
+ subject: renderTarget.subject,
403
+ occurrenceContext: renderTarget.occurrenceContext
404
+ };
399
405
  case "page-surface-template": return {
400
406
  ...zone,
401
407
  subject: renderTarget.subject
@@ -407,13 +413,26 @@ async function resolveBlockData(input) {
407
413
  return (await resolveBlockDataWithDeps(DEFAULT_RESOLVE_BLOCK_DATA_DEPS, input)).resolvedData;
408
414
  }
409
415
  async function resolveBlockDataWithDeps(deps, input) {
410
- const root = configLoaderRoot(input.renderTarget, input.bookingTimeZone, input.now);
411
- const configData = await deps.prefetchBlockData(input.page, {
416
+ const entrySubrouteContext = toEntrySubrouteContext(input.entrySubrouteData ?? null);
417
+ const baseRoot = configLoaderRoot(input.renderTarget, input.bookingTimeZone, input.now);
418
+ const root = entrySubrouteContext ? {
419
+ ...baseRoot,
420
+ entrySubrouteContext,
421
+ ...entrySubrouteContext.kind === "event-occurrence" ? { occurrenceContext: entrySubrouteContext.occurrence } : {}
422
+ } : baseRoot;
423
+ const prefetched = await deps.prefetchBlockData(input.page, {
412
424
  siteId: input.siteId,
413
425
  pageId: getDataLoaderOwnerPageId(input.renderTarget),
414
426
  previewStage: input.previewStage,
415
427
  ...root ? { root } : {}
416
- }, input.client, { customBlocks: input.customBlocks });
428
+ }, input.client, {
429
+ customBlocks: input.customBlocks,
430
+ ...input.seededData ? { shouldLoad: ({ blockId, loaderKey }) => !Object.prototype.hasOwnProperty.call(input.seededData?.[blockId] ?? {}, loaderKey) } : {}
431
+ });
432
+ const configData = input.seededData ? {
433
+ ...prefetched,
434
+ resolvedData: deps.mergeLoaderResults(input.seededData, prefetched.resolvedData)
435
+ } : prefetched;
417
436
  if (input.policy.kind === "config-only" || !hasRegisteredDataLoaders(input.policy.overrides)) return configData;
418
437
  const hostResult = await deps.executeCodeLoaders(input.page, {
419
438
  siteId: input.siteId,
@@ -0,0 +1,89 @@
1
+ import { a as ApiEnvelopeError, i as ApiRequestError, t as RiverbankApiError } from "./error-f4g44bKx.mjs";
2
+ //#region src/routing/resolvePageContent.ts
3
+ /** The public 404 tag is metadata, independent of error wording. */
4
+ function pageReadMissReason(tag) {
5
+ return tag === "page_read:invalid_subroute" ? "invalid_subroute" : tag === "page_read:withheld_subject" ? "withheld_subject" : "not_found";
6
+ }
7
+ /** Only a typed HTTP miss can enter route absence/redirect handling. */
8
+ function pageReadMissReasonFromError(error) {
9
+ return (error instanceof RiverbankApiError || error instanceof ApiRequestError || error instanceof ApiEnvelopeError) && error.status === 404 ? pageReadMissReason(error.tag) : null;
10
+ }
11
+ var RiverbankContentLoadError = class RiverbankContentLoadError extends Error {
12
+ constructor(message, options) {
13
+ super(message);
14
+ this.name = "RiverbankContentLoadError";
15
+ this.surface = options.surface;
16
+ this.reason = options.reason ?? null;
17
+ this.path = options.path ?? null;
18
+ this.cause = options.cause;
19
+ Object.setPrototypeOf(this, RiverbankContentLoadError.prototype);
20
+ }
21
+ };
22
+ function contentFound(content) {
23
+ return {
24
+ kind: "found",
25
+ content
26
+ };
27
+ }
28
+ function contentNotFound(reason = "not_found") {
29
+ return {
30
+ kind: "not_found",
31
+ reason
32
+ };
33
+ }
34
+ function contentLoadFailed(error) {
35
+ return {
36
+ kind: "failed",
37
+ error
38
+ };
39
+ }
40
+ /** The dashboard admits the complete path. Routing performs exactly one read. */
41
+ async function resolvePageContent(options) {
42
+ const read = await options.loadContent(options.path);
43
+ switch (read.kind) {
44
+ case "found": return {
45
+ found: true,
46
+ content: read.content,
47
+ entrySubrouteData: null,
48
+ resolvedPath: options.path
49
+ };
50
+ case "not_found": return {
51
+ found: false,
52
+ reason: read.reason === "invalid_subroute" ? "invalid-subroute" : read.reason === "withheld_subject" ? "withheld-subject" : "not-found"
53
+ };
54
+ case "failed": return {
55
+ found: false,
56
+ reason: "load-failed",
57
+ failedPath: options.path,
58
+ error: read.error
59
+ };
60
+ }
61
+ }
62
+ function toOccurrenceContextFromEntrySubroute(entrySubrouteData) {
63
+ if (!entrySubrouteData || entrySubrouteData.kind !== "event-occurrence") return null;
64
+ return {
65
+ id: entrySubrouteData.occurrence.id,
66
+ seriesId: entrySubrouteData.occurrence.seriesId,
67
+ startsAt: entrySubrouteData.occurrence.startsAt,
68
+ endsAt: entrySubrouteData.occurrence.endsAt,
69
+ timeZone: entrySubrouteData.occurrence.timeZone,
70
+ capacityOverride: entrySubrouteData.occurrence.capacityOverride,
71
+ overrides: entrySubrouteData.occurrence.overridesJson
72
+ };
73
+ }
74
+ function toEntrySubrouteContext(entrySubrouteData) {
75
+ if (entrySubrouteData?.kind === "event-run") return {
76
+ kind: "event-run",
77
+ run: {
78
+ ...entrySubrouteData.run,
79
+ name: null
80
+ }
81
+ };
82
+ const occurrence = toOccurrenceContextFromEntrySubroute(entrySubrouteData);
83
+ return occurrence ? {
84
+ kind: "event-occurrence",
85
+ occurrence
86
+ } : null;
87
+ }
88
+ //#endregion
89
+ export { pageReadMissReason as a, toEntrySubrouteContext as c, contentNotFound as i, contentFound as n, pageReadMissReasonFromError as o, contentLoadFailed as r, resolvePageContent as s, RiverbankContentLoadError as t };
@@ -1,4 +1,6 @@
1
- import { _ as toRoutingInfo, a as resolvePageContent, c as extractPotentialEntrySubroute, d as isUUID, f as isValidSegment, g as matchContentEntryPath, h as isContentEntryPath, i as contentNotFound, l as inferKnownEntrySubrouteKind, m as getContentEntryPrefixesFromContentTypes, n as contentFound, o as defaultShouldAttemptEntrySubroute, p as getContentEntryPrefixes, r as contentLoadFailed, s as detectEntrySubrouteFromTypes, t as RiverbankContentLoadError, u as isISODateString } from "./resolvePageContent-CAELMBEJ.mjs";
1
+ import { a as pageReadMissReason, i as contentNotFound, n as contentFound, o as pageReadMissReasonFromError, r as contentLoadFailed, s as resolvePageContent, t as RiverbankContentLoadError } from "./resolvePageContent-DnM16_f9.mjs";
2
+ import { n as getRouteTemplatePrefix, r as parseRouteTemplate } from "./routeTemplate-AsKQwa47.mjs";
3
+ import { t as toRoutingInfo } from "./contentTypeResolver-B9vy8BrF.mjs";
2
4
  //#region src/routing/checkRedirect.ts
3
5
  /**
4
6
  * Check if a path has a configured redirect rule
@@ -35,36 +37,24 @@ import { _ as toRoutingInfo, a as resolvePageContent, c as extractPotentialEntry
35
37
  */
36
38
  async function checkRedirectForPath(params) {
37
39
  const { client, siteId, path } = params;
38
- try {
39
- const response = await client.checkRedirect({
40
- siteId,
41
- path
42
- });
43
- if (response.redirectTo) {
44
- const isPermanent = response.status === 301 || response.status === 308;
45
- return {
46
- hasRedirect: true,
47
- redirect: {
48
- destination: response.redirectTo,
49
- permanent: isPermanent
50
- }
51
- };
52
- }
53
- return {
54
- hasRedirect: false,
55
- redirect: null
56
- };
57
- } catch (error) {
58
- console.warn("[checkRedirectForPath] Failed to check redirect", {
59
- siteId,
60
- path,
61
- error: error instanceof Error ? error.message : String(error)
62
- });
40
+ const response = await client.checkRedirect({
41
+ siteId,
42
+ path
43
+ });
44
+ if (response.redirectTo) {
45
+ const isPermanent = response.status === 301 || response.status === 308;
63
46
  return {
64
- hasRedirect: false,
65
- redirect: null
47
+ hasRedirect: true,
48
+ redirect: {
49
+ destination: response.redirectTo,
50
+ permanent: isPermanent
51
+ }
66
52
  };
67
53
  }
54
+ return {
55
+ hasRedirect: false,
56
+ redirect: null
57
+ };
68
58
  }
69
59
  //#endregion
70
60
  //#region src/routing/resolveRoute.ts
@@ -115,11 +105,7 @@ async function resolveRoute(params) {
115
105
  async function resolveRouteWithDeps(deps, params) {
116
106
  const { client, siteId, path, preview = false } = params;
117
107
  try {
118
- if (await client.getPage({
119
- siteId,
120
- path,
121
- preview
122
- })) return {
108
+ return {
123
109
  type: "page",
124
110
  pageData: await deps.loadPage({
125
111
  client,
@@ -129,30 +115,20 @@ async function resolveRouteWithDeps(deps, params) {
129
115
  })
130
116
  };
131
117
  } catch (error) {
132
- if (error instanceof Error && (error.message.includes("404") || error.message.includes("Not Found") || error.message.includes("not found"))) console.debug("[resolveRoute] Page not found", { path });
133
- else console.warn("[resolveRoute] Failed to fetch page", {
134
- path,
135
- error: error instanceof Error ? error.message : String(error)
136
- });
137
- }
138
- try {
139
- const redirectResult = await checkRedirectForPath({
140
- client,
141
- siteId,
142
- path
143
- });
144
- if (redirectResult.hasRedirect) return {
145
- type: "redirect",
146
- destination: redirectResult.redirect.destination,
147
- permanent: redirectResult.redirect.permanent
148
- };
149
- } catch (redirectError) {
150
- console.debug("[resolveRoute] Redirect check failed", {
151
- path,
152
- error: redirectError instanceof Error ? redirectError.message : String(redirectError)
153
- });
118
+ const miss = pageReadMissReasonFromError(error);
119
+ if (miss === null) throw error;
120
+ if (miss !== "not_found" || preview) return { type: "not-found" };
154
121
  }
155
- return { type: "not-found" };
122
+ const redirect = await checkRedirectForPath({
123
+ client,
124
+ siteId,
125
+ path
126
+ });
127
+ return redirect.hasRedirect ? {
128
+ type: "redirect",
129
+ destination: redirect.redirect.destination,
130
+ permanent: redirect.redirect.permanent
131
+ } : { type: "not-found" };
156
132
  }
157
133
  /**
158
134
  * Batch resolve multiple routes in parallel
@@ -196,4 +172,242 @@ async function resolveRoutesWithDeps(paramsDeps, params) {
196
172
  }));
197
173
  }
198
174
  //#endregion
199
- export { RiverbankContentLoadError, checkRedirectForPath, contentFound, contentLoadFailed, contentNotFound, defaultShouldAttemptEntrySubroute, detectEntrySubrouteFromTypes, extractPotentialEntrySubroute, getContentEntryPrefixes, getContentEntryPrefixesFromContentTypes, inferKnownEntrySubrouteKind, isContentEntryPath, isISODateString, isUUID, isValidSegment, matchContentEntryPath, resolvePageContent, resolveRoute, resolveRoutes, toRoutingInfo };
175
+ //#region src/routing/contentRoutes.ts
176
+ /**
177
+ * Content route matching utilities.
178
+ *
179
+ * Derive route matching from SDK config to determine whether a URL path
180
+ * is a CMS page or a content entry, without duplicating route patterns.
181
+ */
182
+ /**
183
+ * Extract the first path segment from each routable content type's routePattern.
184
+ *
185
+ * Use this when you already have a content type array and want the same prefix
186
+ * derivation behavior used by runtime routing helpers and generated config files.
187
+ */
188
+ function getContentEntryPrefixesFromContentTypes(contentTypes) {
189
+ return contentTypes.filter((ct) => ct.hasPages && typeof ct.routePattern === "string").map((ct) => getRouteTemplatePrefix(parseRouteTemplate(ct.routePattern))).filter((prefix) => typeof prefix === "string");
190
+ }
191
+ /**
192
+ * Extract the first path segment from each routable content type's routePattern.
193
+ *
194
+ * Useful for simple prefix-based routing decisions. For more precise matching
195
+ * that handles nested patterns, use `isContentEntryPath` instead.
196
+ *
197
+ * @param config - The SDK config object from defineConfig()
198
+ * @returns Array of first path segments from content type routePatterns
199
+ *
200
+ * @example
201
+ * ```typescript
202
+ * import { getContentEntryPrefixes } from '@riverbankcms/sdk/routing';
203
+ * import config from '../riverbank.config';
204
+ *
205
+ * // Config with routePatterns: '/blog/{slug}', '/work/projects/{slug}'
206
+ * const prefixes = getContentEntryPrefixes(config);
207
+ * // Returns ['blog', 'work']
208
+ * ```
209
+ */
210
+ function getContentEntryPrefixes(config) {
211
+ return getContentEntryPrefixesFromContentTypes(config.content?.contentTypes ?? []);
212
+ }
213
+ /**
214
+ * Check if a URL path matches any content entry route pattern.
215
+ *
216
+ * This is the core matching function that works with ContentTypeRoutingInfo[].
217
+ * Use this when you have resolved content types from the API or merged sources.
218
+ *
219
+ * **Note:** Content types are checked in array order. If multiple patterns
220
+ * could match a path, the first matching content type wins.
221
+ *
222
+ * @param contentTypes - Array of content type routing info
223
+ * @param path - URL path as string ('/blog/my-post') or segments ['blog', 'my-post']
224
+ * @returns Match result with content type and slug if matched
225
+ *
226
+ * @example
227
+ * ```typescript
228
+ * import { matchContentEntryPath } from '@riverbankcms/sdk/routing';
229
+ *
230
+ * const contentTypes = [
231
+ * { key: 'blog-post', hasPages: true, routePattern: '/blog/{slug}' },
232
+ * { key: 'project', hasPages: true, routePattern: '/work/projects/{slug}' },
233
+ * ];
234
+ *
235
+ * matchContentEntryPath(contentTypes, '/blog/my-post');
236
+ * // Returns { isEntry: true, contentType: 'blog-post', slug: 'my-post' }
237
+ * ```
238
+ */
239
+ function matchContentEntryPath(contentTypes, path) {
240
+ const segments = typeof path === "string" ? path.split("/").filter(Boolean) : path;
241
+ for (const ct of contentTypes) {
242
+ if (!ct.hasPages || !ct.routePattern) continue;
243
+ const match = matchRouteTemplate(segments, parseRouteTemplate(ct.routePattern));
244
+ if (match.matches) return {
245
+ isEntry: true,
246
+ contentType: ct.key,
247
+ slug: match.slug
248
+ };
249
+ }
250
+ return { isEntry: false };
251
+ }
252
+ /**
253
+ * Check if a URL path matches any content entry route pattern.
254
+ *
255
+ * Supports nested patterns like '/work/projects/{slug}'. Returns the matched
256
+ * content type key and extracted slug, useful for routing decisions.
257
+ *
258
+ * **Note:** Content types are checked in array order. If multiple patterns
259
+ * could match a path, the first matching content type wins. Order more specific
260
+ * patterns before generic ones in your config.
261
+ *
262
+ * @param config - The SDK config object from defineConfig()
263
+ * @param path - URL path as string ('/blog/my-post') or segments ['blog', 'my-post']
264
+ * @returns Match result with content type and slug if matched
265
+ *
266
+ * @example
267
+ * ```typescript
268
+ * import { isContentEntryPath } from '@riverbankcms/sdk/routing';
269
+ * import config from '../riverbank.config';
270
+ *
271
+ * // Simple pattern: '/blog/{slug}'
272
+ * isContentEntryPath(config, '/blog/my-post');
273
+ * // Returns { isEntry: true, contentType: 'blog-post', slug: 'my-post' }
274
+ *
275
+ * // Nested pattern: '/work/projects/{slug}'
276
+ * isContentEntryPath(config, '/work/projects/website-redesign');
277
+ * // Returns { isEntry: true, contentType: 'project', slug: 'website-redesign' }
278
+ *
279
+ * // Non-matching path
280
+ * isContentEntryPath(config, '/about');
281
+ * // Returns { isEntry: false }
282
+ * ```
283
+ */
284
+ function isContentEntryPath(config, path) {
285
+ return matchContentEntryPath((config.content?.contentTypes ?? []).map(toRoutingInfo), path);
286
+ }
287
+ function matchRouteTemplate(pathSegments, routeTemplate) {
288
+ switch (routeTemplate.kind) {
289
+ case "fixed-path": {
290
+ const fixedSegments = routeTemplate.path.split("/").filter(Boolean);
291
+ return { matches: fixedSegments.length === pathSegments.length && fixedSegments.every((segment, index) => pathSegments[index] === segment) };
292
+ }
293
+ case "fallback-slug":
294
+ if (pathSegments.length === 0) return { matches: false };
295
+ return {
296
+ matches: true,
297
+ slug: pathSegments.join("/")
298
+ };
299
+ case "slug-template": {
300
+ const { prefixSegments, suffixSegments } = routeTemplate;
301
+ const minimumSegments = prefixSegments.length + suffixSegments.length + 1;
302
+ if (pathSegments.length < minimumSegments) return { matches: false };
303
+ if (!prefixSegments.every((segment, index) => pathSegments[index] === segment)) return { matches: false };
304
+ const suffixOffset = pathSegments.length - suffixSegments.length;
305
+ if (!suffixSegments.every((segment, index) => pathSegments[suffixOffset + index] === segment)) return { matches: false };
306
+ const slugSegments = pathSegments.slice(prefixSegments.length, suffixOffset);
307
+ if (slugSegments.length === 0) return { matches: false };
308
+ return {
309
+ matches: true,
310
+ slug: slugSegments.join("/")
311
+ };
312
+ }
313
+ }
314
+ }
315
+ //#endregion
316
+ //#region src/routing/segmentValidators.ts
317
+ /**
318
+ * Shared URL segment validators used by routing/subroute detection.
319
+ */
320
+ /**
321
+ * Check if a string is a valid ISO date (YYYY-MM-DD)
322
+ */
323
+ function isISODateString(str) {
324
+ return /^\d{4}-\d{2}-\d{2}$/.test(str);
325
+ }
326
+ /**
327
+ * Check if a string is a valid UUID
328
+ */
329
+ function isUUID(str) {
330
+ return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(str);
331
+ }
332
+ /**
333
+ * Check if a segment is a valid event occurrence segment (ISO date or UUID)
334
+ */
335
+ function isValidSegment(segment) {
336
+ return isISODateString(segment) || isUUID(segment);
337
+ }
338
+ //#endregion
339
+ //#region src/routing/entrySubroutes.ts
340
+ /**
341
+ * Parse a path into parent path and last segment.
342
+ * Returns null when no parent/segment split exists.
343
+ */
344
+ function extractPotentialEntrySubroute(path) {
345
+ const lastSlash = path.lastIndexOf("/");
346
+ if (lastSlash <= 0) return null;
347
+ const segment = path.slice(lastSlash + 1);
348
+ const parentPath = path.slice(0, lastSlash);
349
+ if (!segment || !parentPath) return null;
350
+ return {
351
+ parentPath,
352
+ segment
353
+ };
354
+ }
355
+ /**
356
+ * Detect entry subroute candidate using content type routing info (no API calls).
357
+ *
358
+ * This lets callers avoid loading parent content when the parent path doesn't match
359
+ * any content entry route pattern.
360
+ */
361
+ function detectEntrySubrouteFromTypes(contentTypes, path) {
362
+ const parsed = extractPotentialEntrySubroute(path);
363
+ if (!parsed) return null;
364
+ const match = matchContentEntryPath(contentTypes, parsed.parentPath);
365
+ if (!match.isEntry || !match.contentType) return null;
366
+ const subroutes = contentTypes.find((ct) => ct.key === match.contentType)?.subroutes ?? [];
367
+ if (subroutes.length === 0) return null;
368
+ const matchedSubroute = subroutes.find((subroute) => isSegmentTypeMatch(parsed.segment, subroute.segmentType));
369
+ if (!matchedSubroute) return null;
370
+ return {
371
+ parentPath: parsed.parentPath,
372
+ segment: parsed.segment,
373
+ contentTypeKey: match.contentType,
374
+ kind: matchedSubroute.kind,
375
+ segmentType: matchedSubroute.segmentType,
376
+ precedence: matchedSubroute.precedence ?? "subroute-first"
377
+ };
378
+ }
379
+ function isSegmentTypeMatch(segment, segmentType) {
380
+ if (segmentType === "uuid") return isUUID(segment);
381
+ if (segmentType === "iso-date") return isISODateString(segment);
382
+ if (segmentType === "uuid-or-date") return isValidSegment(segment);
383
+ return isSubrouteSlugSegment(segment);
384
+ }
385
+ function isSubrouteSlugSegment(segment) {
386
+ return /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(segment);
387
+ }
388
+ /**
389
+ * Default eligibility predicate for entry subroute resolution.
390
+ *
391
+ * - `event`: segment must be event-like (date or UUID)
392
+ * - `null`: used by fallback probing; keep it strict and only allow event-like segments
393
+ * - others: not subroute-eligible
394
+ */
395
+ function defaultShouldAttemptEntrySubroute(args) {
396
+ if (args.entryTypeKey === "event") return isValidSegment(args.segment) || isSubrouteSlugSegment(args.segment);
397
+ if (args.entryTypeKey === null) return isValidSegment(args.segment);
398
+ return false;
399
+ }
400
+ /**
401
+ * Infer a known subroute kind when explicit routing metadata is unavailable.
402
+ *
403
+ * This is primarily used by SDK catch-all routing when local config does not
404
+ * yet expose `routing.subroutes`, allowing generic resolver usage without
405
+ * duplicating event-specific API calls.
406
+ */
407
+ function inferKnownEntrySubrouteKind(args) {
408
+ if (args.entryTypeKey === "event" && isValidSegment(args.segment)) return "event-occurrence";
409
+ if (args.entryTypeKey === null && isValidSegment(args.segment)) return "event-occurrence";
410
+ return null;
411
+ }
412
+ //#endregion
413
+ export { RiverbankContentLoadError, checkRedirectForPath, contentFound, contentLoadFailed, contentNotFound, defaultShouldAttemptEntrySubroute, detectEntrySubrouteFromTypes, extractPotentialEntrySubroute, getContentEntryPrefixes, getContentEntryPrefixesFromContentTypes, inferKnownEntrySubrouteKind, isContentEntryPath, isISODateString, isUUID, isValidSegment, matchContentEntryPath, pageReadMissReason, pageReadMissReasonFromError, resolvePageContent, resolveRoute, resolveRoutes, toRoutingInfo };
@@ -1,4 +1,4 @@
1
- import { t as createRiverbankClient } from "./client-BPLLL22F.mjs";
2
- import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-CxASA3PE.mjs";
3
- import { t as loadPage } from "./loadPage-CQgde5DN.mjs";
1
+ import { t as createRiverbankClient } from "./client-CGJ2ztYp.mjs";
2
+ import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-BkK1w3QQ.mjs";
3
+ import { t as loadPage } from "./loadPage-DTLe0FEs.mjs";
4
4
  export { createRiverbankClient, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage };