@riverbankcms/sdk 0.182.0 → 0.184.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 (231) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +83 -4
  3. package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
  4. package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
  6. package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
  7. package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
  8. package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
  10. package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
  11. package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
  12. package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
  13. package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
  14. package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
  15. package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
  16. package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
  17. package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
  18. package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.d.ts} +1 -1
  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 +7 -7
  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/gifting/client.d.ts +1 -1
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  38. package/dist/_dts/sdk/src/portal/index.d.ts +10 -2
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +126 -2
  55. package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
  56. package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
  57. package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
  58. package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
  59. package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
  62. package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
  67. package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
  70. package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
  71. package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
  72. package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
  74. package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
  75. package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
  78. package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
  79. package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
  81. package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
  82. package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
  83. package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
  84. package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
  87. package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
  88. package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
  89. package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
  90. package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
  91. package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
  92. package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
  93. package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
  95. package/dist/client/client.mjs +460 -119
  96. package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
  97. package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
  98. package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
  101. package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
  102. package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
  103. package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
  104. package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
  105. package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
  106. package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
  107. package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
  108. package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
  111. package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
  112. package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
  113. package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
  114. package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
  115. package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
  116. package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
  118. package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
  119. package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +51 -35
  121. package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
  123. package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
  124. package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
  125. package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
  126. package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
  127. package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
  128. package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
  129. package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
  130. package/dist/client/rendering/client.mjs +32 -28
  131. package/dist/client/rendering/islands.mjs +1 -1
  132. package/dist/client/rendering.mjs +5 -5
  133. package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
  134. package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
  135. package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
  136. package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
  137. package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
  138. package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
  139. package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
  140. package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
  141. package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
  142. package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
  143. package/dist/client/spam-protection.mjs +1 -1
  144. package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
  145. package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
  146. package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
  147. package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
  148. package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
  149. package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
  150. package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
  151. package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
  152. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
  153. package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
  154. package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
  155. package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
  156. package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
  157. package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
  158. package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
  159. package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
  160. package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
  161. package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
  162. package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
  163. package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
  164. package/dist/preview-next/client/runtime.mjs +3 -3
  165. package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
  166. package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
  167. package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
  168. package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
  169. package/dist/preview-next/container-responsive.css +469 -2
  170. package/dist/preview-next/editor-chrome.css +23 -2
  171. package/dist/preview-next/keepAlive.mjs +1 -1
  172. package/dist/preview-next/middleware.mjs +1 -1
  173. package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
  174. package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
  175. package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
  176. package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
  177. package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
  178. package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
  179. package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
  180. package/dist/server/config-validation.mjs +1 -1
  181. package/dist/server/config.mjs +2 -2
  182. package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
  183. package/dist/server/data/resolveBlockData.mjs +1 -1
  184. package/dist/server/index.mjs +4 -4
  185. package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
  186. package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
  187. package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
  190. package/dist/server/navigation.mjs +1 -1
  191. package/dist/server/next.mjs +9 -9
  192. package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +18 -5
  194. package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
  195. package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
  196. package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
  197. package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
  198. package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
  199. package/dist/server/portal.mjs +3 -3
  200. package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
  203. package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +10 -10
  209. package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
  210. package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
  211. package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
  212. package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
  213. package/dist/server/server.mjs +3 -3
  214. package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
  215. package/dist/server/theme-bridge.mjs +5 -4
  216. package/dist/server/theme.mjs +2 -2
  217. package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
  218. package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
  219. package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
  220. package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
  221. package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
  222. package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
  223. package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
  224. package/dist/styles/index.css +2987 -168
  225. package/package.json +1 -1
  226. package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
  227. package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
  228. package/dist/client/types-BEaKfam_.mjs +0 -778
  229. package/dist/server/customCss-C9kgPHvr.mjs +0 -247
  230. package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
  231. package/dist/server/media-gvfIw3z8.mjs +0 -216
@@ -1,32 +1,33 @@
1
1
  "use client";
2
- import { An as DEFAULT_MAILING_LIST_TARGETING, B as buildCartInteractiveIslandProps, Cn as formatEventPriceAmount, Ct as listingEventCardProps, Dn as assessMailingListTargeting, Et as eventCombinedBlockRuntime, F as buildGiftingInteractiveIslandProps, Ft as normalizeEventStaffMemberId, G as cartBlockRuntime, H as buildProductDetailInteractiveIslandProps, I as giftingBlockRuntime, It as normalizeEventSurfacePresets, Jt as getContainerClass, Lt as normalizeEventSurfaceScope, Nt as normalizeEventCategoryIds, On as parseMailingListPlacementTargeting, P as occurrenceContextSchema, Pt as normalizeEventScheduleScope, Q as productListBlockRuntime, R as publicGiftingOffersResponseSchema, Rt as normalizeEventVenueId, Sn as formatEventPrice, St as catalogueEventCardProps, Tn as formatEventStartingPrice, Tt as buildEventCombinedListingDisplay, U as buildProductListInteractiveIslandProps, V as buildCheckoutInteractiveIslandProps, W as buildShopInteractiveIslandProps, X as productDetailBlockRuntime, Xt as CardListContentPart, Yt as formatBookingSchedulePresentation, an as buildEventListWeek, bn as formatCoursePrice, bt as resolveOfferingsPreviewGroups, dt as groupOfferingRunsByCourse, et as shopBlockRuntime, f as eventCalendarBlockRuntime, fn as recurringScheduleProjectionSchema, g as formBlockRuntime, gn as staticHeaderChromeRuntime, gt as offeringsListingFor, h as buildFormInteractiveIslandProps, ht as offeringRunLifecycle, i as newsletterFormBlockRuntime, in as Grid, it as DEFAULT_GROUP_CTA, l as buildEventCalendarInteractiveIslandProps, lt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, mt as normalizeOfferingsPreviewItemLimit, n as buildNewsletterFormInteractiveIslandProps, nt as shopProductPresentation, o as buildEventListingInteractiveIslandProps, on as eventListWeekDays, q as checkoutBlockRuntime, qt as getCardOrientation, r as newsletterBlockSubmissionMessage, rn as MediaNodeServer, rt as publicProductsResponseSchema, s as eventListingBlockRuntime, sn as eventWeekGroupingContext, t as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, tn as EventQuickFacts, u as buildEventCalendarListingDisplay, un as resolveEventSelection, ut as buildOfferingsPreviewListing, vt as readOfferingsGrouping, wn as formatEventPriceDisplay, wt as buildEventCombinedInteractiveIslandProps, x as eventRegistrationBlockRuntime, xn as formatEventDepositNote, xt as resolveOfferingsRenderInput, y as buildEventRegistrationInteractiveIslandProps, yn as splitSiteChromePlacementClasses, yt as resolveOfferingsPreviewGroupCta, z as DEFAULT_PASS_BUY_BUTTON_TEXT } from "./newsletter-form.interactive-DVt3enLr.mjs";
2
+ import { $ as decideShopCatalogue, B as buildShopInteractiveIslandProps, Cn as formatEventPrice, Ct as catalogueEventCardProps, Dt as eventCombinedBlockRuntime, En as formatEventStartingPrice, Et as buildEventCombinedListingDisplay, F as DEFAULT_PASS_BUY_BUTTON_TEXT, Ft as normalizeEventScheduleScope, I as buildCartInteractiveIslandProps, It as normalizeEventStaffMemberId, J as productListBlockRuntime, Jt as getCardOrientation, K as productDetailBlockRuntime, L as buildCheckoutInteractiveIslandProps, Lt as normalizeEventSurfacePresets, On as assessMailingListTargeting, P as occurrenceContextSchema, Pt as normalizeEventCategoryIds, Q as shopProductPresentation, R as buildProductDetailInteractiveIslandProps, Rt as normalizeEventSurfaceScope, Sn as formatEventDepositNote, St as resolveOfferingsRenderInput, Tn as formatEventPriceDisplay, Tt as buildEventCombinedInteractiveIslandProps, U as checkoutBlockRuntime, V as cartBlockRuntime, X as shopBlockRuntime, Xt as formatBookingSchedulePresentation, Yt as getContainerClass, Zt as CardListContentPart, _n as staticHeaderChromeRuntime, _t as offeringsListingFor, an as Grid, at as DEFAULT_GROUP_CTA, bn as splitSiteChromePlacementClasses, bt as resolveOfferingsPreviewGroupCta, cn as eventWeekGroupingContext, dn as resolveEventSelection, dt as buildOfferingsPreviewListing, et as shopMembershipsShownCondition, f as eventCalendarBlockRuntime, ft as groupOfferingRunsByCourse, g as formBlockRuntime, gt as offeringRunLifecycle, h as buildFormInteractiveIslandProps, ht as normalizeOfferingsPreviewItemLimit, i as newsletterFormBlockRuntime, in as MediaNodeServer, it as publicProductsResponseSchema, jn as DEFAULT_MAILING_LIST_TARGETING, kn as parseMailingListPlacementTargeting, l as buildEventCalendarInteractiveIslandProps, n as buildNewsletterFormInteractiveIslandProps, nn as EventQuickFacts, nt as shopShowChoiceCondition, o as buildEventListingInteractiveIslandProps, on as buildEventListWeek, pn as recurringScheduleProjectionSchema, r as newsletterBlockSubmissionMessage, rt as storedShopShow, s as eventListingBlockRuntime, sn as eventListWeekDays, t as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, tt as shopPassesShownCondition, u as buildEventCalendarListingDisplay, ut as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, wn as formatEventPriceAmount, wt as listingEventCardProps, x as eventRegistrationBlockRuntime, xn as formatCoursePrice, xt as resolveOfferingsPreviewGroups, y as buildEventRegistrationInteractiveIslandProps, yt as readOfferingsGrouping, z as buildProductListInteractiveIslandProps, zt as normalizeEventVenueId } from "./newsletter-form.interactive-D0iRg7p2.mjs";
3
3
  import { m as ok, p as err } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
4
- import { C as publicEventsArraySchema, Cn as toUtcIsoDateTimeString, En as toBookingTimeZone, F as isEventCalendarDisplayMode, Gt as normalizeLocationAddressText, I as isEventCalendarListLayout, J as runtimeMediaSchema, Jt as publicLocationSchema, Kt as parseLocationValue, L as normalizeEventCalendarDisplayMode$1, M as eventCalendarVariantMeaning, P as isEventCalendarDefaultView, Q as mediaTypeDiscriminants, Qt as trimmedStringOrNull, R as resolveEventCalendarReadPlan, X as PUBLIC_FILE_FIELD_KINDS, Yt as toLocationCoordinates, Z as isDisplayMediaKind, _ as publicMembershipProductCollectionSchema, an as formatDateTimeRange, gn as compareLocalScheduleDates, j as eventCalendarListLayoutOptions, m as calendarWindowPageSchema, mn as toScheduledBookingDateTime, nn as formatDate, nt as arrangementModes, qt as projectPublicLocation, rn as formatDateRange, v as publicPassProductCollectionSchema, vn as getBookingLocalDateKey, wn as resolveBookingBusinessTimeZone, yn as getLocalScheduleDate, z as RichTextDocSchema } from "./src-CmXh3JWs.mjs";
5
- import { $o as groupEventsByDate, $s as resolveWholeSeriesBookingPhase, Ao as isEventFull, Bo as eventDateOptions, Ci as isDropInPublicEvent, Do as getEventAvailability, Eo as formatTotalCapacity, Fi as buildBookingFormInteractiveIslandProps, Fo as isBlockButtonRole, Go as formatEventCompactDateRail, Ho as formatCalendarTitle, Io as RichText, Ko as formatEventDateParts, Lo as buildCalendarViewport, Ms as sanitizeHref, Ni as groupPublicEventsByRun, No as BLOCK_BUTTON_ROLE_OPTIONS, Ns as parseAspectRatioValue, Oo as getEventAvailabilityStatus, Qo as formatTime, Qs as orderedLiveRunSessions, Sc as resolvePricingOptionsPriceDisplay, Xo as formatEventTimeRange, Xs as CANCELLED_SESSION_STATUS, Yo as formatEventRunDates, Zs as nextLiveRunSessionStartMs, _c as publicEventPricingCurrency, _o as resolveEventCta, bc as publicEventPricingType, bi as resolveEventRegistrationScopedEvents, bo as isBookableEvent, bs as asPartialObject, ds as resolvePublicMediaUrl, fo as eventVenuePlace, gc as isPublicEventPricingOptionDisplayable, go as resolveEventCardBooking, ho as eventDestinationPagePath, lo as bookingPresentation, mc as formatBookingPriceDisplay, pi as closedRunCopy, po as formatEventLocation, qo as formatEventHourLabel, ts as ImagePresets, uc as EVENT_ADDRESS_AFTER_BOOKING_LABEL, uo as eventOnlinePlace, vc as publicEventPricingDisplay, vi as normalizeEventRegistrationPageSurfaceSubject, vo as resolveEventPageLink, wo as formatEventRemainingPlaces, xc as resolveExactOrFreePriceDisplay, yo as resolveRuntimeEventDestination } from "./wizardSteps-B952ify5.mjs";
6
- import { c as MonthLookView, d as buildMonthDay, f as resolveMonthSelectedDay, i as WeekAgendaView, o as CombinedLookFrame, p as formatEventDuration, u as CalendarDayHeaders } from "./CalendarNavigationChevron-DPUD6wjy.mjs";
4
+ import { $ as mediaTypeDiscriminants, A as eventCalendarListGroupingDecision, B as RichTextDocSchema, C as publicEventsArraySchema, Cn as toUtcIsoDateTimeString, Dt as eventCalendarDisplayModeValues, En as toBookingTimeZone, F as isEventCalendarDefaultView, Gt as normalizeLocationAddressText, I as isEventCalendarDisplayMode, Jt as publicLocationSchema, Kt as parseLocationValue, L as isEventCalendarListLayout, M as eventCalendarLookViews, N as eventCalendarVariantMeaning, Q as isDisplayMediaKind, Qt as trimmedStringOrNull, R as normalizeEventCalendarDisplayMode$1, Y as runtimeMediaSchema, Yt as toLocationCoordinates, Z as PUBLIC_FILE_FIELD_KINDS, _ as publicMembershipProductCollectionSchema, an as formatDateTimeRange, gn as compareLocalScheduleDates, j as eventCalendarListLayoutOptions, m as calendarWindowPageSchema, mn as toScheduledBookingDateTime, nn as formatDate, qt as projectPublicLocation, rn as formatDateRange, rt as arrangementModes, v as publicPassProductCollectionSchema, vn as getBookingLocalDateKey, wn as resolveBookingBusinessTimeZone, yn as getLocalScheduleDate, z as resolveEventCalendarReadPlan } from "./src-Do_s2lqH.mjs";
5
+ import { $o as groupEventsByDate, $s as nextLiveRunSessionStartMs, Ao as isEventFull, Bo as eventDateOptions, Cc as resolveExactOrFreePriceDisplay, Ci as isDropInPublicEvent, Do as getEventAvailability, Eo as formatTotalCapacity, Fi as buildBookingFormInteractiveIslandProps, Fo as isBlockButtonRole, Go as formatEventCompactDateRail, Ho as formatCalendarTitle, Io as RichText, Ko as formatEventDateParts, Lo as buildCalendarViewport, Ni as groupPublicEventsByRun, No as BLOCK_BUTTON_ROLE_OPTIONS, Ns as sanitizeHref, Oo as getEventAvailabilityStatus, Ps as parseAspectRatioValue, Qo as formatTime, Qs as CANCELLED_SESSION_STATUS, Sc as publicEventPricingType, Xo as formatEventTimeRange, Yo as formatEventRunDates, _o as resolveEventCta, bc as publicEventPricingDisplay, bi as resolveEventRegistrationScopedEvents, bo as isBookableEvent, ds as resolvePublicMediaUrl, ec as orderedLiveRunSessions, fc as EVENT_ADDRESS_AFTER_BOOKING_LABEL, fo as eventVenuePlace, gc as formatBookingPriceDisplay, go as resolveEventCardBooking, ho as eventDestinationPagePath, lo as bookingPresentation, pi as closedRunCopy, po as formatEventLocation, qo as formatEventHourLabel, tc as resolveWholeSeriesBookingPhase, ts as ImagePresets, uo as eventOnlinePlace, vc as isPublicEventPricingOptionDisplayable, vi as normalizeEventRegistrationPageSurfaceSubject, vo as resolveEventPageLink, wc as resolvePricingOptionsPriceDisplay, wo as formatEventRemainingPlaces, xs as asPartialObject, yc as publicEventPricingCurrency, yo as resolveRuntimeEventDestination } from "./wizardSteps-B3gsXNnb.mjs";
6
+ import { c as MonthLookView, d as buildMonthDay, f as resolveMonthSelectedDay, i as WeekAgendaView, o as CombinedLookFrame, p as formatEventDuration, u as CalendarDayHeaders } from "./CalendarNavigationChevron-ZfrUiiiI.mjs";
7
7
  import { h as assertNever$1 } from "./bookingCalendar--aWnqFDn.mjs";
8
8
  import { n as selectCategoryView } from "./appointment-service-categories-Cl2pqw-z.mjs";
9
- import { a as CalendarRecurringWeek, c as LinkNode, d as LocationMapView, f as MapDrawingSvg, i as buildWeekBoardViewProps, l as RichTextNode, m as LocationMapActions, n as WeekBoardView, o as RecurringSchedule, p as SvgNode, r as buildWeekBoardNavigationState, s as ButtonNode, t as buildTimetableModel, u as TextNode } from "./timetableModel-GA-hn1qM.mjs";
10
- import { Qt as arrangementSlotNames, R as compiledRuntimeStyleFieldNames, a as lookListPresentationSchemaShape, fn as cardVariantRoleValues, gn as parseGradientPresetId, i as listLookSlot, n as listItemPresentation, ot as gradientToCss, st as getGradientPreset } from "./noop-jesvJXEE.mjs";
11
- import { D as SYSTEM_BLOCK_KINDS, T as parseThemeColorToken } from "./types-BEaKfam_.mjs";
12
- import { H as rgbColorValue, I as resolveThemeColorReferenceValue, R as backgroundColorStyle, U as textColorStyle, V as mergeStyles, s as serializeSurfaceTree } from "./accessibleSurfaces-BogaGutk.mjs";
13
- import { l as DEFAULT_SECTION_SPACING, o as normalizeBoxStylesBorder, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles } from "./boxStyleClassNames-BFuqZCfz.mjs";
14
- import { _ as FileTextIcon, b as SpinnerNode, c as ArrowDownIcon, d as CirclePlusIcon, g as FileSpreadsheetIcon, h as FileAudioIcon, i as ThemedDownloadLink, l as ChevronDownIcon, m as FileArchiveIcon, n as ThemedButton, o as getIconComponent, r as ThemedButtonLink, s as isSemanticIconId, u as CircleMinusIcon, v as MinusIcon, x as clsx, y as PlusIcon } from "./ThemedButton-PFOhXktM.mjs";
9
+ import { a as CalendarRecurringWeek, c as LinkNode, d as LocationMapView, f as MapDrawingSvg, i as buildWeekBoardViewProps, l as RichTextNode, m as LocationMapActions, n as WeekBoardView, o as RecurringSchedule, p as SvgNode, r as buildWeekBoardNavigationState, s as ButtonNode, t as buildTimetableModel, u as TextNode } from "./timetableModel-DqI6U1BS.mjs";
10
+ import { G as compiledRuntimeStyleFieldNames, In as parseGradientPresetId, Mn as cardVariantRoleValues, X as gradientToCss, Z as getGradientPreset, d as listLookSlot, f as lookListPresentationSchemaShape, l as listItemPresentation, mn as arrangementSlotNames, vn as lookKnobBlocks } from "./islands-dMh0Oxli.mjs";
11
+ import { L as parseThemeColorToken, z as SYSTEM_BLOCK_KINDS } from "./buttonParts-C39GC0kz.mjs";
12
+ import { H as rgbColorValue, I as resolveThemeColorReferenceValue, R as backgroundColorStyle, U as textColorStyle, V as mergeStyles, c as serializeSurfaceTree } from "./accessibleSurfaces-CqroimVQ.mjs";
13
+ import { l as DEFAULT_SECTION_SPACING, o as normalizeBoxStylesBorder, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles } from "./boxStyleClassNames-CA7FirMH.mjs";
14
+ import { C as PlusIcon, D as SpinnerNode, E as UsersIcon, O as clsx, S as MinusIcon, T as UserIcon, _ as FileSpreadsheetIcon, b as InfoIcon, c as ArrowDownIcon, d as CircleMinusIcon, f as CirclePlusIcon, g as FileAudioIcon, h as FileArchiveIcon, i as ThemedDownloadLink, l as CalendarIcon, n as ThemedButton, o as getIconComponent, r as ThemedButtonLink, s as isSemanticIconId, u as ChevronDownIcon, v as FileTextIcon, w as TicketIcon, x as MapPinIcon, y as GlobeIcon } from "./ThemedButton-C4rCsPCt.mjs";
15
15
  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";
16
16
  import { d as formatDateKey, h as getWeekCalendarDayTuple, m as getOrderedDayNames } from "./src-uwCpbHXG.mjs";
17
- import { t as coerceRichTextDoc } from "./richText-coerce-Bnng7JFA.mjs";
18
- import { f as formatCourseSessions, l as eventDisplayTitle, n as CardListItems, p as formatMoreDates, r as EventItem, u as eventDisplayTitleText } from "./EventItem-Bb0ppG2N.mjs";
19
- import { i as resolvePublicEventDepositOffer, t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-DdxFG3Ic.mjs";
17
+ import { t as coerceRichTextDoc } from "./richText-coerce-Jt9hDHdh.mjs";
18
+ import { f as formatCourseSessions, l as eventDisplayTitle, n as CardListItems, p as formatMoreDates, r as EventItem, u as eventDisplayTitleText } from "./EventItem-KGKkK19N.mjs";
19
+ import { i as resolvePublicEventDepositOffer, t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-DXV4KR7l.mjs";
20
20
  import { t as resolveDedicatedBookingHref } from "./bookingRoute-D6DlxYx6.mjs";
21
- import { n as BookingPanelArrangement } from "./StepIndicator-B6o5B7g3.mjs";
22
- import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, l as decideBookedElsewhereDatesPage, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-BTqO7cJl.mjs";
23
- import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-DsqvuulZ.mjs";
21
+ import { n as BookingPanelArrangement } from "./StepIndicator-CLgDVzCs.mjs";
22
+ import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, l as decideBookedElsewhereDatesPage, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-DRyZ8igu.mjs";
23
+ import { c as EventCompactRow, i as eventFilterConditions, l as EventCard, s as EmptyState, t as EventListingFrameView } from "./EventListing.view-Dy36vWHi.mjs";
24
+ import { a as publicGiftingOffersResponseSchema, c as vouchersShownCondition, n as buildGiftingInteractiveIslandProps, o as decideGiftingOffer, r as giftingBlockRuntime, s as giftCardsShownCondition } from "./gifting.interactive-CrwHpUJG.mjs";
24
25
  import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
25
- 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-DOyZc-DF.mjs";
26
- import { a as giftingEyebrow, n as GiftCardAmounts, o as giftingSlot, r as GiftingPanelHead } from "./gifting.parts-Bak93gD2.mjs";
27
- import { n as EventListWeekNavigation, t as EventListWeekEmptyState } from "./EventListWeekNavigation-DMryCaNV.mjs";
28
- import { n as FormSubmitAction, t as FormFieldGroups } from "./form.parts-C-G6N_MK.mjs";
29
- import { a as partitionNewsletterFields, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-CH6dGfdn.mjs";
26
+ import { a as GiftingPanelHead, c as giftingSlot, i as GiftGroup, n as GIFTING_NOTHING_TO_SHOW, r as GiftCardAmounts, s as formatGiftAmount } from "./gifting.parts-CcKdDaQq.mjs";
27
+ 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-Cj151w4m.mjs";
28
+ import { n as EventListWeekNavigation, t as EventListWeekEmptyState } from "./EventListWeekNavigation-Ba9ezxuC.mjs";
29
+ import { n as FormSubmitAction, t as FormFieldGroups } from "./form.parts-1q2rzSYt.mjs";
30
+ import { a as partitionNewsletterFields, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-Dmuklz0r.mjs";
30
31
  import React, { forwardRef } from "react";
31
32
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
32
33
  import { z } from "zod";
@@ -310,6 +311,36 @@ const linkSchema = z.union([
310
311
  //#region ../site-contracts/src/blocks/iconVocabulary.ts
311
312
  const ICON_PICKER_PRESETS = ["cta", "feature"];
312
313
  //#endregion
314
+ //#region ../site-contracts/src/blocks/editorData.ts
315
+ /** The values each fact can take, as data: the manifest schema and the condition check both read it. */
316
+ const EVENT_FILTER_SPREADS = [
317
+ "none",
318
+ "one-for-all",
319
+ "one-for-some",
320
+ "several"
321
+ ];
322
+ const CONDITION_FACT_VALUES = {
323
+ "catalogue.passes": ["none", "some"],
324
+ "catalogue.memberships": ["none", "some"],
325
+ "gifting.giftCards": ["none", "some"],
326
+ "gifting.vouchers": ["none", "some"],
327
+ "eventFilters.hosts": EVENT_FILTER_SPREADS,
328
+ "eventFilters.venues": EVENT_FILTER_SPREADS,
329
+ "eventFilters.categories": EVENT_FILTER_SPREADS,
330
+ "appointments.resources": [
331
+ "none",
332
+ "one",
333
+ "several"
334
+ ],
335
+ "appointments.serviceCategories": ["none", "some"]
336
+ };
337
+ function mapReadinessFact(fact, project) {
338
+ return fact.kind === "Loaded" ? {
339
+ kind: "Loaded",
340
+ value: project(fact.value)
341
+ } : fact;
342
+ }
343
+ //#endregion
313
344
  //#region ../site-contracts/src/blocks/fieldUi.ts
314
345
  const visibilityLevels = [
315
346
  "admin",
@@ -335,6 +366,28 @@ const mediaDeliverySchema = z.object({
335
366
  ]).optional(),
336
367
  strategyOptions: z.record(z.string(), z.unknown()).optional()
337
368
  });
369
+ /**
370
+ * The key each kind of condition is told apart by. A condition is exactly one
371
+ * kind, so it carries exactly one of these: two tests together are written as
372
+ * `allOf`, never as one object with two kinds' keys.
373
+ */
374
+ const CONDITION_KIND_KEYS = [
375
+ "field",
376
+ "fact",
377
+ "look",
378
+ "knob",
379
+ "template",
380
+ "observation",
381
+ "allOf",
382
+ "anyOf"
383
+ ];
384
+ const BLOCK_LOOK_STATES = ["applies", "none"];
385
+ /** The values each observation can include, as data: the manifest schema reads it. */
386
+ const BLOCK_OBSERVATION_VALUES = { "classPrices.items": [
387
+ "session",
388
+ "discount",
389
+ "passes"
390
+ ] };
338
391
  const visibleWhenPredicateSchema = z.object({
339
392
  field: z.string().min(1),
340
393
  equals: z.any().optional(),
@@ -342,13 +395,62 @@ const visibleWhenPredicateSchema = z.object({
342
395
  oneOf: z.array(z.any()).optional(),
343
396
  notIn: z.array(z.any()).optional(),
344
397
  minItems: z.number().int().nonnegative().optional(),
345
- maxItems: z.number().int().nonnegative().optional()
398
+ maxItems: z.number().int().nonnegative().optional(),
399
+ hasValue: z.boolean().optional()
400
+ });
401
+ const factPredicateSchemas = [
402
+ factPredicateSchema("catalogue.passes"),
403
+ factPredicateSchema("catalogue.memberships"),
404
+ factPredicateSchema("gifting.giftCards"),
405
+ factPredicateSchema("gifting.vouchers"),
406
+ factPredicateSchema("eventFilters.hosts"),
407
+ factPredicateSchema("eventFilters.venues"),
408
+ factPredicateSchema("eventFilters.categories"),
409
+ factPredicateSchema("appointments.resources"),
410
+ factPredicateSchema("appointments.serviceCategories")
411
+ ];
412
+ const visibleWhenFactSchema = z.union(factPredicateSchemas);
413
+ function factPredicateSchema(fact) {
414
+ return z.strictObject({
415
+ fact: z.literal(fact),
416
+ is: z.enum(CONDITION_FACT_VALUES[fact])
417
+ });
418
+ }
419
+ const visibleWhenLookSchema = z.strictObject({ look: z.enum(BLOCK_LOOK_STATES) });
420
+ const lookKnobIds = Object.keys(lookKnobBlocks);
421
+ const visibleWhenKnobSchema = z.strictObject({
422
+ knob: z.enum(lookKnobIds),
423
+ oneOf: z.array(z.string()).min(1)
346
424
  });
347
- const visibleWhenSchema = z.lazy(() => z.union([
425
+ const visibleWhenTemplateSchema = z.strictObject({ template: z.enum(["product", "page"]) });
426
+ const visibleWhenObservationSchema = z.strictObject({
427
+ observation: z.literal("classPrices.items"),
428
+ includes: z.enum(BLOCK_OBSERVATION_VALUES["classPrices.items"])
429
+ });
430
+ /**
431
+ * A condition carries exactly one kind's key. Checked on the input, before any
432
+ * arm can strip the keys it doesn't know, so `{ field, equals, look }` is a
433
+ * declaration error rather than a field test that quietly lost its Look test.
434
+ */
435
+ function checkOneConditionKind(value, ctx) {
436
+ if (typeof value !== "object" || value === null) return;
437
+ const kinds = CONDITION_KIND_KEYS.filter((key) => key in value);
438
+ if (kinds.length <= 1) return;
439
+ ctx.addIssue({
440
+ code: "custom",
441
+ message: `A condition tests one thing, but this one has ${kinds.join(", ")}. Put each test in its own condition inside allOf.`
442
+ });
443
+ }
444
+ const visibleWhenSchema = z.lazy(() => z.unknown().superRefine(checkOneConditionKind).pipe(z.union([
445
+ visibleWhenFactSchema,
446
+ visibleWhenObservationSchema,
447
+ visibleWhenLookSchema,
448
+ visibleWhenKnobSchema,
449
+ visibleWhenTemplateSchema,
348
450
  visibleWhenPredicateSchema,
349
451
  z.object({ allOf: z.array(visibleWhenSchema).min(1) }),
350
452
  z.object({ anyOf: z.array(visibleWhenSchema).min(1) })
351
- ]));
453
+ ])));
352
454
  const uiSchema = z.object({
353
455
  widget: z.string().optional(),
354
456
  preset: z.enum(["disclosure"]).optional(),
@@ -486,7 +588,12 @@ const uiSchema = z.object({
486
588
  * as primary or secondary on a button they added.
487
589
  */
488
590
  underLooks: z.literal("owner").optional(),
489
- valueContract: z.enum(["boxBackground", "location"]).optional()
591
+ valueContract: z.enum([
592
+ "boxBackground",
593
+ "location",
594
+ "sectionGround",
595
+ "sectionTreatment"
596
+ ]).optional()
490
597
  }).partial().superRefine((ui, ctx) => {
491
598
  if (ui.layoutGridColumns !== void 0 && ui.layoutGridColumnsFields !== void 0) ctx.addIssue({
492
599
  code: "custom",
@@ -764,7 +871,16 @@ const repeaterFieldSchema = baseFieldSchema.extend({
764
871
  });
765
872
  const groupFieldSchema = baseFieldSchema.extend({
766
873
  type: z.literal("group"),
767
- schema: z.object({ fields: z.lazy(() => getFieldSchemaInternal().array().min(1, "Group requires at least one field")) })
874
+ schema: z.object({ fields: z.lazy(() => getFieldSchemaInternal().array()) })
875
+ }).superRefine((field, ctx) => {
876
+ if (field.schema.fields.length === 0 && field.ui?.valueContract !== "sectionGround" && field.ui?.valueContract !== "sectionTreatment") ctx.addIssue({
877
+ code: "too_small",
878
+ origin: "array",
879
+ minimum: 1,
880
+ inclusive: true,
881
+ path: ["schema", "fields"],
882
+ message: "Group requires at least one field"
883
+ });
768
884
  });
769
885
  const modalFieldSchema = baseFieldSchema.extend({
770
886
  type: z.literal("modal"),
@@ -892,7 +1008,81 @@ const blockContentSourceSchema = z.object({
892
1008
  message: "contentType is not allowed when contentSource.kind is \"inline\""
893
1009
  });
894
1010
  });
895
- z.array(z.string().min(1)).optional(), z.string().min(1).optional();
1011
+ z.string().min(1).optional();
1012
+ //#endregion
1013
+ //#region ../site-contracts/src/blocks/editing.ts
1014
+ const fieldPathSchema = z.string().min(1);
1015
+ const phraseSchema = z.string().min(1);
1016
+ const summaryPartSchema = z.union([
1017
+ z.strictObject({
1018
+ field: fieldPathSchema,
1019
+ on: phraseSchema
1020
+ }),
1021
+ z.strictObject({
1022
+ field: fieldPathSchema,
1023
+ options: z.record(z.string(), phraseSchema.nullable())
1024
+ }),
1025
+ z.strictObject({
1026
+ field: fieldPathSchema,
1027
+ text: z.strictObject({
1028
+ before: z.string().optional(),
1029
+ after: z.string().optional(),
1030
+ empty: phraseSchema.optional()
1031
+ })
1032
+ }),
1033
+ z.strictObject({
1034
+ field: fieldPathSchema,
1035
+ set: phraseSchema,
1036
+ unset: phraseSchema.optional()
1037
+ }),
1038
+ z.strictObject({
1039
+ field: fieldPathSchema,
1040
+ count: z.strictObject({
1041
+ one: phraseSchema,
1042
+ many: phraseSchema
1043
+ })
1044
+ }),
1045
+ z.strictObject({
1046
+ field: fieldPathSchema,
1047
+ chosen: z.strictObject({
1048
+ fallback: phraseSchema,
1049
+ before: z.string().optional(),
1050
+ after: z.string().optional()
1051
+ })
1052
+ })
1053
+ ]);
1054
+ const editingGroupSchema = z.strictObject({
1055
+ /** Lower-case words joined by hyphens, so a declared id can't collide with a derived group's. */
1056
+ id: z.string().regex(/^[a-z][a-z0-9-]*$/u, "A group id is lower-case letters, numbers and hyphens"),
1057
+ title: z.string().min(1),
1058
+ fields: z.array(fieldPathSchema).min(1),
1059
+ summary: z.strictObject({
1060
+ parts: z.array(summaryPartSchema),
1061
+ none: phraseSchema
1062
+ })
1063
+ });
1064
+ const settingsSchema = z.array(z.union([fieldPathSchema, editingGroupSchema]));
1065
+ const blockEditingSchema = z.strictObject({
1066
+ content: z.array(fieldPathSchema),
1067
+ settings: settingsSchema,
1068
+ setup: z.array(fieldPathSchema).optional()
1069
+ });
1070
+ const blockEditingExtensionSchema = z.strictObject({
1071
+ content: z.array(fieldPathSchema).optional(),
1072
+ settings: settingsSchema.optional(),
1073
+ join: z.array(z.strictObject({
1074
+ group: z.string().min(1),
1075
+ fields: z.array(fieldPathSchema).min(1),
1076
+ summary: z.array(summaryPartSchema).optional()
1077
+ })).optional(),
1078
+ setup: z.array(fieldPathSchema).optional()
1079
+ });
1080
+ blockEditingSchema.optional();
1081
+ blockEditingExtensionSchema.optional();
1082
+ /** Every path a declaration places, in order: content, then settings with each group's fields. */
1083
+ function placedEditingPaths(editing) {
1084
+ return [...editing.content, ...editing.settings.flatMap((entry) => typeof entry === "string" ? [entry] : entry.fields)];
1085
+ }
896
1086
  //#endregion
897
1087
  //#region ../site-contracts/src/blocks/nodes.ts
898
1088
  const transformStepSchema = z.object({
@@ -1013,6 +1203,24 @@ const nodeTreeSchema = z.union([z.array(nodeSchema), nodeSchema]);
1013
1203
  const NodeSchema = nodeSchema;
1014
1204
  const NodeTreeSchema = nodeTreeSchema;
1015
1205
  //#endregion
1206
+ //#region ../theme-core/src/site-styles/sectionPhoto.ts
1207
+ /**
1208
+ * A section photo, decided once. The block declares that it keeps one
1209
+ * (`sectionPhoto` on its manifest: the hero does); the authoring Look says how
1210
+ * it uses it; the current draft says whether there is one. Field visibility,
1211
+ * the Background row and the rich-background check all read these decisions
1212
+ * rather than guessing.
1213
+ */
1214
+ /** Where a section photo is stored: the image tab of the section's Background. */
1215
+ const sectionPhotoPath = "_sectionStyles.background.image";
1216
+ /** The photo a section keeps, wherever its background `type` points. */
1217
+ function storedSectionPhoto(content) {
1218
+ return readRecord(readRecord(readRecord(content._sectionStyles)?.background)?.image);
1219
+ }
1220
+ function readRecord(value) {
1221
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
1222
+ }
1223
+ //#endregion
1016
1224
  //#region ../theme-core/src/site-styles/sectionGround.ts
1017
1225
  /** A section that declares no ground of its own sits on the page background. */
1018
1226
  const pageGround = { fallback: requireGroundToken("background") };
@@ -4366,8 +4574,10 @@ function EventHeader({ selection, presentation, showCost, showCapacity }) {
4366
4574
  "aria-label": "At a glance",
4367
4575
  children: part("facts")
4368
4576
  }),
4369
- part("availability"),
4370
- part("action")
4577
+ item.availability || item.action ? /* @__PURE__ */ jsxs("div", {
4578
+ ...listLookSlot(presentation, "booking"),
4579
+ children: [part("availability"), part("action")]
4580
+ }) : null
4371
4581
  ]
4372
4582
  }),
4373
4583
  part("numeral")
@@ -4377,7 +4587,8 @@ function EventHeader({ selection, presentation, showCost, showCapacity }) {
4377
4587
  const eventHeaderSlotParents = {
4378
4588
  frame: null,
4379
4589
  copy: "frame",
4380
- availability: "copy",
4590
+ booking: "copy",
4591
+ availability: "booking",
4381
4592
  "item-media": "frame"
4382
4593
  };
4383
4594
  //#endregion
@@ -4409,15 +4620,23 @@ const lookParts = {
4409
4620
  "track"
4410
4621
  ]
4411
4622
  }],
4412
- "block.event-details": [{
4413
- part: "title",
4414
- fields: ["showTitle"],
4415
- shownIn: ["details-panel"]
4416
- }, {
4417
- part: "description",
4418
- fields: ["showDescription"],
4419
- shownIn: ["details-panel"]
4420
- }]
4623
+ "block.event-details": [
4624
+ {
4625
+ part: "heading",
4626
+ fields: ["heading"],
4627
+ shownIn: ["details-panel"]
4628
+ },
4629
+ {
4630
+ part: "title",
4631
+ fields: ["showTitle"],
4632
+ shownIn: ["details-panel"]
4633
+ },
4634
+ {
4635
+ part: "description",
4636
+ fields: ["showDescription"],
4637
+ shownIn: ["details-panel"]
4638
+ }
4639
+ ]
4421
4640
  };
4422
4641
  /** Fields the arrangement leaves out. Nothing on an older style, where no arrangement Look shows the block. */
4423
4642
  function fieldsNotShownIn(blockKind, arrangement) {
@@ -4428,6 +4647,17 @@ function lookPartShown(blockKind, field, arrangement) {
4428
4647
  return !fieldsNotShownIn(blockKind, arrangement).includes(field);
4429
4648
  }
4430
4649
  //#endregion
4650
+ //#region ../blocks/src/system/runtime/nodes/event-details/detailSlots.ts
4651
+ function resolveDetailSlots(presentation) {
4652
+ return {
4653
+ detail: listLookSlot(presentation, "detail"),
4654
+ label: listLookSlot(presentation, "detail-label"),
4655
+ value: listLookSlot(presentation, "detail-value"),
4656
+ sessions: listLookSlot(presentation, "sessions"),
4657
+ session: listLookSlot(presentation, "session")
4658
+ };
4659
+ }
4660
+ //#endregion
4431
4661
  //#region ../blocks/src/system/runtime/nodes/events/shared/DateTimeTile.tsx
4432
4662
  /**
4433
4663
  * Shared tile content for displaying date and time range.
@@ -4447,49 +4677,105 @@ function DateTimeTile(props) {
4447
4677
  });
4448
4678
  }
4449
4679
  //#endregion
4450
- //#region ../blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.tsx
4680
+ //#region ../blocks/src/system/runtime/nodes/event-details/eventPriceSummary.ts
4681
+ function decideEventPriceSummary(input) {
4682
+ if (input.options.length < 2) return {
4683
+ kind: "price",
4684
+ price: input.price,
4685
+ depositNote: input.depositNote
4686
+ };
4687
+ return {
4688
+ kind: "options",
4689
+ range: input.optionsCoverEveryPrice ? null : input.price,
4690
+ options: input.options,
4691
+ depositNote: input.depositNote
4692
+ };
4693
+ }
4451
4694
  /** A course lists every active option, whether or not its sale window is open. */
4452
4695
  function wholeSeriesPriceOptions(pricing) {
4453
4696
  return pricing.kind === "tiered" ? pricing.options.filter((option) => option.isActive) : [];
4454
4697
  }
4698
+ function wholeSeriesPriceSummary(pricing, depositNote) {
4699
+ return decideEventPriceSummary({
4700
+ price: formatBookingPriceDisplay(publicEventPricingDisplay(pricing), { decimals: "auto" }),
4701
+ options: wholeSeriesPriceOptions(pricing).map((option) => ({
4702
+ id: option.id,
4703
+ name: option.name,
4704
+ description: option.description,
4705
+ price: formatEventPriceAmount(option.priceAmount, pricing.currency)
4706
+ })),
4707
+ depositNote,
4708
+ optionsCoverEveryPrice: true
4709
+ });
4710
+ }
4711
+ //#endregion
4712
+ //#region ../blocks/src/system/runtime/nodes/event-details/EventFactRows.tsx
4713
+ /**
4714
+ * An event's facts as a short list: one row per fact, a small icon where a
4715
+ * label would be. The labels stay for screen readers. Each row is a direct
4716
+ * child of the list, so a site style's `facts > *` rules still reach it.
4717
+ */
4718
+ function EventFactList({ slot, children }) {
4719
+ return /* @__PURE__ */ jsx("dl", {
4720
+ ...slot,
4721
+ className: "rb-event-facts",
4722
+ children
4723
+ });
4724
+ }
4725
+ function EventFactRow({ fact, label, icon: Icon, slots, children }) {
4726
+ return /* @__PURE__ */ jsxs("div", {
4727
+ ...slots.detail,
4728
+ "data-fact": fact,
4729
+ children: [/* @__PURE__ */ jsx("dt", {
4730
+ ...slots.label,
4731
+ className: "rb-sr-only",
4732
+ children: label
4733
+ }), /* @__PURE__ */ jsxs("dd", {
4734
+ className: "rb-event-fact",
4735
+ children: [/* @__PURE__ */ jsx(Icon, {
4736
+ className: "rb-event-fact-icon",
4737
+ strokeWidth: 1.75
4738
+ }), /* @__PURE__ */ jsx("div", {
4739
+ ...slots.value,
4740
+ className: "rb-event-fact-text",
4741
+ children
4742
+ })]
4743
+ })]
4744
+ });
4745
+ }
4455
4746
  /** The price, with any deposit option said beside it. */
4456
4747
  function PriceLine({ price, depositNote }) {
4457
4748
  return /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: price }), depositNote ? `, ${depositNote}` : null] });
4458
4749
  }
4459
- function WholeSeriesPricingDisplay({ pricing, depositNote, acceptedItems }) {
4460
- const options = wholeSeriesPriceOptions(pricing);
4461
- return /* @__PURE__ */ jsxs("div", {
4462
- className: "rb-mt-6",
4463
- children: [
4464
- /* @__PURE__ */ jsx("div", {
4465
- className: "rb-label rb-mb-2",
4466
- children: options.length > 1 ? "Pricing" : "Cost"
4467
- }),
4468
- options.length > 1 ? /* @__PURE__ */ jsx("div", {
4469
- className: "rb-flex rb-flex-col rb-gap-2",
4470
- children: options.map((option) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("strong", { children: [
4471
- option.name,
4472
- ":",
4473
- " ",
4474
- formatEventPriceAmount(option.priceAmount, pricing.currency)
4475
- ] }), option.description ? /* @__PURE__ */ jsx("p", {
4476
- className: "rb-caption status-muted",
4477
- children: option.description
4478
- }) : null] }, option.id))
4479
- }) : /* @__PURE__ */ jsx(PriceLine, {
4480
- price: formatBookingPriceDisplay(publicEventPricingDisplay(pricing), { decimals: "auto" }),
4481
- depositNote
4482
- }),
4483
- depositNote && options.length > 1 ? /* @__PURE__ */ jsxs("p", {
4484
- className: "rb-caption rb-mt-1",
4485
- children: [depositNote.charAt(0).toUpperCase(), depositNote.slice(1)]
4486
- }) : null,
4487
- acceptedItems.length > 0 ? /* @__PURE__ */ jsxs("p", {
4488
- className: "rb-caption rb-mt-1",
4489
- children: ["You can also attend with: ", acceptedItems.join(", ")]
4490
- }) : null
4491
- ]
4492
- });
4750
+ /** Each price sits next to its name. Descriptions put one option on each line. */
4751
+ function PriceOptionList({ options }) {
4752
+ return /* @__PURE__ */ jsx("ul", {
4753
+ className: "rb-event-price-options",
4754
+ "data-described": options.some((option) => option.description) ? "" : void 0,
4755
+ children: options.map((option) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsxs("span", { children: [
4756
+ /* @__PURE__ */ jsx("strong", { children: option.price }),
4757
+ " ",
4758
+ option.name
4759
+ ] }), option.description ? /* @__PURE__ */ jsx("span", {
4760
+ className: "rb-caption rb-event-fact-muted",
4761
+ children: option.description
4762
+ }) : null] }, option.id))
4763
+ });
4764
+ }
4765
+ const sentence = (text) => `${text.charAt(0).toUpperCase()}${text.slice(1)}`;
4766
+ function EventPriceSummaryLines({ summary }) {
4767
+ if (summary.kind === "price") return /* @__PURE__ */ jsx(PriceLine, {
4768
+ price: summary.price,
4769
+ depositNote: summary.depositNote
4770
+ });
4771
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
4772
+ summary.range ? /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: summary.range }) }) : null,
4773
+ /* @__PURE__ */ jsx(PriceOptionList, { options: summary.options }),
4774
+ summary.depositNote ? /* @__PURE__ */ jsxs("p", {
4775
+ className: "rb-caption rb-event-fact-muted",
4776
+ children: [sentence(summary.depositNote), "."]
4777
+ }) : null
4778
+ ] });
4493
4779
  }
4494
4780
  //#endregion
4495
4781
  //#region ../blocks/src/system/runtime/nodes/event-details/view.tsx
@@ -4508,111 +4794,115 @@ function TeamMemberName({ name, profilePath }) {
4508
4794
  function formatTicketTypePrice(ticketType, currency) {
4509
4795
  return formatBookingPriceDisplay(resolveExactOrFreePriceDisplay(ticketType.priceAmount, currency), { decimals: "auto" });
4510
4796
  }
4797
+ /** A room's prices depend on the room, so the booking form shows them with it, not the price list. */
4798
+ const roomPriceIdsOf = (event) => event.rooms?.linkedOptionIds ?? [];
4799
+ /** With a room's prices left out of the list, the range line stays to say how far prices go. */
4800
+ const hasRoomPrices = (event) => event.pricing.kind === "tiered" && event.pricing.options.some((option) => roomPriceIdsOf(event).includes(option.id));
4511
4801
  function getDisplayablePricingOptions(event) {
4512
- const roomPriceIds = event.rooms?.linkedOptionIds ?? [];
4802
+ const roomPriceIds = roomPriceIdsOf(event);
4513
4803
  return event.pricing.kind === "tiered" ? event.pricing.options.filter(isPublicEventPricingOptionDisplayable).filter((option) => !roomPriceIds.includes(option.id)).sort((left, right) => left.sortOrder - right.sortOrder) : [];
4514
4804
  }
4515
- function TicketTypePriceList({ ticketTypes, currency }) {
4516
- if (ticketTypes.length === 0) return null;
4517
- return /* @__PURE__ */ jsx("div", {
4518
- className: "rb-mt-3 rb-flex rb-flex-col rb-gap-2",
4519
- children: ticketTypes.map((ticketType) => /* @__PURE__ */ jsxs("div", {
4520
- className: "rb-flex rb-items-start rb-justify-between rb-gap-4",
4521
- children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: ticketType.name }), ticketType.description ? /* @__PURE__ */ jsx("p", {
4522
- className: "rb-caption status-muted",
4523
- children: ticketType.description
4524
- }) : null] }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: formatTicketTypePrice(ticketType, currency) }) })]
4525
- }, ticketType.id))
4526
- });
4527
- }
4528
- function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, depositNote, eventPricingCurrency, ticketTypes, autoApplyDiscount }) {
4529
- if (isDropIn) return /* @__PURE__ */ jsxs("div", {
4530
- className: "rb-mt-6",
4531
- children: [/* @__PURE__ */ jsx("div", {
4532
- className: "rb-label rb-mb-2",
4533
- children: "Registration"
4534
- }), /* @__PURE__ */ jsx("p", {
4535
- className: "rb-caption status-muted",
4536
- children: "No registration required - just show up"
4537
- })]
4538
- });
4539
- if (wholeSeriesPricingDisplay) return /* @__PURE__ */ jsx(WholeSeriesPricingDisplay, {
4540
- pricing: wholeSeriesPricingDisplay,
4541
- depositNote,
4542
- acceptedItems: [...acceptedItems]
4543
- });
4544
- if (eventCostLabel) return /* @__PURE__ */ jsxs("div", {
4545
- className: "rb-mt-6",
4805
+ function ticketPriceSummary(pricing, price) {
4806
+ const currency = pricing.eventPricingCurrency;
4807
+ return decideEventPriceSummary({
4808
+ price,
4809
+ options: currency ? pricing.ticketTypes.map((ticketType) => ({
4810
+ id: ticketType.id,
4811
+ name: ticketType.name,
4812
+ description: ticketType.description,
4813
+ price: formatTicketTypePrice(ticketType, currency)
4814
+ })) : [],
4815
+ depositNote: pricing.depositNote,
4816
+ optionsCoverEveryPrice: pricing.ticketsCoverEveryPrice
4817
+ });
4818
+ }
4819
+ function AcceptedItemsLine({ acceptedItems }) {
4820
+ return acceptedItems.length > 0 ? /* @__PURE__ */ jsxs("p", {
4821
+ className: "rb-caption",
4822
+ children: ["You can also attend with: ", acceptedItems.join(", ")]
4823
+ }) : null;
4824
+ }
4825
+ /** The price row, in whichever form this event's pricing takes. */
4826
+ function EventPricingDetails(props) {
4827
+ const { acceptedItems, slots } = props;
4828
+ if (props.isDropIn) return /* @__PURE__ */ jsx(EventFactRow, {
4829
+ slots,
4830
+ fact: "registration",
4831
+ label: "Registration",
4832
+ icon: TicketIcon,
4833
+ children: /* @__PURE__ */ jsx("p", { children: "No registration required - just show up" })
4834
+ });
4835
+ if (props.wholeSeriesPricingDisplay) return /* @__PURE__ */ jsxs(EventFactRow, {
4836
+ slots,
4837
+ fact: "price",
4838
+ label: "Cost",
4839
+ icon: TicketIcon,
4840
+ children: [/* @__PURE__ */ jsx(EventPriceSummaryLines, { summary: wholeSeriesPriceSummary(props.wholeSeriesPricingDisplay, props.depositNote) }), /* @__PURE__ */ jsx(AcceptedItemsLine, { acceptedItems })]
4841
+ });
4842
+ if (props.eventCostLabel) return /* @__PURE__ */ jsxs(EventFactRow, {
4843
+ slots,
4844
+ fact: "price",
4845
+ label: "Cost",
4846
+ icon: TicketIcon,
4546
4847
  children: [
4547
- /* @__PURE__ */ jsx("div", {
4548
- className: "rb-label rb-mb-2",
4549
- children: "Cost"
4550
- }),
4551
- /* @__PURE__ */ jsx(PriceLine, {
4552
- price: eventCostLabel,
4553
- depositNote
4554
- }),
4555
- autoApplyDiscount && eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
4556
- className: "rb-caption rb-mt-1",
4557
- children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency)
4558
- }) : null,
4559
- eventPricingCurrency && ticketTypes.length > 1 ? /* @__PURE__ */ jsx(TicketTypePriceList, {
4560
- ticketTypes,
4561
- currency: eventPricingCurrency
4848
+ /* @__PURE__ */ jsx(EventPriceSummaryLines, { summary: ticketPriceSummary(props, props.eventCostLabel) }),
4849
+ props.autoApplyDiscount && props.eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
4850
+ className: "rb-caption",
4851
+ children: formatAutoApplyDiscountLine(props.autoApplyDiscount, props.eventPricingCurrency)
4562
4852
  }) : null,
4563
- acceptedItems.length > 0 ? /* @__PURE__ */ jsxs("p", {
4564
- className: "rb-caption rb-mt-1",
4565
- children: ["You can also attend with: ", acceptedItems.join(", ")]
4566
- }) : null
4853
+ /* @__PURE__ */ jsx(AcceptedItemsLine, { acceptedItems })
4567
4854
  ]
4568
4855
  });
4569
- return acceptedItems.length > 0 ? /* @__PURE__ */ jsx("div", {
4570
- className: "rb-mt-6",
4571
- children: /* @__PURE__ */ jsxs("p", {
4572
- className: "rb-caption",
4573
- children: ["You can also attend with: ", acceptedItems.join(", ")]
4574
- })
4856
+ return acceptedItems.length > 0 ? /* @__PURE__ */ jsx(EventFactRow, {
4857
+ slots,
4858
+ fact: "accepted",
4859
+ label: "Passes and memberships",
4860
+ icon: TicketIcon,
4861
+ children: /* @__PURE__ */ jsx(AcceptedItemsLine, { acceptedItems })
4575
4862
  }) : null;
4576
4863
  }
4577
- function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots }) {
4864
+ function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots, slots }) {
4578
4865
  const { date, timeRange } = formatEventDateParts({
4579
4866
  startsAt: selected.startsAt,
4580
4867
  endsAt: selected.endsAt,
4581
4868
  ...eventDateOptions(selected)
4582
4869
  });
4583
4870
  const dateHeading = selection.kind === "wholeSeries" ? runLifecycleLabel(selection.lifecycle) : selection.mode === "next" ? "Next date" : "Date";
4584
- return /* @__PURE__ */ jsxs("div", {
4585
- ...listLookSlot({ lookSlots }, "facts"),
4586
- className: "rb-flex rb-flex-col rb-gap-4",
4871
+ return /* @__PURE__ */ jsxs(EventFactList, {
4872
+ slot: listLookSlot({ lookSlots }, "facts"),
4587
4873
  children: [
4588
- /* @__PURE__ */ jsxs("div", { children: [
4589
- /* @__PURE__ */ jsx("div", {
4590
- className: "rb-label rb-mb-2",
4591
- children: dateHeading
4592
- }),
4593
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
4594
- /* @__PURE__ */ jsx("p", {
4595
- className: "rb-caption",
4874
+ /* @__PURE__ */ jsxs(EventFactRow, {
4875
+ slots,
4876
+ fact: "date",
4877
+ label: dateHeading,
4878
+ icon: CalendarIcon,
4879
+ children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }), /* @__PURE__ */ jsx("p", {
4880
+ className: "rb-event-fact-muted",
4596
4881
  children: timeRange
4597
- })
4598
- ] }),
4882
+ })]
4883
+ }),
4599
4884
  /* @__PURE__ */ jsx(EventVenueFact, {
4600
4885
  venue,
4601
4886
  online,
4602
- addressAfterBooking
4887
+ addressAfterBooking,
4888
+ slots
4603
4889
  }),
4604
- /* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
4605
- showCapacity && selected.capacity != null ? /* @__PURE__ */ jsxs("div", {
4606
- className: "rb-mt-6",
4607
- children: [/* @__PURE__ */ jsx("div", {
4608
- className: "rb-label rb-mb-2",
4609
- children: "Places"
4610
- }), /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })]
4890
+ /* @__PURE__ */ jsx(EventTeacherFacts, {
4891
+ teamMembers,
4892
+ slots
4893
+ }),
4894
+ showCapacity && selected.capacity != null ? /* @__PURE__ */ jsx(EventFactRow, {
4895
+ slots,
4896
+ fact: "places",
4897
+ label: "Places",
4898
+ icon: UsersIcon,
4899
+ children: /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })
4611
4900
  }) : null,
4612
4901
  pricing,
4613
4902
  selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
4614
4903
  phase: selection.bookingPhase,
4615
- event: selected
4904
+ event: selected,
4905
+ slots
4616
4906
  }) : null
4617
4907
  ]
4618
4908
  });
@@ -4621,84 +4911,80 @@ const eventOnlinePlaceShown = (event, showVenue) => showVenue ? eventOnlinePlace
4621
4911
  const hasEventPlaceFact = (event, showVenue) => showVenue && (Boolean(event.venue) || eventOnlinePlace(event) !== null || event.addressAfterBooking === true);
4622
4912
  const addressAfterBookingShown = (event, showVenue) => showVenue && event.addressAfterBooking === true;
4623
4913
  /** Where a venue would go: online, the owner's word that the address follows the booking, or nothing at all. */
4624
- function EventPlaceWithoutVenue({ online, addressAfterBooking }) {
4914
+ function EventPlaceWithoutVenue({ online, addressAfterBooking, slots }) {
4625
4915
  if (!online && !addressAfterBooking) return null;
4626
- if (!online) return /* @__PURE__ */ jsxs("div", {
4627
- className: "rb-mt-6",
4628
- children: [/* @__PURE__ */ jsx("div", {
4629
- className: "rb-label rb-mb-2",
4630
- children: "Venue"
4631
- }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: EVENT_ADDRESS_AFTER_BOOKING_LABEL }) })]
4916
+ if (!online) return /* @__PURE__ */ jsx(EventFactRow, {
4917
+ slots,
4918
+ fact: "venue",
4919
+ label: "Venue",
4920
+ icon: MapPinIcon,
4921
+ children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: EVENT_ADDRESS_AFTER_BOOKING_LABEL }) })
4632
4922
  });
4633
- return /* @__PURE__ */ jsxs("div", {
4634
- className: "rb-mt-6",
4923
+ return /* @__PURE__ */ jsxs(EventFactRow, {
4924
+ slots,
4925
+ fact: "venue",
4926
+ label: "Venue",
4927
+ icon: GlobeIcon,
4635
4928
  children: [
4636
- /* @__PURE__ */ jsx("div", {
4637
- className: "rb-label rb-mb-2",
4638
- children: "Venue"
4639
- }),
4640
4929
  /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: online.mode === "online" ? "Online" : "In person or online" }) }),
4641
4930
  addressAfterBooking ? /* @__PURE__ */ jsxs("p", {
4642
- className: "rb-caption",
4931
+ className: "rb-caption rb-event-fact-muted",
4643
4932
  children: [EVENT_ADDRESS_AFTER_BOOKING_LABEL, "."]
4644
4933
  }) : null,
4645
4934
  online.note ? /* @__PURE__ */ jsx("p", {
4646
- className: "rb-caption",
4935
+ className: "rb-caption rb-event-fact-muted",
4647
4936
  children: online.note
4648
4937
  }) : null
4649
4938
  ]
4650
4939
  });
4651
4940
  }
4652
4941
  /** An online event says so where a venue would go; a hybrid one adds it under the venue. */
4653
- function EventVenueFact({ venue, online, addressAfterBooking }) {
4942
+ function EventVenueFact({ venue, online, addressAfterBooking, slots }) {
4654
4943
  if (!venue) return /* @__PURE__ */ jsx(EventPlaceWithoutVenue, {
4655
4944
  online,
4656
- addressAfterBooking
4945
+ addressAfterBooking,
4946
+ slots
4657
4947
  });
4658
4948
  const { place, addressWithBooking } = eventVenuePlace(venue);
4659
- return /* @__PURE__ */ jsxs("div", {
4660
- className: "rb-mt-6",
4949
+ return /* @__PURE__ */ jsxs(EventFactRow, {
4950
+ slots,
4951
+ fact: "venue",
4952
+ label: "Venue",
4953
+ icon: MapPinIcon,
4661
4954
  children: [
4662
- /* @__PURE__ */ jsx("div", {
4663
- className: "rb-label rb-mb-2",
4664
- children: "Venue"
4665
- }),
4666
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: venue.name }) }),
4667
- place ? /* @__PURE__ */ jsx("p", {
4668
- className: "rb-caption",
4669
- children: place
4670
- }) : null,
4955
+ /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: venue.name }), place ? `, ${place}` : null] }),
4671
4956
  addressWithBooking ? /* @__PURE__ */ jsx("p", {
4672
- className: "rb-caption rb-mt-1",
4957
+ className: "rb-caption rb-event-fact-muted",
4673
4958
  children: "The full address and directions come with your booking confirmation."
4674
4959
  }) : /* @__PURE__ */ jsx(LocationMapActions, {
4675
4960
  location: venue.location,
4676
4961
  addressText: venue.address
4677
4962
  }),
4678
4963
  online ? /* @__PURE__ */ jsxs("p", {
4679
- className: "rb-caption rb-mt-1",
4964
+ className: "rb-caption rb-event-fact-muted",
4680
4965
  children: ["You can also join online.", online.note ? ` ${online.note}` : ""]
4681
4966
  }) : null
4682
4967
  ]
4683
4968
  });
4684
4969
  }
4685
- function EventTeacherFacts({ teamMembers }) {
4686
- return teamMembers.length ? /* @__PURE__ */ jsxs("div", {
4687
- className: "rb-mt-6",
4688
- children: [/* @__PURE__ */ jsx("div", {
4689
- className: "rb-label rb-mb-2",
4690
- children: "With"
4691
- }), /* @__PURE__ */ jsx("div", {
4692
- className: "rb-flex rb-flex-col rb-gap-3",
4693
- children: teamMembers.map((member) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(TeamMemberName, {
4694
- name: member.name,
4695
- profilePath: member.profilePath
4696
- }) }), member.summary ? /* @__PURE__ */ jsx("p", {
4697
- className: "rb-caption status-muted",
4698
- children: member.summary
4699
- }) : null] }, member.id))
4700
- })]
4701
- }) : null;
4970
+ /** "With Alice", "With Alice and Ben", "With Alice, Ben and Cara". */
4971
+ const nameSeparator = (index, count) => index === 0 ? "" : index === count - 1 ? " and " : ", ";
4972
+ function EventTeacherFacts({ teamMembers, slots }) {
4973
+ if (teamMembers.length === 0) return null;
4974
+ const described = teamMembers.filter((member) => member.summary);
4975
+ return /* @__PURE__ */ jsxs(EventFactRow, {
4976
+ slots,
4977
+ fact: "team",
4978
+ label: "With",
4979
+ icon: UserIcon,
4980
+ children: [/* @__PURE__ */ jsxs("p", { children: ["With ", teamMembers.map((member, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [nameSeparator(index, teamMembers.length), /* @__PURE__ */ jsx(TeamMemberName, {
4981
+ name: member.name,
4982
+ profilePath: member.profilePath
4983
+ })] }, member.id))] }), described.map((member) => /* @__PURE__ */ jsxs("p", {
4984
+ className: "rb-caption rb-event-fact-muted",
4985
+ children: [teamMembers.length > 1 ? `${member.name}: ` : null, member.summary]
4986
+ }, member.id))]
4987
+ });
4702
4988
  }
4703
4989
  /**
4704
4990
  * Where the run has got to, in the words a visitor would use.
@@ -4722,20 +5008,16 @@ function runLifecycleLabel(lifecycle) {
4722
5008
  * the booking panel beside it says cancelled is the contradiction a visitor
4723
5009
  * actually notices.
4724
5010
  */
4725
- function BookingState({ phase, event }) {
4726
- return /* @__PURE__ */ jsxs("div", {
4727
- className: "rb-mt-6",
4728
- children: [
4729
- /* @__PURE__ */ jsx("div", {
4730
- className: "rb-label rb-mb-2",
4731
- children: "Booking"
4732
- }),
4733
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }),
4734
- phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
4735
- className: "rb-caption",
4736
- children: bookingClosedReason(phase.reason)
4737
- }) : null
4738
- ]
5011
+ function BookingState({ phase, event, slots }) {
5012
+ return /* @__PURE__ */ jsxs(EventFactRow, {
5013
+ slots,
5014
+ fact: "booking",
5015
+ label: "Booking",
5016
+ icon: InfoIcon,
5017
+ children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }), phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
5018
+ className: "rb-caption rb-event-fact-muted",
5019
+ children: bookingClosedReason(phase.reason)
5020
+ }) : null]
4739
5021
  });
4740
5022
  }
4741
5023
  function bookingClosedReason(reason) {
@@ -4756,16 +5038,19 @@ function bookingClosedReason(reason) {
4756
5038
  * the list and says so: dropping it would leave a visitor wondering whether
4757
5039
  * they had misremembered the dates.
4758
5040
  */
4759
- function SessionSchedule({ sessions, event }) {
5041
+ function SessionSchedule({ sessions, event, slots }) {
4760
5042
  if (sessions.length === 0) return null;
4761
5043
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
5044
+ ...slots.label,
4762
5045
  className: "rb-label",
4763
5046
  children: "Session schedule"
4764
5047
  }), /* @__PURE__ */ jsx("div", {
5048
+ ...slots.sessions,
4765
5049
  className: "rb-mt-2 rb-tiles-grid",
4766
5050
  children: sessions.map((session) => {
4767
5051
  const cancelled = session.status === CANCELLED_SESSION_STATUS;
4768
5052
  return /* @__PURE__ */ jsxs("div", {
5053
+ ...slots.session,
4769
5054
  className: `rb-tile${cancelled ? " rb-tile--cancelled" : ""}`,
4770
5055
  children: [/* @__PURE__ */ jsx(DateTimeTile, {
4771
5056
  startsAt: session.startsAt,
@@ -4782,20 +5067,24 @@ function SessionSchedule({ sessions, event }) {
4782
5067
  })
4783
5068
  })] });
4784
5069
  }
4785
- function OtherEventDates({ selection }) {
5070
+ function OtherEventDates({ selection, slots }) {
4786
5071
  if (selection.kind === "empty") return null;
4787
5072
  if (selection.kind === "wholeSeries") return /* @__PURE__ */ jsx(SessionSchedule, {
4788
5073
  sessions: selection.sessions,
4789
- event: selection.selected
5074
+ event: selection.selected,
5075
+ slots
4790
5076
  });
4791
5077
  const dates = selection.otherDates;
4792
5078
  if (dates.length === 0) return null;
4793
5079
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
5080
+ ...slots.label,
4794
5081
  className: "rb-label",
4795
5082
  children: "Other dates"
4796
5083
  }), /* @__PURE__ */ jsx("div", {
5084
+ ...slots.sessions,
4797
5085
  className: "rb-mt-2 rb-tiles-grid",
4798
5086
  children: dates.map((event) => /* @__PURE__ */ jsx("a", {
5087
+ ...slots.session,
4799
5088
  className: "rb-tile rb-tile--interactive",
4800
5089
  ...resolveEventPageLink(event),
4801
5090
  children: /* @__PURE__ */ jsx(DateTimeTile, {
@@ -4841,7 +5130,8 @@ function selectedEventPricing(selection, showCost) {
4841
5130
  eventCostLabel: showEventCost ? formatEventPrice(event) : null,
4842
5131
  depositNote: showCost && !isDropIn && isPaid(event) ? formatEventDepositNote(selection.depositOffer) : null,
4843
5132
  eventPricingCurrency: publicEventPricingCurrency(event.pricing),
4844
- ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
5133
+ ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : [],
5134
+ ticketsCoverEveryPrice: !hasRoomPrices(event)
4845
5135
  };
4846
5136
  }
4847
5137
  const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
@@ -4866,6 +5156,7 @@ function SelectedEventDetailsView(props) {
4866
5156
  className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
4867
5157
  children: [/* @__PURE__ */ jsx(EventFacts, {
4868
5158
  lookSlots: props.lookSlots,
5159
+ slots: props.slots,
4869
5160
  selection,
4870
5161
  selected,
4871
5162
  venue,
@@ -4876,7 +5167,8 @@ function SelectedEventDetailsView(props) {
4876
5167
  pricing: /* @__PURE__ */ jsx(EventPricingDetails, {
4877
5168
  ...pricing,
4878
5169
  acceptedItems,
4879
- autoApplyDiscount: props.autoApplyDiscount ?? null
5170
+ autoApplyDiscount: props.autoApplyDiscount ?? null,
5171
+ slots: props.slots
4880
5172
  })
4881
5173
  }), /* @__PURE__ */ jsx(EventVenueMap, {
4882
5174
  venue,
@@ -4886,7 +5178,10 @@ function SelectedEventDetailsView(props) {
4886
5178
  drawing: props.selectedVenueDrawing
4887
5179
  })]
4888
5180
  }),
4889
- showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, { selection }) : null
5181
+ showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, {
5182
+ selection,
5183
+ slots: props.slots
5184
+ }) : null
4890
5185
  ]
4891
5186
  });
4892
5187
  }
@@ -4897,6 +5192,7 @@ function LegacyEventDetailsView(props) {
4897
5192
  });
4898
5193
  return /* @__PURE__ */ jsx(SelectedEventDetailsView, {
4899
5194
  lookSlots: props.lookSlots,
5195
+ slots: resolveDetailSlots(props),
4900
5196
  selection: props.selection,
4901
5197
  showVenue: props.showVenue,
4902
5198
  showMap: props.showMap,
@@ -4946,36 +5242,47 @@ function EventDetailsView(input) {
4946
5242
  function EventHeaderPanel(props) {
4947
5243
  const content = headerPanelContent(props);
4948
5244
  if (!content.hasFacts && !content.hasMap && !content.hasDates) return null;
5245
+ const slots = resolveDetailSlots(props);
4949
5246
  return /* @__PURE__ */ jsx("div", {
4950
5247
  ...listLookSlot(props, "panel"),
4951
5248
  children: /* @__PURE__ */ jsxs("div", {
4952
5249
  className: "rb-flex rb-flex-col rb-gap-6 rb-text-left",
4953
5250
  children: [content.hasFacts || content.hasMap ? /* @__PURE__ */ jsxs("div", {
4954
5251
  className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
4955
- children: [content.hasFacts ? /* @__PURE__ */ jsx(HeaderPanelFacts, { ...content }) : null, /* @__PURE__ */ jsx(EventVenueMap, {
5252
+ children: [content.hasFacts ? /* @__PURE__ */ jsx(HeaderPanelFacts, {
5253
+ ...content,
5254
+ slots
5255
+ }) : null, /* @__PURE__ */ jsx(EventVenueMap, {
4956
5256
  venue: content.venue,
4957
5257
  showMap: props.showMap,
4958
5258
  drawing: props.selectedVenueDrawing,
4959
5259
  mapHeight: props.mapHeight ?? 200,
4960
5260
  mapClassName: props.mapClassName ?? "event-details-map"
4961
5261
  })]
4962
- }) : null, content.hasDates ? /* @__PURE__ */ jsx(OtherEventDates, { selection: props.selection }) : null]
5262
+ }) : null, content.hasDates ? /* @__PURE__ */ jsx(OtherEventDates, {
5263
+ selection: props.selection,
5264
+ slots
5265
+ }) : null]
4963
5266
  })
4964
5267
  });
4965
5268
  }
4966
- function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing }) {
4967
- return /* @__PURE__ */ jsxs("div", {
4968
- className: "rb-flex rb-flex-col rb-gap-4",
4969
- children: [
4970
- /* @__PURE__ */ jsx(EventVenueFact, {
4971
- venue,
4972
- online,
4973
- addressAfterBooking
4974
- }),
4975
- /* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
4976
- pricing ? /* @__PURE__ */ jsx(EventPricingDetails, { ...pricing }) : null
4977
- ]
4978
- });
5269
+ function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing, slots }) {
5270
+ return /* @__PURE__ */ jsxs(EventFactList, { children: [
5271
+ /* @__PURE__ */ jsx(EventVenueFact, {
5272
+ venue,
5273
+ online,
5274
+ addressAfterBooking,
5275
+ slots
5276
+ }),
5277
+ /* @__PURE__ */ jsx(EventTeacherFacts, {
5278
+ teamMembers,
5279
+ slots
5280
+ }),
5281
+ pricing ? /* @__PURE__ */ jsx(EventPricingDetails, {
5282
+ ...pricing,
5283
+ slots
5284
+ }) : null
5285
+ ] });
4979
5286
  }
4980
5287
  /** What the panel has to add to the header, decided once. */
4981
5288
  function headerPanelContent(props) {
@@ -6093,9 +6400,72 @@ function createBoxStylesFieldWithDepth(type, options = {}) {
6093
6400
  }
6094
6401
  };
6095
6402
  }
6403
+ /**
6404
+ * Creates a modal field group for styling full-width sections.
6405
+ *
6406
+ * Section styles include:
6407
+ * - Background (color/gradient/image with advanced options)
6408
+ * - Inner spacing (vertical padding)
6409
+ *
6410
+ * Sections are full-width wrappers that span the entire viewport, so they don't
6411
+ * support rounded corners or elevation shadows (unlike containers and cards).
6412
+ *
6413
+ * Use with the `backgroundLayer()` helper to render backgrounds in the block layout.
6414
+ *
6415
+ * @param options - Customization options for the field
6416
+ * @param options.id - Field ID (default: '_sectionStyles')
6417
+ * @param options.label - Field label (default: 'Section styles')
6418
+ * @param options.includeBackground - Whether to include background field (default: true)
6419
+ * @returns A modal FieldDefinition that can be added to a block's fields array
6420
+ *
6421
+ * @example
6422
+ * // Basic usage in a block
6423
+ * const fields = [
6424
+ * // ... other fields
6425
+ * sectionStylesField({
6426
+ * id: '_sectionStyles',
6427
+ * label: 'Section styles',
6428
+ * }),
6429
+ * ]
6430
+ *
6431
+ * @example
6432
+ * // In the layout, use backgroundLayer() to render
6433
+ * const layout = section(
6434
+ * { background: 'background' },
6435
+ * [
6436
+ * ...backgroundLayer('_sectionStyles.background'),
6437
+ * sectionContainer([])
6438
+ * ]
6439
+ * )
6440
+ *
6441
+ * @see {@link containerStylesField} for constrained-width containers with elevation
6442
+ * @see {@link cardStylesField} for repeater items with elevation
6443
+ * @see {@link backgroundLayer} for rendering backgrounds in layouts
6444
+ */
6445
+ const sectionOwnerChoiceFields = [{
6446
+ id: "ground",
6447
+ type: "group",
6448
+ label: "Background",
6449
+ required: false,
6450
+ schema: { fields: [] },
6451
+ ui: {
6452
+ valueContract: "sectionGround",
6453
+ hidden: true
6454
+ }
6455
+ }, {
6456
+ id: "treatment",
6457
+ type: "group",
6458
+ label: "Treatment",
6459
+ required: false,
6460
+ schema: { fields: [] },
6461
+ ui: {
6462
+ valueContract: "sectionTreatment",
6463
+ hidden: true
6464
+ }
6465
+ }];
6096
6466
  function sectionStylesField(options = {}) {
6097
6467
  const { id = "_sectionStyles", label = "Section styles", includeBackground = true, allowBackgroundColor = true, allowBackgroundGradient = true, allowBackgroundImage = true, includeAdvancedBackground = true, renderInHeader = true } = options;
6098
- const fields = [];
6468
+ const fields = [...sectionOwnerChoiceFields];
6099
6469
  if (includeBackground) fields.push(createBackgroundField({
6100
6470
  id: "background",
6101
6471
  label: "Background",
@@ -6159,6 +6529,27 @@ function sectionStylesField(options = {}) {
6159
6529
  function containerStylesField(options = {}) {
6160
6530
  return createBoxStylesFieldWithDepth("container", options);
6161
6531
  }
6532
+ /**
6533
+ * Container styles a block stores but never draws, kept so its stored values
6534
+ * still validate, and not offered in the editor. For blocks that used to take
6535
+ * `includeContainerStyles` without reading it (the audio player and the file
6536
+ * download), until production is checked for stored values.
6537
+ */
6538
+ function unreadContainerStylesField() {
6539
+ const field = containerStylesField({
6540
+ id: "_containerStyles",
6541
+ label: "Container styles",
6542
+ renderInHeader: true,
6543
+ intent: "style"
6544
+ });
6545
+ return {
6546
+ ...field,
6547
+ ui: {
6548
+ ...field.ui ?? {},
6549
+ hidden: true
6550
+ }
6551
+ };
6552
+ }
6162
6553
  function cardStylesField(options = {}) {
6163
6554
  if (options.controls === "role-only") return createRoleOnlyCardStylesField(options);
6164
6555
  return createBoxStylesFieldWithDepth("card", options);
@@ -6245,14 +6636,29 @@ const eventDisplayFields = [
6245
6636
  {
6246
6637
  id: "showCapacity",
6247
6638
  type: "boolean",
6248
- label: "Show available places",
6249
- description: "Shows how many places are left.",
6639
+ label: "Show places left",
6640
+ description: "How many places are left on each event.",
6250
6641
  required: false,
6251
6642
  defaultValue: true,
6252
6643
  ui: { intent: "behavior" }
6253
6644
  }
6254
6645
  ];
6255
6646
  /**
6647
+ * The map switch hidden. A list or spotlight card is never handed a map to
6648
+ * draw (`EventCard` draws one only with a `mapSlot`, which no list passes),
6649
+ * so the switch can't do anything there. It stays in the manifest because
6650
+ * stored blocks and the SDK content type still carry `showMap`.
6651
+ */
6652
+ function withoutMap(field) {
6653
+ return field.id === "showMap" ? {
6654
+ ...field,
6655
+ ui: {
6656
+ ...field.ui ?? {},
6657
+ hidden: true
6658
+ }
6659
+ } : field;
6660
+ }
6661
+ /**
6256
6662
  * Empty state field for when no events are available
6257
6663
  */
6258
6664
  const emptyStateField = {
@@ -6273,16 +6679,15 @@ const layoutField = {
6273
6679
  id: "layout",
6274
6680
  type: "select",
6275
6681
  label: "Layout",
6276
- description: "Choose how events are displayed",
6277
6682
  required: false,
6278
6683
  multiple: false,
6279
6684
  defaultValue: "grid",
6280
6685
  options: [{
6281
6686
  value: "grid",
6282
- label: "Grid (cards)"
6687
+ label: "Cards in a grid"
6283
6688
  }, {
6284
6689
  value: "stack",
6285
- label: "Stack (vertical list)"
6690
+ label: "One under another"
6286
6691
  }],
6287
6692
  ui: { intent: "display" }
6288
6693
  };
@@ -6297,7 +6702,6 @@ const columnsField = (options = [
6297
6702
  id: "columns",
6298
6703
  type: "select",
6299
6704
  label: "Columns",
6300
- description: "Number of columns in grid layout",
6301
6705
  required: false,
6302
6706
  multiple: false,
6303
6707
  defaultValue: "3",
@@ -7586,8 +7990,8 @@ function buildSlotCtaLabel(ctaText, slot) {
7586
7990
  }
7587
7991
  function WeeklySlotAvailabilityView({ availability, loading = false, error, emptyMessage, ctaText, ctaUrl }) {
7588
7992
  const slots = availability?.slots ?? [];
7589
- const resolvedEmptyMessage = emptyMessage ?? "No regular weekly openings are currently available.";
7590
- const resolvedCtaText = ctaText ?? "Enquire about this slot";
7993
+ const resolvedEmptyMessage = emptyMessage?.trim() || "No regular weekly openings are currently available.";
7994
+ const resolvedCtaText = ctaText?.trim() || "Enquire about this slot";
7591
7995
  const resolvedCtaUrl = typeof ctaUrl === "string" ? ctaUrl.trim() : "";
7592
7996
  return /* @__PURE__ */ jsxs("div", {
7593
7997
  className: "weekly-slot-availability",
@@ -7706,7 +8110,10 @@ function backgroundLayer(path, options = {}) {
7706
8110
  from: path,
7707
8111
  transforms: [{
7708
8112
  id: "background.resolveStyle",
7709
- ...typeof fallbackToken === "string" && fallbackToken.trim().length > 0 ? { options: { fallbackToken: fallbackToken.trim() } } : {}
8113
+ options: {
8114
+ ...path === "_sectionStyles.background" ? { sectionGround: true } : {},
8115
+ ...typeof fallbackToken === "string" && fallbackToken.trim().length > 0 ? { fallbackToken: fallbackToken.trim() } : {}
8116
+ }
7710
8117
  }]
7711
8118
  } }
7712
8119
  });
@@ -8217,13 +8624,6 @@ z.object({
8217
8624
  styleTokens: styleTokenSchema.optional(),
8218
8625
  behaviours: behaviourSchema.optional(),
8219
8626
  layout: NodeTreeSchema.optional(),
8220
- /**
8221
- * Optional list of nested field paths that should be surfaced in the main form body
8222
- * as "shortcuts" (render-only). These paths should refer to existing data within the
8223
- * block content object (e.g. `_sectionStyles.background.image`).
8224
- *
8225
- * The original fields remain available in settings for power users.
8226
- */
8227
8627
  lookField: z.string().min(1).optional(),
8228
8628
  sourceLine: z.object({
8229
8629
  text: z.string(),
@@ -8237,7 +8637,15 @@ z.object({
8237
8637
  equals: z.string()
8238
8638
  }).optional()
8239
8639
  }).optional(),
8240
- promotedFields: z.array(z.string().min(1)).optional(),
8640
+ /**
8641
+ * The block keeps a section photo, stored at `path` in its section's
8642
+ * Background. Whether the Photo field shows is then the Look's and the
8643
+ * draft's call (`decideSectionPhoto`); where it sits in the form is
8644
+ * `editing`'s, which must place the path.
8645
+ */
8646
+ sectionPhoto: z.strictObject({ path: z.literal(sectionPhotoPath) }).readonly().optional(),
8647
+ /** Where the block's fields go in its settings form: content, named groups and setup questions. */
8648
+ editing: blockEditingSchema.optional(),
8241
8649
  variantMeaning: z.discriminatedUnion("kind", [z.object({
8242
8650
  kind: z.literal("arrangement"),
8243
8651
  lookOnlyKeys: z.array(z.string().min(1)).readonly().optional()
@@ -8538,8 +8946,7 @@ const formCopyFragment = defineFragment({
8538
8946
  }, {
8539
8947
  id: "intro",
8540
8948
  type: "richText",
8541
- label: "Intro",
8542
- description: "Optional introduction above the form."
8949
+ label: "Introduction"
8543
8950
  }],
8544
8951
  layout: [text({
8545
8952
  as: "h2",
@@ -8578,14 +8985,14 @@ const formEmbedFragment = defineFragment({
8578
8985
  {
8579
8986
  id: "submitLabel",
8580
8987
  type: "text",
8581
- label: "Submit button label",
8582
- defaultValue: "Submit"
8988
+ label: "Button text",
8989
+ description: "Leave it empty to use the form's own."
8583
8990
  },
8584
8991
  {
8585
8992
  id: "successMessage",
8586
8993
  type: "text",
8587
- label: "Success message",
8588
- description: "What visitors see after they've sent the form."
8994
+ label: "Message after sending",
8995
+ description: "What visitors see after they've sent the form. Leave it empty to use the form's own."
8589
8996
  }
8590
8997
  ],
8591
8998
  layout: [form(withApiBindings({
@@ -8618,8 +9025,7 @@ const newsletterCopyFragment = defineFragment({
8618
9025
  }, {
8619
9026
  id: "subtitle",
8620
9027
  type: "richText",
8621
- label: "Subtitle",
8622
- description: "Optional description below the title."
9028
+ label: "Introduction"
8623
9029
  }],
8624
9030
  layout: [text({
8625
9031
  as: "h2",
@@ -8849,7 +9255,8 @@ function createBlockManifest(config) {
8849
9255
  variantOptions: config.variantOptions,
8850
9256
  lookField: config.lookField,
8851
9257
  sourceLine: config.sourceLine,
8852
- promotedFields: config.promotedFields ? [...config.promotedFields] : void 0
9258
+ sectionPhoto: config.sectionPhoto,
9259
+ editing: config.editing
8853
9260
  });
8854
9261
  }
8855
9262
  function createBlockManifestWithContentShape(config, _contentShape) {
@@ -8911,6 +9318,14 @@ const cartBlockDefinition = {
8911
9318
  titleSource: "heading",
8912
9319
  description: "Shows what a visitor has in their cart.",
8913
9320
  skipSectionStyles: true,
9321
+ editing: {
9322
+ content: ["heading"],
9323
+ settings: [
9324
+ "checkoutButtonText",
9325
+ "clearButtonText",
9326
+ "emptyStateText"
9327
+ ]
9328
+ },
8914
9329
  additionalFields: [
8915
9330
  {
8916
9331
  id: "heading",
@@ -8923,7 +9338,7 @@ const cartBlockDefinition = {
8923
9338
  {
8924
9339
  id: "emptyStateText",
8925
9340
  type: "text",
8926
- label: "If there's nothing to show",
9341
+ label: "When the cart is empty",
8927
9342
  multiline: false,
8928
9343
  required: false,
8929
9344
  defaultValue: "Your cart is empty."
@@ -8931,7 +9346,7 @@ const cartBlockDefinition = {
8931
9346
  {
8932
9347
  id: "checkoutButtonText",
8933
9348
  type: "text",
8934
- label: "Checkout button text",
9349
+ label: "Button to check out",
8935
9350
  multiline: false,
8936
9351
  required: false,
8937
9352
  defaultValue: "Go to checkout"
@@ -8939,7 +9354,7 @@ const cartBlockDefinition = {
8939
9354
  {
8940
9355
  id: "clearButtonText",
8941
9356
  type: "text",
8942
- label: "Clear button text",
9357
+ label: "Button to empty the cart",
8943
9358
  multiline: false,
8944
9359
  required: false,
8945
9360
  defaultValue: "Clear cart"
@@ -9005,6 +9420,10 @@ const checkoutBlockDefinition = {
9005
9420
  titleSource: "heading",
9006
9421
  description: "Where visitors enter their details and pay for what's in their cart.",
9007
9422
  skipSectionStyles: true,
9423
+ editing: {
9424
+ content: ["heading"],
9425
+ settings: ["submitButtonText", "emptyStateText"]
9426
+ },
9008
9427
  additionalFields: [
9009
9428
  {
9010
9429
  id: "heading",
@@ -9017,7 +9436,8 @@ const checkoutBlockDefinition = {
9017
9436
  {
9018
9437
  id: "submitButtonText",
9019
9438
  type: "text",
9020
- label: "Submit button text",
9439
+ label: "Button text",
9440
+ description: "With a discount code applied, the button shows the amount to pay.",
9021
9441
  multiline: false,
9022
9442
  required: false,
9023
9443
  defaultValue: "Checkout"
@@ -9025,7 +9445,7 @@ const checkoutBlockDefinition = {
9025
9445
  {
9026
9446
  id: "emptyStateText",
9027
9447
  type: "text",
9028
- label: "If there's nothing to show",
9448
+ label: "When the cart is empty",
9029
9449
  multiline: false,
9030
9450
  required: false,
9031
9451
  defaultValue: "Add something to your cart to continue."
@@ -9082,71 +9502,298 @@ const checkoutBlockDefinition = {
9082
9502
  }),
9083
9503
  runtime: checkoutBlockRuntime
9084
9504
  };
9085
- const giftingBlockDefinition = {
9086
- manifest: createBlockManifest({
9087
- variantMeaning: { kind: "arrangement" },
9088
- id: "block.gifting",
9089
- version: "1.0.0",
9090
- title: "Gift cards & vouchers",
9091
- titleSource: "heading",
9092
- description: "Lets people buy gift cards and vouchers for someone else.",
9093
- skipSectionStyles: true,
9094
- additionalFields: [
9095
- {
9096
- id: "heading",
9097
- type: "text",
9098
- label: "Heading",
9099
- required: false,
9100
- multiline: false,
9101
- defaultValue: "Gift cards & vouchers"
9102
- },
9103
- {
9104
- id: "intro",
9105
- type: "text",
9106
- label: "Intro",
9107
- required: false,
9108
- multiline: true,
9109
- defaultValue: "Choose a gift card or voucher and send it straight away or schedule it for later."
9110
- },
9111
- {
9112
- id: "giftCardsHeading",
9113
- type: "text",
9114
- label: "Gift cards heading",
9115
- required: false,
9116
- multiline: false,
9117
- defaultValue: "Gift cards"
9118
- },
9119
- {
9120
- id: "vouchersHeading",
9121
- type: "text",
9122
- label: "Vouchers heading",
9123
- required: false,
9124
- multiline: false,
9125
- defaultValue: "Vouchers"
9505
+ //#endregion
9506
+ //#region ../blocks/src/system/readiness.ts
9507
+ const ready = { kind: "Ready" };
9508
+ const unknownReadiness = { kind: "Unknown" };
9509
+ const loadedReadinessFact = (value) => ({
9510
+ kind: "Loaded",
9511
+ value
9512
+ });
9513
+ const unavailableReadinessFact = { kind: "Unavailable" };
9514
+ function needsSetup(reason, repair) {
9515
+ return {
9516
+ kind: "NeedsSetup",
9517
+ reason,
9518
+ repair
9519
+ };
9520
+ }
9521
+ function hiddenByChoice(reason, repair) {
9522
+ return {
9523
+ kind: "Hidden",
9524
+ reason,
9525
+ repair
9526
+ };
9527
+ }
9528
+ /** Visitors don't see a block that needs setting up, or one its editor has chosen to hide for now. */
9529
+ function hiddenFromVisitors(readiness) {
9530
+ return readiness.kind === "NeedsSetup" || readiness.kind === "Hidden";
9531
+ }
9532
+ /** One boundary owns runtime stage checking and the resulting phantom proof. */
9533
+ function admitReadinessFacts(stage, input) {
9534
+ return input.stage === stage ? input.facts : unavailableReadinessFacts();
9535
+ }
9536
+ function unavailableReadinessFacts() {
9537
+ return {
9538
+ catalogue: unavailableReadinessFact,
9539
+ gifting: unavailableReadinessFact,
9540
+ eventFilters: unavailableReadinessFact,
9541
+ appointments: unavailableReadinessFact,
9542
+ mailingList: unavailableReadinessFact,
9543
+ testimonials: unavailableReadinessFact,
9544
+ team: unavailableReadinessFact,
9545
+ events: /* @__PURE__ */ new Map(),
9546
+ forms: /* @__PURE__ */ new Map(),
9547
+ products: /* @__PURE__ */ new Map(),
9548
+ template: unavailableReadinessFact
9549
+ };
9550
+ }
9551
+ function pageTemplateFromEntry(entry) {
9552
+ return entry?._contentTypeSlug === "product" ? { kind: "product" } : { kind: "page" };
9553
+ }
9554
+ //#endregion
9555
+ //#region ../blocks/src/system/blocks/readiness.ts
9556
+ const newsletterReadiness = {
9557
+ needs: ["mailingList", "events"],
9558
+ assess: (content, facts, { interaction, blockId }) => {
9559
+ if (interaction?.kind === "demo") return ready;
9560
+ if (facts.mailingList.kind === "Unavailable") return unknownReadiness;
9561
+ const targeting = parseMailingListPlacementTargeting(content.targeting ?? { mode: "default" });
9562
+ if (!targeting.ok) return unknownReadiness;
9563
+ const assessment = assessMailingListTargeting(facts.mailingList.value, targeting.value);
9564
+ return assessment.tag === "available" ? signupStandInReadiness(content, facts.events, blockId) : assessment.reason === "setup_missing" ? needsSetup("mailing_setup", {
9565
+ kind: "manage",
9566
+ target: "mailingLists"
9567
+ }) : needsSetup("mailing_destination", {
9568
+ kind: "field",
9569
+ path: "targeting"
9570
+ });
9571
+ }
9572
+ };
9573
+ /** Once its events have dates, a stand-in signup steps aside. If the check can't run, showing the signup is the safe side. */
9574
+ function signupStandInReadiness(content, events, blockId) {
9575
+ if (content.showWhen !== "nothing-coming-up") return ready;
9576
+ const fact = blockId === null ? void 0 : events.get(blockId);
9577
+ if (!fact || fact.kind === "Unavailable") return unknownReadiness;
9578
+ return fact.value ? hiddenByChoice("events_coming_up", {
9579
+ kind: "field",
9580
+ path: "showWhen"
9581
+ }) : ready;
9582
+ }
9583
+ const formReadiness = {
9584
+ needs: ["forms"],
9585
+ assess: (content, facts) => {
9586
+ const selection = chosenString(content.formSlug);
9587
+ if (!selection) return needsSetup("form_not_chosen", {
9588
+ kind: "field",
9589
+ path: "formSlug"
9590
+ });
9591
+ const form = facts.forms.get(selection);
9592
+ if (!form || form.kind === "Unavailable") return unknownReadiness;
9593
+ return form.value ? ready : needsSetup("form_deleted", {
9594
+ kind: "field",
9595
+ path: "formSlug"
9596
+ });
9597
+ }
9598
+ };
9599
+ const testimonialsReadiness = {
9600
+ needs: ["testimonials"],
9601
+ assess: (_content, facts) => {
9602
+ if (facts.testimonials.kind === "Unavailable") return unknownReadiness;
9603
+ const { count, total } = facts.testimonials.value;
9604
+ if (count > 0) return ready;
9605
+ return needsSetup(total === "unknown" ? "testimonials_empty" : total > 0 ? "testimonials_unpublished" : "testimonials_none", {
9606
+ kind: "manage",
9607
+ target: "testimonials"
9608
+ });
9609
+ }
9610
+ };
9611
+ const teamReadiness = {
9612
+ needs: ["team"],
9613
+ assess: (content, facts) => {
9614
+ if (content.source !== "site_staff") return Array.isArray(content.members) && content.members.length > 0 ? ready : needsSetup("members_empty", {
9615
+ kind: "field",
9616
+ path: "members"
9617
+ });
9618
+ if (facts.team.kind === "Unavailable") return unknownReadiness;
9619
+ return facts.team.value > 0 ? ready : needsSetup("team_empty", {
9620
+ kind: "manage",
9621
+ target: "team"
9622
+ });
9623
+ }
9624
+ };
9625
+ const productReadiness = {
9626
+ needs: ["template", "products"],
9627
+ assess: (content, facts) => {
9628
+ if (facts.template.kind === "Unavailable") return unknownReadiness;
9629
+ if (facts.template.value.kind === "product") return ready;
9630
+ const selection = chosenString(content.productSlug);
9631
+ if (!selection) return needsSetup("product_not_chosen", {
9632
+ kind: "field",
9633
+ path: "productSlug"
9634
+ });
9635
+ const product = facts.products.get(selection);
9636
+ if (!product || product.kind === "Unavailable") return unknownReadiness;
9637
+ return product.value ? ready : needsSetup("product_gone", {
9638
+ kind: "field",
9639
+ path: "productSlug"
9640
+ });
9641
+ }
9642
+ };
9643
+ const galleryReadiness = {
9644
+ needs: [],
9645
+ assess: (content) => Array.isArray(content.images) && content.images.length > 0 ? ready : needsSetup("gallery_empty", {
9646
+ kind: "field",
9647
+ path: "images"
9648
+ })
9649
+ };
9650
+ /** A video grid with no video, an audio player with no track and a download with no file have nothing for visitors, so they stay hidden until one's chosen. */
9651
+ const videoGridReadiness = {
9652
+ needs: [],
9653
+ assess: (content) => Array.isArray(content.videos) && content.videos.some(hasVideoLink) ? ready : needsSetup("video_grid_empty", {
9654
+ kind: "field",
9655
+ path: "videos"
9656
+ })
9657
+ };
9658
+ const audioPlayerReadiness = {
9659
+ needs: [],
9660
+ assess: (content) => isChosen(content.audio) ? ready : needsSetup("audio_not_chosen", {
9661
+ kind: "field",
9662
+ path: "audio"
9663
+ })
9664
+ };
9665
+ const fileDownloadReadiness = {
9666
+ needs: [],
9667
+ assess: (content) => isChosen(content.file) ? ready : needsSetup("file_not_chosen", {
9668
+ kind: "field",
9669
+ path: "file"
9670
+ })
9671
+ };
9672
+ function hasVideoLink(item) {
9673
+ return typeof item === "object" && item !== null && "url" in item && chosenString(item.url) !== null;
9674
+ }
9675
+ /** A media or file field holds an object once something is chosen. */
9676
+ function isChosen(value) {
9677
+ return typeof value === "object" && value !== null;
9678
+ }
9679
+ /** Passes & memberships with nothing to show is hidden from visitors, by the same decision its cards are drawn from. */
9680
+ const shopReadiness = {
9681
+ needs: ["catalogue"],
9682
+ assess: (content, facts) => {
9683
+ if (facts.catalogue.kind === "Unavailable") return unknownReadiness;
9684
+ const decision = decideShopCatalogue(storedShopShow(content), facts.catalogue.value);
9685
+ switch (decision.kind) {
9686
+ case "shows": return ready;
9687
+ case "nothing-on-sale": return needsSetup("shop_nothing_on_sale", {
9688
+ kind: "manage",
9689
+ target: "passesAndMemberships"
9690
+ });
9691
+ case "nothing-chosen": return needsSetup("shop_nothing_chosen", {
9692
+ kind: "field",
9693
+ path: "showPasses"
9694
+ });
9695
+ default: return assertNever$1(decision);
9696
+ }
9697
+ }
9698
+ };
9699
+ /** Gift cards & vouchers with nothing on offer is hidden from visitors, by the same decision its groups are drawn from. */
9700
+ const giftingReadiness = {
9701
+ needs: ["gifting"],
9702
+ assess: (_content, facts) => {
9703
+ if (facts.gifting.kind === "Unavailable") return unknownReadiness;
9704
+ return decideGiftingOffer(facts.gifting.value).kind === "nothing-on-offer" ? needsSetup("gifting_nothing_on_offer", {
9705
+ kind: "manage",
9706
+ target: "giftCardsAndVouchers"
9707
+ }) : ready;
9708
+ }
9709
+ };
9710
+ function chosenString(value) {
9711
+ return typeof value === "string" && value.trim() ? value.trim() : null;
9712
+ }
9713
+ /** Absent settings retain the published behavior of existing blocks. */
9714
+ const eventsReadiness = {
9715
+ needs: ["events"],
9716
+ assess: (content, facts, { blockId }) => {
9717
+ if (content.emptyBehavior !== "hide") return ready;
9718
+ const fact = blockId === null ? void 0 : facts.events.get(blockId);
9719
+ if (!fact || fact.kind === "Unavailable") return unknownReadiness;
9720
+ return fact.value ? ready : hiddenByChoice("events_empty", {
9721
+ kind: "field",
9722
+ path: "emptyBehavior"
9723
+ });
9724
+ }
9725
+ };
9726
+ const giftingBlockDefinition = {
9727
+ manifest: createBlockManifest({
9728
+ variantMeaning: { kind: "arrangement" },
9729
+ id: "block.gifting",
9730
+ version: "1.0.0",
9731
+ title: "Gift cards & vouchers",
9732
+ titleSource: "heading",
9733
+ description: "Lets people buy gift cards and vouchers for someone else.",
9734
+ skipSectionStyles: true,
9735
+ editing: {
9736
+ content: ["heading", "intro"],
9737
+ settings: [
9738
+ "giftCardsHeading",
9739
+ "vouchersHeading",
9740
+ "checkoutButtonText",
9741
+ "successMessage"
9742
+ ]
9743
+ },
9744
+ additionalFields: [
9745
+ {
9746
+ id: "heading",
9747
+ type: "text",
9748
+ label: "Heading",
9749
+ description: "Leave it empty for “Gift cards & vouchers”.",
9750
+ required: false,
9751
+ multiline: false,
9752
+ defaultValue: "Gift cards & vouchers"
9126
9753
  },
9127
9754
  {
9128
- id: "emptyStateText",
9755
+ id: "intro",
9129
9756
  type: "text",
9130
- label: "If there's nothing to show",
9757
+ label: "Introduction",
9758
+ required: false,
9759
+ multiline: true,
9760
+ defaultValue: "Choose a gift card or voucher and send it straight away or schedule it for later."
9761
+ },
9762
+ {
9763
+ id: "giftCardsHeading",
9764
+ type: "text",
9765
+ label: "Gift card group heading",
9766
+ description: "Labels the gift card group, including when you also offer vouchers. Leave it empty to use Gift card or Gift cards, depending on how many you offer.",
9767
+ required: false,
9768
+ multiline: false,
9769
+ defaultValue: "Gift cards",
9770
+ ui: { visibleWhen: giftCardsShownCondition }
9771
+ },
9772
+ {
9773
+ id: "vouchersHeading",
9774
+ type: "text",
9775
+ label: "Voucher group heading",
9776
+ description: "Labels the voucher group, including when you also offer gift cards. Leave it empty to use Voucher or Vouchers, depending on how many you offer.",
9131
9777
  required: false,
9132
9778
  multiline: false,
9133
- defaultValue: "Nothing is available right now."
9779
+ defaultValue: "Vouchers",
9780
+ ui: { visibleWhen: vouchersShownCondition }
9134
9781
  },
9135
9782
  {
9136
9783
  id: "checkoutButtonText",
9137
9784
  type: "text",
9138
- label: "Checkout button text",
9785
+ label: "Button under the gift details",
9139
9786
  required: false,
9140
9787
  multiline: false,
9141
- defaultValue: "Continue"
9788
+ defaultValue: "Continue to payment"
9142
9789
  },
9143
9790
  {
9144
9791
  id: "successMessage",
9145
9792
  type: "text",
9146
- label: "Success message",
9793
+ label: "Message after buying",
9147
9794
  required: false,
9148
9795
  multiline: false,
9149
- defaultValue: "Thanks. Your purchase is complete and your gift will be sent shortly."
9796
+ defaultValue: "Thanks, that's all paid for. We'll email the gift to them in the next few minutes."
9150
9797
  },
9151
9798
  sectionStylesField({
9152
9799
  id: "_sectionStyles",
@@ -9185,25 +9832,15 @@ const giftingBlockDefinition = {
9185
9832
  from: "content.intro",
9186
9833
  fallback: "Choose a gift card or voucher and send it straight away or schedule it for later."
9187
9834
  } },
9188
- giftCardsHeading: { $bind: {
9189
- from: "content.giftCardsHeading",
9190
- fallback: "Gift cards"
9191
- } },
9192
- vouchersHeading: { $bind: {
9193
- from: "content.vouchersHeading",
9194
- fallback: "Vouchers"
9195
- } },
9196
- emptyStateText: { $bind: {
9197
- from: "content.emptyStateText",
9198
- fallback: "Nothing is available right now."
9199
- } },
9835
+ giftCardsHeading: { $bind: { from: "content.giftCardsHeading" } },
9836
+ vouchersHeading: { $bind: { from: "content.vouchersHeading" } },
9200
9837
  checkoutButtonText: { $bind: {
9201
9838
  from: "content.checkoutButtonText",
9202
- fallback: "Continue"
9839
+ fallback: "Continue to payment"
9203
9840
  } },
9204
9841
  successMessage: { $bind: {
9205
9842
  from: "content.successMessage",
9206
- fallback: "Thanks. Your purchase is complete and your gift will be sent shortly."
9843
+ fallback: "Thanks, that's all paid for. We'll email the gift to them in the next few minutes."
9207
9844
  } },
9208
9845
  siteTerms: { $bind: { from: "$root.siteTerms" } },
9209
9846
  lookSlots: { $bind: { from: "content._lookSlots" } },
@@ -9213,6 +9850,7 @@ const giftingBlockDefinition = {
9213
9850
  })]
9214
9851
  }),
9215
9852
  runtime: giftingBlockRuntime,
9853
+ readiness: giftingReadiness,
9216
9854
  dataSchemas: { offers: publicGiftingOffersResponseSchema.optional() },
9217
9855
  dataLoaders: { offers: {
9218
9856
  endpoint: "listPublicGiftingOffers",
@@ -9272,7 +9910,6 @@ const eventRegistrationManifest = createBlockManifest({
9272
9910
  id: "heading",
9273
9911
  type: "text",
9274
9912
  label: "Heading",
9275
- description: "The heading above the booking form.",
9276
9913
  required: false,
9277
9914
  multiline: false,
9278
9915
  defaultValue: ""
@@ -9280,8 +9917,7 @@ const eventRegistrationManifest = createBlockManifest({
9280
9917
  {
9281
9918
  id: "description",
9282
9919
  type: "richText",
9283
- label: "Description",
9284
- description: "Optional introductory text",
9920
+ label: "Text under the heading",
9285
9921
  required: false
9286
9922
  },
9287
9923
  {
@@ -9314,31 +9950,31 @@ const eventRegistrationManifest = createBlockManifest({
9314
9950
  label: "10 tickets"
9315
9951
  }
9316
9952
  ],
9317
- ui: { intent: "display" }
9953
+ ui: { intent: "behavior" }
9318
9954
  },
9319
9955
  {
9320
9956
  id: "showVenue",
9321
9957
  type: "boolean",
9322
- label: "Show venue",
9323
- description: "Shows where the event is.",
9958
+ label: "Show the venue",
9959
+ description: "Where the event is, in the booking summary.",
9324
9960
  required: false,
9325
9961
  defaultValue: true,
9326
- ui: { intent: "display" }
9962
+ ui: { intent: "behavior" }
9327
9963
  },
9328
9964
  {
9329
9965
  id: "showCapacity",
9330
9966
  type: "boolean",
9331
- label: "Show available places",
9332
- description: "Shows how many places are left.",
9967
+ label: "Show places left",
9968
+ description: "How many places are left, in the booking summary.",
9333
9969
  required: false,
9334
9970
  defaultValue: true,
9335
- ui: { intent: "display" }
9971
+ ui: { intent: "behavior" }
9336
9972
  },
9337
9973
  {
9338
9974
  id: "successMessage",
9339
9975
  type: "text",
9340
- label: "Success message",
9341
- description: "What people see once they've booked.",
9976
+ label: "Message after booking",
9977
+ description: "What people see once they've booked. Leave it empty to use ours.",
9342
9978
  required: false,
9343
9979
  multiline: true,
9344
9980
  maxLength: 500,
@@ -9348,7 +9984,7 @@ const eventRegistrationManifest = createBlockManifest({
9348
9984
  id: "buttonText",
9349
9985
  type: "text",
9350
9986
  label: "Button text",
9351
- description: "Text on the booking button",
9987
+ description: "The button that starts a booking.",
9352
9988
  required: false,
9353
9989
  multiline: false,
9354
9990
  defaultValue: "Book your place",
@@ -9356,6 +9992,62 @@ const eventRegistrationManifest = createBlockManifest({
9356
9992
  },
9357
9993
  createButtonVariantField()
9358
9994
  ],
9995
+ editing: {
9996
+ content: ["heading", "description"],
9997
+ settings: [{
9998
+ id: "form",
9999
+ title: "On the booking form",
10000
+ fields: [
10001
+ "maxTickets",
10002
+ "showVenue",
10003
+ "showCapacity"
10004
+ ],
10005
+ summary: {
10006
+ parts: [
10007
+ {
10008
+ field: "maxTickets",
10009
+ options: {
10010
+ "1": "one ticket a booking",
10011
+ "2": "up to 2 tickets",
10012
+ "3": "up to 3 tickets",
10013
+ "5": "up to 5 tickets",
10014
+ "10": "up to 10 tickets"
10015
+ }
10016
+ },
10017
+ {
10018
+ field: "showVenue",
10019
+ on: "venue"
10020
+ },
10021
+ {
10022
+ field: "showCapacity",
10023
+ on: "places left"
10024
+ }
10025
+ ],
10026
+ none: "Tickets only"
10027
+ }
10028
+ }, {
10029
+ id: "button",
10030
+ title: "Button and confirmation",
10031
+ fields: [
10032
+ "buttonText",
10033
+ "buttonVariant",
10034
+ "successMessage"
10035
+ ],
10036
+ summary: {
10037
+ parts: [{
10038
+ field: "buttonText",
10039
+ text: {
10040
+ before: "button says “",
10041
+ after: "”"
10042
+ }
10043
+ }, {
10044
+ field: "successMessage",
10045
+ set: "your own message after booking"
10046
+ }],
10047
+ none: "Our standard wording"
10048
+ }
10049
+ }]
10050
+ },
9359
10051
  layout: [styledSection({
9360
10052
  baseClass: "",
9361
10053
  spacing: "spacious",
@@ -9485,163 +10177,6 @@ const eventRegistrationBlockDefinition = {
9485
10177
  }
9486
10178
  };
9487
10179
  //#endregion
9488
- //#region ../blocks/src/system/readiness.ts
9489
- const ready = { kind: "Ready" };
9490
- const unknownReadiness = { kind: "Unknown" };
9491
- const loadedReadinessFact = (value) => ({
9492
- kind: "Loaded",
9493
- value
9494
- });
9495
- const unavailableReadinessFact = { kind: "Unavailable" };
9496
- function needsSetup(reason, repair) {
9497
- return {
9498
- kind: "NeedsSetup",
9499
- reason,
9500
- repair
9501
- };
9502
- }
9503
- function hiddenByChoice(reason, repair) {
9504
- return {
9505
- kind: "Hidden",
9506
- reason,
9507
- repair
9508
- };
9509
- }
9510
- /** Visitors don't see a block that needs setting up, or one its editor has chosen to hide for now. */
9511
- function hiddenFromVisitors(readiness) {
9512
- return readiness.kind === "NeedsSetup" || readiness.kind === "Hidden";
9513
- }
9514
- /** One boundary owns runtime stage checking and the resulting phantom proof. */
9515
- function admitReadinessFacts(stage, input) {
9516
- return input.stage === stage ? input.facts : unavailableReadinessFacts();
9517
- }
9518
- function unavailableReadinessFacts() {
9519
- return {
9520
- mailingList: unavailableReadinessFact,
9521
- testimonials: unavailableReadinessFact,
9522
- team: unavailableReadinessFact,
9523
- events: /* @__PURE__ */ new Map(),
9524
- forms: /* @__PURE__ */ new Map(),
9525
- products: /* @__PURE__ */ new Map(),
9526
- template: unavailableReadinessFact
9527
- };
9528
- }
9529
- function pageTemplateFromEntry(entry) {
9530
- return entry?._contentTypeSlug === "product" ? { kind: "product" } : { kind: "page" };
9531
- }
9532
- //#endregion
9533
- //#region ../blocks/src/system/blocks/readiness.ts
9534
- const newsletterReadiness = {
9535
- needs: ["mailingList", "events"],
9536
- assess: (content, facts, { interaction, blockId }) => {
9537
- if (interaction?.kind === "demo") return ready;
9538
- if (facts.mailingList.kind === "Unavailable") return unknownReadiness;
9539
- const targeting = parseMailingListPlacementTargeting(content.targeting ?? { mode: "default" });
9540
- if (!targeting.ok) return unknownReadiness;
9541
- const assessment = assessMailingListTargeting(facts.mailingList.value, targeting.value);
9542
- return assessment.tag === "available" ? signupStandInReadiness(content, facts.events, blockId) : assessment.reason === "setup_missing" ? needsSetup("mailing_setup", {
9543
- kind: "manage",
9544
- target: "mailingLists"
9545
- }) : needsSetup("mailing_destination", {
9546
- kind: "field",
9547
- path: "targeting"
9548
- });
9549
- }
9550
- };
9551
- /** Once its events have dates, a stand-in signup steps aside. If the check can't run, showing the signup is the safe side. */
9552
- function signupStandInReadiness(content, events, blockId) {
9553
- if (content.showWhen !== "nothing-coming-up") return ready;
9554
- const fact = blockId === null ? void 0 : events.get(blockId);
9555
- if (!fact || fact.kind === "Unavailable") return unknownReadiness;
9556
- return fact.value ? hiddenByChoice("events_coming_up", {
9557
- kind: "field",
9558
- path: "showWhen"
9559
- }) : ready;
9560
- }
9561
- const formReadiness = {
9562
- needs: ["forms"],
9563
- assess: (content, facts) => {
9564
- const selection = chosenString(content.formSlug);
9565
- if (!selection) return needsSetup("form_not_chosen", {
9566
- kind: "field",
9567
- path: "formSlug"
9568
- });
9569
- const form = facts.forms.get(selection);
9570
- if (!form || form.kind === "Unavailable") return unknownReadiness;
9571
- return form.value ? ready : needsSetup("form_deleted", {
9572
- kind: "field",
9573
- path: "formSlug"
9574
- });
9575
- }
9576
- };
9577
- const testimonialsReadiness = {
9578
- needs: ["testimonials"],
9579
- assess: (_content, facts) => {
9580
- if (facts.testimonials.kind === "Unavailable") return unknownReadiness;
9581
- const { count, total } = facts.testimonials.value;
9582
- if (count > 0) return ready;
9583
- return needsSetup(total === "unknown" ? "testimonials_empty" : total > 0 ? "testimonials_unpublished" : "testimonials_none", {
9584
- kind: "manage",
9585
- target: "testimonials"
9586
- });
9587
- }
9588
- };
9589
- const teamReadiness = {
9590
- needs: ["team"],
9591
- assess: (content, facts) => {
9592
- if (content.source !== "site_staff") return Array.isArray(content.members) && content.members.length > 0 ? ready : needsSetup("members_empty", {
9593
- kind: "field",
9594
- path: "members"
9595
- });
9596
- if (facts.team.kind === "Unavailable") return unknownReadiness;
9597
- return facts.team.value > 0 ? ready : needsSetup("team_empty", {
9598
- kind: "manage",
9599
- target: "team"
9600
- });
9601
- }
9602
- };
9603
- const productReadiness = {
9604
- needs: ["template", "products"],
9605
- assess: (content, facts) => {
9606
- if (facts.template.kind === "Unavailable") return unknownReadiness;
9607
- if (facts.template.value.kind === "product") return ready;
9608
- const selection = chosenString(content.productSlug);
9609
- if (!selection) return needsSetup("product_not_chosen", {
9610
- kind: "field",
9611
- path: "productSlug"
9612
- });
9613
- const product = facts.products.get(selection);
9614
- if (!product || product.kind === "Unavailable") return unknownReadiness;
9615
- return product.value ? ready : needsSetup("product_gone", {
9616
- kind: "field",
9617
- path: "productSlug"
9618
- });
9619
- }
9620
- };
9621
- const galleryReadiness = {
9622
- needs: [],
9623
- assess: (content) => Array.isArray(content.images) && content.images.length > 0 ? ready : needsSetup("gallery_empty", {
9624
- kind: "field",
9625
- path: "images"
9626
- })
9627
- };
9628
- function chosenString(value) {
9629
- return typeof value === "string" && value.trim() ? value.trim() : null;
9630
- }
9631
- /** Absent settings retain the published behavior of existing blocks. */
9632
- const eventsReadiness = {
9633
- needs: ["events"],
9634
- assess: (content, facts, { blockId }) => {
9635
- if (content.emptyBehavior !== "hide") return ready;
9636
- const fact = blockId === null ? void 0 : facts.events.get(blockId);
9637
- if (!fact || fact.kind === "Unavailable") return unknownReadiness;
9638
- return fact.value ? ready : hiddenByChoice("events_empty", {
9639
- kind: "field",
9640
- path: "emptyBehavior"
9641
- });
9642
- }
9643
- };
9644
- //#endregion
9645
10180
  //#region ../blocks/src/system/blocks/form.tsx
9646
10181
  const setupFormEmbedFragment = {
9647
10182
  ...formEmbedFragment,
@@ -9707,7 +10242,15 @@ const dataLoaders = Object.fromEntries(Object.entries(fragmentDataLoaders).map((
9707
10242
  const formManifest = createBlockManifest({
9708
10243
  variantMeaning: { kind: "arrangement" },
9709
10244
  id: "block.form",
9710
- promotedFields: ["formSlug"],
10245
+ editing: {
10246
+ content: [
10247
+ "formSlug",
10248
+ "title",
10249
+ "intro"
10250
+ ],
10251
+ settings: ["submitLabel", "successMessage"],
10252
+ setup: ["formSlug"]
10253
+ },
9711
10254
  title: "Form",
9712
10255
  titleSource: "title",
9713
10256
  description: "Shows one of your forms so visitors can get in touch.",
@@ -10062,6 +10605,469 @@ const eventCalendarDataLoaders = {
10062
10605
  }
10063
10606
  };
10064
10607
  //#endregion
10608
+ //#region ../blocks/src/system/blocks/events/eventCalendarEditing.ts
10609
+ /** How many events a paged list can start with. The field's options and the row's line are both written from it. */
10610
+ const eventCalendarPageSizes = [
10611
+ "1",
10612
+ "2",
10613
+ "3",
10614
+ "4",
10615
+ "5",
10616
+ "6",
10617
+ "10",
10618
+ "12",
10619
+ "20",
10620
+ "24",
10621
+ "30"
10622
+ ];
10623
+ /**
10624
+ * Where the calendar's settings go. The way events are shown is the block
10625
+ * itself, so it sits open at the top; everything else is a named row. A row
10626
+ * whose fields don't apply to the chosen way drops out, and each row's line is
10627
+ * written here, phrase by phrase, so it follows what's chosen. Which settings
10628
+ * apply comes from the page's own decisions (`eventCalendarForm.ts`).
10629
+ */
10630
+ const eventCalendarEditing = {
10631
+ content: ["variant"],
10632
+ settings: [
10633
+ {
10634
+ id: "events",
10635
+ title: "Which events",
10636
+ fields: [
10637
+ "eventSelection",
10638
+ "selectedEventSeriesIds",
10639
+ "eventSurface",
10640
+ "filterCategoryIds",
10641
+ "filterStaffMemberId",
10642
+ "filterVenueId"
10643
+ ],
10644
+ summary: {
10645
+ parts: [
10646
+ {
10647
+ field: "eventSelection",
10648
+ options: {
10649
+ matching: null,
10650
+ selected: "ones you’ve picked"
10651
+ }
10652
+ },
10653
+ {
10654
+ field: "eventSurface",
10655
+ options: {
10656
+ all: "all events",
10657
+ regularClassSchedule: "regular classes",
10658
+ specialDatedEvents: "workshops and one-off events",
10659
+ custom: "some kinds of event"
10660
+ }
10661
+ },
10662
+ {
10663
+ field: "filterCategoryIds",
10664
+ count: {
10665
+ one: "in one category",
10666
+ many: "in {n} categories"
10667
+ }
10668
+ },
10669
+ {
10670
+ field: "filterStaffMemberId",
10671
+ chosen: {
10672
+ before: "with ",
10673
+ fallback: "one host"
10674
+ }
10675
+ },
10676
+ {
10677
+ field: "filterVenueId",
10678
+ chosen: {
10679
+ before: "at ",
10680
+ fallback: "one venue"
10681
+ }
10682
+ }
10683
+ ],
10684
+ none: "All events"
10685
+ }
10686
+ },
10687
+ {
10688
+ id: "count",
10689
+ title: "How many, and where the rest are",
10690
+ fields: [
10691
+ "listBy",
10692
+ "eventsPerPage",
10693
+ "paginationMode",
10694
+ "seeAllUrl",
10695
+ "loadMoreText",
10696
+ "seeAllButtonVariant"
10697
+ ],
10698
+ summary: {
10699
+ parts: [
10700
+ {
10701
+ field: "listBy",
10702
+ options: {
10703
+ upcoming: null,
10704
+ week: "this week, day by day"
10705
+ }
10706
+ },
10707
+ {
10708
+ field: "eventsPerPage",
10709
+ options: Object.fromEntries(eventCalendarPageSizes.map((value) => [value, value === "1" ? "just one" : `the first ${value}`]))
10710
+ },
10711
+ {
10712
+ field: "paginationMode",
10713
+ options: {
10714
+ none: "nothing after them",
10715
+ loadMore: "then a button to load more",
10716
+ seeAllLink: "then a link to another page"
10717
+ }
10718
+ },
10719
+ {
10720
+ field: "loadMoreText",
10721
+ text: {
10722
+ before: "“",
10723
+ after: "”"
10724
+ }
10725
+ }
10726
+ ],
10727
+ none: "A link, if you add one"
10728
+ }
10729
+ },
10730
+ {
10731
+ id: "calendar",
10732
+ title: "Weeks and months",
10733
+ fields: [
10734
+ "calendarTabViews",
10735
+ "defaultCalendarView",
10736
+ "startOfWeek"
10737
+ ],
10738
+ summary: {
10739
+ parts: [
10740
+ {
10741
+ field: "calendarTabViews",
10742
+ options: {
10743
+ both: "month and week",
10744
+ month: "month only",
10745
+ week: "week only"
10746
+ }
10747
+ },
10748
+ {
10749
+ field: "defaultCalendarView",
10750
+ options: {
10751
+ month: "opens on the month",
10752
+ week: "opens on the week"
10753
+ }
10754
+ },
10755
+ {
10756
+ field: "startOfWeek",
10757
+ options: {
10758
+ monday: "weeks start on Monday",
10759
+ sunday: "weeks start on Sunday"
10760
+ }
10761
+ }
10762
+ ],
10763
+ none: "Weeks start on your country’s usual day"
10764
+ }
10765
+ },
10766
+ {
10767
+ id: "card",
10768
+ title: "On each event",
10769
+ fields: [
10770
+ "showVenue",
10771
+ "showCapacity",
10772
+ "buttonText",
10773
+ "buttonVariant"
10774
+ ],
10775
+ summary: {
10776
+ parts: [
10777
+ {
10778
+ field: "showVenue",
10779
+ on: "venue"
10780
+ },
10781
+ {
10782
+ field: "showCapacity",
10783
+ on: "places left"
10784
+ },
10785
+ {
10786
+ field: "buttonText",
10787
+ text: {
10788
+ before: "button says “",
10789
+ after: "”",
10790
+ empty: "button says “Book”"
10791
+ }
10792
+ }
10793
+ ],
10794
+ none: "Name and time only"
10795
+ }
10796
+ },
10797
+ {
10798
+ id: "filters",
10799
+ title: "Filters for visitors",
10800
+ fields: [
10801
+ "showFilters",
10802
+ "showCategoryFilter",
10803
+ "showVenueFilter",
10804
+ "showStaffFilter"
10805
+ ],
10806
+ summary: {
10807
+ parts: [
10808
+ {
10809
+ field: "showCategoryFilter",
10810
+ options: {
10811
+ auto: "category",
10812
+ always: "category",
10813
+ never: null
10814
+ }
10815
+ },
10816
+ {
10817
+ field: "showVenueFilter",
10818
+ on: "venue"
10819
+ },
10820
+ {
10821
+ field: "showStaffFilter",
10822
+ on: "host"
10823
+ }
10824
+ ],
10825
+ none: "No filters"
10826
+ }
10827
+ },
10828
+ {
10829
+ id: "wording",
10830
+ title: "Heading and text",
10831
+ fields: [
10832
+ "eyebrow",
10833
+ "heading",
10834
+ "description",
10835
+ "boardTitle",
10836
+ "footerNote"
10837
+ ],
10838
+ summary: {
10839
+ parts: [{
10840
+ field: "heading",
10841
+ text: {
10842
+ before: "“",
10843
+ after: "”"
10844
+ }
10845
+ }],
10846
+ none: "No heading"
10847
+ }
10848
+ },
10849
+ {
10850
+ id: "layout",
10851
+ title: "Layout",
10852
+ fields: [
10853
+ "listLayout",
10854
+ "listColumns",
10855
+ "elevated",
10856
+ "banded"
10857
+ ],
10858
+ summary: {
10859
+ parts: [
10860
+ {
10861
+ field: "listLayout",
10862
+ options: {
10863
+ stack: "one under another",
10864
+ grid: "in a grid",
10865
+ compact: "a compact list"
10866
+ }
10867
+ },
10868
+ {
10869
+ field: "listColumns",
10870
+ options: {
10871
+ "2": "2 columns",
10872
+ "3": "3 columns",
10873
+ "4": "4 columns"
10874
+ }
10875
+ },
10876
+ {
10877
+ field: "elevated",
10878
+ on: "raised"
10879
+ },
10880
+ {
10881
+ field: "banded",
10882
+ on: "on a coloured band"
10883
+ }
10884
+ ],
10885
+ none: "Flat, on the page background"
10886
+ }
10887
+ },
10888
+ {
10889
+ id: "empty",
10890
+ title: "When there’s nothing on",
10891
+ fields: ["emptyBehavior", "emptyMessage"],
10892
+ summary: {
10893
+ parts: [{
10894
+ field: "emptyBehavior",
10895
+ options: {
10896
+ hide: "hide this section",
10897
+ message: "show a message"
10898
+ }
10899
+ }],
10900
+ none: "Hide this section"
10901
+ }
10902
+ }
10903
+ ],
10904
+ setup: ["variant", "eventSurface"]
10905
+ };
10906
+ //#endregion
10907
+ //#region ../blocks/src/system/manifest/decisionConditions.ts
10908
+ const ALWAYS = { kind: "always" };
10909
+ const NEVER = { kind: "never" };
10910
+ function conditionFromDecision(axes, holds) {
10911
+ return decideFrom(axes, {}, holds);
10912
+ }
10913
+ function decideFrom(axes, fixed, holds) {
10914
+ const [axis, ...rest] = axes;
10915
+ if (!axis) return holds(fixed) ? ALWAYS : NEVER;
10916
+ const grouped = groupByOutcome(axis.values.map((value) => ({
10917
+ value,
10918
+ outcome: decideFrom(rest, {
10919
+ ...fixed,
10920
+ [axis.key]: value
10921
+ }, holds)
10922
+ })));
10923
+ if (grouped.length === 1 && grouped[0]) return grouped[0].outcome;
10924
+ const terms = grouped.flatMap(({ values, outcome }) => {
10925
+ if (outcome.kind === "never") return [];
10926
+ const test = axis.when(values);
10927
+ return [outcome.kind === "always" ? test : { allOf: [test, ...conjuncts(outcome.condition)] }];
10928
+ });
10929
+ const [only] = terms;
10930
+ if (terms.length === 0) return NEVER;
10931
+ return {
10932
+ kind: "when",
10933
+ condition: terms.length === 1 && only ? only : { anyOf: terms }
10934
+ };
10935
+ }
10936
+ function conjuncts(condition) {
10937
+ return condition.allOf ?? [condition];
10938
+ }
10939
+ /** The axis's values that lead to the same outcome, in the axis's order. */
10940
+ function groupByOutcome(branches) {
10941
+ const keyed = branches.map((branch) => ({
10942
+ ...branch,
10943
+ key: JSON.stringify(branch.outcome)
10944
+ }));
10945
+ return [...new Set(keyed.map((branch) => branch.key))].map((key) => {
10946
+ const matching = keyed.filter((branch) => branch.key === key);
10947
+ return {
10948
+ values: matching.map((branch) => branch.value),
10949
+ outcome: matching[0]?.outcome ?? NEVER
10950
+ };
10951
+ });
10952
+ }
10953
+ /**
10954
+ * An axis over a field's stored value. `unset` is the value an empty field
10955
+ * reads as, so a test that includes it is written as "none of the others"
10956
+ * and still holds before anything is stored.
10957
+ */
10958
+ function fieldAxis(key, field, values, unset) {
10959
+ return {
10960
+ key,
10961
+ values,
10962
+ when: (chosen) => {
10963
+ if (!chosen.includes(unset)) return chosen.length === 1 ? {
10964
+ field,
10965
+ equals: chosen[0]
10966
+ } : {
10967
+ field,
10968
+ oneOf: [...chosen]
10969
+ };
10970
+ const others = values.filter((value) => !chosen.includes(value));
10971
+ return others.length === 1 ? {
10972
+ field,
10973
+ notEquals: others[0]
10974
+ } : {
10975
+ field,
10976
+ notIn: others
10977
+ };
10978
+ }
10979
+ };
10980
+ }
10981
+ /** An axis over whether a Look shapes the block. */
10982
+ function lookAxis(key) {
10983
+ return {
10984
+ key,
10985
+ values: ["applies", "none"],
10986
+ when: (chosen) => ({ look: chosen[0] === "none" ? "none" : "applies" })
10987
+ };
10988
+ }
10989
+ /** The condition to put on a field: none where the decision always offers it. A decision that never does is a mistake in the block. */
10990
+ function fieldConditionFrom(decided, field) {
10991
+ if (decided.kind === "never") throw new Error(`${field} is never offered`);
10992
+ return decided.kind === "when" ? decided.condition : void 0;
10993
+ }
10994
+ //#endregion
10995
+ //#region ../blocks/src/system/blocks/events/eventCalendarForm.ts
10996
+ function eventCalendarFormOffer(input) {
10997
+ const look = input.look === "applies";
10998
+ const grouping = eventCalendarListGroupingDecision({
10999
+ arrangementLooks: look,
11000
+ variant: input.variant,
11001
+ listBy: input.listBy
11002
+ });
11003
+ const { mode, jobs } = resolveEventCalendarReadPlan({ variant: input.variant });
11004
+ const listInWeeks = grouping.grouping === "week" || look && input.listLayout === "week-groups";
11005
+ return {
11006
+ listBy: grouping.available,
11007
+ paging: jobs === "list" && grouping.grouping === "upcoming",
11008
+ ...calendarViewsOffer(mode, look, input),
11009
+ startOfWeek: mode === "list" ? listInWeeks : mode !== "week"
11010
+ };
11011
+ }
11012
+ /** The views a calendar offers, which it opens on, and where that shows venues. A Look fixes the views on the month. */
11013
+ function calendarViewsOffer(mode, look, input) {
11014
+ const views = look ? eventCalendarLookViews : {
11015
+ calendarTabViews: input.calendarTabViews,
11016
+ defaultCalendarView: input.defaultCalendarView
11017
+ };
11018
+ const chooseViews = !look && (mode === "calendar" || mode === "combined");
11019
+ return {
11020
+ calendarTabViews: chooseViews && mode === "combined",
11021
+ defaultCalendarView: chooseViews && (mode === "calendar" || views.calendarTabViews === "both"),
11022
+ showVenue: mode === "calendar" ? views.defaultCalendarView === "week" : mode !== "timetable" && mode !== "week-board"
11023
+ };
11024
+ }
11025
+ /** Mode first, so each mode's condition only tests what that mode depends on. */
11026
+ const calendarAxes = [
11027
+ fieldAxis("variant", "variant", eventCalendarDisplayModeValues, "combined"),
11028
+ lookAxis("look"),
11029
+ fieldAxis("listBy", "listBy", ["upcoming", "week"], "upcoming"),
11030
+ {
11031
+ key: "listLayout",
11032
+ values: ["other", "week-groups"],
11033
+ when: (chosen) => chosen.includes("week-groups") ? {
11034
+ field: "listLayout",
11035
+ equals: "week-groups"
11036
+ } : {
11037
+ field: "listLayout",
11038
+ notEquals: "week-groups"
11039
+ }
11040
+ },
11041
+ fieldAxis("defaultCalendarView", "defaultCalendarView", ["month", "week"], "month"),
11042
+ fieldAxis("calendarTabViews", "calendarTabViews", [
11043
+ "both",
11044
+ "month",
11045
+ "week"
11046
+ ], "both")
11047
+ ];
11048
+ function calendarCase(decisionCase) {
11049
+ return {
11050
+ variant: eventCalendarDisplayModeValues.find((mode) => mode === decisionCase.variant) ?? "combined",
11051
+ look: decisionCase.look === "applies" ? "applies" : "none",
11052
+ listBy: decisionCase.listBy === "week" ? "week" : "upcoming",
11053
+ listLayout: decisionCase.listLayout === "week-groups" ? "week-groups" : "other",
11054
+ defaultCalendarView: decisionCase.defaultCalendarView === "week" ? "week" : "month",
11055
+ calendarTabViews: decisionCase.calendarTabViews === "month" || decisionCase.calendarTabViews === "week" ? decisionCase.calendarTabViews : "both"
11056
+ };
11057
+ }
11058
+ function offeredWhen(setting) {
11059
+ return fieldConditionFrom(conditionFromDecision(calendarAxes, (decisionCase) => eventCalendarFormOffer(calendarCase(decisionCase))[setting]), setting);
11060
+ }
11061
+ /** Each setting's condition, written out from `eventCalendarFormOffer`. A setting it always offers has none. */
11062
+ const eventCalendarFormConditions = {
11063
+ listBy: offeredWhen("listBy"),
11064
+ paging: offeredWhen("paging"),
11065
+ calendarTabViews: offeredWhen("calendarTabViews"),
11066
+ defaultCalendarView: offeredWhen("defaultCalendarView"),
11067
+ startOfWeek: offeredWhen("startOfWeek"),
11068
+ showVenue: offeredWhen("showVenue")
11069
+ };
11070
+ //#endregion
10065
11071
  //#region ../blocks/src/system/blocks/events/event-calendar.ts
10066
11072
  function normalizeEventCalendarContent(content) {
10067
11073
  const record = typeof content === "object" && content !== null ? content : {};
@@ -10283,119 +11289,129 @@ const eventCalendarLayout = [styledSection({
10283
11289
  spacing: "comfortable"
10284
11290
  })];
10285
11291
  /**
10286
- * Page size and "more events" settings apply to paged lists. A week list always shows its whole
10287
- * week, so they're hidden under List by Week where the site style offers week lists; the editor
10288
- * passes false when it doesn't, because a stored "Week" then lists upcoming events.
11292
+ * Page size and "more events" settings apply to a list that shows a page at a
11293
+ * time; a list grouped by week shows its whole week. Week and Week board have
11294
+ * no pages, but can link to another page with a button.
10289
11295
  */
10290
- const eventsPerPageOptions = [{
10291
- value: "1",
10292
- label: "Show just one"
10293
- }, ...[
10294
- "2",
10295
- "3",
10296
- "4",
10297
- "5",
10298
- "6",
10299
- "10",
10300
- "12",
10301
- "20",
10302
- "24",
10303
- "30"
10304
- ].map((value) => ({
11296
+ const eventsPerPageOptions = eventCalendarPageSizes.map((value) => ({
10305
11297
  value,
10306
- label: `Show the first ${value}`
10307
- }))];
10308
- function eventCalendarPagingFields(weekListsAvailable) {
10309
- const paged = weekListsAvailable ? { anyOf: [{
10310
- field: "variant",
10311
- equals: "combined"
10312
- }, { allOf: [{
10313
- field: "variant",
10314
- equals: "list"
10315
- }, {
10316
- field: "listBy",
10317
- notEquals: "week"
10318
- }] }] } : {
10319
- field: "variant",
10320
- oneOf: ["combined", "list"]
10321
- };
10322
- const weekVariants = {
10323
- field: "variant",
10324
- oneOf: ["week-board", "week"]
10325
- };
10326
- return [
10327
- {
10328
- id: "eventsPerPage",
10329
- type: "select",
10330
- label: "How many",
10331
- required: false,
10332
- multiple: false,
10333
- defaultValue: "12",
10334
- options: eventsPerPageOptions,
10335
- ui: {
10336
- intent: "behavior",
10337
- visibleWhen: paged
10338
- }
10339
- },
10340
- {
10341
- id: "paginationMode",
10342
- type: "select",
10343
- label: "More events",
10344
- required: false,
10345
- multiple: false,
10346
- defaultValue: "loadMore",
10347
- description: "How visitors can see the rest of your events.",
10348
- options: [
10349
- {
10350
- value: "none",
10351
- label: "No link or button"
10352
- },
10353
- {
10354
- value: "loadMore",
10355
- label: "Load more button"
10356
- },
10357
- {
10358
- value: "seeAllLink",
10359
- label: "Link to another page"
10360
- }
10361
- ],
10362
- ui: {
10363
- intent: "behavior",
10364
- visibleWhen: paged
10365
- }
10366
- },
10367
- {
10368
- id: "seeAllUrl",
10369
- type: "link",
10370
- label: "Link to the full list",
10371
- required: false,
10372
- ui: {
10373
- intent: "behavior",
10374
- visibleWhen: { anyOf: [{ allOf: [paged, {
10375
- field: "paginationMode",
10376
- equals: "seeAllLink"
10377
- }] }, weekVariants] }
10378
- }
10379
- },
10380
- {
10381
- id: "loadMoreText",
10382
- type: "text",
10383
- label: "More events button text",
10384
- required: false,
10385
- multiline: false,
10386
- description: "The text on the button or link that shows more events.",
10387
- defaultValue: "Load more events",
10388
- ui: {
10389
- intent: "behavior",
10390
- visibleWhen: { anyOf: [paged, weekVariants] }
11298
+ label: value === "1" ? "Show just one" : `Show the first ${value}`
11299
+ }));
11300
+ const paged = eventCalendarFormConditions.paging;
11301
+ const pagedAnd = (condition) => paged ? { allOf: [paged, condition] } : condition;
11302
+ const weekVariants = {
11303
+ field: "variant",
11304
+ oneOf: ["week-board", "week"]
11305
+ };
11306
+ const hasSeeAllLink = {
11307
+ field: "seeAllUrl",
11308
+ hasValue: true
11309
+ };
11310
+ const eventCalendarPagingFields = [
11311
+ {
11312
+ id: "eventsPerPage",
11313
+ type: "select",
11314
+ label: "How many",
11315
+ required: false,
11316
+ multiple: false,
11317
+ defaultValue: "12",
11318
+ options: eventsPerPageOptions,
11319
+ ui: {
11320
+ intent: "behavior",
11321
+ visibleWhen: paged
11322
+ }
11323
+ },
11324
+ {
11325
+ id: "paginationMode",
11326
+ type: "select",
11327
+ label: "After those",
11328
+ required: false,
11329
+ multiple: false,
11330
+ defaultValue: "loadMore",
11331
+ description: "How visitors can see the rest of your events.",
11332
+ options: [
11333
+ {
11334
+ value: "none",
11335
+ label: "Nothing"
11336
+ },
11337
+ {
11338
+ value: "loadMore",
11339
+ label: "A button to load more"
11340
+ },
11341
+ {
11342
+ value: "seeAllLink",
11343
+ label: "A link to another page"
10391
11344
  }
11345
+ ],
11346
+ ui: {
11347
+ intent: "behavior",
11348
+ visibleWhen: paged
10392
11349
  }
10393
- ];
11350
+ },
11351
+ {
11352
+ id: "seeAllUrl",
11353
+ type: "link",
11354
+ label: "Link to the full list",
11355
+ required: false,
11356
+ ui: {
11357
+ intent: "behavior",
11358
+ visibleWhen: { anyOf: [pagedAnd({
11359
+ field: "paginationMode",
11360
+ equals: "seeAllLink"
11361
+ }), weekVariants] }
11362
+ }
11363
+ },
11364
+ {
11365
+ id: "loadMoreText",
11366
+ type: "text",
11367
+ label: "Button or link text",
11368
+ required: false,
11369
+ multiline: false,
11370
+ description: "What the button or link says.",
11371
+ defaultValue: "Load more events",
11372
+ ui: {
11373
+ intent: "behavior",
11374
+ visibleWhen: { anyOf: [pagedAnd({
11375
+ field: "paginationMode",
11376
+ notEquals: "none"
11377
+ }), { allOf: [weekVariants, hasSeeAllLink] }] }
11378
+ }
11379
+ }
11380
+ ];
11381
+ function withVisibleWhen(field, visibleWhen) {
11382
+ return {
11383
+ ...field,
11384
+ ui: {
11385
+ ...field.ui,
11386
+ visibleWhen
11387
+ }
11388
+ };
10394
11389
  }
11390
+ /** The visitor filter bar: Week has none, and Week board never draws one. */
11391
+ const filterBarVariants = {
11392
+ field: "variant",
11393
+ oneOf: [
11394
+ "combined",
11395
+ "calendar",
11396
+ "list",
11397
+ "timetable"
11398
+ ]
11399
+ };
11400
+ /**
11401
+ * Each event's button. Week board has none of its own: the button text only
11402
+ * labels the board's link button when that has no text of its own.
11403
+ */
11404
+ const buttonTextShown = { anyOf: [{
11405
+ field: "variant",
11406
+ notEquals: "week-board"
11407
+ }, { allOf: [hasSeeAllLink, {
11408
+ field: "loadMoreText",
11409
+ hasValue: false
11410
+ }] }] };
10395
11411
  const eventCalendarAdditionalFields = [
10396
11412
  ...cardListKnobFields,
10397
11413
  ...cardListPhotoNumberFields.filter((field) => field.id === "showPhotos"),
10398
- ...eventDisplayFields.filter((field) => field.id === "showVenue"),
11414
+ ...eventDisplayFields.filter((field) => field.id === "showVenue").map((field) => withVisibleWhen(field, eventCalendarFormConditions.showVenue)),
10399
11415
  {
10400
11416
  id: "eyebrow",
10401
11417
  type: "text",
@@ -10404,11 +11420,14 @@ const eventCalendarAdditionalFields = [
10404
11420
  multiline: false,
10405
11421
  maxLength: 80
10406
11422
  },
10407
- createButtonVariantField({
11423
+ withVisibleWhen(createButtonVariantField({
10408
11424
  id: "seeAllButtonVariant",
10409
11425
  label: "See all button style",
10410
11426
  defaultValue: "secondary"
10411
- }),
11427
+ }), { allOf: [{
11428
+ field: "variant",
11429
+ equals: "week"
11430
+ }, hasSeeAllLink] }),
10412
11431
  ...sectionHeaderFields("Event Calendar"),
10413
11432
  {
10414
11433
  id: "displayMode",
@@ -10465,10 +11484,7 @@ const eventCalendarAdditionalFields = [
10465
11484
  }],
10466
11485
  ui: {
10467
11486
  intent: "behavior",
10468
- visibleWhen: {
10469
- field: "variant",
10470
- equals: "list"
10471
- }
11487
+ visibleWhen: eventCalendarFormConditions.listBy
10472
11488
  }
10473
11489
  },
10474
11490
  {
@@ -10494,8 +11510,8 @@ const eventCalendarAdditionalFields = [
10494
11510
  {
10495
11511
  id: "listColumns",
10496
11512
  type: "select",
10497
- label: "Grid columns",
10498
- description: "Number of columns in grid layout",
11513
+ label: "Columns",
11514
+ description: "How many columns the grid has.",
10499
11515
  required: false,
10500
11516
  multiple: false,
10501
11517
  defaultValue: "3",
@@ -10524,12 +11540,12 @@ const eventCalendarAdditionalFields = [
10524
11540
  }] }
10525
11541
  }
10526
11542
  },
10527
- ...eventCalendarPagingFields(true),
11543
+ ...eventCalendarPagingFields,
10528
11544
  {
10529
11545
  id: "startOfWeek",
10530
11546
  type: "select",
10531
11547
  label: "Week starts on",
10532
- description: "First day of the week",
11548
+ description: "Left unset, weeks start on your country’s usual day.",
10533
11549
  required: false,
10534
11550
  multiple: false,
10535
11551
  options: [{
@@ -10541,16 +11557,7 @@ const eventCalendarAdditionalFields = [
10541
11557
  }],
10542
11558
  ui: {
10543
11559
  intent: "behavior",
10544
- visibleWhen: {
10545
- field: "variant",
10546
- oneOf: [
10547
- "combined",
10548
- "calendar",
10549
- "list",
10550
- "timetable",
10551
- "week-board"
10552
- ]
10553
- }
11560
+ visibleWhen: eventCalendarFormConditions.startOfWeek
10554
11561
  }
10555
11562
  },
10556
11563
  {
@@ -10577,16 +11584,13 @@ const eventCalendarAdditionalFields = [
10577
11584
  ],
10578
11585
  ui: {
10579
11586
  intent: "behavior",
10580
- visibleWhen: {
10581
- field: "variant",
10582
- equals: "combined"
10583
- }
11587
+ visibleWhen: eventCalendarFormConditions.calendarTabViews
10584
11588
  }
10585
11589
  },
10586
11590
  {
10587
11591
  id: "defaultCalendarView",
10588
11592
  type: "select",
10589
- label: "Calendar view",
11593
+ label: "Opens on",
10590
11594
  description: "Which view visitors see first.",
10591
11595
  required: false,
10592
11596
  multiple: false,
@@ -10600,37 +11604,19 @@ const eventCalendarAdditionalFields = [
10600
11604
  }],
10601
11605
  ui: {
10602
11606
  intent: "display",
10603
- visibleWhen: { anyOf: [{
10604
- field: "variant",
10605
- equals: "calendar"
10606
- }, { allOf: [{
10607
- field: "variant",
10608
- equals: "combined"
10609
- }, {
10610
- field: "calendarTabViews",
10611
- equals: "both"
10612
- }] }] }
11607
+ visibleWhen: eventCalendarFormConditions.defaultCalendarView
10613
11608
  }
10614
11609
  },
10615
11610
  {
10616
11611
  id: "showFilters",
10617
11612
  type: "boolean",
10618
11613
  label: "Show filters",
10619
- description: "Lets visitors filter by category, team member or venue.",
11614
+ description: "Lets visitors filter by category, host or venue.",
10620
11615
  required: false,
10621
11616
  defaultValue: true,
10622
11617
  ui: {
10623
11618
  intent: "behavior",
10624
- visibleWhen: {
10625
- field: "variant",
10626
- oneOf: [
10627
- "combined",
10628
- "calendar",
10629
- "list",
10630
- "timetable",
10631
- "week-board"
10632
- ]
10633
- }
11619
+ visibleWhen: { allOf: [filterBarVariants, eventFilterConditions.showFilters] }
10634
11620
  }
10635
11621
  },
10636
11622
  {
@@ -10657,19 +11643,14 @@ const eventCalendarAdditionalFields = [
10657
11643
  ],
10658
11644
  ui: {
10659
11645
  intent: "behavior",
10660
- visibleWhen: { allOf: [{
10661
- field: "variant",
10662
- oneOf: [
10663
- "combined",
10664
- "calendar",
10665
- "list",
10666
- "timetable",
10667
- "week-board"
10668
- ]
10669
- }, {
10670
- field: "showFilters",
10671
- equals: true
10672
- }] }
11646
+ visibleWhen: { allOf: [
11647
+ filterBarVariants,
11648
+ {
11649
+ field: "showFilters",
11650
+ equals: true
11651
+ },
11652
+ eventFilterConditions.showCategoryFilter
11653
+ ] }
10673
11654
  }
10674
11655
  },
10675
11656
  {
@@ -10681,43 +11662,33 @@ const eventCalendarAdditionalFields = [
10681
11662
  defaultValue: false,
10682
11663
  ui: {
10683
11664
  intent: "behavior",
10684
- visibleWhen: { allOf: [{
10685
- field: "variant",
10686
- oneOf: [
10687
- "combined",
10688
- "calendar",
10689
- "list",
10690
- "timetable",
10691
- "week-board"
10692
- ]
10693
- }, {
10694
- field: "showFilters",
10695
- equals: true
10696
- }] }
11665
+ visibleWhen: { allOf: [
11666
+ filterBarVariants,
11667
+ {
11668
+ field: "showFilters",
11669
+ equals: true
11670
+ },
11671
+ eventFilterConditions.showVenueFilter
11672
+ ] }
10697
11673
  }
10698
11674
  },
10699
11675
  {
10700
11676
  id: "showStaffFilter",
10701
11677
  type: "boolean",
10702
- label: "Show team filter",
10703
- description: "Lets visitors pick someone from your team.",
11678
+ label: "Show host filter",
11679
+ description: "Lets visitors pick a host.",
10704
11680
  required: false,
10705
11681
  defaultValue: true,
10706
11682
  ui: {
10707
11683
  intent: "behavior",
10708
- visibleWhen: { allOf: [{
10709
- field: "variant",
10710
- oneOf: [
10711
- "combined",
10712
- "calendar",
10713
- "list",
10714
- "timetable",
10715
- "week-board"
10716
- ]
10717
- }, {
10718
- field: "showFilters",
10719
- equals: true
10720
- }] }
11684
+ visibleWhen: { allOf: [
11685
+ filterBarVariants,
11686
+ {
11687
+ field: "showFilters",
11688
+ equals: true
11689
+ },
11690
+ eventFilterConditions.showStaffFilter
11691
+ ] }
10721
11692
  }
10722
11693
  },
10723
11694
  {
@@ -10729,21 +11700,10 @@ const eventCalendarAdditionalFields = [
10729
11700
  defaultValue: true,
10730
11701
  ui: {
10731
11702
  intent: "display",
10732
- visibleWhen: { anyOf: [{
10733
- field: "variant",
10734
- oneOf: [
10735
- "combined",
10736
- "list",
10737
- "timetable",
10738
- "week-board"
10739
- ]
10740
- }, { allOf: [{
11703
+ visibleWhen: {
10741
11704
  field: "variant",
10742
- equals: "calendar"
10743
- }, {
10744
- field: "defaultCalendarView",
10745
- equals: "week"
10746
- }] }] }
11705
+ notEquals: "week"
11706
+ }
10747
11707
  }
10748
11708
  },
10749
11709
  {
@@ -10764,7 +11724,7 @@ const eventCalendarAdditionalFields = [
10764
11724
  {
10765
11725
  id: "footerNote",
10766
11726
  type: "text",
10767
- label: "Footer note",
11727
+ label: "Note under the board",
10768
11728
  description: "An optional note along the bottom of the board.",
10769
11729
  required: false,
10770
11730
  multiline: true,
@@ -10810,7 +11770,7 @@ const eventCalendarAdditionalFields = [
10810
11770
  {
10811
11771
  id: "eventSurface",
10812
11772
  type: "select",
10813
- label: "Which events",
11773
+ label: "Kinds of event",
10814
11774
  required: false,
10815
11775
  multiple: false,
10816
11776
  defaultValue: "all",
@@ -10888,19 +11848,21 @@ const eventCalendarAdditionalFields = [
10888
11848
  optionSource: "eventCategories",
10889
11849
  ui: {
10890
11850
  intent: "behavior",
10891
- searchThreshold: 8
11851
+ searchThreshold: 8,
11852
+ visibleWhen: eventFilterConditions.filterCategoryIds
10892
11853
  }
10893
11854
  }),
10894
11855
  createSiteOptionSelectField({
10895
11856
  id: "filterStaffMemberId",
10896
- label: "Only show one team member",
10897
- description: "Pick someone from your team to show only their events.",
11857
+ label: "Only show one host",
11858
+ description: "Pick a host to show only their events.",
10898
11859
  required: false,
10899
11860
  multiple: false,
10900
11861
  optionSource: "staffMembers",
10901
11862
  ui: {
10902
11863
  intent: "behavior",
10903
- searchThreshold: 8
11864
+ searchThreshold: 8,
11865
+ visibleWhen: eventFilterConditions.filterStaffMemberId
10904
11866
  }
10905
11867
  }),
10906
11868
  createSiteOptionSelectField({
@@ -10912,14 +11874,16 @@ const eventCalendarAdditionalFields = [
10912
11874
  optionSource: "venues",
10913
11875
  ui: {
10914
11876
  intent: "behavior",
10915
- searchThreshold: 8
11877
+ searchThreshold: 8,
11878
+ visibleWhen: eventFilterConditions.filterVenueId
10916
11879
  }
10917
11880
  }),
10918
11881
  ...cardStylingFields.map((field) => ({
10919
11882
  ...field,
10920
11883
  ui: {
10921
11884
  ...field.ui ?? {},
10922
- intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content"
11885
+ intent: field.id === "_cardStyles" || field.id === "buttonVariant" ? "style" : "content",
11886
+ ...field.id === "buttonText" ? { visibleWhen: buttonTextShown } : {}
10923
11887
  }
10924
11888
  })),
10925
11889
  ...eventEmptyBehaviorFields,
@@ -10982,30 +11946,6 @@ const eventCalendarContentShape = {
10982
11946
  /** Week rows use their fixed recurring-series read, without occurrence filters. */
10983
11947
  function withCalendarModeVisibility(field) {
10984
11948
  const selected = withEventSelectionVisibility(field);
10985
- if (field.id === "showVenue") return {
10986
- ...selected,
10987
- ui: {
10988
- ...selected.ui,
10989
- visibleWhen: {
10990
- field: "variant",
10991
- oneOf: [
10992
- "week",
10993
- "list",
10994
- "combined"
10995
- ]
10996
- }
10997
- }
10998
- };
10999
- if (field.id === "seeAllButtonVariant") return {
11000
- ...selected,
11001
- ui: {
11002
- ...selected.ui,
11003
- visibleWhen: {
11004
- field: "variant",
11005
- equals: "week"
11006
- }
11007
- }
11008
- };
11009
11949
  if (![
11010
11950
  "eventSelection",
11011
11951
  "selectedEventSeriesIds",
@@ -11029,18 +11969,7 @@ function withCalendarModeVisibility(field) {
11029
11969
  }
11030
11970
  const generatedEventCalendarManifest = createBlockManifestWithContentShape({
11031
11971
  id: "block.event-calendar",
11032
- promotedFields: [
11033
- "variant",
11034
- "listBy",
11035
- "calendarTabViews",
11036
- "defaultCalendarView",
11037
- "eventSurface",
11038
- "filterEventPresets",
11039
- "scheduleScope",
11040
- "eventsPerPage",
11041
- "paginationMode",
11042
- "seeAllUrl"
11043
- ],
11972
+ editing: eventCalendarEditing,
11044
11973
  version: "3.6.0",
11045
11974
  title: "Event calendar",
11046
11975
  titleSource: "heading",
@@ -11136,226 +12065,373 @@ const mapDrawingStyleBinding = { $bind: {
11136
12065
  options: { fallbackToken: "background" }
11137
12066
  }]
11138
12067
  } };
11139
- const eventListingManifest = createBlockManifestWithContentShape({
11140
- variantMeaning: { kind: "arrangement" },
11141
- id: "block.event-listing",
11142
- version: "1.1.0",
11143
- title: "Event listing",
11144
- titleSource: "heading",
11145
- description: "All your upcoming events in one list.",
11146
- skipSectionStyles: true,
11147
- additionalFields: [
11148
- ...sectionHeaderFields("All Events"),
11149
- ...(() => {
11150
- const columns = columnsField([
11151
- "2",
11152
- "3",
11153
- "4"
11154
- ]);
11155
- return [{
11156
- ...layoutField,
11157
- ui: {
11158
- ...layoutField.ui ?? {},
11159
- intent: "display"
11160
- }
11161
- }, {
11162
- ...columns,
11163
- ui: {
11164
- ...columns.ui ?? {},
11165
- intent: "display"
11166
- }
11167
- }];
11168
- })(),
11169
- {
11170
- id: "eventsPerPage",
11171
- type: "select",
11172
- label: "How many",
11173
- required: false,
11174
- multiple: false,
11175
- defaultValue: "12",
11176
- options: [
11177
- {
11178
- value: "3",
11179
- label: "Show the first 3"
11180
- },
11181
- {
11182
- value: "6",
11183
- label: "Show the first 6"
11184
- },
11185
- {
11186
- value: "12",
11187
- label: "Show the first 12"
11188
- },
11189
- {
11190
- value: "24",
11191
- label: "Show the first 24"
11192
- }
11193
- ],
11194
- ui: { intent: "display" }
11195
- },
12068
+ //#endregion
12069
+ //#region ../blocks/src/system/blocks/events/event-listing.ts
12070
+ /**
12071
+ * Event Listing Block
12072
+ *
12073
+ * Displays a paginated list of events with a "load more" button.
12074
+ * Ideal for dedicated events pages showing all upcoming events.
12075
+ *
12076
+ * Features:
12077
+ * - Server-side initial load
12078
+ * - Client-side "load more" pagination
12079
+ * - Grid or stack layout
12080
+ * - Configurable initial load and page sizes
12081
+ * - Theme-aware card and button styling
12082
+ */
12083
+ const eventListingAdditionalFields = [
12084
+ ...sectionHeaderFields("All events", "Text under the heading"),
12085
+ ...(() => {
12086
+ const columns = columnsField([
12087
+ "2",
12088
+ "3",
12089
+ "4"
12090
+ ]);
12091
+ return [{
12092
+ ...layoutField,
12093
+ ui: {
12094
+ ...layoutField.ui ?? {},
12095
+ intent: "display"
12096
+ }
12097
+ }, {
12098
+ ...columns,
12099
+ ui: {
12100
+ ...columns.ui ?? {},
12101
+ intent: "display"
12102
+ }
12103
+ }];
12104
+ })(),
12105
+ {
12106
+ id: "eventsPerPage",
12107
+ type: "select",
12108
+ label: "How many",
12109
+ required: false,
12110
+ multiple: false,
12111
+ defaultValue: "12",
12112
+ options: [
12113
+ {
12114
+ value: "3",
12115
+ label: "Show the first 3"
12116
+ },
12117
+ {
12118
+ value: "6",
12119
+ label: "Show the first 6"
12120
+ },
12121
+ {
12122
+ value: "12",
12123
+ label: "Show the first 12"
12124
+ },
12125
+ {
12126
+ value: "24",
12127
+ label: "Show the first 24"
12128
+ }
12129
+ ],
12130
+ ui: { intent: "behavior" }
12131
+ },
12132
+ {
12133
+ id: "paginationMode",
12134
+ type: "select",
12135
+ label: "After those",
12136
+ description: "How visitors can see the rest of your events.",
12137
+ required: false,
12138
+ multiple: false,
12139
+ defaultValue: "loadMore",
12140
+ options: [{
12141
+ value: "loadMore",
12142
+ label: "A button to load more"
12143
+ }, {
12144
+ value: "seeAllLink",
12145
+ label: "A link to another page"
12146
+ }],
12147
+ ui: { intent: "behavior" }
12148
+ },
12149
+ {
12150
+ id: "seeAllUrl",
12151
+ type: "link",
12152
+ label: "Link to the full list",
12153
+ required: false,
12154
+ ui: {
12155
+ intent: "behavior",
12156
+ visibleWhen: {
12157
+ field: "paginationMode",
12158
+ equals: "seeAllLink"
12159
+ }
12160
+ }
12161
+ },
12162
+ {
12163
+ id: "loadMoreText",
12164
+ type: "text",
12165
+ label: "Button or link text",
12166
+ description: "The words on the button or link that shows more events.",
12167
+ required: false,
12168
+ multiline: false,
12169
+ defaultValue: "Load more events",
12170
+ maxLength: 40
12171
+ },
12172
+ ...cardStylingFields.map((field) => ({
12173
+ ...field,
12174
+ ui: {
12175
+ ...field.ui ?? {},
12176
+ intent: field.id === "buttonText" ? "content" : "style"
12177
+ }
12178
+ })),
12179
+ ...eventDisplayFields.map(withoutMap),
12180
+ {
12181
+ id: "eventSurface",
12182
+ type: "select",
12183
+ label: "Kinds of event",
12184
+ description: "Everything, your regular classes, or workshops and special events.",
12185
+ required: false,
12186
+ multiple: false,
12187
+ defaultValue: "all",
12188
+ options: [
12189
+ {
12190
+ value: "all",
12191
+ label: "All events"
12192
+ },
12193
+ {
12194
+ value: "regularClassSchedule",
12195
+ label: "Regular class schedule"
12196
+ },
12197
+ {
12198
+ value: "specialDatedEvents",
12199
+ label: "Workshops and special events"
12200
+ },
12201
+ {
12202
+ value: "custom",
12203
+ label: "Custom"
12204
+ }
12205
+ ],
12206
+ ui: { intent: "behavior" }
12207
+ },
12208
+ {
12209
+ id: "filterEventPresets",
12210
+ type: "select",
12211
+ label: "Only show these event types",
12212
+ description: "Pick the types of event this block shows.",
12213
+ required: false,
12214
+ multiple: true,
12215
+ defaultValue: [],
12216
+ options: [
12217
+ {
12218
+ value: "course",
12219
+ label: "Courses"
12220
+ },
12221
+ {
12222
+ value: "class",
12223
+ label: "Classes"
12224
+ },
12225
+ {
12226
+ value: "workshop",
12227
+ label: "Workshops"
12228
+ },
12229
+ {
12230
+ value: "retreat",
12231
+ label: "Retreats"
12232
+ },
12233
+ {
12234
+ value: "performance",
12235
+ label: "Performances"
12236
+ }
12237
+ ],
12238
+ ui: {
12239
+ intent: "behavior",
12240
+ visibleWhen: {
12241
+ field: "eventSurface",
12242
+ equals: "custom"
12243
+ }
12244
+ }
12245
+ },
12246
+ {
12247
+ id: "scheduleScope",
12248
+ type: "select",
12249
+ label: "Regular or one-off",
12250
+ description: "Show regular events, one-off events or both.",
12251
+ required: false,
12252
+ multiple: false,
12253
+ defaultValue: "any",
12254
+ options: [
12255
+ {
12256
+ value: "any",
12257
+ label: "Both"
12258
+ },
12259
+ {
12260
+ value: "recurring",
12261
+ label: "Regular events only"
12262
+ },
12263
+ {
12264
+ value: "oneOff",
12265
+ label: "One-off events only"
12266
+ }
12267
+ ],
12268
+ ui: {
12269
+ intent: "behavior",
12270
+ visibleWhen: {
12271
+ field: "eventSurface",
12272
+ equals: "custom"
12273
+ }
12274
+ }
12275
+ },
12276
+ ...eventEmptyBehaviorFields.map((field) => field.id === "emptyMessage" ? {
12277
+ ...field,
12278
+ label: "Message"
12279
+ } : field),
12280
+ sectionStylesField({
12281
+ id: "_sectionStyles",
12282
+ label: "Section styles",
12283
+ renderInHeader: false
12284
+ }),
12285
+ containerStylesField({
12286
+ id: "_containerStyles",
12287
+ label: "Panel styles",
12288
+ includeBackground: false,
12289
+ renderInHeader: false
12290
+ })
12291
+ ];
12292
+ /**
12293
+ * Where the listing's settings go. The events come from the site, so the
12294
+ * block itself is its heading and the text under it. The rows are the
12295
+ * calendar's, where they cover the same things.
12296
+ */
12297
+ const eventListingEditing = {
12298
+ content: ["heading", "description"],
12299
+ settings: [
11196
12300
  {
11197
- id: "paginationMode",
11198
- type: "select",
11199
- label: "More events",
11200
- description: "How visitors can see the rest of your events.",
11201
- required: false,
11202
- multiple: false,
11203
- defaultValue: "loadMore",
11204
- options: [{
11205
- value: "loadMore",
11206
- label: "Load more button"
11207
- }, {
11208
- value: "seeAllLink",
11209
- label: "Link to another page"
11210
- }],
11211
- ui: { intent: "display" }
12301
+ id: "events",
12302
+ title: "Which events",
12303
+ fields: [
12304
+ "eventSurface",
12305
+ "filterEventPresets",
12306
+ "scheduleScope"
12307
+ ],
12308
+ summary: {
12309
+ parts: [{
12310
+ field: "eventSurface",
12311
+ options: {
12312
+ all: "all events",
12313
+ regularClassSchedule: "regular classes",
12314
+ specialDatedEvents: "workshops and one-off events",
12315
+ custom: "some kinds of event"
12316
+ }
12317
+ }, {
12318
+ field: "scheduleScope",
12319
+ options: {
12320
+ any: null,
12321
+ recurring: "regular ones only",
12322
+ oneOff: "one-off ones only"
12323
+ }
12324
+ }],
12325
+ none: "All events"
12326
+ }
11212
12327
  },
11213
12328
  {
11214
- id: "seeAllUrl",
11215
- type: "link",
11216
- label: "Link to the full list",
11217
- required: false,
11218
- ui: {
11219
- intent: "display",
11220
- visibleWhen: {
12329
+ id: "count",
12330
+ title: "How many, and where the rest are",
12331
+ fields: [
12332
+ "eventsPerPage",
12333
+ "paginationMode",
12334
+ "seeAllUrl",
12335
+ "loadMoreText"
12336
+ ],
12337
+ summary: {
12338
+ parts: [{
12339
+ field: "eventsPerPage",
12340
+ options: {
12341
+ "3": "the first 3",
12342
+ "6": "the first 6",
12343
+ "12": "the first 12",
12344
+ "24": "the first 24"
12345
+ }
12346
+ }, {
11221
12347
  field: "paginationMode",
11222
- equals: "seeAllLink"
11223
- }
12348
+ options: {
12349
+ loadMore: "then a button to load more",
12350
+ seeAllLink: "then a link to another page"
12351
+ }
12352
+ }],
12353
+ none: "The first 12"
11224
12354
  }
11225
12355
  },
11226
12356
  {
11227
- id: "loadMoreText",
11228
- type: "text",
11229
- label: "More events button text",
11230
- description: "The text on the button or link that shows more events.",
11231
- required: false,
11232
- multiline: false,
11233
- defaultValue: "Load more events",
11234
- maxLength: 40
11235
- },
11236
- ...cardStylingFields.map((field) => ({
11237
- ...field,
11238
- ui: {
11239
- ...field.ui ?? {},
11240
- intent: "style"
11241
- }
11242
- })),
11243
- ...eventDisplayFields.map((field) => ({
11244
- ...field,
11245
- ui: {
11246
- ...field.ui ?? {},
11247
- intent: "display"
11248
- }
11249
- })),
11250
- {
11251
- id: "eventSurface",
11252
- type: "select",
11253
- label: "Event types",
11254
- description: "Choose whether this block shows everything, regular classes, or workshops and special events.",
11255
- required: false,
11256
- multiple: false,
11257
- defaultValue: "all",
11258
- options: [
11259
- {
11260
- value: "all",
11261
- label: "All events"
11262
- },
11263
- {
11264
- value: "regularClassSchedule",
11265
- label: "Regular class schedule"
11266
- },
11267
- {
11268
- value: "specialDatedEvents",
11269
- label: "Workshops and special events"
11270
- },
11271
- {
11272
- value: "custom",
11273
- label: "Custom"
11274
- }
12357
+ id: "card",
12358
+ title: "On each event",
12359
+ fields: [
12360
+ "showVenue",
12361
+ "showCapacity",
12362
+ "buttonText",
12363
+ "buttonVariant"
11275
12364
  ],
11276
- ui: { intent: "behavior" }
12365
+ summary: {
12366
+ parts: [
12367
+ {
12368
+ field: "showVenue",
12369
+ on: "venue"
12370
+ },
12371
+ {
12372
+ field: "showCapacity",
12373
+ on: "places left"
12374
+ },
12375
+ {
12376
+ field: "buttonText",
12377
+ text: {
12378
+ before: "button says “",
12379
+ after: "”",
12380
+ empty: "button says “Book”"
12381
+ }
12382
+ }
12383
+ ],
12384
+ none: "Name and time only"
12385
+ }
11277
12386
  },
11278
12387
  {
11279
- id: "filterEventPresets",
11280
- type: "select",
11281
- label: "Only show these event types",
11282
- description: "Pick the types of event this block shows.",
11283
- required: false,
11284
- multiple: true,
11285
- defaultValue: [],
11286
- options: [
11287
- {
11288
- value: "course",
11289
- label: "Courses"
11290
- },
11291
- {
11292
- value: "class",
11293
- label: "Classes"
11294
- },
11295
- {
11296
- value: "workshop",
11297
- label: "Workshops"
11298
- },
11299
- {
11300
- value: "retreat",
11301
- label: "Retreats"
11302
- },
11303
- {
11304
- value: "performance",
11305
- label: "Performances"
11306
- }
11307
- ],
11308
- ui: {
11309
- intent: "behavior",
11310
- visibleWhen: {
11311
- field: "eventSurface",
11312
- equals: "custom"
11313
- }
12388
+ id: "layout",
12389
+ title: "Layout",
12390
+ fields: ["layout", "columns"],
12391
+ summary: {
12392
+ parts: [{
12393
+ field: "layout",
12394
+ options: {
12395
+ grid: "cards in a grid",
12396
+ stack: "one under another"
12397
+ }
12398
+ }, {
12399
+ field: "columns",
12400
+ options: {
12401
+ "2": "2 columns",
12402
+ "3": "3 columns",
12403
+ "4": "4 columns"
12404
+ }
12405
+ }],
12406
+ none: "Cards in a grid"
11314
12407
  }
11315
12408
  },
11316
12409
  {
11317
- id: "scheduleScope",
11318
- type: "select",
11319
- label: "Regular or one-off",
11320
- description: "Show regular events, one-off events or both.",
11321
- required: false,
11322
- multiple: false,
11323
- defaultValue: "any",
11324
- options: [
11325
- {
11326
- value: "any",
11327
- label: "Both"
11328
- },
11329
- {
11330
- value: "recurring",
11331
- label: "Regular events only"
11332
- },
11333
- {
11334
- value: "oneOff",
11335
- label: "One-off events only"
11336
- }
11337
- ],
11338
- ui: {
11339
- intent: "behavior",
11340
- visibleWhen: {
11341
- field: "eventSurface",
11342
- equals: "custom"
11343
- }
12410
+ id: "empty",
12411
+ title: "When there’s nothing on",
12412
+ fields: ["emptyBehavior", "emptyMessage"],
12413
+ summary: {
12414
+ parts: [{
12415
+ field: "emptyBehavior",
12416
+ options: {
12417
+ hide: "hide this section",
12418
+ message: "show a message"
12419
+ }
12420
+ }],
12421
+ none: "Hide this section"
11344
12422
  }
11345
- },
11346
- ...eventEmptyBehaviorFields,
11347
- sectionStylesField({
11348
- id: "_sectionStyles",
11349
- label: "Section styles",
11350
- renderInHeader: false
11351
- }),
11352
- containerStylesField({
11353
- id: "_containerStyles",
11354
- label: "Panel styles",
11355
- includeBackground: false,
11356
- renderInHeader: false
11357
- })
11358
- ],
12423
+ }
12424
+ ]
12425
+ };
12426
+ const eventListingManifest = createBlockManifestWithContentShape({
12427
+ variantMeaning: { kind: "arrangement" },
12428
+ id: "block.event-listing",
12429
+ version: "1.1.0",
12430
+ title: "Event listing",
12431
+ titleSource: "heading",
12432
+ description: "All your upcoming events in one list.",
12433
+ skipSectionStyles: true,
12434
+ additionalFields: eventListingAdditionalFields,
11359
12435
  styleTokens: {
11360
12436
  background: "surface",
11361
12437
  typography: "body",
@@ -11442,7 +12518,8 @@ const eventListingManifest = createBlockManifestWithContentShape({
11442
12518
  }),
11443
12519
  baseClass: "",
11444
12520
  spacing: "comfortable"
11445
- })]
12521
+ })],
12522
+ editing: eventListingEditing
11446
12523
  }, {
11447
12524
  additionalFields: [{
11448
12525
  id: "layout",
@@ -11556,7 +12633,19 @@ const newsletterSignupManifest = createBlockManifest({
11556
12633
  text: "",
11557
12634
  target: "mailing-lists"
11558
12635
  },
11559
- promotedFields: ["targeting"],
12636
+ editing: {
12637
+ content: [
12638
+ "title",
12639
+ "subtitle",
12640
+ "targeting",
12641
+ "topicsQuestion"
12642
+ ],
12643
+ settings: [
12644
+ "showWhen",
12645
+ "selectedEventSeriesIds",
12646
+ "buttonVariant"
12647
+ ]
12648
+ },
11560
12649
  title: "Newsletter signup",
11561
12650
  titleSource: "title",
11562
12651
  description: "Lets people join one of your mailing lists.",
@@ -11584,11 +12673,17 @@ const newsletterSignupManifest = createBlockManifest({
11584
12673
  id: "topicsQuestion",
11585
12674
  type: "text",
11586
12675
  label: "Question above the topics",
11587
- description: "Used when people choose their own topics. Leave it empty for \"What would you like to hear about?\"",
12676
+ description: "Leave it empty for \"What would you like to hear about?\"",
11588
12677
  required: false,
11589
12678
  multiline: false,
11590
12679
  maxLength: 80,
11591
- ui: { intent: "content" }
12680
+ ui: {
12681
+ intent: "content",
12682
+ visibleWhen: {
12683
+ field: "targeting.selection.tag",
12684
+ equals: "visitor_choice"
12685
+ }
12686
+ }
11592
12687
  },
11593
12688
  {
11594
12689
  id: "showWhen",
@@ -11642,11 +12737,11 @@ const newsletterSignupManifest = createBlockManifest({
11642
12737
  description: "Vertical layout with fields stacked"
11643
12738
  },
11644
12739
  inline: {
11645
- label: "Inline",
12740
+ label: "Email and button on one row",
11646
12741
  description: "Horizontal layout (email + button side by side)"
11647
12742
  },
11648
12743
  "editorial-split": {
11649
- label: "Editorial split",
12744
+ label: "Text beside the sign-up",
11650
12745
  description: "Copy and form in balanced side-by-side columns, stacked on mobile."
11651
12746
  }
11652
12747
  },
@@ -11693,17 +12788,49 @@ const productDetailBlockDefinition = {
11693
12788
  manifest: createBlockManifest({
11694
12789
  variantMeaning: { kind: "arrangement" },
11695
12790
  id: "block.product-detail",
11696
- promotedFields: ["productSlug"],
11697
12791
  version: "1.0.0",
11698
12792
  title: "Product detail",
11699
12793
  titleSource: "heading",
11700
12794
  description: "One product with its photos and an add-to-cart button.",
11701
12795
  skipSectionStyles: true,
12796
+ editing: {
12797
+ content: ["productSlug"],
12798
+ settings: [{
12799
+ id: "shown",
12800
+ title: "With the product",
12801
+ fields: [
12802
+ "heading",
12803
+ "showSummary",
12804
+ "showBody"
12805
+ ],
12806
+ summary: {
12807
+ parts: [
12808
+ {
12809
+ field: "heading",
12810
+ text: {
12811
+ before: "label “",
12812
+ after: "”"
12813
+ }
12814
+ },
12815
+ {
12816
+ field: "showSummary",
12817
+ on: "summary"
12818
+ },
12819
+ {
12820
+ field: "showBody",
12821
+ on: "details"
12822
+ }
12823
+ ],
12824
+ none: "Name, photos and price only"
12825
+ }
12826
+ }, "addButtonText"]
12827
+ },
11702
12828
  additionalFields: [
11703
12829
  {
11704
12830
  id: "heading",
11705
12831
  type: "text",
11706
- label: "Heading",
12832
+ label: "Small label above the name",
12833
+ description: "Such as “New” or “Back in stock”. Leave it empty for none.",
11707
12834
  multiline: false,
11708
12835
  required: false,
11709
12836
  defaultValue: ""
@@ -11711,16 +12838,20 @@ const productDetailBlockDefinition = {
11711
12838
  {
11712
12839
  id: "productSlug",
11713
12840
  type: "text",
11714
- label: "Product slug",
12841
+ label: "Product",
11715
12842
  multiline: false,
11716
- description: "Only needed if this block isn't on a product page. Use the last part of the product's web address.",
12843
+ description: "Only needed when this isn't a product page. Type the last part of the product's web address.",
11717
12844
  required: false,
11718
- ui: { intent: "behavior" }
12845
+ ui: {
12846
+ intent: "behavior",
12847
+ visibleWhen: { template: "page" }
12848
+ }
11719
12849
  },
11720
12850
  {
11721
12851
  id: "showSummary",
11722
12852
  type: "boolean",
11723
- label: "Show summary",
12853
+ label: "Show the summary",
12854
+ description: "The product's summary, under the price.",
11724
12855
  required: false,
11725
12856
  defaultValue: true,
11726
12857
  ui: { intent: "display" }
@@ -11728,7 +12859,8 @@ const productDetailBlockDefinition = {
11728
12859
  {
11729
12860
  id: "showBody",
11730
12861
  type: "boolean",
11731
- label: "Show full description",
12862
+ label: "Show the details",
12863
+ description: "The product's details, under the button.",
11732
12864
  required: false,
11733
12865
  defaultValue: true,
11734
12866
  ui: { intent: "display" }
@@ -11736,7 +12868,8 @@ const productDetailBlockDefinition = {
11736
12868
  {
11737
12869
  id: "addButtonText",
11738
12870
  type: "text",
11739
- label: "Add button text",
12871
+ label: "Button text",
12872
+ description: "Leave it empty for “Add to cart”.",
11740
12873
  multiline: false,
11741
12874
  required: false,
11742
12875
  defaultValue: "Add to cart"
@@ -11747,7 +12880,8 @@ const productDetailBlockDefinition = {
11747
12880
  label: "If there's nothing to show",
11748
12881
  multiline: false,
11749
12882
  required: false,
11750
- defaultValue: "Product unavailable."
12883
+ defaultValue: "Product unavailable.",
12884
+ ui: { hidden: true }
11751
12885
  },
11752
12886
  sectionStylesField({
11753
12887
  id: "_sectionStyles",
@@ -11841,6 +12975,79 @@ const productListBlockDefinition = {
11841
12975
  titleSource: "heading",
11842
12976
  description: "Your products, each with a button to add it to the cart.",
11843
12977
  skipSectionStyles: true,
12978
+ editing: {
12979
+ content: ["heading"],
12980
+ settings: [
12981
+ {
12982
+ id: "card",
12983
+ title: "On each product",
12984
+ fields: [
12985
+ "showSummary",
12986
+ "showPrices",
12987
+ "addButtonText"
12988
+ ],
12989
+ summary: {
12990
+ parts: [
12991
+ {
12992
+ field: "showSummary",
12993
+ on: "summary"
12994
+ },
12995
+ {
12996
+ field: "showPrices",
12997
+ on: "price"
12998
+ },
12999
+ {
13000
+ field: "addButtonText",
13001
+ text: {
13002
+ before: "button says “",
13003
+ after: "”",
13004
+ empty: "button says “Add to cart”"
13005
+ }
13006
+ }
13007
+ ],
13008
+ none: "Name and photo only"
13009
+ }
13010
+ },
13011
+ {
13012
+ id: "layout",
13013
+ title: "Layout",
13014
+ fields: ["layout", "columns"],
13015
+ summary: {
13016
+ parts: [{
13017
+ field: "layout",
13018
+ options: {
13019
+ grid: "grid",
13020
+ list: "one under another"
13021
+ }
13022
+ }, {
13023
+ field: "columns",
13024
+ options: {
13025
+ "1": "1 column",
13026
+ "2": "2 columns",
13027
+ "3": "3 columns",
13028
+ "4": "4 columns"
13029
+ }
13030
+ }],
13031
+ none: "Grid"
13032
+ }
13033
+ },
13034
+ {
13035
+ id: "empty",
13036
+ title: "When there are no products",
13037
+ fields: ["emptyStateText"],
13038
+ summary: {
13039
+ parts: [{
13040
+ field: "emptyStateText",
13041
+ text: {
13042
+ before: "“",
13043
+ after: "”"
13044
+ }
13045
+ }],
13046
+ none: "Our standard wording"
13047
+ }
13048
+ }
13049
+ ]
13050
+ },
11844
13051
  additionalFields: [
11845
13052
  {
11846
13053
  id: "heading",
@@ -11862,7 +13069,7 @@ const productListBlockDefinition = {
11862
13069
  label: "Grid"
11863
13070
  }, {
11864
13071
  value: "list",
11865
- label: "List"
13072
+ label: "One under another"
11866
13073
  }],
11867
13074
  ui: { intent: "display" }
11868
13075
  },
@@ -11891,12 +13098,19 @@ const productListBlockDefinition = {
11891
13098
  label: "4 columns"
11892
13099
  }
11893
13100
  ],
11894
- ui: { intent: "display" }
13101
+ ui: {
13102
+ intent: "display",
13103
+ visibleWhen: {
13104
+ field: "layout",
13105
+ equals: "grid"
13106
+ }
13107
+ }
11895
13108
  },
11896
13109
  {
11897
13110
  id: "showSummary",
11898
13111
  type: "boolean",
11899
- label: "Show summary",
13112
+ label: "Show the summary",
13113
+ description: "The product's summary, under its name.",
11900
13114
  required: false,
11901
13115
  defaultValue: true,
11902
13116
  ui: { intent: "display" }
@@ -11904,7 +13118,7 @@ const productListBlockDefinition = {
11904
13118
  {
11905
13119
  id: "showPrices",
11906
13120
  type: "boolean",
11907
- label: "Show prices",
13121
+ label: "Show the price",
11908
13122
  required: false,
11909
13123
  defaultValue: true,
11910
13124
  ui: { intent: "display" }
@@ -11912,7 +13126,8 @@ const productListBlockDefinition = {
11912
13126
  {
11913
13127
  id: "addButtonText",
11914
13128
  type: "text",
11915
- label: "Add button text",
13129
+ label: "Button text",
13130
+ description: "Leave it empty for “Add to cart”.",
11916
13131
  multiline: false,
11917
13132
  required: false,
11918
13133
  defaultValue: "Add to cart"
@@ -11920,7 +13135,8 @@ const productListBlockDefinition = {
11920
13135
  {
11921
13136
  id: "emptyStateText",
11922
13137
  type: "text",
11923
- label: "If there's nothing to show",
13138
+ label: "Message",
13139
+ description: "What visitors see when there are no products to show.",
11924
13140
  multiline: false,
11925
13141
  required: false,
11926
13142
  defaultValue: "No products available right now."
@@ -12024,6 +13240,119 @@ function cardListSectionAction(labelPath = "content.sectionActionLabel", linkPat
12024
13240
  } }
12025
13241
  }, [text({ as: "span" }, bind(labelPath))], when(labelPath));
12026
13242
  }
13243
+ //#endregion
13244
+ //#region ../blocks/src/system/blocks/shopEditing.ts
13245
+ /**
13246
+ * Where Passes & memberships' settings go. The cards come from the site's
13247
+ * catalogue, so the one thing that's the block itself is what it shows: that
13248
+ * choice sits open at the top, and only appears when both kinds are on sale.
13249
+ * Settings about one kind drop out when the block doesn't show that kind.
13250
+ * On a style with Looks, the Look owns the layout and button style, so
13251
+ * "Layout and buttons" drops out there.
13252
+ */
13253
+ const shopEditing = {
13254
+ content: ["showPasses"],
13255
+ settings: [
13256
+ {
13257
+ id: "card",
13258
+ title: "On each card",
13259
+ fields: [
13260
+ "showDescriptions",
13261
+ "showValidityPeriod",
13262
+ "showPricePerCredit"
13263
+ ],
13264
+ summary: {
13265
+ parts: [
13266
+ {
13267
+ field: "showDescriptions",
13268
+ on: "description"
13269
+ },
13270
+ {
13271
+ field: "showValidityPeriod",
13272
+ on: "how long it lasts"
13273
+ },
13274
+ {
13275
+ field: "showPricePerCredit",
13276
+ on: "price each"
13277
+ }
13278
+ ],
13279
+ none: "Name and price only"
13280
+ }
13281
+ },
13282
+ {
13283
+ id: "layout",
13284
+ title: "Layout and buttons",
13285
+ fields: [
13286
+ "layout",
13287
+ "columns",
13288
+ "buttonVariant"
13289
+ ],
13290
+ summary: {
13291
+ parts: [{
13292
+ field: "layout",
13293
+ options: {
13294
+ grid: "grid",
13295
+ list: "list",
13296
+ register: "compact register"
13297
+ }
13298
+ }, {
13299
+ field: "columns",
13300
+ options: {
13301
+ "1": "1 column",
13302
+ "2": "2 columns",
13303
+ "3": "3 columns",
13304
+ "4": "4 columns"
13305
+ }
13306
+ }],
13307
+ none: "Set by the Look"
13308
+ }
13309
+ },
13310
+ {
13311
+ id: "wording",
13312
+ title: "Wording",
13313
+ fields: [
13314
+ "passesHeading",
13315
+ "membershipsHeading",
13316
+ "buyButtonText",
13317
+ "subscribeButtonText"
13318
+ ],
13319
+ summary: {
13320
+ parts: [{
13321
+ field: "passesHeading",
13322
+ text: {
13323
+ before: "“",
13324
+ after: "”"
13325
+ }
13326
+ }, {
13327
+ field: "membershipsHeading",
13328
+ text: {
13329
+ before: "“",
13330
+ after: "”"
13331
+ }
13332
+ }],
13333
+ none: "Our standard wording"
13334
+ }
13335
+ },
13336
+ {
13337
+ id: "link",
13338
+ title: "Link under the cards",
13339
+ fields: ["sectionActionLabel", "sectionActionLink"],
13340
+ summary: {
13341
+ parts: [{
13342
+ field: "sectionActionLabel",
13343
+ text: {
13344
+ before: "“",
13345
+ after: "”"
13346
+ }
13347
+ }],
13348
+ none: "No link"
13349
+ }
13350
+ }
13351
+ ]
13352
+ };
13353
+ //#endregion
13354
+ //#region ../blocks/src/system/blocks/shop.ts
13355
+ const [sectionActionLabelField, sectionActionLinkField] = cardListSectionActionFields;
12027
13356
  const shopBlockDefinition = {
12028
13357
  manifest: createBlockManifest({
12029
13358
  variantMeaning: {
@@ -12038,15 +13367,14 @@ const shopBlockDefinition = {
12038
13367
  ]
12039
13368
  },
12040
13369
  id: "block.shop",
12041
- promotedFields: ["showPasses", "showMemberships"],
12042
13370
  version: "1.0.0",
12043
13371
  title: "Passes & memberships",
12044
13372
  titleSource: "passesHeading",
12045
13373
  description: "Your class passes and memberships, ready for people to buy.",
12046
13374
  skipSectionStyles: true,
13375
+ editing: shopEditing,
12047
13376
  additionalFields: [
12048
13377
  ...cardListKnobFields,
12049
- ...cardListSectionActionFields,
12050
13378
  {
12051
13379
  id: "featured",
12052
13380
  type: "text",
@@ -12062,26 +13390,30 @@ const shopBlockDefinition = {
12062
13390
  {
12063
13391
  id: "showPasses",
12064
13392
  type: "boolean",
12065
- label: "Show passes",
12066
- description: "Lets visitors buy your class passes.",
13393
+ label: "Show",
12067
13394
  required: false,
12068
13395
  defaultValue: true,
12069
- ui: { intent: "behavior" }
13396
+ ui: {
13397
+ intent: "behavior",
13398
+ widget: "shopShow",
13399
+ visibleWhen: shopShowChoiceCondition
13400
+ }
12070
13401
  },
12071
13402
  {
12072
13403
  id: "showMemberships",
12073
13404
  type: "boolean",
12074
13405
  label: "Show memberships",
12075
- description: "Lets visitors buy your memberships.",
12076
13406
  required: false,
12077
13407
  defaultValue: true,
12078
- ui: { intent: "behavior" }
13408
+ ui: {
13409
+ intent: "behavior",
13410
+ hidden: true
13411
+ }
12079
13412
  },
12080
13413
  {
12081
13414
  id: "layout",
12082
13415
  type: "select",
12083
13416
  label: "Layout",
12084
- description: "How the passes and memberships are laid out.",
12085
13417
  required: false,
12086
13418
  multiple: false,
12087
13419
  defaultValue: "grid",
@@ -12104,8 +13436,7 @@ const shopBlockDefinition = {
12104
13436
  {
12105
13437
  id: "columns",
12106
13438
  type: "select",
12107
- label: "Grid columns",
12108
- description: "Number of columns in grid layout",
13439
+ label: "Columns",
12109
13440
  required: false,
12110
13441
  multiple: false,
12111
13442
  defaultValue: "2",
@@ -12127,13 +13458,18 @@ const shopBlockDefinition = {
12127
13458
  label: "4 columns"
12128
13459
  }
12129
13460
  ],
12130
- ui: { intent: "display" }
13461
+ ui: {
13462
+ intent: "display",
13463
+ visibleWhen: {
13464
+ field: "layout",
13465
+ equals: "grid"
13466
+ }
13467
+ }
12131
13468
  },
12132
13469
  {
12133
13470
  id: "showDescriptions",
12134
13471
  type: "boolean",
12135
- label: "Show descriptions",
12136
- description: "Shows the description under each one.",
13472
+ label: "Description",
12137
13473
  required: false,
12138
13474
  defaultValue: true,
12139
13475
  ui: { intent: "behavior" }
@@ -12141,20 +13477,25 @@ const shopBlockDefinition = {
12141
13477
  {
12142
13478
  id: "showValidityPeriod",
12143
13479
  type: "boolean",
12144
- label: "Show validity period",
12145
- description: "Shows how long each pass lasts, like 'Valid for 30 days'.",
13480
+ label: "How long a pass lasts",
13481
+ description: "Like “Valid for 30 days”.",
12146
13482
  required: false,
12147
13483
  defaultValue: true,
12148
- ui: { intent: "behavior" }
13484
+ ui: {
13485
+ intent: "behavior",
13486
+ visibleWhen: shopPassesShownCondition
13487
+ }
12149
13488
  },
12150
13489
  {
12151
13490
  id: "showPricePerCredit",
12152
13491
  type: "boolean",
12153
- label: "Show price per credit",
12154
- description: "Shows what each credit works out at, for passes and packs.",
13492
+ label: "What each one works out at",
12155
13493
  required: false,
12156
13494
  defaultValue: true,
12157
- ui: { intent: "behavior" }
13495
+ ui: {
13496
+ intent: "behavior",
13497
+ visibleWhen: shopPassesShownCondition
13498
+ }
12158
13499
  },
12159
13500
  createButtonVariantField({
12160
13501
  label: "Button style",
@@ -12164,52 +13505,65 @@ const shopBlockDefinition = {
12164
13505
  {
12165
13506
  id: "passesHeading",
12166
13507
  type: "text",
12167
- label: "Passes heading",
12168
- description: "An optional heading above your passes.",
13508
+ label: "Heading above passes",
13509
+ description: "Leave it empty and we’ll use one that fits your passes, like “Class passes”.",
12169
13510
  required: false,
12170
13511
  multiline: false,
12171
13512
  defaultValue: "",
12172
- maxLength: 100
13513
+ maxLength: 100,
13514
+ ui: { visibleWhen: shopPassesShownCondition }
12173
13515
  },
12174
13516
  {
12175
13517
  id: "membershipsHeading",
12176
13518
  type: "text",
12177
- label: "Memberships heading",
12178
- description: "Heading for the memberships section",
13519
+ label: "Heading above memberships",
12179
13520
  required: false,
12180
13521
  multiline: false,
12181
13522
  defaultValue: "Memberships",
12182
- maxLength: 100
13523
+ maxLength: 100,
13524
+ ui: { visibleWhen: shopMembershipsShownCondition }
12183
13525
  },
12184
13526
  {
12185
13527
  id: "buyButtonText",
12186
13528
  type: "text",
12187
- label: "Pass button text",
12188
- description: "The text on the button to buy a pass.",
13529
+ label: "Button on a pass",
12189
13530
  required: false,
12190
13531
  multiline: false,
12191
13532
  defaultValue: DEFAULT_PASS_BUY_BUTTON_TEXT,
12192
- maxLength: 40
13533
+ maxLength: 40,
13534
+ ui: { visibleWhen: shopPassesShownCondition }
12193
13535
  },
12194
13536
  {
12195
13537
  id: "subscribeButtonText",
12196
13538
  type: "text",
12197
- label: "Subscribe button text",
12198
- description: "Text for membership subscribe button",
13539
+ label: "Button on a membership",
12199
13540
  required: false,
12200
13541
  multiline: false,
12201
13542
  defaultValue: "Subscribe",
12202
- maxLength: 40
13543
+ maxLength: 40,
13544
+ ui: { visibleWhen: shopMembershipsShownCondition }
12203
13545
  },
12204
13546
  {
12205
13547
  id: "emptyStateText",
12206
13548
  type: "text",
12207
13549
  label: "If there's nothing to show",
12208
- description: "What visitors see when there's nothing for sale.",
12209
13550
  required: false,
12210
13551
  multiline: false,
12211
13552
  defaultValue: "No products available at this time.",
12212
- maxLength: 200
13553
+ maxLength: 200,
13554
+ ui: { hidden: true }
13555
+ },
13556
+ {
13557
+ ...sectionActionLabelField,
13558
+ label: "Link text"
13559
+ },
13560
+ {
13561
+ ...sectionActionLinkField,
13562
+ label: "Where it goes",
13563
+ ui: { visibleWhen: {
13564
+ field: "sectionActionLabel",
13565
+ hasValue: true
13566
+ } }
12213
13567
  },
12214
13568
  sectionStylesField({
12215
13569
  id: "_sectionStyles",
@@ -12298,16 +13652,13 @@ const shopBlockDefinition = {
12298
13652
  from: "content.subscribeButtonText",
12299
13653
  fallback: "Subscribe"
12300
13654
  } },
12301
- emptyStateText: { $bind: {
12302
- from: "content.emptyStateText",
12303
- fallback: "No products available at this time."
12304
- } },
12305
13655
  passes: { $bind: { from: "data.passes.passes" } },
12306
13656
  memberships: { $bind: { from: "data.memberships.memberships" } }
12307
13657
  })), cardListSectionAction()], { gap: "lg" })
12308
13658
  })]
12309
13659
  }),
12310
13660
  runtime: shopBlockRuntime,
13661
+ readiness: shopReadiness,
12311
13662
  dataSchemas: {
12312
13663
  passes: publicPassProductCollectionSchema.optional(),
12313
13664
  memberships: publicMembershipProductCollectionSchema.optional()
@@ -12455,10 +13806,6 @@ function GiftingSSR({ blockId, ...rest }) {
12455
13806
  const giftCards = offers?.giftCards ?? [];
12456
13807
  const vouchers = offers?.vouchers ?? [];
12457
13808
  const hasOffers = giftCards.length > 0 || vouchers.length > 0;
12458
- const eyebrow = giftingEyebrow(offers, {
12459
- giftCards: display.giftCardsHeading,
12460
- vouchers: display.vouchersHeading
12461
- });
12462
13809
  return /* @__PURE__ */ jsx(IslandRoot, {
12463
13810
  kind: "gifting",
12464
13811
  id: blockId,
@@ -12469,69 +13816,88 @@ function GiftingSSR({ blockId, ...rest }) {
12469
13816
  },
12470
13817
  value: islandProps,
12471
13818
  children: /* @__PURE__ */ jsxs("div", {
12472
- className: "gifting-panel",
12473
- ...giftingSlot(display, "panel"),
13819
+ className: "gifting",
13820
+ ...display.lookSlots ? { "data-slot": "layout" } : {},
12474
13821
  children: [/* @__PURE__ */ jsx(GiftingPanelHead, {
12475
- eyebrow,
12476
13822
  heading: display.heading,
12477
13823
  intro: display.intro,
12478
13824
  look: display
12479
- }), hasOffers ? /* @__PURE__ */ jsxs("div", {
12480
- className: "gifting-panel-offers",
12481
- children: [giftCards.map((offer) => /* @__PURE__ */ jsxs("div", {
12482
- className: "gifting-offer",
12483
- "data-gift-offer": offer.id,
12484
- children: [
12485
- giftCards.length > 1 ? /* @__PURE__ */ jsx("h3", {
12486
- className: "gifting-offer-title",
12487
- children: offer.title
12488
- }) : null,
12489
- offer.description ? /* @__PURE__ */ jsx("p", {
12490
- className: "gifting-offer-description",
12491
- children: offer.description
12492
- }) : null,
12493
- /* @__PURE__ */ jsxs("div", {
12494
- className: "gifting-offer-row",
12495
- "data-gift-offer-row": "",
12496
- children: [/* @__PURE__ */ jsx(GiftCardAmounts, {
12497
- offer,
12498
- currency: offers?.currency ?? "GBP",
12499
- groupName: `amountChoice-${offer.id}`,
12500
- look: display
12501
- }), /* @__PURE__ */ jsx(ThemedButton, {
12502
- ...giftingSlot(display, "action"),
12503
- type: "button",
12504
- variant: "primary",
12505
- size: "md",
12506
- extraClassName: "gifting-buy",
12507
- label: "Buy a gift card"
12508
- })]
12509
- })
12510
- ]
12511
- }, offer.id)), vouchers.map((offer) => /* @__PURE__ */ jsxs("div", {
12512
- className: "gifting-offer",
12513
- children: [
12514
- /* @__PURE__ */ jsx("h3", {
12515
- className: "gifting-offer-title",
12516
- children: offer.title
12517
- }),
12518
- offer.description ? /* @__PURE__ */ jsx("p", {
12519
- className: "gifting-offer-description",
12520
- children: offer.description
12521
- }) : null,
12522
- /* @__PURE__ */ jsx(ThemedButton, {
12523
- ...giftingSlot(display, "action"),
12524
- type: "button",
12525
- variant: "primary",
12526
- size: "md",
12527
- extraClassName: "gifting-buy",
12528
- label: "Buy this voucher"
13825
+ }), /* @__PURE__ */ jsx("div", {
13826
+ className: "gifting-main",
13827
+ children: hasOffers ? /* @__PURE__ */ jsx("div", {
13828
+ className: "gifting-groups",
13829
+ "data-group-count": display.groups.length,
13830
+ children: display.groups.map((group) => /* @__PURE__ */ jsx(GiftGroup, {
13831
+ group,
13832
+ look: display,
13833
+ children: group.kind === "gift_card" ? /* @__PURE__ */ jsx(Fragment, { children: giftCards.map((offer) => /* @__PURE__ */ jsxs("div", {
13834
+ className: "gifting-offer",
13835
+ "data-gift-offer": offer.id,
13836
+ children: [
13837
+ giftCards.length > 1 ? /* @__PURE__ */ jsx("h4", {
13838
+ className: "gifting-offer-title",
13839
+ children: offer.title
13840
+ }) : null,
13841
+ offer.description ? /* @__PURE__ */ jsx("p", {
13842
+ className: "gifting-offer-description",
13843
+ children: offer.description
13844
+ }) : null,
13845
+ /* @__PURE__ */ jsxs("div", {
13846
+ className: "gifting-offer-row",
13847
+ "data-gift-offer-row": "",
13848
+ children: [/* @__PURE__ */ jsx(GiftCardAmounts, {
13849
+ offer,
13850
+ currency: offers?.currency ?? "GBP",
13851
+ groupName: `amountChoice-${offer.id}`,
13852
+ look: display
13853
+ }), /* @__PURE__ */ jsx(ThemedButton, {
13854
+ ...giftingSlot(display, "action"),
13855
+ type: "button",
13856
+ variant: "primary",
13857
+ size: "md",
13858
+ extraClassName: "gifting-buy",
13859
+ label: "Buy a gift card"
13860
+ })]
13861
+ })
13862
+ ]
13863
+ }, offer.id)) }) : /* @__PURE__ */ jsx("ul", {
13864
+ className: "gifting-voucher-list",
13865
+ children: vouchers.map((offer) => /* @__PURE__ */ jsx("li", {
13866
+ className: "gifting-voucher",
13867
+ children: /* @__PURE__ */ jsxs("div", {
13868
+ className: "gifting-offer",
13869
+ children: [
13870
+ /* @__PURE__ */ jsxs("div", {
13871
+ className: "gifting-offer-summary",
13872
+ children: [/* @__PURE__ */ jsx("h4", {
13873
+ className: "gifting-offer-title",
13874
+ children: offer.title
13875
+ }), /* @__PURE__ */ jsx("strong", {
13876
+ className: "gifting-offer-price",
13877
+ children: formatGiftAmount(offer.voucher.purchaseAmountCents, offers?.currency ?? "GBP")
13878
+ })]
13879
+ }),
13880
+ offer.description ? /* @__PURE__ */ jsx("p", {
13881
+ className: "gifting-offer-description",
13882
+ children: offer.description
13883
+ }) : null,
13884
+ /* @__PURE__ */ jsx(ThemedButton, {
13885
+ ...giftingSlot(display, "action"),
13886
+ type: "button",
13887
+ variant: "secondary",
13888
+ size: "md",
13889
+ extraClassName: "gifting-buy",
13890
+ label: "Buy this voucher"
13891
+ })
13892
+ ]
13893
+ })
13894
+ }, offer.id))
12529
13895
  })
12530
- ]
12531
- }, offer.id))]
12532
- }) : /* @__PURE__ */ jsx("p", {
12533
- className: "gifting-empty",
12534
- children: display.emptyStateText
13896
+ }, group.kind))
13897
+ }) : /* @__PURE__ */ jsx("p", {
13898
+ className: "gifting-empty",
13899
+ children: GIFTING_NOTHING_TO_SHOW
13900
+ })
12535
13901
  })]
12536
13902
  })
12537
13903
  });
@@ -13423,4 +14789,4 @@ const serverComponentRegistry = {
13423
14789
  ...buildServerRegistryFromEntries(runtimeBackedBlockServerEntries)
13424
14790
  };
13425
14791
  //#endregion
13426
- export { backgroundFrame as $, publicMapLocationResultSchema as $n, link as $t, eventRegistrationBlockDefinition as A, lookCarouselRegionTransform as An, splitPositioningClasses as At, defineFragment as B, ICON_SIZE_PX as Bn, parseBlockIconValue as Bt, teamReadiness as C, formatAppointmentPrice as Cn, lookPartShown as Ct, loadedReadinessFact as D, BACKGROUND_POSITION_PRESET_VALUES as Dn, HeaderSectionFrame as Dt, hiddenFromVisitors as E, teamMemberCardBiographyFallback as En, buildAppointmentServicesView as Et, augmentManifest as F, ACCORDION_OPEN_ACCENT_THICKNESS as Fn, accordionIconColorStyle as Ft, parseFieldDefinitions as G, isAcceptedRepeaterGridSpan as Gn, button as Gt, createSiteOptionSelectField as H, pageGround as Hn, accordionList as Ht, formEmbedFragment as I, ACCORDION_SPACING_MAP as In, resolveAccordionIconStyle as It, sectionHeaderLayoutNodes as J, resolveRepeaterGridRowFieldId as Jn, fileDownload as Jt, withApiBindings as K, parseRepeaterGridInteger as Kn, carousel as Kt, formCopyFragment as L, ACCORDION_TRIGGER_FONT_SCALE as Ln, PUBLIC_DOWNLOAD_MEDIA_TYPES as Lt, checkoutBlockDefinition as M, lookQuoteLimitTransform as Mn, mobileOnlyDisplay as Mt, cartBlockDefinition as N, lookSkinSlotTransform as Nn, accordionItemPartSlots as Nt, pageTemplateFromEntry as O, getAnchorClasses as On, composeHeaderSectionWrapperClassName as Ot, createBlockManifest as P, lookSlot as Pn, accordionLookAttributes as Pt, styledSection as Q, publicMapLocationParamsSchema as Qn, inline as Qt, buildFragmentDataLoaders as R, ACCORDION_TRIGGER_LETTER_SPACING as Rn, FEATURE_CARD_GENERATED_ICON_SIZE_PX as Rt, galleryReadiness as S, formatAppointmentLocation as Sn, EventDetailsView as St, admitReadinessFacts as T, publicAppointmentPricingSchema as Tn, resolveEventDetailsPresentation as Tt, normalizeSelectSource as U, bindingSchema as Un, bind as Ut, createSdkSelectField as V, groundPaint as Vn, SectionNode as Vt, parseFieldDefinition as W, DEFAULT_MEDIA_FIELD_KINDS as Wn, bookingForm as Wt, sectionContainer as X, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as Xn, headerSection as Xt, styledContainer as Y, resolveRepeaterGridSpanFieldId as Yn, form as Yt, layoutSectionGround as Z, linkSchema as Zn, icon as Zt, cardListSectionActionFields as _, eventDiscoveryFilterKeys as _n, describeUnresolvedLocationMapLocation as _t, cardListSectionAction as a, stack as an, emptyStateField as at, formDataSchema as b, resolveEventScope as bn, parseLocationMapLoaderResult as bt, newsletterSignupBlockDefinition as c, when as cn, cardStylesField as ct, eventListingBlockDefinition as d, eventReadinessQuery as dn, createButtonGroup as dt, media as en, isCanonicalRichTextDoc as er, WeeklySlotAvailabilityView as et, mapDrawingStyleBinding as f, eventReadinessQueryKeys as fn, createButtonVariantField as ft, cardListPresentationBindings as g, resolveEventScopeRead as gn, LOCATION_MAP_LOADER_KEYS as gt, cardListPhotoNumberFields as h, resolveEventCalendarRead as hn, LOCATION_MAP_LIMITS as ht, shopBlockDefinition as i, section as in, columnsField as it, giftingBlockDefinition as j, lookLeadSlotTransform as jn, desktopOnlyDisplay as jt, unavailableReadinessFact as k, resolveBackgroundColorValue as kn, markEditableSurfaceForwarding as kt, sanitizeNewsletterSignupPublicContent as l, blockChecksForEvents as ln, containerStylesField as lt, cardListKnobFields as m, recurringScheduleRead as mn, LOCATION_MAP_DEFAULTS as mt, runtimeBackedBlockModes as n, repeat as nn, offeringCourseSlotParents as nt, productListBlockDefinition as o, text as on, eventDisplayFields as ot, eventCalendarBlockDefinition as p, eventReadinessResultSchema as pn, LocationMapSSR as pt, sectionHeaderFields as q, resolveRepeaterGridColumnFieldId as qn, el as qt, runtimeBackedBlockServerEntries as r, richText as rn, cardStylingFields as rt, productDetailBlockDefinition as s, videoEmbed as sn, layoutField as st, serverComponentRegistry as t, props as tn, buildLoadedOfferingsPreviewListing as tt, normalizeMailingListBlockContent as u, eventReadinessLoaderKey as un, sectionStylesField as ut, normalizeCardListContent as v, eventScopeLoaderParam as vn, normalizeLocationMapProps as vt, testimonialsReadiness as w, publicAppointmentLocationSchema as wn, eventHeaderSlotParents as wt, chosenString as x, formatAppointmentDuration as xn, resolveLocationMapLocation as xt, formBlockDefinition as y, eventScopeQueryKeys as yn, normalizeLocationMapSource as yt, composeFragments as z, ICON_CONFIG as zn, FEATURE_CARD_ICON_TREATMENTS as zt };
14792
+ export { sectionContainer as $, DEFAULT_MEDIA_FIELD_KINDS as $n, el as $t, admitReadinessFacts as A, publicAppointmentLocationSchema as An, eventHeaderSlotParents as At, formCopyFragment as B, lookSlot as Bn, accordionLookAttributes as Bt, audioPlayerReadiness as C, eventDiscoveryFilterKeys as Cn, normalizeLocationMapProps as Ct, teamReadiness as D, formatAppointmentDuration as Dn, EventDetailsView as Dt, galleryReadiness as E, resolveEventScope as En, resolveLocationMapLocation as Et, checkoutBlockDefinition as F, resolveBackgroundColorValue as Fn, markEditableSurfaceForwarding as Ft, createSiteOptionSelectField as G, ICON_CONFIG as Gn, FEATURE_CARD_ICON_TREATMENTS as Gt, composeFragments as H, ACCORDION_SPACING_MAP as Hn, resolveAccordionIconStyle as Ht, cartBlockDefinition as I, lookCarouselRegionTransform as In, splitPositioningClasses as It, parseFieldDefinitions as J, pageGround as Jn, accordionList as Jt, normalizeSelectSource as K, ICON_SIZE_PX as Kn, parseBlockIconValue as Kt, createBlockManifest as L, lookLeadSlotTransform as Ln, desktopOnlyDisplay as Lt, loadedReadinessFact as M, teamMemberCardBiographyFallback as Mn, buildAppointmentServicesView as Mt, pageTemplateFromEntry as N, BACKGROUND_POSITION_PRESET_VALUES as Nn, HeaderSectionFrame as Nt, testimonialsReadiness as O, formatAppointmentLocation as On, lookPartShown as Ot, unavailableReadinessFact as P, getAnchorClasses as Pn, composeHeaderSectionWrapperClassName as Pt, styledContainer as Q, placedEditingPaths as Qn, carousel as Qt, augmentManifest as R, lookQuoteLimitTransform as Rn, mobileOnlyDisplay as Rt, giftingBlockDefinition as S, resolveEventScopeRead as Sn, describeUnresolvedLocationMapLocation as St, fileDownloadReadiness as T, eventScopeQueryKeys as Tn, parseLocationMapLoaderResult as Tt, defineFragment as U, ACCORDION_TRIGGER_FONT_SCALE as Un, PUBLIC_DOWNLOAD_MEDIA_TYPES as Ut, buildFragmentDataLoaders as V, ACCORDION_OPEN_ACCENT_THICKNESS as Vn, accordionIconColorStyle as Vt, createSdkSelectField as W, ACCORDION_TRIGGER_LETTER_SPACING as Wn, FEATURE_CARD_GENERATED_ICON_SIZE_PX as Wt, sectionHeaderFields as X, storedSectionPhoto as Xn, bookingForm as Xt, withApiBindings as Y, sectionPhotoPath as Yn, bind as Yt, sectionHeaderLayoutNodes as Z, bindingSchema as Zn, button as Zt, cardListSectionActionFields as _, eventReadinessQuery as _n, createButtonVariantField as _t, cardListSectionAction as a, link as an, mapReadinessFact as ar, offeringCourseSlotParents as at, formDataSchema as b, recurringScheduleRead as bn, LOCATION_MAP_LIMITS as bt, newsletterSignupBlockDefinition as c, repeat as cn, publicMapLocationParamsSchema as cr, emptyStateField as ct, eventListingBlockDefinition as d, stack as dn, withoutMap as dt, fileDownload as en, isAcceptedRepeaterGridSpan as er, layoutSectionGround as et, mapDrawingStyleBinding as f, text as fn, cardStylesField as ft, cardListPresentationBindings as g, eventReadinessLoaderKey as gn, createButtonGroup as gt, cardListPhotoNumberFields as h, blockChecksForEvents as hn, unreadContainerStylesField as ht, shopBlockDefinition as i, inline as in, resolveRepeaterGridSpanFieldId as ir, buildLoadedOfferingsPreviewListing as it, hiddenFromVisitors as j, publicAppointmentPricingSchema as jn, resolveEventDetailsPresentation as jt, videoGridReadiness as k, formatAppointmentPrice as kn, lookParts as kt, sanitizeNewsletterSignupPublicContent as l, richText as ln, publicMapLocationResultSchema as lr, eventDisplayFields as lt, cardListKnobFields as m, when as mn, sectionStylesField as mt, runtimeBackedBlockModes as n, headerSection as nn, resolveRepeaterGridColumnFieldId as nr, backgroundFrame as nt, productListBlockDefinition as o, media as on, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as or, cardStylingFields as ot, eventCalendarBlockDefinition as p, videoEmbed as pn, containerStylesField as pt, parseFieldDefinition as q, groundPaint as qn, SectionNode as qt, runtimeBackedBlockServerEntries as r, icon as rn, resolveRepeaterGridRowFieldId as rr, WeeklySlotAvailabilityView as rt, productDetailBlockDefinition as s, props as sn, linkSchema as sr, columnsField as st, serverComponentRegistry as t, form as tn, parseRepeaterGridInteger as tr, styledSection as tt, normalizeMailingListBlockContent as u, section as un, isCanonicalRichTextDoc as ur, layoutField as ut, normalizeCardListContent as v, eventReadinessQueryKeys as vn, LocationMapSSR as vt, chosenString as w, eventScopeLoaderParam as wn, normalizeLocationMapSource as wt, eventRegistrationBlockDefinition as x, resolveEventCalendarRead as xn, LOCATION_MAP_LOADER_KEYS as xt, formBlockDefinition as y, eventReadinessResultSchema as yn, LOCATION_MAP_DEFAULTS as yt, formEmbedFragment as z, lookSkinSlotTransform as zn, accordionItemPartSlots as zt };