@riverbankcms/sdk 0.161.0 → 0.162.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 (187) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-Bx4kLiTA.d.ts → BlocksIslandsHydrator-PZUoA872.d.ts} +1 -1
  2. package/dist/_dts/{Page-Dm7_P13o.d.ts → Page-CdQS6C7i.d.ts} +8 -8
  3. package/dist/_dts/{SdkPreviewMode-D7HdWWwF.d.ts → SdkPreviewMode-CNGO-5f1.d.ts} +58 -91
  4. package/dist/_dts/{client-Ep0jI9eE.d.ts → client-DGa53rjL.d.ts} +11 -3
  5. package/dist/_dts/{content-types-BgAzCrBc.d.ts → content-types-K9R7P-KF.d.ts} +2 -2
  6. package/dist/_dts/{contracts-DUiOnj9e.d.ts → contracts-CyBaPaIq.d.ts} +13 -4
  7. package/dist/_dts/{footerPageOutline-B-uXamTG.d.ts → footerPageOutline-B6jmKmon.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-BDkZYEcS.d.ts → generatePageMetadata-iemoR3AN.d.ts} +2 -2
  9. package/dist/_dts/{index-ylivB7Jj.d.ts → index-8CN0Nd-Z.d.ts} +2 -2
  10. package/dist/_dts/{index-CSsfq6KG.d.ts → index-BtnsA14K.d.ts} +9 -5
  11. package/dist/_dts/{index-BVkP8f70.d.ts → index-C39F9KaB.d.ts} +13 -2
  12. package/dist/_dts/{index-KPrWM0KF.d.ts → index-DEu85xBt.d.ts} +1 -1
  13. package/dist/_dts/{schema-BHu0PYWl.d.ts → index-DI2yaSPY.d.ts} +4099 -3343
  14. package/dist/_dts/{types-BR1Yboa9.d.ts → index-Dbd0Sn0G.d.ts} +3300 -1691
  15. package/dist/_dts/{index-CF6Cjs7b.d.ts → index-Du1IRglc.d.ts} +2 -2
  16. package/dist/_dts/{index-D_8uz4OP.d.ts → index-Jlcq6w69.d.ts} +3 -3
  17. package/dist/_dts/{index-DvKQA6AZ.d.ts → index-Wm62sXf2.d.ts} +4 -4
  18. package/dist/_dts/{loadContent-DTjKOO-T.d.ts → loadContent-BPfAAZDW.d.ts} +10 -7
  19. package/dist/_dts/{resolvePageContent-C1vA5c5w.d.ts → resolvePageContent-DWbrtKf8.d.ts} +2 -2
  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 +6 -6
  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/index.d.ts +8 -8
  27. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  28. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  29. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  30. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  31. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  32. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  33. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  34. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  35. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  36. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  37. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  38. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  39. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  40. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  42. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  43. package/dist/_dts/sdk/src/server.d.ts +5 -5
  44. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  45. package/dist/_dts/{types-ZGUiHpDE.d.ts → types-CVv2H4AT.d.ts} +7 -7
  46. package/dist/_dts/{types-D02ngcUH.d.ts → types-CfNG5koF.d.ts} +2 -2
  47. package/dist/_dts/{types-CJXTCF_F.d.ts → types-ClZ-BQL_.d.ts} +3 -3
  48. package/dist/_dts/{validation-BaV565gb.d.ts → validation-BJ6Lf_Dr.d.ts} +4 -4
  49. package/dist/client/{BlocksIslandsHydrator-DTExCJsb.mjs → BlocksIslandsHydrator-COqlgWYU.mjs} +20 -19
  50. package/dist/client/{BookingMailingListNote-BDpxmn1p.mjs → BookingMailingListNote-CFYPDEHH.mjs} +1 -1
  51. package/dist/client/{CalendarNavigationChevron-PeCiL82X.mjs → CalendarNavigationChevron-COBVxgHb.mjs} +6 -6
  52. package/dist/client/{CheckboxChoice-DWexRLf6.mjs → CheckboxChoice-C7X9dJ8A.mjs} +1 -1
  53. package/dist/client/{DemoBookingPortalAccess-3zmIqakW.mjs → DemoBookingPortalAccess-CvT0E9AR.mjs} +26 -10
  54. package/dist/client/{DemoPortalSignInLink-GHi-8BW5.mjs → DemoPortalSignInLink-EBOBN5dT.mjs} +1 -1
  55. package/dist/client/{EventCalendar.client-BxQLY5cX.mjs → EventCalendar.client-U6pKcntV.mjs} +16 -17
  56. package/dist/client/{EventCombined.client-B5bmQ03b.mjs → EventCombined.client-CNzwEHws.mjs} +8 -8
  57. package/dist/client/{EventEmbeddedCheckoutStep-CgMZ9TeU.mjs → EventEmbeddedCheckoutStep-B9yAWV_k.mjs} +1 -1
  58. package/dist/client/{EventItem-BEx-qiDE.mjs → EventItem-M5rpaHxi.mjs} +4 -4
  59. package/dist/client/{EventListWeekNavigation-CyH5tA6Y.mjs → EventListWeekNavigation-D4ieBLDY.mjs} +1 -1
  60. package/dist/client/{EventListing.client-D3uySdGP.mjs → EventListing.client-B8F40Rmn.mjs} +3 -3
  61. package/dist/client/{EventListing.view-9RFrBejr.mjs → EventListing.view-k4lhuCn5.mjs} +14 -21
  62. package/dist/client/{EventRegistrationPayment-CG2tQx8K.mjs → EventRegistrationPayment-C3g8_Hqb.mjs} +10 -10
  63. package/dist/client/LocationMapActions-CAjt7qVo.mjs +62 -0
  64. package/dist/client/{LocationMapActions-Wsr83Q7q.mjs → MapDrawingSvg-_aIK2ojv.mjs} +2 -70
  65. package/dist/client/{Page-Bf2nPACI.mjs → Page-DJBIQBOw.mjs} +1762 -254
  66. package/dist/client/{StepIndicator-CZweb1vs.mjs → StepIndicator-CFacB1z6.mjs} +2 -2
  67. package/dist/client/{TabBarFragment-Bkgz67gt.mjs → TabBarFragment-BLsfQskO.mjs} +1 -1
  68. package/dist/client/{ThemedButton-CnyL3s1A.mjs → ThemedButton-BWsDgjMC.mjs} +1 -1
  69. package/dist/client/{accordion-TcimLLRQ.mjs → accordion-CtO2XF7M.mjs} +1 -1
  70. package/dist/client/{booking-form.client-q-RpJ4aF.mjs → booking-form.client-RICCQ0h2.mjs} +137 -60
  71. package/dist/client/{bookingForm-DjGfk3Wj.mjs → bookingForm-SvjLPx8i.mjs} +4 -4
  72. package/dist/client/bookings.mjs +5 -5
  73. package/dist/client/{carousel-CGAk6j0m.mjs → carousel-BR-zCD3O.mjs} +2 -2
  74. package/dist/client/{carousel.client-ArlGmYWV.mjs → carousel.client-CEWtoZd3.mjs} +1 -1
  75. package/dist/client/{cart-D_h3rAZ2.mjs → cart-C6YpKbZZ.mjs} +3 -3
  76. package/dist/client/{cart.client-DHOxZbJ7.mjs → cart.client-dC938WrX.mjs} +1 -1
  77. package/dist/client/{checkout-tC-3CzuM.mjs → checkout-Dy9RlREI.mjs} +3 -3
  78. package/dist/client/{checkout.client-DsBb2Pkm.mjs → checkout.client-CefG0d2F.mjs} +1 -1
  79. package/dist/client/client.mjs +34 -69
  80. package/dist/client/{context-9ZfMb6GA.mjs → context-BFwxgZpB.mjs} +28 -1
  81. package/dist/client/{cta-D-ZqL7-e.mjs → cta-DtA42Xio.mjs} +1 -1
  82. package/dist/client/{dateFormatting-BCwLqYpW.mjs → dateFormatting-yP1B7F0O.mjs} +39 -2
  83. package/dist/client/{demoPortalMagicLink-BxkSS9fx.mjs → demoPortalMagicLink-WOiT5Ryi.mjs} +1 -1
  84. package/dist/client/{enhanceHeaderSection-xg6to91E.mjs → enhanceHeaderSection-Dh8c_Lq-.mjs} +3 -3
  85. package/dist/client/{event-details.client-C670TgRd.mjs → event-details.client-BFgsLqTj.mjs} +2 -1
  86. package/dist/client/{event-registration.client-C6GApWTB.mjs → event-registration.client-BaXZ1-Ky.mjs} +13 -13
  87. package/dist/client/{eventCalendar-CWc0dg9i.mjs → eventCalendar-COLwF80U.mjs} +4 -4
  88. package/dist/client/{eventCombined-D4DbOrvQ.mjs → eventCombined-D3Ltwu03.mjs} +4 -4
  89. package/dist/client/{eventDetails-C2DfmbC0.mjs → eventDetails-CBrkimXu.mjs} +2 -2
  90. package/dist/client/{eventListing-C_yXmHyz.mjs → eventListing-CedKVA1S.mjs} +4 -4
  91. package/dist/client/{eventRegistration-DJuaCB-O.mjs → eventRegistration-DkQQfR1b.mjs} +4 -4
  92. package/dist/client/{form-QZhtdFHA.mjs → form-XFy9uXSJ.mjs} +3 -3
  93. package/dist/client/{form.client-CgvPACwG.mjs → form.client-B0iancFK.mjs} +4 -4
  94. package/dist/client/{form.parts-2uI0-5N-.mjs → form.parts-DMbolu9Y.mjs} +3 -3
  95. package/dist/client/{formatDate-Danr0Nk4.mjs → formatDate-Jm5MQOCA.mjs} +1 -1
  96. package/dist/client/gifting/client.mjs +3 -3
  97. package/dist/client/{headerSection-DJdlLdvZ.mjs → headerSection-WjlECjtV.mjs} +2 -2
  98. package/dist/client/{mediaAssets-BvjcAZpS.mjs → mediaAssets-BkoW_PEn.mjs} +1 -1
  99. package/dist/client/mediaContext-CNzWmoA4.mjs +136 -0
  100. package/dist/client/{newsletter-form.client-Cbepz2KU.mjs → newsletter-form.client-D-XwJTjN.mjs} +5 -5
  101. package/dist/client/{newsletter-form.parts-DN8oMCQ0.mjs → newsletter-form.parts-H92f30y0.mjs} +2 -2
  102. package/dist/client/{newsletterForm-wjLtW-wq.mjs → newsletterForm-DMuxzu6I.mjs} +3 -3
  103. package/dist/client/{noop-B7H6gCbj.mjs → noop-B3RNPVrt.mjs} +19 -3
  104. package/dist/client/portal/client.mjs +1116 -85
  105. package/dist/client/{product-detail.client-CYTR165c.mjs → product-detail.client-B3HuuykE.mjs} +1 -1
  106. package/dist/client/{product-list.client-B4vTvag8.mjs → product-list.client-CzsDrHQO.mjs} +1 -1
  107. package/dist/client/{productDetail-k8LEMSWn.mjs → productDetail-CbBUVWgd.mjs} +3 -3
  108. package/dist/client/{productList-DEo8Bqoe.mjs → productList-vqOKH2mh.mjs} +3 -3
  109. package/dist/client/{propsDecoder-G0j0HXBO.mjs → propsDecoder-CkSUep5a.mjs} +4 -3
  110. package/dist/client/{registry.server-BTmSXE3D.mjs → registry.server-cZ24QwtW.mjs} +272 -68
  111. package/dist/client/rendering/client.mjs +27 -26
  112. package/dist/client/rendering/islands.mjs +1 -1
  113. package/dist/client/rendering.mjs +10 -7
  114. package/dist/client/{richText-coerce-B19taoH6.mjs → richText-coerce-DDcCKvBJ.mjs} +1 -1
  115. package/dist/client/{routeIslandApiConfig-Chu5BHra.mjs → routeIslandApiConfig-DYBioANh.mjs} +1 -1
  116. package/dist/client/{schema-C-m8XHuW.mjs → schema-DNHLlze-.mjs} +4575 -4311
  117. package/dist/client/{shop-RGWa43H7.mjs → shop-CF0dhnfH.mjs} +3 -3
  118. package/dist/client/{shop-commerce-TJYCBO_H.mjs → shop-commerce-DQznNBEo.mjs} +11 -11
  119. package/dist/client/{shop-commerce-store-CjCcUB_o.mjs → shop-commerce-store-Ba8zPlIg.mjs} +1 -1
  120. package/dist/client/{shop.client-tsKfZw1W.mjs → shop.client-DqfYoqWH.mjs} +12 -12
  121. package/dist/client/{shop.interactive-CVqLAU53.mjs → shop.interactive-CreQ0I7i.mjs} +38 -31
  122. package/dist/client/{shopShared-C3lHMz_R.mjs → shopShared-D-yh-P7g.mjs} +2 -2
  123. package/dist/client/{mediaContext-jPeJ2PmJ.mjs → site-styles-B9HgmY07.mjs} +1329 -511
  124. package/dist/client/{timetableModel-V2ifvGGy.mjs → timetableModel-DCdVErTJ.mjs} +10 -9
  125. package/dist/client/{useAvailableSlots-D1X69-pN.mjs → useAvailableSlots-Cvgdp2DH.mjs} +8 -11
  126. package/dist/client/{useBookingNowIso-Ch30jino.mjs → useBookingNowIso-DrTnGNzD.mjs} +1 -1
  127. package/dist/client/{useDiscountApply-Bwzr1RjV.mjs → useDiscountApply-CULjnXGl.mjs} +2 -2
  128. package/dist/client/{useDiscountCodeUi-BimJbFC7.mjs → useDiscountCodeUi-Gn_m7e0o.mjs} +1 -1
  129. package/dist/client/{useEventPagination-CLAS0upd.mjs → useEventPagination-CsysCF22.mjs} +6 -6
  130. package/dist/client/{view-Dj_FZHmg.mjs → view-BpBjo9Te.mjs} +64 -55
  131. package/dist/client/{view-BUh4LnLS.mjs → view-DMyTchi7.mjs} +4 -4
  132. package/dist/client/{wizardSteps-BkZc-hKH.mjs → wizardSteps-BO2OmMO9.mjs} +59 -53
  133. package/dist/preview-next/before-render.mjs +3 -3
  134. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CwerMfzn.mjs → EventEmbeddedCheckoutStep-DLsSmZbO.mjs} +1 -1
  135. package/dist/preview-next/client/{PreviewEditorSidebar-Dvq-RW9-.mjs → PreviewEditorSidebar-ChrW9VEo.mjs} +164 -1042
  136. package/dist/preview-next/client/{PreviewEditorUI-BdFjS39R.mjs → PreviewEditorUI-VaHvYtrA.mjs} +9 -190
  137. package/dist/preview-next/client/{SdkPreviewModeRuntime-CjkGh1IG.mjs → SdkPreviewModeRuntime-Bz7jR6nl.mjs} +1 -1
  138. package/dist/preview-next/client/{SdkPreviewModeRuntime-BEfHln1E.mjs → SdkPreviewModeRuntime-DWwktlWs.mjs} +220 -130
  139. package/dist/preview-next/client/{ThemedButton-b14Bv03E.mjs → ThemedButton-CHKOWXxl.mjs} +608 -333
  140. package/dist/preview-next/client/{SiteChromeCustomizeContext-CDbxk_qZ.mjs → previewAuthStore-C0VUwEHz.mjs} +158752 -162808
  141. package/dist/preview-next/client/{previewChromeSurface-Dd1_mNIg.mjs → previewChromeSurface-Dhyx2YrS.mjs} +1 -1
  142. package/dist/preview-next/client/runtime.mjs +3 -3
  143. package/dist/preview-next/client/{sdk-runtime-B-CXyGVb.mjs → sdk-runtime-C2GWOCyj.mjs} +1 -1
  144. package/dist/preview-next/client/siteStyleAccess-DHyzUpv4.mjs +12833 -0
  145. package/dist/preview-next/client/{spinner-CGxS8Ns-.mjs → spinner-BeR2S8oG.mjs} +1 -1
  146. package/dist/preview-next/keepAlive.mjs +2 -2
  147. package/dist/preview-next/middleware.mjs +1 -1
  148. package/dist/preview-next/{refresh-contract-CvmNqZ1Q.mjs → refresh-contract-uQ6BXgLJ.mjs} +5 -0
  149. package/dist/preview-next/{route-contract-hLg-yjQN.mjs → route-contract-CkrFDMrl.mjs} +394 -200
  150. package/dist/server/{Block.shared-CeTd2saO.mjs → Block.shared-DxvNGDig.mjs} +4 -4
  151. package/dist/server/{bindings-C5YpKuKt.mjs → bindings-BuhKvYkE.mjs} +2 -2
  152. package/dist/server/{client-Cv26lZQ4.mjs → client-BobW6DOz.mjs} +34 -69
  153. package/dist/server/config-validation.mjs +1 -1
  154. package/dist/server/config.mjs +2 -2
  155. package/dist/server/{effectiveNavLinkStyle-CGvGr3yD.mjs → effectiveNavLinkStyle-B-MKSt0p.mjs} +1127 -144
  156. package/dist/server/index.mjs +3 -3
  157. package/dist/server/{loadContent-C8a0b-cC.mjs → loadContent-CCG_3mbY.mjs} +7 -4
  158. package/dist/server/loadPage-Bk9HDh9K.mjs +2 -0
  159. package/dist/server/{loadPage-BW7dklu3.mjs → loadPage-jntGoMrf.mjs} +2 -2
  160. package/dist/server/next.mjs +9 -9
  161. package/dist/server/{overrideResolution-tIuqmJB3.mjs → overrideResolution-BBOlgn4Z.mjs} +1 -1
  162. package/dist/server/{overrides-D1fiPOKF.mjs → overrides-DByQwIyW.mjs} +264 -168
  163. package/dist/server/page-converter.mjs +1 -1
  164. package/dist/server/{prebuild--fO0E2tr.mjs → prebuild-DrwcTk2t.mjs} +1 -1
  165. package/dist/server/prebuild.mjs +1 -1
  166. package/dist/server/{prefetchBlockData-CqJnokWJ.mjs → prefetchBlockData-LfgxSJYE.mjs} +31 -10
  167. package/dist/server/{publicProducts-CvvZ4JIe.mjs → publicProducts-8A3T5v4M.mjs} +647 -166
  168. package/dist/server/{registry-BVfCqaCq.mjs → registry-Digv02oV.mjs} +308 -36
  169. package/dist/server/rendering/server.mjs +4 -4
  170. package/dist/server/rendering.mjs +8 -8
  171. package/dist/server/{resolveBlockData-DPNvhXEz.mjs → resolveBlockData-C23t8-77.mjs} +1 -1
  172. package/dist/server/routing.mjs +1 -1
  173. package/dist/server/{schema-CD4peO7m.mjs → schema-BiqpDRwB.mjs} +2813 -2549
  174. package/dist/server/server.mjs +3 -3
  175. package/dist/server/{site-styles-H-EvTJiW.mjs → site-styles-DrkprQPL.mjs} +81 -113
  176. package/dist/server/{siteChromeOverlayClearance-DNC2k1U0.mjs → siteChromeOverlayClearance-BmKKkkbh.mjs} +2 -2
  177. package/dist/server/{src-ILxc6pid.mjs → src-08GY1njw.mjs} +902 -44
  178. package/dist/server/theme-bridge.mjs +1 -1
  179. package/dist/server/theme.mjs +1 -1
  180. package/dist/server/{themeAdmission-BNHIXiUj.mjs → themeAdmission-CSd_Vusz.mjs} +36 -29
  181. package/dist/server/{validation-B1ieVemg.mjs → validation-DdUTkBOZ.mjs} +2 -2
  182. package/dist/server/{version-BQK44wFg.mjs → version-DdIOqIDe.mjs} +1 -1
  183. package/dist/styles/index.css +872 -41
  184. package/package.json +1 -1
  185. package/dist/_dts/index-BQDBQvdu.d.ts +0 -13
  186. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +0 -5812
  187. package/dist/server/loadPage--DXBwI8V.mjs +0 -2
@@ -0,0 +1,136 @@
1
+ "use client";
2
+ import { $n as buildRenderableMediaAssetIndex } from "./schema-DNHLlze-.mjs";
3
+ //#region ../blocks/src/system/runtime/nodes/mediaContext.ts
4
+ function buildMediaAssetIndex(assets) {
5
+ return buildRenderableMediaAssetIndex(assets);
6
+ }
7
+ function normalizeSupabaseUrl(value) {
8
+ return value?.replace(/\/$/, "");
9
+ }
10
+ function buildResolveImageUrlContext(input) {
11
+ return {
12
+ supabaseUrl: normalizeSupabaseUrl(input?.supabaseUrl),
13
+ siteId: input?.siteId,
14
+ mediaAssetIndex: input?.mediaAssetIndex ?? buildMediaAssetIndex(input?.mediaAssets)
15
+ };
16
+ }
17
+ /**
18
+ * Server-side: AsyncLocalStorage for request isolation.
19
+ * Prevents race conditions when multiple requests are processed concurrently.
20
+ *
21
+ * Lazy initialization to avoid issues in environments that don't support async_hooks.
22
+ */
23
+ const serverStorageState = {
24
+ storage: null,
25
+ checked: false
26
+ };
27
+ function getServerStorage() {
28
+ if (typeof window !== "undefined") return null;
29
+ if (serverStorageState.checked) return serverStorageState.storage;
30
+ serverStorageState.checked = true;
31
+ try {
32
+ const globalWithNonWebpackRequire = globalThis;
33
+ const AsyncLocalStorage = (typeof globalWithNonWebpackRequire.__non_webpack_require__ === "function" ? globalWithNonWebpackRequire.__non_webpack_require__ : new Function("id", "return require(id)"))("async_hooks").AsyncLocalStorage;
34
+ if (AsyncLocalStorage) {
35
+ serverStorageState.storage = new AsyncLocalStorage();
36
+ return serverStorageState.storage;
37
+ }
38
+ return null;
39
+ } catch {
40
+ console.warn("[blocks] AsyncLocalStorage not available - using module-level state");
41
+ return null;
42
+ }
43
+ }
44
+ /**
45
+ * Client-side context storage.
46
+ * Safe because browsers are single-threaded per tab.
47
+ *
48
+ * IMPORTANT: This must be shared across bundles.
49
+ * SDK preview mode can load multiple independently-bundled entrypoints
50
+ * (e.g. `@riverbankcms/sdk/rendering` + `@riverbankcms/sdk/preview-next/client`),
51
+ * which can otherwise each get their own module-scoped singleton.
52
+ */
53
+ const RB_MEDIA_CONTEXT_KEY = Symbol.for("riverbankcms.blocks.mediaContext");
54
+ function getClientContextStore() {
55
+ const g = globalThis;
56
+ const existing = g[RB_MEDIA_CONTEXT_KEY];
57
+ if (existing && typeof existing === "object") return existing;
58
+ const next = {};
59
+ g[RB_MEDIA_CONTEXT_KEY] = next;
60
+ return next;
61
+ }
62
+ /**
63
+ * Get the current media context.
64
+ * Server-side: Uses AsyncLocalStorage for request isolation.
65
+ * Client-side: Uses module-level state (safe in single-threaded browser).
66
+ */
67
+ function getMediaContext() {
68
+ const storage = getServerStorage();
69
+ if (storage) return storage.getStore() ?? {};
70
+ return getClientContextStore();
71
+ }
72
+ /**
73
+ * Set the Supabase URL in the current context.
74
+ * @deprecated Use runWithMediaContext instead for request isolation.
75
+ */
76
+ function updateMediaContext(patch) {
77
+ const storage = getServerStorage();
78
+ const current = storage?.getStore();
79
+ if (current) Object.assign(current, patch);
80
+ else if (storage?.enterWith) storage.enterWith(patch);
81
+ else Object.assign(getClientContextStore(), patch);
82
+ }
83
+ function setContextSupabaseUrl(url) {
84
+ updateMediaContext({ supabaseUrl: normalizeSupabaseUrl(url) });
85
+ }
86
+ /** @deprecated Use runWithMediaContext for request isolation. */
87
+ function setContextSiteId(siteId) {
88
+ updateMediaContext({ siteId });
89
+ }
90
+ function setContextMediaAssetIndex(index) {
91
+ updateMediaContext({ mediaAssetIndex: index });
92
+ }
93
+ function setContextResolveImageUrlContext(context) {
94
+ setContextSupabaseUrl(context?.supabaseUrl);
95
+ setContextSiteId(context?.siteId);
96
+ setContextMediaAssetIndex(context?.mediaAssetIndex);
97
+ }
98
+ function getCurrentResolveImageUrlContext() {
99
+ const context = getMediaContext();
100
+ if (!context.supabaseUrl && !context.siteId && !context.mediaAssetIndex) return;
101
+ return {
102
+ supabaseUrl: context.supabaseUrl,
103
+ siteId: context.siteId,
104
+ mediaAssetIndex: context.mediaAssetIndex
105
+ };
106
+ }
107
+ /**
108
+ * Get the Supabase URL for constructing direct storage URLs.
109
+ * Used for serving images directly from Supabase storage CDN.
110
+ *
111
+ * Resolution order:
112
+ * 1. Context URL (set via runWithMediaContext or setContextSupabaseUrl)
113
+ * 2. Environment variable NEXT_PUBLIC_SUPABASE_URL
114
+ *
115
+ * SDK sites receive the URL from the API, so they don't need the env var.
116
+ * Dashboard and frontend apps use the env var.
117
+ */
118
+ function getSupabaseUrl() {
119
+ const context = getMediaContext();
120
+ if (context.supabaseUrl) return context.supabaseUrl;
121
+ const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
122
+ if (!url) throw new Error("NEXT_PUBLIC_SUPABASE_URL is not configured. Set it to your Supabase project URL (e.g., https://xxx.supabase.co)");
123
+ return url.replace(/\/$/, "");
124
+ }
125
+ /**
126
+ * Get the site ID for constructing storage paths.
127
+ * Required for relative path resolution.
128
+ */
129
+ function getSiteId() {
130
+ return getMediaContext().siteId;
131
+ }
132
+ function getMediaAssetIndex(context) {
133
+ return context?.mediaAssetIndex ?? getMediaContext().mediaAssetIndex;
134
+ }
135
+ //#endregion
136
+ export { getSupabaseUrl as a, getSiteId as i, getCurrentResolveImageUrlContext as n, setContextResolveImageUrlContext as o, getMediaAssetIndex as r, buildResolveImageUrlContext as t };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { C as clsx } from "./ThemedButton-CnyL3s1A.mjs";
2
+ import { C as clsx } from "./ThemedButton-BWsDgjMC.mjs";
3
3
  import { c as assertNever$1, t as assertNever } from "./src-VIsPY-kw.mjs";
4
- import { Pr as listLookSlot } from "./wizardSteps-BkZc-hKH.mjs";
5
- import { I as newsletterBlockSubmissionMessage, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, fn as parseMailingListVisitorSelection } from "./shop.interactive-CVqLAU53.mjs";
4
+ import { Pr as listLookSlot } from "./wizardSteps-BO2OmMO9.mjs";
5
+ import { I as newsletterBlockSubmissionMessage, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, dn as parseMailingListVisitorSelection } from "./shop.interactive-CreQ0I7i.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
7
- import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-DN8oMCQ0.mjs";
8
- import { n as useBlockApi, r as BlockApiError } from "./context-9ZfMb6GA.mjs";
7
+ import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-H92f30y0.mjs";
8
+ import { n as useBlockApi, r as BlockApiError } from "./context-BFwxgZpB.mjs";
9
9
  import { i as AltchaWidget, r as isSpamProtectionEnabled, t as getChallengeUrl } from "./src-BNZzXgWu.mjs";
10
10
  import { t as MAILING_LIST_CONFIRMATION_MESSAGE } from "./mailingListSignupCopy-CX4sDozG.mjs";
11
11
  import { useEffect, useReducer, useRef, useState } from "react";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { r as ThemedButton } from "./ThemedButton-CnyL3s1A.mjs";
3
- import { Pr as listLookSlot } from "./wizardSteps-BkZc-hKH.mjs";
2
+ import { r as ThemedButton } from "./ThemedButton-BWsDgjMC.mjs";
3
+ import { Pr as listLookSlot } from "./wizardSteps-BO2OmMO9.mjs";
4
4
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
5
5
  import "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { t as defineIslandPropsDecoder } from "./propsDecoder-G0j0HXBO.mjs";
3
- import { t as BlockApiProvider } from "./context-9ZfMb6GA.mjs";
4
- import { t as NewsletterFormClient } from "./newsletter-form.client-Cbepz2KU.mjs";
2
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-CkSUep5a.mjs";
3
+ import { t as BlockApiProvider } from "./context-BFwxgZpB.mjs";
4
+ import { t as NewsletterFormClient } from "./newsletter-form.client-D-XwJTjN.mjs";
5
5
  import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { c as addMonths } from "./src-1PJxc8KO.mjs";
3
- import { Xn as runtimeMediaSchema, br as err, lr as parseSiteTermsVersionId, xr as ok } from "./schema-C-m8XHuW.mjs";
4
- import { A as confirmationPaymentSchema, R as validateBookingPaymentOptionKinds } from "./ThemedButton-CnyL3s1A.mjs";
3
+ import { Cr as err, Qn as runtimeMediaSchema, fr as parseSiteTermsVersionId, ht as arrangementModes, wr as ok } from "./schema-DNHLlze-.mjs";
4
+ import { A as confirmationPaymentSchema, R as validateBookingPaymentOptionKinds } from "./ThemedButton-BWsDgjMC.mjs";
5
+ import "./site-styles-B9HgmY07.mjs";
5
6
  import { z } from "zod";
6
7
  //#region ../core/src/date-time-formatter.ts
7
8
  /** Shared Intl engine, internal to core's date presentation owners. */
@@ -1173,6 +1174,14 @@ const eventVenueSchema = z.object({
1173
1174
  }).nullable()
1174
1175
  });
1175
1176
  /**
1177
+ * The map for an event details page: one drawing, for the venue of the event the page is about.
1178
+ * It travels beside the events rather than on any of them, so a list of events has no place for one.
1179
+ */
1180
+ const eventVenueDrawingSchema = z.object({
1181
+ venueId: z.string(),
1182
+ drawing: z.lazy(() => mapDrawingSchema)
1183
+ });
1184
+ /**
1176
1185
  * Zod schema for event category data
1177
1186
  */
1178
1187
  const eventCategorySchema = z.object({
@@ -1469,6 +1478,11 @@ function normalizeEventStaffMemberId(value) {
1469
1478
  }
1470
1479
  //#endregion
1471
1480
  //#region ../blocks/src/system/constants/events.ts
1481
+ /**
1482
+ * Event-related constants
1483
+ *
1484
+ * Shared constants for event content types and booking system integration.
1485
+ */
1472
1486
  const eventCalendarDisplayModeValues = [
1473
1487
  "combined",
1474
1488
  "calendar",
@@ -1548,6 +1562,8 @@ function isEventCalendarListLayout(value) {
1548
1562
  /** The calendar manifest owns its secondary arrangement axis. */
1549
1563
  const eventCalendarVariantMeaning = {
1550
1564
  kind: "mode",
1565
+ modes: arrangementModes,
1566
+ defaultMode: "list",
1551
1567
  arrangementField: "listLayout",
1552
1568
  keys: eventCalendarListLayoutValues,
1553
1569
  lookOnlyKeys: [
@@ -1967,4 +1983,4 @@ const logger = {
1967
1983
  withFields: (_) => logger
1968
1984
  };
1969
1985
  //#endregion
1970
- export { isRecord as $, eventScheduleScopeValues as A, toScheduledBookingDateTime as At, normalizeIdList as B, eventCalendarVariantMeaning as C, getLocalScheduleDate as Ct, isEventCalendarListLayout as D, resolveBookingBusinessTimeZone as Dt, isEventCalendarDisplayMode as E, parseUtcIsoDateTimeString as Et, normalizeEventStaffMemberId as F, blockBookingConsentSchema as G, publicEventLoaderQuerySchemaShape as H, normalizeEventSurfacePresets as I, toBookingRequirementConsentField as J, bookingConsentCarrierSchema as K, normalizeEventSurfacePresetsCsv as L, normalizeEventCategoryIds as M, normalizeEventCategoryIdsCsv as N, normalizeEventCalendarDisplayMode as O, resolveBookingTimeZoneId as Ot, normalizeEventScheduleScope as P, isObjectRecord as Q, normalizeEventSurfaceScope as R, eventCalendarListLayoutValues as S, getBookingLocalDateKey as St, isEventCalendarDefaultView as T, parseLocalScheduleTime as Tt, publicEventSchema as U, publicEventDestinationSchema as V, publicEventsArraySchema as W, RichTextDocSchema as X, blockBookingPaymentTermsSchema as Y, isRichTextDoc as Z, eventCalendarDefaultViewValues as _, addLocalScheduleDays as _t, eventCheckoutReturnResponseSchema as a, projectPublicLocation as at, eventCalendarListLayoutCompatibleDisplayModeValues as b, formatBookingCompactEnglishTime as bt, calendarMonthKey as c, mapDrawingSchema as ct, calendarWindowBounds as d, formatDateTime as dt, WHOLE_SERIES_EVENT_PRESET_VALUES as et, calendarWindowMonths as f, formatDateTimeRange as ft, resolveCalendarReadProfile as g, resolveBookingDisplayContext as gt, planCalendarMonthRanges as h, inferSiteDateLocale as ht, eventCheckoutResponseSchema as i, parseLocationValue as it, eventSurfaceScopeValues as j, toUtcIsoDateTimeString as jt, resolveEventCalendarReadPlan as k, toBookingTimeZone as kt, calendarPageResponseError as l, formatDate as lt, calendarWindowQuerySchema as m, formatTimeRange as mt, blockSiteTermsSchema as n, locationValueSchema as nt, eventRegisterResponseSchema as o, publicLocationSchema as ot, calendarWindowPageSchema as p, formatTime as pt, isBookingRequirementConsentFieldId as q, verifiedSiteTermsAcceptanceSchema as r, normalizeLocationAddressText as rt, calendarMonthDate as s, toLocationCoordinates as st, logger as t, decideLocationSourcePermission as tt, calendarQueryKey as u, formatDateRange as ut, eventCalendarDisplayModeValues as v, buildBookingUtcDateWindow as vt, eventListArrangementValues as w, parseBookingLocalDate as wt, eventCalendarListLayoutOptions as x, formatLocalScheduleDate as xt, eventCalendarListGroupingDecision as y, compareLocalScheduleDates as yt, normalizeEventVenueId as z };
1986
+ export { isObjectRecord as $, eventScheduleScopeValues as A, resolveBookingTimeZoneId as At, normalizeIdList as B, eventCalendarVariantMeaning as C, formatLocalScheduleDate as Ct, isEventCalendarListLayout as D, parseLocalScheduleTime as Dt, isEventCalendarDisplayMode as E, parseBookingLocalDate as Et, normalizeEventStaffMemberId as F, publicEventsArraySchema as G, publicEventDestinationSchema as H, normalizeEventSurfacePresets as I, isBookingRequirementConsentFieldId as J, blockBookingConsentSchema as K, normalizeEventSurfacePresetsCsv as L, normalizeEventCategoryIds as M, toScheduledBookingDateTime as Mt, normalizeEventCategoryIdsCsv as N, toUtcIsoDateTimeString as Nt, normalizeEventCalendarDisplayMode as O, parseUtcIsoDateTimeString as Ot, normalizeEventScheduleScope as P, isRichTextDoc as Q, normalizeEventSurfaceScope as R, eventCalendarListLayoutValues as S, formatBookingCompactEnglishTime as St, isEventCalendarDefaultView as T, getLocalScheduleDate as Tt, publicEventLoaderQuerySchemaShape as U, eventVenueDrawingSchema as V, publicEventSchema as W, blockBookingPaymentTermsSchema as X, toBookingRequirementConsentField as Y, RichTextDocSchema as Z, eventCalendarDefaultViewValues as _, inferSiteDateLocale as _t, eventCheckoutReturnResponseSchema as a, parseLocationValue as at, eventCalendarListLayoutCompatibleDisplayModeValues as b, buildBookingUtcDateWindow as bt, calendarMonthKey as c, toLocationCoordinates as ct, calendarWindowBounds as d, formatDateRange as dt, isRecord as et, calendarWindowMonths as f, formatDateTime as ft, resolveCalendarReadProfile as g, formatTimeZoneCityLabel as gt, planCalendarMonthRanges as h, formatTimeRange as ht, eventCheckoutResponseSchema as i, normalizeLocationAddressText as it, eventSurfaceScopeValues as j, toBookingTimeZone as jt, resolveEventCalendarReadPlan as k, resolveBookingBusinessTimeZone as kt, calendarPageResponseError as l, mapDrawingSchema as lt, calendarWindowQuerySchema as m, formatTime as mt, blockSiteTermsSchema as n, decideLocationSourcePermission as nt, eventRegisterResponseSchema as o, projectPublicLocation as ot, calendarWindowPageSchema as p, formatDateTimeRange as pt, bookingConsentCarrierSchema as q, verifiedSiteTermsAcceptanceSchema as r, locationValueSchema as rt, calendarMonthDate as s, publicLocationSchema as st, logger as t, WHOLE_SERIES_EVENT_PRESET_VALUES as tt, calendarQueryKey as u, formatDate as ut, eventCalendarDisplayModeValues as v, resolveBookingDisplayContext as vt, eventListArrangementValues as w, getBookingLocalDateKey as wt, eventCalendarListLayoutOptions as x, compareLocalScheduleDates as xt, eventCalendarListGroupingDecision as y, addLocalScheduleDays as yt, normalizeEventVenueId as z };