@riverbankcms/sdk 0.171.0 → 0.172.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 (210) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-xuFmD41p.d.ts → BlocksIslandsHydrator-DtrzTJ77.d.ts} +1 -1
  2. package/dist/_dts/{Page-4fzXy8H9.d.ts → Page-DViYbakk.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-BlHgMsc8.d.ts → SdkPreviewMode-D-5OeDbT.d.ts} +2 -2
  4. package/dist/_dts/{client-BPoU758C.d.ts → client-DZBOzd3U.d.ts} +1 -2
  5. package/dist/_dts/{content-types-TnkhoSls.d.ts → content-types-DS3DrYn_.d.ts} +3 -3
  6. package/dist/_dts/{contracts-7wrMA79U.d.ts → contracts-C3QGPCUf.d.ts} +3 -3
  7. package/dist/_dts/{footerPageOutline-DaOsPQ_Q.d.ts → footerPageOutline-D9Q7VIul.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-D9aDEzKK.d.ts → generatePageMetadata-R7NeFT1u.d.ts} +2 -2
  9. package/dist/_dts/{index-DDKJfaLY.d.ts → index-BnMavhoh.d.ts} +2 -2
  10. package/dist/_dts/{index-585vn6qb.d.ts → index-C0zjLMAW.d.ts} +49 -38
  11. package/dist/_dts/{index-W9R3Bnf2.d.ts → index-CpOkfBt1.d.ts} +3 -3
  12. package/dist/_dts/{index-Cbw0IiY7.d.ts → index-Da4UMgbs.d.ts} +2 -2
  13. package/dist/_dts/{index-DNCDENic.d.ts → index-DkFV_1Bc.d.ts} +1 -1
  14. package/dist/_dts/{index-ChNbrcgD.d.ts → index-Dns7OHyl.d.ts} +1 -1
  15. package/dist/_dts/{index-CZKSUcDs.d.ts → index-MuMYjetm.d.ts} +4 -4
  16. package/dist/_dts/{loadContent-DPyNAJym.d.ts → loadContent-DJmXHzfi.d.ts} +7 -7
  17. package/dist/_dts/{request-jXTRN1Y4.d.ts → request-wQ28JWbr.d.ts} +66983 -65876
  18. package/dist/_dts/{resolveBlockData-BbvE-gsZ.d.ts → resolveBlockData-C-IP53u9.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-BBgih00D.d.ts → resolvePageContent-Cc4zqaEC.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 +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 +2 -2
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  48. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  50. package/dist/_dts/sdk/src/server.d.ts +5 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +18 -1
  53. package/dist/_dts/{types-kWvBwYK6.d.ts → types-CpjyP5I4.d.ts} +7 -7
  54. package/dist/_dts/{types-DEAKoDNi.d.ts → types-DrinAfeW.d.ts} +3 -3
  55. package/dist/_dts/{types-BXuVxDYo.d.ts → types-ZuZoGsZV.d.ts} +2 -2
  56. package/dist/_dts/{validation-BAO0_ntM.d.ts → validation-CIZ_fP5l.d.ts} +4 -4
  57. package/dist/client/{BlocksIslandsHydrator-DfMsMIej.mjs → BlocksIslandsHydrator-UFmQB1BE.mjs} +17 -17
  58. package/dist/client/{BookingMailingListNote-aaSicywS.mjs → BookingMailingListNote-VjRYhx1c.mjs} +6 -6
  59. package/dist/client/{BookingPanelArrangement-OgftZ9QC.mjs → BookingPanelArrangement-DpqnRo-t.mjs} +1 -1
  60. package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-CzOT8ZWo.mjs} +4 -4
  61. package/dist/client/{CalendarNavigationChevron-iMWrY6Hz.mjs → CalendarNavigationChevron-CNckKZct.mjs} +7 -7
  62. package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
  63. package/dist/client/{DemoBookingPortalAccess-BCumOTLY.mjs → DemoBookingPortalAccess-CmZLVXOy.mjs} +6 -6
  64. package/dist/client/{EventCalendar.client-kh7mkYnW.mjs → EventCalendar.client-BU-SxLCn.mjs} +9 -9
  65. package/dist/client/{EventCombined.client-DXD5i0Ar.mjs → EventCombined.client-f28VltfY.mjs} +8 -8
  66. package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
  67. package/dist/client/{EventItem-BnwcoFQN.mjs → EventItem-sKBofjiW.mjs} +40 -14
  68. package/dist/client/{EventListWeekNavigation-DuG6z02f.mjs → EventListWeekNavigation-IAcax47T.mjs} +1 -1
  69. package/dist/client/{EventListing.client-18yfHrcr.mjs → EventListing.client-BEtnRvZr.mjs} +3 -3
  70. package/dist/client/{EventListing.view-BM7rTVSL.mjs → EventListing.view-BZ4l_rmT.mjs} +189 -73
  71. package/dist/client/{EventRegistrationPayment-D5J3DR0x.mjs → EventRegistrationPayment-BWb295cD.mjs} +9 -9
  72. package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-Hsj2HC_1.mjs} +2 -2
  73. package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-C7E7Lyfa.mjs} +1 -1
  74. package/dist/client/{Page-DH2sm4Cf.mjs → Page-Ds1s3DuC.mjs} +1425 -490
  75. package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
  76. package/dist/client/{StepIndicator-CsRlU46Y.mjs → StepIndicator-CSCyAaKY.mjs} +6 -6
  77. package/dist/client/{TabBarFragment-CsAufYwT.mjs → TabBarFragment-BqfRLojo.mjs} +1 -1
  78. package/dist/client/{ThemedButton-BMDHwnM6.mjs → ThemedButton-DuaYtnvG.mjs} +1 -1
  79. package/dist/client/{accessibleSurfaces-Bbn1-jJ8.mjs → accessibleSurfaces-OsAseM7H.mjs} +57 -42
  80. package/dist/client/{accordion-DT4MD3Np.mjs → accordion-DgwFZJSx.mjs} +1 -1
  81. package/dist/client/{booking-form.client-DdqNQNCa.mjs → booking-form.client-CKY9oksp.mjs} +33 -29
  82. package/dist/client/{bookingForm-CLN396HU.mjs → bookingForm-CsHhcdSF.mjs} +4 -4
  83. package/dist/client/bookings.mjs +5 -5
  84. package/dist/client/{boxStyleClassNames-iLF_3KX9.mjs → boxStyleClassNames-B1Z_TGAe.mjs} +1 -1
  85. package/dist/client/{carousel-DFLomCGm.mjs → carousel-0sw2Kc3a.mjs} +2 -2
  86. package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
  87. package/dist/client/{cart-BozMM5NK.mjs → cart-CPfvMDGJ.mjs} +3 -3
  88. package/dist/client/{cart.client-CqOOxPbW.mjs → cart.client-BJBPUTmg.mjs} +1 -1
  89. package/dist/client/{checkout-CTWF5nbB.mjs → checkout-DU4JFjGT.mjs} +3 -3
  90. package/dist/client/{checkout.client-CpqxN8e0.mjs → checkout.client-BbNCO4xa.mjs} +1 -1
  91. package/dist/client/{checkoutUrls-Ccg6yfjq.mjs → checkoutUrls-BQ3OlWlM.mjs} +1 -1
  92. package/dist/client/client.mjs +151 -6
  93. package/dist/client/{context-Dzjv2CpA.mjs → context-xNC1Cyjw.mjs} +14 -1
  94. package/dist/client/{cta-pzQkBLgS.mjs → cta-CNVQHLKs.mjs} +53 -11
  95. package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-B6ea-egy.mjs} +1 -1
  96. package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-BhjGxhX3.mjs} +1 -1
  97. package/dist/client/{display-Cl6mgSJa.mjs → display-B5DfNb6A.mjs} +1869 -333
  98. package/dist/client/{enhanceHeaderSection-CJCl0HJC.mjs → enhanceHeaderSection-BFcHLuqk.mjs} +139 -16
  99. package/dist/client/{event-details.client-Pn9Kxh3I.mjs → event-details.client-WHT5GLn2.mjs} +1 -1
  100. package/dist/client/{event-registration.client-BAmBdWXE.mjs → event-registration.client-CmnRKELC.mjs} +11 -11
  101. package/dist/client/{eventCalendar-C5Bh2L8L.mjs → eventCalendar-2NbdCyov.mjs} +4 -4
  102. package/dist/client/{eventCombined-dELKxxIe.mjs → eventCombined-D1lH1n2T.mjs} +4 -4
  103. package/dist/client/{eventDetails-Do9D_fJ_.mjs → eventDetails-BHvnF2Tw.mjs} +2 -2
  104. package/dist/client/{eventListing-B2HTUWLq.mjs → eventListing-EhSDk4UL.mjs} +4 -4
  105. package/dist/client/{eventRegistration-ByOJnqGc.mjs → eventRegistration-z_0jN_KS.mjs} +4 -4
  106. package/dist/client/{form-DX70QG-J.mjs → form-BfChzSkS.mjs} +3 -3
  107. package/dist/client/{form.client-CJoqBrS6.mjs → form.client-D1zehtPk.mjs} +4 -4
  108. package/dist/client/{form.parts-DTof9pL3.mjs → form.parts-rMDlUQIv.mjs} +3 -3
  109. package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-ymSVT9Y5.mjs} +1 -1
  110. package/dist/client/gifting/client.mjs +3 -3
  111. package/dist/client/{headerSection-CJuPX_1K.mjs → headerSection-BX9bQ84k.mjs} +2 -2
  112. package/dist/client/{newsletter-form.client-CqzNjOft.mjs → newsletter-form.client-DMbuJCtJ.mjs} +5 -5
  113. package/dist/client/{newsletter-form.parts-DjJsFms2.mjs → newsletter-form.parts-BxrVsoI0.mjs} +2 -2
  114. package/dist/client/{newsletterForm-D1MHoPbh.mjs → newsletterForm-B_I3FJFS.mjs} +3 -3
  115. package/dist/client/{noop-poI1m2yW.mjs → noop-CamIX2yK.mjs} +17 -1
  116. package/dist/client/portal/client.mjs +231 -117
  117. package/dist/client/{product-detail.client-DOQ7El1d.mjs → product-detail.client-qxuiYCof.mjs} +1 -1
  118. package/dist/client/{product-list.client-CmxOZbzL.mjs → product-list.client-CDL-jihv.mjs} +1 -1
  119. package/dist/client/{productDetail-BN3zv5sa.mjs → productDetail-B97m0uZy.mjs} +3 -3
  120. package/dist/client/{productList-GN_Id4bF.mjs → productList-DE4vSSG_.mjs} +3 -3
  121. package/dist/client/{propsDecoder-BdmzM3D5.mjs → propsDecoder-BTde6Syh.mjs} +3 -3
  122. package/dist/client/{registry.server-BOyra8CA.mjs → registry.server-Cn8XjRte.mjs} +1464 -1183
  123. package/dist/client/rendering/client.mjs +27 -27
  124. package/dist/client/rendering/islands.mjs +1 -1
  125. package/dist/client/rendering.mjs +22 -16
  126. package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-Bcl3vTb4.mjs} +1 -1
  127. package/dist/client/{routeIslandApiConfig-DnaJ8PQc.mjs → routeIslandApiConfig-BjRoLoMD.mjs} +1 -1
  128. package/dist/client/{runtimeResponse-BN8PoIVp.mjs → runtimeResponse-B-lrAGhX.mjs} +1 -1
  129. package/dist/client/{runtimeResponse-B1-cyLXt.mjs → runtimeResponse-CPcA8xSm.mjs} +1 -1
  130. package/dist/client/{shop-LjBLDBqF.mjs → shop-BC4H0oYT.mjs} +3 -3
  131. package/dist/client/{shop-commerce-B8aZTdRJ.mjs → shop-commerce-BsY7a71m.mjs} +12 -12
  132. package/dist/client/{shop-commerce-store-C1FtHYl7.mjs → shop-commerce-store-BZ5j90HD.mjs} +1 -1
  133. package/dist/client/{shop.client-D0qZ3KZp.mjs → shop.client-WgGVGelc.mjs} +12 -12
  134. package/dist/client/{shop.interactive-DAKyWK1B.mjs → shop.interactive-Bb67gPLL.mjs} +187 -81
  135. package/dist/client/{shopShared-CztcSe9i.mjs → shopShared-BE6TEk2A.mjs} +2 -2
  136. package/dist/client/spam-protection.mjs +1 -1
  137. package/dist/client/{timetableModel-D1jDTbms.mjs → timetableModel-Bbz_ECL5.mjs} +10 -10
  138. package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
  139. package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-CdP14E_b.mjs} +2 -2
  140. package/dist/client/{useDiscountApply-CHGYDxdM.mjs → useDiscountApply-DvOSso2l.mjs} +1 -1
  141. package/dist/client/{useDiscountCodeUi-Dew9UAEy.mjs → useDiscountCodeUi-B4fRd2jy.mjs} +1 -1
  142. package/dist/client/{useEventPagination-BpC7-ksE.mjs → useEventPagination-M3jC8lgP.mjs} +6 -6
  143. package/dist/client/{view-BxeiAL3c.mjs → view-B0TFnP4y.mjs} +198 -60
  144. package/dist/client/{view-ShYH3WXh.mjs → view-DNNNbnNj.mjs} +3 -3
  145. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
  146. package/dist/preview-next/client/{LocationPickerEnvironment-lW2aLGWd.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
  147. package/dist/preview-next/client/{MapLibreEditMap-C9InQJpd.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
  148. package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs} +320 -395
  149. package/dist/preview-next/client/{PreviewEditorSidebar-BEEWzXnU.mjs → PreviewEditorSidebar-CjOIZlUk.mjs} +761 -416
  150. package/dist/preview-next/client/{PreviewEditorUI-C86Out4V.mjs → PreviewEditorUI--kS9Cwsc.mjs} +126 -137
  151. package/dist/preview-next/client/PreviewLayoutContext-Dy0LwcHc.mjs +26 -0
  152. package/dist/preview-next/client/PreviewQueryProvider-BgIucg_5.mjs +21 -0
  153. package/dist/preview-next/client/{PreviewShell-CBWYjBvQ.mjs → PreviewShell-Bi8-rclb.mjs} +312 -63
  154. package/dist/preview-next/client/{SdkPreviewModeRuntime-o-mVqWLx.mjs → SdkPreviewModeRuntime-CWTUw-3L.mjs} +308 -135
  155. package/dist/preview-next/client/{SiteChromeCustomizeButton-H_ciMNHA.mjs → SiteChromeCustomizeButton-CrgS3I8d.mjs} +1936 -320
  156. package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
  157. package/dist/preview-next/client/{lucide-react-DygTyy7K.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
  158. package/dist/preview-next/client/{previewAssistantSlot-CuOcsG_N.mjs → previewAssistantSlot-Caofnr1Z.mjs} +23441 -21340
  159. package/dist/preview-next/client/{previewChromeRoot-DPeV7KaP.mjs → previewChromeRoot-CbAI_jSH.mjs} +1 -1
  160. package/dist/preview-next/client/runtime.mjs +5 -4
  161. package/dist/preview-next/client/sdk-runtime-DY65_hLk.mjs +6 -0
  162. package/dist/preview-next/client/{useAutosaveStatus-DNA1Q4L1.mjs → useAutosaveStatus-CakNU3lp.mjs} +2 -2
  163. package/dist/preview-next/client/{useOpenBlockForSetup-BdnMlHC6.mjs → useOpenBlockForSetup-CCEMkosU.mjs} +126 -11
  164. package/dist/preview-next/container-responsive.css +215 -4
  165. package/dist/preview-next/editor-base.css +14 -4
  166. package/dist/preview-next/keepAlive.mjs +1 -1
  167. package/dist/preview-next/middleware.mjs +1 -1
  168. package/dist/preview-next/{route-contract-CtSgU8UZ.mjs → route-contract-DsKDQoVW.mjs} +147 -2
  169. package/dist/server/{Block.shared-ifgaBglp.mjs → Block.shared-D7Qy9F4a.mjs} +4 -4
  170. package/dist/server/{ThemeScopeCore-DGDOH6OU.mjs → ThemeScopeCore-D1NTXZdX.mjs} +15 -10
  171. package/dist/server/{accessibleSurfaces-BuPNCWAK.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
  172. package/dist/server/{bindings-CiYpie1M.mjs → bindings-Bp6OnR3n.mjs} +109 -20
  173. package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
  174. package/dist/server/{client-ngWuFsmN.mjs → client-dROAfMRa.mjs} +149 -4
  175. package/dist/server/config-template-validation.mjs +3 -0
  176. package/dist/server/config-validation.mjs +1 -1
  177. package/dist/server/config.mjs +2 -2
  178. package/dist/server/data/resolveBlockData.mjs +1 -1
  179. package/dist/server/index.mjs +3 -3
  180. package/dist/server/{loadContent-DeLQeJAZ.mjs → loadContent-zOIrtqz-.mjs} +19 -14
  181. package/dist/server/{loadPage-D4J747FQ.mjs → loadPage-vwFiq1Rk.mjs} +2 -2
  182. package/dist/server/next.mjs +6 -6
  183. package/dist/server/{opaqueSurface-ukEz1BaM.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
  184. package/dist/server/{overrideResolution-DSuVkpqm.mjs → overrideResolution-DjboggbB.mjs} +1 -1
  185. package/dist/server/page-converter.mjs +1 -1
  186. package/dist/server/{pageRenderPlan-DFv3h4Ib.mjs → pageRenderPlan-BR4t1rOw.mjs} +954 -337
  187. package/dist/server/{pageRuntimeSupport-yHaRNWMj.mjs → pageRuntimeSupport-BKo6XVK-.mjs} +3 -2
  188. package/dist/server/{pageShared-CAZD0LcY.mjs → pageShared-BJjptSGp.mjs} +1039 -853
  189. package/dist/server/{parseThemeForPersistence-Dl7LIBJq.mjs → parseThemeForPersistence-B18KDEue.mjs} +2 -2
  190. package/dist/server/{prebuild-BKOCND3b.mjs → prebuild-CntSkZQI.mjs} +1 -1
  191. package/dist/server/prebuild.mjs +1 -1
  192. package/dist/server/{prefetchBlockData-GIoExi8A.mjs → prefetchBlockData-BM9Ds0OQ.mjs} +2 -2
  193. package/dist/server/{registry-BogXzcOD.mjs → registry-wYH0LH5f.mjs} +7269 -4975
  194. package/dist/server/rendering/components/pageShared.mjs +1 -1
  195. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  196. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  197. package/dist/server/rendering/server.mjs +3 -3
  198. package/dist/server/rendering.mjs +7 -7
  199. package/dist/server/{resolveBlockData-CT4YSBve.mjs → resolveBlockData-Bu_p4HxZ.mjs} +2 -2
  200. package/dist/server/{resolveButtonColourStates-DVISOQD9.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +53 -33
  201. package/dist/server/{schema-C92Q8y0-.mjs → schema-BFOqYIMQ.mjs} +2 -1
  202. package/dist/server/server.mjs +3 -3
  203. package/dist/server/theme-bridge.mjs +2 -2
  204. package/dist/server/theme.mjs +2 -2
  205. package/dist/server/{validation-vSBCWU3w.mjs → validation-DAQdPDku.mjs} +4 -4
  206. package/dist/server/{version-Cw5vFmUY.mjs → version-DAB0O3yx.mjs} +1 -1
  207. package/dist/styles/index.css +1260 -15
  208. package/package.json +1 -1
  209. package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
  210. package/dist/preview-next/client/sdk-runtime-zTTFZ4MM.mjs +0 -5
@@ -1,34 +1,34 @@
1
1
  "use client";
2
- import { $t as normalizeEventCategoryIds, D as publicGiftingOffersResponseSchema, Ft as catalogueEventCardProps, Gt as getContainerClass, H as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, Ht as EventQuickFacts, It as listingEventCardProps, J as resolveOfferingsPreviewGroupCta, Jt as eventListWeekDays, K as normalizeOfferingsPreviewItemLimit, Kt as Grid, M as buildEventRegistrationInteractiveIslandProps, O as buildFormInteractiveIslandProps, P as eventRegistrationBlockRuntime, Qt as formatEventPriceDisplay, S as newsletterFormBlockRuntime, T as giftingBlockRuntime, U as buildOfferingsPreviewListing, Vt as MediaNodeServer, Wt as getCardOrientation, X as resolveOfferingsRenderInput, Xt as formatEventPrice, Y as resolveOfferingsPreviewGroups, _ as shopProductPresentation, _n as DEFAULT_MAILING_LIST_TARGETING, _t as recurringScheduleProjectionSchema, a as buildShopInteractiveIslandProps, at as occurrenceContextSchema, b as buildNewsletterFormInteractiveIslandProps, bt as eventListingBlockRuntime, c as checkoutBlockRuntime, ct as buildEventCombinedListingDisplay, d as productDetailBlockRuntime, dt as buildEventCalendarInteractiveIslandProps, en as normalizeEventScheduleScope, fn as splitSiteChromePlacementClasses, ft as buildEventCalendarListingDisplay, h as shopBlockRuntime, hn as parseMailingListPlacementTargeting, i as buildProductListInteractiveIslandProps, in as normalizeEventVenueId, k as formBlockRuntime, ln as staticHeaderChromeRuntime, lt as eventCombinedBlockRuntime, mn as assessMailingListTargeting, mt as eventCalendarBlockRuntime, n as buildCheckoutInteractiveIslandProps, nn as normalizeEventSurfacePresets, o as cartBlockRuntime, p as productListBlockRuntime, q as offeringsListingFor, qt as buildEventListWeek, r as buildProductDetailInteractiveIslandProps, rn as normalizeEventSurfaceScope, st as buildEventCombinedInteractiveIslandProps, t as buildCartInteractiveIslandProps, tn as normalizeEventStaffMemberId, v as publicProductsResponseSchema, w as buildGiftingInteractiveIslandProps, x as newsletterBlockSubmissionMessage, y as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, yt as buildEventListingInteractiveIslandProps } from "./shop.interactive-DAKyWK1B.mjs";
2
+ import { Cn as DEFAULT_MAILING_LIST_TARGETING, D as publicGiftingOffersResponseSchema, Gt as EventQuickFacts, H as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, J as offeringRunLifecycle, Jt as getContainerClass, Lt as catalogueEventCardProps, M as buildEventRegistrationInteractiveIslandProps, O as buildFormInteractiveIslandProps, P as eventRegistrationBlockRuntime, Q as resolveOfferingsRenderInput, Qt as eventWeekGroupingContext, Rt as listingEventCardProps, S as newsletterFormBlockRuntime, St as eventListingBlockRuntime, T as giftingBlockRuntime, U as buildOfferingsPreviewListing, W as groupOfferingRunsByCourse, Wt as MediaNodeServer, X as resolveOfferingsPreviewGroupCta, Xt as buildEventListWeek, Y as offeringsListingFor, Yt as Grid, Z as resolveOfferingsPreviewGroups, Zt as eventListWeekDays, _ as shopProductPresentation, a as buildShopInteractiveIslandProps, an as normalizeEventCategoryIds, b as buildNewsletterFormInteractiveIslandProps, bn as assessMailingListTargeting, c as checkoutBlockRuntime, cn as normalizeEventSurfacePresets, d as productDetailBlockRuntime, dn as resolveEventSelection, dt as eventCombinedBlockRuntime, gt as eventCalendarBlockRuntime, h as shopBlockRuntime, hn as staticHeaderChromeRuntime, i as buildProductListInteractiveIslandProps, in as formatEventStartingPrice, k as formBlockRuntime, ln as normalizeEventSurfaceScope, lt as buildEventCombinedInteractiveIslandProps, mt as buildEventCalendarListingDisplay, n as buildCheckoutInteractiveIslandProps, o as cartBlockRuntime, on as normalizeEventScheduleScope, p as productListBlockRuntime, pt as buildEventCalendarInteractiveIslandProps, q as normalizeOfferingsPreviewItemLimit, qt as getCardOrientation, r as buildProductDetailInteractiveIslandProps, rn as formatEventPriceDisplay, sn as normalizeEventStaffMemberId, st as occurrenceContextSchema, t as buildCartInteractiveIslandProps, tn as formatEventPrice, un as normalizeEventVenueId, ut as buildEventCombinedListingDisplay, v as publicProductsResponseSchema, vn as splitSiteChromePlacementClasses, w as buildGiftingInteractiveIslandProps, x as newsletterBlockSubmissionMessage, xn as parseMailingListPlacementTargeting, xt as buildEventListingInteractiveIslandProps, y as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, yt as recurringScheduleProjectionSchema, zt as CardListContentPart } from "./shop.interactive-Bb67gPLL.mjs";
3
3
  import { f as err, p as ok } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
4
- import { $n as canJoinEventWaitlistOnAnyMode, $o as sanitizeHref, Ao as arrangementSlotNames, Bi as resolveEventRegistrationScopedEvents, Ci as isBlockButtonRole, Cn as ImagePresets, Cs as resolveExactOrFreePriceDisplay, Gi as listItemPresentation, Hn as formatEventCompactDateRail, Ji as lookListPresentationSchemaShape, Jn as formatTime, Ln as eventDateOptions, Nn as resolvePublicMediaUrl, Pn as buildCalendarViewport, Sn as RichText, Vo as cardVariantRoleValues, Wn as formatEventHourLabel, Yn as groupEventsByDate, Zn as resolveRuntimeEventDestination, _n as bookingPresentation, as as orderedLiveRunSessions, dr as buildBookingFormInteractiveIslandProps, es as parseAspectRatioValue, gs as formatBookingPriceDisplay, ir as getEventAvailabilityStatus, is as nextLiveRunSessionStartMs, lr as groupPublicEventsByRun, or as isEventFull, os as resolveWholeSeriesBookingPhase, qi as listLookSlot, qn as formatEventTimeRange, rr as getEventAvailability, ws as resolvePricingOptionsPriceDisplay, xa as compiledRuntimeStyleFieldNames, xi as BLOCK_BUTTON_ROLE_OPTIONS, zi as normalizeEventRegistrationPageSurfaceSubject, zn as formatCalendarTitle } from "./display-Cl6mgSJa.mjs";
5
- import { At as projectPublicLocation, C as normalizeEventCalendarDisplayMode$1, Ft as formatDate, Mt as toLocationCoordinates, Nt as trimmedStringOrNull, O as arrangementModes, Ot as normalizeLocationAddressText, S as isEventCalendarListLayout, _ as eventCalendarListLayoutOptions, at as isDisplayMediaKind, b as isEventCalendarDefaultView, en as resolveBookingBusinessTimeZone, in as toUtcIsoDateTimeString, it as PUBLIC_FILE_FIELD_KINDS, jt as publicLocationSchema, kt as parseLocationValue, nt as runtimeMediaSchema, o as publicMembershipProductCollectionSchema, ot as mediaTypeDiscriminants, p as calendarWindowPageSchema, q as RichTextDocSchema, s as publicPassProductCollectionSchema, v as eventCalendarVariantMeaning, x as isEventCalendarDisplayMode, z as publicEventsArraySchema } from "./noop-poI1m2yW.mjs";
4
+ import { As as resolvePricingOptionsPriceDisplay, Bi as normalizeEventRegistrationPageSurfaceSubject, Cn as ImagePresets, Go as cardVariantRoleValues, Hn as formatEventCompactDateRail, Ji as listLookSlot, Ki as listItemPresentation, Ln as eventDateOptions, Nn as resolvePublicMediaUrl, No as arrangementSlotNames, Pn as buildCalendarViewport, Qn as resolveRuntimeEventDestination, Si as BLOCK_BUTTON_ROLE_OPTIONS, Sn as RichText, Ss as formatBookingPriceDisplay, Vi as resolveEventRegistrationScopedEvents, Wn as formatEventHourLabel, Xn as groupEventsByDate, Yi as lookListPresentationSchemaShape, Yn as formatTime, _n as bookingPresentation, fr as buildBookingFormInteractiveIslandProps, is as parseAspectRatioValue, ks as resolveExactOrFreePriceDisplay, qn as formatEventTimeRange, rs as sanitizeHref, ur as groupPublicEventsByRun, us as resolveWholeSeriesBookingPhase, wa as compiledRuntimeStyleFieldNames, wi as isBlockButtonRole, zn as formatCalendarTitle } from "./display-B5DfNb6A.mjs";
5
+ import { At as parseLocationValue, B as publicEventsArraySchema, C as normalizeEventCalendarDisplayMode$1, It as formatDate, J as RichTextDocSchema, Mt as publicLocationSchema, Nt as toLocationCoordinates, O as arrangementModes, Pt as trimmedStringOrNull, S as isEventCalendarListLayout, _ as eventCalendarListLayoutOptions, an as toUtcIsoDateTimeString, at as PUBLIC_FILE_FIELD_KINDS, b as isEventCalendarDefaultView, jt as projectPublicLocation, kt as normalizeLocationAddressText, o as publicMembershipProductCollectionSchema, ot as isDisplayMediaKind, p as calendarWindowPageSchema, rt as runtimeMediaSchema, s as publicPassProductCollectionSchema, st as mediaTypeDiscriminants, tn as resolveBookingBusinessTimeZone, v as eventCalendarVariantMeaning, w as resolveEventCalendarReadPlan, x as isEventCalendarDisplayMode } from "./noop-CamIX2yK.mjs";
6
6
  import { N as assertNever$1 } from "./creditProducts-BTRX4edc.mjs";
7
7
  import { t as formatEventDuration } from "./duration-Q6_QNgiv.mjs";
8
8
  import { n as selectCategoryView } from "./appointment-service-categories-Cl2pqw-z.mjs";
9
- import { G as rgbColorValue, V as backgroundColorStyle, W as mergeStyles, q as textColorStyle, s as serializeSurfaceTree, z as resolveThemeColorReferenceValue } from "./accessibleSurfaces-Bbn1-jJ8.mjs";
10
- import { a as CalendarRecurringWeek, c as LinkNode, d as LocationMapView, i as buildWeekBoardViewProps, l as RichTextNode, n as WeekBoardView, o as RecurringSchedule, r as buildWeekBoardNavigationState, s as ButtonNode, t as buildTimetableModel, u as TextNode } from "./timetableModel-D1jDTbms.mjs";
9
+ import { B as resolveThemeColorReferenceValue, G as mergeStyles, H as backgroundColorStyle, J as textColorStyle, K as rgbColorValue, s as serializeSurfaceTree } from "./accessibleSurfaces-OsAseM7H.mjs";
10
+ import { a as CalendarRecurringWeek, c as LinkNode, d as LocationMapView, i as buildWeekBoardViewProps, l as RichTextNode, n as WeekBoardView, o as RecurringSchedule, r as buildWeekBoardNavigationState, s as ButtonNode, t as buildTimetableModel, u as TextNode } from "./timetableModel-Bbz_ECL5.mjs";
11
11
  import { d as formatDateKey, h as getWeekCalendarDayTuple, m as getOrderedDayNames } from "./src-xrjaKaCj.mjs";
12
- import { h as SYSTEM_BLOCK_KINDS } from "./types-B0hJldSt.mjs";
13
- import { f as DEFAULT_SECTION_SPACING, o as normalizeBoxStylesBorder, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles, v as asPartialObject } from "./boxStyleClassNames-iLF_3KX9.mjs";
14
- import { S as clsx, _ as FileAudioIcon, a as ThemedDownloadLink, b as MinusIcon, c as isSemanticIconId, d as ChevronDownIcon, f as CircleMinusIcon, g as FileArchiveIcon, i as ThemedButtonLink, l as SpinnerNode, p as CirclePlusIcon, r as ThemedButton, s as getIconComponent, u as ArrowDownIcon, v as FileSpreadsheetIcon, x as PlusIcon, y as FileTextIcon } from "./ThemedButton-BMDHwnM6.mjs";
15
- import { a as deriveEventScheduleSummary, i as eventCardListContent, n as resolveEventDetailsPresentation, o as derivePreviewRunSchedule, t as EventDetailsView } from "./view-BxeiAL3c.mjs";
16
- import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-CsRlU46Y.mjs";
17
- import { n as resolveEventCta, r as resolveEventLinkProps } from "./cta-pzQkBLgS.mjs";
18
- import { i as SvgNode, o as formatEventLocation } from "./MapDrawingSvg-Dy6UMuIw.mjs";
19
- import { n as CardListItems, r as EventItem } from "./EventItem-BnwcoFQN.mjs";
20
- import { c as CalendarDayHeaders, i as CombinedLookFrame, l as buildMonthDay, n as WeekAgendaView, o as MonthLookView, u as resolveMonthSelectedDay } from "./CalendarNavigationChevron-iMWrY6Hz.mjs";
21
- import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-BM7rTVSL.mjs";
12
+ import { h as SYSTEM_BLOCK_KINDS } from "./types-DjWUR_O6.mjs";
13
+ import { f as DEFAULT_SECTION_SPACING, o as normalizeBoxStylesBorder, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles, v as asPartialObject } from "./boxStyleClassNames-B1Z_TGAe.mjs";
14
+ import { S as clsx, _ as FileAudioIcon, a as ThemedDownloadLink, b as MinusIcon, c as isSemanticIconId, d as ChevronDownIcon, f as CircleMinusIcon, g as FileArchiveIcon, i as ThemedButtonLink, l as SpinnerNode, p as CirclePlusIcon, r as ThemedButton, s as getIconComponent, u as ArrowDownIcon, v as FileSpreadsheetIcon, x as PlusIcon, y as FileTextIcon } from "./ThemedButton-DuaYtnvG.mjs";
15
+ import { a as eventCardListContent, c as derivePreviewRunSchedule, d as isBookableEvent, l as formatEventQuickDate, n as resolveEventDetailsPresentation, o as offeringDatesBySeries, s as deriveEventScheduleSummary, t as EventDetailsView, u as selectQuickDateEvents } from "./view-B0TFnP4y.mjs";
16
+ import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-CSCyAaKY.mjs";
17
+ import { n as resolveEventCta, r as resolveEventLinkProps } from "./cta-CNVQHLKs.mjs";
18
+ import { i as SvgNode, o as formatEventLocation } from "./MapDrawingSvg-C7E7Lyfa.mjs";
19
+ import { n as CardListItems, r as EventItem } from "./EventItem-sKBofjiW.mjs";
20
+ import { c as CalendarDayHeaders, i as CombinedLookFrame, l as buildMonthDay, n as WeekAgendaView, o as MonthLookView, u as resolveMonthSelectedDay } from "./CalendarNavigationChevron-CNckKZct.mjs";
21
+ import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-BZ4l_rmT.mjs";
22
22
  import { t as resolveDedicatedBookingHref } from "./bookingRoute-D6DlxYx6.mjs";
23
23
  import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
24
- import { t as BookingPanelArrangement } from "./BookingPanelArrangement-OgftZ9QC.mjs";
24
+ import { t as BookingPanelArrangement } from "./BookingPanelArrangement-DpqnRo-t.mjs";
25
25
  import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
26
26
  import { a as carouselShape, c as getCarouselSlidesToShowCssVars, i as carouselRegionAttributes, l as normalizeSlidesToShow, n as arrangementCarouselSettings, r as carouselContents, t as CarouselSlideContent, u as resolveSlidesToShowMobile } from "./carousel.shared-BFQ3kBEw.mjs";
27
- import { t as coerceRichTextDoc } from "./richText-coerce-CtoGLZ_e.mjs";
28
- import { a as PassPurchaseUnavailable, c as ProductDetailView, d as ShopPurchaseAction, f as VariantSelectView, i as PassCardView, l as ProductGalleryFrameView, n as CheckoutShellView, o as PassesMembershipsSectionView, r as MembershipCardView, s as ProductCardView, t as CartShellView, u as ProductListSectionView } from "./view-ShYH3WXh.mjs";
29
- import { n as EventListWeekNavigation, t as EventListWeekEmptyState } from "./EventListWeekNavigation-DuG6z02f.mjs";
30
- import { n as FormSubmitAction, t as FormFieldGroups } from "./form.parts-DTof9pL3.mjs";
31
- import { a as partitionNewsletterFields, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-DjJsFms2.mjs";
27
+ import { t as coerceRichTextDoc } from "./richText-coerce-Bcl3vTb4.mjs";
28
+ import { a as PassPurchaseUnavailable, c as ProductDetailView, d as ShopPurchaseAction, f as VariantSelectView, i as PassCardView, l as ProductGalleryFrameView, n as CheckoutShellView, o as PassesMembershipsSectionView, r as MembershipCardView, s as ProductCardView, t as CartShellView, u as ProductListSectionView } from "./view-DNNNbnNj.mjs";
29
+ import { n as EventListWeekNavigation, t as EventListWeekEmptyState } from "./EventListWeekNavigation-IAcax47T.mjs";
30
+ import { n as FormSubmitAction, t as FormFieldGroups } from "./form.parts-rMDlUQIv.mjs";
31
+ import { a as partitionNewsletterFields, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-BxrVsoI0.mjs";
32
32
  import React, { forwardRef } from "react";
33
33
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
34
34
  import { z } from "zod";
@@ -1090,7 +1090,8 @@ function createButtonGroup(options = {}) {
1090
1090
  sm: 2
1091
1091
  },
1092
1092
  flattenInRepeater,
1093
- hideLabel: !showGroupLabel
1093
+ hideLabel: !showGroupLabel,
1094
+ intent: "content"
1094
1095
  },
1095
1096
  schema: { fields: [...mainFields, ...iconFields] },
1096
1097
  required: false
@@ -1561,7 +1562,7 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
1561
1562
  contextName: "card"
1562
1563
  }
1563
1564
  };
1564
- const { id = defaults[type].id, label = defaults[type].label, includeBackground = true, renderInHeader, intent } = options;
1565
+ const { id = defaults[type].id, label = defaults[type].label, includeBackground = true, renderInHeader, intent = "style" } = options;
1565
1566
  const contextName = defaults[type].contextName;
1566
1567
  const fields = [];
1567
1568
  if (includeBackground) fields.push(createBackgroundField({
@@ -1724,7 +1725,7 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
1724
1725
  schema: { fields },
1725
1726
  ui: {
1726
1727
  ...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
1727
- ...intent ? { intent } : {},
1728
+ intent,
1728
1729
  modalConfig: {
1729
1730
  buttonLabel: label,
1730
1731
  description: `Configure background, spacing, elevation, and rounded corners for the ${contextName}.`,
@@ -1805,7 +1806,7 @@ function cardStylesField(options = {}) {
1805
1806
  return createBoxStylesFieldWithDepth("card", options);
1806
1807
  }
1807
1808
  function createRoleOnlyCardStylesField(options) {
1808
- const { id = "_cardStyles", label = "Card styles", renderInHeader, intent } = options;
1809
+ const { id = "_cardStyles", label = "Card styles", renderInHeader, intent = "style" } = options;
1809
1810
  return {
1810
1811
  id,
1811
1812
  type: "modal",
@@ -1826,7 +1827,7 @@ function createRoleOnlyCardStylesField(options) {
1826
1827
  }] },
1827
1828
  ui: {
1828
1829
  ...typeof renderInHeader === "boolean" ? { renderInHeader } : {},
1829
- ...intent ? { intent } : {},
1830
+ intent,
1830
1831
  modalConfig: {
1831
1832
  buttonLabel: label,
1832
1833
  description: "Choose the site-style card role.",
@@ -1954,53 +1955,32 @@ const columnsField = (options = [
1954
1955
  label: `${n} columns`
1955
1956
  }))
1956
1957
  });
1957
- //#endregion
1958
- //#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
1959
- /**
1960
- * Whether a public event has a registration path a visitor can take.
1961
- *
1962
- * Lifecycle admission comes from the public booking-availability contract;
1963
- * capacity comes from the shared event-domain helpers so uncapped, fallback,
1964
- * and hybrid attendance-mode cases agree with the registration runtime.
1965
- */
1966
- function isBookableEvent(event) {
1967
- if (!event.requiresRegistration) return false;
1968
- if (event.bookingAvailability.kind !== "open") return false;
1969
- return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
1970
- }
1971
- /**
1972
- * Select the next occurrence-targeted events for a quick-book rail.
1973
- *
1974
- * The API normally returns valid timestamps, but malformed values sort after
1975
- * valid events so one bad record cannot displace an otherwise useful rail.
1976
- * Sorting before deduplication means a duplicate occurrence keeps its earliest
1977
- * deterministic representation.
1978
- */
1979
- function selectQuickDateEvents(events) {
1980
- return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, 4);
1981
- }
1982
- /** Shared ordering and identity selection, independent of booking capacity. */
1983
- function orderedUniqueEventOccurrences(events) {
1984
- const sorted = [...events].sort(compareQuickDateEvents);
1985
- return sorted.filter((event, index) => sorted.findIndex((candidate) => candidate.occurrenceId === event.occurrenceId) === index);
1986
- }
1987
- function formatEventQuickDate(event, style = "legacy") {
1988
- const options = eventDateOptions(event);
1989
- const dateRail = formatEventCompactDateRail(event.startsAt, options, style === "site" ? "as-written" : "capitals");
1990
- return {
1991
- dateTime: event.startsAt,
1992
- label: `${dateRail.weekday} ${dateRail.day} ${dateRail.month}, ${formatTime(event.startsAt, options)}`
1993
- };
1994
- }
1995
- function compareQuickDateEvents(left, right) {
1996
- const startsAtOrder = compareTimestamp(left.startsAt, right.startsAt);
1997
- return startsAtOrder === 0 ? left.occurrenceId.localeCompare(right.occurrenceId) : startsAtOrder;
1998
- }
1999
- function compareTimestamp(left, right) {
2000
- const leftTime = Date.parse(left);
2001
- const rightTime = Date.parse(right);
2002
- return (Number.isNaN(leftTime) ? Number.POSITIVE_INFINITY : leftTime) - (Number.isNaN(rightTime) ? Number.POSITIVE_INFINITY : rightTime);
2003
- }
1958
+ /** New block constructors store Hide; stored-content normalization owns legacy omission. */
1959
+ const eventEmptyBehaviorFields = [{
1960
+ id: "emptyBehavior",
1961
+ type: "select",
1962
+ label: "When there's nothing to show",
1963
+ required: false,
1964
+ multiple: false,
1965
+ defaultValue: "hide",
1966
+ options: [{
1967
+ value: "message",
1968
+ label: "Show a message"
1969
+ }, {
1970
+ value: "hide",
1971
+ label: "Hide this section"
1972
+ }],
1973
+ ui: { intent: "behavior" }
1974
+ }, {
1975
+ ...emptyStateField,
1976
+ ui: {
1977
+ ...emptyStateField.ui,
1978
+ visibleWhen: {
1979
+ field: "emptyBehavior",
1980
+ notEquals: "hide"
1981
+ }
1982
+ }
1983
+ }];
2004
1984
  //#endregion
2005
1985
  //#region ../blocks/src/system/runtime/nodes/events/shared/EventQuickDates.tsx
2006
1986
  /**
@@ -2011,6 +1991,7 @@ function compareTimestamp(left, right) {
2011
1991
  * external events retain their canonical destination and target behaviour.
2012
1992
  */
2013
1993
  function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyle }) {
1994
+ const headingId = React.useId();
2014
1995
  const quickDateEvents = selectQuickDateEvents(events);
2015
1996
  if (quickDateEvents.length === 0) return null;
2016
1997
  return /* @__PURE__ */ jsxs("div", {
@@ -2018,9 +1999,13 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
2018
1999
  "data-event-quick-dates": "true",
2019
2000
  children: [/* @__PURE__ */ jsx("h2", {
2020
2001
  className: "event-quick-dates-heading",
2002
+ id: headingId,
2021
2003
  children: "Next few dates"
2022
2004
  }), /* @__PURE__ */ jsx("div", {
2023
- className: "event-quick-dates-rail rb-overflow-x-auto rb-flex rb-gap-4",
2005
+ className: "event-quick-dates-rail rb-overflow-x-auto",
2006
+ role: "region",
2007
+ "aria-labelledby": headingId,
2008
+ tabIndex: 0,
2024
2009
  children: quickDateEvents.map((event) => /* @__PURE__ */ jsx(EventQuickDateCard, {
2025
2010
  event,
2026
2011
  pathname,
@@ -2061,7 +2046,7 @@ function EventQuickDateCard(props) {
2061
2046
  const { event } = props;
2062
2047
  const { date, bookingLink } = quickDateCardPresentation(props);
2063
2048
  return /* @__PURE__ */ jsxs("article", {
2064
- className: "event-quick-date rb-flex rb-min-w-12rem rb-shrink-0 rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-p-4",
2049
+ className: "event-quick-date rb-flex rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-p-4",
2065
2050
  children: [
2066
2051
  /* @__PURE__ */ jsx("time", {
2067
2052
  className: "event-quick-date-when",
@@ -2282,6 +2267,17 @@ function needsSetup(reason, repair) {
2282
2267
  repair
2283
2268
  };
2284
2269
  }
2270
+ function hiddenByChoice(reason, repair) {
2271
+ return {
2272
+ kind: "Hidden",
2273
+ reason,
2274
+ repair
2275
+ };
2276
+ }
2277
+ /** Visitors don't see a block that needs setting up, or one its editor has chosen to hide for now. */
2278
+ function hiddenFromVisitors(readiness) {
2279
+ return readiness.kind === "NeedsSetup" || readiness.kind === "Hidden";
2280
+ }
2285
2281
  /** One boundary owns runtime stage checking and the resulting phantom proof. */
2286
2282
  function admitReadinessFacts(stage, input) {
2287
2283
  return input.stage === stage ? input.facts : unavailableReadinessFacts();
@@ -2291,6 +2287,7 @@ function unavailableReadinessFacts() {
2291
2287
  mailingList: unavailableReadinessFact,
2292
2288
  testimonials: unavailableReadinessFact,
2293
2289
  team: unavailableReadinessFact,
2290
+ events: /* @__PURE__ */ new Map(),
2294
2291
  forms: /* @__PURE__ */ new Map(),
2295
2292
  products: /* @__PURE__ */ new Map(),
2296
2293
  template: unavailableReadinessFact
@@ -2303,7 +2300,7 @@ function pageTemplateFromEntry(entry) {
2303
2300
  //#region ../blocks/src/system/blocks/readiness.ts
2304
2301
  const newsletterReadiness = {
2305
2302
  needs: ["mailingList"],
2306
- assess: (content, facts, interaction) => {
2303
+ assess: (content, facts, { interaction }) => {
2307
2304
  if (interaction?.kind === "demo") return ready;
2308
2305
  if (facts.mailingList.kind === "Unavailable") return unknownReadiness;
2309
2306
  const targeting = parseMailingListPlacementTargeting(content.targeting ?? { mode: "default" });
@@ -2388,6 +2385,227 @@ const galleryReadiness = {
2388
2385
  function chosenString(value) {
2389
2386
  return typeof value === "string" && value.trim() ? value.trim() : null;
2390
2387
  }
2388
+ /** Absent settings retain the published behavior of existing blocks. */
2389
+ const eventsReadiness = {
2390
+ needs: ["events"],
2391
+ assess: (content, facts, { blockId }) => {
2392
+ if (content.emptyBehavior !== "hide") return ready;
2393
+ const fact = blockId === null ? void 0 : facts.events.get(blockId);
2394
+ if (!fact || fact.kind === "Unavailable") return unknownReadiness;
2395
+ return fact.value ? ready : hiddenByChoice("events_empty", {
2396
+ kind: "field",
2397
+ path: "emptyBehavior"
2398
+ });
2399
+ }
2400
+ };
2401
+ //#endregion
2402
+ //#region ../blocks/src/system/blocks/events/shared/eventScope.ts
2403
+ /** Content fields that narrow a discovery (not hand-picked) event section. */
2404
+ const eventDiscoveryFilterKeys = [
2405
+ "eventSurface",
2406
+ "filterEventPresets",
2407
+ "scheduleScope",
2408
+ "filterCategoryIds",
2409
+ "filterStaffMemberId",
2410
+ "filterVenueId"
2411
+ ];
2412
+ /**
2413
+ * The one owner of an event section's scope. Readiness ("is there anything to
2414
+ * show?") and the render loaders both derive their query from this, so Hide can
2415
+ * never judge a section empty that would display events.
2416
+ */
2417
+ function resolveEventScope(content) {
2418
+ const selection = resolveEventSelection(content.eventSelection, content.selectedEventSeriesIds);
2419
+ if (selection.kind === "selected") return selection;
2420
+ return {
2421
+ kind: "matching",
2422
+ filters: Object.fromEntries(eventDiscoveryFilterKeys.map((key) => [key, content[key]]))
2423
+ };
2424
+ }
2425
+ const discoveryQueryKey = {
2426
+ eventSurface: "eventSurface",
2427
+ filterEventPresets: "eventPresets",
2428
+ scheduleScope: "scheduleScope",
2429
+ filterCategoryIds: "categoryIds",
2430
+ filterStaffMemberId: "staffMemberId",
2431
+ filterVenueId: "venueId"
2432
+ };
2433
+ const eventScopeQueryKeys = ["seriesIds", ...Object.values(discoveryQueryKey)];
2434
+ function scopeCsv(value) {
2435
+ const normalized = (Array.isArray(value) ? value : typeof value === "string" ? value.split(",") : []).filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean);
2436
+ return normalized.length > 0 ? [...new Set(normalized)].join(",") : void 0;
2437
+ }
2438
+ /**
2439
+ * Public event query params for a scope. A selected scope sends only
2440
+ * `seriesIds` (an empty string is an explicitly empty selection, which reads
2441
+ * no rows); discovery sends only the filters that are set.
2442
+ */
2443
+ function eventScopeQuery(scope) {
2444
+ if (scope.kind === "selected") return { seriesIds: scope.seriesIds.join(",") };
2445
+ const query = {};
2446
+ for (const key of eventDiscoveryFilterKeys) {
2447
+ const value = scopeCsv(scope.filters[key]);
2448
+ if (value !== void 0) query[discoveryQueryKey[key]] = value;
2449
+ }
2450
+ return query;
2451
+ }
2452
+ /**
2453
+ * A query value as a loader binding must return it. Binding resolution treats
2454
+ * `""` as absent, which would widen an explicitly empty selection to discovery,
2455
+ * so `seriesIds` travels as an empty list and becomes `seriesIds=` when params
2456
+ * are stringified.
2457
+ */
2458
+ function eventScopeLoaderParam(query, key) {
2459
+ return key === "seriesIds" && query.seriesIds === "" ? [] : query[key];
2460
+ }
2461
+ //#endregion
2462
+ //#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
2463
+ const eventWeekReadScope = {
2464
+ eventSurface: "custom",
2465
+ eventPresets: "class",
2466
+ scheduleScope: "any"
2467
+ };
2468
+ /** The section's event scope comes from resolveEventScope, the same owner readiness uses. */
2469
+ const eventScopeLoaderParams = Object.fromEntries(eventScopeQueryKeys.map((key) => [key, { $bind: {
2470
+ from: "content",
2471
+ transforms: [{
2472
+ id: "events.scopeParam",
2473
+ options: { key }
2474
+ }]
2475
+ } }]));
2476
+ const scopeParams = {
2477
+ siteId: { $bind: { from: "$root.siteId" } },
2478
+ stage: { $bind: {
2479
+ from: "$root.previewStage",
2480
+ fallback: "published"
2481
+ } },
2482
+ ...eventScopeLoaderParams
2483
+ };
2484
+ /** Combined renders two jobs; calendar-only variants never pay for the list seed. */
2485
+ const eventCalendarDataLoaders = {
2486
+ schedule: {
2487
+ endpoint: "listPublicRecurringSchedule",
2488
+ when: { $bind: {
2489
+ from: "content",
2490
+ transforms: [{
2491
+ id: "events.calendarReadEnabled",
2492
+ options: { job: "schedule" }
2493
+ }]
2494
+ } },
2495
+ params: {
2496
+ siteId: scopeParams.siteId,
2497
+ stage: scopeParams.stage,
2498
+ limit: "100",
2499
+ detailLevel: "listing",
2500
+ readProfile: "compact-list",
2501
+ ...eventWeekReadScope
2502
+ },
2503
+ mode: "server"
2504
+ },
2505
+ events: {
2506
+ endpoint: "listPublicEvents",
2507
+ when: { $bind: {
2508
+ from: "content",
2509
+ transforms: [{
2510
+ id: "events.calendarReadEnabled",
2511
+ options: { job: "list" }
2512
+ }]
2513
+ } },
2514
+ params: {
2515
+ ...scopeParams,
2516
+ limit: 100,
2517
+ detailLevel: "listing",
2518
+ readProfile: "listing-card",
2519
+ from: { $bind: {
2520
+ from: "$root",
2521
+ transforms: [{
2522
+ id: "events.calendarListWindow",
2523
+ options: { key: "from" }
2524
+ }]
2525
+ } },
2526
+ to: { $bind: {
2527
+ from: "$root",
2528
+ transforms: [{
2529
+ id: "events.calendarListWindow",
2530
+ options: { key: "to" }
2531
+ }]
2532
+ } }
2533
+ },
2534
+ mode: "server"
2535
+ },
2536
+ calendarWindow: {
2537
+ endpoint: "listPublicEventCalendarWindow",
2538
+ when: { $bind: {
2539
+ from: "content",
2540
+ transforms: [{
2541
+ id: "events.calendarReadEnabled",
2542
+ options: { job: "calendar" }
2543
+ }]
2544
+ } },
2545
+ params: {
2546
+ ...scopeParams,
2547
+ limit: 100,
2548
+ readProfile: { $bind: {
2549
+ from: "content",
2550
+ transforms: [{ id: "events.calendarReadProfile" }]
2551
+ } }
2552
+ },
2553
+ mode: "server"
2554
+ }
2555
+ };
2556
+ //#endregion
2557
+ //#region ../blocks/src/system/blocks/events/eventReadiness.ts
2558
+ const eventReadinessResultSchema = z.union([z.array(z.unknown()), recurringScheduleProjectionSchema]).transform((result) => Array.isArray(result) ? result.length > 0 : result.items.length > 0);
2559
+ const eventReadinessQueryKeys = ["limit", ...eventScopeQueryKeys];
2560
+ function eventReadinessLoaderKey(content) {
2561
+ return resolveEventCalendarReadPlan(content).mode === "week" ? "schedule" : "readinessEvents";
2562
+ }
2563
+ /**
2564
+ * Week uses its existing projected schedule; other modes ignore displayed date
2565
+ * windows but share the render loaders' event scope (see resolveEventScope).
2566
+ */
2567
+ function eventReadinessQuery(content) {
2568
+ if (eventReadinessLoaderKey(content) === "schedule") return {
2569
+ ...eventWeekReadScope,
2570
+ limit: "100"
2571
+ };
2572
+ return {
2573
+ limit: "1",
2574
+ ...eventScopeQuery(resolveEventScope(content))
2575
+ };
2576
+ }
2577
+ /** A one-row existence read shares the public event selection and stage contracts. */
2578
+ const eventReadinessLoader = {
2579
+ endpoint: "listPublicEvents",
2580
+ mode: "server",
2581
+ when: { $bind: {
2582
+ from: "content",
2583
+ transforms: [{ id: "events.readinessEnabled" }]
2584
+ } },
2585
+ params: {
2586
+ siteId: { $bind: { from: "$root.siteId" } },
2587
+ stage: { $bind: {
2588
+ from: "$root.previewStage",
2589
+ fallback: "published"
2590
+ } },
2591
+ detailLevel: "listing",
2592
+ readProfile: "compact-list",
2593
+ ...Object.fromEntries(eventReadinessQueryKeys.map((key) => [key, { $bind: {
2594
+ from: "content",
2595
+ transforms: [{
2596
+ id: "events.readinessParam",
2597
+ options: { key }
2598
+ }]
2599
+ } }]))
2600
+ }
2601
+ };
2602
+ /** Normalizing an existing block must never apply the new-block Hide default. */
2603
+ function normalizeEventEmptyBehavior(content) {
2604
+ return {
2605
+ ...content,
2606
+ emptyBehavior: content.emptyBehavior === "hide" ? "hide" : "message"
2607
+ };
2608
+ }
2391
2609
  //#endregion
2392
2610
  //#region ../blocks/src/system/manifest/augmentManifest.ts
2393
2611
  /**
@@ -2569,6 +2787,8 @@ z.object({
2569
2787
  description: z.string().optional(),
2570
2788
  component: z.string().min(1),
2571
2789
  fields: fieldSchema.array().default([]),
2790
+ /** Visible content paths: omit an entry-bound block only when all are empty. */
2791
+ contentPresence: z.array(z.string().min(1)).min(1).optional(),
2572
2792
  slots: slotSchema.array().default([]),
2573
2793
  styleTokens: styleTokenSchema.optional(),
2574
2794
  behaviours: behaviourSchema.optional(),
@@ -2802,258 +3022,285 @@ function resolveBlockIconRenderValue(value, generatedAssets = /* @__PURE__ */ ne
2802
3022
  }
2803
3023
  }
2804
3024
  //#endregion
2805
- //#region ../blocks/src/system/fragments/types.ts
2806
- const FRAGMENT_ID_PATTERN = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/i;
2807
- const FIELD_ID_PATTERN = /^[a-z][a-zA-Z0-9_-]*$/;
2808
- const dataLoaderSchema = z.object({
2809
- endpoint: z.string().min(1, "Fragment data loader requires an endpoint"),
2810
- params: z.record(z.string(), z.unknown()).default({}),
2811
- requiredParams: z.array(z.string().min(1)).optional(),
2812
- mode: z.enum(["server", "client"]).default("server")
2813
- });
2814
- const fragmentDataSchema = z.object({
2815
- key: z.string().min(1, "Fragment data key is required"),
2816
- loader: dataLoaderSchema.optional()
2817
- });
2818
- const fragmentConfigSchema = z.object({
2819
- id: z.string().min(1, "Fragment id is required").regex(FRAGMENT_ID_PATTERN, "Fragment id must be alphanumeric with optional . _ - separators"),
2820
- title: z.string().optional(),
2821
- description: z.string().optional(),
2822
- category: z.enum([
2823
- "content",
2824
- "media",
2825
- "interactive",
2826
- "layout"
2827
- ]).optional(),
2828
- icon: z.string().optional(),
2829
- fields: fieldSchema.array().default([]),
2830
- layout: z.union([NodeSchema, z.array(NodeSchema)]).transform((value) => Array.isArray(value) ? value : [value]),
2831
- data: fragmentDataSchema.optional()
2832
- });
2833
- var FragmentConfigError = class extends Error {
2834
- constructor(message) {
2835
- super(message);
2836
- this.name = "FragmentConfigError";
3025
+ //#region ../blocks/src/system/fields/cardList.ts
3026
+ /** Knob content is stored normally, edited only through facets and their history. */
3027
+ const cardListKnobFields = [{
3028
+ id: "actionStyle",
3029
+ type: "select",
3030
+ label: "Item actions",
3031
+ required: false,
3032
+ multiple: false,
3033
+ options: [{
3034
+ value: "button",
3035
+ label: "Button"
3036
+ }, {
3037
+ value: "link",
3038
+ label: "Link"
3039
+ }],
3040
+ ui: {
3041
+ intent: "display",
3042
+ hidden: true
2837
3043
  }
2838
- };
2839
- function defineFragment(config) {
2840
- const parsed = fragmentConfigSchema.parse(config);
2841
- const fields = parseFieldDefinitions(parsed.fields);
2842
- validateFieldDefinitions(fields, parsed.id);
2843
- return {
2844
- ...parsed,
2845
- fields: fields.map((field) => cloneFieldDefinition(field)),
2846
- layout: parsed.layout.map((node) => ({ ...node }))
2847
- };
2848
- }
2849
- function scopeFragmentFields(fragment, scope) {
2850
- const normalizedScope = scope.trim();
2851
- if (!normalizedScope) return fragment.fields.map((field) => cloneFieldDefinition(field));
2852
- return fragment.fields.map((field) => prefixFieldId(field, normalizedScope));
2853
- }
2854
- function scopeFragmentLayout(fragment, scope) {
2855
- const normalizedScope = scope.trim();
2856
- return fragment.layout.map((node) => cloneAndScopeNode(node, normalizedScope));
2857
- }
2858
- function validateFieldDefinitions(fields, fragmentId) {
2859
- const seen = /* @__PURE__ */ new Set();
2860
- for (const field of fields) {
2861
- if (field.id.includes(".")) throw new FragmentConfigError(`Field "${field.id}" in fragment "${fragmentId}" should not include dot notation; the builder scopes fields automatically.`);
2862
- if (!FIELD_ID_PATTERN.test(field.id)) throw new FragmentConfigError(`Field "${field.id}" in fragment "${fragmentId}" must start with a letter and contain only alphanumeric, "_", or "-".`);
2863
- if (seen.has(field.id)) throw new FragmentConfigError(`Duplicate field id "${field.id}" found in fragment "${fragmentId}". Field ids must be unique per fragment.`);
2864
- seen.add(field.id);
3044
+ }, {
3045
+ id: "dates",
3046
+ type: "select",
3047
+ label: "Dates",
3048
+ required: false,
3049
+ multiple: false,
3050
+ options: [{
3051
+ value: "summary",
3052
+ label: "Summary"
3053
+ }, {
3054
+ value: "next-dates",
3055
+ label: "Next dates"
3056
+ }],
3057
+ ui: {
3058
+ intent: "display",
3059
+ hidden: true
2865
3060
  }
2866
- }
2867
- function prefixFieldId(field, scope) {
2868
- const cloned = cloneFieldDefinition(field);
2869
- cloned.id = `${scope}.${field.id}`;
2870
- const defaultValue = cloned.defaultValue;
2871
- cloned.defaultValue = cloneUnknown(defaultValue);
2872
- cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
2873
- cloned.ui = cloneUnknown(cloned.ui);
2874
- return cloned;
2875
- }
2876
- function cloneFieldDefinition(field) {
2877
- if (field.type === "repeater") {
2878
- if (field.polymorphic && field.itemTypes) return {
2879
- ...field,
2880
- polymorphic: true,
2881
- itemTypes: Object.fromEntries(Object.entries(field.itemTypes).map(([key, itemType]) => [key, {
2882
- ...itemType,
2883
- fields: itemType.fields.map(cloneFieldDefinition)
2884
- }]))
2885
- };
2886
- if (field.schema) return {
2887
- ...field,
2888
- schema: { fields: field.schema.fields.map(cloneFieldDefinition) }
2889
- };
2890
- return { ...field };
3061
+ }];
3062
+ const cardListPhotoNumberFields = [{
3063
+ id: "showPhotos",
3064
+ type: "boolean",
3065
+ label: "Show photos",
3066
+ required: false,
3067
+ defaultValue: true,
3068
+ ui: {
3069
+ intent: "display",
3070
+ hidden: true
2891
3071
  }
2892
- if (field.type === "group") return {
2893
- ...field,
2894
- schema: { fields: field.schema.fields.map(cloneFieldDefinition) }
2895
- };
2896
- return { ...field };
3072
+ }, {
3073
+ id: "cardMarker",
3074
+ type: "select",
3075
+ label: "Item markers",
3076
+ required: false,
3077
+ multiple: false,
3078
+ options: [{
3079
+ value: "numbers",
3080
+ label: "Numbers"
3081
+ }, {
3082
+ value: "none",
3083
+ label: "None"
3084
+ }],
3085
+ ui: {
3086
+ intent: "display",
3087
+ hidden: true
3088
+ }
3089
+ }];
3090
+ const cardListSectionActionFields = [{
3091
+ id: "sectionActionLabel",
3092
+ type: "text",
3093
+ label: "Section link text",
3094
+ required: false,
3095
+ multiline: false,
3096
+ maxLength: 80
3097
+ }, {
3098
+ id: "sectionActionLink",
3099
+ type: "link",
3100
+ label: "Section link destination",
3101
+ required: false
3102
+ }];
3103
+ /** React list nodes receive only compiler-resolved choices, so dormant preferences stay inert. */
3104
+ const cardListPresentationBindings = {
3105
+ cardArrangement: { $bind: { from: "content._effectiveLook.look.structure.byMode.default" } },
3106
+ lookSlots: { $bind: { from: "content._lookSlots" } },
3107
+ datesMode: { $bind: { from: "content._effectiveKnobs.dates.value" } },
3108
+ itemActionStyle: { $bind: { from: "content._effectiveKnobs.actionStyle.value" } },
3109
+ showPhotos: { $bind: { from: "content.showPhotos" } },
3110
+ cardMarker: { $bind: { from: "content.cardMarker" } },
3111
+ itemRoles: { $bind: { from: "content._effectiveLook.itemRoles" } },
3112
+ surfacePresentation: { $bind: { from: "content._effectiveLook.surfacePresentation" } }
3113
+ };
3114
+ const cardListContentSchema = z.object({
3115
+ dates: z.enum(["summary", "next-dates"]).nullish().catch(void 0),
3116
+ actionStyle: z.enum(["button", "link"]).nullish().catch(void 0),
3117
+ showPhotos: z.boolean().nullish().catch(void 0),
3118
+ cardMarker: z.enum(["numbers", "none"]).nullish().catch(void 0),
3119
+ sectionActionLabel: z.string().nullish().catch(void 0),
3120
+ sectionActionLink: linkSchema.nullish().catch(void 0)
3121
+ });
3122
+ function normalizeCardListContent(record) {
3123
+ return cardListContentSchema.parse(record);
2897
3124
  }
2898
- function cloneUnknown(value) {
2899
- if (value == null || typeof value !== "object") return value;
2900
- if (Array.isArray(value)) return value.map((entry) => cloneUnknown(entry));
2901
- return { ...value };
3125
+ //#endregion
3126
+ //#region ../blocks/src/utils/env.ts
3127
+ /**
3128
+ * Environment detection utilities
3129
+ *
3130
+ * Provides type-safe environment detection without relying on `any`-typed globals.
3131
+ */
3132
+ /**
3133
+ * Check if the current environment is development.
3134
+ *
3135
+ * Returns true if NODE_ENV is not 'production', or if NODE_ENV cannot be determined
3136
+ * (which is the safe default for validation and warnings).
3137
+ *
3138
+ * @returns true if in development mode, false if in production
3139
+ */
3140
+ function isDevEnvironment() {
3141
+ try {
3142
+ if (typeof process !== "undefined" && true) return true;
3143
+ return true;
3144
+ } catch {
3145
+ return true;
3146
+ }
2902
3147
  }
2903
- function cloneAndScopeNode(node, scope) {
2904
- const cloned = { ...node };
2905
- if (node.children) cloned.children = node.children.map((child) => cloneAndScopeNode(child, scope));
2906
- if (node.props) cloned.props = scopePropBindings(node.props, scope);
2907
- if (node.$bind) cloned.$bind = scopeBinding(node.$bind, scope);
2908
- if (node.$repeat) cloned.$repeat = scopeRepeat(node.$repeat, scope);
2909
- if (node.$when) cloned.$when = scopeCondition(node.$when, scope);
2910
- if (node.$scopes) cloned.$scopes = node.$scopes.map((entry) => ({
2911
- name: entry.name,
2912
- from: scopeBinding(entry.from, scope)
2913
- }));
2914
- return cloned;
3148
+ //#endregion
3149
+ //#region ../blocks/src/system/node/types.ts
3150
+ /**
3151
+ * List of reserved keys (for runtime validation).
3152
+ * Kept in sync with the ReservedNodeKeys type above.
3153
+ */
3154
+ const RESERVED_KEYS = [
3155
+ "children",
3156
+ "key",
3157
+ "$bind",
3158
+ "$when",
3159
+ "$repeat",
3160
+ "$scopes"
3161
+ ];
3162
+ /**
3163
+ * Type guard to check if props contain reserved keys at runtime.
3164
+ * Use this in development mode to catch bugs early.
3165
+ *
3166
+ * @param props - Props object to validate
3167
+ * @returns Array of reserved keys found in props, or empty array if none
3168
+ */
3169
+ function findReservedKeysInProps(props) {
3170
+ if (!props) return [];
3171
+ return RESERVED_KEYS.filter((key) => key in props);
2915
3172
  }
2916
- function scopeBinding(binding, scope) {
2917
- const cloned = {
2918
- ...binding,
2919
- transforms: binding.transforms?.map((step) => ({ ...step })) ?? []
2920
- };
2921
- cloned.from = scopeContentPath(binding.from, scope);
2922
- return cloned;
3173
+ /**
3174
+ * Validates that props don't contain reserved keys.
3175
+ * Throws in development, warns in production.
3176
+ *
3177
+ * @param props - Props to validate
3178
+ * @param context - Context for error message (e.g., "el('grid', ...)")
3179
+ */
3180
+ function validateProps(props, context = "node builder") {
3181
+ const reserved = findReservedKeysInProps(props);
3182
+ if (reserved.length === 0) return;
3183
+ const message = `[blocks:${context}] Reserved keys found in props: ${reserved.join(", ")}. These should be passed as separate parameters or modifiers, not in props. For example, 'children' should be the 3rd parameter to el(), not in the props object.`;
3184
+ if (isDevEnvironment()) throw new TypeError(message);
3185
+ else console.error(message);
2923
3186
  }
2924
- function scopeRepeat(repeat, scope) {
2925
- const cloned = {
2926
- ...repeat,
2927
- collection: scopeBinding(repeat.collection, scope)
2928
- };
2929
- if (repeat.sortBy) cloned.sortBy = {
2930
- ...repeat.sortBy,
2931
- path: scopeContentPath(repeat.sortBy.path, scope)
2932
- };
2933
- return cloned;
3187
+ //#endregion
3188
+ //#region ../blocks/src/system/node/builder.ts
3189
+ function normalizeChildren(children) {
3190
+ if (!children) return void 0;
3191
+ const flat = children.flat().filter(Boolean);
3192
+ return flat.length > 0 ? flat : void 0;
2934
3193
  }
2935
- function scopeCondition(condition, scope) {
2936
- return {
2937
- ...condition,
2938
- when: scopeBinding(condition.when, scope)
3194
+ function el(type, props, children, ...mods) {
3195
+ validateProps(props, `el('${type}', ...)`);
3196
+ const node = {
3197
+ type,
3198
+ ...props && Object.keys(props).length > 0 ? { props } : {},
3199
+ ...children && children.length ? { children: normalizeChildren(children) } : {}
2939
3200
  };
3201
+ if (mods && mods.length > 0) {
3202
+ const validMods = mods.filter((mod) => typeof mod === "function");
3203
+ if (validMods.length > 0) return devValidate(validMods.reduce((acc, fn) => fn(acc), node));
3204
+ }
3205
+ return devValidate(node);
2940
3206
  }
2941
- function scopePropBindings(input, scope) {
2942
- const result = {};
2943
- for (const [key, value] of Object.entries(input)) result[key] = scopePropValue(value, scope);
2944
- return result;
2945
- }
2946
- function scopePropValue(value, scope) {
2947
- if (Array.isArray(value)) return value.map((entry) => scopePropValue(entry, scope));
2948
- if (value && typeof value === "object") {
2949
- if ("$bind" in value) {
2950
- const bindingConfig = value.$bind;
2951
- return { $bind: scopeBinding(bindingConfig, scope) };
3207
+ const section = (props, children, ...mods) => el("section", props, children, ...mods);
3208
+ const headerSection = (props, children, ...mods) => el("headerSection", props, children, ...mods);
3209
+ const stack = (props, children, ...mods) => el("stack", props, children, ...mods);
3210
+ const inline = (props, children, ...mods) => el("inline", props, children, ...mods);
3211
+ const accordion = (props, children, ...mods) => el("accordion", props, children, ...mods);
3212
+ const accordionItem = (props, children, ...mods) => el("accordionItem", props, children, ...mods);
3213
+ const carousel = (props, children, ...mods) => el("carousel", {
3214
+ mode: "legacy",
3215
+ ...props
3216
+ }, children, ...mods);
3217
+ const text = (props, ...mods) => el("text", props, void 0, ...mods);
3218
+ const richText = (props, ...mods) => el("richText", props, void 0, ...mods);
3219
+ const icon = (props, ...mods) => el("icon", props, void 0, ...mods);
3220
+ const media = (props, ...mods) => el("media", props, void 0, ...mods);
3221
+ const fileDownload = (props, ...mods) => el("file-download", props, void 0, ...mods);
3222
+ const videoEmbed = (props, ...mods) => el("videoEmbed", props, void 0, ...mods);
3223
+ const button = (props, children, ...mods) => el("button", props, children, ...mods);
3224
+ const link = (props, children, ...mods) => el("link", props, children, ...mods);
3225
+ const form = (props, children, ...mods) => el("form", props, children, ...mods);
3226
+ const bookingForm = (props, children, ...mods) => el("booking-form", props, children, ...mods);
3227
+ const eventRegistration = (props, children, ...mods) => el("event-registration", props, children, ...mods);
3228
+ const shop = (props, children, ...mods) => el("shop", props, children, ...mods);
3229
+ const productList = (props, children, ...mods) => el("product-list", props, children, ...mods);
3230
+ const productDetail = (props, children, ...mods) => el("product-detail", props, children, ...mods);
3231
+ const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
3232
+ const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
3233
+ const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
3234
+ function bind(from, options) {
3235
+ return (node) => ({
3236
+ ...node,
3237
+ $bind: {
3238
+ from,
3239
+ ...options?.fallback !== void 0 ? { fallback: options.fallback } : {},
3240
+ ...options?.transforms ? { transforms: options.transforms } : {},
3241
+ ...options?.pick ? { pick: options.pick } : {},
3242
+ ...options?.coerce ? { coerce: options.coerce } : {}
2952
3243
  }
2953
- const result = {};
2954
- for (const [key, entry] of Object.entries(value)) result[key] = scopePropValue(entry, scope);
2955
- return result;
2956
- }
2957
- return value;
3244
+ });
2958
3245
  }
2959
- function scopeContentPath(path, scope) {
2960
- if (!scope || scope.length === 0) return path;
2961
- if (path === "content") return `content.${scope}`;
2962
- if (path.startsWith("content.")) {
2963
- const remainder = path.slice(8);
2964
- return remainder.length > 0 ? `content.${scope}.${remainder}` : `content.${scope}`;
2965
- }
2966
- if (path.startsWith("content[")) return path.replace(/^content/, `content.${scope}`);
2967
- if (path.startsWith("$root.")) return path;
2968
- if (path.includes(".")) return path;
2969
- return `content.${scope}.${path}`;
2970
- }
2971
- //#endregion
2972
- //#region ../blocks/src/system/fragments/builder.ts
2973
- var FragmentCompositionError = class extends Error {
2974
- constructor(message) {
2975
- super(message);
2976
- this.name = "FragmentCompositionError";
2977
- }
2978
- };
2979
- const DOT_SCOPE_REGEX = /^[A-Za-z0-9_.-]*$/;
2980
- function materializeFragment(config) {
2981
- const scope = normalizeScope(config.scope);
2982
- const fields = scopeFragmentFields(config.fragment, scope);
2983
- const layout = scopeFragmentLayout(config.fragment, scope);
2984
- const fieldPriority = config.fieldPriority ?? 0;
2985
- let data;
2986
- if (config.fragment.data) {
2987
- const key = config.dataKey ?? config.fragment.data.key;
2988
- if (!key || typeof key !== "string") throw new FragmentCompositionError(`Fragment "${config.fragment.id}" requires a data key to compose.`);
2989
- data = {
2990
- key,
2991
- loader: config.fragment.data.loader ? { ...config.fragment.data.loader } : void 0
2992
- };
2993
- }
2994
- return {
2995
- fragment: config.fragment,
2996
- scope,
2997
- fields,
2998
- layout,
2999
- data,
3000
- fieldPriority
3001
- };
3246
+ function when(path, options) {
3247
+ return (node) => ({
3248
+ ...node,
3249
+ $when: {
3250
+ when: { from: path },
3251
+ ...options?.equals !== void 0 ? { equals: options.equals } : {},
3252
+ ...options?.not ? { not: true } : {},
3253
+ ...options?.authoringPresence ? { authoringPresence: options.authoringPresence } : {}
3254
+ }
3255
+ });
3002
3256
  }
3003
- function composeFragments(instances) {
3004
- const fieldEntries = [];
3005
- const layouts = [];
3006
- const dataEntries = [];
3007
- const scopes = [];
3008
- const seenFieldIds = /* @__PURE__ */ new Set();
3009
- let fieldOrder = 0;
3010
- for (const instance of instances) {
3011
- const materialized = materializeFragment(instance);
3012
- for (const field of materialized.fields) {
3013
- if (seenFieldIds.has(field.id)) throw new FragmentCompositionError(`Duplicate field id "${field.id}" when composing fragments.`);
3014
- seenFieldIds.add(field.id);
3015
- fieldEntries.push({
3016
- id: field.id,
3017
- field,
3018
- priority: materialized.fieldPriority,
3019
- order: fieldOrder++
3020
- });
3257
+ function repeat(collectionPath, itemName = "item", options) {
3258
+ return (node) => ({
3259
+ ...node,
3260
+ $repeat: {
3261
+ collection: {
3262
+ from: collectionPath,
3263
+ pick: "collection"
3264
+ },
3265
+ itemName,
3266
+ ...options?.indexName ? { indexName: options.indexName } : {},
3267
+ ...options?.limit ? { limit: options.limit } : {},
3268
+ ...options?.sortBy ? { sortBy: {
3269
+ path: options.sortBy.path,
3270
+ direction: options.sortBy.direction ?? "asc"
3271
+ } } : {}
3021
3272
  }
3022
- scopes.push(materialized.scope);
3023
- layouts.push(...materialized.layout);
3024
- if (materialized.data) {
3025
- if (dataEntries.find((entry) => entry.key === materialized.data?.key)) throw new FragmentCompositionError(`Duplicate fragment data key "${materialized.data.key}" detected.`);
3026
- dataEntries.push(materialized.data);
3273
+ });
3274
+ }
3275
+ function props(extra) {
3276
+ validateProps(extra, "props() modifier");
3277
+ return (node) => ({
3278
+ ...node,
3279
+ props: {
3280
+ ...node.props ?? {},
3281
+ ...extra
3027
3282
  }
3028
- }
3029
- return {
3030
- fields: fieldEntries.sort((a, b) => {
3031
- if (a.priority !== b.priority) return a.priority - b.priority;
3032
- return a.order - b.order;
3033
- }).map((entry) => entry.field),
3034
- layout: layouts,
3035
- data: dataEntries,
3036
- scopes
3037
- };
3283
+ });
3038
3284
  }
3039
- function normalizeScope(scope) {
3040
- if (!scope) return "";
3041
- const trimmed = scope.trim();
3042
- if (!DOT_SCOPE_REGEX.test(trimmed)) throw new FragmentCompositionError(`Fragment scope "${scope}" contains invalid characters. Use alphanumeric, ".", "-", or "_".`);
3043
- return trimmed;
3285
+ function accordionList({ collection, itemName = "item", indexName, accordionProps = null, itemProps = null, triggerFrom, contentFrom, valueFrom }, ...mods) {
3286
+ const resolvedIndexName = indexName ?? `${itemName}Index`;
3287
+ const resolvedValuePath = valueFrom === null ? null : valueFrom ?? resolvedIndexName;
3288
+ const baseItemProps = {
3289
+ ...itemProps ?? {},
3290
+ trigger: { $bind: { from: triggerFrom } }
3291
+ };
3292
+ if (contentFrom) baseItemProps.content = { $bind: { from: contentFrom } };
3293
+ if (resolvedValuePath) baseItemProps.value = { $bind: { from: resolvedValuePath } };
3294
+ return accordion(accordionProps ?? void 0, [accordionItem(baseItemProps, void 0, repeat(collection, itemName, { indexName: resolvedIndexName }))], ...mods);
3044
3295
  }
3045
- function buildFragmentDataLoaders(composition) {
3046
- const loaders = {};
3047
- for (const entry of composition.data) {
3048
- if (!entry?.loader) continue;
3049
- loaders[entry.key] = {
3050
- endpoint: entry.loader.endpoint,
3051
- params: { ...entry.loader.params ?? {} },
3052
- ...entry.loader.requiredParams ? { requiredParams: [...entry.loader.requiredParams] } : {},
3053
- mode: entry.loader.mode ?? "server"
3054
- };
3055
- }
3056
- return loaders;
3296
+ function devValidate(node) {
3297
+ try {
3298
+ if (isDevEnvironment()) {
3299
+ const res = z.safeParse(NodeSchema, node);
3300
+ if (!res.success) console.warn("[blocks:builder] Invalid node produced by builder", res.error.format());
3301
+ }
3302
+ } catch {}
3303
+ return node;
3057
3304
  }
3058
3305
  //#endregion
3059
3306
  //#region ../blocks/src/system/customize/testimonialCount.ts
@@ -3096,225 +3343,312 @@ const lookCarouselRegionTransform = {
3096
3343
  run: (value, options) => typeof value === "string" && value.trim() ? value.trim() : options?.fallback ?? "Carousel"
3097
3344
  };
3098
3345
  //#endregion
3099
- //#region ../blocks/src/utils/env.ts
3100
- /**
3101
- * Environment detection utilities
3102
- *
3103
- * Provides type-safe environment detection without relying on `any`-typed globals.
3104
- */
3105
- /**
3106
- * Check if the current environment is development.
3107
- *
3108
- * Returns true if NODE_ENV is not 'production', or if NODE_ENV cannot be determined
3109
- * (which is the safe default for validation and warnings).
3110
- *
3111
- * @returns true if in development mode, false if in production
3112
- */
3113
- function isDevEnvironment() {
3114
- try {
3115
- if (typeof process !== "undefined" && true) return true;
3116
- return true;
3117
- } catch {
3118
- return true;
3119
- }
3346
+ //#region ../blocks/src/system/node/fragments/cardListSectionAction.ts
3347
+ function cardListSectionAction(labelPath = "content.sectionActionLabel", linkPath = "content.sectionActionLink") {
3348
+ return link({
3349
+ ...lookSlot("more"),
3350
+ className: "rb-item-text-link",
3351
+ linkRequired: true,
3352
+ href: { $bind: {
3353
+ from: linkPath,
3354
+ transforms: [{ id: "links.resolve" }]
3355
+ } }
3356
+ }, [text({ as: "span" }, bind(labelPath))], when(labelPath));
3120
3357
  }
3121
3358
  //#endregion
3122
- //#region ../blocks/src/system/node/types.ts
3123
- /**
3124
- * List of reserved keys (for runtime validation).
3125
- * Kept in sync with the ReservedNodeKeys type above.
3126
- */
3127
- const RESERVED_KEYS = [
3128
- "children",
3129
- "key",
3130
- "$bind",
3131
- "$when",
3132
- "$repeat",
3133
- "$scopes"
3134
- ];
3135
- /**
3136
- * Type guard to check if props contain reserved keys at runtime.
3137
- * Use this in development mode to catch bugs early.
3138
- *
3139
- * @param props - Props object to validate
3140
- * @returns Array of reserved keys found in props, or empty array if none
3141
- */
3142
- function findReservedKeysInProps(props) {
3143
- if (!props) return [];
3144
- return RESERVED_KEYS.filter((key) => key in props);
3145
- }
3146
- /**
3147
- * Validates that props don't contain reserved keys.
3148
- * Throws in development, warns in production.
3149
- *
3150
- * @param props - Props to validate
3151
- * @param context - Context for error message (e.g., "el('grid', ...)")
3152
- */
3153
- function validateProps(props, context = "node builder") {
3154
- const reserved = findReservedKeysInProps(props);
3155
- if (reserved.length === 0) return;
3156
- const message = `[blocks:${context}] Reserved keys found in props: ${reserved.join(", ")}. These should be passed as separate parameters or modifiers, not in props. For example, 'children' should be the 3rd parameter to el(), not in the props object.`;
3157
- if (isDevEnvironment()) throw new TypeError(message);
3158
- else console.error(message);
3359
+ //#region ../blocks/src/system/fragments/types.ts
3360
+ const FRAGMENT_ID_PATTERN = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/i;
3361
+ const FIELD_ID_PATTERN = /^[a-z][a-zA-Z0-9_-]*$/;
3362
+ const dataLoaderSchema = z.object({
3363
+ endpoint: z.string().min(1, "Fragment data loader requires an endpoint"),
3364
+ params: z.record(z.string(), z.unknown()).default({}),
3365
+ requiredParams: z.array(z.string().min(1)).optional(),
3366
+ mode: z.enum(["server", "client"]).default("server")
3367
+ });
3368
+ const fragmentDataSchema = z.object({
3369
+ key: z.string().min(1, "Fragment data key is required"),
3370
+ loader: dataLoaderSchema.optional()
3371
+ });
3372
+ const fragmentConfigSchema = z.object({
3373
+ id: z.string().min(1, "Fragment id is required").regex(FRAGMENT_ID_PATTERN, "Fragment id must be alphanumeric with optional . _ - separators"),
3374
+ title: z.string().optional(),
3375
+ description: z.string().optional(),
3376
+ category: z.enum([
3377
+ "content",
3378
+ "media",
3379
+ "interactive",
3380
+ "layout"
3381
+ ]).optional(),
3382
+ icon: z.string().optional(),
3383
+ fields: fieldSchema.array().default([]),
3384
+ layout: z.union([NodeSchema, z.array(NodeSchema)]).transform((value) => Array.isArray(value) ? value : [value]),
3385
+ data: fragmentDataSchema.optional()
3386
+ });
3387
+ var FragmentConfigError = class extends Error {
3388
+ constructor(message) {
3389
+ super(message);
3390
+ this.name = "FragmentConfigError";
3391
+ }
3392
+ };
3393
+ function defineFragment(config) {
3394
+ const parsed = fragmentConfigSchema.parse(config);
3395
+ const fields = parseFieldDefinitions(parsed.fields);
3396
+ validateFieldDefinitions(fields, parsed.id);
3397
+ return {
3398
+ ...parsed,
3399
+ fields: fields.map((field) => cloneFieldDefinition(field)),
3400
+ layout: parsed.layout.map((node) => ({ ...node }))
3401
+ };
3159
3402
  }
3160
- //#endregion
3161
- //#region ../blocks/src/system/node/builder.ts
3162
- function normalizeChildren(children) {
3163
- if (!children) return void 0;
3164
- const flat = children.flat().filter(Boolean);
3165
- return flat.length > 0 ? flat : void 0;
3403
+ function scopeFragmentFields(fragment, scope) {
3404
+ const normalizedScope = scope.trim();
3405
+ if (!normalizedScope) return fragment.fields.map((field) => cloneFieldDefinition(field));
3406
+ return fragment.fields.map((field) => prefixFieldId(field, normalizedScope));
3166
3407
  }
3167
- function el(type, props, children, ...mods) {
3168
- validateProps(props, `el('${type}', ...)`);
3169
- const node = {
3170
- type,
3171
- ...props && Object.keys(props).length > 0 ? { props } : {},
3172
- ...children && children.length ? { children: normalizeChildren(children) } : {}
3173
- };
3174
- if (mods && mods.length > 0) {
3175
- const validMods = mods.filter((mod) => typeof mod === "function");
3176
- if (validMods.length > 0) return devValidate(validMods.reduce((acc, fn) => fn(acc), node));
3408
+ function scopeFragmentLayout(fragment, scope) {
3409
+ const normalizedScope = scope.trim();
3410
+ return fragment.layout.map((node) => cloneAndScopeNode(node, normalizedScope));
3411
+ }
3412
+ function validateFieldDefinitions(fields, fragmentId) {
3413
+ const seen = /* @__PURE__ */ new Set();
3414
+ for (const field of fields) {
3415
+ if (field.id.includes(".")) throw new FragmentConfigError(`Field "${field.id}" in fragment "${fragmentId}" should not include dot notation; the builder scopes fields automatically.`);
3416
+ if (!FIELD_ID_PATTERN.test(field.id)) throw new FragmentConfigError(`Field "${field.id}" in fragment "${fragmentId}" must start with a letter and contain only alphanumeric, "_", or "-".`);
3417
+ if (seen.has(field.id)) throw new FragmentConfigError(`Duplicate field id "${field.id}" found in fragment "${fragmentId}". Field ids must be unique per fragment.`);
3418
+ seen.add(field.id);
3177
3419
  }
3178
- return devValidate(node);
3179
3420
  }
3180
- const section = (props, children, ...mods) => el("section", props, children, ...mods);
3181
- const headerSection = (props, children, ...mods) => el("headerSection", props, children, ...mods);
3182
- const stack = (props, children, ...mods) => el("stack", props, children, ...mods);
3183
- const inline = (props, children, ...mods) => el("inline", props, children, ...mods);
3184
- const accordion = (props, children, ...mods) => el("accordion", props, children, ...mods);
3185
- const accordionItem = (props, children, ...mods) => el("accordionItem", props, children, ...mods);
3186
- const carousel = (props, children, ...mods) => el("carousel", {
3187
- mode: "legacy",
3188
- ...props
3189
- }, children, ...mods);
3190
- const text = (props, ...mods) => el("text", props, void 0, ...mods);
3191
- const richText = (props, ...mods) => el("richText", props, void 0, ...mods);
3192
- const icon = (props, ...mods) => el("icon", props, void 0, ...mods);
3193
- const media = (props, ...mods) => el("media", props, void 0, ...mods);
3194
- const fileDownload = (props, ...mods) => el("file-download", props, void 0, ...mods);
3195
- const videoEmbed = (props, ...mods) => el("videoEmbed", props, void 0, ...mods);
3196
- const button = (props, children, ...mods) => el("button", props, children, ...mods);
3197
- const link = (props, children, ...mods) => el("link", props, children, ...mods);
3198
- const form = (props, children, ...mods) => el("form", props, children, ...mods);
3199
- const bookingForm = (props, children, ...mods) => el("booking-form", props, children, ...mods);
3200
- const eventRegistration = (props, children, ...mods) => el("event-registration", props, children, ...mods);
3201
- const shop = (props, children, ...mods) => el("shop", props, children, ...mods);
3202
- const productList = (props, children, ...mods) => el("product-list", props, children, ...mods);
3203
- const productDetail = (props, children, ...mods) => el("product-detail", props, children, ...mods);
3204
- const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
3205
- const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
3206
- const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
3207
- function bind(from, options) {
3208
- return (node) => ({
3209
- ...node,
3210
- $bind: {
3211
- from,
3212
- ...options?.fallback !== void 0 ? { fallback: options.fallback } : {},
3213
- ...options?.transforms ? { transforms: options.transforms } : {},
3214
- ...options?.pick ? { pick: options.pick } : {},
3215
- ...options?.coerce ? { coerce: options.coerce } : {}
3216
- }
3217
- });
3421
+ function prefixFieldId(field, scope) {
3422
+ const cloned = cloneFieldDefinition(field);
3423
+ cloned.id = `${scope}.${field.id}`;
3424
+ const defaultValue = cloned.defaultValue;
3425
+ cloned.defaultValue = cloneUnknown(defaultValue);
3426
+ cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
3427
+ cloned.ui = cloneUnknown(cloned.ui);
3428
+ return cloned;
3218
3429
  }
3219
- function when(path, options) {
3220
- return (node) => ({
3221
- ...node,
3222
- $when: {
3223
- when: { from: path },
3224
- ...options?.equals !== void 0 ? { equals: options.equals } : {},
3225
- ...options?.not ? { not: true } : {},
3226
- ...options?.authoringPresence ? { authoringPresence: options.authoringPresence } : {}
3227
- }
3228
- });
3430
+ function cloneFieldDefinition(field) {
3431
+ if (field.type === "repeater") {
3432
+ if (field.polymorphic && field.itemTypes) return {
3433
+ ...field,
3434
+ polymorphic: true,
3435
+ itemTypes: Object.fromEntries(Object.entries(field.itemTypes).map(([key, itemType]) => [key, {
3436
+ ...itemType,
3437
+ fields: itemType.fields.map(cloneFieldDefinition)
3438
+ }]))
3439
+ };
3440
+ if (field.schema) return {
3441
+ ...field,
3442
+ schema: { fields: field.schema.fields.map(cloneFieldDefinition) }
3443
+ };
3444
+ return { ...field };
3445
+ }
3446
+ if (field.type === "group") return {
3447
+ ...field,
3448
+ schema: { fields: field.schema.fields.map(cloneFieldDefinition) }
3449
+ };
3450
+ return { ...field };
3229
3451
  }
3230
- function repeat(collectionPath, itemName = "item", options) {
3231
- return (node) => ({
3232
- ...node,
3233
- $repeat: {
3234
- collection: {
3235
- from: collectionPath,
3236
- pick: "collection"
3237
- },
3238
- itemName,
3239
- ...options?.indexName ? { indexName: options.indexName } : {},
3240
- ...options?.limit ? { limit: options.limit } : {},
3241
- ...options?.sortBy ? { sortBy: {
3242
- path: options.sortBy.path,
3243
- direction: options.sortBy.direction ?? "asc"
3244
- } } : {}
3245
- }
3246
- });
3452
+ function cloneUnknown(value) {
3453
+ if (value == null || typeof value !== "object") return value;
3454
+ if (Array.isArray(value)) return value.map((entry) => cloneUnknown(entry));
3455
+ return { ...value };
3247
3456
  }
3248
- function props(extra) {
3249
- validateProps(extra, "props() modifier");
3250
- return (node) => ({
3251
- ...node,
3252
- props: {
3253
- ...node.props ?? {},
3254
- ...extra
3255
- }
3256
- });
3457
+ function cloneAndScopeNode(node, scope) {
3458
+ const cloned = { ...node };
3459
+ if (node.children) cloned.children = node.children.map((child) => cloneAndScopeNode(child, scope));
3460
+ if (node.props) cloned.props = scopePropBindings(node.props, scope);
3461
+ if (node.$bind) cloned.$bind = scopeBinding(node.$bind, scope);
3462
+ if (node.$repeat) cloned.$repeat = scopeRepeat(node.$repeat, scope);
3463
+ if (node.$when) cloned.$when = scopeCondition(node.$when, scope);
3464
+ if (node.$scopes) cloned.$scopes = node.$scopes.map((entry) => ({
3465
+ name: entry.name,
3466
+ from: scopeBinding(entry.from, scope)
3467
+ }));
3468
+ return cloned;
3257
3469
  }
3258
- function accordionList({ collection, itemName = "item", indexName, accordionProps = null, itemProps = null, triggerFrom, contentFrom, valueFrom }, ...mods) {
3259
- const resolvedIndexName = indexName ?? `${itemName}Index`;
3260
- const resolvedValuePath = valueFrom === null ? null : valueFrom ?? resolvedIndexName;
3261
- const baseItemProps = {
3262
- ...itemProps ?? {},
3263
- trigger: { $bind: { from: triggerFrom } }
3470
+ function scopeBinding(binding, scope) {
3471
+ const cloned = {
3472
+ ...binding,
3473
+ transforms: binding.transforms?.map((step) => ({ ...step })) ?? []
3264
3474
  };
3265
- if (contentFrom) baseItemProps.content = { $bind: { from: contentFrom } };
3266
- if (resolvedValuePath) baseItemProps.value = { $bind: { from: resolvedValuePath } };
3267
- return accordion(accordionProps ?? void 0, [accordionItem(baseItemProps, void 0, repeat(collection, itemName, { indexName: resolvedIndexName }))], ...mods);
3475
+ cloned.from = scopeContentPath(binding.from, scope);
3476
+ return cloned;
3268
3477
  }
3269
- function devValidate(node) {
3270
- try {
3271
- if (isDevEnvironment()) {
3272
- const res = z.safeParse(NodeSchema, node);
3273
- if (!res.success) console.warn("[blocks:builder] Invalid node produced by builder", res.error.format());
3478
+ function scopeRepeat(repeat, scope) {
3479
+ const cloned = {
3480
+ ...repeat,
3481
+ collection: scopeBinding(repeat.collection, scope)
3482
+ };
3483
+ if (repeat.sortBy) cloned.sortBy = {
3484
+ ...repeat.sortBy,
3485
+ path: scopeContentPath(repeat.sortBy.path, scope)
3486
+ };
3487
+ return cloned;
3488
+ }
3489
+ function scopeCondition(condition, scope) {
3490
+ return {
3491
+ ...condition,
3492
+ when: scopeBinding(condition.when, scope)
3493
+ };
3494
+ }
3495
+ function scopePropBindings(input, scope) {
3496
+ const result = {};
3497
+ for (const [key, value] of Object.entries(input)) result[key] = scopePropValue(value, scope);
3498
+ return result;
3499
+ }
3500
+ function scopePropValue(value, scope) {
3501
+ if (Array.isArray(value)) return value.map((entry) => scopePropValue(entry, scope));
3502
+ if (value && typeof value === "object") {
3503
+ if ("$bind" in value) {
3504
+ const bindingConfig = value.$bind;
3505
+ return { $bind: scopeBinding(bindingConfig, scope) };
3274
3506
  }
3275
- } catch {}
3276
- return node;
3507
+ const result = {};
3508
+ for (const [key, entry] of Object.entries(value)) result[key] = scopePropValue(entry, scope);
3509
+ return result;
3510
+ }
3511
+ return value;
3512
+ }
3513
+ function scopeContentPath(path, scope) {
3514
+ if (!scope || scope.length === 0) return path;
3515
+ if (path === "content") return `content.${scope}`;
3516
+ if (path.startsWith("content.")) {
3517
+ const remainder = path.slice(8);
3518
+ return remainder.length > 0 ? `content.${scope}.${remainder}` : `content.${scope}`;
3519
+ }
3520
+ if (path.startsWith("content[")) return path.replace(/^content/, `content.${scope}`);
3521
+ if (path.startsWith("$root.")) return path;
3522
+ if (path.includes(".")) return path;
3523
+ return `content.${scope}.${path}`;
3277
3524
  }
3278
3525
  //#endregion
3279
- //#region ../blocks/src/system/node/fragments/backgroundLayer.ts
3280
- const BACKGROUND_FRAME_BASE_CLASS = "rb-background-frame rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-isolate rb-pointer-events-none";
3281
- /**
3282
- * Creates background layer nodes for rendering backgrounds from field data.
3283
- *
3284
- * This helper generates three nodes:
3285
- * 1. A style layer (div) that renders solid colors and gradients
3286
- * 2. A media layer that conditionally renders background images/videos
3287
- * 3. An overlay layer (div) that renders color/gradient overlays on images
3288
- *
3289
- * The layers are designed to be placed behind content (z-index -10) and work
3290
- * with data from `sectionStylesField`, `containerStylesField`, or `cardStylesField`.
3291
- *
3292
- * Layer stacking order (all use -z-10, stacking determined by DOM order):
3293
- * - Content (default z-index, rendered last)
3294
- * - Overlay layer (rendered third, above image due to DOM order)
3295
- * - Image layer (rendered second)
3296
- * - Style layer (rendered first, at bottom)
3297
- *
3298
- * @param path - The data path to the background field (e.g., '_sectionStyles.background')
3299
- * @param options - Optional customization for layer appearance
3300
- * @returns Array of NodeDefinition objects in paint order: style, optional image, overlay
3301
- *
3302
- * @example
3303
- * // Basic usage in a block
3304
- * const heroBackgroundNodes = backgroundLayer('_sectionStyles.background')
3305
- *
3306
- * @example
3307
- * // Custom styling
3308
- * const customBackgroundNodes = backgroundLayer('_sectionStyles.background', {
3309
- * imageClassName: 'rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-object-cover rb-opacity-30'
3310
- * })
3311
- *
3312
- * @example
3313
- * // In a block layout
3314
- * const layout = section(
3315
- * { background: 'background' },
3316
- * [
3317
- * ...backgroundLayer('_sectionStyles.background'),
3526
+ //#region ../blocks/src/system/fragments/builder.ts
3527
+ var FragmentCompositionError = class extends Error {
3528
+ constructor(message) {
3529
+ super(message);
3530
+ this.name = "FragmentCompositionError";
3531
+ }
3532
+ };
3533
+ const DOT_SCOPE_REGEX = /^[A-Za-z0-9_.-]*$/;
3534
+ function materializeFragment(config) {
3535
+ const scope = normalizeScope(config.scope);
3536
+ const fields = scopeFragmentFields(config.fragment, scope);
3537
+ const layout = scopeFragmentLayout(config.fragment, scope);
3538
+ const fieldPriority = config.fieldPriority ?? 0;
3539
+ let data;
3540
+ if (config.fragment.data) {
3541
+ const key = config.dataKey ?? config.fragment.data.key;
3542
+ if (!key || typeof key !== "string") throw new FragmentCompositionError(`Fragment "${config.fragment.id}" requires a data key to compose.`);
3543
+ data = {
3544
+ key,
3545
+ loader: config.fragment.data.loader ? { ...config.fragment.data.loader } : void 0
3546
+ };
3547
+ }
3548
+ return {
3549
+ fragment: config.fragment,
3550
+ scope,
3551
+ fields,
3552
+ layout,
3553
+ data,
3554
+ fieldPriority
3555
+ };
3556
+ }
3557
+ function composeFragments(instances) {
3558
+ const fieldEntries = [];
3559
+ const layouts = [];
3560
+ const dataEntries = [];
3561
+ const scopes = [];
3562
+ const seenFieldIds = /* @__PURE__ */ new Set();
3563
+ let fieldOrder = 0;
3564
+ for (const instance of instances) {
3565
+ const materialized = materializeFragment(instance);
3566
+ for (const field of materialized.fields) {
3567
+ if (seenFieldIds.has(field.id)) throw new FragmentCompositionError(`Duplicate field id "${field.id}" when composing fragments.`);
3568
+ seenFieldIds.add(field.id);
3569
+ fieldEntries.push({
3570
+ id: field.id,
3571
+ field,
3572
+ priority: materialized.fieldPriority,
3573
+ order: fieldOrder++
3574
+ });
3575
+ }
3576
+ scopes.push(materialized.scope);
3577
+ layouts.push(...materialized.layout);
3578
+ if (materialized.data) {
3579
+ if (dataEntries.find((entry) => entry.key === materialized.data?.key)) throw new FragmentCompositionError(`Duplicate fragment data key "${materialized.data.key}" detected.`);
3580
+ dataEntries.push(materialized.data);
3581
+ }
3582
+ }
3583
+ return {
3584
+ fields: fieldEntries.sort((a, b) => {
3585
+ if (a.priority !== b.priority) return a.priority - b.priority;
3586
+ return a.order - b.order;
3587
+ }).map((entry) => entry.field),
3588
+ layout: layouts,
3589
+ data: dataEntries,
3590
+ scopes
3591
+ };
3592
+ }
3593
+ function normalizeScope(scope) {
3594
+ if (!scope) return "";
3595
+ const trimmed = scope.trim();
3596
+ if (!DOT_SCOPE_REGEX.test(trimmed)) throw new FragmentCompositionError(`Fragment scope "${scope}" contains invalid characters. Use alphanumeric, ".", "-", or "_".`);
3597
+ return trimmed;
3598
+ }
3599
+ function buildFragmentDataLoaders(composition) {
3600
+ const loaders = {};
3601
+ for (const entry of composition.data) {
3602
+ if (!entry?.loader) continue;
3603
+ loaders[entry.key] = {
3604
+ endpoint: entry.loader.endpoint,
3605
+ params: { ...entry.loader.params ?? {} },
3606
+ ...entry.loader.requiredParams ? { requiredParams: [...entry.loader.requiredParams] } : {},
3607
+ mode: entry.loader.mode ?? "server"
3608
+ };
3609
+ }
3610
+ return loaders;
3611
+ }
3612
+ //#endregion
3613
+ //#region ../blocks/src/system/node/fragments/backgroundLayer.ts
3614
+ const BACKGROUND_FRAME_BASE_CLASS = "rb-background-frame rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-isolate rb-pointer-events-none";
3615
+ /**
3616
+ * Creates background layer nodes for rendering backgrounds from field data.
3617
+ *
3618
+ * This helper generates three nodes:
3619
+ * 1. A style layer (div) that renders solid colors and gradients
3620
+ * 2. A media layer that conditionally renders background images/videos
3621
+ * 3. An overlay layer (div) that renders color/gradient overlays on images
3622
+ *
3623
+ * The layers are designed to be placed behind content (z-index -10) and work
3624
+ * with data from `sectionStylesField`, `containerStylesField`, or `cardStylesField`.
3625
+ *
3626
+ * Layer stacking order (all use -z-10, stacking determined by DOM order):
3627
+ * - Content (default z-index, rendered last)
3628
+ * - Overlay layer (rendered third, above image due to DOM order)
3629
+ * - Image layer (rendered second)
3630
+ * - Style layer (rendered first, at bottom)
3631
+ *
3632
+ * @param path - The data path to the background field (e.g., '_sectionStyles.background')
3633
+ * @param options - Optional customization for layer appearance
3634
+ * @returns Array of NodeDefinition objects in paint order: style, optional image, overlay
3635
+ *
3636
+ * @example
3637
+ * // Basic usage in a block
3638
+ * const heroBackgroundNodes = backgroundLayer('_sectionStyles.background')
3639
+ *
3640
+ * @example
3641
+ * // Custom styling
3642
+ * const customBackgroundNodes = backgroundLayer('_sectionStyles.background', {
3643
+ * imageClassName: 'rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-object-cover rb-opacity-30'
3644
+ * })
3645
+ *
3646
+ * @example
3647
+ * // In a block layout
3648
+ * const layout = section(
3649
+ * { background: 'background' },
3650
+ * [
3651
+ * ...backgroundLayer('_sectionStyles.background'),
3318
3652
  * sectionContainer([])
3319
3653
  * ]
3320
3654
  * )
@@ -3935,6 +4269,7 @@ function createBlockManifest(config) {
3935
4269
  version: config.version ?? "0.1.0",
3936
4270
  title: config.title,
3937
4271
  titleSource: config.titleSource,
4272
+ contentPresence: config.contentPresence,
3938
4273
  description: config.description ?? "",
3939
4274
  component: deriveComponentName(config.id),
3940
4275
  fields,
@@ -4314,120 +4649,6 @@ function markEditableSurfaceForwarding(component) {
4314
4649
  return forwardingComponent;
4315
4650
  }
4316
4651
  //#endregion
4317
- //#region ../blocks/src/system/fields/cardList.ts
4318
- /** Knob content is stored normally, edited only through facets and their history. */
4319
- const cardListKnobFields = [{
4320
- id: "actionStyle",
4321
- type: "select",
4322
- label: "Item actions",
4323
- required: false,
4324
- multiple: false,
4325
- options: [{
4326
- value: "button",
4327
- label: "Button"
4328
- }, {
4329
- value: "link",
4330
- label: "Link"
4331
- }],
4332
- ui: {
4333
- intent: "display",
4334
- hidden: true
4335
- }
4336
- }, {
4337
- id: "dates",
4338
- type: "select",
4339
- label: "Dates",
4340
- required: false,
4341
- multiple: false,
4342
- options: [{
4343
- value: "summary",
4344
- label: "Summary"
4345
- }, {
4346
- value: "next-dates",
4347
- label: "Next dates"
4348
- }],
4349
- ui: {
4350
- intent: "display",
4351
- hidden: true
4352
- }
4353
- }];
4354
- const cardListPhotoNumberFields = [{
4355
- id: "showPhotos",
4356
- type: "boolean",
4357
- label: "Show photos",
4358
- required: false,
4359
- defaultValue: true,
4360
- ui: {
4361
- intent: "display",
4362
- hidden: true
4363
- }
4364
- }, {
4365
- id: "cardMarker",
4366
- type: "select",
4367
- label: "Item markers",
4368
- required: false,
4369
- multiple: false,
4370
- options: [{
4371
- value: "numbers",
4372
- label: "Numbers"
4373
- }, {
4374
- value: "none",
4375
- label: "None"
4376
- }],
4377
- ui: {
4378
- intent: "display",
4379
- hidden: true
4380
- }
4381
- }];
4382
- const cardListSectionActionFields = [{
4383
- id: "sectionActionLabel",
4384
- type: "text",
4385
- label: "Section link text",
4386
- required: false,
4387
- multiline: false,
4388
- maxLength: 80
4389
- }, {
4390
- id: "sectionActionLink",
4391
- type: "link",
4392
- label: "Section link destination",
4393
- required: false
4394
- }];
4395
- /** React list nodes receive only compiler-resolved choices, so dormant preferences stay inert. */
4396
- const cardListPresentationBindings = {
4397
- cardArrangement: { $bind: { from: "content._effectiveLook.look.structure.byMode.default" } },
4398
- lookSlots: { $bind: { from: "content._lookSlots" } },
4399
- datesMode: { $bind: { from: "content._effectiveKnobs.dates.value" } },
4400
- itemActionStyle: { $bind: { from: "content._effectiveKnobs.actionStyle.value" } },
4401
- showPhotos: { $bind: { from: "content.showPhotos" } },
4402
- cardMarker: { $bind: { from: "content.cardMarker" } },
4403
- itemRoles: { $bind: { from: "content._effectiveLook.itemRoles" } },
4404
- surfacePresentation: { $bind: { from: "content._effectiveLook.surfacePresentation" } }
4405
- };
4406
- const cardListContentSchema = z.object({
4407
- dates: z.enum(["summary", "next-dates"]).nullish().catch(void 0),
4408
- actionStyle: z.enum(["button", "link"]).nullish().catch(void 0),
4409
- showPhotos: z.boolean().nullish().catch(void 0),
4410
- cardMarker: z.enum(["numbers", "none"]).nullish().catch(void 0),
4411
- sectionActionLabel: z.string().nullish().catch(void 0),
4412
- sectionActionLink: linkSchema.nullish().catch(void 0)
4413
- });
4414
- function normalizeCardListContent(record) {
4415
- return cardListContentSchema.parse(record);
4416
- }
4417
- //#endregion
4418
- //#region ../blocks/src/system/node/fragments/cardListSectionAction.ts
4419
- function cardListSectionAction(labelPath = "content.sectionActionLabel", linkPath = "content.sectionActionLink") {
4420
- return link({
4421
- ...lookSlot("more"),
4422
- className: "rb-item-text-link",
4423
- linkRequired: true,
4424
- href: { $bind: {
4425
- from: linkPath,
4426
- transforms: [{ id: "links.resolve" }]
4427
- } }
4428
- }, [text({ as: "span" }, bind(labelPath))], when(labelPath));
4429
- }
4430
- //#endregion
4431
4652
  //#region ../blocks/src/system/blocks/feature-card-icons.ts
4432
4653
  const FEATURE_CARD_ICON_TREATMENTS = [
4433
4654
  "plain",
@@ -4772,364 +4993,362 @@ const mapDrawingStyleBinding = { $bind: {
4772
4993
  options: { fallbackToken: "background" }
4773
4994
  }]
4774
4995
  } };
4775
- const eventListingBlockDefinition = {
4776
- manifest: createBlockManifestWithContentShape({
4777
- variantMeaning: { kind: "arrangement" },
4778
- id: "block.event-listing",
4779
- version: "1.1.0",
4780
- title: "Event listing",
4781
- titleSource: "heading",
4782
- description: "All your upcoming events in one list.",
4783
- skipSectionStyles: true,
4784
- additionalFields: [
4785
- ...sectionHeaderFields("All Events"),
4786
- ...(() => {
4787
- const columns = columnsField([
4788
- "2",
4789
- "3",
4790
- "4"
4791
- ]);
4792
- return [{
4793
- ...layoutField,
4794
- ui: {
4795
- ...layoutField.ui ?? {},
4796
- intent: "display"
4797
- }
4798
- }, {
4799
- ...columns,
4800
- ui: {
4801
- ...columns.ui ?? {},
4802
- intent: "display"
4803
- }
4804
- }];
4805
- })(),
4806
- {
4807
- id: "eventsPerPage",
4808
- type: "select",
4809
- label: "How many",
4810
- required: false,
4811
- multiple: false,
4812
- defaultValue: "12",
4813
- options: [
4814
- {
4815
- value: "3",
4816
- label: "Show the first 3"
4817
- },
4818
- {
4819
- value: "6",
4820
- label: "Show the first 6"
4821
- },
4822
- {
4823
- value: "12",
4824
- label: "Show the first 12"
4825
- },
4826
- {
4827
- value: "24",
4828
- label: "Show the first 24"
4829
- }
4830
- ],
4831
- ui: { intent: "display" }
4832
- },
4833
- {
4834
- id: "paginationMode",
4835
- type: "select",
4836
- label: "More events",
4837
- description: "How visitors can see the rest of your events.",
4838
- required: false,
4839
- multiple: false,
4840
- defaultValue: "loadMore",
4841
- options: [{
4842
- value: "loadMore",
4843
- label: "Load more button"
4844
- }, {
4845
- value: "seeAllLink",
4846
- label: "Link to another page"
4847
- }],
4848
- ui: { intent: "display" }
4849
- },
4850
- {
4851
- id: "seeAllUrl",
4852
- type: "link",
4853
- label: "Link to the full list",
4854
- required: false,
4855
- ui: {
4856
- intent: "display",
4857
- visibleWhen: {
4858
- field: "paginationMode",
4859
- equals: "seeAllLink"
4860
- }
4861
- }
4862
- },
4863
- {
4864
- id: "loadMoreText",
4865
- type: "text",
4866
- label: "More events button text",
4867
- description: "The text on the button or link that shows more events.",
4868
- required: false,
4869
- multiline: false,
4870
- defaultValue: "Load more events",
4871
- maxLength: 40
4872
- },
4873
- ...cardStylingFields.map((field) => ({
4874
- ...field,
4996
+ const eventListingManifest = createBlockManifestWithContentShape({
4997
+ variantMeaning: { kind: "arrangement" },
4998
+ id: "block.event-listing",
4999
+ version: "1.1.0",
5000
+ title: "Event listing",
5001
+ titleSource: "heading",
5002
+ description: "All your upcoming events in one list.",
5003
+ skipSectionStyles: true,
5004
+ additionalFields: [
5005
+ ...sectionHeaderFields("All Events"),
5006
+ ...(() => {
5007
+ const columns = columnsField([
5008
+ "2",
5009
+ "3",
5010
+ "4"
5011
+ ]);
5012
+ return [{
5013
+ ...layoutField,
4875
5014
  ui: {
4876
- ...field.ui ?? {},
4877
- intent: "style"
5015
+ ...layoutField.ui ?? {},
5016
+ intent: "display"
4878
5017
  }
4879
- })),
4880
- ...eventDisplayFields.map((field) => ({
4881
- ...field,
5018
+ }, {
5019
+ ...columns,
4882
5020
  ui: {
4883
- ...field.ui ?? {},
5021
+ ...columns.ui ?? {},
4884
5022
  intent: "display"
4885
5023
  }
4886
- })),
4887
- {
4888
- id: "eventSurface",
4889
- type: "select",
4890
- label: "Event types",
4891
- description: "Choose whether this block shows everything, regular classes, or workshops and special events.",
4892
- required: false,
4893
- multiple: false,
4894
- defaultValue: "all",
4895
- options: [
4896
- {
4897
- value: "all",
4898
- label: "All events"
4899
- },
4900
- {
4901
- value: "regularClassSchedule",
4902
- label: "Regular class schedule"
4903
- },
4904
- {
4905
- value: "specialDatedEvents",
4906
- label: "Workshops and special events"
4907
- },
4908
- {
4909
- value: "custom",
4910
- label: "Custom"
4911
- }
4912
- ],
4913
- ui: { intent: "behavior" }
4914
- },
4915
- {
4916
- id: "filterEventPresets",
4917
- type: "select",
4918
- label: "Only show these event types",
4919
- description: "Pick the types of event this block shows.",
4920
- required: false,
4921
- multiple: true,
4922
- defaultValue: [],
4923
- options: [
4924
- {
4925
- value: "course",
4926
- label: "Courses"
4927
- },
4928
- {
4929
- value: "class",
4930
- label: "Classes"
4931
- },
4932
- {
4933
- value: "workshop",
4934
- label: "Workshops"
4935
- },
4936
- {
4937
- value: "retreat",
4938
- label: "Retreats"
4939
- },
4940
- {
4941
- value: "performance",
4942
- label: "Performances"
4943
- }
4944
- ],
4945
- ui: {
4946
- intent: "behavior",
4947
- visibleWhen: {
4948
- field: "eventSurface",
4949
- equals: "custom"
4950
- }
5024
+ }];
5025
+ })(),
5026
+ {
5027
+ id: "eventsPerPage",
5028
+ type: "select",
5029
+ label: "How many",
5030
+ required: false,
5031
+ multiple: false,
5032
+ defaultValue: "12",
5033
+ options: [
5034
+ {
5035
+ value: "3",
5036
+ label: "Show the first 3"
5037
+ },
5038
+ {
5039
+ value: "6",
5040
+ label: "Show the first 6"
5041
+ },
5042
+ {
5043
+ value: "12",
5044
+ label: "Show the first 12"
5045
+ },
5046
+ {
5047
+ value: "24",
5048
+ label: "Show the first 24"
4951
5049
  }
4952
- },
4953
- {
4954
- id: "scheduleScope",
4955
- type: "select",
4956
- label: "Regular or one-off",
4957
- description: "Show regular events, one-off events or both.",
4958
- required: false,
4959
- multiple: false,
4960
- defaultValue: "any",
4961
- options: [
4962
- {
4963
- value: "any",
4964
- label: "Both"
4965
- },
4966
- {
4967
- value: "recurring",
4968
- label: "Regular events only"
4969
- },
4970
- {
4971
- value: "oneOff",
4972
- label: "One-off events only"
4973
- }
4974
- ],
4975
- ui: {
4976
- intent: "behavior",
4977
- visibleWhen: {
4978
- field: "eventSurface",
4979
- equals: "custom"
4980
- }
5050
+ ],
5051
+ ui: { intent: "display" }
5052
+ },
5053
+ {
5054
+ id: "paginationMode",
5055
+ type: "select",
5056
+ label: "More events",
5057
+ description: "How visitors can see the rest of your events.",
5058
+ required: false,
5059
+ multiple: false,
5060
+ defaultValue: "loadMore",
5061
+ options: [{
5062
+ value: "loadMore",
5063
+ label: "Load more button"
5064
+ }, {
5065
+ value: "seeAllLink",
5066
+ label: "Link to another page"
5067
+ }],
5068
+ ui: { intent: "display" }
5069
+ },
5070
+ {
5071
+ id: "seeAllUrl",
5072
+ type: "link",
5073
+ label: "Link to the full list",
5074
+ required: false,
5075
+ ui: {
5076
+ intent: "display",
5077
+ visibleWhen: {
5078
+ field: "paginationMode",
5079
+ equals: "seeAllLink"
4981
5080
  }
4982
- },
4983
- {
4984
- ...emptyStateField,
4985
- ui: {
4986
- ...emptyStateField.ui ?? {},
4987
- intent: "display"
5081
+ }
5082
+ },
5083
+ {
5084
+ id: "loadMoreText",
5085
+ type: "text",
5086
+ label: "More events button text",
5087
+ description: "The text on the button or link that shows more events.",
5088
+ required: false,
5089
+ multiline: false,
5090
+ defaultValue: "Load more events",
5091
+ maxLength: 40
5092
+ },
5093
+ ...cardStylingFields.map((field) => ({
5094
+ ...field,
5095
+ ui: {
5096
+ ...field.ui ?? {},
5097
+ intent: "style"
5098
+ }
5099
+ })),
5100
+ ...eventDisplayFields.map((field) => ({
5101
+ ...field,
5102
+ ui: {
5103
+ ...field.ui ?? {},
5104
+ intent: "display"
5105
+ }
5106
+ })),
5107
+ {
5108
+ id: "eventSurface",
5109
+ type: "select",
5110
+ label: "Event types",
5111
+ description: "Choose whether this block shows everything, regular classes, or workshops and special events.",
5112
+ required: false,
5113
+ multiple: false,
5114
+ defaultValue: "all",
5115
+ options: [
5116
+ {
5117
+ value: "all",
5118
+ label: "All events"
5119
+ },
5120
+ {
5121
+ value: "regularClassSchedule",
5122
+ label: "Regular class schedule"
5123
+ },
5124
+ {
5125
+ value: "specialDatedEvents",
5126
+ label: "Workshops and special events"
5127
+ },
5128
+ {
5129
+ value: "custom",
5130
+ label: "Custom"
4988
5131
  }
4989
- },
4990
- sectionStylesField({
4991
- id: "_sectionStyles",
4992
- label: "Section styles",
4993
- renderInHeader: false
4994
- }),
4995
- containerStylesField({
4996
- id: "_containerStyles",
4997
- label: "Panel styles",
4998
- includeBackground: false,
4999
- renderInHeader: false
5000
- })
5001
- ],
5002
- styleTokens: {
5003
- background: "surface",
5004
- typography: "body",
5005
- spacing: "md"
5132
+ ],
5133
+ ui: { intent: "behavior" }
5006
5134
  },
5007
- behaviours: {
5008
- supportsThemeSwitching: true,
5009
- inlineEditing: false,
5010
- animation: false,
5011
- paletteHidden: true
5135
+ {
5136
+ id: "filterEventPresets",
5137
+ type: "select",
5138
+ label: "Only show these event types",
5139
+ description: "Pick the types of event this block shows.",
5140
+ required: false,
5141
+ multiple: true,
5142
+ defaultValue: [],
5143
+ options: [
5144
+ {
5145
+ value: "course",
5146
+ label: "Courses"
5147
+ },
5148
+ {
5149
+ value: "class",
5150
+ label: "Classes"
5151
+ },
5152
+ {
5153
+ value: "workshop",
5154
+ label: "Workshops"
5155
+ },
5156
+ {
5157
+ value: "retreat",
5158
+ label: "Retreats"
5159
+ },
5160
+ {
5161
+ value: "performance",
5162
+ label: "Performances"
5163
+ }
5164
+ ],
5165
+ ui: {
5166
+ intent: "behavior",
5167
+ visibleWhen: {
5168
+ field: "eventSurface",
5169
+ equals: "custom"
5170
+ }
5171
+ }
5012
5172
  },
5013
- category: "interactive",
5014
- contentSource: { kind: "entries" },
5015
- tags: [
5016
- "events",
5017
- "listing",
5018
- "paginated",
5019
- "archive",
5020
- "all-events"
5021
- ],
5022
- icon: "List",
5023
- layout: [styledSection({
5024
- children: styledContainer({
5025
- rootType: "stack",
5026
- rootProps: { gap: "lg" },
5027
- children: [...sectionHeaderLayoutNodes(), el("div", { style: mapDrawingStyleBinding }, [el("event-listing", withApiBindings({
5028
- readAuthority: { $bind: { from: "$root.readAuthority" } },
5029
- events: { $bind: { from: "data.events" } },
5030
- stage: { $bind: {
5031
- from: "$root.previewStage",
5032
- fallback: "published"
5033
- } },
5034
- layout: { $bind: {
5035
- from: "content.layout",
5036
- fallback: "grid"
5037
- } },
5038
- columns: { $bind: {
5039
- from: "content.columns",
5040
- fallback: "3"
5041
- } },
5042
- eventsPerPage: { $bind: {
5043
- from: "content.eventsPerPage",
5044
- fallback: "12"
5045
- } },
5046
- paginationMode: { $bind: {
5047
- from: "content.paginationMode",
5048
- fallback: "loadMore"
5049
- } },
5050
- seeAllUrl: { $bind: {
5051
- from: "content.seeAllUrl",
5052
- fallback: "",
5053
- transforms: [{ id: "links.resolve" }]
5054
- } },
5055
- loadMoreText: { $bind: {
5056
- from: "content.loadMoreText",
5057
- fallback: "Load more events"
5058
- } },
5059
- cardRole: { $bind: {
5060
- from: "content._cardStyles.role",
5061
- fallback: "default"
5062
- } },
5063
- buttonVariant: { $bind: {
5064
- from: "content.buttonVariant",
5065
- fallback: "primary"
5066
- } },
5067
- buttonText: { $bind: {
5068
- from: "content.buttonText",
5069
- fallback: "Book"
5070
- } },
5071
- showVenue: { $bind: { from: "content.showVenue" } },
5072
- showMap: { $bind: { from: "content.showMap" } },
5073
- showCapacity: { $bind: { from: "content.showCapacity" } },
5074
- eventSurface: { $bind: {
5075
- from: "content.eventSurface",
5076
- fallback: "all"
5077
- } },
5078
- filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
5079
- scheduleScope: { $bind: {
5080
- from: "content.scheduleScope",
5081
- fallback: "any"
5082
- } },
5083
- emptyMessage: { $bind: { from: "content.emptyMessage" } }
5084
- }))])]
5085
- }),
5086
- baseClass: "",
5087
- spacing: "comfortable"
5088
- })]
5173
+ {
5174
+ id: "scheduleScope",
5175
+ type: "select",
5176
+ label: "Regular or one-off",
5177
+ description: "Show regular events, one-off events or both.",
5178
+ required: false,
5179
+ multiple: false,
5180
+ defaultValue: "any",
5181
+ options: [
5182
+ {
5183
+ value: "any",
5184
+ label: "Both"
5185
+ },
5186
+ {
5187
+ value: "recurring",
5188
+ label: "Regular events only"
5189
+ },
5190
+ {
5191
+ value: "oneOff",
5192
+ label: "One-off events only"
5193
+ }
5194
+ ],
5195
+ ui: {
5196
+ intent: "behavior",
5197
+ visibleWhen: {
5198
+ field: "eventSurface",
5199
+ equals: "custom"
5200
+ }
5201
+ }
5202
+ },
5203
+ ...eventEmptyBehaviorFields,
5204
+ sectionStylesField({
5205
+ id: "_sectionStyles",
5206
+ label: "Section styles",
5207
+ renderInHeader: false
5208
+ }),
5209
+ containerStylesField({
5210
+ id: "_containerStyles",
5211
+ label: "Panel styles",
5212
+ includeBackground: false,
5213
+ renderInHeader: false
5214
+ })
5215
+ ],
5216
+ styleTokens: {
5217
+ background: "surface",
5218
+ typography: "body",
5219
+ spacing: "md"
5220
+ },
5221
+ behaviours: {
5222
+ supportsThemeSwitching: true,
5223
+ inlineEditing: false,
5224
+ animation: false,
5225
+ paletteHidden: true
5226
+ },
5227
+ category: "interactive",
5228
+ contentSource: { kind: "entries" },
5229
+ tags: [
5230
+ "events",
5231
+ "listing",
5232
+ "paginated",
5233
+ "archive",
5234
+ "all-events"
5235
+ ],
5236
+ icon: "List",
5237
+ layout: [styledSection({
5238
+ children: styledContainer({
5239
+ rootType: "stack",
5240
+ rootProps: { gap: "lg" },
5241
+ children: [...sectionHeaderLayoutNodes(), el("div", { style: mapDrawingStyleBinding }, [el("event-listing", withApiBindings({
5242
+ readAuthority: { $bind: { from: "$root.readAuthority" } },
5243
+ events: { $bind: { from: "data.events" } },
5244
+ stage: { $bind: {
5245
+ from: "$root.previewStage",
5246
+ fallback: "published"
5247
+ } },
5248
+ layout: { $bind: {
5249
+ from: "content.layout",
5250
+ fallback: "grid"
5251
+ } },
5252
+ columns: { $bind: {
5253
+ from: "content.columns",
5254
+ fallback: "3"
5255
+ } },
5256
+ eventsPerPage: { $bind: {
5257
+ from: "content.eventsPerPage",
5258
+ fallback: "12"
5259
+ } },
5260
+ paginationMode: { $bind: {
5261
+ from: "content.paginationMode",
5262
+ fallback: "loadMore"
5263
+ } },
5264
+ seeAllUrl: { $bind: {
5265
+ from: "content.seeAllUrl",
5266
+ fallback: "",
5267
+ transforms: [{ id: "links.resolve" }]
5268
+ } },
5269
+ loadMoreText: { $bind: {
5270
+ from: "content.loadMoreText",
5271
+ fallback: "Load more events"
5272
+ } },
5273
+ cardRole: { $bind: {
5274
+ from: "content._cardStyles.role",
5275
+ fallback: "default"
5276
+ } },
5277
+ buttonVariant: { $bind: {
5278
+ from: "content.buttonVariant",
5279
+ fallback: "primary"
5280
+ } },
5281
+ buttonText: { $bind: {
5282
+ from: "content.buttonText",
5283
+ fallback: "Book"
5284
+ } },
5285
+ showVenue: { $bind: { from: "content.showVenue" } },
5286
+ showMap: { $bind: { from: "content.showMap" } },
5287
+ showCapacity: { $bind: { from: "content.showCapacity" } },
5288
+ eventSurface: { $bind: {
5289
+ from: "content.eventSurface",
5290
+ fallback: "all"
5291
+ } },
5292
+ filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
5293
+ scheduleScope: { $bind: {
5294
+ from: "content.scheduleScope",
5295
+ fallback: "any"
5296
+ } },
5297
+ emptyMessage: { $bind: { from: "content.emptyMessage" } }
5298
+ }))])]
5299
+ }),
5300
+ baseClass: "",
5301
+ spacing: "comfortable"
5302
+ })]
5303
+ }, {
5304
+ additionalFields: [{
5305
+ id: "layout",
5306
+ type: "select",
5307
+ required: false,
5308
+ multiple: false,
5309
+ options: [{ value: "grid" }, { value: "stack" }]
5089
5310
  }, {
5090
- additionalFields: [{
5091
- id: "layout",
5092
- type: "select",
5093
- required: false,
5094
- multiple: false,
5095
- options: [{ value: "grid" }, { value: "stack" }]
5096
- }, {
5097
- id: "paginationMode",
5098
- type: "select",
5099
- required: false,
5100
- multiple: false,
5101
- options: [{ value: "loadMore" }, { value: "seeAllLink" }]
5102
- }],
5103
- skipSectionStyles: true
5104
- }),
5311
+ id: "paginationMode",
5312
+ type: "select",
5313
+ required: false,
5314
+ multiple: false,
5315
+ options: [{ value: "loadMore" }, { value: "seeAllLink" }]
5316
+ }],
5317
+ skipSectionStyles: true
5318
+ });
5319
+ const eventListingBlockDefinition = {
5320
+ readiness: eventsReadiness,
5321
+ contentNormalizer: {
5322
+ fieldIds: ["emptyBehavior"],
5323
+ normalize: normalizeEventEmptyBehavior
5324
+ },
5325
+ manifest: eventListingManifest,
5105
5326
  runtime: eventListingBlockRuntime,
5106
5327
  dataSchemas: { events: publicEventsArraySchema.optional() },
5107
- dataLoaders: { events: {
5108
- endpoint: "listPublicEvents",
5109
- params: {
5110
- siteId: { $bind: { from: "$root.siteId" } },
5111
- limit: { $bind: {
5112
- from: "content.eventsPerPage",
5113
- fallback: "12"
5114
- } },
5115
- stage: { $bind: {
5116
- from: "$root.previewStage",
5117
- fallback: "published"
5118
- } },
5119
- detailLevel: "listing",
5120
- readProfile: { $bind: {
5121
- from: "content.layout",
5122
- fallback: "listing-card"
5123
- } },
5124
- eventSurface: { $bind: { from: "content.eventSurface" } },
5125
- eventPresets: { $bind: {
5126
- from: "content.filterEventPresets",
5127
- transforms: [{ id: "value.csv" }]
5128
- } },
5129
- scheduleScope: { $bind: { from: "content.scheduleScope" } }
5130
- },
5131
- mode: "server"
5132
- } }
5328
+ dataLoaders: {
5329
+ readinessEvents: eventReadinessLoader,
5330
+ events: {
5331
+ endpoint: "listPublicEvents",
5332
+ params: {
5333
+ siteId: { $bind: { from: "$root.siteId" } },
5334
+ limit: { $bind: {
5335
+ from: "content.eventsPerPage",
5336
+ fallback: "12"
5337
+ } },
5338
+ stage: { $bind: {
5339
+ from: "$root.previewStage",
5340
+ fallback: "published"
5341
+ } },
5342
+ detailLevel: "listing",
5343
+ readProfile: { $bind: {
5344
+ from: "content.layout",
5345
+ fallback: "listing-card"
5346
+ } },
5347
+ ...eventScopeLoaderParams
5348
+ },
5349
+ mode: "server"
5350
+ }
5351
+ }
5133
5352
  };
5134
5353
  //#endregion
5135
5354
  //#region ../blocks/src/system/blocks/events/eventSelectionChips.ts
@@ -5216,144 +5435,12 @@ function withEventSelectionVisibility(field) {
5216
5435
  };
5217
5436
  }
5218
5437
  //#endregion
5219
- //#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
5220
- const scopeParams = {
5221
- siteId: { $bind: { from: "$root.siteId" } },
5222
- seriesIds: { $bind: {
5223
- from: "content",
5224
- transforms: [{
5225
- id: "events.calendarSelectionParam",
5226
- options: { key: "seriesIds" }
5227
- }]
5228
- } },
5229
- stage: { $bind: {
5230
- from: "$root.previewStage",
5231
- fallback: "published"
5232
- } },
5233
- eventSurface: { $bind: {
5234
- from: "content",
5235
- transforms: [{
5236
- id: "events.calendarSelectionParam",
5237
- options: { key: "eventSurface" }
5238
- }, { id: "value.csv" }]
5239
- } },
5240
- eventPresets: { $bind: {
5241
- from: "content",
5242
- transforms: [{
5243
- id: "events.calendarSelectionParam",
5244
- options: { key: "filterEventPresets" }
5245
- }, { id: "value.csv" }]
5246
- } },
5247
- scheduleScope: { $bind: {
5248
- from: "content",
5249
- transforms: [{
5250
- id: "events.calendarSelectionParam",
5251
- options: { key: "scheduleScope" }
5252
- }, { id: "value.csv" }]
5253
- } },
5254
- categoryIds: { $bind: {
5255
- from: "content",
5256
- transforms: [{
5257
- id: "events.calendarSelectionParam",
5258
- options: { key: "filterCategoryIds" }
5259
- }, { id: "value.csv" }]
5260
- } },
5261
- staffMemberId: { $bind: {
5262
- from: "content",
5263
- transforms: [{
5264
- id: "events.calendarSelectionParam",
5265
- options: { key: "filterStaffMemberId" }
5266
- }, { id: "value.csv" }]
5267
- } },
5268
- venueId: { $bind: {
5269
- from: "content",
5270
- transforms: [{
5271
- id: "events.calendarSelectionParam",
5272
- options: { key: "filterVenueId" }
5273
- }, { id: "value.csv" }]
5274
- } }
5275
- };
5276
- /** Combined renders two jobs; calendar-only variants never pay for the list seed. */
5277
- const eventCalendarDataLoaders = {
5278
- schedule: {
5279
- endpoint: "listPublicRecurringSchedule",
5280
- when: { $bind: {
5281
- from: "content",
5282
- transforms: [{
5283
- id: "events.calendarReadEnabled",
5284
- options: { job: "schedule" }
5285
- }]
5286
- } },
5287
- params: {
5288
- siteId: scopeParams.siteId,
5289
- stage: scopeParams.stage,
5290
- limit: "100",
5291
- detailLevel: "listing",
5292
- readProfile: "compact-list",
5293
- eventSurface: "custom",
5294
- eventPresets: "class",
5295
- scheduleScope: "any"
5296
- },
5297
- mode: "server"
5298
- },
5299
- events: {
5300
- endpoint: "listPublicEvents",
5301
- when: { $bind: {
5302
- from: "content",
5303
- transforms: [{
5304
- id: "events.calendarReadEnabled",
5305
- options: { job: "list" }
5306
- }]
5307
- } },
5308
- params: {
5309
- ...scopeParams,
5310
- limit: 100,
5311
- detailLevel: "listing",
5312
- readProfile: "listing-card",
5313
- from: { $bind: {
5314
- from: "$root",
5315
- transforms: [{
5316
- id: "events.calendarListWindow",
5317
- options: { key: "from" }
5318
- }]
5319
- } },
5320
- to: { $bind: {
5321
- from: "$root",
5322
- transforms: [{
5323
- id: "events.calendarListWindow",
5324
- options: { key: "to" }
5325
- }]
5326
- } }
5327
- },
5328
- mode: "server"
5329
- },
5330
- calendarWindow: {
5331
- endpoint: "listPublicEventCalendarWindow",
5332
- when: { $bind: {
5333
- from: "content",
5334
- transforms: [{
5335
- id: "events.calendarReadEnabled",
5336
- options: { job: "calendar" }
5337
- }]
5338
- } },
5339
- params: {
5340
- ...scopeParams,
5341
- limit: 100,
5342
- readProfile: { $bind: {
5343
- from: "content",
5344
- transforms: [{ id: "events.calendarReadProfile" }]
5345
- } }
5346
- },
5347
- mode: "server"
5348
- }
5349
- };
5350
- //#endregion
5351
5438
  //#region ../blocks/src/system/blocks/events/event-calendar.ts
5352
5439
  function normalizeEventCalendarContent(content) {
5353
5440
  const record = typeof content === "object" && content !== null ? content : {};
5354
5441
  const variant = normalizeEventCalendarDisplayMode$1(record);
5355
5442
  return {
5356
- ...record,
5443
+ ...normalizeEventEmptyBehavior(record),
5357
5444
  ...variant ? { variant } : {},
5358
5445
  displayMode: normalizeEventCalendarDisplayMode(record.displayMode),
5359
5446
  listLayout: normalizeEventCalendarListLayout(record.listLayout),
@@ -5431,6 +5518,7 @@ const eventCalendarLayout = [styledSection({
5431
5518
  lookSlots: { $bind: { from: "content._lookSlots" } },
5432
5519
  itemActionStyle: { $bind: { from: "content._effectiveKnobs.actionStyle.value" } },
5433
5520
  showPhotos: { $bind: { from: "content.showPhotos" } },
5521
+ eventRows: { $bind: { from: "content._effectiveLook.look.structure.eventRows" } },
5434
5522
  panelHeading: { $bind: { from: "content._lookPanelHeading" } },
5435
5523
  itemRoles: { $bind: { from: "content._effectiveLook.itemRoles" } },
5436
5524
  surfacePresentation: { $bind: { from: "content._effectiveLook.surfacePresentation" } },
@@ -6207,7 +6295,7 @@ const eventCalendarAdditionalFields = [
6207
6295
  intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
6208
6296
  }
6209
6297
  })),
6210
- emptyStateField,
6298
+ ...eventEmptyBehaviorFields,
6211
6299
  sectionStylesField({
6212
6300
  id: "_sectionStyles",
6213
6301
  label: "Section styles",
@@ -6371,6 +6459,7 @@ const generatedEventCalendarManifest = createBlockManifestWithContentShape({
6371
6459
  }
6372
6460
  }, eventCalendarContentShape);
6373
6461
  const eventCalendarBlockDefinition = {
6462
+ readiness: eventsReadiness,
6374
6463
  manifest: {
6375
6464
  ...generatedEventCalendarManifest,
6376
6465
  fields: generatedEventCalendarManifest.fields?.map((field) => field.id === "variant" ? {
@@ -6385,6 +6474,7 @@ const eventCalendarBlockDefinition = {
6385
6474
  },
6386
6475
  contentNormalizer: {
6387
6476
  fieldIds: [
6477
+ "emptyBehavior",
6388
6478
  "variant",
6389
6479
  "displayMode",
6390
6480
  "listLayout",
@@ -6403,7 +6493,10 @@ const eventCalendarBlockDefinition = {
6403
6493
  events: publicEventsArraySchema.optional(),
6404
6494
  calendarWindow: calendarWindowPageSchema.optional()
6405
6495
  },
6406
- dataLoaders: eventCalendarDataLoaders,
6496
+ dataLoaders: {
6497
+ ...eventCalendarDataLoaders,
6498
+ readinessEvents: eventReadinessLoader
6499
+ },
6407
6500
  runtime: eventCalendarBlockRuntime
6408
6501
  };
6409
6502
  //#endregion
@@ -6432,7 +6525,7 @@ function buildOfferingsCatalogueListing(input) {
6432
6525
  items
6433
6526
  }])),
6434
6527
  itemLimit: Infinity,
6435
- listingMode: input.listingMode,
6528
+ listingMode: input.listingMode === "next-per-type" || input.listingMode === "by-course" ? "by-type" : input.listingMode,
6436
6529
  now: input.now
6437
6530
  });
6438
6531
  }
@@ -6444,6 +6537,7 @@ function countListedOfferings(listing) {
6444
6537
  case "no-groups":
6445
6538
  case "nothing-to-show": return 0;
6446
6539
  case "by-date": return listing.items.length;
6540
+ case "by-course":
6447
6541
  case "by-type": return listing.groups.reduce((count, load) => count + (load.kind === "items" ? load.items.length : 0), 0);
6448
6542
  default: return assertNever$1(listing);
6449
6543
  }
@@ -7566,6 +7660,139 @@ const newsletterSignupBlockDefinition = {
7566
7660
  runtime: newsletterFormBlockRuntime
7567
7661
  };
7568
7662
  //#endregion
7663
+ //#region ../blocks/src/system/runtime/nodes/offerings-preview-courses.tsx
7664
+ /** Course cards own parent copy once, while rows reuse the normal booking projection. */
7665
+ function OfferingCourseCards({ items, presentation, now, Carousel, buttonText }) {
7666
+ const courses = groupOfferingRunsByCourse(items);
7667
+ const ungrouped = items.filter((item) => item.kind !== "run" || !item.run.run.listing);
7668
+ return /* @__PURE__ */ jsxs("div", {
7669
+ ...listLookSlot(presentation, "items"),
7670
+ children: [courses.map(({ id, course, parts }) => /* @__PURE__ */ jsxs("article", {
7671
+ ...listLookSlot(presentation, "item"),
7672
+ children: [
7673
+ presentation.showPhotos !== false ? /* @__PURE__ */ jsx(CardListContentPart, {
7674
+ part: "media",
7675
+ item: {
7676
+ id,
7677
+ title: course.title,
7678
+ media: course.presentation?.image
7679
+ },
7680
+ presentation
7681
+ }) : null,
7682
+ /* @__PURE__ */ jsxs("header", {
7683
+ ...listLookSlot(presentation, "item-body"),
7684
+ children: [
7685
+ /* @__PURE__ */ jsx(EventQuickFacts, {
7686
+ facts: course.facts,
7687
+ context: "card",
7688
+ eyebrow: true
7689
+ }),
7690
+ /* @__PURE__ */ jsx("h3", {
7691
+ ...listLookSlot(presentation, "item-title"),
7692
+ children: course.title
7693
+ }),
7694
+ course.presentation?.summary ? /* @__PURE__ */ jsx("p", {
7695
+ ...listLookSlot(presentation, "item-text"),
7696
+ children: course.presentation.summary
7697
+ }) : null
7698
+ ]
7699
+ }),
7700
+ /* @__PURE__ */ jsx("ol", {
7701
+ ...listLookSlot(presentation, "list"),
7702
+ children: parts.map((part) => /* @__PURE__ */ jsx(CoursePart, {
7703
+ part,
7704
+ presentation,
7705
+ now
7706
+ }, part.kind === "run" ? part.run.eventSeriesId : part.event.id))
7707
+ }),
7708
+ course.path ? /* @__PURE__ */ jsx("a", {
7709
+ ...listLookSlot(presentation, "more"),
7710
+ className: "rb-item-text-link",
7711
+ href: course.path,
7712
+ children: buttonText
7713
+ }) : null
7714
+ ]
7715
+ }, id)), ungrouped.length ? /* @__PURE__ */ jsx(CardListItems, {
7716
+ Carousel,
7717
+ presentation: {
7718
+ ...presentation,
7719
+ cardArrangement: "cards"
7720
+ },
7721
+ items: ungrouped.map((item) => coursePartContent(item, now))
7722
+ }) : null]
7723
+ });
7724
+ }
7725
+ function coursePartContent(part, now) {
7726
+ const content = eventCardListContent(part.kind === "run" ? part.run.representative : part.event, {
7727
+ kind: "offering",
7728
+ now,
7729
+ nextStartMs: part.nextStartMs,
7730
+ count: "always"
7731
+ });
7732
+ return part.kind === "run" && part.run.run.listing ? {
7733
+ ...content,
7734
+ title: part.run.run.listing.title ?? part.run.run.listing.course.title
7735
+ } : content;
7736
+ }
7737
+ function CoursePart({ part, presentation, now }) {
7738
+ const content = coursePartContent(part, now);
7739
+ const event = part.kind === "run" ? part.run.representative : part.event;
7740
+ return /* @__PURE__ */ jsxs("li", {
7741
+ ...listLookSlot(presentation, "row"),
7742
+ children: [
7743
+ /* @__PURE__ */ jsx(CardListContentPart, {
7744
+ part: "date-stamp",
7745
+ item: content,
7746
+ presentation
7747
+ }),
7748
+ /* @__PURE__ */ jsxs("div", {
7749
+ ...listLookSlot(presentation, "what"),
7750
+ children: [/* @__PURE__ */ jsx("h4", {
7751
+ ...listLookSlot(presentation, "group-label"),
7752
+ children: content.titleLink ? /* @__PURE__ */ jsx("a", {
7753
+ ...content.titleLink,
7754
+ children: content.title
7755
+ }) : content.title
7756
+ }), /* @__PURE__ */ jsx(CardListContentPart, {
7757
+ part: "schedule",
7758
+ item: content,
7759
+ presentation
7760
+ })]
7761
+ }),
7762
+ /* @__PURE__ */ jsx("p", {
7763
+ ...listLookSlot(presentation, "price"),
7764
+ children: formatEventStartingPrice(event.pricing) ?? formatEventPriceDisplay(event.pricing)
7765
+ }),
7766
+ content.bookingClosed ? /* @__PURE__ */ jsx("p", {
7767
+ ...listLookSlot(presentation, "availability"),
7768
+ "data-availability": "closed",
7769
+ children: /* @__PURE__ */ jsx("span", { children: content.bookingClosed })
7770
+ }) : /* @__PURE__ */ jsx(CardListContentPart, {
7771
+ part: "availability",
7772
+ item: content,
7773
+ presentation
7774
+ })
7775
+ ]
7776
+ });
7777
+ }
7778
+ /** Slot parents follow course-card markup, including the nested part rows. */
7779
+ const offeringCourseSlotParents = {
7780
+ items: "layout",
7781
+ item: "items",
7782
+ "item-media": "item",
7783
+ "item-body": "item",
7784
+ list: "item",
7785
+ row: "list",
7786
+ what: "row",
7787
+ eyebrow: "item-body",
7788
+ "group-label": "what",
7789
+ schedule: "what",
7790
+ date: "row",
7791
+ availability: "row",
7792
+ price: "row",
7793
+ more: "item"
7794
+ };
7795
+ //#endregion
7569
7796
  //#region ../blocks/src/system/blocks/appointments/presentation.ts
7570
7797
  const publicVenueSchema = z.object({
7571
7798
  name: z.string(),
@@ -8066,8 +8293,10 @@ const VideoEmbedNode = ({ value, className, style, aspectRatio, blockId: _blockI
8066
8293
  });
8067
8294
  const title = getVideoTitle(embedInfo);
8068
8295
  const shouldDeferSrc = getVideoEmbedLoadingStrategy(embedInfo.provider) === "defer-until-near-viewport";
8296
+ const providerHook = "data-slot" in rest ? { "data-video-provider": embedInfo.provider } : {};
8069
8297
  return /* @__PURE__ */ jsx("div", {
8070
8298
  ...rest,
8299
+ ...providerHook,
8071
8300
  children: /* @__PURE__ */ jsxs("div", {
8072
8301
  className,
8073
8302
  "data-rb-video-embed-wrapper": shouldDeferSrc ? "true" : void 0,
@@ -8540,7 +8769,7 @@ function listGroupPresentation(presentation) {
8540
8769
  * Every renderer of grouped offerings frames its groups from this one answer.
8541
8770
  */
8542
8771
  function listGroupFrames(presentation) {
8543
- const panels = presentation.cardArrangement === "type-columns";
8772
+ const panels = presentation.cardArrangement === "type-columns" || presentation.cardArrangement === "next-cards";
8544
8773
  return {
8545
8774
  list: panels ? listLookSlot(presentation, "list") : {},
8546
8775
  panel: panels ? listLookSlot(presentation, "panel") : {}
@@ -9378,39 +9607,6 @@ function buildLoadedOfferingsPreviewListing(input) {
9378
9607
  });
9379
9608
  }
9380
9609
  //#endregion
9381
- //#region ../blocks/src/system/runtime/nodes/events/shared/offeringNextDates.ts
9382
- /** A bounded display sample only: capacity and booking admission belong to the booking destination. */
9383
- function offeringDatesBySeries(events, now, booking) {
9384
- const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
9385
- return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event, booking))]));
9386
- }
9387
- /** Whole-series sessions share the run-level booking capacity, by contract. */
9388
- function offeringRunDates(event, now) {
9389
- if (event.bookingScope !== "whole_series") return [];
9390
- const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
9391
- return nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart).slice(0, 3).map((session) => offeringDateRow(session, event));
9392
- }
9393
- function offeringDateRow(session, event, booking) {
9394
- const options = eventDateOptions({
9395
- ...event,
9396
- timeZone: session.timeZone
9397
- });
9398
- const date = formatEventCompactDateRail(session.startsAt, options, "as-written");
9399
- const capacity = getEventAvailability(event);
9400
- const status = getEventAvailabilityStatus(event);
9401
- const label = `${date.weekday} ${date.day} ${date.month}, ${formatTime(session.startsAt, options)}`;
9402
- const bookingLink = booking?.(event, label) ?? null;
9403
- return {
9404
- startsAt: session.startsAt,
9405
- label,
9406
- ...bookingLink ? { booking: bookingLink } : {},
9407
- places: capacity.available === null ? null : {
9408
- label: capacity.isFull ? "Sold out" : `${capacity.available} place${capacity.available === 1 ? "" : "s"} left`,
9409
- status: capacity.isFull ? "full" : status.status === "filling" ? "low" : "available"
9410
- }
9411
- };
9412
- }
9413
- //#endregion
9414
9610
  //#region ../blocks/src/system/runtime/nodes/offerings-preview-catalogue.tsx
9415
9611
  function OfferingsCatalogue(props) {
9416
9612
  const input = resolveOfferingsRenderInput(props);
@@ -9440,6 +9636,7 @@ function OfferingsCatalogue(props) {
9440
9636
  now,
9441
9637
  shape
9442
9638
  });
9639
+ case "by-course":
9443
9640
  case "by-type": return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
9444
9641
  ...listLookSlot(props, "layout"),
9445
9642
  children: [/* @__PURE__ */ jsx("header", {
@@ -9535,6 +9732,7 @@ function renderCatalogueItems({ props, items, shape, groupTitle }) {
9535
9732
  style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 18rem), 1fr))" },
9536
9733
  children: events.map((event) => /* @__PURE__ */ jsx(EventCard, {
9537
9734
  event,
9735
+ now: props.now,
9538
9736
  ...catalogueEventCardProps(event, props.buttonVariant ?? "primary")
9539
9737
  }, event.seriesId))
9540
9738
  });
@@ -9545,14 +9743,15 @@ function catalogueDates(events, now, shape, pathname) {
9545
9743
  }
9546
9744
  function catalogueCardContent(item, now, dates, typeLabel) {
9547
9745
  const event = item.kind === "event" ? item.event : item.run.representative;
9548
- return {
9549
- ...eventCardListContent(event, {
9550
- kind: "catalogue",
9551
- now,
9552
- nextStartMs: item.nextStartMs,
9553
- typeLabel
9554
- }, catalogueEventCardProps(event).buttonText),
9555
- dates: event.bookingScope === "whole_series" ? offeringRunDates(event, now) : dates.get(event.seriesId)
9746
+ const content = eventCardListContent(event, {
9747
+ kind: "catalogue",
9748
+ now,
9749
+ nextStartMs: item.nextStartMs,
9750
+ typeLabel
9751
+ }, catalogueEventCardProps(event).buttonText);
9752
+ return event.bookingScope === "whole_series" ? content : {
9753
+ ...content,
9754
+ dates: dates.get(event.seriesId)
9556
9755
  };
9557
9756
  }
9558
9757
  function renderCatalogueEmpty({ props, failed }) {
@@ -9661,17 +9860,19 @@ const OFFERINGS_PREVIEW_GRID_STYLE = {
9661
9860
  //#endregion
9662
9861
  //#region ../blocks/src/system/runtime/nodes/offerings-preview.tsx
9663
9862
  const OFFERINGS_WHOLE_SERIES_CARD_CLASS = boxStyleClassNames({ role: "default" }, { baseClass: "group rb-flex rb-h-full rb-flex-col event-card offerings-preview-whole-series-card" });
9664
- function OfferingsPreviewNode(props) {
9665
- if (props.displayMode === "catalogue") return OfferingsCatalogue(props);
9666
- return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
9667
- ...listLookSlot(props, "layout"),
9668
- children: [/* @__PURE__ */ jsx("header", {
9669
- ...listLookSlot(props, "head"),
9670
- children: props.children
9671
- }), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props) })]
9672
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [props.children, renderOfferingsPreview(props)] });
9863
+ /** An authored label is kept as typed; an absent one takes the default for the presentation. */
9864
+ function withButtonText(props) {
9865
+ return {
9866
+ ...props,
9867
+ buttonText: props.buttonText ?? (props.displayMode !== "catalogue" && props.cardArrangement === "course-groups" ? "View course" : "Book")
9868
+ };
9673
9869
  }
9674
- function renderOfferingsPreview(props) {
9870
+ function OfferingsPreviewNode(authored) {
9871
+ const props = withButtonText(authored);
9872
+ if (props.displayMode === "catalogue") return OfferingsCatalogue(isPreviewOnlyArrangement(props.cardArrangement) ? {
9873
+ ...props,
9874
+ cardArrangement: "cards"
9875
+ } : props);
9675
9876
  const input = resolveOfferingsRenderInput(props);
9676
9877
  const now = input.now;
9677
9878
  const listing = input.kind === "prepared" ? input.listing : buildLoadedOfferingsPreviewListing({
@@ -9680,6 +9881,16 @@ function renderOfferingsPreview(props) {
9680
9881
  listingMode: offeringsListingFor(props.cardArrangement ?? "legacy"),
9681
9882
  now
9682
9883
  });
9884
+ if (listing.kind === "no-groups" && listing.reason === "empty-hidden") return props.showHiddenPlaceholder || props.previewStage === "preview" ? /* @__PURE__ */ jsxs(Fragment, { children: [props.children, /* @__PURE__ */ jsx(EmptyState, { message: "Visitors won't see this section at the moment, because none of its cards has anything coming up." })] }) : null;
9885
+ return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
9886
+ ...listLookSlot(props, "layout"),
9887
+ children: [/* @__PURE__ */ jsx("header", {
9888
+ ...listLookSlot(props, "head"),
9889
+ children: props.children
9890
+ }), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props, listing, now) })]
9891
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [props.children, renderOfferingsPreview(props, listing, now)] });
9892
+ }
9893
+ function renderOfferingsPreview(props, listing, now) {
9683
9894
  switch (listing.kind) {
9684
9895
  case "no-groups": return props.previewStage === "preview" ? /* @__PURE__ */ jsx(EmptyState, {
9685
9896
  className: "offerings-preview-empty",
@@ -9701,6 +9912,7 @@ function renderOfferingsPreview(props) {
9701
9912
  }, dates, group.singularLabel))
9702
9913
  });
9703
9914
  }
9915
+ case "by-course":
9704
9916
  case "by-type": return props.lookSlots ? renderOfferingCardGroups({
9705
9917
  ...props,
9706
9918
  states: listing.groups,
@@ -9891,6 +10103,7 @@ function renderSingleOfferingCard(item, options) {
9891
10103
  switch (item.kind) {
9892
10104
  case "event": return /* @__PURE__ */ jsx(EventCard, {
9893
10105
  event: item.event,
10106
+ now: options.now,
9894
10107
  buttonVariant: options.buttonVariant,
9895
10108
  buttonText: options.buttonText,
9896
10109
  showMap: false,
@@ -10144,8 +10357,10 @@ function RunWithoutLiveDates({ group, path }) {
10144
10357
  function renderOfferingCardGroups(props) {
10145
10358
  const datesBySeries = offeringDatesBySeries(props.quickDateEvents ?? [], props.now);
10146
10359
  const frames = listGroupFrames(props);
10360
+ const nextCards = props.cardArrangement === "next-cards";
10147
10361
  return /* @__PURE__ */ jsx("div", {
10148
- className: "rb-flex rb-flex-col rb-gap-10",
10362
+ className: nextCards ? "rb-grid rb-gap-6" : "rb-flex rb-flex-col rb-gap-10",
10363
+ style: nextCards ? { gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))" } : void 0,
10149
10364
  ...frames.list,
10150
10365
  children: props.states.map((state) => {
10151
10366
  const cta = resolveOfferingsPreviewGroupCta({
@@ -10159,6 +10374,7 @@ function renderOfferingCardGroups(props) {
10159
10374
  Heading: "h3",
10160
10375
  sectionProps: {
10161
10376
  ...frames.panel,
10377
+ ...nextCards ? { className: "rb-flex rb-flex-col rb-gap-4 rb-rounded-lg rb-border rb-border-border rb-p-5" } : {},
10162
10378
  "data-offering-source": state.group.sourceKey
10163
10379
  },
10164
10380
  children: [offeringGroupCards(state, props, datesBySeries), cta ? /* @__PURE__ */ jsx("a", {
@@ -10183,27 +10399,24 @@ function previewCardContent(item, props, datesBySeries, typeLabel) {
10183
10399
  ...content,
10184
10400
  dates: datesBySeries.get(event.seriesId) ?? offeringDatesBySeries([event], props.now).get(event.seriesId)
10185
10401
  };
10186
- const runContent = {
10187
- ...content,
10188
- dates: offeringRunDates(event, props.now),
10189
- id: item.run.eventSeriesId
10190
- };
10191
- return event.destination.kind === "external" ? runContent : nativeRunCardContent(item, runContent, props);
10192
- }
10193
- function nativeRunCardContent(item, content, props) {
10194
- const open = resolveWholeSeriesBookingPhase(item.run.run, props.now).kind === "open";
10195
- const path = content.titleLink?.href ?? null;
10196
10402
  return {
10197
10403
  ...content,
10198
- action: {
10199
- label: open ? path ? props.buttonText || "Book" : "Details coming soon" : "Registration closed",
10200
- ...open && path ? { href: path } : {}
10201
- }
10404
+ id: item.run.eventSeriesId
10202
10405
  };
10203
10406
  }
10204
10407
  function offeringGroupCards(state, props, dates) {
10205
10408
  switch (state.kind) {
10206
- case "items": return CardListItems({
10409
+ case "items": return props.cardArrangement === "course-groups" ? /* @__PURE__ */ jsx(OfferingCourseCards, {
10410
+ Carousel: props.Carousel,
10411
+ items: state.items,
10412
+ presentation: props,
10413
+ now: props.now,
10414
+ buttonText: props.buttonText
10415
+ }) : props.cardArrangement === "next-cards" ? renderNextOfferingCard(state.items[0], {
10416
+ now: props.now,
10417
+ buttonVariant: props.buttonVariant ?? "primary",
10418
+ buttonText: props.buttonText ?? "Book"
10419
+ }, props) : CardListItems({
10207
10420
  Carousel: props.Carousel,
10208
10421
  Title: "h4",
10209
10422
  presentation: props,
@@ -10214,6 +10427,74 @@ function offeringGroupCards(state, props, dates) {
10214
10427
  default: return assertNever$1(state);
10215
10428
  }
10216
10429
  }
10430
+ /** The existing booking projection owns prices, availability and sold-out/waitlist actions. */
10431
+ function renderNextOfferingCard(item, options, presentation = {}) {
10432
+ const { content, inProgress } = nextOfferingCardContent(item, options);
10433
+ const cardPresentation = {
10434
+ ...presentation,
10435
+ buttonVariant: options.buttonVariant
10436
+ };
10437
+ return /* @__PURE__ */ jsxs("article", {
10438
+ ...listLookSlot(cardPresentation, "item"),
10439
+ className: "offerings-preview-next-card rb-flex rb-flex-col rb-gap-3",
10440
+ children: [presentation.showPhotos !== false && content.media ? /* @__PURE__ */ jsx("div", {
10441
+ ...listLookSlot(cardPresentation, "item-media"),
10442
+ style: {
10443
+ width: "min(100%, 14rem)",
10444
+ aspectRatio: "1",
10445
+ borderRadius: "50%",
10446
+ overflow: "hidden",
10447
+ marginInline: "auto"
10448
+ },
10449
+ children: /* @__PURE__ */ jsx(MediaNodeServer, {
10450
+ ...listLookSlot(cardPresentation, "photo"),
10451
+ value: content.media,
10452
+ size: ImagePresets.card,
10453
+ style: {
10454
+ width: "100%",
10455
+ height: "100%",
10456
+ objectFit: "cover"
10457
+ }
10458
+ })
10459
+ }) : null, /* @__PURE__ */ jsxs("div", {
10460
+ ...listLookSlot(cardPresentation, "item-body"),
10461
+ className: "rb-flex rb-flex-col rb-gap-3",
10462
+ children: [inProgress ? /* @__PURE__ */ jsx("p", { children: "In progress" }) : null, [
10463
+ "title",
10464
+ "schedule",
10465
+ "facts",
10466
+ "action"
10467
+ ].map((part) => /* @__PURE__ */ jsx(React.Fragment, { children: /* @__PURE__ */ jsx(CardListContentPart, {
10468
+ part,
10469
+ item: content,
10470
+ presentation: cardPresentation,
10471
+ Title: "h4"
10472
+ }) }, part))]
10473
+ })]
10474
+ });
10475
+ }
10476
+ function nextOfferingCardContent(item, options) {
10477
+ const event = item.kind === "event" ? item.event : item.run.representative;
10478
+ const projected = eventCardListContent(event, {
10479
+ kind: "offering",
10480
+ now: options.now,
10481
+ nextStartMs: null
10482
+ }, options.buttonText);
10483
+ const inProgress = offeringRunLifecycle(event, options.now) === "in_progress";
10484
+ const course = item.kind === "run" ? item.run.run.listing?.course : void 0;
10485
+ return {
10486
+ content: course ? {
10487
+ ...projected,
10488
+ title: course.title,
10489
+ eyebrowFacts: course.facts,
10490
+ quickFacts: void 0
10491
+ } : projected,
10492
+ inProgress
10493
+ };
10494
+ }
10495
+ function isPreviewOnlyArrangement(arrangement) {
10496
+ return arrangement === "next-cards" || arrangement === "course-groups";
10497
+ }
10217
10498
  //#endregion
10218
10499
  //#region ../blocks/src/system/runtime/nodes/weekly-slot-availability.view.tsx
10219
10500
  function pluralizeWeeks(count) {
@@ -10615,10 +10896,10 @@ function renderCombinedSsr(display, prefetchedEvents) {
10615
10896
  function renderListSsr(display, hydration) {
10616
10897
  const { initialToday, timeZone } = hydration.calendarContext;
10617
10898
  const week = display.listBy === "week" ? buildEventListWeek(initialToday, display.startOfWeek, timeZone) : null;
10618
- const listing = buildEventCalendarListingDisplay(display, hydration.prefetchedEvents);
10619
- const listDisplay = week === null ? listing : {
10620
- ...listing,
10621
- week: eventListWeekDays(week, initialToday, timeZone)
10899
+ const listDisplay = {
10900
+ ...buildEventCalendarListingDisplay(display, hydration.prefetchedEvents),
10901
+ weekGrouping: eventWeekGroupingContext(initialToday, timeZone, display.startOfWeek),
10902
+ ...week === null ? {} : { week: eventListWeekDays(week, initialToday, timeZone) }
10622
10903
  };
10623
10904
  return /* @__PURE__ */ jsxs(Fragment, { children: [week !== null ? /* @__PURE__ */ jsx(EventListWeekNavigation, {
10624
10905
  ...display,
@@ -11426,4 +11707,4 @@ const serverComponentRegistry = {
11426
11707
  ...buildServerRegistryFromEntries(runtimeBackedBlockServerEntries)
11427
11708
  };
11428
11709
  //#endregion
11429
- export { sectionHeaderLayoutNodes as $, normalizeLocationMapSource as $t, eventRegistrationBlockDefinition as A, lookSlot as At, markEditableSurfaceForwarding as B, PUBLIC_DOWNLOAD_MEDIA_TYPES as Bt, cartBlockDefinition as C, resolveRepeaterGridColumnFieldId as Cn, text as Ct, eventCalendarBlockDefinition as D, linkSchema as Dn, lookLeadSlotTransform as Dt, shopBlockDefinition as E, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as En, lookCarouselRegionTransform as Et, cardListPhotoNumberFields as F, createSdkSelectField as Ft, normalizeMailingListBlockContent as G, testimonialsReadiness as Gt, desktopOnlyDisplay as H, chosenString as Ht, cardListPresentationBindings as I, createSiteOptionSelectField as It, createBlockManifest as J, pageTemplateFromEntry as Jt, formBlockDefinition as K, admitReadinessFacts as Kt, cardListSectionActionFields as L, normalizeSelectSource as Lt, FEATURE_CARD_ICON_TREATMENTS as M, composeFragments as Mt, cardListSectionAction as N, defineFragment as Nt, eventListingBlockDefinition as O, lookQuoteLimitTransform as Ot, cardListKnobFields as P, parseBlockIconValue as Pt, sectionHeaderFields as Q, normalizeLocationMapProps as Qt, normalizeCardListContent as R, parseFieldDefinition as Rt, checkoutBlockDefinition as S, parseRepeaterGridInteger as Sn, stack as St, productListBlockDefinition as T, resolveRepeaterGridSpanFieldId as Tn, when as Tt, mobileOnlyDisplay as U, galleryReadiness as Ut, splitPositioningClasses as V, augmentManifest as Vt, teamMemberCardBiographyFallback as W, teamReadiness as Wt, withApiBindings as X, LOCATION_MAP_DEFAULTS as Xt, formEmbedFragment as Y, unavailableReadinessFact as Yt, formCopyFragment as Z, LOCATION_MAP_LIMITS as Zt, publicAppointmentLocationSchema as _, ICON_CONFIG as _n, media as _t, buildLoadedOfferingsPreviewListing as a, layoutField as an, accordionList as at, sanitizeNewsletterSignupPublicContent as b, DEFAULT_MEDIA_FIELD_KINDS as bn, richText as bt, HeaderSectionFrame as c, sectionStylesField as cn, button as ct, accordionIconColorStyle as d, createButtonGroup as dn, fileDownload as dt, resolveLocationMapLocation as en, resolveBackgroundColorValue as et, resolveAccordionIconStyle as f, createButtonVariantField as fn, form as ft, formatAppointmentPrice as g, ACCORDION_TRIGGER_LETTER_SPACING as gn, link as gt, formatAppointmentLocation as h, ACCORDION_TRIGGER_FONT_SCALE as hn, inline as ht, WeeklySlotAvailabilityView as i, eventDisplayFields as in, backgroundFrame as it, FEATURE_CARD_GENERATED_ICON_SIZE_PX as j, buildFragmentDataLoaders as jt, mapDrawingStyleBinding as k, lookSkinSlotTransform as kt, accordionItemPartSlots as l, BACKGROUND_POSITION_PRESET_VALUES as ln, carousel as lt, formatAppointmentDuration as m, ACCORDION_SPACING_MAP as mn, icon as mt, runtimeBackedBlockModes as n, columnsField as nn, styledContainer as nt, LocationMapSSR as o, cardStylesField as on, bind as ot, SectionNode as p, ACCORDION_OPEN_ACCENT_THICKNESS as pn, headerSection as pt, formDataSchema as q, loadedReadinessFact as qt, runtimeBackedBlockServerEntries as r, emptyStateField as rn, sectionContainer as rt, buildAppointmentServicesView as s, containerStylesField as sn, bookingForm as st, serverComponentRegistry as t, cardStylingFields as tn, styledSection as tt, accordionLookAttributes as u, getAnchorClasses as un, el as ut, publicAppointmentPricingSchema as v, ICON_SIZE_PX as vn, props as vt, productDetailBlockDefinition as w, resolveRepeaterGridRowFieldId as wn, videoEmbed as wt, giftingBlockDefinition as x, isAcceptedRepeaterGridSpan as xn, section as xt, newsletterSignupBlockDefinition as y, bindingSchema as yn, repeat as yt, composeHeaderSectionWrapperClassName as z, parseFieldDefinitions as zt };
11710
+ export { backgroundFrame as $, chosenString as $t, mapDrawingStyleBinding as A, ICON_SIZE_PX as An, cardListKnobFields as At, normalizeMailingListBlockContent as B, parseFieldDefinitions as Bt, checkoutBlockDefinition as C, createButtonGroup as Cn, repeat as Ct, shopBlockDefinition as D, ACCORDION_TRIGGER_FONT_SCALE as Dn, text as Dt, productListBlockDefinition as E, ACCORDION_SPACING_MAP as En, stack as Et, markEditableSurfaceForwarding as F, resolveRepeaterGridColumnFieldId as Fn, parseBlockIconValue as Ft, withApiBindings as G, eventReadinessQueryKeys as Gt, formDataSchema as H, augmentManifest as Ht, splitPositioningClasses as I, resolveRepeaterGridRowFieldId as In, createSdkSelectField as It, sectionHeaderLayoutNodes as J, eventDiscoveryFilterKeys as Jt, formCopyFragment as K, eventReadinessResultSchema as Kt, desktopOnlyDisplay as L, resolveRepeaterGridSpanFieldId as Ln, createSiteOptionSelectField as Lt, FEATURE_CARD_GENERATED_ICON_SIZE_PX as M, DEFAULT_MEDIA_FIELD_KINDS as Mn, cardListPresentationBindings as Mt, FEATURE_CARD_ICON_TREATMENTS as N, isAcceptedRepeaterGridSpan as Nn, cardListSectionActionFields as Nt, eventCalendarBlockDefinition as O, ACCORDION_TRIGGER_LETTER_SPACING as On, videoEmbed as Ot, composeHeaderSectionWrapperClassName as P, parseRepeaterGridInteger as Pn, normalizeCardListContent as Pt, sectionContainer as Q, resolveEventScope as Qt, mobileOnlyDisplay as R, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as Rn, normalizeSelectSource as Rt, giftingBlockDefinition as S, getAnchorClasses as Sn, props as St, productDetailBlockDefinition as T, ACCORDION_OPEN_ACCENT_THICKNESS as Tn, section as Tt, createBlockManifest as U, eventReadinessLoaderKey as Ut, formBlockDefinition as V, PUBLIC_DOWNLOAD_MEDIA_TYPES as Vt, formEmbedFragment as W, eventReadinessQuery as Wt, styledSection as X, eventScopeQuery as Xt, resolveBackgroundColorValue as Y, eventScopeLoaderParam as Yt, styledContainer as Z, eventScopeQueryKeys as Zt, publicAppointmentLocationSchema as _, layoutField as _n, headerSection as _t, buildLoadedOfferingsPreviewListing as a, loadedReadinessFact as an, lookLeadSlotTransform as at, newsletterSignupBlockDefinition as b, sectionStylesField as bn, link as bt, HeaderSectionFrame as c, LOCATION_MAP_DEFAULTS as cn, lookSlot as ct, accordionIconColorStyle as d, normalizeLocationMapSource as dn, bookingForm as dt, galleryReadiness as en, buildFragmentDataLoaders as et, resolveAccordionIconStyle as f, resolveLocationMapLocation as fn, button as ft, formatAppointmentPrice as g, eventDisplayFields as gn, form as gt, formatAppointmentLocation as h, emptyStateField as hn, fileDownload as ht, WeeklySlotAvailabilityView as i, hiddenFromVisitors as in, lookCarouselRegionTransform as it, eventRegistrationBlockDefinition as j, bindingSchema as jn, cardListPhotoNumberFields as jt, eventListingBlockDefinition as k, ICON_CONFIG as kn, when as kt, accordionItemPartSlots as l, LOCATION_MAP_LIMITS as ln, accordionList as lt, formatAppointmentDuration as m, columnsField as mn, el as mt, runtimeBackedBlockModes as n, testimonialsReadiness as nn, defineFragment as nt, LocationMapSSR as o, pageTemplateFromEntry as on, lookQuoteLimitTransform as ot, SectionNode as p, cardStylingFields as pn, carousel as pt, sectionHeaderFields as q, eventWeekReadScope as qt, runtimeBackedBlockServerEntries as r, admitReadinessFacts as rn, cardListSectionAction as rt, buildAppointmentServicesView as s, unavailableReadinessFact as sn, lookSkinSlotTransform as st, serverComponentRegistry as t, teamReadiness as tn, composeFragments as tt, accordionLookAttributes as u, normalizeLocationMapProps as un, bind as ut, publicAppointmentPricingSchema as v, cardStylesField as vn, icon as vt, cartBlockDefinition as w, createButtonVariantField as wn, richText as wt, sanitizeNewsletterSignupPublicContent as x, BACKGROUND_POSITION_PRESET_VALUES as xn, media as xt, offeringCourseSlotParents as y, containerStylesField as yn, inline as yt, teamMemberCardBiographyFallback as z, linkSchema as zn, parseFieldDefinition as zt };