@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.
- package/CHANGELOG.md +79 -0
- package/README.md +83 -4
- package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
- package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
- package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
- package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
- package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
- package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
- package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
- package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
- package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
- package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
- package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
- package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
- package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
- package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +7 -7
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/portal/index.d.ts +10 -2
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +126 -2
- package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
- package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
- package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
- package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
- package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
- package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
- package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
- package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
- package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
- package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
- package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
- package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
- package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
- package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
- package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
- package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
- package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
- package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
- package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
- package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
- package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
- package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
- package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
- package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
- package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
- package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
- package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
- package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
- package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
- package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
- package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
- package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
- package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
- package/dist/client/client.mjs +460 -119
- package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
- package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
- package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
- package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
- package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
- package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
- package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
- package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
- package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
- package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
- package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
- package/dist/client/gifting/client.mjs +16 -9
- package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
- package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
- package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
- package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
- package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
- package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
- package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
- package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
- package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
- package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
- package/dist/client/portal/client.mjs +51 -35
- package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
- package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
- package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
- package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
- package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
- package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
- package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
- package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
- package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
- package/dist/client/rendering/client.mjs +32 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
- package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
- package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
- package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
- package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
- package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
- package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
- package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
- package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
- package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
- package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
- package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
- package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
- package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
- package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
- package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
- package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
- package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
- package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
- package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
- package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
- package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
- package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
- package/dist/preview-next/container-responsive.css +469 -2
- package/dist/preview-next/editor-chrome.css +23 -2
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
- package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
- package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
- package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
- package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
- package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +4 -4
- package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
- package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
- package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
- package/dist/server/page-converter.mjs +18 -5
- package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
- package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
- package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
- package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
- package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
- package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +10 -10
- package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
- package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
- package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
- package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
- package/dist/server/theme-bridge.mjs +5 -4
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
- package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
- package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
- package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
- package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
- package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
- package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
- package/dist/styles/index.css +2987 -168
- package/package.json +1 -1
- package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
- package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
- package/dist/client/types-BEaKfam_.mjs +0 -778
- package/dist/server/customCss-C9kgPHvr.mjs +0 -247
- package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
- package/dist/server/media-gvfIw3z8.mjs +0 -216
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { $ as
|
|
5
|
-
import { A as
|
|
6
|
-
import {
|
|
1
|
+
import { $ as parseColorTokenParts, A as surfaceInkDeclarations, C as SURFACE_INK_CSS_VARS, E as surfaceForegroundInputFromResolved, F as cssVarValue, H as staysInsideDeclaration, I as mergeStyles, L as rgbColorValue, N as backgroundColorStyle, O as surfaceForegroundValue, R as textColorStyle, T as surfaceForegroundDeclarations, V as callsCssLoadingFunction, W as absoluteInkColors, a as createStandardButtonSurfacePolicy, et as parseThemeColorToken, i as buttonSizeNameSchema, j as surfaceInkStyle, s as unsafeAsOpaqueButtonColourToken, t as DEFAULT_VARIANT_ALIAS_ID, z as textColorValue } from "./types-C_S0pWbR.mjs";
|
|
2
|
+
import { H as resolveConcreteColorHex, N as expandPalette, R as compositeHex, U as resolveOpaqueSurfaceHex, _ as runtimeMediaSchema, a as formatButtonColourContractError, b as renderableMediaAssetSchema, c as DEFAULT_BUTTON_SIZES, ct as hexToRgb, d as generateShadowValue$1, i as BUTTON_CONTRAST_POLICY, n as compileButtonColourStates, r as resolveSolidButtonColour, s as BORDER_WIDTH_MAP, tt as contrastRatio, u as FONT_SIZE_MAP } from "./resolveButtonColourStates-BMtAAPzp.mjs";
|
|
3
|
+
import { A as mapButtonVisualAppearances, B as surfaceInkPublication, C as buttonPartsCss, E as affordanceIconMaskUrl, G as certifyPaint, I as freezeOwnedThemeValue, K as contrastThresholdByPolicy, L as ownedThemeSnapshot, R as resolveSurfaceForeground, T as partOwnedPseudoElements, W as HOVER_TEXT_THRESHOLD, _ as buttonStateShadow, b as paddingDeclarations, c as serializeSurfaceTree, g as buttonStateAppearanceDeclarations, h as buttonRadius, j as actionVariableFallback, m as buttonBorder, r as parseSurfaceTree, s as resolveSurface, v as buttonTypographyDeclarations, w as buttonShadowLayersValue, y as materializeRuntimeButtonAppearance } from "./accessibleSurfaces-CAcf1lHT.mjs";
|
|
4
|
+
import { $ as parseStoredVariant, A as eventCardListContent, B as eventCategoryBadge, C as resolvePageRouteTarget, D as MonthLookView, E as EVENT_REGISTRATION_ANCHOR_ID, F as createPresentationPageReader, G as formatCourseDatesAfter, H as MapPinIcon, I as EmptyState, J as resolveMonthSelectedDay, K as formatCourseSessions, L as CardListCollection, M as deriveEventScheduleSummary, N as derivePreviewRunSchedule, O as EventListingFrameView, P as createEditorPresentationPageReader, Q as formatEventDuration, R as CardListItems, S as resolveEntryRouteTarget, T as EventHeader, U as eventDisplayTitle, V as CalendarIcon, W as eventDisplayTitleText, X as selectQuickDateEvents, Y as formatEventQuickDate, Z as formatEventTeacherLine, _ as publicAppointmentLocationSchema, a as joinSlotKey, at as buildThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, j as offeringDatesBySeries, k as OfferingCourseCards, l as buildLinkedContentEditTarget, m as formatAppointmentDuration, n as createPageRenderPlanReader, nt as groundTextureStyle, o as renderedJoinLayout, ot as defaultThemeTokens, p as defaultTransforms, q as buildMonthDay, s as retargetJoinsAcrossOmissions, tt as generateGroundPaintCss, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as EventItem } from "./pageRenderPlan-DRB7cUZ0.mjs";
|
|
5
|
+
import { $ as cardListPresentationSchemaShape, $a as effectiveHeaderNavLinkStyle, $i as when, $n as resolveSelectionBookingClosedDetail, $o as mapReadinessFact, $t as bookingPresentation, A as membershipCardListContent, Aa as chosenString, An as getLocalDateKey, Ao as beforeBookingQuestionsPresentationSchema, At as buildOfferingsPreviewListing, Bi as ctaButton, Bn as bookingPageKindSchema, Br as createInteractiveIslandCodec, Bt as resolveEventRegistrationScopedEvents, C as shopBlockDefinition, Ca as parseInlineTextFromUnknown, Ci as testimonialsCarouselFragment, Cn as formatEventNextDateFact, Cs as getBookingLocalDateKey, Ct as resolveEventRegistrationEventSource, D as buildProductListInteractiveIslandProps, Da as parseFieldDefinitions, Di as ctaRowFragment, Dn as formatTime, Do as blockBookingPaymentTermsSchema, Dr as readRuntimeNow, Ds as toUtcIsoDateTimeString, E as buildProductDetailInteractiveIslandProps, Ei as heroCtaRowFragment, Eo as publicEventsArraySchema, Er as teamMemberCardBiography, Es as parseLocalScheduleTime, F as buildOfferingsCatalogueListing, Fa as eventReadinessResultSchema, Fn as getOrderedDayNames, Fo as hiddenFromVisitors, Fs as publicEventPricingType, Ft as readOfferingsGrouping, G as buildEventCollectionListingDisplay, Gn as isDropInPublicEvent, Gr as listItemPresentation, Gt as getIconComponent, H as buildEventListingInteractiveIslandProps, Ha as themeButtonSelector, Hn as hasCancelledRegistrationDate, Hr as createZodCodec, Ht as ThemedButton, I as offeringsCatalogueShape, In as getWeekCalendarDayTuple, Io as loadedReadinessFact, Is as resolveExactOrFreePriceDisplay, It as resolveOfferingsPreviewGroupCta, J as eventCollectionSourceSchemaShape, Jn as planOrdinarySeriesSelection, Jr as lookListPresentationSchemaShape, Jt as eventListWeekDays, K as eventCollectionDisplaySchemaShape, Kn as isOrdinaryPublicEvent, Kr as listLookControl, Kt as SpinnerNode, L as eventCalendarBlockDefinition, Ln as getWeekCalendarDays, Lo as pageTemplateFromEntry, Lr as formBlockDefinition, Lt as resolveOfferingsPreviewGroups, M as passCardListContent, Ma as eventReadinessLoaderKey, Mi as normalizeBoxStylesBorder, Mn as addDays, Ms as isPublicEventPricingOptionDisplayable, Mt as normalizeOfferingsPreviewItemLimit, N as offeringsPreviewBlockDefinition, Ni as resolveCardRoleForBoxStyles, Nn as formatDateKey, Nr as staticHeaderChromeRuntime, Ns as publicEventPricingCurrency, Nt as offeringRunLifecycle, O as buildShopInteractiveIslandProps, Oa as PUBLIC_DOWNLOAD_MEDIA_TYPES, Oi as isBlockButtonRole, On as groupEventsByDate, Oo as blockBookingConsentSchema, Or as resolveDateRuntimeContext, Os as resolveBookingBusinessTimeZone, P as publicRouteCandidatesSchema, Pn as getDayOfWeek, Po as admitReadinessFacts, Ps as publicEventPricingDisplay, Pt as offeringsListingFor, Qa as authoredHeaderLinkForeground, Qi as el, Qr as clsx, R as buildEventCalendarInteractiveIslandProps, Rn as isSameCalendarDay, Ro as unavailableReadinessFact, Rr as buildFormInteractiveIslandProps, Rs as formatCurrencyAmount, Rt as resolveOfferingsRenderInput, S as productListBlockDefinition, Sa as isInlineTextEmpty, Si as formCopyFragment, Sn as formatEventHourLabel, Sr as splitPositioningClasses, Ss as formatLocalScheduleDate, St as buildEventRegistrationInteractiveIslandProps, T as buildCheckoutInteractiveIslandProps, Ti as ctaCopyFragment, Tn as formatEventTimeRange, Tr as teamMemberBiography, Ts as parseBookingLocalDate, Tt as previewStageSchema, U as buildEventCollectionDisplay, Ua as AFFORDANCE_SUPPRESS_CLASS, Ui as bodyCopyFragment, Un as eventOccurrenceContext, Ur as defineClientOwnedBlockRuntime, Ut as ThemedButtonLink, V as eventListingBlockDefinition, Va as parseThemeButtonVariantId, Vi as layoutSectionGround, Vn as cancelledDateCopy, Vr as defineInteractiveIslandMetaKeys, Vt as ThemedAuthoredButton, W as buildEventCollectionHydration, Wa as resolveHeaderRootForeground, Wi as defineFragment, Wn as getPublicEventCanonicalPath, Wr as defineProgressiveBlockRuntime, Wt as ThemedDownloadLink, X as listingEventCardProps, Xn as planWholeSeriesParentSelection, Xr as itemRole, Y as catalogueEventCardProps, Ya as pageGround, Yn as planWholeSeriesParentBooking, Yr as resolvedItemSurfaceProps, Yt as eventWeekGroupingContext, Z as CardListContentPart, Zi as runTransforms, Zn as planWholeSeriesRunSelection, Zr as Grid, _ as giftingBlockDefinition, _a as PlusIcon, _i as faqAccordionFragment, _n as formatCalendarTitle, _r as shouldReserveFeatureCardIconZone, _t as getCardOrientation, aa as ChevronDownIcon, an as blockSiteTermsSchema, ar as resolveEventPageLink, as as resolveWholeSeriesBookingPhase, at as MediaPlaceholder, b as cartBlockDefinition, ba as UsersIcon, bi as singleButtonFragment, bn as formatEventCompactDateRail, bo as headerRootPaint, br as composeHeaderSectionWrapperClassName, bs as addLocalScheduleDays, bt as lookPartShown, c as normalizeLocationMapProps, ca as ClockIcon, ci as formatEventPrice, cn as closedDatesCopy, cr as isInBookingCutOffWindow, cs as parseMailingListRuntimeContext, d as resolveLocationMapLocation, da as FileSpreadsheetIcon, dn as closedDateCopy, ds as sameMailingListPlacementTargeting, ea as buildGeneratedBlockIconRenderAssetLookupFromUnknown, en as browserReadAuthoritySchema, eo as readOpeningToneProjection, er as selectionRepresentativeEvent, f as newsletterSignupBlockDefinition, fa as FileTextIcon, fn as cutOffDateCopy, fr as getEventAvailabilityStatus, g as newsletterBlockSubmissionMessage, ga as MinusIcon, gi as cardFragment, gr as resolveFeatureCardGeneratedIconSizePx, gt as EventQuickFacts, h as buildNewsletterFormInteractiveIslandProps, ha as MapPinIcon$1, hi as headingFragment, hn as eventDateOptions, hr as FEATURE_CARD_ICON_TREATMENTS, ht as setContextResolveImageUrlContext, i as normalizeBlockContent, ia as CalendarIcon$1, in as formatEventLocation, ir as resolveEventCta, is as orderedLiveRunSessions, it as ImagePresets, j as membershipClassesLabel, ji as boxStyleClassNames, jn as getLocalMinuteOfDay, js as formatBookingPriceDisplay, jt as groupOfferingRunsByCourse, k as shopProductPresentation, ki as heroCopyFragment, kn as resolveEventTimeZone, ko as bookingConsentCarrierSchema, ks as toBookingTimeZone, kt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, l as normalizeLocationMapSource, la as FileArchiveIcon, li as formatEventPriceAmount, ln as closedRunCopy, lr as formatEventRemainingPlaces, m as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, ma as InfoIcon, mi as richTextFragment, mr as groupPublicEventsByRun, ms as formatDate$1, mt as getCurrentResolveImageUrlContext, n as hasBlockDefinition, na as resolveBlockIconRenderValue, nn as eventPlaceName, nr as eventDestinationPagePath, ns as CANCELLED_SESSION_STATUS, nt as MediaNodeServer, o as LOCATION_MAP_LOADER_KEYS, oa as CircleMinusIcon, oi as formatCoursePrice, on as pageNavigationSchema, or as resolveRuntimeEventDestination, os as resolveWholeSeriesPaymentDates, pa as GlobeIcon, pn as buildCalendarViewport, pr as isEventFull, ps as EVENT_ADDRESS_AFTER_BOOKING_LABEL, pt as buildResolveImageUrlContext, q as eventCollectionHydrationSchema, qa as selectItemSurfacePresentation, qn as planDropInPanel, qr as listLookSlot, qt as buildEventListWeek, ra as ArrowDownIcon, rn as eventVenuePlace, rr as resolveEventCardBooking, rt as RichText, s as describeUnresolvedLocationMapLocation, sa as CirclePlusIcon, si as formatEventDepositNote, sn as closedDateListCopy, sr as isBookableEvent, ss as buildMailingListSignupBlockSourceRef, t as getBlockDefinition, ta as parseBlockIconValue, tn as eventOnlinePlace, tr as eventDestinationBookingLink, u as parseLocationMapLoaderResult, ua as FileAudioIcon, un as bookElsewhereDateCopy, ur as formatTotalCapacity, us as parseMailingListPlacementTargeting, ut as resolvePublicMediaUrl, v as buildGiftingInteractiveIslandProps, va as TicketIcon, vi as faqHeadingFragment, vn as formatDate, vo as headerNeedsPhotoShade, vs as formatBookingCompactEnglishTime, vt as getContainerClass, w as buildCartInteractiveIslandProps, wi as testimonialsHeadingFragment, wr as parseTeamMemberSpecialties, ws as getLocalScheduleDate, wt as bookingNowSchema, x as productDetailBlockDefinition, xa as inlineTextToPlainText, xi as formEmbedFragment, xn as formatEventDateParts, xr as markEditableSurfaceForwarding, xt as eventRegistrationBlockDefinition, y as checkoutBlockDefinition, ya as UserIcon, yi as blogFeaturedPostFragment, yn as formatEventClockLabel, yo as headerRootIsTransparent, ys as toScheduledBookingDateTime, z as buildEventCalendarListingDisplay, zi as resolveBackgroundColorValue, zn as isToday, zr as buildInteractiveIslandProps, zt as normalizeEventRegistrationPageSurfaceSubject } from "./registry-Bf4W8Qa7.mjs";
|
|
6
|
+
import { $ as generateInteractiveChildInheritanceCSS, At as transitionCatalogueEntries, G as generateFooterCss, Ht as featureCardCompositionTreatmentValues, J as buildTextContrastShadow, Jt as testimonialsCompositionTreatmentValues, O as requireCuratedSiteStyle, Q as resolveEffectPaint, U as resolveCardRole, Ut as introCompositionTreatmentValues, W as generateDefaultCardSystem, Wt as offeringsPreviewCompositionTreatmentValues, X as generateEffectsCSS, Y as generateNavLinkCSS, Z as resolveEffectApplications, en as opaqueSurfaceContextFromTheme, f as arrangementManifestFromVariants, i as arrangementLookHooks, m as resolveEffectiveArrangement, rn as TokenResolver, tn as opaqueSurfaceDeclarations, yt as boundaryRuntimeMetricsForDecorativeTransition } from "./lookMediaFrame-EFws7tAj.mjs";
|
|
7
|
+
import { f as fontWidthFits, u as boxBackgroundSchema, v as surfaceCardRoleValues, w as siteChromeBackgroundOverrideOwner } from "./schema-DGaihVwp.mjs";
|
|
7
8
|
import { a as normalizeLocationAddressText, c as publicLocationSchema, d as mapDrawingSchema } from "./mapLocation-MDDSubTp.mjs";
|
|
8
9
|
import { t as assertNever$3 } from "./assert-never-ku-PUn9U.mjs";
|
|
9
|
-
import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-
|
|
10
|
-
import {
|
|
11
|
-
import { l as
|
|
12
|
-
import { M as
|
|
13
|
-
import { l as
|
|
14
|
-
import {
|
|
15
|
-
import { c as ACCORDION_SPACING_MAP, d as ICON_CONFIG, f as ICON_SIZE_PX, i as getNodeProps, l as ACCORDION_TRIGGER_FONT_SCALE, n as getVideoEmbed, r as getVideoEmbedLoadingStrategy, s as ACCORDION_OPEN_ACCENT_THICKNESS, t as VIDEO_ASPECT_RATIO_PATTERN, u as ACCORDION_TRIGGER_LETTER_SPACING } from "./video-Cdr3wh-q.mjs";
|
|
16
|
-
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CrPlbJEN.mjs";
|
|
10
|
+
import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-Uv1xDieJ.mjs";
|
|
11
|
+
import { f as bindingSchema, i as RichTextDocSchema, l as sanitizeHref, n as isRecord$4, t as isObjectRecord } from "./typeGuards-DZOaGTEv.mjs";
|
|
12
|
+
import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-CFw4M-gZ.mjs";
|
|
13
|
+
import { A as generateCheckableCss, C as INPUT_GROUP_ERROR_SELECTOR, D as INPUT_EDGE_COLOR_VAR, E as generateInputGroupCss, F as generateShadowCssVars, I as renderCssDeclarations, L as cardBorderDeclarations, M as RESOLVED_BUTTON_DISABLED_DECLARATIONS, N as resolvedButtonColourDeclarations, O as INPUT_ERROR_BORDER_COLOR_VAR, P as resolvedButtonFocusDeclarations, R as cardDecorationPseudoRules, S as retargetResponsiveScopeRules, T as INPUT_GROUP_SELECTOR, _ as buildResponsiveScopeRule, a as escapeStyleContent, b as getResponsiveScopeSpec, c as parseBlockCustomCssRules, d as generateBlockCustomVarsCss, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as compileCustomCssRules, j as generateOpaquePanelCss, k as inputEdgeColorValue, l as parseCustomCssRules, m as generateStatusCss, n as THEME_RADIUS_CSS_VARS, o as prefixSelector, p as generateProgressCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as generateAllBlockVarsCss, v as findResponsiveScopeRuleAt, w as INPUT_GROUP_FOCUS_SELECTOR, x as hasResponsiveScopeRule, y as getContainerResponsiveScopeSpec } from "./ThemeScopeCore-DvbqYXdK.mjs";
|
|
14
|
+
import { c as ACCORDION_SPACING_MAP, d as ICON_CONFIG, f as ICON_SIZE_PX, i as getNodeProps, l as ACCORDION_TRIGGER_FONT_SCALE, n as getVideoEmbed, r as getVideoEmbedLoadingStrategy, s as ACCORDION_OPEN_ACCENT_THICKNESS, t as VIDEO_ASPECT_RATIO_PATTERN, u as ACCORDION_TRIGGER_LETTER_SPACING } from "./video-DBaeSawZ.mjs";
|
|
15
|
+
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CwcWZL7u.mjs";
|
|
17
16
|
import { n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
18
17
|
import { t as getAtPath } from "./src-DHK4JUlp.mjs";
|
|
19
18
|
import * as React$1 from "react";
|
|
@@ -705,9 +704,9 @@ function generateHoverEffects(axes) {
|
|
|
705
704
|
//#endregion
|
|
706
705
|
//#region ../theme-core/src/accordions/accordionInks.ts
|
|
707
706
|
const TEXT = contrastThresholdByPolicy["body-aa"];
|
|
708
|
-
/** The CSS colour for a certified ink: a palette variable,
|
|
707
|
+
/** The CSS colour for a certified ink: a palette variable, including absolute black and white. */
|
|
709
708
|
function accordionInkCss(ink) {
|
|
710
|
-
return rgbColorValue(
|
|
709
|
+
return rgbColorValue(ink);
|
|
711
710
|
}
|
|
712
711
|
/** The foreground contract certified on an accordion's own background, or null when it has none. */
|
|
713
712
|
function resolveAccordionSurfaceForeground(theme, system) {
|
|
@@ -849,15 +848,14 @@ function resolveHeaderDropdownForeground(header, theme) {
|
|
|
849
848
|
}, palette);
|
|
850
849
|
const text = foreground.kind === "known" ? foreground.roles.text : candidate;
|
|
851
850
|
const fill = style?.hoverBackground === void 0 ? text : style.hoverBackground;
|
|
852
|
-
const menu = foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
853
851
|
return {
|
|
854
852
|
style,
|
|
855
853
|
backgroundToken,
|
|
856
854
|
candidate,
|
|
857
855
|
foreground,
|
|
858
|
-
textToken:
|
|
859
|
-
linkFill: fill
|
|
860
|
-
...linkInks(style, text, fill,
|
|
856
|
+
textToken: text,
|
|
857
|
+
linkFill: fill,
|
|
858
|
+
...linkInks(style, text, fill, foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null, palette)
|
|
861
859
|
};
|
|
862
860
|
}
|
|
863
861
|
/** A translucent menu keeps its declared hover text, unmeasured; an opaque one certifies each state. */
|
|
@@ -886,7 +884,7 @@ function certifyLinkText(ink, declared, fill, menu, palette) {
|
|
|
886
884
|
};
|
|
887
885
|
});
|
|
888
886
|
return {
|
|
889
|
-
linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state,
|
|
887
|
+
linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state, paint?.ink ?? ink]] : [])),
|
|
890
888
|
linkPaints: states.flatMap(({ paint }) => paint ? [paint] : []),
|
|
891
889
|
linkUnmeasured: states.flatMap(({ state, paint }) => paint ? [] : [linkPlace(state)])
|
|
892
890
|
};
|
|
@@ -985,7 +983,10 @@ function formatFontFamily(family, fallback = "sans-serif") {
|
|
|
985
983
|
*/
|
|
986
984
|
function generateCssVars(palette) {
|
|
987
985
|
const cssVars = {};
|
|
988
|
-
Object.entries(
|
|
986
|
+
Object.entries({
|
|
987
|
+
...palette,
|
|
988
|
+
...absoluteInkColors
|
|
989
|
+
}).forEach(([key, value]) => {
|
|
989
990
|
if (key === "meta" || value === null || value === void 0 || typeof value !== "string") return;
|
|
990
991
|
const { r, g, b } = hexToRgb(value);
|
|
991
992
|
cssVars[`--tb-${key}`] = `${r} ${g} ${b}`;
|
|
@@ -1107,46 +1108,6 @@ function generateDefaultButtonSystem(theme) {
|
|
|
1107
1108
|
};
|
|
1108
1109
|
}
|
|
1109
1110
|
//#endregion
|
|
1110
|
-
//#region ../theme-core/src/buttons/affordanceIcons.ts
|
|
1111
|
-
/**
|
|
1112
|
-
* Affordance icon path data for CSS-emitted button affordances.
|
|
1113
|
-
*
|
|
1114
|
-
* A button variant may declare a trailing `affordance` icon (see
|
|
1115
|
-
* `ButtonVariantAffordance`). The generated button CSS renders that icon as a
|
|
1116
|
-
* masked `::after` pseudo-element, so the theme supplies it to every
|
|
1117
|
-
* button of the variant without per-node authoring.
|
|
1118
|
-
*
|
|
1119
|
-
* Icons live in the `@riverbankcms/blocks` registry, but the button CSS is
|
|
1120
|
-
* generated here in theme-core, so this module carries a small, curated copy of
|
|
1121
|
-
* the *affordance-eligible* icon path data (arrows/chevrons — the action-oriented
|
|
1122
|
-
* subset). The `d` values below are duplicated verbatim from the matching entries
|
|
1123
|
-
* in `blocks/src/system/icons/svg.tsx`; ids match the registry ids exactly so a
|
|
1124
|
-
* node-level `trailingIcon` and a theme-owned `affordance` share one id space.
|
|
1125
|
-
*
|
|
1126
|
-
* Keep this set intentionally tiny. It is not the full CTA icon set — only the
|
|
1127
|
-
* shapes that read as a trailing affordance.
|
|
1128
|
-
*/
|
|
1129
|
-
/** Registry icon id → the SVG path `d` fragments composing that icon. */
|
|
1130
|
-
const AFFORDANCE_ICON_PATHS = {
|
|
1131
|
-
ArrowRight: ["M5 12h14", "m13 6 6 6-6 6"],
|
|
1132
|
-
ArrowLeft: ["M19 12H5", "m11 6-6 6 6 6"],
|
|
1133
|
-
ChevronRight: ["m9 18 6-6-6-6"],
|
|
1134
|
-
ChevronLeft: ["m15 18-6-6 6-6"],
|
|
1135
|
-
ChevronDown: ["m6 9 6 6 6-6"],
|
|
1136
|
-
ArrowUpRight: ["M7 17 17 7", "M7 7h10v10"]
|
|
1137
|
-
};
|
|
1138
|
-
/**
|
|
1139
|
-
* Build a `data:image/svg+xml,...` URL for an affordance icon, suitable for use
|
|
1140
|
-
* as a CSS `mask-image`. The stroke is painted solid black so the mask's alpha
|
|
1141
|
-
* traces the icon outline; the visible colour is supplied separately by the
|
|
1142
|
-
* `::after` rule's `background-color`. Returns `null` for unknown ids.
|
|
1143
|
-
*/
|
|
1144
|
-
function affordanceIconMaskUrl(iconId) {
|
|
1145
|
-
const paths = AFFORDANCE_ICON_PATHS[iconId];
|
|
1146
|
-
if (!paths || paths.length === 0) return null;
|
|
1147
|
-
return `data:image/svg+xml,${`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>${paths.map((d) => `<path d='${d}'/>`).join("")}</svg>`.replace(/"/g, "'").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ")}`;
|
|
1148
|
-
}
|
|
1149
|
-
//#endregion
|
|
1150
1111
|
//#region ../theme-core/src/buttons/generateButtonCss.ts
|
|
1151
1112
|
const BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
1152
1113
|
function rule$1(selector, declarations) {
|
|
@@ -1294,20 +1255,27 @@ function variantChunks(variant, global, themeSizes, themeId, tokens, theme, colo
|
|
|
1294
1255
|
const out = [];
|
|
1295
1256
|
const variantId = parseButtonVariantIdForCss(variant.id);
|
|
1296
1257
|
const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
|
|
1297
|
-
|
|
1258
|
+
const paint = {
|
|
1259
|
+
role: variant.id,
|
|
1260
|
+
colours,
|
|
1261
|
+
keyframePrefix: `${themeId.replace(/[^a-zA-Z0-9_-]/g, "-")}-${variant.id}`
|
|
1262
|
+
};
|
|
1263
|
+
out.push(variantBaseRule(variant, selector, tokens, colours.base, paint));
|
|
1298
1264
|
out.push({ raw: generateInteractiveChildInheritanceCSS(selector) });
|
|
1299
1265
|
for (const state of [
|
|
1300
1266
|
"hover",
|
|
1301
1267
|
"focus",
|
|
1302
1268
|
"active"
|
|
1303
|
-
]) out.push(variantStateColourRule(variant, variantId, themeId, state, colours[state], tokens));
|
|
1269
|
+
]) out.push(variantStateColourRule(variant, variantId, themeId, state, colours[state], tokens, paint));
|
|
1304
1270
|
const effects = variantEffectsCss(variant, nonColourEffects, themeId, tokens, theme);
|
|
1305
1271
|
if (effects) out.push({ raw: effects });
|
|
1306
1272
|
out.push(...variantStateTransformRules(variant, selector));
|
|
1307
|
-
|
|
1273
|
+
const parts = buttonPartsCss(variant, selector, paint);
|
|
1274
|
+
if (parts) out.push({ raw: parts });
|
|
1275
|
+
out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator, focusShadowLayers(variant, paint)));
|
|
1308
1276
|
const affordance = variantAffordanceRule(variant, selector);
|
|
1309
1277
|
if (affordance) out.push(affordance);
|
|
1310
|
-
out.push(...variantDisabledRules(variant, variantId, themeId, colours.disabled, tokens));
|
|
1278
|
+
out.push(...variantDisabledRules(variant, variantId, themeId, colours.disabled, tokens, paint));
|
|
1311
1279
|
out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
|
|
1312
1280
|
out.push(...variantStateSizeRules(variant, variantId, themeId));
|
|
1313
1281
|
return out;
|
|
@@ -1344,7 +1312,7 @@ function parseButtonVariantIdForCss(value) {
|
|
|
1344
1312
|
if (!variantId) throw new Error("Button variant id must be a non-empty string");
|
|
1345
1313
|
return variantId;
|
|
1346
1314
|
}
|
|
1347
|
-
function variantBaseRule(variant, selector, tokens, colour) {
|
|
1315
|
+
function variantBaseRule(variant, selector, tokens, colour, paint) {
|
|
1348
1316
|
const appearance = variant.visualStates?.base;
|
|
1349
1317
|
if (!appearance) throw new Error("Button appearance must be materialized before CSS emission");
|
|
1350
1318
|
const border = buttonBorder(appearance.border, tokens);
|
|
@@ -1352,7 +1320,7 @@ function variantBaseRule(variant, selector, tokens, colour) {
|
|
|
1352
1320
|
...buttonTypographyDeclarations(appearance.typography),
|
|
1353
1321
|
...STRUCTURAL_DECLARATIONS,
|
|
1354
1322
|
["border-radius", buttonRadius(appearance.borderRadius)],
|
|
1355
|
-
["box-shadow",
|
|
1323
|
+
["box-shadow", buttonStateShadow(appearance, tokens, paint) ?? "none"],
|
|
1356
1324
|
...resolvedButtonColourDeclarations(colour, {
|
|
1357
1325
|
role: variant.id,
|
|
1358
1326
|
state: "base"
|
|
@@ -1369,15 +1337,19 @@ function variantBaseRule(variant, selector, tokens, colour) {
|
|
|
1369
1337
|
* token fallback keeps buttons usable in contexts that do not provide that
|
|
1370
1338
|
* contract (and preserves the existing theme behaviour there).
|
|
1371
1339
|
*/
|
|
1372
|
-
function variantStateColourRule(variant, variantId, themeId, state, colour, tokens) {
|
|
1340
|
+
function variantStateColourRule(variant, variantId, themeId, state, colour, tokens, paint) {
|
|
1373
1341
|
const baseSelector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
|
|
1374
1342
|
return rule$1(state === "hover" ? [`${baseSelector}:hover`, `${baseSelector}[data-force-hover="true"]`] : `${baseSelector}:${state}`, [...resolvedButtonColourDeclarations(colour, {
|
|
1375
1343
|
role: variantId,
|
|
1376
1344
|
state
|
|
1377
|
-
}), ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates[state], tokens) : []]);
|
|
1345
|
+
}), ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates[state], tokens, paint) : []]);
|
|
1346
|
+
}
|
|
1347
|
+
function variantFocusVisibleRule(variantId, themeId, focusIndicator, layers) {
|
|
1348
|
+
return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator, variantId).map(([property, value]) => property === "box-shadow" && layers !== null ? [property, `${layers}, ${value}`] : [property, value]));
|
|
1378
1349
|
}
|
|
1379
|
-
function
|
|
1380
|
-
|
|
1350
|
+
function focusShadowLayers(variant, paint) {
|
|
1351
|
+
const layers = variant.visualStates?.focus.shadowLayers;
|
|
1352
|
+
return layers && layers.length > 0 ? buttonShadowLayersValue(layers, paint) : null;
|
|
1381
1353
|
}
|
|
1382
1354
|
function variantEffectsCss(variant, effects, themeId, tokens, theme) {
|
|
1383
1355
|
if (!effects) return "";
|
|
@@ -1395,7 +1367,7 @@ function variantEffectsCss(variant, effects, themeId, tokens, theme) {
|
|
|
1395
1367
|
theme
|
|
1396
1368
|
});
|
|
1397
1369
|
}
|
|
1398
|
-
function variantDisabledRules(variant, variantId, themeId, colour, tokens) {
|
|
1370
|
+
function variantDisabledRules(variant, variantId, themeId, colour, tokens, paint) {
|
|
1399
1371
|
const base = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:disabled`;
|
|
1400
1372
|
const disabledSelectors = [
|
|
1401
1373
|
base,
|
|
@@ -1403,19 +1375,20 @@ function variantDisabledRules(variant, variantId, themeId, colour, tokens) {
|
|
|
1403
1375
|
`${base}:active`,
|
|
1404
1376
|
`${base}:focus`
|
|
1405
1377
|
];
|
|
1406
|
-
const
|
|
1378
|
+
const owned = partOwnedPseudoElements(variant.visualStates);
|
|
1379
|
+
const [firstHidden, ...otherHidden] = ["before", "after"].filter((pseudo) => !owned.includes(pseudo)).map((pseudo) => `${base}::${pseudo}`);
|
|
1407
1380
|
return [rule$1(disabledSelectors, [
|
|
1408
1381
|
...resolvedButtonColourDeclarations(colour, {
|
|
1409
1382
|
role: variantId,
|
|
1410
1383
|
state: "disabled"
|
|
1411
1384
|
}),
|
|
1412
|
-
...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates.disabled, tokens, true) : [],
|
|
1385
|
+
...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates.disabled, tokens, paint, true) : [],
|
|
1413
1386
|
...RESOLVED_BUTTON_DISABLED_DECLARATIONS
|
|
1414
|
-
]), rule$1(
|
|
1387
|
+
]), ...firstHidden === void 0 ? [] : [rule$1([firstHidden, ...otherHidden], [
|
|
1415
1388
|
["opacity", "0"],
|
|
1416
1389
|
["animation", "none"],
|
|
1417
1390
|
["pointer-events", "none"]
|
|
1418
|
-
])];
|
|
1391
|
+
])]];
|
|
1419
1392
|
}
|
|
1420
1393
|
/** Explicit rest transforms follow hover effects so :active can return to rest. */
|
|
1421
1394
|
function variantStateTransformRules(variant, selector) {
|
|
@@ -2533,6 +2506,19 @@ function resolvedHeaderNavLinkStyle(header, contrastTreatment, navTextSize) {
|
|
|
2533
2506
|
});
|
|
2534
2507
|
}
|
|
2535
2508
|
//#endregion
|
|
2509
|
+
//#region ../theme-core/src/typography/fontWeight.ts
|
|
2510
|
+
const fontWeights = {
|
|
2511
|
+
light: 300,
|
|
2512
|
+
regular: 400,
|
|
2513
|
+
medium: 500,
|
|
2514
|
+
semibold: 600,
|
|
2515
|
+
bold: 700
|
|
2516
|
+
};
|
|
2517
|
+
/** The CSS weight of a typography weight. Every role that names one (headings, body, eyebrow, the logo) is drawn through this. */
|
|
2518
|
+
function mapWeight(weight) {
|
|
2519
|
+
return fontWeights[weight];
|
|
2520
|
+
}
|
|
2521
|
+
//#endregion
|
|
2536
2522
|
//#region ../theme-core/src/header/generateHeaderLogoStyles.ts
|
|
2537
2523
|
function generateHeaderLogoStyles(input) {
|
|
2538
2524
|
const { logo, themeId } = input;
|
|
@@ -2540,6 +2526,7 @@ function generateHeaderLogoStyles(input) {
|
|
|
2540
2526
|
...logoTextColorRules(input),
|
|
2541
2527
|
logo?.fontFamily === "body" ? "font-family: var(--font-body);" : "font-family: var(--font-heading);",
|
|
2542
2528
|
...logoLetterSpacingRules(logo),
|
|
2529
|
+
...logoTypeRules(logo, input.theme.typography),
|
|
2543
2530
|
...logoContrastRules(input)
|
|
2544
2531
|
].join("\n ")}\n}\n${mobilePanelLogoColor(input)}`;
|
|
2545
2532
|
}
|
|
@@ -2561,6 +2548,23 @@ function logoLetterSpacingRules(logo) {
|
|
|
2561
2548
|
widest: "0.15em"
|
|
2562
2549
|
}[spacing]};`];
|
|
2563
2550
|
}
|
|
2551
|
+
/**
|
|
2552
|
+
* The site name's weight, case and width, each only when the recipe states it. The width is checked
|
|
2553
|
+
* against the logo's own family the way typography widths are: a family whose width axis doesn't reach
|
|
2554
|
+
* it (after the owner picks another heading font, say) draws the site name at its normal width.
|
|
2555
|
+
*/
|
|
2556
|
+
function logoTypeRules(logo, typography) {
|
|
2557
|
+
return [
|
|
2558
|
+
...logo?.weight ? [`font-weight: ${mapWeight(logo.weight)};`] : [],
|
|
2559
|
+
...logo?.case ? [`text-transform: ${logo.case === "uppercase" ? "uppercase" : "none"};`] : [],
|
|
2560
|
+
...logoWidthRules(logo, typography)
|
|
2561
|
+
];
|
|
2562
|
+
}
|
|
2563
|
+
function logoWidthRules(logo, typography) {
|
|
2564
|
+
if (logo?.width == null) return [];
|
|
2565
|
+
const family = logo.fontFamily === "body" ? typography.body.family : typography.headings.default.family;
|
|
2566
|
+
return fontWidthFits(logo.width, family) ? [`font-stretch: ${logo.width}%;`] : [];
|
|
2567
|
+
}
|
|
2564
2568
|
function logoContrastRules(input) {
|
|
2565
2569
|
const colorToken = input.textColor?.trim() || input.fallbackTextColor?.trim() || "text";
|
|
2566
2570
|
const shadow = buildTextContrastShadow({
|
|
@@ -3058,49 +3062,160 @@ function headerPaintInks(header, theme, policy) {
|
|
|
3058
3062
|
return surfaceInkDeclarations(surfaceInkPublication(resolveSurfaceForeground(header.background, expandPalette(theme.palette)), policy));
|
|
3059
3063
|
}
|
|
3060
3064
|
//#endregion
|
|
3061
|
-
//#region ../theme-core/src/
|
|
3065
|
+
//#region ../theme-core/src/responsive/cssScan.ts
|
|
3062
3066
|
/**
|
|
3063
|
-
*
|
|
3064
|
-
*
|
|
3065
|
-
* The renderer emits one element per shown join:
|
|
3066
|
-
*
|
|
3067
|
-
* <div data-block-boundary data-boundary-treatment="wave-edge-gentle"
|
|
3068
|
-
* data-boundary-placement="previous"
|
|
3069
|
-
* style="--boundary-shape-paint: …; --boundary-band-paint: …">
|
|
3070
|
-
*
|
|
3071
|
-
* Every selector matches an exact attribute value, so there is no reliance on
|
|
3072
|
-
* prefix ordering in the cascade and nothing reads colours out of a string.
|
|
3073
|
-
* The shape layer is `::after`; the band layer (paint → paint only) is
|
|
3074
|
-
* `::before`.
|
|
3067
|
+
* Scanning for CSS source. Comments and quoted strings are read as whole tokens and
|
|
3068
|
+
* skipped, so a brace or semicolon inside `content: "{"` or a comment never counts.
|
|
3075
3069
|
*/
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3070
|
+
const CSS_TOKENS = /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*(?:"|$)|'(?:\\[\s\S]|[^'\\])*(?:'|$)|[()[\]{};]|[^"'()[\]{};/]+|\//g;
|
|
3071
|
+
/** The only iteration shell: transitions never mutate their input state. */
|
|
3072
|
+
function* scanTokens(source, from, initial, transition) {
|
|
3073
|
+
const pattern = new RegExp(CSS_TOKENS.source, "g");
|
|
3074
|
+
pattern.lastIndex = from;
|
|
3075
|
+
const cursor = { state: initial };
|
|
3076
|
+
for (const match of source.matchAll(pattern)) {
|
|
3077
|
+
const next = transition(cursor.state, {
|
|
3078
|
+
text: match[0],
|
|
3079
|
+
index: match.index
|
|
3080
|
+
});
|
|
3081
|
+
cursor.state = next.state;
|
|
3082
|
+
yield next.output;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
const isSkippedToken = (token) => token.startsWith("/*") || token.startsWith("\"") || token.startsWith("'");
|
|
3086
|
+
function findTransition(depth, token, matches) {
|
|
3087
|
+
if (isSkippedToken(token.text)) return {
|
|
3088
|
+
state: depth,
|
|
3089
|
+
output: -1
|
|
3090
|
+
};
|
|
3091
|
+
const offset = token.text.split("").findIndex((ch, offset) => matches(ch, token.index + offset, depth));
|
|
3092
|
+
return {
|
|
3093
|
+
state: Math.max(0, depth + (token.text === "(" ? 1 : token.text === ")" ? -1 : 0)),
|
|
3094
|
+
output: offset === -1 ? -1 : token.index + offset
|
|
3095
|
+
};
|
|
3096
|
+
}
|
|
3097
|
+
/** First matching character outside comments/strings; depth is before the character. */
|
|
3098
|
+
function findOutsideStringsAndComments(source, from, matches) {
|
|
3099
|
+
for (const found of scanTokens(source, from, 0, (depth, token) => findTransition(depth, token, matches))) if (found !== -1) return found;
|
|
3100
|
+
return -1;
|
|
3101
|
+
}
|
|
3102
|
+
/** The next `target` outside comments, strings and parentheses, or -1. */
|
|
3103
|
+
function findTopLevelChar(source, from, target) {
|
|
3104
|
+
return findOutsideStringsAndComments(source, from, (ch, _index, parenDepth) => ch === target && parenDepth === 0);
|
|
3105
|
+
}
|
|
3106
|
+
function braceTransition(depth, token) {
|
|
3107
|
+
const state = depth + (token.text === "{" ? 1 : token.text === "}" ? -1 : 0);
|
|
3108
|
+
return {
|
|
3109
|
+
state,
|
|
3110
|
+
output: token.text === "}" && state === 0 ? token.index : -1
|
|
3111
|
+
};
|
|
3112
|
+
}
|
|
3113
|
+
/** The index of the brace closing the one at `openIndex`, or -1. */
|
|
3114
|
+
function findMatchingBrace(source, openIndex) {
|
|
3115
|
+
for (const found of scanTokens(source, openIndex, 0, braceTransition)) if (found !== -1) return found;
|
|
3116
|
+
return -1;
|
|
3117
|
+
}
|
|
3118
|
+
const WHITESPACE_AND_COMMENTS = /(?:\s+|\/\*[\s\S]*?(?:\*\/|$))*/y;
|
|
3119
|
+
/** The first index at or after `from` that is not whitespace or inside a comment. */
|
|
3120
|
+
function skipWhitespaceAndComments(source, from) {
|
|
3121
|
+
const pattern = new RegExp(WHITESPACE_AND_COMMENTS.source, "y");
|
|
3122
|
+
pattern.lastIndex = from;
|
|
3123
|
+
const match = pattern.exec(source);
|
|
3124
|
+
return Math.min(source.length, from + (match?.[0].length ?? 0));
|
|
3125
|
+
}
|
|
3126
|
+
//#endregion
|
|
3127
|
+
//#region ../theme-core/src/responsive/transformMediaRules.ts
|
|
3128
|
+
const findNextOpeningBrace = (source, from) => findTopLevelChar(source, from, "{");
|
|
3129
|
+
/** The next `@media` at-rule outside comments and strings, or -1. */
|
|
3130
|
+
const findNextMediaRule = (source, from) => findOutsideStringsAndComments(source, from, (ch, index) => ch === "@" && source.startsWith("@media", index) && !/[a-zA-Z0-9_-]/.test(source[index + 6] ?? ""));
|
|
3084
3131
|
/**
|
|
3085
|
-
*
|
|
3086
|
-
*
|
|
3087
|
-
* shape so the colour behind shows through them; that keeps them a blend of the
|
|
3088
|
-
* two sections' colours, whatever the palette. They fade out towards the peak.
|
|
3132
|
+
* Rewrites eligible @media blocks to named @container blocks.
|
|
3133
|
+
* Keeps unsupported @media queries unchanged.
|
|
3089
3134
|
*/
|
|
3090
|
-
|
|
3091
|
-
const
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3135
|
+
function convertMediaRulesToContainerRules(css, containerName = getContainerResponsiveScopeSpec().containerName) {
|
|
3136
|
+
const containerScope = getContainerResponsiveScopeSpec();
|
|
3137
|
+
let output = "";
|
|
3138
|
+
let index = 0;
|
|
3139
|
+
while (index < css.length) {
|
|
3140
|
+
const mediaStart = findNextMediaRule(css, index);
|
|
3141
|
+
if (mediaStart === -1) {
|
|
3142
|
+
output += css.slice(index);
|
|
3143
|
+
break;
|
|
3144
|
+
}
|
|
3145
|
+
output += css.slice(index, mediaStart);
|
|
3146
|
+
const parsed = parseMediaRule(css, mediaStart);
|
|
3147
|
+
if (!parsed) {
|
|
3148
|
+
output += css.slice(mediaStart, mediaStart + 6);
|
|
3149
|
+
index = mediaStart + 6;
|
|
3150
|
+
continue;
|
|
3151
|
+
}
|
|
3152
|
+
const transformedBody = convertMediaRulesToContainerRules(parsed.body, containerName);
|
|
3153
|
+
const containerQuery = convertMediaQueryToContainerQuery(parsed.query);
|
|
3154
|
+
if (containerQuery) {
|
|
3155
|
+
const hasScope = hasResponsiveScopeRule(transformedBody);
|
|
3156
|
+
const rootQualifiedBody = rewriteScopedRootSelectors(hasScope ? retargetResponsiveScopeRules(transformedBody, containerScope) : transformedBody);
|
|
3157
|
+
const scopedBody = hasScope && !hasTopLevelContentOutsideResponsiveScopes(transformedBody) ? rootQualifiedBody : buildResponsiveScopeRule(containerScope, rootQualifiedBody);
|
|
3158
|
+
output += `@container ${containerName} ${containerQuery} {\n${scopedBody}\n}`;
|
|
3159
|
+
} else output += `@media ${parsed.query} {${transformedBody}}`;
|
|
3160
|
+
index = parsed.endIndex;
|
|
3161
|
+
}
|
|
3162
|
+
return output;
|
|
3163
|
+
}
|
|
3164
|
+
/** Keep scope-root selectors eligible inside the generated preview scope. */
|
|
3165
|
+
function rewriteScopedRootSelectors(source) {
|
|
3166
|
+
const open = findNextOpeningBrace(source, 0);
|
|
3167
|
+
if (open === -1) return source;
|
|
3168
|
+
const close = findMatchingBrace(source, open);
|
|
3169
|
+
if (close === -1) return source;
|
|
3170
|
+
const prelude = source.slice(0, open);
|
|
3171
|
+
const body = source.slice(open + 1, close);
|
|
3172
|
+
const isAtRule = prelude[skipWhitespaceAndComments(prelude, 0)] === "@";
|
|
3173
|
+
const isKeyframes = /^@(?:-\w+-)?keyframes\b/.test(prelude.trimStart());
|
|
3174
|
+
return `${isAtRule ? prelude : qualifyScopeRoots(prelude)}{${isAtRule && !isKeyframes ? rewriteScopedRootSelectors(body) : body}}${rewriteScopedRootSelectors(source.slice(close + 1))}`;
|
|
3175
|
+
}
|
|
3176
|
+
function qualifyScopeRoots(selector) {
|
|
3177
|
+
return selector.replace(/\/\*[\s\S]*?\*\/|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\[(?:\\.|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^\]\\])*\]|\.theme-scope(?![\w-])/g, (token, offset) => {
|
|
3178
|
+
const isRoot = token === ".theme-scope" || /^\[data-(?:skin|theme-scope)\s*=/.test(token);
|
|
3179
|
+
const alreadyQualified = /^:is\(\s*\*\s*,\s*:scope\s*\)/.test(selector.slice(offset + token.length));
|
|
3180
|
+
return isRoot && !alreadyQualified ? `${token}:is(*, :scope)` : token;
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
function hasTopLevelContentOutsideResponsiveScopes(source) {
|
|
3184
|
+
let index = 0;
|
|
3185
|
+
while (index < source.length) {
|
|
3186
|
+
index = skipWhitespaceAndComments(source, index);
|
|
3187
|
+
if (index >= source.length) return false;
|
|
3188
|
+
if (!source.startsWith("@scope", index)) return true;
|
|
3189
|
+
const parsedScope = parseScopeRule(source, index);
|
|
3190
|
+
if (!parsedScope) return true;
|
|
3191
|
+
index = parsedScope.endIndex;
|
|
3192
|
+
}
|
|
3193
|
+
return false;
|
|
3100
3194
|
}
|
|
3101
|
-
function
|
|
3102
|
-
|
|
3195
|
+
function parseScopeRule(source, start) {
|
|
3196
|
+
const match = findResponsiveScopeRuleAt(source, start);
|
|
3197
|
+
if (!match) return null;
|
|
3198
|
+
const closeBraceIndex = findMatchingBrace(source, match.openBraceIndex);
|
|
3199
|
+
if (closeBraceIndex === -1) return null;
|
|
3200
|
+
return { endIndex: closeBraceIndex + 1 };
|
|
3201
|
+
}
|
|
3202
|
+
function parseMediaRule(source, start) {
|
|
3203
|
+
let i = start + 6;
|
|
3204
|
+
while (i < source.length && /\s/.test(source[i] ?? "")) i++;
|
|
3205
|
+
const queryStart = i;
|
|
3206
|
+
const openBraceIndex = findNextOpeningBrace(source, i);
|
|
3207
|
+
if (openBraceIndex === -1) return null;
|
|
3208
|
+
const closeBraceIndex = findMatchingBrace(source, openBraceIndex);
|
|
3209
|
+
if (closeBraceIndex === -1) return null;
|
|
3210
|
+
return {
|
|
3211
|
+
query: source.slice(queryStart, openBraceIndex).trim(),
|
|
3212
|
+
body: source.slice(openBraceIndex + 1, closeBraceIndex),
|
|
3213
|
+
endIndex: closeBraceIndex + 1
|
|
3214
|
+
};
|
|
3103
3215
|
}
|
|
3216
|
+
//#endregion
|
|
3217
|
+
//#region ../theme-core/src/layout/boundaryCss.ts
|
|
3218
|
+
/** Geometry comes only from renderer-provided variables. This stylesheet owns placement and reserves. */
|
|
3104
3219
|
/**
|
|
3105
3220
|
* How each placement anchors the layers against the zero-height boundary
|
|
3106
3221
|
* element that sits exactly on the join.
|
|
@@ -3129,7 +3244,7 @@ const placementRules = {
|
|
|
3129
3244
|
* the schedule and shop sections too.
|
|
3130
3245
|
*/
|
|
3131
3246
|
const blockSection = ":where([data-slot='section'], [data-slot='schedule-section'], [data-slot='shop-section'])";
|
|
3132
|
-
function generateBoundaryCss(selector) {
|
|
3247
|
+
function generateBoundaryCss(selector, responsiveMode = "viewport") {
|
|
3133
3248
|
const boundary = `${selector} [data-block-boundary]`;
|
|
3134
3249
|
return [
|
|
3135
3250
|
rule(boundary, [
|
|
@@ -3151,8 +3266,8 @@ function generateBoundaryCss(selector) {
|
|
|
3151
3266
|
rule(`${boundary}::before`, ["z-index: 0;", "background: var(--boundary-band-paint, transparent);"]),
|
|
3152
3267
|
rule(`${boundary}::after`, ["z-index: 1;"]),
|
|
3153
3268
|
...placementCss(boundary),
|
|
3154
|
-
...transitionCatalogueEntries.flatMap((entry) =>
|
|
3155
|
-
|
|
3269
|
+
...transitionCatalogueEntries.flatMap((entry) => footerEdgeReserveCss(selector, entry)),
|
|
3270
|
+
variableBoundaryCss(boundary, responsiveMode, selector)
|
|
3156
3271
|
].join("\n\n");
|
|
3157
3272
|
}
|
|
3158
3273
|
/**
|
|
@@ -3187,52 +3302,61 @@ function placementCss(boundary) {
|
|
|
3187
3302
|
return [rule(`${placed}::after`, rules.shape), rules.band ? rule(`${placed}::before`, rules.band) : rule(`${placed}::before`, ["content: none;"])];
|
|
3188
3303
|
});
|
|
3189
3304
|
}
|
|
3190
|
-
function
|
|
3191
|
-
|
|
3305
|
+
function rule(selector, declarations) {
|
|
3306
|
+
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
3307
|
+
}
|
|
3308
|
+
function variableBoundaryCss(boundary, responsiveMode, scope) {
|
|
3309
|
+
const selected = `${boundary}[data-boundary-geometry]`;
|
|
3310
|
+
const shapes = `${selected}::after, ${selected} > [data-boundary-back]`;
|
|
3192
3311
|
return [
|
|
3193
|
-
rule(
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
"
|
|
3312
|
+
rule(shapes, [
|
|
3313
|
+
"height: var(--boundary-shape-height);",
|
|
3314
|
+
"background: var(--boundary-shape-background);",
|
|
3315
|
+
"mask-image: var(--boundary-mask-wide);",
|
|
3316
|
+
"-webkit-mask-image: var(--boundary-mask-wide);",
|
|
3317
|
+
"clip-path: var(--boundary-clip-wide);",
|
|
3318
|
+
"mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
3319
|
+
"-webkit-mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
3320
|
+
"mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
3321
|
+
"-webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
3322
|
+
"mask-position: center;",
|
|
3323
|
+
"-webkit-mask-position: center;"
|
|
3324
|
+
]),
|
|
3325
|
+
`@supports (color: color-mix(in srgb, black, white)) {\n${rule(shapes, ["background: var(--boundary-shape-background-mixed);"])}\n}`,
|
|
3326
|
+
rule(`${selected}::after`, ["z-index: 2;"]),
|
|
3327
|
+
rule(`${selected}[data-boundary-section-owned]::before, ${selected}[data-boundary-section-owned]::after`, ["content: none;"]),
|
|
3328
|
+
rule(`${selected}::before`, ["mask: none;", "opacity: 1;"]),
|
|
3329
|
+
rule(`${selected}[data-boundary-placement='previous']::before, ${selected}[data-boundary-placement='next']::before`, ["content: none;"]),
|
|
3330
|
+
rule(`${selected} > [data-boundary-back]`, [
|
|
3331
|
+
"position: absolute;",
|
|
3332
|
+
"inset-inline: 0;",
|
|
3333
|
+
"pointer-events: none;",
|
|
3334
|
+
"z-index: 1;"
|
|
3335
|
+
]),
|
|
3336
|
+
rule(`${selected}[data-footer-edge]::before`, [
|
|
3337
|
+
"content: var(--boundary-footer-back-content);",
|
|
3338
|
+
"background: var(--boundary-shape-paint);",
|
|
3339
|
+
"top: auto;",
|
|
3198
3340
|
"bottom: 0;",
|
|
3341
|
+
"height: var(--boundary-shape-height);",
|
|
3199
3342
|
"transform: translateY(-12%) scaleX(-1);",
|
|
3200
|
-
"opacity: 0.5;"
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
"
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
"height: calc(var(--boundary-height) + 2px);",
|
|
3215
|
-
"background: var(--boundary-shape-paint);",
|
|
3216
|
-
`clip-path: ${anglePolygonCss(entry.shape.polygon)};`
|
|
3217
|
-
];
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
function maskDeclarations(mask) {
|
|
3221
|
-
return [
|
|
3222
|
-
"background: var(--boundary-shape-paint);",
|
|
3223
|
-
`mask-image: url("${mask}");`,
|
|
3224
|
-
"mask-repeat: no-repeat;",
|
|
3225
|
-
"mask-size: 100% 100%;",
|
|
3226
|
-
`-webkit-mask-image: url("${mask}");`,
|
|
3227
|
-
"-webkit-mask-repeat: no-repeat;",
|
|
3228
|
-
"-webkit-mask-size: 100% 100%;"
|
|
3229
|
-
];
|
|
3230
|
-
}
|
|
3231
|
-
function rule(selector, declarations) {
|
|
3232
|
-
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
3343
|
+
"opacity: 0.5;",
|
|
3344
|
+
"mask-image: var(--boundary-mask-wide);",
|
|
3345
|
+
"-webkit-mask-image: var(--boundary-mask-wide);",
|
|
3346
|
+
"mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
3347
|
+
"-webkit-mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
3348
|
+
"mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
3349
|
+
"-webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);"
|
|
3350
|
+
]),
|
|
3351
|
+
narrowBoundaryCss(`@media (max-width: 767px) {\n${rule(`${scope} [data-section-edge-paint]`, ["mask-image: var(--boundary-section-mask-narrow, var(--boundary-texture-mask-narrow));", "-webkit-mask-image: var(--boundary-section-mask-narrow, var(--boundary-texture-mask-narrow));"])}\n@supports (color: color-mix(in srgb, black, white)) {\n${rule(`${scope} [data-section-edge-fade]`, ["mask-image: var(--boundary-texture-mask-narrow);", "-webkit-mask-image: var(--boundary-texture-mask-narrow);"])}\n}\n${rule(shapes, [
|
|
3352
|
+
"mask-image: var(--boundary-mask-narrow);",
|
|
3353
|
+
"-webkit-mask-image: var(--boundary-mask-narrow);",
|
|
3354
|
+
"clip-path: var(--boundary-clip-narrow);"
|
|
3355
|
+
])}\n${rule(`${selected}[data-footer-edge]::before`, ["mask-image: var(--boundary-mask-narrow);", "-webkit-mask-image: var(--boundary-mask-narrow);"])}\n}`, responsiveMode)
|
|
3356
|
+
].join("\n\n");
|
|
3233
3357
|
}
|
|
3234
|
-
function
|
|
3235
|
-
return
|
|
3358
|
+
function narrowBoundaryCss(css, responsiveMode) {
|
|
3359
|
+
return responsiveMode === "container" ? convertMediaRulesToContainerRules(css) : css;
|
|
3236
3360
|
}
|
|
3237
3361
|
//#endregion
|
|
3238
3362
|
//#region ../theme-core/src/layout/generateLayoutCss.ts
|
|
@@ -3259,7 +3383,8 @@ function generateLayoutCss(options) {
|
|
|
3259
3383
|
if (heroTypographyCss) cssChunks.push(heroTypographyCss);
|
|
3260
3384
|
const bodyTextTypographyCss = generateBodyTextTypographyCss(themeId, theme);
|
|
3261
3385
|
if (bodyTextTypographyCss) cssChunks.push(bodyTextTypographyCss);
|
|
3262
|
-
cssChunks.push(
|
|
3386
|
+
cssChunks.push(generateGroundPaintCss(selector));
|
|
3387
|
+
cssChunks.push(generateBoundaryCss(selector, options.responsiveMode));
|
|
3263
3388
|
return cssChunks.join("\n\n");
|
|
3264
3389
|
}
|
|
3265
3390
|
function toPaddingValue(preset) {
|
|
@@ -3683,7 +3808,8 @@ function buildThemeRuntime$1(theme, options) {
|
|
|
3683
3808
|
});
|
|
3684
3809
|
const layoutCss = generateLayoutCss({
|
|
3685
3810
|
themeId,
|
|
3686
|
-
theme
|
|
3811
|
+
theme,
|
|
3812
|
+
responsiveMode
|
|
3687
3813
|
});
|
|
3688
3814
|
const statusCss = generateStatusCss({
|
|
3689
3815
|
themeId,
|
|
@@ -3854,15 +3980,6 @@ function typographyFontRoleCssVars(typography) {
|
|
|
3854
3980
|
} : {}
|
|
3855
3981
|
};
|
|
3856
3982
|
}
|
|
3857
|
-
function mapWeight(w) {
|
|
3858
|
-
return {
|
|
3859
|
-
light: 300,
|
|
3860
|
-
regular: 400,
|
|
3861
|
-
medium: 500,
|
|
3862
|
-
semibold: 600,
|
|
3863
|
-
bold: 700
|
|
3864
|
-
}[w];
|
|
3865
|
-
}
|
|
3866
3983
|
function mapShadow(level, softness, position = "bottom", colorToken) {
|
|
3867
3984
|
if (level === "none") return "none";
|
|
3868
3985
|
const tintVar = colorToken ? cssVarValue(colorToken) : null;
|
|
@@ -5106,6 +5223,45 @@ function StepIndicator$1({ currentStep, totalSteps, stepLabels, classPrefix, emi
|
|
|
5106
5223
|
});
|
|
5107
5224
|
}
|
|
5108
5225
|
//#endregion
|
|
5226
|
+
//#region ../blocks/src/system/runtime/shared/components/ChoiceGroup.tsx
|
|
5227
|
+
function ChoiceGroup(props) {
|
|
5228
|
+
const size = props.size ?? "pill";
|
|
5229
|
+
return /* @__PURE__ */ jsxs("fieldset", {
|
|
5230
|
+
className: ["rb-choice-group", props.className].filter(Boolean).join(" "),
|
|
5231
|
+
"data-choice-size": size,
|
|
5232
|
+
disabled: props.disabled,
|
|
5233
|
+
children: [/* @__PURE__ */ jsx("legend", {
|
|
5234
|
+
className: props.legendHidden ? "rb-choice-legend rb-choice-legend--hidden" : "rb-choice-legend",
|
|
5235
|
+
children: props.legend
|
|
5236
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
5237
|
+
className: "rb-choice-options",
|
|
5238
|
+
children: props.options.map((option) => /* @__PURE__ */ jsxs("label", {
|
|
5239
|
+
className: "rb-choice",
|
|
5240
|
+
"data-choice-size": size,
|
|
5241
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
5242
|
+
type: "radio",
|
|
5243
|
+
className: "rb-choice-input",
|
|
5244
|
+
name: props.name,
|
|
5245
|
+
value: option.value,
|
|
5246
|
+
required: props.required,
|
|
5247
|
+
disabled: option.disabled,
|
|
5248
|
+
...props.value === void 0 ? { defaultChecked: option.value === props.defaultValue } : { checked: option.value === props.value },
|
|
5249
|
+
onChange: props.onChange ? () => props.onChange?.(option.value) : void 0
|
|
5250
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
5251
|
+
className: "rb-choice-face",
|
|
5252
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
5253
|
+
className: "rb-choice-label",
|
|
5254
|
+
children: option.label
|
|
5255
|
+
}), option.detail ? /* @__PURE__ */ jsx("span", {
|
|
5256
|
+
className: "rb-choice-detail",
|
|
5257
|
+
children: option.detail
|
|
5258
|
+
}) : null]
|
|
5259
|
+
})]
|
|
5260
|
+
}, option.value))
|
|
5261
|
+
})]
|
|
5262
|
+
});
|
|
5263
|
+
}
|
|
5264
|
+
//#endregion
|
|
5109
5265
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCard.tsx
|
|
5110
5266
|
/**
|
|
5111
5267
|
* EventCard Component
|
|
@@ -5713,9 +5869,19 @@ const formSchema = z.union([z.null(), z.object({
|
|
|
5713
5869
|
slug: z.string().optional()
|
|
5714
5870
|
})]).transform((form) => form !== null);
|
|
5715
5871
|
const productsSchema = z.object({ products: z.array(z.object({ slug: z.string() })) });
|
|
5872
|
+
const passesSchema = z.object({ passes: countSchema }).transform(({ passes }) => passes);
|
|
5873
|
+
const membershipsSchema = z.object({ memberships: countSchema }).transform(({ memberships }) => memberships);
|
|
5874
|
+
const giftingSchema = z.object({
|
|
5875
|
+
giftCards: countSchema,
|
|
5876
|
+
vouchers: countSchema
|
|
5877
|
+
});
|
|
5716
5878
|
/** Both producers pass raw facts through the same stage admission. */
|
|
5717
5879
|
function readinessFactsFromLoaders(stage, input) {
|
|
5718
5880
|
const facts = {
|
|
5881
|
+
catalogue: loaderFactProducers.catalogue(input),
|
|
5882
|
+
gifting: loaderFactProducers.gifting(input),
|
|
5883
|
+
eventFilters: loaderFactProducers.eventFilters(input),
|
|
5884
|
+
appointments: loaderFactProducers.appointments(input),
|
|
5719
5885
|
mailingList: loaderFactProducers.mailingList(input),
|
|
5720
5886
|
testimonials: loaderFactProducers.testimonials(input),
|
|
5721
5887
|
events: loaderFactProducers.events(input),
|
|
@@ -5730,8 +5896,19 @@ function readinessFactsFromLoaders(stage, input) {
|
|
|
5730
5896
|
});
|
|
5731
5897
|
}
|
|
5732
5898
|
const loaderFactProducers = {
|
|
5899
|
+
catalogue: (input) => {
|
|
5900
|
+
const passes = firstLoaderFact(input, "catalogue", "passes", passesSchema);
|
|
5901
|
+
const memberships = firstLoaderFact(input, "catalogue", "memberships", membershipsSchema);
|
|
5902
|
+
return passes.kind === "Loaded" && memberships.kind === "Loaded" ? loadedReadinessFact({
|
|
5903
|
+
passes: passes.value,
|
|
5904
|
+
memberships: memberships.value
|
|
5905
|
+
}) : unavailableReadinessFact;
|
|
5906
|
+
},
|
|
5907
|
+
gifting: (input) => firstLoaderFact(input, "gifting", "offers", giftingSchema),
|
|
5908
|
+
eventFilters: () => unavailableReadinessFact,
|
|
5909
|
+
appointments: () => unavailableReadinessFact,
|
|
5733
5910
|
mailingList: (input) => input.mailingList === void 0 ? unavailableReadinessFact : loadedReadinessFact(input.mailingList),
|
|
5734
|
-
testimonials: (input) =>
|
|
5911
|
+
testimonials: (input) => mapReadinessFact(firstLoaderFact(input, "testimonials", "entries", countSchema), (count) => ({
|
|
5735
5912
|
count,
|
|
5736
5913
|
total: "unknown"
|
|
5737
5914
|
})),
|
|
@@ -5743,7 +5920,7 @@ const loaderFactProducers = {
|
|
|
5743
5920
|
})),
|
|
5744
5921
|
products: (input) => new Map(projections(input, "products").flatMap(({ id, block }) => {
|
|
5745
5922
|
const selection = chosenString(block.content.productSlug);
|
|
5746
|
-
return selection ? [[selection,
|
|
5923
|
+
return selection ? [[selection, mapReadinessFact(loaderFact(input, id, "products", productsSchema), ({ products }) => products.some((product) => product.slug === selection))]] : [];
|
|
5747
5924
|
})),
|
|
5748
5925
|
template: (input) => loadedReadinessFact(input.template)
|
|
5749
5926
|
};
|
|
@@ -5764,9 +5941,6 @@ function loaderFact(input, id, key, schema) {
|
|
|
5764
5941
|
const parsed = z.safeParse(schema, prefetched.resolvedData[id]?.[key]);
|
|
5765
5942
|
return parsed.success ? loadedReadinessFact(parsed.data) : unavailableReadinessFact;
|
|
5766
5943
|
}
|
|
5767
|
-
function mapFact(fact, project) {
|
|
5768
|
-
return fact.kind === "Loaded" ? loadedReadinessFact(project(fact.value)) : fact;
|
|
5769
|
-
}
|
|
5770
5944
|
//#endregion
|
|
5771
5945
|
//#region ../blocks/src/system/runtime/nodes/carousel.shared.ts
|
|
5772
5946
|
/**
|
|
@@ -6246,7 +6420,8 @@ function renderMark(mark, key, child) {
|
|
|
6246
6420
|
/**
|
|
6247
6421
|
* `compact` (event details) is one plain Google Maps text link under the venue;
|
|
6248
6422
|
* `block` (the map block) leads with a secondary directions button and keeps
|
|
6249
|
-
* the same Google Maps text link beside it.
|
|
6423
|
+
* the same Google Maps text link beside it. Look layouts mark the row as the
|
|
6424
|
+
* `actions` slot, so a skin dresses it like every other button row.
|
|
6250
6425
|
*/
|
|
6251
6426
|
function LocationMapActions(props) {
|
|
6252
6427
|
const links = locationMapLinks(props);
|
|
@@ -6254,6 +6429,7 @@ function LocationMapActions(props) {
|
|
|
6254
6429
|
const googleMapsLabel = props.googleMapsLabel ?? "Open in Google Maps";
|
|
6255
6430
|
if (props.layout === "block") return /* @__PURE__ */ jsxs("div", {
|
|
6256
6431
|
className: "rb-location-map-actions",
|
|
6432
|
+
"data-slot": props.lookLayout ? "actions" : void 0,
|
|
6257
6433
|
children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
6258
6434
|
href: links.directions,
|
|
6259
6435
|
target: "_blank",
|
|
@@ -6560,6 +6736,7 @@ function LocationMapPlace(props) {
|
|
|
6560
6736
|
}) : null,
|
|
6561
6737
|
props.showDirections ? /* @__PURE__ */ jsx(LocationMapActions, {
|
|
6562
6738
|
layout: "block",
|
|
6739
|
+
lookLayout: props.lookLayout,
|
|
6563
6740
|
location: props.location,
|
|
6564
6741
|
addressText: props.addressText,
|
|
6565
6742
|
directionsLabel: props.directionsLabel,
|
|
@@ -8588,49 +8765,116 @@ function resolveEventDetailsPresentation(input) {
|
|
|
8588
8765
|
};
|
|
8589
8766
|
}
|
|
8590
8767
|
//#endregion
|
|
8591
|
-
//#region ../blocks/src/system/runtime/nodes/event-details/
|
|
8768
|
+
//#region ../blocks/src/system/runtime/nodes/event-details/detailSlots.ts
|
|
8769
|
+
function resolveDetailSlots(presentation) {
|
|
8770
|
+
return {
|
|
8771
|
+
detail: listLookSlot(presentation, "detail"),
|
|
8772
|
+
label: listLookSlot(presentation, "detail-label"),
|
|
8773
|
+
value: listLookSlot(presentation, "detail-value"),
|
|
8774
|
+
sessions: listLookSlot(presentation, "sessions"),
|
|
8775
|
+
session: listLookSlot(presentation, "session")
|
|
8776
|
+
};
|
|
8777
|
+
}
|
|
8778
|
+
//#endregion
|
|
8779
|
+
//#region ../blocks/src/system/runtime/nodes/event-details/eventPriceSummary.ts
|
|
8780
|
+
function decideEventPriceSummary(input) {
|
|
8781
|
+
if (input.options.length < 2) return {
|
|
8782
|
+
kind: "price",
|
|
8783
|
+
price: input.price,
|
|
8784
|
+
depositNote: input.depositNote
|
|
8785
|
+
};
|
|
8786
|
+
return {
|
|
8787
|
+
kind: "options",
|
|
8788
|
+
range: input.optionsCoverEveryPrice ? null : input.price,
|
|
8789
|
+
options: input.options,
|
|
8790
|
+
depositNote: input.depositNote
|
|
8791
|
+
};
|
|
8792
|
+
}
|
|
8592
8793
|
/** A course lists every active option, whether or not its sale window is open. */
|
|
8593
8794
|
function wholeSeriesPriceOptions(pricing) {
|
|
8594
8795
|
return pricing.kind === "tiered" ? pricing.options.filter((option) => option.isActive) : [];
|
|
8595
8796
|
}
|
|
8797
|
+
function wholeSeriesPriceSummary(pricing, depositNote) {
|
|
8798
|
+
return decideEventPriceSummary({
|
|
8799
|
+
price: formatBookingPriceDisplay(publicEventPricingDisplay(pricing), { decimals: "auto" }),
|
|
8800
|
+
options: wholeSeriesPriceOptions(pricing).map((option) => ({
|
|
8801
|
+
id: option.id,
|
|
8802
|
+
name: option.name,
|
|
8803
|
+
description: option.description,
|
|
8804
|
+
price: formatEventPriceAmount(option.priceAmount, pricing.currency)
|
|
8805
|
+
})),
|
|
8806
|
+
depositNote,
|
|
8807
|
+
optionsCoverEveryPrice: true
|
|
8808
|
+
});
|
|
8809
|
+
}
|
|
8810
|
+
//#endregion
|
|
8811
|
+
//#region ../blocks/src/system/runtime/nodes/event-details/EventFactRows.tsx
|
|
8812
|
+
/**
|
|
8813
|
+
* An event's facts as a short list: one row per fact, a small icon where a
|
|
8814
|
+
* label would be. The labels stay for screen readers. Each row is a direct
|
|
8815
|
+
* child of the list, so a site style's `facts > *` rules still reach it.
|
|
8816
|
+
*/
|
|
8817
|
+
function EventFactList({ slot, children }) {
|
|
8818
|
+
return /* @__PURE__ */ jsx("dl", {
|
|
8819
|
+
...slot,
|
|
8820
|
+
className: "rb-event-facts",
|
|
8821
|
+
children
|
|
8822
|
+
});
|
|
8823
|
+
}
|
|
8824
|
+
function EventFactRow({ fact, label, icon: Icon, slots, children }) {
|
|
8825
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8826
|
+
...slots.detail,
|
|
8827
|
+
"data-fact": fact,
|
|
8828
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
8829
|
+
...slots.label,
|
|
8830
|
+
className: "rb-sr-only",
|
|
8831
|
+
children: label
|
|
8832
|
+
}), /* @__PURE__ */ jsxs("dd", {
|
|
8833
|
+
className: "rb-event-fact",
|
|
8834
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
8835
|
+
className: "rb-event-fact-icon",
|
|
8836
|
+
strokeWidth: 1.75
|
|
8837
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
8838
|
+
...slots.value,
|
|
8839
|
+
className: "rb-event-fact-text",
|
|
8840
|
+
children
|
|
8841
|
+
})]
|
|
8842
|
+
})]
|
|
8843
|
+
});
|
|
8844
|
+
}
|
|
8596
8845
|
/** The price, with any deposit option said beside it. */
|
|
8597
8846
|
function PriceLine({ price, depositNote }) {
|
|
8598
8847
|
return /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: price }), depositNote ? `, ${depositNote}` : null] });
|
|
8599
8848
|
}
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
return /* @__PURE__ */
|
|
8603
|
-
className: "rb-
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
className: "rb-caption rb-mt-1",
|
|
8630
|
-
children: ["You can also attend with: ", acceptedItems.join(", ")]
|
|
8631
|
-
}) : null
|
|
8632
|
-
]
|
|
8633
|
-
});
|
|
8849
|
+
/** Each price sits next to its name. Descriptions put one option on each line. */
|
|
8850
|
+
function PriceOptionList({ options }) {
|
|
8851
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
8852
|
+
className: "rb-event-price-options",
|
|
8853
|
+
"data-described": options.some((option) => option.description) ? "" : void 0,
|
|
8854
|
+
children: options.map((option) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsxs("span", { children: [
|
|
8855
|
+
/* @__PURE__ */ jsx("strong", { children: option.price }),
|
|
8856
|
+
" ",
|
|
8857
|
+
option.name
|
|
8858
|
+
] }), option.description ? /* @__PURE__ */ jsx("span", {
|
|
8859
|
+
className: "rb-caption rb-event-fact-muted",
|
|
8860
|
+
children: option.description
|
|
8861
|
+
}) : null] }, option.id))
|
|
8862
|
+
});
|
|
8863
|
+
}
|
|
8864
|
+
const sentence = (text) => `${text.charAt(0).toUpperCase()}${text.slice(1)}`;
|
|
8865
|
+
function EventPriceSummaryLines({ summary }) {
|
|
8866
|
+
if (summary.kind === "price") return /* @__PURE__ */ jsx(PriceLine, {
|
|
8867
|
+
price: summary.price,
|
|
8868
|
+
depositNote: summary.depositNote
|
|
8869
|
+
});
|
|
8870
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8871
|
+
summary.range ? /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: summary.range }) }) : null,
|
|
8872
|
+
/* @__PURE__ */ jsx(PriceOptionList, { options: summary.options }),
|
|
8873
|
+
summary.depositNote ? /* @__PURE__ */ jsxs("p", {
|
|
8874
|
+
className: "rb-caption rb-event-fact-muted",
|
|
8875
|
+
children: [sentence(summary.depositNote), "."]
|
|
8876
|
+
}) : null
|
|
8877
|
+
] });
|
|
8634
8878
|
}
|
|
8635
8879
|
//#endregion
|
|
8636
8880
|
//#region ../blocks/src/system/runtime/nodes/event-details/view.tsx
|
|
@@ -8649,111 +8893,115 @@ function TeamMemberName({ name, profilePath }) {
|
|
|
8649
8893
|
function formatTicketTypePrice(ticketType, currency) {
|
|
8650
8894
|
return formatBookingPriceDisplay(resolveExactOrFreePriceDisplay(ticketType.priceAmount, currency), { decimals: "auto" });
|
|
8651
8895
|
}
|
|
8896
|
+
/** A room's prices depend on the room, so the booking form shows them with it, not the price list. */
|
|
8897
|
+
const roomPriceIdsOf = (event) => event.rooms?.linkedOptionIds ?? [];
|
|
8898
|
+
/** With a room's prices left out of the list, the range line stays to say how far prices go. */
|
|
8899
|
+
const hasRoomPrices = (event) => event.pricing.kind === "tiered" && event.pricing.options.some((option) => roomPriceIdsOf(event).includes(option.id));
|
|
8652
8900
|
function getDisplayablePricingOptions(event) {
|
|
8653
|
-
const roomPriceIds = event
|
|
8901
|
+
const roomPriceIds = roomPriceIdsOf(event);
|
|
8654
8902
|
return event.pricing.kind === "tiered" ? event.pricing.options.filter(isPublicEventPricingOptionDisplayable).filter((option) => !roomPriceIds.includes(option.id)).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
8655
8903
|
}
|
|
8656
|
-
function
|
|
8657
|
-
|
|
8658
|
-
return
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8904
|
+
function ticketPriceSummary(pricing, price) {
|
|
8905
|
+
const currency = pricing.eventPricingCurrency;
|
|
8906
|
+
return decideEventPriceSummary({
|
|
8907
|
+
price,
|
|
8908
|
+
options: currency ? pricing.ticketTypes.map((ticketType) => ({
|
|
8909
|
+
id: ticketType.id,
|
|
8910
|
+
name: ticketType.name,
|
|
8911
|
+
description: ticketType.description,
|
|
8912
|
+
price: formatTicketTypePrice(ticketType, currency)
|
|
8913
|
+
})) : [],
|
|
8914
|
+
depositNote: pricing.depositNote,
|
|
8915
|
+
optionsCoverEveryPrice: pricing.ticketsCoverEveryPrice
|
|
8916
|
+
});
|
|
8917
|
+
}
|
|
8918
|
+
function AcceptedItemsLine({ acceptedItems }) {
|
|
8919
|
+
return acceptedItems.length > 0 ? /* @__PURE__ */ jsxs("p", {
|
|
8920
|
+
className: "rb-caption",
|
|
8921
|
+
children: ["You can also attend with: ", acceptedItems.join(", ")]
|
|
8922
|
+
}) : null;
|
|
8668
8923
|
}
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8924
|
+
/** The price row, in whichever form this event's pricing takes. */
|
|
8925
|
+
function EventPricingDetails(props) {
|
|
8926
|
+
const { acceptedItems, slots } = props;
|
|
8927
|
+
if (props.isDropIn) return /* @__PURE__ */ jsx(EventFactRow, {
|
|
8928
|
+
slots,
|
|
8929
|
+
fact: "registration",
|
|
8930
|
+
label: "Registration",
|
|
8931
|
+
icon: TicketIcon,
|
|
8932
|
+
children: /* @__PURE__ */ jsx("p", { children: "No registration required - just show up" })
|
|
8933
|
+
});
|
|
8934
|
+
if (props.wholeSeriesPricingDisplay) return /* @__PURE__ */ jsxs(EventFactRow, {
|
|
8935
|
+
slots,
|
|
8936
|
+
fact: "price",
|
|
8937
|
+
label: "Cost",
|
|
8938
|
+
icon: TicketIcon,
|
|
8939
|
+
children: [/* @__PURE__ */ jsx(EventPriceSummaryLines, { summary: wholeSeriesPriceSummary(props.wholeSeriesPricingDisplay, props.depositNote) }), /* @__PURE__ */ jsx(AcceptedItemsLine, { acceptedItems })]
|
|
8940
|
+
});
|
|
8941
|
+
if (props.eventCostLabel) return /* @__PURE__ */ jsxs(EventFactRow, {
|
|
8942
|
+
slots,
|
|
8943
|
+
fact: "price",
|
|
8944
|
+
label: "Cost",
|
|
8945
|
+
icon: TicketIcon,
|
|
8687
8946
|
children: [
|
|
8688
|
-
/* @__PURE__ */ jsx(
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
/* @__PURE__ */ jsx(PriceLine, {
|
|
8693
|
-
price: eventCostLabel,
|
|
8694
|
-
depositNote
|
|
8695
|
-
}),
|
|
8696
|
-
autoApplyDiscount && eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
|
|
8697
|
-
className: "rb-caption rb-mt-1",
|
|
8698
|
-
children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency)
|
|
8699
|
-
}) : null,
|
|
8700
|
-
eventPricingCurrency && ticketTypes.length > 1 ? /* @__PURE__ */ jsx(TicketTypePriceList, {
|
|
8701
|
-
ticketTypes,
|
|
8702
|
-
currency: eventPricingCurrency
|
|
8947
|
+
/* @__PURE__ */ jsx(EventPriceSummaryLines, { summary: ticketPriceSummary(props, props.eventCostLabel) }),
|
|
8948
|
+
props.autoApplyDiscount && props.eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
|
|
8949
|
+
className: "rb-caption",
|
|
8950
|
+
children: formatAutoApplyDiscountLine(props.autoApplyDiscount, props.eventPricingCurrency)
|
|
8703
8951
|
}) : null,
|
|
8704
|
-
|
|
8705
|
-
className: "rb-caption rb-mt-1",
|
|
8706
|
-
children: ["You can also attend with: ", acceptedItems.join(", ")]
|
|
8707
|
-
}) : null
|
|
8952
|
+
/* @__PURE__ */ jsx(AcceptedItemsLine, { acceptedItems })
|
|
8708
8953
|
]
|
|
8709
8954
|
});
|
|
8710
|
-
return acceptedItems.length > 0 ? /* @__PURE__ */ jsx(
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
})
|
|
8955
|
+
return acceptedItems.length > 0 ? /* @__PURE__ */ jsx(EventFactRow, {
|
|
8956
|
+
slots,
|
|
8957
|
+
fact: "accepted",
|
|
8958
|
+
label: "Passes and memberships",
|
|
8959
|
+
icon: TicketIcon,
|
|
8960
|
+
children: /* @__PURE__ */ jsx(AcceptedItemsLine, { acceptedItems })
|
|
8716
8961
|
}) : null;
|
|
8717
8962
|
}
|
|
8718
|
-
function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots }) {
|
|
8963
|
+
function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots, slots }) {
|
|
8719
8964
|
const { date, timeRange } = formatEventDateParts({
|
|
8720
8965
|
startsAt: selected.startsAt,
|
|
8721
8966
|
endsAt: selected.endsAt,
|
|
8722
8967
|
...eventDateOptions(selected)
|
|
8723
8968
|
});
|
|
8724
8969
|
const dateHeading = selection.kind === "wholeSeries" ? runLifecycleLabel(selection.lifecycle) : selection.mode === "next" ? "Next date" : "Date";
|
|
8725
|
-
return /* @__PURE__ */ jsxs(
|
|
8726
|
-
|
|
8727
|
-
className: "rb-flex rb-flex-col rb-gap-4",
|
|
8970
|
+
return /* @__PURE__ */ jsxs(EventFactList, {
|
|
8971
|
+
slot: listLookSlot({ lookSlots }, "facts"),
|
|
8728
8972
|
children: [
|
|
8729
|
-
/* @__PURE__ */ jsxs(
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
|
|
8735
|
-
|
|
8736
|
-
className: "rb-caption",
|
|
8973
|
+
/* @__PURE__ */ jsxs(EventFactRow, {
|
|
8974
|
+
slots,
|
|
8975
|
+
fact: "date",
|
|
8976
|
+
label: dateHeading,
|
|
8977
|
+
icon: CalendarIcon$1,
|
|
8978
|
+
children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }), /* @__PURE__ */ jsx("p", {
|
|
8979
|
+
className: "rb-event-fact-muted",
|
|
8737
8980
|
children: timeRange
|
|
8738
|
-
})
|
|
8739
|
-
|
|
8981
|
+
})]
|
|
8982
|
+
}),
|
|
8740
8983
|
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
8741
8984
|
venue,
|
|
8742
8985
|
online,
|
|
8743
|
-
addressAfterBooking
|
|
8986
|
+
addressAfterBooking,
|
|
8987
|
+
slots
|
|
8744
8988
|
}),
|
|
8745
|
-
/* @__PURE__ */ jsx(EventTeacherFacts, {
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8989
|
+
/* @__PURE__ */ jsx(EventTeacherFacts, {
|
|
8990
|
+
teamMembers,
|
|
8991
|
+
slots
|
|
8992
|
+
}),
|
|
8993
|
+
showCapacity && selected.capacity != null ? /* @__PURE__ */ jsx(EventFactRow, {
|
|
8994
|
+
slots,
|
|
8995
|
+
fact: "places",
|
|
8996
|
+
label: "Places",
|
|
8997
|
+
icon: UsersIcon,
|
|
8998
|
+
children: /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })
|
|
8752
8999
|
}) : null,
|
|
8753
9000
|
pricing,
|
|
8754
9001
|
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
8755
9002
|
phase: selection.bookingPhase,
|
|
8756
|
-
event: selected
|
|
9003
|
+
event: selected,
|
|
9004
|
+
slots
|
|
8757
9005
|
}) : null
|
|
8758
9006
|
]
|
|
8759
9007
|
});
|
|
@@ -8762,84 +9010,80 @@ const eventOnlinePlaceShown = (event, showVenue) => showVenue ? eventOnlinePlace
|
|
|
8762
9010
|
const hasEventPlaceFact = (event, showVenue) => showVenue && (Boolean(event.venue) || eventOnlinePlace(event) !== null || event.addressAfterBooking === true);
|
|
8763
9011
|
const addressAfterBookingShown = (event, showVenue) => showVenue && event.addressAfterBooking === true;
|
|
8764
9012
|
/** Where a venue would go: online, the owner's word that the address follows the booking, or nothing at all. */
|
|
8765
|
-
function EventPlaceWithoutVenue({ online, addressAfterBooking }) {
|
|
9013
|
+
function EventPlaceWithoutVenue({ online, addressAfterBooking, slots }) {
|
|
8766
9014
|
if (!online && !addressAfterBooking) return null;
|
|
8767
|
-
if (!online) return /* @__PURE__ */
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
});
|
|
8774
|
-
return /* @__PURE__ */ jsxs(
|
|
8775
|
-
|
|
9015
|
+
if (!online) return /* @__PURE__ */ jsx(EventFactRow, {
|
|
9016
|
+
slots,
|
|
9017
|
+
fact: "venue",
|
|
9018
|
+
label: "Venue",
|
|
9019
|
+
icon: MapPinIcon$1,
|
|
9020
|
+
children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: EVENT_ADDRESS_AFTER_BOOKING_LABEL }) })
|
|
9021
|
+
});
|
|
9022
|
+
return /* @__PURE__ */ jsxs(EventFactRow, {
|
|
9023
|
+
slots,
|
|
9024
|
+
fact: "venue",
|
|
9025
|
+
label: "Venue",
|
|
9026
|
+
icon: GlobeIcon,
|
|
8776
9027
|
children: [
|
|
8777
|
-
/* @__PURE__ */ jsx("div", {
|
|
8778
|
-
className: "rb-label rb-mb-2",
|
|
8779
|
-
children: "Venue"
|
|
8780
|
-
}),
|
|
8781
9028
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: online.mode === "online" ? "Online" : "In person or online" }) }),
|
|
8782
9029
|
addressAfterBooking ? /* @__PURE__ */ jsxs("p", {
|
|
8783
|
-
className: "rb-caption",
|
|
9030
|
+
className: "rb-caption rb-event-fact-muted",
|
|
8784
9031
|
children: [EVENT_ADDRESS_AFTER_BOOKING_LABEL, "."]
|
|
8785
9032
|
}) : null,
|
|
8786
9033
|
online.note ? /* @__PURE__ */ jsx("p", {
|
|
8787
|
-
className: "rb-caption",
|
|
9034
|
+
className: "rb-caption rb-event-fact-muted",
|
|
8788
9035
|
children: online.note
|
|
8789
9036
|
}) : null
|
|
8790
9037
|
]
|
|
8791
9038
|
});
|
|
8792
9039
|
}
|
|
8793
9040
|
/** An online event says so where a venue would go; a hybrid one adds it under the venue. */
|
|
8794
|
-
function EventVenueFact({ venue, online, addressAfterBooking }) {
|
|
9041
|
+
function EventVenueFact({ venue, online, addressAfterBooking, slots }) {
|
|
8795
9042
|
if (!venue) return /* @__PURE__ */ jsx(EventPlaceWithoutVenue, {
|
|
8796
9043
|
online,
|
|
8797
|
-
addressAfterBooking
|
|
9044
|
+
addressAfterBooking,
|
|
9045
|
+
slots
|
|
8798
9046
|
});
|
|
8799
9047
|
const { place, addressWithBooking } = eventVenuePlace(venue);
|
|
8800
|
-
return /* @__PURE__ */ jsxs(
|
|
8801
|
-
|
|
9048
|
+
return /* @__PURE__ */ jsxs(EventFactRow, {
|
|
9049
|
+
slots,
|
|
9050
|
+
fact: "venue",
|
|
9051
|
+
label: "Venue",
|
|
9052
|
+
icon: MapPinIcon$1,
|
|
8802
9053
|
children: [
|
|
8803
|
-
/* @__PURE__ */ jsx("
|
|
8804
|
-
className: "rb-label rb-mb-2",
|
|
8805
|
-
children: "Venue"
|
|
8806
|
-
}),
|
|
8807
|
-
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: venue.name }) }),
|
|
8808
|
-
place ? /* @__PURE__ */ jsx("p", {
|
|
8809
|
-
className: "rb-caption",
|
|
8810
|
-
children: place
|
|
8811
|
-
}) : null,
|
|
9054
|
+
/* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: venue.name }), place ? `, ${place}` : null] }),
|
|
8812
9055
|
addressWithBooking ? /* @__PURE__ */ jsx("p", {
|
|
8813
|
-
className: "rb-caption rb-
|
|
9056
|
+
className: "rb-caption rb-event-fact-muted",
|
|
8814
9057
|
children: "The full address and directions come with your booking confirmation."
|
|
8815
9058
|
}) : /* @__PURE__ */ jsx(LocationMapActions, {
|
|
8816
9059
|
location: venue.location,
|
|
8817
9060
|
addressText: venue.address
|
|
8818
9061
|
}),
|
|
8819
9062
|
online ? /* @__PURE__ */ jsxs("p", {
|
|
8820
|
-
className: "rb-caption rb-
|
|
9063
|
+
className: "rb-caption rb-event-fact-muted",
|
|
8821
9064
|
children: ["You can also join online.", online.note ? ` ${online.note}` : ""]
|
|
8822
9065
|
}) : null
|
|
8823
9066
|
]
|
|
8824
9067
|
});
|
|
8825
9068
|
}
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
9069
|
+
/** "With Alice", "With Alice and Ben", "With Alice, Ben and Cara". */
|
|
9070
|
+
const nameSeparator = (index, count) => index === 0 ? "" : index === count - 1 ? " and " : ", ";
|
|
9071
|
+
function EventTeacherFacts({ teamMembers, slots }) {
|
|
9072
|
+
if (teamMembers.length === 0) return null;
|
|
9073
|
+
const described = teamMembers.filter((member) => member.summary);
|
|
9074
|
+
return /* @__PURE__ */ jsxs(EventFactRow, {
|
|
9075
|
+
slots,
|
|
9076
|
+
fact: "team",
|
|
9077
|
+
label: "With",
|
|
9078
|
+
icon: UserIcon,
|
|
9079
|
+
children: [/* @__PURE__ */ jsxs("p", { children: ["With ", teamMembers.map((member, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [nameSeparator(index, teamMembers.length), /* @__PURE__ */ jsx(TeamMemberName, {
|
|
9080
|
+
name: member.name,
|
|
9081
|
+
profilePath: member.profilePath
|
|
9082
|
+
})] }, member.id))] }), described.map((member) => /* @__PURE__ */ jsxs("p", {
|
|
9083
|
+
className: "rb-caption rb-event-fact-muted",
|
|
9084
|
+
children: [teamMembers.length > 1 ? `${member.name}: ` : null, member.summary]
|
|
9085
|
+
}, member.id))]
|
|
9086
|
+
});
|
|
8843
9087
|
}
|
|
8844
9088
|
/**
|
|
8845
9089
|
* Where the run has got to, in the words a visitor would use.
|
|
@@ -8863,20 +9107,16 @@ function runLifecycleLabel(lifecycle) {
|
|
|
8863
9107
|
* the booking panel beside it says cancelled is the contradiction a visitor
|
|
8864
9108
|
* actually notices.
|
|
8865
9109
|
*/
|
|
8866
|
-
function BookingState({ phase, event }) {
|
|
8867
|
-
return /* @__PURE__ */ jsxs(
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
className: "rb-caption",
|
|
8877
|
-
children: bookingClosedReason(phase.reason)
|
|
8878
|
-
}) : null
|
|
8879
|
-
]
|
|
9110
|
+
function BookingState({ phase, event, slots }) {
|
|
9111
|
+
return /* @__PURE__ */ jsxs(EventFactRow, {
|
|
9112
|
+
slots,
|
|
9113
|
+
fact: "booking",
|
|
9114
|
+
label: "Booking",
|
|
9115
|
+
icon: InfoIcon,
|
|
9116
|
+
children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }), phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
|
|
9117
|
+
className: "rb-caption rb-event-fact-muted",
|
|
9118
|
+
children: bookingClosedReason(phase.reason)
|
|
9119
|
+
}) : null]
|
|
8880
9120
|
});
|
|
8881
9121
|
}
|
|
8882
9122
|
function bookingClosedReason(reason) {
|
|
@@ -8897,16 +9137,19 @@ function bookingClosedReason(reason) {
|
|
|
8897
9137
|
* the list and says so: dropping it would leave a visitor wondering whether
|
|
8898
9138
|
* they had misremembered the dates.
|
|
8899
9139
|
*/
|
|
8900
|
-
function SessionSchedule({ sessions, event }) {
|
|
9140
|
+
function SessionSchedule({ sessions, event, slots }) {
|
|
8901
9141
|
if (sessions.length === 0) return null;
|
|
8902
9142
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
9143
|
+
...slots.label,
|
|
8903
9144
|
className: "rb-label",
|
|
8904
9145
|
children: "Session schedule"
|
|
8905
9146
|
}), /* @__PURE__ */ jsx("div", {
|
|
9147
|
+
...slots.sessions,
|
|
8906
9148
|
className: "rb-mt-2 rb-tiles-grid",
|
|
8907
9149
|
children: sessions.map((session) => {
|
|
8908
9150
|
const cancelled = session.status === CANCELLED_SESSION_STATUS;
|
|
8909
9151
|
return /* @__PURE__ */ jsxs("div", {
|
|
9152
|
+
...slots.session,
|
|
8910
9153
|
className: `rb-tile${cancelled ? " rb-tile--cancelled" : ""}`,
|
|
8911
9154
|
children: [/* @__PURE__ */ jsx(DateTimeTile, {
|
|
8912
9155
|
startsAt: session.startsAt,
|
|
@@ -8923,20 +9166,24 @@ function SessionSchedule({ sessions, event }) {
|
|
|
8923
9166
|
})
|
|
8924
9167
|
})] });
|
|
8925
9168
|
}
|
|
8926
|
-
function OtherEventDates({ selection }) {
|
|
9169
|
+
function OtherEventDates({ selection, slots }) {
|
|
8927
9170
|
if (selection.kind === "empty") return null;
|
|
8928
9171
|
if (selection.kind === "wholeSeries") return /* @__PURE__ */ jsx(SessionSchedule, {
|
|
8929
9172
|
sessions: selection.sessions,
|
|
8930
|
-
event: selection.selected
|
|
9173
|
+
event: selection.selected,
|
|
9174
|
+
slots
|
|
8931
9175
|
});
|
|
8932
9176
|
const dates = selection.otherDates;
|
|
8933
9177
|
if (dates.length === 0) return null;
|
|
8934
9178
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
9179
|
+
...slots.label,
|
|
8935
9180
|
className: "rb-label",
|
|
8936
9181
|
children: "Other dates"
|
|
8937
9182
|
}), /* @__PURE__ */ jsx("div", {
|
|
9183
|
+
...slots.sessions,
|
|
8938
9184
|
className: "rb-mt-2 rb-tiles-grid",
|
|
8939
9185
|
children: dates.map((event) => /* @__PURE__ */ jsx("a", {
|
|
9186
|
+
...slots.session,
|
|
8940
9187
|
className: "rb-tile rb-tile--interactive",
|
|
8941
9188
|
...resolveEventPageLink(event),
|
|
8942
9189
|
children: /* @__PURE__ */ jsx(DateTimeTile, {
|
|
@@ -8982,7 +9229,8 @@ function selectedEventPricing(selection, showCost) {
|
|
|
8982
9229
|
eventCostLabel: showEventCost ? formatEventPrice(event) : null,
|
|
8983
9230
|
depositNote: showCost && !isDropIn && isPaid(event) ? formatEventDepositNote(selection.depositOffer) : null,
|
|
8984
9231
|
eventPricingCurrency: publicEventPricingCurrency(event.pricing),
|
|
8985
|
-
ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
|
|
9232
|
+
ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : [],
|
|
9233
|
+
ticketsCoverEveryPrice: !hasRoomPrices(event)
|
|
8986
9234
|
};
|
|
8987
9235
|
}
|
|
8988
9236
|
const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
|
|
@@ -9007,6 +9255,7 @@ function SelectedEventDetailsView(props) {
|
|
|
9007
9255
|
className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
|
|
9008
9256
|
children: [/* @__PURE__ */ jsx(EventFacts, {
|
|
9009
9257
|
lookSlots: props.lookSlots,
|
|
9258
|
+
slots: props.slots,
|
|
9010
9259
|
selection,
|
|
9011
9260
|
selected,
|
|
9012
9261
|
venue,
|
|
@@ -9017,7 +9266,8 @@ function SelectedEventDetailsView(props) {
|
|
|
9017
9266
|
pricing: /* @__PURE__ */ jsx(EventPricingDetails, {
|
|
9018
9267
|
...pricing,
|
|
9019
9268
|
acceptedItems,
|
|
9020
|
-
autoApplyDiscount: props.autoApplyDiscount ?? null
|
|
9269
|
+
autoApplyDiscount: props.autoApplyDiscount ?? null,
|
|
9270
|
+
slots: props.slots
|
|
9021
9271
|
})
|
|
9022
9272
|
}), /* @__PURE__ */ jsx(EventVenueMap, {
|
|
9023
9273
|
venue,
|
|
@@ -9027,7 +9277,10 @@ function SelectedEventDetailsView(props) {
|
|
|
9027
9277
|
drawing: props.selectedVenueDrawing
|
|
9028
9278
|
})]
|
|
9029
9279
|
}),
|
|
9030
|
-
showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, {
|
|
9280
|
+
showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, {
|
|
9281
|
+
selection,
|
|
9282
|
+
slots: props.slots
|
|
9283
|
+
}) : null
|
|
9031
9284
|
]
|
|
9032
9285
|
});
|
|
9033
9286
|
}
|
|
@@ -9038,6 +9291,7 @@ function LegacyEventDetailsView(props) {
|
|
|
9038
9291
|
});
|
|
9039
9292
|
return /* @__PURE__ */ jsx(SelectedEventDetailsView, {
|
|
9040
9293
|
lookSlots: props.lookSlots,
|
|
9294
|
+
slots: resolveDetailSlots(props),
|
|
9041
9295
|
selection: props.selection,
|
|
9042
9296
|
showVenue: props.showVenue,
|
|
9043
9297
|
showMap: props.showMap,
|
|
@@ -9087,36 +9341,47 @@ function EventDetailsView(input) {
|
|
|
9087
9341
|
function EventHeaderPanel(props) {
|
|
9088
9342
|
const content = headerPanelContent(props);
|
|
9089
9343
|
if (!content.hasFacts && !content.hasMap && !content.hasDates) return null;
|
|
9344
|
+
const slots = resolveDetailSlots(props);
|
|
9090
9345
|
return /* @__PURE__ */ jsx("div", {
|
|
9091
9346
|
...listLookSlot(props, "panel"),
|
|
9092
9347
|
children: /* @__PURE__ */ jsxs("div", {
|
|
9093
9348
|
className: "rb-flex rb-flex-col rb-gap-6 rb-text-left",
|
|
9094
9349
|
children: [content.hasFacts || content.hasMap ? /* @__PURE__ */ jsxs("div", {
|
|
9095
9350
|
className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
|
|
9096
|
-
children: [content.hasFacts ? /* @__PURE__ */ jsx(HeaderPanelFacts, {
|
|
9351
|
+
children: [content.hasFacts ? /* @__PURE__ */ jsx(HeaderPanelFacts, {
|
|
9352
|
+
...content,
|
|
9353
|
+
slots
|
|
9354
|
+
}) : null, /* @__PURE__ */ jsx(EventVenueMap, {
|
|
9097
9355
|
venue: content.venue,
|
|
9098
9356
|
showMap: props.showMap,
|
|
9099
9357
|
drawing: props.selectedVenueDrawing,
|
|
9100
9358
|
mapHeight: props.mapHeight ?? 200,
|
|
9101
9359
|
mapClassName: props.mapClassName ?? "event-details-map"
|
|
9102
9360
|
})]
|
|
9103
|
-
}) : null, content.hasDates ? /* @__PURE__ */ jsx(OtherEventDates, {
|
|
9361
|
+
}) : null, content.hasDates ? /* @__PURE__ */ jsx(OtherEventDates, {
|
|
9362
|
+
selection: props.selection,
|
|
9363
|
+
slots
|
|
9364
|
+
}) : null]
|
|
9104
9365
|
})
|
|
9105
9366
|
});
|
|
9106
9367
|
}
|
|
9107
|
-
function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing }) {
|
|
9108
|
-
return /* @__PURE__ */ jsxs(
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9368
|
+
function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing, slots }) {
|
|
9369
|
+
return /* @__PURE__ */ jsxs(EventFactList, { children: [
|
|
9370
|
+
/* @__PURE__ */ jsx(EventVenueFact, {
|
|
9371
|
+
venue,
|
|
9372
|
+
online,
|
|
9373
|
+
addressAfterBooking,
|
|
9374
|
+
slots
|
|
9375
|
+
}),
|
|
9376
|
+
/* @__PURE__ */ jsx(EventTeacherFacts, {
|
|
9377
|
+
teamMembers,
|
|
9378
|
+
slots
|
|
9379
|
+
}),
|
|
9380
|
+
pricing ? /* @__PURE__ */ jsx(EventPricingDetails, {
|
|
9381
|
+
...pricing,
|
|
9382
|
+
slots
|
|
9383
|
+
}) : null
|
|
9384
|
+
] });
|
|
9120
9385
|
}
|
|
9121
9386
|
/** What the panel has to add to the header, decided once. */
|
|
9122
9387
|
function headerPanelContent(props) {
|
|
@@ -10373,8 +10638,8 @@ function buildSlotCtaLabel(ctaText, slot) {
|
|
|
10373
10638
|
}
|
|
10374
10639
|
function WeeklySlotAvailabilityView({ availability, loading = false, error, emptyMessage, ctaText, ctaUrl }) {
|
|
10375
10640
|
const slots = availability?.slots ?? [];
|
|
10376
|
-
const resolvedEmptyMessage = emptyMessage
|
|
10377
|
-
const resolvedCtaText = ctaText
|
|
10641
|
+
const resolvedEmptyMessage = emptyMessage?.trim() || "No regular weekly openings are currently available.";
|
|
10642
|
+
const resolvedCtaText = ctaText?.trim() || "Enquire about this slot";
|
|
10378
10643
|
const resolvedCtaUrl = typeof ctaUrl === "string" ? ctaUrl.trim() : "";
|
|
10379
10644
|
return /* @__PURE__ */ jsxs("div", {
|
|
10380
10645
|
className: "weekly-slot-availability",
|
|
@@ -10538,6 +10803,11 @@ function RecurringScheduleRow({ item, locale, buttonText, buttonVariant, showVen
|
|
|
10538
10803
|
});
|
|
10539
10804
|
}
|
|
10540
10805
|
//#endregion
|
|
10806
|
+
//#region ../blocks/src/system/runtime/editorParts.ts
|
|
10807
|
+
const unmarked = {};
|
|
10808
|
+
/** Visitors' pages, and any renderer the editor doesn't drive. */
|
|
10809
|
+
const noEditorParts = () => unmarked;
|
|
10810
|
+
//#endregion
|
|
10541
10811
|
//#region ../blocks/src/system/runtime/nodes/commerce/shared/view.tsx
|
|
10542
10812
|
function VariantSelectView(props) {
|
|
10543
10813
|
const { options, selectedVariantId, disabled = false, onChange } = props;
|
|
@@ -10786,9 +11056,10 @@ function MembershipCardView(props) {
|
|
|
10786
11056
|
});
|
|
10787
11057
|
}
|
|
10788
11058
|
function PassesMembershipsSectionView(props) {
|
|
10789
|
-
const { display, beforeContent, passCards, membershipCards } = props;
|
|
11059
|
+
const { display, beforeContent, passCards, membershipCards, part = noEditorParts } = props;
|
|
10790
11060
|
if (props.presentation?.lookSlots) return /* @__PURE__ */ jsx(ShopCardListSections, {
|
|
10791
11061
|
...props,
|
|
11062
|
+
part,
|
|
10792
11063
|
presentation: props.presentation
|
|
10793
11064
|
});
|
|
10794
11065
|
const productsClass = `shop__products shop__products--${display.layout}`;
|
|
@@ -10808,6 +11079,7 @@ function PassesMembershipsSectionView(props) {
|
|
|
10808
11079
|
className: "shop__section shop__section--passes",
|
|
10809
11080
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
10810
11081
|
className: "shop__section-heading",
|
|
11082
|
+
...part("passesHeading"),
|
|
10811
11083
|
children: display.passesHeading
|
|
10812
11084
|
}), /* @__PURE__ */ jsx("div", {
|
|
10813
11085
|
className: productsClass,
|
|
@@ -10818,6 +11090,7 @@ function PassesMembershipsSectionView(props) {
|
|
|
10818
11090
|
className: "shop__section shop__section--memberships",
|
|
10819
11091
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
10820
11092
|
className: "shop__section-heading",
|
|
11093
|
+
...part("membershipsHeading"),
|
|
10821
11094
|
children: display.membershipsHeading
|
|
10822
11095
|
}), /* @__PURE__ */ jsx("div", {
|
|
10823
11096
|
className: productsClass,
|
|
@@ -10885,13 +11158,15 @@ function CheckoutShellView(props) {
|
|
|
10885
11158
|
});
|
|
10886
11159
|
}
|
|
10887
11160
|
function ShopCardListSections(props) {
|
|
10888
|
-
const { display, presentation } = props;
|
|
11161
|
+
const { display, presentation, part } = props;
|
|
10889
11162
|
const groups = [{
|
|
10890
11163
|
heading: display.passesHeading,
|
|
11164
|
+
headingPart: part("passesHeading"),
|
|
10891
11165
|
items: display.passes,
|
|
10892
11166
|
cards: props.passCards
|
|
10893
11167
|
}, {
|
|
10894
11168
|
heading: display.membershipsHeading,
|
|
11169
|
+
headingPart: part("membershipsHeading"),
|
|
10895
11170
|
items: display.memberships,
|
|
10896
11171
|
cards: props.membershipCards
|
|
10897
11172
|
}];
|
|
@@ -10906,6 +11181,7 @@ function ShopCardListSections(props) {
|
|
|
10906
11181
|
...listLookSlot(presentation, "group"),
|
|
10907
11182
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
10908
11183
|
...listLookSlot(presentation, "group-label"),
|
|
11184
|
+
...group.headingPart,
|
|
10909
11185
|
children: group.heading
|
|
10910
11186
|
}), /* @__PURE__ */ jsx(ShopCardListCollection, {
|
|
10911
11187
|
presentation,
|
|
@@ -10932,14 +11208,18 @@ function ShopCardListCollection(props) {
|
|
|
10932
11208
|
}))
|
|
10933
11209
|
});
|
|
10934
11210
|
}
|
|
10935
|
-
function ShopPurchaseAction({ presentation, ...props }) {
|
|
10936
|
-
if (presentation?.itemActionStyle !== "link") return /* @__PURE__ */ jsx(ThemedButton, {
|
|
11211
|
+
function ShopPurchaseAction({ presentation, editorPart, ...props }) {
|
|
11212
|
+
if (presentation?.itemActionStyle !== "link") return /* @__PURE__ */ jsx(ThemedButton, {
|
|
11213
|
+
...props,
|
|
11214
|
+
...editorPart
|
|
11215
|
+
});
|
|
10937
11216
|
return /* @__PURE__ */ jsx("button", {
|
|
10938
11217
|
type: "button",
|
|
10939
11218
|
className: "rb-item-text-link",
|
|
10940
11219
|
onClick: props.onClick,
|
|
10941
11220
|
disabled: props.disabled,
|
|
10942
11221
|
"aria-disabled": props["aria-disabled"],
|
|
11222
|
+
...editorPart,
|
|
10943
11223
|
children: props.label
|
|
10944
11224
|
});
|
|
10945
11225
|
}
|
|
@@ -11060,79 +11340,78 @@ function CheckoutSSR({ blockId, siteId, apiBaseUrl, stage, demoEmailSuppressed,
|
|
|
11060
11340
|
//#endregion
|
|
11061
11341
|
//#region ../blocks/src/system/runtime/nodes/gifting.parts.tsx
|
|
11062
11342
|
const CUSTOM_GIFT_AMOUNT = "custom";
|
|
11343
|
+
/**
|
|
11344
|
+
* What the panel says with no offers to show. Visitors only see it if the
|
|
11345
|
+
* offers couldn't be read: with nothing on offer the block stays hidden.
|
|
11346
|
+
*/
|
|
11347
|
+
const GIFTING_NOTHING_TO_SHOW = "Nothing is available right now.";
|
|
11063
11348
|
/** A Look's hook (and, for the panel, its surface) on one part of the gifting panel; nothing outside a Look. */
|
|
11064
11349
|
function giftingSlot(look, slot) {
|
|
11065
11350
|
return listLookSlot(look ?? {}, slot);
|
|
11066
11351
|
}
|
|
11067
|
-
/** The word above the heading: only one kind on offer names it here, two kinds label their own groups. */
|
|
11068
|
-
function giftingEyebrow(offers, headings) {
|
|
11069
|
-
const giftCards = offers?.giftCards.length ?? 0;
|
|
11070
|
-
const vouchers = offers?.vouchers.length ?? 0;
|
|
11071
|
-
if (giftCards > 0 && vouchers === 0) return headings.giftCards;
|
|
11072
|
-
if (vouchers > 0 && giftCards === 0) return headings.vouchers;
|
|
11073
|
-
return null;
|
|
11074
|
-
}
|
|
11075
11352
|
function GiftingPanelHead(props) {
|
|
11076
11353
|
const { look } = props;
|
|
11077
11354
|
return /* @__PURE__ */ jsxs("div", {
|
|
11078
11355
|
className: "gifting-panel-head",
|
|
11079
11356
|
...giftingSlot(look, "head"),
|
|
11080
|
-
children: [
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
children: props.heading
|
|
11090
|
-
}),
|
|
11091
|
-
props.intro ? /* @__PURE__ */ jsx("p", {
|
|
11092
|
-
className: "gifting-intro",
|
|
11093
|
-
...giftingSlot(look, "intro"),
|
|
11094
|
-
children: props.intro
|
|
11095
|
-
}) : null
|
|
11096
|
-
]
|
|
11357
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
11358
|
+
className: "gifting-heading",
|
|
11359
|
+
...giftingSlot(look, "heading"),
|
|
11360
|
+
children: props.heading
|
|
11361
|
+
}), props.intro ? /* @__PURE__ */ jsx("p", {
|
|
11362
|
+
className: "gifting-intro",
|
|
11363
|
+
...giftingSlot(look, "intro"),
|
|
11364
|
+
children: props.intro
|
|
11365
|
+
}) : null]
|
|
11097
11366
|
});
|
|
11098
11367
|
}
|
|
11099
11368
|
/** Amount buttons are radios, so they keep working from the keyboard and post with the form. */
|
|
11100
11369
|
function GiftCardAmounts(props) {
|
|
11101
11370
|
const { offer, currency, disabled, onChoose } = props;
|
|
11102
|
-
const
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
required: true,
|
|
11111
|
-
disabled,
|
|
11112
|
-
defaultChecked: value === checkedChoice,
|
|
11113
|
-
onChange: onChoose ? () => onChoose(value) : void 0
|
|
11114
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
11115
|
-
...giftingSlot(props.look, "chip"),
|
|
11116
|
-
children: label
|
|
11117
|
-
})]
|
|
11118
|
-
}, value);
|
|
11119
|
-
return /* @__PURE__ */ jsxs("fieldset", {
|
|
11371
|
+
const options = [...offer.giftCard.fixedDenominations.map((amount) => ({
|
|
11372
|
+
value: String(amount),
|
|
11373
|
+
label: formatGiftAmount(amount, currency)
|
|
11374
|
+
})), ...offer.giftCard.customAmountEnabled ? [{
|
|
11375
|
+
value: CUSTOM_GIFT_AMOUNT,
|
|
11376
|
+
label: "Another amount"
|
|
11377
|
+
}] : []];
|
|
11378
|
+
return /* @__PURE__ */ jsx(ChoiceGroup, {
|
|
11120
11379
|
className: "gifting-amounts",
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
]
|
|
11380
|
+
name: props.groupName ?? "amountChoice",
|
|
11381
|
+
legend: "Amount",
|
|
11382
|
+
legendHidden: true,
|
|
11383
|
+
options,
|
|
11384
|
+
defaultValue: props.initialChoice ?? firstGiftAmountChoice(offer),
|
|
11385
|
+
disabled,
|
|
11386
|
+
required: true,
|
|
11387
|
+
onChange: onChoose
|
|
11130
11388
|
});
|
|
11131
11389
|
}
|
|
11132
11390
|
function firstGiftAmountChoice(offer) {
|
|
11133
11391
|
const first = offer.giftCard.fixedDenominations[0];
|
|
11134
11392
|
return first === void 0 ? CUSTOM_GIFT_AMOUNT : String(first);
|
|
11135
11393
|
}
|
|
11394
|
+
function formatGiftAmount(amount, currency) {
|
|
11395
|
+
return formatCurrencyAmount(amount, currency, { decimals: "auto" });
|
|
11396
|
+
}
|
|
11397
|
+
/** Shared by first paint and the island; the resolved group carries all its copy. */
|
|
11398
|
+
function GiftGroup(props) {
|
|
11399
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11400
|
+
className: "gifting-group",
|
|
11401
|
+
"data-gift-kind": props.group.kind,
|
|
11402
|
+
...giftingSlot(props.look, "panel"),
|
|
11403
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
11404
|
+
className: "gifting-group-head",
|
|
11405
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
11406
|
+
className: "gifting-group-title",
|
|
11407
|
+
children: props.group.heading
|
|
11408
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
11409
|
+
className: "gifting-group-line",
|
|
11410
|
+
children: props.group.line
|
|
11411
|
+
})]
|
|
11412
|
+
}), props.children]
|
|
11413
|
+
});
|
|
11414
|
+
}
|
|
11136
11415
|
//#endregion
|
|
11137
11416
|
//#region ../blocks/src/system/runtime/nodes/gifting.server.tsx
|
|
11138
11417
|
/** What shows until the island takes over: the same panel, with the details form still closed. */
|
|
@@ -11143,10 +11422,6 @@ function GiftingSSR({ blockId, ...rest }) {
|
|
|
11143
11422
|
const giftCards = offers?.giftCards ?? [];
|
|
11144
11423
|
const vouchers = offers?.vouchers ?? [];
|
|
11145
11424
|
const hasOffers = giftCards.length > 0 || vouchers.length > 0;
|
|
11146
|
-
const eyebrow = giftingEyebrow(offers, {
|
|
11147
|
-
giftCards: display.giftCardsHeading,
|
|
11148
|
-
vouchers: display.vouchersHeading
|
|
11149
|
-
});
|
|
11150
11425
|
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
11151
11426
|
kind: "gifting",
|
|
11152
11427
|
id: blockId,
|
|
@@ -11157,69 +11432,88 @@ function GiftingSSR({ blockId, ...rest }) {
|
|
|
11157
11432
|
},
|
|
11158
11433
|
value: islandProps,
|
|
11159
11434
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11160
|
-
className: "gifting
|
|
11161
|
-
...
|
|
11435
|
+
className: "gifting",
|
|
11436
|
+
...display.lookSlots ? { "data-slot": "layout" } : {},
|
|
11162
11437
|
children: [/* @__PURE__ */ jsx(GiftingPanelHead, {
|
|
11163
|
-
eyebrow,
|
|
11164
11438
|
heading: display.heading,
|
|
11165
11439
|
intro: display.intro,
|
|
11166
11440
|
look: display
|
|
11167
|
-
}),
|
|
11168
|
-
className: "gifting-
|
|
11169
|
-
children:
|
|
11170
|
-
className: "gifting-
|
|
11171
|
-
"data-
|
|
11172
|
-
children:
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
}),
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11441
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
11442
|
+
className: "gifting-main",
|
|
11443
|
+
children: hasOffers ? /* @__PURE__ */ jsx("div", {
|
|
11444
|
+
className: "gifting-groups",
|
|
11445
|
+
"data-group-count": display.groups.length,
|
|
11446
|
+
children: display.groups.map((group) => /* @__PURE__ */ jsx(GiftGroup, {
|
|
11447
|
+
group,
|
|
11448
|
+
look: display,
|
|
11449
|
+
children: group.kind === "gift_card" ? /* @__PURE__ */ jsx(Fragment, { children: giftCards.map((offer) => /* @__PURE__ */ jsxs("div", {
|
|
11450
|
+
className: "gifting-offer",
|
|
11451
|
+
"data-gift-offer": offer.id,
|
|
11452
|
+
children: [
|
|
11453
|
+
giftCards.length > 1 ? /* @__PURE__ */ jsx("h4", {
|
|
11454
|
+
className: "gifting-offer-title",
|
|
11455
|
+
children: offer.title
|
|
11456
|
+
}) : null,
|
|
11457
|
+
offer.description ? /* @__PURE__ */ jsx("p", {
|
|
11458
|
+
className: "gifting-offer-description",
|
|
11459
|
+
children: offer.description
|
|
11460
|
+
}) : null,
|
|
11461
|
+
/* @__PURE__ */ jsxs("div", {
|
|
11462
|
+
className: "gifting-offer-row",
|
|
11463
|
+
"data-gift-offer-row": "",
|
|
11464
|
+
children: [/* @__PURE__ */ jsx(GiftCardAmounts, {
|
|
11465
|
+
offer,
|
|
11466
|
+
currency: offers?.currency ?? "GBP",
|
|
11467
|
+
groupName: `amountChoice-${offer.id}`,
|
|
11468
|
+
look: display
|
|
11469
|
+
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
11470
|
+
...giftingSlot(display, "action"),
|
|
11471
|
+
type: "button",
|
|
11472
|
+
variant: "primary",
|
|
11473
|
+
size: "md",
|
|
11474
|
+
extraClassName: "gifting-buy",
|
|
11475
|
+
label: "Buy a gift card"
|
|
11476
|
+
})]
|
|
11477
|
+
})
|
|
11478
|
+
]
|
|
11479
|
+
}, offer.id)) }) : /* @__PURE__ */ jsx("ul", {
|
|
11480
|
+
className: "gifting-voucher-list",
|
|
11481
|
+
children: vouchers.map((offer) => /* @__PURE__ */ jsx("li", {
|
|
11482
|
+
className: "gifting-voucher",
|
|
11483
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
11484
|
+
className: "gifting-offer",
|
|
11485
|
+
children: [
|
|
11486
|
+
/* @__PURE__ */ jsxs("div", {
|
|
11487
|
+
className: "gifting-offer-summary",
|
|
11488
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
11489
|
+
className: "gifting-offer-title",
|
|
11490
|
+
children: offer.title
|
|
11491
|
+
}), /* @__PURE__ */ jsx("strong", {
|
|
11492
|
+
className: "gifting-offer-price",
|
|
11493
|
+
children: formatGiftAmount(offer.voucher.purchaseAmountCents, offers?.currency ?? "GBP")
|
|
11494
|
+
})]
|
|
11495
|
+
}),
|
|
11496
|
+
offer.description ? /* @__PURE__ */ jsx("p", {
|
|
11497
|
+
className: "gifting-offer-description",
|
|
11498
|
+
children: offer.description
|
|
11499
|
+
}) : null,
|
|
11500
|
+
/* @__PURE__ */ jsx(ThemedButton, {
|
|
11501
|
+
...giftingSlot(display, "action"),
|
|
11502
|
+
type: "button",
|
|
11503
|
+
variant: "secondary",
|
|
11504
|
+
size: "md",
|
|
11505
|
+
extraClassName: "gifting-buy",
|
|
11506
|
+
label: "Buy this voucher"
|
|
11507
|
+
})
|
|
11508
|
+
]
|
|
11509
|
+
})
|
|
11510
|
+
}, offer.id))
|
|
11217
11511
|
})
|
|
11218
|
-
|
|
11219
|
-
},
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11512
|
+
}, group.kind))
|
|
11513
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
11514
|
+
className: "gifting-empty",
|
|
11515
|
+
children: GIFTING_NOTHING_TO_SHOW
|
|
11516
|
+
})
|
|
11223
11517
|
})]
|
|
11224
11518
|
})
|
|
11225
11519
|
});
|
|
@@ -15489,6 +15783,62 @@ function requireThemeResources(resources, blockKind) {
|
|
|
15489
15783
|
return resources;
|
|
15490
15784
|
}
|
|
15491
15785
|
//#endregion
|
|
15786
|
+
//#region ../blocks/src/sectionBoundaryTextures.tsx
|
|
15787
|
+
/** A textured join's entire paint stack moves together, preserving colour/alpha order. */
|
|
15788
|
+
function sectionOwnsBoundaryPaint(layout) {
|
|
15789
|
+
return Boolean(layout.underlay?.texture || layout.paint.front.texture || layout.paint.back.some((paint) => paint.texture));
|
|
15790
|
+
}
|
|
15791
|
+
function boundaryColourCss(colour) {
|
|
15792
|
+
return colour.startsWith("#") ? colour : `rgb(var(--tb-${colour}))`;
|
|
15793
|
+
}
|
|
15794
|
+
/** Planes share their owner's full height. Only their edge masks extend outside its box. */
|
|
15795
|
+
function sectionBoundaryPaint(input) {
|
|
15796
|
+
const planes = [edgePlanes(renderedJoinLayout(input.before?.join ?? null), "start"), edgePlanes(renderedJoinLayout(input.after?.join ?? null), "end")].flat();
|
|
15797
|
+
return planes.length ? planes : null;
|
|
15798
|
+
}
|
|
15799
|
+
function edgePlanes(layout, side) {
|
|
15800
|
+
if (!layout || !sectionOwnsBoundaryPaint(layout)) return [];
|
|
15801
|
+
const underlay = side === "end" && layout.underlay ? [paintPlane(layout, layout.underlay, side, "underlay", -1)] : [];
|
|
15802
|
+
return side === (layout.placement === "next" ? "end" : "start") ? [
|
|
15803
|
+
...underlay,
|
|
15804
|
+
...layout.paint.back.map((paint, index) => paintPlane(layout, paint, side, "back", index)).reverse(),
|
|
15805
|
+
paintPlane(layout, layout.paint.front, side, "front", -1)
|
|
15806
|
+
] : underlay;
|
|
15807
|
+
}
|
|
15808
|
+
function planeGeometry(layout, side, underlay, index) {
|
|
15809
|
+
const height = underlay ? "var(--boundary-height)" : "var(--boundary-shape-height)";
|
|
15810
|
+
const offset = index < 0 ? 0 : (index + 1) * .12;
|
|
15811
|
+
const overhang = `calc(${height} * ${underlay || layout.placement === "centred" ? .5 + offset : 1 + offset})`;
|
|
15812
|
+
return {
|
|
15813
|
+
"--section-edge-height": height,
|
|
15814
|
+
top: side === "start" ? `calc(-1 * ${overhang})` : 0,
|
|
15815
|
+
bottom: side === "end" ? `calc(-1 * ${overhang})` : 0,
|
|
15816
|
+
"--section-texture-y": side === "start" ? overhang : "0px",
|
|
15817
|
+
maskPosition: side === "start" ? "0 0" : "0 100%",
|
|
15818
|
+
WebkitMaskPosition: side === "start" ? "0 0" : "0 100%"
|
|
15819
|
+
};
|
|
15820
|
+
}
|
|
15821
|
+
function backMasks(index) {
|
|
15822
|
+
return index >= 0 && index % 2 === 0 ? Object.fromEntries(["texture-mask", "section-mask"].flatMap((property) => ["wide", "narrow"].map((width) => [`--boundary-${property}-${width}`, `var(--boundary-back-${property}-${width})`]))) : {};
|
|
15823
|
+
}
|
|
15824
|
+
function paintPlane(layout, paint, side, role, index) {
|
|
15825
|
+
const style = {
|
|
15826
|
+
...layout.geometry,
|
|
15827
|
+
...backMasks(index),
|
|
15828
|
+
...planeGeometry(layout, side, role === "underlay", index),
|
|
15829
|
+
...paint.texture ? groundTextureStyle(paint.texture) : {},
|
|
15830
|
+
backgroundColor: boundaryColourCss(paint.colour),
|
|
15831
|
+
opacity: index < 0 ? 1 : (layout.paint.back.length - index) / (layout.paint.back.length + 1)
|
|
15832
|
+
};
|
|
15833
|
+
return /* @__PURE__ */ jsx("span", {
|
|
15834
|
+
"aria-hidden": "true",
|
|
15835
|
+
"data-section-edge-paint": role,
|
|
15836
|
+
"data-section-edge-side": side,
|
|
15837
|
+
"data-section-edge-fade": role !== "underlay" && layout.geometry["--boundary-shape-background"]?.startsWith("linear-gradient") ? "" : void 0,
|
|
15838
|
+
style
|
|
15839
|
+
}, `${side}:${role}:${index}`);
|
|
15840
|
+
}
|
|
15841
|
+
//#endregion
|
|
15492
15842
|
//#region ../blocks/src/pageRendererBoundaries.tsx
|
|
15493
15843
|
function joinSlotsByPair(slots) {
|
|
15494
15844
|
return new Map(slots.map((slot) => [joinSlotKey(slot.previousBlockId, slot.nextBlockId), slot]));
|
|
@@ -15505,16 +15855,7 @@ function renderJoinSlot(input) {
|
|
|
15505
15855
|
const { slot } = input;
|
|
15506
15856
|
if (!slot) return null;
|
|
15507
15857
|
const layout = renderedJoinLayout(slot.join);
|
|
15508
|
-
const painted = slot.join && layout ?
|
|
15509
|
-
"aria-hidden": "true",
|
|
15510
|
-
"data-block-boundary": "",
|
|
15511
|
-
"data-boundary-id": slot.join.boundaryId,
|
|
15512
|
-
"data-boundary-previous-block-id": slot.previousBlockId,
|
|
15513
|
-
"data-boundary-next-block-id": slot.nextBlockId,
|
|
15514
|
-
"data-boundary-treatment": slot.join.treatment,
|
|
15515
|
-
"data-boundary-placement": layout.placement,
|
|
15516
|
-
style: boundaryPaintStyle(layout.paint)
|
|
15517
|
-
}, `${input.blockKey}:boundary`) : null;
|
|
15858
|
+
const painted = slot.join && layout ? paintedBoundary(slot, slot.join, layout, input.blockKey) : null;
|
|
15518
15859
|
const extra = input.renderJoin?.({
|
|
15519
15860
|
previousBlockId: slot.previousBlockId,
|
|
15520
15861
|
nextBlockId: slot.nextBlockId,
|
|
@@ -15523,18 +15864,65 @@ function renderJoinSlot(input) {
|
|
|
15523
15864
|
if (!painted && (extra === null || extra === void 0)) return null;
|
|
15524
15865
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [painted, extra] }, `${input.blockKey}:join`);
|
|
15525
15866
|
}
|
|
15526
|
-
|
|
15527
|
-
* The one render-edge place a theme token becomes CSS.
|
|
15528
|
-
*/
|
|
15529
|
-
function themeTokenCss(token) {
|
|
15530
|
-
return `rgb(var(--tb-${token}))`;
|
|
15531
|
-
}
|
|
15532
|
-
function boundaryPaintStyle(paint) {
|
|
15867
|
+
function boundaryPaintStyle(layout) {
|
|
15533
15868
|
return {
|
|
15534
|
-
|
|
15535
|
-
|
|
15869
|
+
...layout.geometry,
|
|
15870
|
+
"--boundary-shape-paint": boundaryColourCss(layout.paint.front.colour),
|
|
15871
|
+
...layout.underlay ? { "--boundary-band-paint": boundaryColourCss(layout.underlay.colour) } : {}
|
|
15536
15872
|
};
|
|
15537
15873
|
}
|
|
15874
|
+
function paintedBoundary(slot, join, layout, key) {
|
|
15875
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15876
|
+
"aria-hidden": "true",
|
|
15877
|
+
"data-block-boundary": "",
|
|
15878
|
+
"data-boundary-geometry": "",
|
|
15879
|
+
"data-boundary-section-owned": sectionOwnsBoundaryPaint(layout) ? "" : void 0,
|
|
15880
|
+
"data-boundary-id": join.boundaryId,
|
|
15881
|
+
"data-boundary-previous-block-id": slot.previousBlockId,
|
|
15882
|
+
"data-boundary-next-block-id": slot.nextBlockId,
|
|
15883
|
+
"data-boundary-treatment": join.treatment,
|
|
15884
|
+
"data-boundary-placement": layout.placement,
|
|
15885
|
+
style: boundaryPaintStyle(layout),
|
|
15886
|
+
children: sectionOwnsBoundaryPaint(layout) ? null : layout.paint.back.map((paint, index) => renderBackLayer(paint, index, layout))
|
|
15887
|
+
}, `${key}:boundary`);
|
|
15888
|
+
}
|
|
15889
|
+
function renderBackLayer(paint, index, layout) {
|
|
15890
|
+
const offset = 12 * (index + 1);
|
|
15891
|
+
const mirror = index % 2 === 0 ? "-1" : "1";
|
|
15892
|
+
const opacity = (layout.paint.back.length - index) / (layout.paint.back.length + 1);
|
|
15893
|
+
return /* @__PURE__ */ jsx("span", {
|
|
15894
|
+
"data-boundary-back": "",
|
|
15895
|
+
style: {
|
|
15896
|
+
...{
|
|
15897
|
+
previous: {
|
|
15898
|
+
paint: {
|
|
15899
|
+
bottom: 0,
|
|
15900
|
+
transform: `translateY(-${offset}%) scaleX(${mirror})`
|
|
15901
|
+
},
|
|
15902
|
+
texture: { bottom: `calc(var(--boundary-height) * ${offset / 100})` }
|
|
15903
|
+
},
|
|
15904
|
+
next: {
|
|
15905
|
+
paint: {
|
|
15906
|
+
top: 0,
|
|
15907
|
+
transform: `translateY(${offset}%) scaleY(-1) scaleX(${mirror})`
|
|
15908
|
+
},
|
|
15909
|
+
texture: { top: `calc(var(--boundary-height) * ${offset / 100})` }
|
|
15910
|
+
},
|
|
15911
|
+
centred: {
|
|
15912
|
+
paint: {
|
|
15913
|
+
top: 0,
|
|
15914
|
+
transform: `translateY(-${50 + offset}%) scaleX(${mirror})`
|
|
15915
|
+
},
|
|
15916
|
+
texture: { top: `calc(var(--boundary-shape-height) / -2 - var(--boundary-height) * ${offset / 100})` }
|
|
15917
|
+
}
|
|
15918
|
+
}[layout.placement].paint,
|
|
15919
|
+
opacity,
|
|
15920
|
+
"--boundary-shape-paint": boundaryColourCss(paint.colour),
|
|
15921
|
+
"--boundary-shape-background": layout.geometry["--boundary-shape-background"],
|
|
15922
|
+
"--boundary-shape-background-mixed": layout.geometry["--boundary-shape-background-mixed"]
|
|
15923
|
+
}
|
|
15924
|
+
}, index);
|
|
15925
|
+
}
|
|
15538
15926
|
/**
|
|
15539
15927
|
* Reserve attributes and variables for a block wrapper, from the joins on
|
|
15540
15928
|
* either side. A join's `before` reserve sits inside its previous section, so
|
|
@@ -15544,16 +15932,19 @@ function boundaryPaintStyle(paint) {
|
|
|
15544
15932
|
function blockBoundaryReserves(input) {
|
|
15545
15933
|
const top = reserveOnSide(input.before, "after");
|
|
15546
15934
|
const bottom = reserveOnSide(input.after, "before");
|
|
15935
|
+
const edgePaint = sectionBoundaryPaint(input);
|
|
15547
15936
|
const style = {
|
|
15937
|
+
...edgePaint ? { position: "relative" } : {},
|
|
15548
15938
|
...top ? { "--site-style-boundary-before-reserve": top.length } : {},
|
|
15549
15939
|
...bottom ? { "--site-style-boundary-after-reserve": bottom.length } : {}
|
|
15550
15940
|
};
|
|
15551
15941
|
return {
|
|
15942
|
+
edgePaint,
|
|
15552
15943
|
topPlacement: top?.placement,
|
|
15553
15944
|
bottomPlacement: bottom?.placement,
|
|
15554
15945
|
seamBefore: seamAttribute(input.before),
|
|
15555
15946
|
seamAfter: seamAttribute(input.after),
|
|
15556
|
-
style:
|
|
15947
|
+
style: Object.keys(style).length ? style : void 0
|
|
15557
15948
|
};
|
|
15558
15949
|
}
|
|
15559
15950
|
function seamAttribute(slot) {
|
|
@@ -16068,7 +16459,7 @@ function survivingPreparedRegion(entries, survivors) {
|
|
|
16068
16459
|
}
|
|
16069
16460
|
/** Admission always sees current loader provenance, even when block preparation can be reused. */
|
|
16070
16461
|
function preparationAdmission(input) {
|
|
16071
|
-
const facts = readinessFactsFromLoaders("published", {
|
|
16462
|
+
const facts = readinessFactsFromLoaders(input.dataContext?.previewStage === "preview" ? "draft" : "published", {
|
|
16072
16463
|
prefetched: input.dataContext?.prefetchedBlockData,
|
|
16073
16464
|
previewStage: input.dataContext?.previewStage,
|
|
16074
16465
|
mailingList: input.dataContext?.mailingList,
|
|
@@ -16149,6 +16540,10 @@ function composeSurvivorJoins(plan, survivors, themeResources) {
|
|
|
16149
16540
|
originalBlocks: plan.regions.main.map((planned) => planned.block),
|
|
16150
16541
|
survivingBlocks: new Set(survivors.map((survivor) => survivor.entry.block))
|
|
16151
16542
|
}),
|
|
16543
|
+
context: themeResources.kind === "available" ? {
|
|
16544
|
+
siteStyleId: themeResources.config?.siteStyleId,
|
|
16545
|
+
palette: themeResources.tokens.palette
|
|
16546
|
+
} : void 0,
|
|
16152
16547
|
survivors: survivors.map(({ entry }) => ({
|
|
16153
16548
|
id: entry.block.id,
|
|
16154
16549
|
kind: entry.block.kind,
|
|
@@ -16654,7 +17049,7 @@ function renderPlanEntry(input) {
|
|
|
16654
17049
|
before: joinBefore,
|
|
16655
17050
|
after: joinAfter
|
|
16656
17051
|
});
|
|
16657
|
-
const blockElement = /* @__PURE__ */
|
|
17052
|
+
const blockElement = /* @__PURE__ */ jsxs("div", {
|
|
16658
17053
|
id: blockAnchorId(block),
|
|
16659
17054
|
className: wrapperClassName,
|
|
16660
17055
|
...arrangementHooksFromContent(renderableContent),
|
|
@@ -16674,7 +17069,7 @@ function renderPlanEntry(input) {
|
|
|
16674
17069
|
"data-site-style-seam-after": reserves.seamAfter,
|
|
16675
17070
|
"data-style-group": styleGroup,
|
|
16676
17071
|
style: reserves.style,
|
|
16677
|
-
children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
|
|
17072
|
+
children: [/* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }), reserves.edgePaint]
|
|
16678
17073
|
}, blockKey);
|
|
16679
17074
|
if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
|
|
16680
17075
|
return blockElement;
|