@riverbankcms/sdk 0.158.0 → 0.160.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 (196) hide show
  1. package/README.md +25 -6
  2. package/dist/_dts/{BlocksIslandsHydrator-BgNBtEai.d.ts → BlocksIslandsHydrator-CoqeotCL.d.ts} +1 -1
  3. package/dist/_dts/{Page-DpCo8zXD.d.ts → Page-C0ENVLCF.d.ts} +13 -6
  4. package/dist/_dts/{SdkPreviewMode-Bv2TMscG.d.ts → SdkPreviewMode-jZK0A49V.d.ts} +54 -126
  5. package/dist/_dts/{client-B960v2gW.d.ts → client-uMMuPq9V.d.ts} +23 -1
  6. package/dist/_dts/{content-types-CN0Wy8V6.d.ts → content-types-D6nXGqdQ.d.ts} +18 -18
  7. package/dist/_dts/{contracts-BFUrby76.d.ts → contracts-Bnmj1nxu.d.ts} +6 -5
  8. package/dist/_dts/{footerPageOutline-CmoqleLS.d.ts → footerPageOutline-CeLjFX8b.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-Dkvivc3R.d.ts → generatePageMetadata-nyU8q02J.d.ts} +5 -2
  10. package/dist/_dts/{index-DPfI2t5A.d.ts → index-BaaGBY1v.d.ts} +2 -2
  11. package/dist/_dts/{index-DCNu_8it.d.ts → index-Bg64CkV-.d.ts} +4 -4
  12. package/dist/_dts/index-Blwl7yl6.d.ts +13 -0
  13. package/dist/_dts/{index-DaS_z6ir.d.ts → index-C5xslEBn.d.ts} +2 -2
  14. package/dist/_dts/{index-DpgkhY-a.d.ts → index-CEaKil7G.d.ts} +2 -2
  15. package/dist/_dts/{index-Ba6RmuxX.d.ts → index-DahMwisK.d.ts} +3 -3
  16. package/dist/_dts/index-lkpjIg5i.d.ts +66 -0
  17. package/dist/_dts/{index-DfkFWUxt.d.ts → index-nVoi_74l.d.ts} +2 -2
  18. package/dist/_dts/{loadContent-DvvKF4nB.d.ts → loadContent-CYLmzvLq.d.ts} +16 -7
  19. package/dist/_dts/{resolvePageContent-D0lGwVD6.d.ts → resolvePageContent-DqnxChOs.d.ts} +2 -2
  20. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  21. package/dist/_dts/{hosted-booking-appearance-BIbit60h.d.ts → schema-D0bNcPWK.d.ts} +6921 -6768
  22. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client.d.ts +12 -6
  25. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  26. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/index.d.ts +8 -8
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +8 -2
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  32. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
  35. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  36. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  37. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  38. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  40. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  41. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  42. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  44. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  45. package/dist/_dts/sdk/src/server.d.ts +5 -5
  46. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  47. package/dist/_dts/{types-BJrRUaY7.d.ts → types-CFrYuXYP.d.ts} +2 -2
  48. package/dist/_dts/{navigation-n-eTVTIQ.d.ts → types-D8czmbQF.d.ts} +15430 -16836
  49. package/dist/_dts/{types-BY7PgnDi.d.ts → types-DSgmJ15W.d.ts} +7 -7
  50. package/dist/_dts/{types-maEnXL6Z.d.ts → types-Dm-KW7nj.d.ts} +10 -13
  51. package/dist/_dts/{validation-BjuVrMrs.d.ts → validation-Bmb4WnHg.d.ts} +4 -4
  52. package/dist/client/{BlocksIslandsHydrator-WRLS96Ev.mjs → BlocksIslandsHydrator-DZRKi6tT.mjs} +17 -17
  53. package/dist/client/{BookingMailingListNote-eovghMPa.mjs → BookingMailingListNote-C00sLLdL.mjs} +2 -2
  54. package/dist/client/{CalendarNavigationChevron-CIcMQRc1.mjs → CalendarNavigationChevron-CHSi9b3E.mjs} +6 -6
  55. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-Bhm6RAUL.mjs} +1 -1
  56. package/dist/client/{DemoBookingPortalAccess-CdnFgDyQ.mjs → DemoBookingPortalAccess-CaN-7ui7.mjs} +6 -6
  57. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-ClxN5_xZ.mjs} +1 -1
  58. package/dist/client/{EventCalendar.client-Dc-ZLxKo.mjs → EventCalendar.client-BncvSa1n.mjs} +10 -9
  59. package/dist/client/{EventCombined.client-C93XqRIv.mjs → EventCombined.client-DluBxVVu.mjs} +8 -8
  60. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-BiJrMtfp.mjs} +1 -1
  61. package/dist/client/{EventItem-DnCTygqk.mjs → EventItem-CXhnT9pF.mjs} +11 -6
  62. package/dist/client/{EventListWeekNavigation-9h97heuQ.mjs → EventListWeekNavigation-V-dtoDlD.mjs} +1 -1
  63. package/dist/client/{EventListing.client-DFKlQvvs.mjs → EventListing.client-DPO6SZbx.mjs} +3 -3
  64. package/dist/client/{EventListing.view-pAuTDyrP.mjs → EventListing.view-B-Yi5JZS.mjs} +7 -7
  65. package/dist/client/{EventRegistrationPayment-rgKlBvhP.mjs → EventRegistrationPayment-Dc3Fnlnw.mjs} +189 -176
  66. package/dist/client/{LeafletStaticMap-3XiWSgy0.mjs → LeafletStaticMap-ClZCCzAm.mjs} +1 -1
  67. package/dist/client/{Page-BmpeAwID.mjs → Page-7PkzO04N.mjs} +1949 -2074
  68. package/dist/client/{StepIndicator-qEq6X5zP.mjs → StepIndicator-DiD6euZ8.mjs} +3 -3
  69. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-BHd8GN8y.mjs} +1 -1
  70. package/dist/client/{ThemedButton-DVBC_pS9.mjs → ThemedButton-C22C9cCF.mjs} +174 -93
  71. package/dist/client/{accordion-DeObOasQ.mjs → accordion-2m27DsIk.mjs} +1 -1
  72. package/dist/client/{booking-form.client-DfWeF0lj.mjs → booking-form.client-BddWV5w1.mjs} +12 -12
  73. package/dist/client/{bookingForm-TnzIBHx2.mjs → bookingForm-bcdXQjmw.mjs} +4 -4
  74. package/dist/client/bookings.mjs +6 -6
  75. package/dist/client/{carousel-kkFnbr5Z.mjs → carousel-D7nj9I0y.mjs} +2 -2
  76. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-AffDJo_s.mjs} +1 -1
  77. package/dist/client/{cart-BAXNbFux.mjs → cart-PN6yCw1H.mjs} +3 -3
  78. package/dist/client/{cart.client-BczxUF70.mjs → cart.client-D4t1f0cJ.mjs} +1 -1
  79. package/dist/client/{checkout-C5NRhPeP.mjs → checkout-CsTwXVSb.mjs} +3 -3
  80. package/dist/client/{checkout.client-BuDk3Td9.mjs → checkout.client-BhQE3zY7.mjs} +1 -1
  81. package/dist/client/client.mjs +25 -13
  82. package/dist/client/{context-CVsgML69.mjs → context-BLAvalAa.mjs} +1 -1
  83. package/dist/client/{cta-BWnUuJce.mjs → cta-CUXhX_D7.mjs} +2 -1
  84. package/dist/client/dateFormatting-BHIHxNuo.mjs +61 -0
  85. package/dist/client/{demoPortalMagicLink-CUlwvmxf.mjs → demoPortalMagicLink-R-awbk_0.mjs} +1 -1
  86. package/dist/client/{enhanceHeaderSection-Cw8nnFj-.mjs → enhanceHeaderSection-9Q93uvTo.mjs} +3 -3
  87. package/dist/client/{event-details.client-Bl0E_6Vi.mjs → event-details.client-BS1WtG-a.mjs} +2 -2
  88. package/dist/client/{event-registration.client-DmfLg_LC.mjs → event-registration.client-BXndwsET.mjs} +35 -21
  89. package/dist/client/{eventCalendar-D1Dwb9VA.mjs → eventCalendar-HyoOt1Qz.mjs} +4 -4
  90. package/dist/client/{eventCombined-DfsqY1qR.mjs → eventCombined-sdG5oEaH.mjs} +4 -4
  91. package/dist/client/{eventDetails-BmugDVoa.mjs → eventDetails-FFAknE4w.mjs} +2 -2
  92. package/dist/client/{eventListing-BPAGJi3C.mjs → eventListing-CGK6urk3.mjs} +4 -4
  93. package/dist/client/{eventRegistration-DBlz_x6u.mjs → eventRegistration-VhrvCs4l.mjs} +4 -4
  94. package/dist/client/{form-DVu3ZMjx.mjs → form-C-B5O_ko.mjs} +3 -3
  95. package/dist/client/{form.client-QZUyABIY.mjs → form.client-DoZVcl8d.mjs} +5 -5
  96. package/dist/client/{form.parts-Bs0F3v08.mjs → form.parts-mttKpgif.mjs} +3 -3
  97. package/dist/client/{formatDate-BD9D3dgo.mjs → formatDate-xUSCknEO.mjs} +1 -1
  98. package/dist/client/gifting/client.mjs +3 -3
  99. package/dist/client/{headerSection-BQwWW4Yy.mjs → headerSection-BHUEXsaI.mjs} +2 -2
  100. package/dist/client/{location-map.client-upKuwABk.mjs → location-map.client-Cylb_MHw.mjs} +2 -2
  101. package/dist/client/{location-map.view-RuBCD10O.mjs → location-map.view-Cx4Bl7ij.mjs} +69 -6
  102. package/dist/client/{locationMap-1sCbsk0V.mjs → locationMap-QnKJi-nZ.mjs} +2 -2
  103. package/dist/client/{newsletter-form.client-DBTU3oNv.mjs → newsletter-form.client-D_n0rftg.mjs} +8 -8
  104. package/dist/client/{newsletter-form.parts-C9I9JBhe.mjs → newsletter-form.parts-DKHye4IE.mjs} +2 -2
  105. package/dist/client/{newsletterForm-DTPtTxxG.mjs → newsletterForm-tEaYelzx.mjs} +3 -3
  106. package/dist/client/{noop-DMFt3KdC.mjs → noop-B610YKEx.mjs} +12 -5
  107. package/dist/client/portal/client.mjs +4562 -174
  108. package/dist/client/{product-detail.client-BX7M5o6p.mjs → product-detail.client-DUf5x5Jt.mjs} +1 -1
  109. package/dist/client/{product-list.client-i32QNY4c.mjs → product-list.client-Cqp1BPTV.mjs} +1 -1
  110. package/dist/client/{productDetail-DWjE9zm7.mjs → productDetail-B8bBiogP.mjs} +3 -3
  111. package/dist/client/{productList-DZH9_brv.mjs → productList-BKN4D-1z.mjs} +3 -3
  112. package/dist/client/{propsDecoder-CTzHkEkh.mjs → propsDecoder-2nNZh2Oe.mjs} +3 -3
  113. package/dist/client/{registry.server-vJ5FlscU.mjs → registry.server-BAm4RPNJ.mjs} +856 -872
  114. package/dist/client/rendering/client.mjs +27 -26
  115. package/dist/client/rendering/islands.mjs +1 -1
  116. package/dist/client/rendering.mjs +47 -28
  117. package/dist/client/{richText-coerce-DXAmC72p.mjs → richText-coerce-Cv-qomNB.mjs} +1 -1
  118. package/dist/client/{routeIslandApiConfig-CmC7ygin.mjs → routeIslandApiConfig-C5u8MbAA.mjs} +1 -1
  119. package/dist/client/{shop-C7eL3B37.mjs → shop-DZNC0VKk.mjs} +3 -3
  120. package/dist/client/{shop-commerce-D8oRN0QJ.mjs → shop-commerce-DdX4LSa3.mjs} +12 -12
  121. package/dist/client/{shop-commerce-store-CRnQ4M18.mjs → shop-commerce-store-BJtrZov9.mjs} +1 -1
  122. package/dist/client/{shop.client-X6d6KVmA.mjs → shop.client-DmDd-igg.mjs} +16 -15
  123. package/dist/client/{shop.interactive-DBMeM8VD.mjs → shop.interactive-5SnnDHz3.mjs} +402 -35
  124. package/dist/client/{shopShared-Y182kN_s.mjs → shopShared-CPqUlAh9.mjs} +2 -2
  125. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  126. package/dist/client/timetableModel-C19rcHEw.mjs +960 -0
  127. package/dist/client/{useAvailableSlots-BDV6MHgJ.mjs → useAvailableSlots-BjbJXotk.mjs} +3 -3
  128. package/dist/client/{useBookingNowIso-DgJEv3ZY.mjs → useBookingNowIso-CMgfL7YJ.mjs} +1 -1
  129. package/dist/client/{useDiscountApply-BTu9EeT7.mjs → useDiscountApply-KG8jB7WC.mjs} +2 -2
  130. package/dist/client/{useDiscountCodeUi-BfZxdxI-.mjs → useDiscountCodeUi-DK2w_i0a.mjs} +1 -1
  131. package/dist/client/{useEventPagination-pnvdHGeQ.mjs → useEventPagination-DW6MCirb.mjs} +11 -10
  132. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  133. package/dist/client/{view-hJr_L4QC2.mjs → view-CkUn3Y0Y.mjs} +4 -4
  134. package/dist/client/{view-BPEa6Okm.mjs → view-CseyBW07.mjs} +15 -70
  135. package/dist/client/{wizardSteps-HdyGoIG3.mjs → wizardSteps-zgq10lN1.mjs} +262 -65
  136. package/dist/preview-next/before-render.mjs +1 -1
  137. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-lUHBrzHv.mjs} +1 -1
  138. package/dist/preview-next/client/{PreviewEditorSidebar-CXRUbqMp.mjs → PreviewEditorSidebar-DWyUGCAG.mjs} +1217 -107
  139. package/dist/preview-next/client/{PreviewEditorUI-CxjEV0Fm.mjs → PreviewEditorUI-Wq0b3Daw.mjs} +52 -79
  140. package/dist/preview-next/client/{SdkPreviewModeRuntime-XdQSGGj_.mjs → SdkPreviewModeRuntime-BtZPcwYV.mjs} +1 -1
  141. package/dist/preview-next/client/{SdkPreviewModeRuntime-BxI12BBS.mjs → SdkPreviewModeRuntime-wSI_R361.mjs} +720 -2035
  142. package/dist/preview-next/client/{SiteChromeCustomizeContext-CfRQRwpH.mjs → SiteChromeCustomizeContext-Hc4pYnNe.mjs} +14365 -8155
  143. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-DzeycIlD.mjs} +204 -93
  144. package/dist/preview-next/client/{previewChromeSurface-CH7hd5n7.mjs → previewChromeSurface-Corq4AG7.mjs} +3 -8
  145. package/dist/preview-next/client/runtime.mjs +3 -3
  146. package/dist/preview-next/client/{sdk-runtime-C6xEU1LI.mjs → sdk-runtime-CWymRWhK.mjs} +1 -1
  147. package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +1359 -0
  148. package/dist/preview-next/client/{spinner-BTf1CZmy.mjs → spinner-C4If5Y-O.mjs} +1 -1
  149. package/dist/preview-next/editor-base.css +62 -0
  150. package/dist/preview-next/editor-chrome.css +85 -0
  151. package/dist/preview-next/keepAlive.mjs +1 -1
  152. package/dist/preview-next/middleware.mjs +1 -1
  153. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-8csADeIT.mjs} +149 -112
  154. package/dist/server/{Block.shared-DLoilC2J.mjs → Block.shared-D1_gonwM.mjs} +6 -6
  155. package/dist/server/{bindings-C7DKLVx_.mjs → bindings-CFmJg5lm.mjs} +2 -2
  156. package/dist/server/{client-CU4wlMLE.mjs → client-DPsi0Dai.mjs} +9 -7
  157. package/dist/server/config-template-validation.mjs +50 -10
  158. package/dist/server/config-validation.mjs +1 -1
  159. package/dist/server/config.mjs +2 -2
  160. package/dist/server/{generatePageMetadata-CPvssVOp.mjs → generatePageMetadata-DB_lbrZ7.mjs} +28 -2
  161. package/dist/server/index.mjs +2 -2
  162. package/dist/server/{loadContent-DmQ4BiiQ.mjs → loadContent-RMCcuVU_.mjs} +33 -20
  163. package/dist/server/loadPage-DUPP51C-.mjs +2 -0
  164. package/dist/server/{loadPage-BBkDQA57.mjs → loadPage-DhDGzj7t.mjs} +8 -5
  165. package/dist/server/manifest.mjs +1 -1
  166. package/dist/server/metadata.mjs +2 -2
  167. package/dist/server/next.mjs +13 -12
  168. package/dist/server/{overrideResolution-ByeAbLSO.mjs → overrideResolution-OxY5FMuy.mjs} +1 -1
  169. package/dist/server/{overrides-BcA6ZPWf.mjs → overrides-Bz_A6sB9.mjs} +586 -518
  170. package/dist/server/page-converter.mjs +8 -10
  171. package/dist/server/{prebuild-8T-m7XjB.mjs → prebuild-B_1vrSru.mjs} +1 -1
  172. package/dist/server/prebuild.mjs +1 -1
  173. package/dist/server/{prefetchBlockData-Bjya-X9t.mjs → prefetchBlockData-B7ukYXXR.mjs} +841 -887
  174. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-Djbpc81A.mjs} +166 -129
  175. package/dist/server/{blocks-jlIm0PWc.mjs → registry-eFjKtEhF.mjs} +2349 -1716
  176. package/dist/server/rendering/server.mjs +4 -4
  177. package/dist/server/rendering.mjs +7 -7
  178. package/dist/server/{resolveBlockData-D0ow8PRJ.mjs → resolveBlockData-DYvEa9c5.mjs} +6 -3
  179. package/dist/server/routing.mjs +1 -1
  180. package/dist/server/{schema-Bs735S27.mjs → schema-C3dJ5UkL.mjs} +148 -88
  181. package/dist/server/server.mjs +3 -3
  182. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → siteChromeOverlayClearance-DALIAMwo.mjs} +108 -11
  183. package/dist/server/{src-B935_bzN.mjs → src-C5Mu-z0F.mjs} +268 -189
  184. package/dist/server/theme-bridge.mjs +1 -1
  185. package/dist/server/theme.mjs +1 -1
  186. package/dist/server/{themeAdmission-D2-BnmDO.mjs → themeAdmission-ruoyXb_0.mjs} +9 -7
  187. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  188. package/dist/server/{validation-Cm41pDUB.mjs → validation-B-Xar8QS.mjs} +22 -63
  189. package/dist/server/{version-Bo9C3McI.mjs → version-Bg7VHK3i.mjs} +1 -1
  190. package/dist/styles/index.css +78 -0
  191. package/package.json +8 -3
  192. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  193. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  194. package/dist/client/timetableModel-D7PwpaBY.mjs +0 -480
  195. package/dist/preview-next/client/siteStyleAccess-CRXaC2oL.mjs +0 -1326
  196. package/dist/server/loadPage-ZrcfjG3X.mjs +0 -2
@@ -0,0 +1,960 @@
1
+ "use client";
2
+ import { d as formatDateKey, f as getDayOfWeek, i as buildTimetableModel$1, v as isToday } from "./src-1PJxc8KO.mjs";
3
+ import { C as clsx, i as ThemedButtonLink, n as ThemedAuthoredButton, pt as parseThemeButtonVariantId, r as ThemedButton } from "./ThemedButton-C22C9cCF.mjs";
4
+ import { c as assertNever } from "./src-VIsPY-kw.mjs";
5
+ import { An as isEventFull, Kt as RichText, Mr as listItemPresentation, On as getEventAvailabilityStatus, Pr as listLookSlot, _n as formatEventTimeRange, bn as resolveEventTimeZone, cn as eventDateOptions, fn as formatEventClockLabel, vn as formatTime, wn as formatEventRemainingPlaces, xr as resolveDateRuntimeContext, yn as groupEventsByDate } from "./wizardSteps-zgq10lN1.mjs";
6
+ import { gt as parseBookingLocalDate, tt as formatDate } from "./noop-B610YKEx.mjs";
7
+ import { n as resolveEventLinkProps } from "./cta-CUXhX_D7.mjs";
8
+ import { a as buildMonthDay, t as CalendarNavigationChevron } from "./CalendarNavigationChevron-CHSi9b3E.mjs";
9
+ import { i as formatEventTeacherLine, r as EventItem } from "./EventItem-CXhnT9pF.mjs";
10
+ import { t as coerceRichTextDoc } from "./richText-coerce-Cv-qomNB.mjs";
11
+ import "react";
12
+ import { z } from "zod";
13
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
+ const inlineTextMarkSchema = z.discriminatedUnion("kind", [
15
+ z.object({ kind: z.literal("strong") }),
16
+ z.object({ kind: z.literal("emphasis") }),
17
+ z.object({
18
+ kind: z.literal("accent"),
19
+ tone: z.enum([
20
+ "accent",
21
+ "brand",
22
+ "contrast"
23
+ ])
24
+ }),
25
+ z.object({
26
+ kind: z.literal("highlight"),
27
+ tone: z.enum([
28
+ "soft",
29
+ "accent",
30
+ "brand"
31
+ ])
32
+ })
33
+ ]);
34
+ const inlineTextRunSchema = z.object({
35
+ text: z.string(),
36
+ marks: z.array(inlineTextMarkSchema).optional()
37
+ });
38
+ z.array(inlineTextRunSchema);
39
+ const MARK_ORDER = {
40
+ strong: 0,
41
+ emphasis: 1,
42
+ accent: 2,
43
+ highlight: 3
44
+ };
45
+ function plainTextToInlineText(value) {
46
+ return normalizeInlineText(value.length > 0 ? [{ text: value }] : []);
47
+ }
48
+ function inlineTextToPlainText(value) {
49
+ return value.map((run) => run.text).join("");
50
+ }
51
+ function isInlineTextEmpty(value) {
52
+ return inlineTextToPlainText(value).trim().length === 0;
53
+ }
54
+ function coerceInlineTextWithFallback(value, fallbackPlainText) {
55
+ const parsed = parseInlineTextFromUnknown(value);
56
+ if (parsed.ok && !isInlineTextEmpty(parsed.value)) return parsed.value;
57
+ if (fallbackPlainText && fallbackPlainText.length > 0) return plainTextToInlineText(fallbackPlainText);
58
+ return parsed.ok ? parsed.value : [];
59
+ }
60
+ function parseInlineTextFromUnknown(value) {
61
+ if (!Array.isArray(value)) return {
62
+ ok: false,
63
+ error: { kind: "not-array" }
64
+ };
65
+ const runs = [];
66
+ for (let index = 0; index < value.length; index += 1) {
67
+ const parsed = inlineTextRunSchema.safeParse(value[index]);
68
+ if (!parsed.success) return {
69
+ ok: false,
70
+ error: {
71
+ kind: "invalid-run",
72
+ index
73
+ }
74
+ };
75
+ runs.push(parsed.data);
76
+ }
77
+ return {
78
+ ok: true,
79
+ value: normalizeInlineText(runs)
80
+ };
81
+ }
82
+ function normalizeInlineText(value) {
83
+ const normalized = [];
84
+ for (const run of value) {
85
+ if (run.text.length === 0) continue;
86
+ const marks = normalizeInlineTextMarks(run.marks ?? []);
87
+ const nextRun = marks.length > 0 ? {
88
+ text: run.text,
89
+ marks
90
+ } : { text: run.text };
91
+ const previous = normalized[normalized.length - 1];
92
+ if (previous && inlineTextMarksEqual(previous.marks ?? [], nextRun.marks ?? [])) {
93
+ normalized[normalized.length - 1] = previous.marks && previous.marks.length > 0 ? {
94
+ text: previous.text + nextRun.text,
95
+ marks: previous.marks
96
+ } : { text: previous.text + nextRun.text };
97
+ continue;
98
+ }
99
+ normalized.push(nextRun);
100
+ }
101
+ return normalized;
102
+ }
103
+ function normalizeInlineTextMarks(marks) {
104
+ let strong = null;
105
+ let emphasis = null;
106
+ let accent = null;
107
+ let highlight = null;
108
+ for (const mark of marks) switch (mark.kind) {
109
+ case "strong":
110
+ strong = { kind: "strong" };
111
+ break;
112
+ case "emphasis":
113
+ emphasis = { kind: "emphasis" };
114
+ break;
115
+ case "accent":
116
+ accent = {
117
+ kind: "accent",
118
+ tone: mark.tone
119
+ };
120
+ break;
121
+ case "highlight":
122
+ highlight = {
123
+ kind: "highlight",
124
+ tone: mark.tone
125
+ };
126
+ break;
127
+ }
128
+ return [
129
+ strong,
130
+ emphasis,
131
+ accent,
132
+ highlight
133
+ ].filter((mark) => mark !== null).sort((left, right) => MARK_ORDER[left.kind] - MARK_ORDER[right.kind]);
134
+ }
135
+ function inlineTextMarksEqual(left, right) {
136
+ const normalizedLeft = normalizeInlineTextMarks(left);
137
+ const normalizedRight = normalizeInlineTextMarks(right);
138
+ if (normalizedLeft.length !== normalizedRight.length) return false;
139
+ return normalizedLeft.every((mark, index) => inlineTextMarkEqual(mark, normalizedRight[index]));
140
+ }
141
+ function inlineTextMarkEqual(left, right) {
142
+ if (!right || left.kind !== right.kind) return false;
143
+ switch (left.kind) {
144
+ case "strong":
145
+ case "emphasis": return true;
146
+ case "accent": return right.kind === "accent" && left.tone === right.tone;
147
+ case "highlight": return right.kind === "highlight" && left.tone === right.tone;
148
+ }
149
+ }
150
+ //#endregion
151
+ //#region ../path-utils/src/index.ts
152
+ const PATH_SEPARATOR_REGEX = /\./g;
153
+ const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
154
+ /**
155
+ * Segments that would traverse or mutate the prototype chain.
156
+ *
157
+ * `setAtPath` creates nested objects along the path, so allowing these
158
+ * segments is a prototype-pollution vector. They are rejected everywhere a
159
+ * path is parsed (string or pre-parsed array form) — fail closed.
160
+ */
161
+ const UNSAFE_PATH_SEGMENTS = /* @__PURE__ */ new Set([
162
+ "__proto__",
163
+ "constructor",
164
+ "prototype"
165
+ ]);
166
+ var UnsafePathSegmentError = class extends Error {
167
+ constructor(segment) {
168
+ super(`Unsafe path segment: "${segment}"`);
169
+ this.name = "UnsafePathSegmentError";
170
+ this.segment = segment;
171
+ }
172
+ };
173
+ function assertSafePathSegments(segments) {
174
+ for (const segment of segments) if (typeof segment === "string" && UNSAFE_PATH_SEGMENTS.has(segment)) throw new UnsafePathSegmentError(segment);
175
+ }
176
+ function isRecord(value) {
177
+ return typeof value === "object" && value !== null && !Array.isArray(value);
178
+ }
179
+ function isPathContainer(value) {
180
+ return Array.isArray(value) || isRecord(value);
181
+ }
182
+ function getContainerValue(container, segment) {
183
+ if (typeof segment === "number") return Array.isArray(container) ? container[segment] : void 0;
184
+ if (segment in container) return Reflect.get(container, segment);
185
+ }
186
+ function parsePath(path) {
187
+ if (Array.isArray(path)) {
188
+ assertSafePathSegments(path);
189
+ return path;
190
+ }
191
+ const segments = [];
192
+ const parts = path.split(PATH_SEPARATOR_REGEX);
193
+ for (const raw of parts) {
194
+ if (!raw) continue;
195
+ const baseMatch = raw.match(/^[^\[]+/);
196
+ if (baseMatch !== null) {
197
+ const base = baseMatch[1] ?? baseMatch[0];
198
+ if (/^\d+$/.test(base)) segments.push(Number(base));
199
+ else segments.push(base);
200
+ }
201
+ const bracketMatches = raw.matchAll(BRACKET_ACCESS_REGEX);
202
+ for (const match of bracketMatches) {
203
+ const token = match[1] ?? "";
204
+ if (token.startsWith("\"") || token.startsWith("'")) segments.push(token.slice(1, -1));
205
+ else if (/^\d+$/.test(token)) segments.push(Number(token));
206
+ else segments.push(token);
207
+ }
208
+ if (baseMatch === null && !raw.includes("[")) segments.push(raw);
209
+ }
210
+ assertSafePathSegments(segments);
211
+ return segments;
212
+ }
213
+ function getAtPath(source, path) {
214
+ return parsePath(path).reduce((current, segment) => {
215
+ if (current === void 0 || current === null) return void 0;
216
+ if (!isPathContainer(current)) return void 0;
217
+ return getContainerValue(current, segment);
218
+ }, source);
219
+ }
220
+ //#endregion
221
+ //#region ../blocks/src/primitives/content/components/Text.tsx
222
+ function Text({ as: Comp = "span", children, className = "", path, style, "data-slot": dataSlot, "data-surface": dataSurface, maxLength: _maxLength }) {
223
+ return /* @__PURE__ */ jsx(Comp, {
224
+ "data-slot": dataSlot,
225
+ "data-surface": dataSurface,
226
+ style: dataSlot === void 0 ? void 0 : style,
227
+ className,
228
+ ...path ? { "data-builder-text": path } : void 0,
229
+ children
230
+ });
231
+ }
232
+ //#endregion
233
+ //#region ../blocks/src/system/runtime/nodes/renderInlineText.tsx
234
+ function renderInlineText(value) {
235
+ return value.map((run, index) => renderRun(run, index));
236
+ }
237
+ function renderRun(run, key) {
238
+ return (run.marks ?? []).reduceRight((child, mark, index) => renderMark(mark, `${String(key)}-${index}`, child), run.text);
239
+ }
240
+ function renderMark(mark, key, child) {
241
+ switch (mark.kind) {
242
+ case "strong": return /* @__PURE__ */ jsx("strong", { children: child }, key);
243
+ case "emphasis": return /* @__PURE__ */ jsx("em", { children: child }, key);
244
+ case "accent": return /* @__PURE__ */ jsx("span", {
245
+ className: `rb-inline-text-accent rb-inline-text-accent-${mark.tone}`,
246
+ children: child
247
+ }, key);
248
+ case "highlight": return /* @__PURE__ */ jsx("span", {
249
+ className: `rb-inline-text-highlight rb-inline-text-highlight-${mark.tone}`,
250
+ children: child
251
+ }, key);
252
+ }
253
+ }
254
+ //#endregion
255
+ //#region ../blocks/src/system/runtime/nodes/basic.tsx
256
+ const TextNode = ({ value, children, blockContent, inlineTextFallbackPath, ...rest }) => {
257
+ const inlineText = parseInlineTextFromUnknown(value);
258
+ if (inlineText.ok && !isInlineTextEmpty(inlineText.value)) return /* @__PURE__ */ jsx(Text, {
259
+ ...rest,
260
+ children: renderInlineText(inlineText.value)
261
+ });
262
+ const fallbackValue = inlineTextFallbackPath ? readStringPath(blockContent, inlineTextFallbackPath) : null;
263
+ return /* @__PURE__ */ jsx(Text, {
264
+ ...rest,
265
+ children: fallbackValue ?? textNodeContent(value) ?? children
266
+ });
267
+ };
268
+ function textNodeContent(value) {
269
+ if (value === null || value === void 0) return null;
270
+ if (typeof value === "string" || typeof value === "number") return value;
271
+ return null;
272
+ }
273
+ function readStringPath(source, path) {
274
+ const value = getAtPath(source, path);
275
+ return typeof value === "string" ? value : null;
276
+ }
277
+ const RichTextNode = ({ value, blockKind, ...rest }) => {
278
+ return /* @__PURE__ */ jsx(RichText, {
279
+ doc: coerceRichTextDoc(value, `block-runtime:${blockKind ?? "unknown"}:${rest.path ?? "richText"}`) ?? void 0,
280
+ ...rest
281
+ });
282
+ };
283
+ function isMissingRequiredLink(linkRequired, resolvedHref) {
284
+ return linkRequired && resolvedHref.length === 0;
285
+ }
286
+ function authoredButtonDecision(props) {
287
+ const content = props.value ?? props.children;
288
+ if (!content) return { kind: "empty" };
289
+ const href = typeof props.href === "string" ? props.href.trim() : "";
290
+ if (isMissingRequiredLink(props.linkRequired ?? false, href)) return { kind: "missing-link" };
291
+ const variant = parseThemeButtonVariantId(props.variantId ?? "primary");
292
+ if (props.variantId && !variant) return { kind: "invalid-variant" };
293
+ return {
294
+ kind: "ready",
295
+ content,
296
+ href,
297
+ variant
298
+ };
299
+ }
300
+ const ButtonNode = (props) => {
301
+ const decision = authoredButtonDecision(props);
302
+ switch (decision.kind) {
303
+ case "empty":
304
+ console.warn("[ButtonNode] No content to render - value and children are both empty");
305
+ return null;
306
+ case "missing-link":
307
+ console.warn("[ButtonNode] Missing href for link-required button");
308
+ return null;
309
+ case "invalid-variant":
310
+ console.error("[ButtonNode] Invalid button variant", { variantId: props.variantId });
311
+ return null;
312
+ case "ready": return /* @__PURE__ */ jsx(AuthoredButtonContent, {
313
+ props,
314
+ decision
315
+ });
316
+ }
317
+ };
318
+ function AuthoredButtonContent({ props, decision }) {
319
+ if (props.actionStyle === "link" && decision.href && !props.disabled) return /* @__PURE__ */ jsx("a", {
320
+ href: decision.href,
321
+ target: props.target,
322
+ rel: props.rel,
323
+ onClick: props.onClick,
324
+ className: `rb-item-text-link btn-${props.size ?? "md"}`,
325
+ "aria-label": props["aria-label"],
326
+ "data-testid": props["data-testid"],
327
+ children: decision.content
328
+ });
329
+ return /* @__PURE__ */ jsx(ThemedAuthoredButton, {
330
+ label: decision.content,
331
+ href: decision.href || void 0,
332
+ target: props.target,
333
+ rel: props.rel,
334
+ variant: decision.variant,
335
+ size: props.size ?? "md",
336
+ disabled: props.disabled,
337
+ type: props.type ?? "button",
338
+ trailingIcon: props.trailingIcon,
339
+ onClick: props.onClick,
340
+ extraClassName: props.className,
341
+ ariaLabel: props["aria-label"],
342
+ dataTestId: props["data-testid"]
343
+ });
344
+ }
345
+ const LinkNode = ({ href, children, className, target, rel, linkRequired = false, ...rest }) => {
346
+ if (!children) return null;
347
+ const resolvedHref = typeof href === "string" ? href.trim() : "";
348
+ if (resolvedHref.length === 0) {
349
+ if (linkRequired && true) console.warn("[LinkNode] Missing href for link-required link");
350
+ if (linkRequired) return null;
351
+ return /* @__PURE__ */ jsx("span", {
352
+ className,
353
+ ...rest,
354
+ children
355
+ });
356
+ }
357
+ return /* @__PURE__ */ jsx("a", {
358
+ href: resolvedHref,
359
+ className,
360
+ target,
361
+ rel,
362
+ ...rest,
363
+ children
364
+ });
365
+ };
366
+ //#endregion
367
+ //#region ../blocks/src/system/runtime/nodes/events/RecurringSchedule.tsx
368
+ function destinationHref(destination) {
369
+ return destination.kind === "external" ? destination.url : destination.path;
370
+ }
371
+ function bookingLinkProps(booking) {
372
+ return booking.destination.kind === "external" ? {
373
+ href: destinationHref(booking.destination),
374
+ target: "_blank",
375
+ rel: "noopener noreferrer"
376
+ } : { href: destinationHref(booking.destination) };
377
+ }
378
+ function bookingActionContent(input) {
379
+ switch (input.booking.kind) {
380
+ case "available": return /* @__PURE__ */ jsx(ButtonNode, {
381
+ ...bookingLinkProps(input.booking),
382
+ "aria-label": input.accessibleName,
383
+ className: "recurring-schedule-book",
384
+ linkRequired: true,
385
+ variantId: input.buttonVariant,
386
+ size: "sm",
387
+ children: input.buttonText
388
+ });
389
+ case "unavailable": return null;
390
+ default: return assertNever(input.booking);
391
+ }
392
+ }
393
+ function RecurringSchedule({ dateContext = resolveDateRuntimeContext(void 0), schedule, buttonText = "Book", buttonVariant = "primary", showVenue = true, emptyMessage = "Regular schedule details will be added shortly." }) {
394
+ const projection = schedule ?? {
395
+ items: [],
396
+ diagnostics: []
397
+ };
398
+ if (projection.items.length === 0) return /* @__PURE__ */ jsx("p", {
399
+ className: "recurring-schedule-empty",
400
+ "data-diagnostic-count": projection.diagnostics.length,
401
+ children: emptyMessage
402
+ });
403
+ return /* @__PURE__ */ jsx("div", {
404
+ className: "recurring-schedule",
405
+ "data-diagnostic-count": projection.diagnostics.length,
406
+ role: "list",
407
+ children: projection.items.map((item) => /* @__PURE__ */ jsx(RecurringScheduleRow, {
408
+ item,
409
+ locale: dateContext.locale,
410
+ buttonText: buttonText ?? "Book",
411
+ buttonVariant: buttonVariant ?? "primary",
412
+ showVenue: showVenue ?? true
413
+ }, item.seriesId))
414
+ });
415
+ }
416
+ function RecurringScheduleRow({ item, locale, buttonText, buttonVariant, showVenue }) {
417
+ const startLabel = formatEventClockLabel(item.cadence.startTime, locale);
418
+ const endLabel = formatEventClockLabel(item.cadence.endTime, locale);
419
+ const weekdays = item.cadence.weekdays?.join(", ") ?? item.cadence.weekday;
420
+ const description = `${item.title}, ${weekdays} at ${startLabel}`;
421
+ return /* @__PURE__ */ jsxs("article", {
422
+ className: "recurring-schedule-row",
423
+ role: "listitem",
424
+ "aria-label": description,
425
+ children: [
426
+ /* @__PURE__ */ jsx("p", {
427
+ className: "recurring-schedule-day",
428
+ children: weekdays
429
+ }),
430
+ /* @__PURE__ */ jsxs("p", {
431
+ className: "recurring-schedule-time",
432
+ children: [
433
+ /* @__PURE__ */ jsx("time", {
434
+ dateTime: item.cadence.startTime,
435
+ children: startLabel
436
+ }),
437
+ /* @__PURE__ */ jsx("span", {
438
+ "aria-hidden": "true",
439
+ children: "–"
440
+ }),
441
+ /* @__PURE__ */ jsx("time", {
442
+ dateTime: item.cadence.endTime,
443
+ children: endLabel
444
+ })
445
+ ]
446
+ }),
447
+ /* @__PURE__ */ jsxs("div", {
448
+ className: "recurring-schedule-details",
449
+ children: [/* @__PURE__ */ jsx("p", {
450
+ className: "recurring-schedule-title",
451
+ children: item.title
452
+ }), showVenue && item.venueName ? /* @__PURE__ */ jsx("p", {
453
+ className: "recurring-schedule-venue",
454
+ children: item.venueName
455
+ }) : null]
456
+ }),
457
+ /* @__PURE__ */ jsx("div", {
458
+ className: "recurring-schedule-action",
459
+ children: bookingActionContent({
460
+ booking: item.booking,
461
+ buttonVariant,
462
+ buttonText,
463
+ accessibleName: `${buttonText} ${description}`
464
+ })
465
+ })
466
+ ]
467
+ });
468
+ }
469
+ //#endregion
470
+ //#region ../blocks/src/system/runtime/nodes/events/shared/CalendarRecurringWeek.tsx
471
+ /** Week mode keeps the series projection and booking destinations from issue 1586. */
472
+ function CalendarRecurringWeek({ display }) {
473
+ return /* @__PURE__ */ jsxs("div", {
474
+ className: "event-calendar event-calendar--recurring-week",
475
+ children: [display.seeAllUrl ? /* @__PURE__ */ jsx(ThemedButtonLink, {
476
+ href: display.seeAllUrl,
477
+ variant: display.seeAllButtonVariant,
478
+ size: "md",
479
+ label: display.loadMoreText ?? "See all classes"
480
+ }) : null, /* @__PURE__ */ jsx(RecurringSchedule, {
481
+ schedule: display.schedule,
482
+ dateContext: display.dateContext,
483
+ buttonText: display.buttonText,
484
+ buttonVariant: display.buttonVariant,
485
+ showVenue: display.showVenue,
486
+ emptyMessage: display.emptyMessage
487
+ })]
488
+ });
489
+ }
490
+ //#endregion
491
+ //#region ../blocks/src/system/runtime/nodes/events/shared/MonthLookView.tsx
492
+ function MonthEvent({ event, timeZone, locale }) {
493
+ return /* @__PURE__ */ jsxs("a", {
494
+ ...resolveEventLinkProps(event),
495
+ "data-slot": "item",
496
+ children: [
497
+ /* @__PURE__ */ jsx("span", {
498
+ "data-slot": "time",
499
+ children: formatTime(event.startsAt, {
500
+ ...eventDateOptions({
501
+ ...event,
502
+ timeZone
503
+ }),
504
+ locale
505
+ })
506
+ }),
507
+ " ",
508
+ /* @__PURE__ */ jsx("span", {
509
+ "data-slot": "what",
510
+ children: event.title
511
+ })
512
+ ]
513
+ });
514
+ }
515
+ function dateLabel(key, timeZone, date = "short") {
516
+ return formatDate({
517
+ kind: "civil",
518
+ value: parseBookingLocalDate(key)
519
+ }, eventDateOptions({
520
+ siteTimeZone: timeZone,
521
+ timeZone
522
+ }), {
523
+ date,
524
+ weekday: "long"
525
+ });
526
+ }
527
+ function MonthDay(props) {
528
+ const { day, selection } = props;
529
+ const { controls } = selection;
530
+ const selected = day.dateKey === selection.selectedDay;
531
+ return /* @__PURE__ */ jsxs("div", {
532
+ "data-slot": "date",
533
+ "data-current": String(selected),
534
+ "data-today": String(day.isToday),
535
+ "data-other-month": String(!day.isCurrentMonth),
536
+ children: [selection.arrangement === "month-day" ? /* @__PURE__ */ jsx("button", {
537
+ type: "button",
538
+ "data-slot": "control",
539
+ "aria-label": `Show events on ${dateLabel(day.dateKey, selection.timeZone, "long")}`,
540
+ "aria-pressed": selected,
541
+ onClick: controls ? () => controls.selectDay(day.dateKey) : void 0,
542
+ children: day.date.day
543
+ }) : /* @__PURE__ */ jsx("span", {
544
+ "data-slot": "date-label",
545
+ children: day.date.day
546
+ }), selection.arrangement === "month-grid" ? /* @__PURE__ */ jsxs(Fragment, { children: [day.visibleEntries.map(({ event, timeZone }) => /* @__PURE__ */ jsx(MonthEvent, {
547
+ event,
548
+ timeZone,
549
+ locale: eventDateOptions({ siteTimeZone: selection.timeZone }).locale
550
+ }, event.occurrenceId ?? event.id)), day.moreCount > 0 ? /* @__PURE__ */ jsxs("button", {
551
+ type: "button",
552
+ className: "event-calendar-more",
553
+ "data-slot": "more",
554
+ onClick: controls ? () => controls.openDay(day.date, day.entries.map(({ event }) => event)) : void 0,
555
+ children: [
556
+ "+",
557
+ day.moreCount,
558
+ " more"
559
+ ]
560
+ }) : null] }) : /* @__PURE__ */ jsx(MonthDayMarks, { count: day.entries.length })]
561
+ });
562
+ }
563
+ /** Both Looks and the legacy month grid consume the same per-day model. */
564
+ function MonthLookView(props) {
565
+ const days = props.days.map((date) => buildMonthDay({
566
+ date,
567
+ events: props.eventsByDate.get(formatDateKey(date)) ?? [],
568
+ viewDate: props.viewDate,
569
+ today: props.today,
570
+ calendarTimeZone: props.timeZone
571
+ }));
572
+ const selected = days.find((day) => day.dateKey === props.selectedDay);
573
+ return /* @__PURE__ */ jsxs("div", {
574
+ "data-slot": "frame",
575
+ "data-arrangement": props.arrangement,
576
+ children: [/* @__PURE__ */ jsxs("div", {
577
+ "data-slot": "grid",
578
+ children: [props.dayNames.map((name) => /* @__PURE__ */ jsx("span", {
579
+ "data-slot": "group-label",
580
+ children: name
581
+ }, name)), days.map((day) => /* @__PURE__ */ jsx(MonthDay, {
582
+ day,
583
+ selection: props
584
+ }, day.dateKey))]
585
+ }), props.arrangement === "month-day" ? /* @__PURE__ */ jsxs("section", {
586
+ ...listLookSlot(props, "panel"),
587
+ "aria-live": "polite",
588
+ children: [/* @__PURE__ */ jsx("h3", {
589
+ "data-slot": "panel-heading",
590
+ children: dateLabel(props.selectedDay, props.timeZone)
591
+ }), /* @__PURE__ */ jsx("div", {
592
+ ...listLookSlot(props, "list"),
593
+ children: selected?.entries.length ? selected.entries.map(({ event }, index, entries) => /* @__PURE__ */ jsx(EventItem, {
594
+ ...listItemPresentation(props, index, entries.length),
595
+ event,
596
+ arrangement: "month-day"
597
+ }, event.occurrenceId ?? event.id)) : /* @__PURE__ */ jsx("p", {
598
+ "data-slot": "intro",
599
+ children: props.emptyMessage
600
+ })
601
+ })]
602
+ }) : null]
603
+ });
604
+ }
605
+ function MonthDayMarks({ count }) {
606
+ if (count === 0) return null;
607
+ return /* @__PURE__ */ jsx("span", {
608
+ "data-slot": "item-meta",
609
+ role: "img",
610
+ "aria-label": `${count} ${count === 1 ? "event" : "events"}`,
611
+ children: Array.from({ length: Math.min(count, 3) }, (_, index) => /* @__PURE__ */ jsx("span", {
612
+ "data-slot": "mark",
613
+ "aria-hidden": "true"
614
+ }, index))
615
+ });
616
+ }
617
+ //#endregion
618
+ //#region ../blocks/src/system/runtime/nodes/events/shared/WeekBoardView.tsx
619
+ function buildWeekBoardNavigationState(viewport, today) {
620
+ return {
621
+ rangeLabel: viewport.title,
622
+ isCurrentWeek: viewport.days.some((day) => isToday(day, today))
623
+ };
624
+ }
625
+ function buildWeekBoardViewProps(display, days, navigation, events = display.events) {
626
+ return {
627
+ days,
628
+ events: [...events],
629
+ navigation,
630
+ showCapacity: display.showCapacity,
631
+ emptyMessage: display.emptyMessage,
632
+ title: display.boardTitle,
633
+ footerNote: display.footerNote,
634
+ ctaLabel: display.loadMoreText ?? display.buttonText,
635
+ ctaHref: display.seeAllUrl,
636
+ buttonVariant: display.buttonVariant,
637
+ elevated: display.elevated,
638
+ banded: display.banded,
639
+ calendarTimeZone: display.calendarTimeZone,
640
+ today: display.today
641
+ };
642
+ }
643
+ const SHORT_DAY_NAMES = [
644
+ "Sun",
645
+ "Mon",
646
+ "Tue",
647
+ "Wed",
648
+ "Thu",
649
+ "Fri",
650
+ "Sat"
651
+ ];
652
+ const LEGEND_ITEMS = [
653
+ {
654
+ status: "available",
655
+ label: "Places available"
656
+ },
657
+ {
658
+ status: "filling",
659
+ label: "Filling up"
660
+ },
661
+ {
662
+ status: "waitlist",
663
+ label: "Waitlist"
664
+ }
665
+ ];
666
+ /**
667
+ * Format an event's start–end as a compact range, merging the shared meridiem.
668
+ * "6:00 PM" + "7:00 PM" -> "6:00 – 7:00 PM"; "9:30 AM" + "10:15 AM" -> "9:30 – 10:15 AM".
669
+ */
670
+ function formatCompactTimeRange(event, calendarTimeZone) {
671
+ return formatEventTimeRange(event, eventDateOptions({
672
+ ...event,
673
+ timeZone: resolveEventTimeZone(event, calendarTimeZone)
674
+ }));
675
+ }
676
+ const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
677
+ const linkProps = resolveEventLinkProps(event);
678
+ const { status, label } = getEventAvailabilityStatus(event);
679
+ const pill = showCapacity ? label : null;
680
+ return /* @__PURE__ */ jsxs("a", {
681
+ ...linkProps,
682
+ className: "event-week-board-card",
683
+ "data-status": status,
684
+ children: [
685
+ /* @__PURE__ */ jsx("span", {
686
+ className: "event-week-board-card-title",
687
+ children: event.title
688
+ }),
689
+ /* @__PURE__ */ jsx("span", {
690
+ className: "event-week-board-card-time",
691
+ children: formatCompactTimeRange(event, calendarTimeZone)
692
+ }),
693
+ pill ? /* @__PURE__ */ jsx("span", {
694
+ className: "event-week-board-card-pill",
695
+ "data-status": status,
696
+ children: pill
697
+ }) : null
698
+ ]
699
+ });
700
+ };
701
+ const WeekBoardNavigationControls = ({ navigation, buttonVariant }) => {
702
+ const handlers = navigation.kind === "interactive" ? navigation : {
703
+ onPrevious: void 0,
704
+ onNext: void 0,
705
+ onToday: void 0
706
+ };
707
+ const isLoading = navigation.kind === "interactive" && navigation.loadState.kind === "loading";
708
+ return /* @__PURE__ */ jsxs("nav", {
709
+ className: "event-week-board-navigation",
710
+ "aria-label": "Choose week",
711
+ children: [
712
+ /* @__PURE__ */ jsx("button", {
713
+ type: "button",
714
+ className: "event-week-board-nav-button",
715
+ "aria-label": "Previous week",
716
+ onClick: handlers.onPrevious,
717
+ children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "previous" })
718
+ }),
719
+ /* @__PURE__ */ jsxs("h3", {
720
+ className: "event-week-board-range",
721
+ "aria-live": "polite",
722
+ children: [navigation.rangeLabel, isLoading ? /* @__PURE__ */ jsx("span", {
723
+ className: "event-week-board-loading",
724
+ children: " Loading…"
725
+ }) : null]
726
+ }),
727
+ /* @__PURE__ */ jsx("button", {
728
+ type: "button",
729
+ className: "event-week-board-nav-button",
730
+ "aria-label": "Next week",
731
+ onClick: handlers.onNext,
732
+ children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "next" })
733
+ }),
734
+ /* @__PURE__ */ jsx(ThemedButton, {
735
+ type: "button",
736
+ variant: buttonVariant,
737
+ size: "sm",
738
+ label: "Today",
739
+ disabled: navigation.isCurrentWeek,
740
+ onClick: handlers.onToday
741
+ })
742
+ ]
743
+ });
744
+ };
745
+ const WeekBoardLegend = () => /* @__PURE__ */ jsx("div", {
746
+ className: "event-week-board-legend",
747
+ "aria-hidden": "true",
748
+ children: LEGEND_ITEMS.map((item) => /* @__PURE__ */ jsxs("span", {
749
+ className: "event-week-board-legend-item",
750
+ children: [/* @__PURE__ */ jsx("i", {
751
+ className: "event-week-board-legend-dot",
752
+ "data-status": item.status
753
+ }), item.label]
754
+ }, item.status))
755
+ });
756
+ const WeekBoardLoadError = ({ navigation, buttonVariant }) => {
757
+ if (navigation.kind !== "interactive" || navigation.loadState.kind !== "error") return null;
758
+ return /* @__PURE__ */ jsxs("div", {
759
+ className: "event-week-board-error",
760
+ role: "status",
761
+ children: [/* @__PURE__ */ jsx("p", { children: "Failed to load events" }), /* @__PURE__ */ jsx(ThemedButton, {
762
+ type: "button",
763
+ variant: buttonVariant,
764
+ size: "sm",
765
+ label: "Try again",
766
+ onClick: navigation.loadState.onRetry
767
+ })]
768
+ });
769
+ };
770
+ const WeekBoardGrid = ({ days, eventsByDate, showCapacity, calendarTimeZone, today: currentDate }) => /* @__PURE__ */ jsx("div", {
771
+ className: "event-week-board-grid",
772
+ children: days.map((date) => {
773
+ const dateKey = formatDateKey(date);
774
+ const dayEvents = eventsByDate.get(dateKey) ?? [];
775
+ const today = isToday(date, currentDate);
776
+ return /* @__PURE__ */ jsxs("div", {
777
+ className: clsx("event-week-board-day", dayEvents.length === 0 && "event-week-board-day--empty", today && "event-week-board-day--today"),
778
+ children: [/* @__PURE__ */ jsxs("div", {
779
+ className: "event-week-board-day-head",
780
+ children: [/* @__PURE__ */ jsx("span", {
781
+ className: "event-week-board-day-abbr",
782
+ children: SHORT_DAY_NAMES[getDayOfWeek(date)]
783
+ }), /* @__PURE__ */ jsx("span", {
784
+ className: "event-week-board-day-num",
785
+ children: date.day
786
+ })]
787
+ }), /* @__PURE__ */ jsx("div", {
788
+ className: "event-week-board-day-body",
789
+ children: dayEvents.map((event) => /* @__PURE__ */ jsx(WeekBoardCard, {
790
+ event,
791
+ showCapacity,
792
+ calendarTimeZone
793
+ }, event.occurrenceId || event.id))
794
+ })]
795
+ }, dateKey);
796
+ })
797
+ });
798
+ const WeekBoardFooter = ({ note, ctaHref, ctaLabel, buttonVariant }) => {
799
+ if (note === null && ctaHref === null) return null;
800
+ return /* @__PURE__ */ jsxs("div", {
801
+ className: "event-week-board-foot",
802
+ children: [note === null ? null : /* @__PURE__ */ jsx("p", {
803
+ className: "event-week-board-foot-note",
804
+ children: note
805
+ }), ctaHref === null ? null : /* @__PURE__ */ jsx(ThemedButtonLink, {
806
+ variant: buttonVariant,
807
+ size: "sm",
808
+ href: ctaHref,
809
+ label: ctaLabel
810
+ })]
811
+ });
812
+ };
813
+ /**
814
+ * WeekBoardView
815
+ *
816
+ * Compact "class day-board": day columns side by side (one card per class per
817
+ * day), a legend of the three availability states, and a footer CTA. Collapses
818
+ * to a stacked list on mobile. Repurposes the week-grouped agenda data as a
819
+ * board rather than an hour-positioned timetable grid.
820
+ */
821
+ const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage = "No classes scheduled this week", title, footerNote, ctaLabel = "Reserve a place", ctaHref = null, buttonVariant = "outline", elevated = false, banded = false, calendarTimeZone, today }) => {
822
+ const eventsByDate = groupEventsByDate(events, calendarTimeZone);
823
+ const hasAnyEvents = days.some((date) => (eventsByDate.get(formatDateKey(date)) ?? []).length > 0);
824
+ const hasTitle = typeof title === "string" && title.length > 0;
825
+ const hasFooterNote = typeof footerNote === "string" && footerNote.length > 0;
826
+ const footerNoteText = hasAnyEvents ? hasFooterNote ? footerNote : null : emptyMessage;
827
+ const resolvedCtaHref = typeof ctaHref === "string" && ctaHref.length > 0 ? ctaHref : null;
828
+ return /* @__PURE__ */ jsx("div", {
829
+ className: "event-calendar event-calendar--week-board",
830
+ "data-block": "event-calendar",
831
+ ...banded ? { "data-banded": "" } : {},
832
+ children: /* @__PURE__ */ jsxs("div", {
833
+ className: "event-week-board",
834
+ style: { "--event-week-board-cols": String(days.length) },
835
+ ...elevated ? { "data-elevated": "" } : {},
836
+ children: [
837
+ /* @__PURE__ */ jsxs("div", {
838
+ className: "event-week-board-top",
839
+ children: [
840
+ hasTitle ? /* @__PURE__ */ jsx("span", {
841
+ className: "event-week-board-title",
842
+ children: title
843
+ }) : null,
844
+ /* @__PURE__ */ jsx(WeekBoardNavigationControls, {
845
+ navigation,
846
+ buttonVariant
847
+ }),
848
+ /* @__PURE__ */ jsx(WeekBoardLegend, {})
849
+ ]
850
+ }),
851
+ /* @__PURE__ */ jsx(WeekBoardLoadError, {
852
+ navigation,
853
+ buttonVariant
854
+ }),
855
+ /* @__PURE__ */ jsx(WeekBoardGrid, {
856
+ days,
857
+ eventsByDate,
858
+ showCapacity,
859
+ calendarTimeZone,
860
+ today
861
+ }),
862
+ /* @__PURE__ */ jsx(WeekBoardFooter, {
863
+ note: footerNoteText,
864
+ ctaHref: resolvedCtaHref,
865
+ ctaLabel,
866
+ buttonVariant
867
+ })
868
+ ]
869
+ })
870
+ });
871
+ };
872
+ //#endregion
873
+ //#region ../blocks/src/system/runtime/nodes/events/shared/timetableModel.ts
874
+ /**
875
+ * Event-domain adapter over @riverbankcms/calendar.
876
+ *
877
+ * Wraps the generic timetable model with PublicEvent-shaped accessors and
878
+ * domain-side cell content (timeLabel, teacherLine, capacityLabel, isFull,
879
+ * categoryColor with theme fallback). Renderers (WeekTimetableView,
880
+ * EventCalendar.server) consume this shape.
881
+ */
882
+ /** Theme-default border colour for events without a category-supplied colour. */
883
+ const DEFAULT_EVENT_CELL_COLOR = "rgb(var(--tb-accent))";
884
+ function buildTimetableModel(input) {
885
+ const calendarTimeZone = input.calendarTimeZone;
886
+ const generic = buildTimetableModel$1({
887
+ items: input.events,
888
+ viewDate: input.viewDate,
889
+ startOfWeek: input.startOfWeek,
890
+ today: input.today,
891
+ getId: (event) => event.id,
892
+ getStartsAt: (event) => event.startsAt,
893
+ getEndsAt: (event) => event.endsAt,
894
+ getTimeZone: (event) => resolveEventTimeZone(event, calendarTimeZone),
895
+ getColor: (event) => event.eventCategory?.color ?? null,
896
+ getOrderKey: (event) => `${event.title}\u0000${event.id}`
897
+ });
898
+ return {
899
+ hourTicks: [...generic.hourTicks],
900
+ startHour: generic.startHour,
901
+ endHour: generic.endHour,
902
+ rangeMinutes: generic.rangeMinutes,
903
+ hasEvents: generic.hasItems,
904
+ days: generic.days.map((day) => ({
905
+ date: day.date,
906
+ dateKey: day.dateKey,
907
+ label: formatDayLabel(day.date, calendarTimeZone, {
908
+ date: "short",
909
+ weekday: "long",
910
+ year: "omit"
911
+ }),
912
+ shortLabel: formatDayLabel(day.date, calendarTimeZone, {
913
+ date: "omit",
914
+ day: "numeric",
915
+ weekday: "short",
916
+ year: "omit"
917
+ }),
918
+ isToday: day.isToday,
919
+ events: day.cells.map((cell) => toEventCell(cell, calendarTimeZone))
920
+ }))
921
+ };
922
+ }
923
+ function toEventCell(cell, calendarTimeZone) {
924
+ const event = cell.item;
925
+ const capacity = formatTimetableCapacity(event);
926
+ return {
927
+ event,
928
+ startsAtMinutes: cell.startsAtMinutes,
929
+ endsAtMinutes: cell.endsAtMinutes,
930
+ topPercent: cell.topPercent,
931
+ heightPercent: cell.heightPercent,
932
+ laneIndex: cell.laneIndex,
933
+ laneCount: cell.laneCount,
934
+ categoryColor: cell.color ?? DEFAULT_EVENT_CELL_COLOR,
935
+ timeLabel: formatEventTimeRange(event, eventDateOptions({
936
+ ...event,
937
+ timeZone: resolveEventTimeZone(event, calendarTimeZone)
938
+ })),
939
+ teacherLine: formatEventTeacherLine(event),
940
+ capacityLabel: capacity.label,
941
+ isFull: capacity.isFull
942
+ };
943
+ }
944
+ function formatTimetableCapacity(event) {
945
+ return {
946
+ label: formatEventRemainingPlaces(event, { compact: true }),
947
+ isFull: isEventFull(event)
948
+ };
949
+ }
950
+ function formatDayLabel(date, timeZone, options) {
951
+ return formatDate({
952
+ kind: "civil",
953
+ value: date
954
+ }, eventDateOptions({
955
+ siteTimeZone: timeZone,
956
+ timeZone
957
+ }), options);
958
+ }
959
+ //#endregion
960
+ export { MonthLookView as a, ButtonNode as c, TextNode as d, Text as f, plainTextToInlineText as g, parseInlineTextFromUnknown as h, buildWeekBoardViewProps as i, LinkNode as l, inlineTextToPlainText as m, WeekBoardView as n, CalendarRecurringWeek as o, coerceInlineTextWithFallback as p, buildWeekBoardNavigationState as r, RecurringSchedule as s, buildTimetableModel as t, RichTextNode as u };