@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,3 +0,0 @@
1
- "use client";
2
- import { t as renderCalendarFeedIcs } from "./src-DzXUmsyK.mjs";
3
- export { renderCalendarFeedIcs };
@@ -1,22 +0,0 @@
1
- //#region src/portal/constants.ts
2
- /**
3
- * Portal Authentication Constants
4
- */
5
- /** Cookie name for storing the portal session token */
6
- const PORTAL_TOKEN_COOKIE = "portal_token";
7
- /** Cookie max age in seconds (30 days) */
8
- const PORTAL_COOKIE_MAX_AGE = 720 * 60 * 60;
9
- /** Query parameter name for the short-lived exchange code in the callback URL */
10
- const PORTAL_CODE_PARAM = "portal_code";
11
- /** Query/form parameter name for redirect destination */
12
- const REDIRECT_TO_PARAM = "redirect_to";
13
- /** Canonical published-site path for the customer portal */
14
- const CUSTOMER_PORTAL_PATH = "/portal";
15
- /** Default redirect path for callback */
16
- const DEFAULT_PORTAL_REDIRECT = CUSTOMER_PORTAL_PATH;
17
- /** Default redirect path for logout */
18
- const DEFAULT_LOGOUT_REDIRECT = "/";
19
- /** Query parameter added to the redirect URL after a successful magic link login */
20
- const PORTAL_LOGIN_SUCCESS_PARAM = "portal_login";
21
- //#endregion
22
- export { PORTAL_COOKIE_MAX_AGE as a, REDIRECT_TO_PARAM as c, PORTAL_CODE_PARAM as i, DEFAULT_LOGOUT_REDIRECT as n, PORTAL_LOGIN_SUCCESS_PARAM as o, DEFAULT_PORTAL_REDIRECT as r, PORTAL_TOKEN_COOKIE as s, CUSTOMER_PORTAL_PATH as t };
@@ -1,371 +0,0 @@
1
- import { a as sanitizeSafeAppPath, i as safeAppPathOrFallback, n as assertSafeAppPath, r as buildSafeRedirectUrl } from "./src-DHK4JUlp.mjs";
2
- import { a as PORTAL_COOKIE_MAX_AGE, c as REDIRECT_TO_PARAM, i as PORTAL_CODE_PARAM, o as PORTAL_LOGIN_SUCCESS_PARAM, r as DEFAULT_PORTAL_REDIRECT, s as PORTAL_TOKEN_COOKIE } from "./constants-hl17xz6x.mjs";
3
- //#region src/portal/redirects.ts
4
- const DEPRECATED_REDIRECT_PATH_WARNING = "[SDK] handlePortalCallback/handlePortalLogout: \"redirectPath\" is deprecated, use \"defaultRedirectPath\"";
5
- function resolveRedirectPathOption({ options, defaultValue, warn, nodeEnv }) {
6
- if (options.defaultRedirectPath !== void 0) return options.defaultRedirectPath;
7
- if (options.redirectPath !== void 0) {
8
- if (nodeEnv !== "production") warn(DEPRECATED_REDIRECT_PATH_WARNING);
9
- return options.redirectPath;
10
- }
11
- return defaultValue;
12
- }
13
- function resolveDefaultRedirect(options, defaultValue, warn = console.warn, nodeEnv = process.env.NODE_ENV) {
14
- return assertSafeAppPath(resolveRedirectPathOption({
15
- options,
16
- defaultValue,
17
- warn,
18
- nodeEnv
19
- }));
20
- }
21
- function resolveCallbackRedirect(redirectTo, defaultRedirect) {
22
- return safeAppPathOrFallback(redirectTo, defaultRedirect);
23
- }
24
- function resolveLogoutRedirect({ defaultRedirect, formRedirect, queryRedirect }) {
25
- if (typeof formRedirect === "string") {
26
- const sanitized = sanitizeSafeAppPath(formRedirect);
27
- if (sanitized) return sanitized;
28
- }
29
- return sanitizeSafeAppPath(queryRedirect) ?? defaultRedirect;
30
- }
31
- //#endregion
32
- //#region src/portal/callback.ts
33
- /**
34
- * Check if running in production environment.
35
- */
36
- function isProduction() {
37
- return process.env.NODE_ENV === "production";
38
- }
39
- function serializeCookie(name, value, options) {
40
- const parts = [`${name}=${encodeURIComponent(value)}`];
41
- parts.push(`Path=${options.path ?? "/"}`);
42
- if (options.httpOnly) parts.push("HttpOnly");
43
- if (options.secure) parts.push("Secure");
44
- if (options.sameSite) {
45
- const sameSiteValue = options.sameSite === "lax" ? "Lax" : options.sameSite === "strict" ? "Strict" : "None";
46
- parts.push(`SameSite=${sameSiteValue}`);
47
- }
48
- if (typeof options.maxAge === "number") parts.push(`Max-Age=${options.maxAge}`);
49
- return parts.join("; ");
50
- }
51
- function createPortalRouteResponse(init) {
52
- const headers = new Headers(init.headers);
53
- const cookies = /* @__PURE__ */ new Map();
54
- for (const cookie of init.cookies ?? []) {
55
- cookies.set(cookie.name, cookie);
56
- headers.append("Set-Cookie", serializeCookie(cookie.name, cookie.value, {
57
- httpOnly: cookie.httpOnly,
58
- secure: cookie.secure,
59
- sameSite: cookie.sameSite,
60
- path: cookie.path,
61
- maxAge: cookie.maxAge
62
- }));
63
- }
64
- const response = new Response(init.body ?? null, {
65
- status: init.status,
66
- headers
67
- });
68
- return Object.assign(response, { cookies: { get(name) {
69
- return cookies.get(name);
70
- } } });
71
- }
72
- function createJsonResponse(body, status) {
73
- return createPortalRouteResponse({
74
- body: JSON.stringify(body),
75
- status,
76
- headers: {
77
- "Content-Type": "application/json",
78
- "Cache-Control": "no-store",
79
- "Referrer-Policy": "no-referrer"
80
- }
81
- });
82
- }
83
- /**
84
- * Resolve the external origin for redirects.
85
- *
86
- * In dev, NextRequest.nextUrl.host can be 'localhost' even when the request was
87
- * made to a subdomain like `foo.localhost`. Use forwarded/host headers to preserve
88
- * the real host so we don't accidentally redirect to localhost (which can then
89
- * trigger frontend middleware redirects to the dashboard).
90
- */
91
- function getRequestOrigin(request) {
92
- const url = request.nextUrl;
93
- const forwardedHost = request.headers.get("x-forwarded-host")?.split(",")[0]?.trim();
94
- const host = request.headers.get("host")?.split(",")[0]?.trim();
95
- const isInternalHost = (value) => {
96
- const normalized = value.toLowerCase();
97
- return normalized.includes("localhost") || normalized.endsWith(".local") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.startsWith("[::1]") || normalized === "::1";
98
- };
99
- const hostHeader = forwardedHost && (!host || isInternalHost(host) && !isInternalHost(forwardedHost)) ? forwardedHost : host || url.host;
100
- const forwardedProto = request.headers.get("x-forwarded-proto")?.split(",")[0]?.trim();
101
- const isLocalHost = hostHeader.includes("localhost") || hostHeader.includes(".local");
102
- return `${forwardedProto || (isLocalHost ? "http" : url.protocol.replace(":", ""))}://${hostHeader}`;
103
- }
104
- /**
105
- * Get dashboard URL from environment without requiring API keys.
106
- * Returns null if not configured.
107
- *
108
- * This is a simpler alternative to getRiverbankEnv() that doesn't
109
- * require SITE_ID or API_KEY to be set.
110
- */
111
- function getDashboardUrl() {
112
- const target = process.env.RIVERBANK_ENV?.toLowerCase();
113
- const prefix = target === "remote" || target === "production" || target === "prod" ? "RIVERBANK_REMOTE" : "RIVERBANK_LOCAL";
114
- const url = process.env[`${prefix}_DASHBOARD_URL`];
115
- if (!url) return null;
116
- return url.replace(/\/api$/, "").replace(/\/$/, "");
117
- }
118
- /**
119
- * Resolve dashboard URL from various sources.
120
- */
121
- function resolveDashboardUrl(option) {
122
- if (typeof option === "string") return option;
123
- if (typeof option === "function") return option();
124
- return getDashboardUrl();
125
- }
126
- function isApiSuccessEnvelope(value) {
127
- return value !== null && typeof value === "object" && "success" in value && value.success === true && "data" in value;
128
- }
129
- function isApiErrorEnvelope(value) {
130
- return value !== null && typeof value === "object" && "success" in value && value.success === false;
131
- }
132
- async function exchangePortalCode(params) {
133
- const controller = new AbortController();
134
- const timeout = setTimeout(() => controller.abort(), params.timeoutMs);
135
- try {
136
- const response = await fetch(`${params.dashboardUrl}/api/portal/auth/exchange`, {
137
- method: "POST",
138
- headers: { "Content-Type": "application/json" },
139
- cache: "no-store",
140
- body: JSON.stringify({
141
- portalCode: params.portalCode,
142
- callbackOrigin: params.callbackOrigin
143
- }),
144
- signal: controller.signal
145
- });
146
- const json = await response.json().catch(() => null);
147
- if (response.ok && isApiSuccessEnvelope(json)) return {
148
- success: true,
149
- payload: json.data
150
- };
151
- const fallbackMessage = response.status >= 500 ? "Unable to complete portal sign-in right now. Please try again." : "Invalid or expired portal code.";
152
- const envelopeMessage = isApiErrorEnvelope(json) && typeof json.error?.message === "string" ? json.error.message : null;
153
- return {
154
- success: false,
155
- status: response.status,
156
- message: envelopeMessage ?? fallbackMessage
157
- };
158
- } catch {
159
- return {
160
- success: false,
161
- status: 502,
162
- message: "Unable to complete portal sign-in right now. Please try again."
163
- };
164
- } finally {
165
- clearTimeout(timeout);
166
- }
167
- }
168
- function portalSessionCookie(token, secure) {
169
- return {
170
- name: PORTAL_TOKEN_COOKIE,
171
- value: token,
172
- httpOnly: true,
173
- secure,
174
- sameSite: "lax",
175
- path: "/",
176
- maxAge: PORTAL_COOKIE_MAX_AGE
177
- };
178
- }
179
- async function readCallbackPostCode(request, origin) {
180
- if (request.headers.get("origin") !== origin) return {
181
- kind: "error",
182
- status: 403
183
- };
184
- if (request.headers.get("content-type")?.split(";")[0]?.trim() !== "application/json") return {
185
- kind: "error",
186
- status: 415
187
- };
188
- const body = await request.json().catch(() => null);
189
- return body && typeof body === "object" && "portalCode" in body && typeof body.portalCode === "string" && body.portalCode.trim() ? {
190
- kind: "code",
191
- value: body.portalCode
192
- } : {
193
- kind: "error",
194
- status: 400
195
- };
196
- }
197
- async function completeCallbackPost(request, options, secure, exchangeTimeoutMs) {
198
- const origin = getRequestOrigin(request);
199
- const code = await readCallbackPostCode(request, origin);
200
- if (code.kind === "error") return createJsonResponse({ success: false }, code.status);
201
- const dashboardUrl = resolveDashboardUrl(options.dashboardUrl);
202
- if (!dashboardUrl) return createJsonResponse({ success: false }, 500);
203
- const result = await exchangePortalCode({
204
- dashboardUrl,
205
- portalCode: code.value,
206
- callbackOrigin: origin,
207
- timeoutMs: exchangeTimeoutMs
208
- });
209
- if (!result.success) return createJsonResponse({ success: false }, result.status >= 500 || result.status <= 0 ? 502 : result.status);
210
- return createPortalRouteResponse({
211
- status: 200,
212
- body: JSON.stringify({ success: true }),
213
- headers: {
214
- "Content-Type": "application/json",
215
- "Cache-Control": "no-store",
216
- "Referrer-Policy": "no-referrer"
217
- },
218
- cookies: [portalSessionCookie(result.payload.sessionToken, secure)]
219
- });
220
- }
221
- /**
222
- * Create a GET route handler for the portal callback.
223
- *
224
- * This handler:
225
- * 1. Extracts the portal_code from the URL query params
226
- * 2. Validates the redirect_to path (prevents open redirects)
227
- * 3. Exchanges portal_code server-to-server for session token
228
- * 4. Stores the token in an httpOnly cookie
229
- * 5. Redirects to the validated path
230
- *
231
- * @param options - Configuration options
232
- * @returns GET route handler function
233
- */
234
- function handlePortalCallback(options = {}) {
235
- const defaultRedirect = resolveDefaultRedirect(options, DEFAULT_PORTAL_REDIRECT);
236
- const secure = options.secure ?? isProduction();
237
- const exchangeTimeoutMs = options.exchangeTimeoutMs ?? 1e4;
238
- const { dashboardUrl } = options;
239
- return async function callback(request) {
240
- if (request.method === "POST") return completeCallbackPost(request, options, secure, exchangeTimeoutMs);
241
- const { searchParams } = request.nextUrl;
242
- const portalCode = searchParams.get(PORTAL_CODE_PARAM);
243
- const finalRedirect = resolveCallbackRedirect(searchParams.get(REDIRECT_TO_PARAM), defaultRedirect);
244
- if (!portalCode) return createJsonResponse({ error: "Missing portal_code parameter" }, 400);
245
- const url = resolveDashboardUrl(dashboardUrl);
246
- if (!url) return createJsonResponse({ error: "Dashboard URL is not configured" }, 500);
247
- const exchangeResult = await exchangePortalCode({
248
- dashboardUrl: url,
249
- portalCode,
250
- callbackOrigin: getRequestOrigin(request),
251
- timeoutMs: exchangeTimeoutMs
252
- });
253
- if (!exchangeResult.success) {
254
- const status = exchangeResult.status >= 500 || exchangeResult.status <= 0 ? 502 : exchangeResult.status;
255
- return createJsonResponse({ error: exchangeResult.message }, status);
256
- }
257
- const redirectUrl = buildSafeRedirectUrl(finalRedirect, getRequestOrigin(request));
258
- redirectUrl.searchParams.set(PORTAL_LOGIN_SUCCESS_PARAM, "success");
259
- return createPortalRouteResponse({
260
- status: 307,
261
- headers: {
262
- Location: redirectUrl.toString(),
263
- "Referrer-Policy": "no-referrer",
264
- "Cache-Control": "no-store"
265
- },
266
- cookies: [portalSessionCookie(exchangeResult.payload.sessionToken, secure)]
267
- });
268
- };
269
- }
270
- /**
271
- * Create a POST route handler for portal logout.
272
- *
273
- * This handler:
274
- * 1. Gets the redirect path from form data or query params
275
- * 2. Calls the dashboard logout API to invalidate the session
276
- * 3. Clears the portal token cookie
277
- * 4. Redirects to the validated path
278
- *
279
- * @param options - Configuration options
280
- * @returns POST route handler function
281
- */
282
- function handlePortalLogout(options = {}) {
283
- const defaultRedirect = resolveDefaultRedirect(options, "/");
284
- const secure = options.secure ?? isProduction();
285
- const { dashboardUrl } = options;
286
- return async function POST(request) {
287
- const portalToken = request.cookies.get(PORTAL_TOKEN_COOKIE)?.value;
288
- let formRedirect = null;
289
- try {
290
- formRedirect = (await request.formData()).get(REDIRECT_TO_PARAM);
291
- } catch {}
292
- const redirectTo = resolveLogoutRedirect({
293
- defaultRedirect,
294
- formRedirect,
295
- queryRedirect: request.nextUrl.searchParams.get(REDIRECT_TO_PARAM)
296
- });
297
- if (portalToken) {
298
- const url = resolveDashboardUrl(dashboardUrl);
299
- if (url) try {
300
- await fetch(`${url}/api/portal/auth/logout`, {
301
- method: "POST",
302
- headers: { Authorization: `Bearer ${portalToken}` }
303
- });
304
- } catch {}
305
- }
306
- return createPortalRouteResponse({
307
- status: 307,
308
- headers: { Location: buildSafeRedirectUrl(redirectTo, getRequestOrigin(request)).toString() },
309
- cookies: [{
310
- name: PORTAL_TOKEN_COOKIE,
311
- value: "",
312
- httpOnly: true,
313
- secure,
314
- sameSite: "lax",
315
- path: "/",
316
- maxAge: 0
317
- }]
318
- });
319
- };
320
- }
321
- //#endregion
322
- //#region src/portal/validation.ts
323
- /**
324
- * Portal Validation Utilities
325
- */
326
- /**
327
- * Validate that a redirect path is safe (prevents open redirects).
328
- *
329
- * Valid paths must:
330
- * - Resolve to the same origin when parsed against a fixed base
331
- * - Not contain backslashes or control characters
332
- * - Not include encoded path separator/control-character payloads in the pathname
333
- *
334
- * @param path - The path to validate
335
- * @returns True if the path is safe to redirect to
336
- */
337
- function isValidRedirectPath(path) {
338
- return sanitizeSafeAppPath(path) !== null;
339
- }
340
- //#endregion
341
- //#region src/portal/token.ts
342
- /**
343
- * Portal server helpers: callback, logout and cookie/token access.
344
- *
345
- * For a themed reserved route, use createPortalPage from @riverbankcms/sdk/next.
346
- * For a custom host, import CustomerPortal from @riverbankcms/sdk/portal/client
347
- * and pass siteId, apiBaseUrl and the nullable portalToken inside the site ThemeScope.
348
- */
349
- /**
350
- * Get the portal token from the cookie store.
351
- *
352
- * @param cookieStore - The cookie store from `await cookies()`
353
- * @returns The portal token, or null if not present
354
- */
355
- function getPortalToken(cookieStore) {
356
- return cookieStore.get("portal_token")?.value ?? null;
357
- }
358
- /**
359
- * Check if the user has a portal session.
360
- *
361
- * Note: This only checks if the cookie exists, not if it's valid.
362
- * The actual validation happens when making API calls.
363
- *
364
- * @param cookieStore - The cookie store from `await cookies()`
365
- * @returns True if a portal token cookie exists
366
- */
367
- function hasPortalSession(cookieStore) {
368
- return getPortalToken(cookieStore) !== null;
369
- }
370
- //#endregion
371
- export { handlePortalCallback as a, getDashboardUrl as i, hasPortalSession as n, handlePortalLogout as o, isValidRedirectPath as r, getPortalToken as t };