@riverbankcms/sdk 0.173.0 → 0.174.1
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/README.md +6 -1
- package/dist/_dts/{BlocksIslandsHydrator-O50mTMCY.d.ts → BlocksIslandsHydrator-YRmc-Yxz.d.ts} +1 -1
- package/dist/_dts/{Page-Bk99sJwV.d.ts → Page-Du0zX1B-.d.ts} +27 -16
- package/dist/_dts/{SdkPreviewMode-DzAue6Kj.d.ts → SdkPreviewMode-4L8v3FkY.d.ts} +14 -7
- package/dist/_dts/{client-ZlNEIvlU.d.ts → client-B1J6Akyf.d.ts} +1 -1
- package/dist/_dts/{content-types-DBXPNc0h.d.ts → content-types-CGGYI0u_.d.ts} +2 -2
- package/dist/_dts/{contracts-D9bhu0bb.d.ts → contracts-CHMlw9hT.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-Bfap3soN.d.ts → footerPageOutline-DIHSU1Vr.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-DwCdg31h.d.ts → generatePageMetadata-JITXD6BU.d.ts} +2 -2
- package/dist/_dts/{index-Dq_AboWN.d.ts → index-BLEKFHt1.d.ts} +1 -1
- package/dist/_dts/{index-BnatulTs.d.ts → index-BgOr1Xyz.d.ts} +3 -3
- package/dist/_dts/{index-KXh8FQ2s.d.ts → index-CF62FntA.d.ts} +2 -2
- package/dist/_dts/{index-CJzs-yIJ.d.ts → index-CXZSy_9M.d.ts} +2 -2
- package/dist/_dts/{index-DutLU2d2.d.ts → index-D9ZYmGAJ.d.ts} +2 -1
- package/dist/_dts/{index-DW3eeNph.d.ts → index-DpJm0NpL.d.ts} +4 -4
- package/dist/_dts/{index-C611wjIL.d.ts → index-yWDbUojb.d.ts} +1 -1
- package/dist/_dts/{loadContent-Bde2y870.d.ts → loadContent-M-s0p0rq.d.ts} +11 -11
- package/dist/_dts/{request-Bysk4QPI.d.ts → request-BK-pHf0P.d.ts} +3685 -1762
- package/dist/_dts/{resolveBlockData-ChbNvpSF.d.ts → resolveBlockData-DZAlnhwt.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-CGa6QMgc.d.ts → resolvePageContent-DXUCWJ3y.d.ts} +2 -2
- 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 +9 -9
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- 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/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 +4 -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 +13 -8
- 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 +5 -5
- 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 +36 -204
- package/dist/_dts/{types-BwitGNTl.d.ts → types-CwmB2NHU.d.ts} +7 -7
- package/dist/_dts/{types-BoEk9ZON.d.ts → types-DjVNADXR.d.ts} +3 -3
- package/dist/_dts/{types-kpp8XyXv.d.ts → types-Dmow_FI6.d.ts} +2 -2
- package/dist/_dts/{validation-ChftKX-o.d.ts → validation-h8t1HLlL.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-BnUeSE3d.mjs → BlocksIslandsHydrator-DRVx_XLi.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-LHQMODqB.mjs → BookingMailingListNote-CwrMzj-k.mjs} +10 -10
- package/dist/client/{BookingPanelArrangement-Be704P85.mjs → BookingPanelArrangement-C2_hFT6K.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BewbU_cV.mjs → BookingQuestionFields-DZMrGvBh.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-BMZp3RS3.mjs → CalendarNavigationChevron-Az1-TIEI.mjs} +6 -6
- package/dist/client/{DemoBookingPortalAccess-CARUWQ_E.mjs → DemoBookingPortalAccess-1p-pJ1lg.mjs} +5 -5
- package/dist/client/{EventCalendar.client-CaI6upCX.mjs → EventCalendar.client-CDkkP-Lv.mjs} +9 -9
- package/dist/client/{EventCombined.client-CoRUaYHY.mjs → EventCombined.client-DK3aaz62.mjs} +7 -7
- package/dist/client/{EventItem-Doe4KodB.mjs → EventItem-WeUipfIP.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-CXWLKDfa.mjs → EventListWeekNavigation-D3sbAeDo.mjs} +1 -1
- package/dist/client/{EventListing.client-DvJ5tGTx.mjs → EventListing.client-DL3gGGmF.mjs} +3 -3
- package/dist/client/{EventListing.view-BmfyK7S5.mjs → EventListing.view-DKFImKOx.mjs} +6 -6
- package/dist/client/{EventRegistrationPayment-DwMlJB2V.mjs → EventRegistrationPayment-Dn9TpWyL.mjs} +45 -18
- package/dist/client/{LocationMapActions-CdRPU6gp.mjs → LocationMapActions-BJT7MqP2.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-DCLtxOnt.mjs → MapDrawingSvg-DCIwlON6.mjs} +1 -1
- package/dist/client/{Page-D46Dmr7b.mjs → Page-BpeP9xdt.mjs} +731 -1549
- package/dist/client/{StepIndicator-CrSZCZn1.mjs → StepIndicator-CP6zrwkl.mjs} +6 -242
- package/dist/client/{accessibleSurfaces-D4DhWo9j.mjs → accessibleSurfaces-DN8it_Cx.mjs} +35 -7
- package/dist/client/{accordion-P8xcfKxq.mjs → accordion-nR7D4m1a.mjs} +1 -1
- package/dist/client/{booking-form.client-BM2s-NqR.mjs → booking-form.client-Ce-mQZ7W.mjs} +362 -47
- package/dist/client/{bookingForm-JnaZPZge.mjs → bookingForm-B-qT_AQB.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{boxStyleClassNames-Cahps5kR.mjs → boxStyleClassNames-CrE3TDpW.mjs} +2 -29
- package/dist/client/{carousel-CQQ_m0KA.mjs → carousel-CVUOatsY.mjs} +1 -1
- package/dist/client/{cart-0Q4fjw_K.mjs → cart-DE0K6E0R.mjs} +3 -3
- package/dist/client/{cart.client-BI0IaHX3.mjs → cart.client-C23E6WQ5.mjs} +1 -1
- package/dist/client/{checkout-1J-3ftxF.mjs → checkout-76cdHyPL.mjs} +3 -3
- package/dist/client/{checkout.client-DOGYDlDk.mjs → checkout.client-DJOzqb26.mjs} +1 -1
- package/dist/client/{checkoutUrls-CwHqcqzP.mjs → checkoutUrls-CvIP5DCO.mjs} +1 -1
- package/dist/client/client.mjs +159 -7
- package/dist/client/{context-D0KCgbOq.mjs → context-CNlesLfF.mjs} +1 -1
- package/dist/client/{course-CmOuoZHN.mjs → course-DHIrXqNT.mjs} +2 -2
- package/dist/client/{creditProducts-BTRX4edc.mjs → creditProducts-KYMVIH3J.mjs} +2 -84
- package/dist/client/{dateFormatting-Dmfaczzq.mjs → dateFormatting-B73Ll0s4.mjs} +9 -1
- package/dist/client/{demoPortalMagicLink-CL7KGRta.mjs → demoPortalMagicLink-BVbLD4pi.mjs} +1 -1
- package/dist/client/{display-lL-YRApN.mjs → display-Cf_j5stk.mjs} +2574 -763
- package/dist/client/{enhanceHeaderSection-B-eLGs2C.mjs → enhanceHeaderSection-5GD5o4Mt.mjs} +3 -3
- package/dist/client/{event-details.client-DH1-Jxsh.mjs → event-details.client-D7Oz1q2L.mjs} +1 -1
- package/dist/client/{event-registration.client-GuuElczW.mjs → event-registration.client-zbuX36aA.mjs} +137 -131
- package/dist/client/{eventCalendar-BiCINPkV.mjs → eventCalendar-uZrksODt.mjs} +4 -4
- package/dist/client/{eventCombined-BtzmH6FW.mjs → eventCombined-DxhvNAx8.mjs} +4 -4
- package/dist/client/{eventDetails-BJpAD10-.mjs → eventDetails-DCIH4BYG.mjs} +2 -2
- package/dist/client/{eventListing-jLB8iRqp.mjs → eventListing-B9KrnPvc.mjs} +4 -4
- package/dist/client/{eventRegistration-WhtpDEbq.mjs → eventRegistration-TjnURMKl.mjs} +4 -4
- package/dist/client/{form-DO6qKH3M.mjs → form-CfqIAhfN.mjs} +3 -3
- package/dist/client/{form.client-D12ljYiX.mjs → form.client-CL6fF0cW.mjs} +6 -6
- package/dist/client/{form.parts-C8QHaQOI.mjs → form.parts-Bf-L66Gg.mjs} +1 -1
- package/dist/client/{formatDate-BnhfIpCa.mjs → formatDate-Dp7POa9Y.mjs} +1 -1
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-BtFWtoUm.mjs → headerSection-WVXtOcuW.mjs} +2 -2
- package/dist/client/{newsletter-form.client-oHrqM_Ao.mjs → newsletter-form.client-Bb7GAZpO.mjs} +9 -7
- package/dist/client/{newsletter-form.parts-D5U-FuVy.mjs → newsletter-form.parts-BqOVRdIc.mjs} +1 -1
- package/dist/client/{newsletterForm-CBYbFxSx.mjs → newsletterForm-DOVe-qY3.mjs} +3 -3
- package/dist/client/{noop-CN0o0yjH.mjs → noop-D5mFWXtN.mjs} +30 -6
- package/dist/client/portal/client.mjs +346 -272
- package/dist/client/{product-detail.client-d_sNCapC.mjs → product-detail.client-CNzeFnFf.mjs} +1 -1
- package/dist/client/{product-list.client-DkSpw6WQ.mjs → product-list.client-LKpzC7pj.mjs} +1 -1
- package/dist/client/{productDetail-DaqM-LgL.mjs → productDetail-D2JNeEgx.mjs} +3 -3
- package/dist/client/{productList-CMx4-XlG.mjs → productList-DTgZXOEq.mjs} +3 -3
- package/dist/client/{propsDecoder-BZbUKstC.mjs → propsDecoder-mpBQt2AT.mjs} +3 -3
- package/dist/client/{registry.server-Cdot3dMk.mjs → registry.server-DdTJyar2.mjs} +31 -47
- package/dist/client/rendering/client.mjs +26 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +16 -13
- package/dist/client/{richText-coerce-ByApwB4q.mjs → richText-coerce-C32cRQ03.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DTET8f__.mjs → routeIslandApiConfig-8cfSgT0E.mjs} +1 -1
- package/dist/client/{runtimeResponse-IkOwKZD0.mjs → runtimeResponse-9v8q2NBc.mjs} +1 -1
- package/dist/client/runtimeResponse-CVkM0dHy.mjs +3 -0
- package/dist/client/{shop-Cy6xXDM7.mjs → shop-5LBhftWx.mjs} +3 -3
- package/dist/client/{shop-commerce-oDR76k1q.mjs → shop-commerce-DkValjZj.mjs} +12 -12
- package/dist/client/{shop-commerce-store-DjoUpL3a.mjs → shop-commerce-store-BOmXFmk_.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-WsGb9DD8.mjs → shop-discount-apply.state-D0ifS6KX.mjs} +2 -2
- package/dist/client/{shop.client-Brha4BSM.mjs → shop.client-BTtZqNmv.mjs} +13 -13
- package/dist/client/{shop.interactive-CXhYl0DW.mjs → shop.interactive-DNRqG4aX.mjs} +18 -24
- package/dist/client/{shopShared-JCa_SRhP.mjs → shopShared-Nky6kPYr.mjs} +2 -2
- package/dist/client/{timetableModel-CZeJwMxP.mjs → timetableModel-DZArznD_.mjs} +25 -152
- package/dist/client/{useAvailableSlots-DfbSkWop.mjs → useAvailableSlots-CUVRD1nx.mjs} +24 -4
- package/dist/client/{useDiscountApply-Dq-wjb1d.mjs → useDiscountApply-BBnStWXU.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Cyy0meCH.mjs → useDiscountCodeUi-d7viY_mu.mjs} +1 -1
- package/dist/client/{useEventPagination-CCAGQHsD.mjs → useEventPagination-Da2JqxGC.mjs} +6 -6
- package/dist/client/{view-Sw075FOY.mjs → view-BvuYmQJ5.mjs} +2 -2
- package/dist/client/{view-D6yebI4r.mjs → view-D9ObkFtz.mjs} +12 -11
- package/dist/preview-next/client/{LocationPickerEnvironment-D4F_5rnr.mjs → LocationPickerEnvironment-8iKKoYZr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-BKMNxSEJ.mjs → MapLibreEditMap-AIUPN1Zx.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DG2rXUmo.mjs → PageSectionToolbar-DwxHT-2k.mjs} +57 -144
- package/dist/preview-next/client/{PreviewEditorSidebar-BDY5vdHU.mjs → PreviewEditorSidebar-D4SBxGU6.mjs} +758 -1279
- package/dist/preview-next/client/{PreviewEditorUI-CqZCfOaz.mjs → PreviewEditorUI-D8mUct32.mjs} +29 -26
- package/dist/preview-next/client/{PreviewShell-Bv2HZ7JY.mjs → PreviewShell-L2AEdNUQ.mjs} +50 -30
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BMTcR-MW.mjs → SdkPreviewModeRuntime-bhVAU2D2.mjs} +47 -19
- package/dist/preview-next/client/{lucide-react-BCNn8dEQ.mjs → lucide-react-Dfgl3Vtq.mjs} +7 -1
- package/dist/preview-next/client/{previewAssistantSlot-La6MerV_.mjs → previewAssistantSlot-Jpj_HDra.mjs} +101003 -51855
- package/dist/preview-next/client/{previewChromeRoot-BcOQqJIP.mjs → previewChromeRoot-CYTDvx4u.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-BkckHox4.mjs → sdk-runtime-CZHX6J_4.mjs} +2 -2
- package/dist/preview-next/client/siteStyleAccess-DmGIG9Hk.mjs +9356 -0
- package/dist/preview-next/client/{useAutosaveStatus-CPAHgGqI.mjs → useAutosaveStatus-DQCyswQ-.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BDkuSZxQ.mjs → useOpenBlockForSetup-LwE5yXvL.mjs} +19 -4
- package/dist/preview-next/container-responsive.css +117 -32
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CPV30ABr.mjs → route-contract-BOuNcOcN.mjs} +153 -2
- package/dist/server/{Block.shared-BaMMstO1.mjs → Block.shared-wfJfhs08.mjs} +10 -5
- package/dist/server/{ThemeScopeCore-D1NTXZdX.mjs → ThemeScopeCore-BtrJNHTB.mjs} +23 -6
- package/dist/server/{accessibleSurfaces-Dbd2__Le.mjs → accessibleSurfaces-CM3QANtw.mjs} +22 -5
- package/dist/server/{bindings-Dge4sqel.mjs → bindings-P1CF2Gm6.mjs} +6 -4
- package/dist/server/{client-VVIQjC4r.mjs → client-CGtU5fHI.mjs} +156 -4
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/customCss-BGB8gMVb.mjs +210 -0
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-BIJb3WAK.mjs → loadContent-ChnkJSay.mjs} +8 -9
- package/dist/server/{loadPage-DjTU19y7.mjs → loadPage-DesHhgxj.mjs} +3 -3
- package/dist/server/lookMediaFrame-BBr0mkze.mjs +2626 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/next.mjs +9 -8
- package/dist/server/{overrideResolution-1Ru3NMQj.mjs → overrideResolution-DHEkHcZs.mjs} +3 -4
- package/dist/server/page-converter.mjs +2 -2
- package/dist/server/{pageRenderPlan-CytPhrI9.mjs → pageRenderPlan-0jvm0RBk.mjs} +29 -331
- package/dist/server/{pageRuntimeSupport-DWspU5EZ.mjs → pageRuntimeSupport-8-f1Zr9e.mjs} +14 -6
- package/dist/server/{pageShared-Bhx8bVe1.mjs → pageShared-CuVFoV4z.mjs} +370 -291
- package/dist/server/{parseThemeForPersistence-CtgRtvo3.mjs → parseThemeForPersistence-Cwqb5pZx.mjs} +2 -2
- package/dist/server/{portal-Ce1Prfl3.mjs → portal-BjVHMAUC.mjs} +1 -1
- package/dist/server/portal.mjs +1 -1
- package/dist/server/{prebuild-BjvFb0CA.mjs → prebuild-Bms_Y7wQ.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Db3stNpp.mjs → prefetchBlockData-5oC5kyHe.mjs} +2 -2
- package/dist/server/{registry-BMCfcev6.mjs → registry-DmqxC8th.mjs} +1258 -3166
- 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 +2 -2
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData--yUbI-Ll.mjs → resolveBlockData-EYogtwQc.mjs} +1 -1
- package/dist/server/{resolveButtonColourStates-CCPUY9Xh.mjs → resolveButtonColourStates--6yJp9Tq.mjs} +15 -4
- package/dist/server/{schema-D5Vfmqzw.mjs → schema-CUDHMirj.mjs} +46 -153
- package/dist/server/server.mjs +3 -3
- package/dist/server/{src-Cxucn-1P.mjs → src-DHK4JUlp.mjs} +4 -1
- package/dist/server/theme-bridge.mjs +21 -15
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-Bsfdy_ZV.mjs → three-pass-converter-39SXCCnh.mjs} +1 -1
- package/dist/server/{titleSourceSchema-DwKJfMYb.mjs → titleSourceSchema-Cu-3PRvv.mjs} +0 -1
- package/dist/server/{validation-EgTtnTcY.mjs → validation-Bt_8IL1g.mjs} +4 -4
- package/dist/server/{version-LjgU0Cq1.mjs → version-DT_efohp.mjs} +1 -1
- package/dist/styles/index.css +989 -279
- package/package.json +1 -1
- package/dist/client/bookability-SargNwlO.mjs +0 -17
- package/dist/client/runtimeResponse-Wd6kwhE_.mjs +0 -3
- package/dist/preview-next/client/SiteChromeCustomizeButton-D1MGyN_Z.mjs +0 -55403
- package/dist/server/customCss-QymcmOZ-.mjs +0 -97
- package/dist/server/opaqueSurface-COEKXVwk.mjs +0 -54
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { B as OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE,
|
|
2
|
+
import { B as OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE, Cn as parseMailingListPlacementTargeting, Dn as parseContentVersionId, En as sameMailingListPlacementTargeting, G as isOfferingsPreviewSourceKey, H as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, Ht as cardListPresentationSchemaShape, K as normalizeOfferingsPreviewContentForWrite, R as OFFERINGS_PREVIEW_AUTHORABLE_SOURCE_KEYS, W as groupOfferingRunsByCourse, X as readOfferingsGrouping, Y as offeringsListingFor, Zt as buildEventListWeek, bt as recurringScheduleProjectionSchema, ct as occurrenceContextSchema, gn as resolveHeaderChromeRuntimeContract, hn as isHeaderScrollRuntimeEnabled, on as formatEventStartingPrice, qt as quickFactSlots, vn as parseHeaderPositioning, xn as buildMailingListSignupBlockSourceRef, xt as combinedLookSchema, yn as planSiteChromePlacement, yt as projectRecurringSchedule } from "./shop.interactive-DNRqG4aX.mjs";
|
|
3
3
|
import { a as mediaIdentifierSchema, i as resolveManagedMediaReference, n as renderableMediaAssetSchema, r as indexRenderableMediaAssets } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
|
|
4
|
-
import { $
|
|
5
|
-
import { A as
|
|
6
|
-
import {
|
|
7
|
-
import { $ as backgroundFrame, $t as chosenString, A as mapDrawingStyleBinding, An as ICON_SIZE_PX, At as cardListKnobFields, B as normalizeMailingListBlockContent, Bt as parseFieldDefinitions, C as checkoutBlockDefinition, Cn as createButtonGroup, Ct as repeat, D as shopBlockDefinition, Dn as ACCORDION_TRIGGER_FONT_SCALE, Dt as text, E as productListBlockDefinition, En as ACCORDION_SPACING_MAP, Et as stack, Fn as resolveRepeaterGridColumnFieldId, Ft as parseBlockIconValue, G as withApiBindings, Gt as eventReadinessQueryKeys, H as formDataSchema, Ht as augmentManifest, In as resolveRepeaterGridRowFieldId, It as createSdkSelectField, J as sectionHeaderLayoutNodes, Jt as eventDiscoveryFilterKeys, K as formCopyFragment, Kt as eventReadinessResultSchema, L as desktopOnlyDisplay, Ln as resolveRepeaterGridSpanFieldId, Lt as createSiteOptionSelectField, M as FEATURE_CARD_GENERATED_ICON_SIZE_PX, Mn as DEFAULT_MEDIA_FIELD_KINDS, Mt as cardListPresentationBindings, N as FEATURE_CARD_ICON_TREATMENTS, Nn as isAcceptedRepeaterGridSpan, Nt as cardListSectionActionFields, O as eventCalendarBlockDefinition, On as ACCORDION_TRIGGER_LETTER_SPACING, Ot as videoEmbed, Pn as parseRepeaterGridInteger, Pt as normalizeCardListContent, Q as sectionContainer, Qt as resolveEventScope, R as mobileOnlyDisplay, Rn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Rt as normalizeSelectSource, S as giftingBlockDefinition, Sn as getAnchorClasses, St as props, T as productDetailBlockDefinition, Tn as ACCORDION_OPEN_ACCENT_THICKNESS, Tt as section, U as createBlockManifest, Ut as eventReadinessLoaderKey, V as formBlockDefinition, Vt as PUBLIC_DOWNLOAD_MEDIA_TYPES, W as formEmbedFragment, Wt as eventReadinessQuery, X as styledSection, Xt as eventScopeQuery, Y as resolveBackgroundColorValue, Yt as eventScopeLoaderParam, Z as styledContainer, Zt as eventScopeQueryKeys, _ as publicAppointmentLocationSchema, _n as layoutField, _t as headerSection, a as buildLoadedOfferingsPreviewListing, an as loadedReadinessFact, at as lookLeadSlotTransform, b as newsletterSignupBlockDefinition, bn as sectionStylesField, bt as link, cn as LOCATION_MAP_DEFAULTS, ct as lookSlot, dn as normalizeLocationMapSource, dt as bookingForm, en as galleryReadiness, et as buildFragmentDataLoaders, fn as resolveLocationMapLocation, ft as button, g as formatAppointmentPrice, gn as eventDisplayFields, gt as form, h as formatAppointmentLocation, hn as emptyStateField, ht as fileDownload, in as hiddenFromVisitors, it as lookCarouselRegionTransform, j as eventRegistrationBlockDefinition, jn as bindingSchema, jt as cardListPhotoNumberFields, k as eventListingBlockDefinition, kn as ICON_CONFIG, kt as when, ln as LOCATION_MAP_LIMITS, lt as accordionList, m as formatAppointmentDuration, mn as columnsField, mt as el, nn as testimonialsReadiness, nt as defineFragment, on as pageTemplateFromEntry, ot as lookQuoteLimitTransform, p as SectionNode, pn as cardStylingFields, pt as carousel, q as sectionHeaderFields, qt as eventWeekReadScope, rn as admitReadinessFacts, rt as cardListSectionAction, s as buildAppointmentServicesView, sn as unavailableReadinessFact, st as lookSkinSlotTransform, t as serverComponentRegistry, tn as teamReadiness, tt as composeFragments, un as normalizeLocationMapProps, ut as bind, v as publicAppointmentPricingSchema, vn as cardStylesField, vt as icon, w as cartBlockDefinition, wn as createButtonVariantField, wt as richText, x as sanitizeNewsletterSignupPublicContent, xn as BACKGROUND_POSITION_PRESET_VALUES, xt as media, y as offeringCourseSlotParents, yn as containerStylesField, yt as inline, z as teamMemberCardBiographyFallback, zn as linkSchema, zt as parseFieldDefinition } from "./registry.server-
|
|
8
|
-
import { g as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { _ as resolveSpacing, a as hasFixedFrameBackgroundMotion, b as runTransforms, c as resolveItemCardRole, d as parseRuntimeBackgroundContent, g as resolveSectionMinHeight, h as isSemanticSpacing, i as fixedFrameScopeClass, l as parseBackgroundContent, m as isSectionMinHeight, n as ROUNDED_CLASSES, o as normalizeBoxStylesBorder, p as SEMANTIC_SPACING_VALUES, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles, t as RAISED_SHADOW_CLASS, u as parseBackgroundOverlay, v as asPartialObject, y as createTransformRegistry } from "./boxStyleClassNames-Cahps5kR.mjs";
|
|
4
|
+
import { $o as gradientToCss, $s as opaqueSurfaceContextFromTheme, Ao as automaticArrangementLook, Ar as resolveArrangementKnobs, As as applyLookPhotoTreatment, Ba as normalizeEventRegistrationPageSurfaceSubject, Bo as resolvePublishedLook, Br as runTransforms, Bs as assertNever$1, Cc as siteChromeBackgroundOverrideOwner, Co as resolveLookSurfacePresentation, Cs as isDecorativeTransitionIntent, Dc as asPageFlowPresetId, Do as arrangementAppearancePresets, Ds as transitionIntentForTreatment, Ea as resolveDateRuntimeContext, Ec as asLayoutVariantKey, Eo as resolveLookMediaFrame, Es as spaciousBoundaryOption, Fo as styleSectionBackgroundForColour, Fr as uiTransforms, Fs as sectionSurfaceBase, Gs as designIssueSeverityForPolicy, Ho as deriveSiteStyleBlockPolicy, Hs as defineExactCatalog, Io as arrangementManifestFromVariants, Ir as SECTION_STATE_KINDS, Is as stripStaleTransitionStyleGroup, Jo as requireCuratedSiteStyle, Js as offeringsPreviewCompositionTreatmentValues, Kr as eventCalendarWeekStart, Ks as featureCardCompositionTreatmentValues, Lo as readStoredMode, Lr as sectionStateToneFromKind, Ls as themeV2CompilerOwnedFieldNames, Mc as isRecord$8, Mo as getCompatibleBlockAppearancePresets, Mr as createImageShapeField, Ms as parseCanonicalRuntimeBackground, No as resolveArrangementLookForBlock, Nr as heroTitleSizeOptions, Ns as resolveSectionBackground, Oc as asSiteStyleId, Oo as arrangementLookHooks, Os as anglePolygonCss, Po as resolveLookForBlock, Pr as createAspectRatioField, Ps as sectionForegroundBackground, Qs as toNonEmptyReadonlyArray, Ro as resolveEffectiveArrangement, Rr as asPartialObject, Sc as asHeaderStyleId, So as lookPresentationOnPalette, Ss as boundaryTreatmentForBoundaryOptionId, Ta as readRuntimeNow, Tc as asDesignBlockId, To as generateLookMediaFrameCss, Ts as softBoundaryOption, Uo as filterLayoutProfilesForPolicy, Ur as parseInlineTextFromUnknown, Us as defineFrameCapability, Vr as inlineTextToPlainText, Vs as defineBlockDesignCapability, Wo as filterLookIdsForPolicy, Wr as plainTextToInlineText, Ws as defineNoBlockDesignCapability, Xc as formatBookingPriceDisplay, Xs as sectionBackgroundPaintValues, Yo as compilePageRuntimeFields, Ys as plainFrame, Zo as stripCompiledRuntimeStyleFields, Zs as testimonialsCompositionTreatmentValues, _s as sectionShapeFromContent, ac as parseBlockColorToken, as as getNavLinkPreset, bc as parseGradientPresetId, bo as resolvedItemSurfaceProps, br as MediaPlaceholder, bs as boundaryOptions, cc as headerVariantValues, cs as generateEffectsCSS, ds as navLinkOwnsHoverForeground, ec as opaqueSurfaceDeclarations, es as getGradientPreset, fc as boxBackgroundSchema, fs as navLinkOwnsUnderline, gc as cardVariantRoleValues, gs as sectionShapeForGround, hs as resolvePageDesignBoundaryChoice, ic as TokenResolver, is as footerForegroundCandidates, jo as compileArrangementLookRuntime, jr as systemCustomizeFacetDefinitionsForBlock, js as deriveSectionGround, kc as makeBoundaryId, ko as arrangementStyleAvailability, ks as transitionCatalogueEntries, lc as blockCustomCssRuleSchema, ls as generateInteractiveChildInheritanceCSS, ms as resolvePageDesignBlockLookChoice, nc as surfaceToneFromForegroundToken, ns as generateDefaultCardSystem, oc as sectionStylesOverrideSchema, os as buildTextContrastShadow, pc as runtimeBoxBackgroundSchema, qo as getCuratedSiteStyle, qs as introCompositionTreatmentValues, rc as arrangementSlotNames, rs as generateFooterCss, sc as themeSchema, ss as generateNavLinkCSS, tc as selectLogoVariant, ts as resolveCardRole, uc as customCssRuleSchema, us as navLinkHoverColorCandidate, vs as sectionShapeHook, wa as isBlockButtonRole, wo as selectItemSurfacePresentation, ws as noneBoundaryOption, xc as asHeaderLayoutId, xo as itemRole, xr as computeMediaTransformStyle, xs as boundaryRuntimeMetricsForDecorativeTransition, yc as surfaceCardRoleValues, ys as boundaryOptionForTransitionIntent, zo as resolveModeArrangement, zr as createTransformRegistry, zs as lookModes } from "./display-Cf_j5stk.mjs";
|
|
5
|
+
import { A as eventListTreatmentValues, At as decideLocationSourcePermission, Bt as formatDate, Dt as isRecord$9, F as tileTreatmentValues, Ft as publicLocationSchema, L as eventVenueDrawingSchema, Nt as parseLocationValue, P as isArrangementMode, Pt as projectPublicLocation, Q as isRichTextDoc, Rt as trimmedStringOrNull, V as publicEventsArraySchema, W as bookingConsentCarrierSchema, Y as RichTextDocSchema, a as eventAutoApplyDiscountPreviewSchema, an as resolveBookingBusinessTimeZone, g as eventCalendarListGroupingDecision, h as resolveCalendarReadProfile, it as runtimeMediaSchema, jt as locationValueSchema, kt as WHOLE_SERIES_EVENT_PRESET_VALUES, ln as toUtcIsoDateTimeString, nn as getLocalScheduleDate, nt as mediaSchema, o as publicMembershipProductCollectionSchema, ot as PUBLIC_FILE_FIELD_KINDS, s as publicPassProductCollectionSchema, t as logger, w as resolveEventCalendarReadPlan, yt as calendarWindowQuerySchema, z as publicEventPricingSchema } from "./noop-D5mFWXtN.mjs";
|
|
6
|
+
import { A as assertNever$2 } from "./creditProducts-KYMVIH3J.mjs";
|
|
7
|
+
import { $ as backgroundFrame, $t as chosenString, A as mapDrawingStyleBinding, An as ICON_SIZE_PX, At as cardListKnobFields, B as normalizeMailingListBlockContent, Bt as parseFieldDefinitions, C as checkoutBlockDefinition, Cn as createButtonGroup, Ct as repeat, D as shopBlockDefinition, Dn as ACCORDION_TRIGGER_FONT_SCALE, Dt as text, E as productListBlockDefinition, En as ACCORDION_SPACING_MAP, Et as stack, Fn as resolveRepeaterGridColumnFieldId, Ft as parseBlockIconValue, G as withApiBindings, Gt as eventReadinessQueryKeys, H as formDataSchema, Ht as augmentManifest, In as resolveRepeaterGridRowFieldId, It as createSdkSelectField, J as sectionHeaderLayoutNodes, Jt as eventDiscoveryFilterKeys, K as formCopyFragment, Kt as eventReadinessResultSchema, L as desktopOnlyDisplay, Ln as resolveRepeaterGridSpanFieldId, Lt as createSiteOptionSelectField, M as FEATURE_CARD_GENERATED_ICON_SIZE_PX, Mn as DEFAULT_MEDIA_FIELD_KINDS, Mt as cardListPresentationBindings, N as FEATURE_CARD_ICON_TREATMENTS, Nn as isAcceptedRepeaterGridSpan, Nt as cardListSectionActionFields, O as eventCalendarBlockDefinition, On as ACCORDION_TRIGGER_LETTER_SPACING, Ot as videoEmbed, Pn as parseRepeaterGridInteger, Pt as normalizeCardListContent, Q as sectionContainer, Qt as resolveEventScope, R as mobileOnlyDisplay, Rn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Rt as normalizeSelectSource, S as giftingBlockDefinition, Sn as getAnchorClasses, St as props, T as productDetailBlockDefinition, Tn as ACCORDION_OPEN_ACCENT_THICKNESS, Tt as section, U as createBlockManifest, Ut as eventReadinessLoaderKey, V as formBlockDefinition, Vt as PUBLIC_DOWNLOAD_MEDIA_TYPES, W as formEmbedFragment, Wt as eventReadinessQuery, X as styledSection, Xt as eventScopeQuery, Y as resolveBackgroundColorValue, Yt as eventScopeLoaderParam, Z as styledContainer, Zt as eventScopeQueryKeys, _ as publicAppointmentLocationSchema, _n as layoutField, _t as headerSection, a as buildLoadedOfferingsPreviewListing, an as loadedReadinessFact, at as lookLeadSlotTransform, b as newsletterSignupBlockDefinition, bn as sectionStylesField, bt as link, cn as LOCATION_MAP_DEFAULTS, ct as lookSlot, dn as normalizeLocationMapSource, dt as bookingForm, en as galleryReadiness, et as buildFragmentDataLoaders, fn as resolveLocationMapLocation, ft as button, g as formatAppointmentPrice, gn as eventDisplayFields, gt as form, h as formatAppointmentLocation, hn as emptyStateField, ht as fileDownload, in as hiddenFromVisitors, it as lookCarouselRegionTransform, j as eventRegistrationBlockDefinition, jn as bindingSchema, jt as cardListPhotoNumberFields, k as eventListingBlockDefinition, kn as ICON_CONFIG, kt as when, ln as LOCATION_MAP_LIMITS, lt as accordionList, m as formatAppointmentDuration, mn as columnsField, mt as el, nn as testimonialsReadiness, nt as defineFragment, on as pageTemplateFromEntry, ot as lookQuoteLimitTransform, p as SectionNode, pn as cardStylingFields, pt as carousel, q as sectionHeaderFields, qt as eventWeekReadScope, rn as admitReadinessFacts, rt as cardListSectionAction, s as buildAppointmentServicesView, sn as unavailableReadinessFact, st as lookSkinSlotTransform, t as serverComponentRegistry, tn as teamReadiness, tt as composeFragments, un as normalizeLocationMapProps, ut as bind, v as publicAppointmentPricingSchema, vn as cardStylesField, vt as icon, w as cartBlockDefinition, wn as createButtonVariantField, wt as richText, x as sanitizeNewsletterSignupPublicContent, xn as BACKGROUND_POSITION_PRESET_VALUES, xt as media, y as offeringCourseSlotParents, yn as containerStylesField, yt as inline, z as teamMemberCardBiographyFallback, zn as linkSchema, zt as parseFieldDefinition } from "./registry.server-DdTJyar2.mjs";
|
|
8
|
+
import { $ as solveSurfaceInks, A as DEFAULT_BUTTON_SIZES, C as buttonRadius, Ct as resolveOpaqueSurfaceHex, D as materializeRuntimeButtonAppearance, Dt as contrastRatio, E as buttonTypographyDeclarations, Ft as rgbToHex, G as mergeStyles, H as backgroundColorStyle, It as srgbToOklab, J as textColorValue, K as rgbColorValue, L as mapButtonVisualAppearances, M as FONT_SIZE_MAP, Mt as oklabToOklch, N as generateShadowValue$1, Nt as oklabToSrgb, O as paddingDeclarations, Pt as oklchToHexGamut, S as buttonBorder, St as resolveConcreteColorHex, T as buttonStateAppearanceDeclarations, U as borderColorStyle, W as cssVarValue, X as safeTokenOr, Y as resolveSurfaceForeground, Z as surfaceInkPublication, _t as surfaceInkDeclarations, at as inkReference, b as BUTTON_CONTRAST_POLICY, bt as freezeOwnedThemeValue, ct as planForegroundHover, dt as SURFACE_INK_CSS_VARS, f as compositeHex, ft as surfaceForegroundDeclarations, g as actionVariableFallback, gt as surfaceForegroundValueWithOpacity, ht as surfaceForegroundValue, it as contrastThresholdByPolicy, jt as hexToRgb, k as BORDER_WIDTH_MAP, l as surfaceDecorationColors, lt as DEFAULT_SURFACE_TEXT_COLOR, mt as surfaceForegroundStyle, n as parseSurfaceTree, nt as HOVER_TEXT_THRESHOLD, o as resolveSurface, ot as expandPalette, pt as surfaceForegroundInputFromResolved, q as textColorStyle, r as prepareSurfaceIndex, rt as certifyPaint, ut as SURFACE_FOREGROUND_CSS_VARS, v as compileButtonColourStates, vt as surfaceInkStyle, w as buttonShadow, x as formatButtonColourContractError, xt as ownedThemeSnapshot, y as resolveSolidButtonColour, yt as surfaceInkValue } from "./accessibleSurfaces-DN8it_Cx.mjs";
|
|
9
|
+
import { D as parseThemeColorToken, E as parseColorTokenParts, a as createStandardButtonSurfacePolicy, i as buttonSizeNameSchema, s as unsafeAsOpaqueButtonColourToken, t as DEFAULT_VARIANT_ALIAS_ID } from "./types-DjWUR_O6.mjs";
|
|
10
|
+
import { _ as resolveSpacing, a as hasFixedFrameBackgroundMotion, c as resolveItemCardRole, d as parseRuntimeBackgroundContent, g as resolveSectionMinHeight, h as isSemanticSpacing, i as fixedFrameScopeClass, l as parseBackgroundContent, m as isSectionMinHeight, n as ROUNDED_CLASSES, o as normalizeBoxStylesBorder, p as SEMANTIC_SPACING_VALUES, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles, t as RAISED_SHADOW_CLASS, u as parseBackgroundOverlay } from "./boxStyleClassNames-CrE3TDpW.mjs";
|
|
12
11
|
import { C as parseThemeButtonVariantId, T as AFFORDANCE_SUPPRESS_CLASS, w as themeButtonSelector } from "./ThemedButton-DuaYtnvG.mjs";
|
|
13
12
|
import { t as NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES } from "./navDropdownSizing-CUjDrcIt.mjs";
|
|
14
|
-
import { i as eventHeaderSlotParents, n as resolveEventDetailsPresentation, r as lookPartShown } from "./view-
|
|
15
|
-
import { a as eventItemSlotParents, i as cardItemSlotParents } from "./EventItem-
|
|
16
|
-
import { s as monthSlotParents } from "./CalendarNavigationChevron-
|
|
13
|
+
import { i as eventHeaderSlotParents, n as resolveEventDetailsPresentation, r as lookPartShown } from "./view-D9ObkFtz.mjs";
|
|
14
|
+
import { a as eventItemSlotParents, i as cardItemSlotParents } from "./EventItem-WeUipfIP.mjs";
|
|
15
|
+
import { s as monthSlotParents } from "./CalendarNavigationChevron-Az1-TIEI.mjs";
|
|
17
16
|
import { n as getCurrentResolveImageUrlContext, o as setContextResolveImageUrlContext, t as buildResolveImageUrlContext } from "./mediaContext-Fusweriw.mjs";
|
|
18
|
-
import { n as eventListSlotParents } from "./EventListing.view-
|
|
17
|
+
import { n as eventListSlotParents } from "./EventListing.view-DKFImKOx.mjs";
|
|
19
18
|
import { r as themeRuntimeScopeProps, t as buildThemeDataAttrs } from "./themeScopeUtils-BAOw_fNA.mjs";
|
|
20
|
-
import { t as formatDate$1 } from "./formatDate-
|
|
19
|
+
import { t as formatDate$1 } from "./formatDate-Dp7POa9Y.mjs";
|
|
21
20
|
import { s as declarativeCarouselSlides } from "./carousel.shared-BFQ3kBEw.mjs";
|
|
22
|
-
import { t as coerceRichTextDoc } from "./richText-coerce-
|
|
21
|
+
import { t as coerceRichTextDoc } from "./richText-coerce-C32cRQ03.mjs";
|
|
23
22
|
import { t as resolveBlocksPageMediaContext } from "./mediaAssets-B99AP7ai.mjs";
|
|
24
23
|
import * as React$1 from "react";
|
|
25
24
|
import React from "react";
|
|
@@ -282,18 +281,6 @@ function cloneThemeTokens(source) {
|
|
|
282
281
|
return JSON.parse(JSON.stringify(source));
|
|
283
282
|
}
|
|
284
283
|
//#endregion
|
|
285
|
-
//#region ../theme-core/src/tokens/blockColorTokens.ts
|
|
286
|
-
const blockColorTokenNameSet = new Set(blockColorTokenNames);
|
|
287
|
-
function isBlockColorToken(value) {
|
|
288
|
-
if (typeof value !== "string") return false;
|
|
289
|
-
const parts = parseColorTokenParts(value);
|
|
290
|
-
return parts.kind === "token" && blockColorTokenNameSet.has(parts.token);
|
|
291
|
-
}
|
|
292
|
-
function parseBlockColorToken(value) {
|
|
293
|
-
if (!isBlockColorToken(value)) return null;
|
|
294
|
-
return value.trim();
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
284
|
//#region ../theme-core/src/surfaces/mapDrawingTokens.ts
|
|
298
285
|
/**
|
|
299
286
|
* The one map token contract (issue 1611). Drawings carry semantic classes only;
|
|
@@ -831,22 +818,6 @@ function requireThemeColorToken(value) {
|
|
|
831
818
|
return token;
|
|
832
819
|
}
|
|
833
820
|
//#endregion
|
|
834
|
-
//#region ../theme-core/src/header/rootPaint.ts
|
|
835
|
-
/** Detached branding needs protection even when the navigation has its own rail. */
|
|
836
|
-
function headerNeedsPhotoShade(header) {
|
|
837
|
-
return header.variant === "floating" && header.background?.type === "color" && header.background.color === "transparent" && (!header.container || (header.container.opacity ?? 1) < 1);
|
|
838
|
-
}
|
|
839
|
-
/** The nav container takes precedence when a floating header also has one. */
|
|
840
|
-
function headerRootPaint(header) {
|
|
841
|
-
const navContainerType = header?.navContainer?.type ?? "none";
|
|
842
|
-
if (navContainerType === "glass" || navContainerType === "pill") return "contained-nav";
|
|
843
|
-
return header?.variant === "floating" ? "overlay" : "own-surface";
|
|
844
|
-
}
|
|
845
|
-
/** The root is transparent for detached chrome or an explicitly transparent bar. */
|
|
846
|
-
function headerRootIsTransparent(header) {
|
|
847
|
-
return headerRootPaint(header) !== "own-surface" || header?.background?.type === "color" && header.background.color === "transparent";
|
|
848
|
-
}
|
|
849
|
-
//#endregion
|
|
850
821
|
//#region ../theme-core/src/cards/constants.ts
|
|
851
822
|
/**
|
|
852
823
|
* Corner style to border-radius value map for content-bearing card surfaces.
|
|
@@ -2044,6 +2015,22 @@ const headerStyleCatalog = defineExactCatalog()([
|
|
|
2044
2015
|
new Map(headerLayoutCatalog.map((layout) => [layout.id, layout]));
|
|
2045
2016
|
new Map(headerStyleCatalog.map((style) => [style.id, style]));
|
|
2046
2017
|
//#endregion
|
|
2018
|
+
//#region ../theme-core/src/header/rootPaint.ts
|
|
2019
|
+
/** Detached branding needs protection even when the navigation has its own rail. */
|
|
2020
|
+
function headerNeedsPhotoShade(header) {
|
|
2021
|
+
return header.variant === "floating" && header.background?.type === "color" && header.background.color === "transparent" && (!header.container || (header.container.opacity ?? 1) < 1);
|
|
2022
|
+
}
|
|
2023
|
+
/** The nav container takes precedence when a floating header also has one. */
|
|
2024
|
+
function headerRootPaint(header) {
|
|
2025
|
+
const navContainerType = header?.navContainer?.type ?? "none";
|
|
2026
|
+
if (navContainerType === "glass" || navContainerType === "pill") return "contained-nav";
|
|
2027
|
+
return header?.variant === "floating" ? "overlay" : "own-surface";
|
|
2028
|
+
}
|
|
2029
|
+
/** The root is transparent for detached chrome or an explicitly transparent bar. */
|
|
2030
|
+
function headerRootIsTransparent(header) {
|
|
2031
|
+
return headerRootPaint(header) !== "own-surface" || header?.background?.type === "color" && header.background.color === "transparent";
|
|
2032
|
+
}
|
|
2033
|
+
//#endregion
|
|
2047
2034
|
//#region ../theme-core/src/site-styles/siteChromeNavPreferences.ts
|
|
2048
2035
|
/**
|
|
2049
2036
|
* Applies the user's nav font-role/size overrides on top of a style-resolved
|
|
@@ -3337,6 +3324,18 @@ function transparentHeaderForegroundInput(header, palette) {
|
|
|
3337
3324
|
return authoredTransparentHeaderForegroundInput(header, palette);
|
|
3338
3325
|
}
|
|
3339
3326
|
function authoredTransparentHeaderForegroundInput(header, palette) {
|
|
3327
|
+
const text = headerLeafTextColor(header);
|
|
3328
|
+
const links = authoredHeaderLinkForeground(header, palette);
|
|
3329
|
+
const style = effectiveHeaderNavLinkStyle(header);
|
|
3330
|
+
return {
|
|
3331
|
+
text: rgbColorValue(text),
|
|
3332
|
+
link: rgbColorValue(links.link),
|
|
3333
|
+
linkHover: rgbColorValue(links.linkHover),
|
|
3334
|
+
hoverDecoration: navLinkOwnsUnderline(style) ? "initial" : links.hoverDecoration
|
|
3335
|
+
};
|
|
3336
|
+
}
|
|
3337
|
+
/** The token decision behind transparent-header CSS, also read by effect measurements. */
|
|
3338
|
+
function authoredHeaderLinkForeground(header, palette) {
|
|
3340
3339
|
const text = headerLeafTextColor(header);
|
|
3341
3340
|
const style = effectiveHeaderNavLinkStyle(header);
|
|
3342
3341
|
const link = style?.colorToken ?? text;
|
|
@@ -3349,10 +3348,9 @@ function authoredTransparentHeaderForegroundInput(header, palette) {
|
|
|
3349
3348
|
backdrops: null
|
|
3350
3349
|
});
|
|
3351
3350
|
return {
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
hoverDecoration: navLinkOwnsUnderline(style) ? "initial" : hover.decoration
|
|
3351
|
+
link,
|
|
3352
|
+
linkHover: hover.token,
|
|
3353
|
+
hoverDecoration: hover.decoration
|
|
3356
3354
|
};
|
|
3357
3355
|
}
|
|
3358
3356
|
//#endregion
|
|
@@ -3611,64 +3609,41 @@ function certified(states) {
|
|
|
3611
3609
|
}
|
|
3612
3610
|
//#endregion
|
|
3613
3611
|
//#region ../theme-core/src/footer/footerForegrounds.ts
|
|
3614
|
-
|
|
3612
|
+
const defaultMainPaint = { ground: "surface" };
|
|
3613
|
+
/** The main ground: the footer's own, which the root paints and every unpainted area shows. */
|
|
3614
|
+
function footerMainPaint(footer) {
|
|
3615
|
+
return footer?.bands?.main ?? defaultMainPaint;
|
|
3616
|
+
}
|
|
3617
|
+
/** A side area's own paint, or null when it sits on the main ground under a rule. */
|
|
3618
|
+
function footerSideBandPaint(footer, band) {
|
|
3619
|
+
return footer?.bands?.[band] ?? null;
|
|
3620
|
+
}
|
|
3621
|
+
/** The footer's main ground and the foreground contract certified on it. */
|
|
3615
3622
|
function resolveFooterRootForeground(footer, palette, proseHoverCandidate) {
|
|
3616
|
-
return resolveSurfaceForeground(
|
|
3623
|
+
return resolveSurfaceForeground({
|
|
3617
3624
|
type: "color",
|
|
3618
|
-
color:
|
|
3625
|
+
color: footerMainPaint(footer).ground
|
|
3619
3626
|
}, palette, footerForegroundCandidates(footer, proseHoverCandidate), { compositeBase: "background" });
|
|
3620
3627
|
}
|
|
3621
|
-
function resolveFooterBottomBarPaint(footer, palette) {
|
|
3622
|
-
const bar = footer.bottomBar;
|
|
3623
|
-
if (!bar) return { kind: "inherits" };
|
|
3624
|
-
const root = resolveFooterRootForeground(footer, palette);
|
|
3625
|
-
const ground = root.kind === "known" && root.provenance.kind === "measured" ? root.provenance.backdropHex : null;
|
|
3626
|
-
return bar.background?.type === "color" ? {
|
|
3627
|
-
kind: "surface",
|
|
3628
|
-
foreground: barSurfaceForeground(footer, bar.background, ground, palette)
|
|
3629
|
-
} : barTextPaint(footer, root, ground, palette);
|
|
3630
|
-
}
|
|
3631
|
-
/** A bar with its own colour owns a contract, composited over the footer's measured ground. */
|
|
3632
|
-
function barSurfaceForeground(footer, background, ground, palette) {
|
|
3633
|
-
const bar = footer.bottomBar;
|
|
3634
|
-
return resolveSurfaceForeground(background, palette, {
|
|
3635
|
-
text: bar?.textColor,
|
|
3636
|
-
link: footer.bottomTextLinkStyle?.colorToken ?? bar?.textColor,
|
|
3637
|
-
linkHover: footer.bottomTextLinkStyle?.hoverColorToken
|
|
3638
|
-
}, { compositeBase: ground });
|
|
3639
|
-
}
|
|
3640
|
-
/** A bar without its own colour paints its declared text on the footer's ground. */
|
|
3641
|
-
function barTextPaint(footer, root, ground, palette) {
|
|
3642
|
-
const declared = footer.bottomBar?.textColor;
|
|
3643
|
-
if (footer.background?.contentOwner === "site-chrome-editor" || !declared) return { kind: "inherits" };
|
|
3644
|
-
if (!ground) return {
|
|
3645
|
-
kind: "unmeasured",
|
|
3646
|
-
declared
|
|
3647
|
-
};
|
|
3648
|
-
return {
|
|
3649
|
-
kind: "ink",
|
|
3650
|
-
declared,
|
|
3651
|
-
paint: certifyPaint("footer bottom bar text", paintedInk(declared, root), contrastThresholdByPolicy["body-aa"], ground, { palette })
|
|
3652
|
-
};
|
|
3653
|
-
}
|
|
3654
3628
|
/**
|
|
3655
|
-
*
|
|
3656
|
-
*
|
|
3629
|
+
* A painted side area's own foreground contract, composited over the main
|
|
3630
|
+
* ground; null when the area is unpainted and the main contract carries on.
|
|
3631
|
+
* The base's links try the legal link colour first.
|
|
3657
3632
|
*/
|
|
3658
|
-
function
|
|
3659
|
-
const
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
const
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3633
|
+
function resolveFooterSideBandForeground(footer, band, palette, proseHoverCandidate) {
|
|
3634
|
+
const paint = footerSideBandPaint(footer, band);
|
|
3635
|
+
if (!paint) return null;
|
|
3636
|
+
const root = resolveFooterRootForeground(footer, palette, proseHoverCandidate);
|
|
3637
|
+
const mainGround = root.kind === "known" && root.provenance.kind === "measured" ? root.provenance.backdropHex : null;
|
|
3638
|
+
const legalLinks = band === "base" ? footer?.bottomTextLinkStyle : void 0;
|
|
3639
|
+
return resolveSurfaceForeground({
|
|
3640
|
+
type: "color",
|
|
3641
|
+
color: paint.ground
|
|
3642
|
+
}, palette, {
|
|
3643
|
+
text: paint.textColor,
|
|
3644
|
+
link: legalLinks?.colorToken ?? paint.textColor,
|
|
3645
|
+
linkHover: legalLinks ? legalLinks.hoverColorToken : footerForegroundCandidates(footer, proseHoverCandidate).linkHover
|
|
3646
|
+
}, { compositeBase: mainGround });
|
|
3672
3647
|
}
|
|
3673
3648
|
//#endregion
|
|
3674
3649
|
//#region ../theme-core/src/header/dropdownSurface.ts
|
|
@@ -5269,6 +5244,23 @@ function generateCheckableCss(input) {
|
|
|
5269
5244
|
].join("\n\n");
|
|
5270
5245
|
}
|
|
5271
5246
|
//#endregion
|
|
5247
|
+
//#region ../theme-core/src/inputs/inputEdge.ts
|
|
5248
|
+
/**
|
|
5249
|
+
* Field edges and errors as properties of the field itself (#1676). Declared on
|
|
5250
|
+
* the field, the control ink resolves against the surface the field sits on,
|
|
5251
|
+
* and arrangement CSS can read both without knowing the theme's tokens.
|
|
5252
|
+
*/
|
|
5253
|
+
const INPUT_EDGE_COLOR_VAR = "--rb-input-edge-color";
|
|
5254
|
+
const INPUT_ERROR_BORDER_COLOR_VAR = "--rb-input-error-border-color";
|
|
5255
|
+
/**
|
|
5256
|
+
* The style's own border colour, held at 3:1 against the surface where one is
|
|
5257
|
+
* published. A border drawn from another token keeps that token as it is.
|
|
5258
|
+
*/
|
|
5259
|
+
function inputEdgeColorValue(borderColorToken) {
|
|
5260
|
+
const own = rgbColorValue(borderColorToken);
|
|
5261
|
+
return borderColorToken === "border" ? surfaceInkValue("control", own) : own;
|
|
5262
|
+
}
|
|
5263
|
+
//#endregion
|
|
5272
5264
|
//#region ../theme-core/src/inputs/inputGroup.ts
|
|
5273
5265
|
/**
|
|
5274
5266
|
* Input group: a field and an action (usually a themed button) sharing one
|
|
@@ -5380,10 +5372,12 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
5380
5372
|
baseInputRules.push(`color: ${rgbColorValue(inputSystem.base.textColorToken)}`);
|
|
5381
5373
|
const borderPx = parseBorderWidth(inputSystem.base.border.widthClass);
|
|
5382
5374
|
const borderStyle = inputSystem.base.border.style ?? "all";
|
|
5375
|
+
baseInputRules.push(`${INPUT_EDGE_COLOR_VAR}: ${inputEdgeColorValue(inputSystem.base.border.colorToken)}`);
|
|
5376
|
+
baseInputRules.push(`${INPUT_ERROR_BORDER_COLOR_VAR}: ${rgbColorValue(inputSystem.error.borderColorToken)}`);
|
|
5383
5377
|
if (borderStyle === "underline") {
|
|
5384
5378
|
baseInputRules.push("border: none");
|
|
5385
|
-
baseInputRules.push(`border-bottom: ${borderPx} solid ${
|
|
5386
|
-
} else baseInputRules.push(`border: ${borderPx} solid ${
|
|
5379
|
+
baseInputRules.push(`border-bottom: ${borderPx} solid var(${INPUT_EDGE_COLOR_VAR})`);
|
|
5380
|
+
} else baseInputRules.push(`border: ${borderPx} solid var(${INPUT_EDGE_COLOR_VAR})`);
|
|
5387
5381
|
if (borderStyle === "underline") baseInputRules.push("border-radius: 0");
|
|
5388
5382
|
else {
|
|
5389
5383
|
const borderRadius = CORNER_MAP$1[inputSystem.base.corners ?? theme.corners];
|
|
@@ -5446,7 +5440,7 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
5446
5440
|
`${rootSelector} ${INPUT_GROUP_ERROR_SELECTOR}`
|
|
5447
5441
|
];
|
|
5448
5442
|
const errorRules = [];
|
|
5449
|
-
errorRules.push(`border-color: ${
|
|
5443
|
+
errorRules.push(`border-color: var(${INPUT_ERROR_BORDER_COLOR_VAR})`);
|
|
5450
5444
|
errorRules.push(`color: ${rgbColorValue(inputSystem.error.textColorToken)}`);
|
|
5451
5445
|
const disabledSelectors = [
|
|
5452
5446
|
`${inputSelector}:disabled`,
|
|
@@ -5461,7 +5455,7 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
5461
5455
|
const checkableCss = generateCheckableCss({
|
|
5462
5456
|
root: rootSelector,
|
|
5463
5457
|
borderWidth: borderPx,
|
|
5464
|
-
borderColor:
|
|
5458
|
+
borderColor: inputEdgeColorValue(inputSystem.base.border.colorToken),
|
|
5465
5459
|
background: inputBackgroundValue(inputSystem.base.background),
|
|
5466
5460
|
corners: inputSystem.base.corners ?? theme.corners,
|
|
5467
5461
|
accentToken: inputSystem.focus.borderColorToken ?? inputSystem.focus.ringColorToken,
|
|
@@ -5917,6 +5911,239 @@ function buildHeaderSurfaceRules(header, tokens) {
|
|
|
5917
5911
|
};
|
|
5918
5912
|
}
|
|
5919
5913
|
//#endregion
|
|
5914
|
+
//#region ../theme-core/src/navigation/effectContrast.ts
|
|
5915
|
+
/** Only a known solid ground and known ink can justify a runtime correction. */
|
|
5916
|
+
function decideNavEffectContrast(paint, ink, request) {
|
|
5917
|
+
if (paint === null || ink === null) return { kind: "unchanged" };
|
|
5918
|
+
return request.effect === "gradient-text" ? decideGradient(paint, ink, request) : decideOpacity(paint, ink, request.option);
|
|
5919
|
+
}
|
|
5920
|
+
function decideGradient(paint, ink, request) {
|
|
5921
|
+
if (request.option.length === 0 || request.option.some((stop) => stop === null)) return { kind: "unchanged" };
|
|
5922
|
+
const threshold = request.state === "hover" ? HOVER_TEXT_THRESHOLD : contrastThresholdByPolicy["body-aa"];
|
|
5923
|
+
if (request.option.every((stop) => stop !== null && contrastRatio(stop, paint) >= threshold)) return { kind: "gradient" };
|
|
5924
|
+
return { kind: inkContrast(ink, 1, paint) >= threshold ? "plain" : "unchanged" };
|
|
5925
|
+
}
|
|
5926
|
+
function decideOpacity(paint, ink, authored) {
|
|
5927
|
+
const passes = (opacity) => inkContrast(ink, opacity, paint) >= HOVER_TEXT_THRESHOLD;
|
|
5928
|
+
if (!passes(1)) return { kind: "unchanged" };
|
|
5929
|
+
return {
|
|
5930
|
+
kind: "opacity",
|
|
5931
|
+
opacity: passes(authored) ? authored : opacityFloor(passes, 0, 1, 24)
|
|
5932
|
+
};
|
|
5933
|
+
}
|
|
5934
|
+
function inkContrast(ink, opacity, paint) {
|
|
5935
|
+
return contrastRatio(compositeHex(ink.hex, ink.opacity * opacity, paint), paint);
|
|
5936
|
+
}
|
|
5937
|
+
/** Keep the passing end of the search so rounding never lowers the floor. */
|
|
5938
|
+
function opacityFloor(passes, low, high, steps) {
|
|
5939
|
+
if (steps === 0) return high;
|
|
5940
|
+
const midpoint = (low + high) / 2;
|
|
5941
|
+
return passes(midpoint) ? opacityFloor(passes, low, midpoint, steps - 1) : opacityFloor(passes, midpoint, high, steps - 1);
|
|
5942
|
+
}
|
|
5943
|
+
//#endregion
|
|
5944
|
+
//#region ../theme-core/src/navigation/renderedNavEffects.ts
|
|
5945
|
+
const NAV_RENDERED_STATES = [
|
|
5946
|
+
"rest",
|
|
5947
|
+
"hover",
|
|
5948
|
+
"current",
|
|
5949
|
+
"current-hover"
|
|
5950
|
+
];
|
|
5951
|
+
function isNavHover(state) {
|
|
5952
|
+
return state === "hover" || state === "current-hover";
|
|
5953
|
+
}
|
|
5954
|
+
function isCurrent(state) {
|
|
5955
|
+
return state === "current" || state === "current-hover";
|
|
5956
|
+
}
|
|
5957
|
+
/** Mirrors the historical emitters: every group writes a base gradient and hover opacity;
|
|
5958
|
+
* active groups additionally write the more specific current-page selector. */
|
|
5959
|
+
function resolveRenderedNavEffects(effects, state) {
|
|
5960
|
+
const applications = [
|
|
5961
|
+
"base",
|
|
5962
|
+
"hover",
|
|
5963
|
+
"active",
|
|
5964
|
+
"focus"
|
|
5965
|
+
].flatMap((group) => (effects?.[group] ?? []).map((effect) => ({
|
|
5966
|
+
effect,
|
|
5967
|
+
group
|
|
5968
|
+
})));
|
|
5969
|
+
const opacity = winner(applications.filter(({ effect }) => effect.effectId === "fade-background" || effect.effectId === "opacity-reduce").flatMap((app) => opacityCandidates(app, state)));
|
|
5970
|
+
return {
|
|
5971
|
+
text: winner(applications.filter(({ effect }) => effect.effectId === "gradient-text").flatMap((app) => textCandidates(app, state))),
|
|
5972
|
+
opacity: opacity ? authoredOpacity(opacity) : null
|
|
5973
|
+
};
|
|
5974
|
+
}
|
|
5975
|
+
function authoredOpacity(effect) {
|
|
5976
|
+
const options = effect.options ?? {};
|
|
5977
|
+
const opacity = effect.effectId === "fade-background" ? Number(options.opacity || 80) / 100 : 1 - Number(options.reduction || 15) / 100;
|
|
5978
|
+
return Number.isFinite(opacity) && opacity >= 0 && opacity <= 1 ? opacity : null;
|
|
5979
|
+
}
|
|
5980
|
+
function textCandidates(app, state) {
|
|
5981
|
+
const gradient = {
|
|
5982
|
+
effect: app.effect,
|
|
5983
|
+
fill: "gradient"
|
|
5984
|
+
};
|
|
5985
|
+
const solid = {
|
|
5986
|
+
effect: app.effect,
|
|
5987
|
+
fill: "solid"
|
|
5988
|
+
};
|
|
5989
|
+
const solidOnHover = app.effect.options?.solidOnHover === true || app.effect.options?.solidOnHover === "true";
|
|
5990
|
+
const hover = isNavHover(state) && solidOnHover ? [{
|
|
5991
|
+
value: solid,
|
|
5992
|
+
specificity: 2
|
|
5993
|
+
}] : [];
|
|
5994
|
+
const currentHover = isNavHover(state) && solidOnHover ? [{
|
|
5995
|
+
value: solid,
|
|
5996
|
+
specificity: 3
|
|
5997
|
+
}] : [];
|
|
5998
|
+
const current = isCurrent(state) && app.group === "active" ? [{
|
|
5999
|
+
value: gradient,
|
|
6000
|
+
specificity: 2
|
|
6001
|
+
}, ...currentHover] : [];
|
|
6002
|
+
return [
|
|
6003
|
+
{
|
|
6004
|
+
value: gradient,
|
|
6005
|
+
specificity: 1
|
|
6006
|
+
},
|
|
6007
|
+
...hover,
|
|
6008
|
+
...current
|
|
6009
|
+
];
|
|
6010
|
+
}
|
|
6011
|
+
function opacityCandidates(app, state) {
|
|
6012
|
+
if (!isNavHover(state)) return [];
|
|
6013
|
+
const current = isCurrent(state) && app.group === "active" ? [{
|
|
6014
|
+
value: app.effect,
|
|
6015
|
+
specificity: 3
|
|
6016
|
+
}] : [];
|
|
6017
|
+
return [{
|
|
6018
|
+
value: app.effect,
|
|
6019
|
+
specificity: 2
|
|
6020
|
+
}, ...current];
|
|
6021
|
+
}
|
|
6022
|
+
/** Later declarations win equal specificity, just as they do in the emitted CSS. */
|
|
6023
|
+
function winner(candidates) {
|
|
6024
|
+
return candidates.reduce((chosen, candidate) => chosen === null || candidate.specificity >= chosen.specificity ? candidate : chosen, null)?.value ?? null;
|
|
6025
|
+
}
|
|
6026
|
+
//#endregion
|
|
6027
|
+
//#region ../theme-core/src/header/navEffectPaint.ts
|
|
6028
|
+
const TEXT_ONLY_EFFECTS = /* @__PURE__ */ new Set([
|
|
6029
|
+
"gradient-text",
|
|
6030
|
+
"fade-background",
|
|
6031
|
+
"opacity-reduce",
|
|
6032
|
+
"text-color-change",
|
|
6033
|
+
"nav-underline",
|
|
6034
|
+
"border-bottom-grow",
|
|
6035
|
+
"border-color-change",
|
|
6036
|
+
"scale-up",
|
|
6037
|
+
"scale-down",
|
|
6038
|
+
"lift",
|
|
6039
|
+
"press-down",
|
|
6040
|
+
"pop"
|
|
6041
|
+
]);
|
|
6042
|
+
/** No backdrop sampling or compositing: only an explicitly opaque, image-free paint. */
|
|
6043
|
+
function resolveCorrectableNavPaint(header, style, palette) {
|
|
6044
|
+
if (header.background.type !== "color" || header.scrollTreatment) return null;
|
|
6045
|
+
if (Object.values(style.effects ?? {}).flatMap((group) => group ?? []).some((effect) => !TEXT_ONLY_EFFECTS.has(effect.effectId))) return null;
|
|
6046
|
+
const reference = solidPaintReference(header);
|
|
6047
|
+
return reference ? resolveConcreteColorHex(reference, palette) : null;
|
|
6048
|
+
}
|
|
6049
|
+
function solidPaintReference(header) {
|
|
6050
|
+
const nav = header.navContainer;
|
|
6051
|
+
if (nav?.type === "glass") return null;
|
|
6052
|
+
if (nav?.type === "pill") return nav.tint ? opaqueTint(nav.tint, nav.opacity) : "surface";
|
|
6053
|
+
if (header.variant !== "floating") return header.background.color || "surface";
|
|
6054
|
+
const frame = header.container;
|
|
6055
|
+
return frame ? opaqueTint(frame.tint ?? "raw:#ffffff", frame.opacity) : null;
|
|
6056
|
+
}
|
|
6057
|
+
function opaqueTint(tint, opacity) {
|
|
6058
|
+
return typeof opacity === "number" && opacity >= 1 ? tint : null;
|
|
6059
|
+
}
|
|
6060
|
+
//#endregion
|
|
6061
|
+
//#region ../theme-core/src/header/navEffectContrast.ts
|
|
6062
|
+
/** The only effects changed are the winners in four disjoint rendered states. */
|
|
6063
|
+
function generateHeaderNavEffectContrastCss(header, style, theme, themeId) {
|
|
6064
|
+
const palette = expandPalette(theme.palette);
|
|
6065
|
+
const paint = resolveCorrectableNavPaint(header, style, palette);
|
|
6066
|
+
if (paint === null) return "";
|
|
6067
|
+
const foreground = resolveHeaderRootForeground(header, palette, headerRootIsTransparent(header));
|
|
6068
|
+
const context = {
|
|
6069
|
+
paint,
|
|
6070
|
+
palette,
|
|
6071
|
+
links: foreground.kind === "known" ? foreground.roles : authoredHeaderLinkForeground(header, palette)
|
|
6072
|
+
};
|
|
6073
|
+
const selector = `:where([data-theme-scope="${themeId}"]) .header-root .header-nav-row .header-nav-link`;
|
|
6074
|
+
return NAV_RENDERED_STATES.map((state) => stateCorrection(style, state, context, selector)).join("");
|
|
6075
|
+
}
|
|
6076
|
+
function stateCorrection(style, state, context, selector) {
|
|
6077
|
+
const winners = resolveRenderedNavEffects(style.effects, state);
|
|
6078
|
+
const plainInk = resolveInk(state === "rest" ? context.links.link : context.links.linkHover, context.palette);
|
|
6079
|
+
const text = planText(winners.text, plainInk, state, context);
|
|
6080
|
+
const rules = [...text.rules, ...opacityRules(winners.opacity, text.inks, context.paint)];
|
|
6081
|
+
return rules.length ? `\n${stateSelector(selector, state)} {\n ${rules.join("\n ")}\n}\n` : "";
|
|
6082
|
+
}
|
|
6083
|
+
function planText(text, plainInk, state, context) {
|
|
6084
|
+
if (!text) return {
|
|
6085
|
+
rules: [],
|
|
6086
|
+
inks: [plainInk]
|
|
6087
|
+
};
|
|
6088
|
+
const stops = renderedTextStops(text, context.palette);
|
|
6089
|
+
if (decideNavEffectContrast(context.paint, plainInk, {
|
|
6090
|
+
effect: "gradient-text",
|
|
6091
|
+
option: stops,
|
|
6092
|
+
state: isNavHover(state) ? "hover" : "rest"
|
|
6093
|
+
}).kind === "plain") return {
|
|
6094
|
+
rules: [
|
|
6095
|
+
"background-image: none;",
|
|
6096
|
+
"-webkit-background-clip: border-box;",
|
|
6097
|
+
"background-clip: border-box;",
|
|
6098
|
+
"-webkit-text-fill-color: currentColor;"
|
|
6099
|
+
],
|
|
6100
|
+
inks: [plainInk]
|
|
6101
|
+
};
|
|
6102
|
+
return {
|
|
6103
|
+
rules: [],
|
|
6104
|
+
inks: stops.map((hex) => hex ? {
|
|
6105
|
+
hex,
|
|
6106
|
+
opacity: 1
|
|
6107
|
+
} : null)
|
|
6108
|
+
};
|
|
6109
|
+
}
|
|
6110
|
+
function renderedTextStops(text, palette) {
|
|
6111
|
+
if (text.fill === "solid") return [resolveConcreteColorHex("neutral-50", palette)];
|
|
6112
|
+
const colors = text.effect.options?.gradientColors;
|
|
6113
|
+
return (typeof colors === "string" && colors ? colors.split(",").map((token) => token.trim()) : [
|
|
6114
|
+
"primary-400",
|
|
6115
|
+
"secondary-400",
|
|
6116
|
+
"accent-400"
|
|
6117
|
+
]).map((token) => resolveConcreteColorHex(token, palette));
|
|
6118
|
+
}
|
|
6119
|
+
function opacityRules(authored, inks, paint) {
|
|
6120
|
+
if (authored === null || inks.length === 0 || inks.some((ink) => ink === null)) return [];
|
|
6121
|
+
const decisions = inks.map((ink) => decideNavEffectContrast(paint, ink, {
|
|
6122
|
+
effect: "fade-background",
|
|
6123
|
+
option: authored
|
|
6124
|
+
}));
|
|
6125
|
+
if (decisions.some((decision) => decision.kind !== "opacity")) return [];
|
|
6126
|
+
const effective = Math.max(...decisions.map((decision) => decision.kind === "opacity" ? decision.opacity : authored));
|
|
6127
|
+
return effective === authored ? [] : [`opacity: ${effective};`];
|
|
6128
|
+
}
|
|
6129
|
+
function stateSelector(selector, state) {
|
|
6130
|
+
switch (state) {
|
|
6131
|
+
case "rest": return `${selector}:not([data-active="true"]):not(:hover):not(:active)`;
|
|
6132
|
+
case "hover": return `${selector}:not([data-active="true"]):hover`;
|
|
6133
|
+
case "current": return `${selector}[data-active="true"]:not(:hover)`;
|
|
6134
|
+
case "current-hover": return `${selector}[data-active="true"]:hover`;
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6137
|
+
function resolveInk(reference, palette) {
|
|
6138
|
+
const parts = parseColorTokenParts(reference);
|
|
6139
|
+
const hex = resolveConcreteColorHex(parts.kind === "token" ? parts.token : reference, palette);
|
|
6140
|
+
const opacity = parts.kind === "token" && parts.opacityPercent !== null ? parts.opacityPercent / 100 : 1;
|
|
6141
|
+
return hex ? {
|
|
6142
|
+
hex,
|
|
6143
|
+
opacity
|
|
6144
|
+
} : null;
|
|
6145
|
+
}
|
|
6146
|
+
//#endregion
|
|
5920
6147
|
//#region ../theme-core/src/header/generateHeaderNavLinkStyles.ts
|
|
5921
6148
|
function generateHeaderNavLinkStyles(header, themeId, tokens, theme, contrastTreatment, navTextSize) {
|
|
5922
6149
|
const style = effectiveHeaderNavLinkStyle(header, contrastTreatment, navTextSize);
|
|
@@ -5924,19 +6151,20 @@ function generateHeaderNavLinkStyles(header, themeId, tokens, theme, contrastTre
|
|
|
5924
6151
|
console.warn(`[generateHeaderCss] Nav link preset not found: ${header.navStyle}`);
|
|
5925
6152
|
return "";
|
|
5926
6153
|
}
|
|
6154
|
+
const renderedStyle = mergeHeaderNavTypographyPreference(style, {
|
|
6155
|
+
typography: header.navFontRole ?? "inherit",
|
|
6156
|
+
fontSize: readHeaderNavFontSizePreference(header.navTextSize),
|
|
6157
|
+
interactionPalette: header.interactionPalette ?? "recommended"
|
|
6158
|
+
});
|
|
5927
6159
|
return generateNavLinkCSS({
|
|
5928
6160
|
themeId,
|
|
5929
6161
|
tokens,
|
|
5930
6162
|
theme,
|
|
5931
|
-
style:
|
|
5932
|
-
typography: header.navFontRole ?? "inherit",
|
|
5933
|
-
fontSize: readHeaderNavFontSizePreference(header.navTextSize),
|
|
5934
|
-
interactionPalette: header.interactionPalette ?? "recommended"
|
|
5935
|
-
}),
|
|
6163
|
+
style: renderedStyle,
|
|
5936
6164
|
className: "header-nav-link",
|
|
5937
6165
|
surfaceDependent: true,
|
|
5938
6166
|
surfaceRestingColor: header.background?.contentOwner === siteChromeBackgroundOverrideOwner
|
|
5939
|
-
});
|
|
6167
|
+
}) + generateHeaderNavEffectContrastCss(header, renderedStyle, theme, themeId);
|
|
5940
6168
|
}
|
|
5941
6169
|
//#endregion
|
|
5942
6170
|
//#region ../theme-core/src/header/generateHeaderLogoStyles.ts
|
|
@@ -6511,6 +6739,11 @@ const placementRules = {
|
|
|
6511
6739
|
band: null
|
|
6512
6740
|
}
|
|
6513
6741
|
};
|
|
6742
|
+
/**
|
|
6743
|
+
* A block's own section, whatever skin slot it carries, so a reserve reaches
|
|
6744
|
+
* the schedule and shop sections too.
|
|
6745
|
+
*/
|
|
6746
|
+
const blockSection = ":where([data-slot='section'], [data-slot='schedule-section'], [data-slot='shop-section'])";
|
|
6514
6747
|
function generateBoundaryCss(selector) {
|
|
6515
6748
|
const boundary = `${selector} [data-block-boundary]`;
|
|
6516
6749
|
return [
|
|
@@ -6520,8 +6753,8 @@ function generateBoundaryCss(selector) {
|
|
|
6520
6753
|
"height: 0;",
|
|
6521
6754
|
"pointer-events: none;"
|
|
6522
6755
|
]),
|
|
6523
|
-
rule(`${selector} [data-block][data-site-style-boundary-before] >
|
|
6524
|
-
rule(`${selector} [data-block][data-site-style-boundary-after] >
|
|
6756
|
+
rule(`${selector} [data-block][data-site-style-boundary-before] > ${blockSection}`, ["padding-top: calc(var(--rb-section-pad-y, 0rem) + var(--site-style-boundary-before-reserve, 0rem));"]),
|
|
6757
|
+
rule(`${selector} [data-block][data-site-style-boundary-after] > ${blockSection}`, ["padding-bottom: calc(var(--rb-section-pad-y, 0rem) + var(--site-style-boundary-after-reserve, 0rem));"]),
|
|
6525
6758
|
rule(`${boundary}::before,\n${boundary}::after`, [
|
|
6526
6759
|
"content: '';",
|
|
6527
6760
|
"position: absolute;",
|
|
@@ -6533,9 +6766,28 @@ function generateBoundaryCss(selector) {
|
|
|
6533
6766
|
rule(`${boundary}::before`, ["z-index: 0;", "background: var(--boundary-band-paint, transparent);"]),
|
|
6534
6767
|
rule(`${boundary}::after`, ["z-index: 1;"]),
|
|
6535
6768
|
...placementCss(boundary),
|
|
6536
|
-
...transitionCatalogueEntries.flatMap((entry) => treatmentCss(boundary, entry))
|
|
6769
|
+
...transitionCatalogueEntries.flatMap((entry) => treatmentCss(boundary, entry)),
|
|
6770
|
+
...transitionCatalogueEntries.flatMap((entry) => footerEdgeReserveCss(selector, entry))
|
|
6537
6771
|
].join("\n\n");
|
|
6538
6772
|
}
|
|
6773
|
+
/**
|
|
6774
|
+
* The footer's edge rises into the last section of the page flow, which can't
|
|
6775
|
+
* see the footer, so the reserve is keyed on the edge being on the page. The
|
|
6776
|
+
* page renderer marks that section's block as the page ending. When custom
|
|
6777
|
+
* footer blocks intervene, document adapters mark their region so only their
|
|
6778
|
+
* ending receives the reserve (and an empty region falls back to the page).
|
|
6779
|
+
*
|
|
6780
|
+
* Pages that don't come from the page renderer (privacy, terms, checkout, the
|
|
6781
|
+
* portal, a not-found page) have no block ending. The site document's content
|
|
6782
|
+
* area takes the reserve for them instead, but only when nothing inside it is
|
|
6783
|
+
* a page ending, so a rendered page is never padded twice.
|
|
6784
|
+
*/
|
|
6785
|
+
function footerEdgeReserveCss(selector, entry) {
|
|
6786
|
+
const metrics = boundaryRuntimeMetricsForDecorativeTransition(entry.intent);
|
|
6787
|
+
const withEdge = `${selector}:has([data-footer-edge][data-boundary-treatment='${entry.intent}'])`;
|
|
6788
|
+
const pageEnds = `${withEdge}:not(:has([data-footer-blocks] [data-page-ending]))`;
|
|
6789
|
+
return [rule(`${pageEnds} [data-block][data-page-ending] > ${blockSection}, ${withEdge} [data-footer-blocks] [data-block][data-page-ending] > ${blockSection}`, [`padding-bottom: calc(var(--rb-section-pad-y, 0rem) + ${metrics.heightCss});`]), rule(`${pageEnds} [data-site-document-content]:not(:has([data-page-ending]))`, [`padding-bottom: ${metrics.heightCss};`])];
|
|
6790
|
+
}
|
|
6539
6791
|
function placementCss(boundary) {
|
|
6540
6792
|
return Object.keys(placementRules).flatMap((placement) => {
|
|
6541
6793
|
const placed = `${boundary}[data-boundary-placement='${placement}']`;
|
|
@@ -7670,7 +7922,7 @@ function generateAllBlockVarsCss(context) {
|
|
|
7670
7922
|
const css = generator(context);
|
|
7671
7923
|
if (css) cssChunks.push(css.trim());
|
|
7672
7924
|
}
|
|
7673
|
-
return cssChunks.join("\n\n");
|
|
7925
|
+
return [...cssChunks, generateLookMediaFrameCss(context.themeId)].join("\n\n");
|
|
7674
7926
|
}
|
|
7675
7927
|
/**
|
|
7676
7928
|
* Generate CSS for user-defined block custom variables.
|
|
@@ -7695,7 +7947,7 @@ function generateBlockCustomVarsCss(themeId, blockCustomVars) {
|
|
|
7695
7947
|
//#endregion
|
|
7696
7948
|
//#region ../theme-core/src/blockOverrides.ts
|
|
7697
7949
|
const BLOCK_PREFIX = "block.";
|
|
7698
|
-
function isPlainObject$
|
|
7950
|
+
function isPlainObject$4(value) {
|
|
7699
7951
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7700
7952
|
}
|
|
7701
7953
|
function isUnknownArray$3(value) {
|
|
@@ -7703,7 +7955,7 @@ function isUnknownArray$3(value) {
|
|
|
7703
7955
|
}
|
|
7704
7956
|
function cloneValue(value) {
|
|
7705
7957
|
if (isUnknownArray$3(value)) return value.map((item) => cloneValue(item));
|
|
7706
|
-
if (isPlainObject$
|
|
7958
|
+
if (isPlainObject$4(value)) {
|
|
7707
7959
|
const cloned = {};
|
|
7708
7960
|
for (const [key, child] of Object.entries(value)) cloned[key] = cloneValue(child);
|
|
7709
7961
|
return cloned;
|
|
@@ -7713,7 +7965,7 @@ function cloneValue(value) {
|
|
|
7713
7965
|
function mergeDeep(defaultValue, overrideValue) {
|
|
7714
7966
|
if (overrideValue === void 0) return cloneValue(defaultValue);
|
|
7715
7967
|
if (overrideValue === null) return null;
|
|
7716
|
-
if (isPlainObject$
|
|
7968
|
+
if (isPlainObject$4(defaultValue) && isPlainObject$4(overrideValue)) {
|
|
7717
7969
|
const merged = {};
|
|
7718
7970
|
const keys = /* @__PURE__ */ new Set([...Object.keys(defaultValue), ...Object.keys(overrideValue)]);
|
|
7719
7971
|
for (const key of keys) merged[key] = mergeDeep(defaultValue[key], overrideValue[key]);
|
|
@@ -7770,7 +8022,7 @@ function mergeContentWithBlockStyleOverrides(content, theme, blockKind) {
|
|
|
7770
8022
|
*/
|
|
7771
8023
|
function applyHeadingDecorationSignature(target, themeDecoration) {
|
|
7772
8024
|
const existing = target["_sectionStyles"];
|
|
7773
|
-
const existingObj = isPlainObject$
|
|
8025
|
+
const existingObj = isPlainObject$4(existing) ? existing : void 0;
|
|
7774
8026
|
const rawOverride = existingObj?.["headingDecorationOverride"];
|
|
7775
8027
|
const effective = resolveEffectiveHeadingDecoration(themeDecoration, rawOverride === "site-default" || rawOverride === "off" ? rawOverride : void 0);
|
|
7776
8028
|
if (effective.kind === "none") {
|
|
@@ -7790,9 +8042,9 @@ function applyStyleOverride(target, key, defaults) {
|
|
|
7790
8042
|
target[key] = mergeStyleOverride(defaults, target[key]);
|
|
7791
8043
|
}
|
|
7792
8044
|
function mergeStyleOverride(defaultValue, contentValue) {
|
|
7793
|
-
if (!isPlainObject$
|
|
8045
|
+
if (!isPlainObject$4(defaultValue) || !isPlainObject$4(contentValue)) return mergeDeep(defaultValue, contentValue);
|
|
7794
8046
|
const merged = mergeDeep(defaultValue, contentValue);
|
|
7795
|
-
if (!isPlainObject$
|
|
8047
|
+
if (!isPlainObject$4(merged)) return merged;
|
|
7796
8048
|
return {
|
|
7797
8049
|
...merged,
|
|
7798
8050
|
background: mergeBoxBackground(defaultValue.background, contentValue.background)
|
|
@@ -9044,12 +9296,12 @@ function allGroupChildPlans(plan) {
|
|
|
9044
9296
|
}
|
|
9045
9297
|
function selectedGroupChildPlans(plan, value) {
|
|
9046
9298
|
if (plan.childSelection.kind === "all") return plan.childSelection.fields;
|
|
9047
|
-
if (!isPlainObject$
|
|
9299
|
+
if (!isPlainObject$3(value)) return [];
|
|
9048
9300
|
const selectedType = value[plan.childSelection.activeTabField];
|
|
9049
9301
|
return plan.childSelection.tabs.find((tab) => tab.typeId === selectedType)?.fields ?? [];
|
|
9050
9302
|
}
|
|
9051
9303
|
function canonicalizeObjectForWrite(plans, value) {
|
|
9052
|
-
if (!isPlainObject$
|
|
9304
|
+
if (!isPlainObject$3(value)) return value;
|
|
9053
9305
|
const canonical = { ...value };
|
|
9054
9306
|
for (const plan of plans) {
|
|
9055
9307
|
if (!(plan.fieldId in canonical)) continue;
|
|
@@ -9075,7 +9327,7 @@ function canonicalizeFieldValue(plan, value) {
|
|
|
9075
9327
|
}
|
|
9076
9328
|
}
|
|
9077
9329
|
function canonicalizeMedia(value) {
|
|
9078
|
-
if (!isPlainObject$
|
|
9330
|
+
if (!isPlainObject$3(value)) return value;
|
|
9079
9331
|
const canonical = { ...value };
|
|
9080
9332
|
if (mediaIdentifierSchema.safeParse(canonical.identifier).success) deleteEnvSpecificKeys(canonical);
|
|
9081
9333
|
return canonical;
|
|
@@ -9083,13 +9335,13 @@ function canonicalizeMedia(value) {
|
|
|
9083
9335
|
function canonicalizeRepeater(plan, value) {
|
|
9084
9336
|
if (!isUnknownArray$2(value)) return value;
|
|
9085
9337
|
return value.map((item) => {
|
|
9086
|
-
if (!isPlainObject$
|
|
9338
|
+
if (!isPlainObject$3(item)) return item;
|
|
9087
9339
|
const childPlans = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === item._type)?.fields : plan.repeatedItemPlan;
|
|
9088
9340
|
return childPlans ? canonicalizeObjectForWrite(childPlans, item) : item;
|
|
9089
9341
|
});
|
|
9090
9342
|
}
|
|
9091
9343
|
function canonicalizeDiscriminatedGroup(plan, value) {
|
|
9092
|
-
if (!isPlainObject$
|
|
9344
|
+
if (!isPlainObject$3(value) || plan.childSelection.kind !== "discriminatedTabs") return value;
|
|
9093
9345
|
const selection = plan.childSelection;
|
|
9094
9346
|
const selectedPlans = selectedGroupChildPlans(plan, value);
|
|
9095
9347
|
const selectedIds = rootFieldIds(selectedPlans);
|
|
@@ -9104,10 +9356,10 @@ function rootFieldIds(plans) {
|
|
|
9104
9356
|
}
|
|
9105
9357
|
function omitUndefined(value) {
|
|
9106
9358
|
if (isUnknownArray$2(value)) return value.map(omitUndefined);
|
|
9107
|
-
if (!isPlainObject$
|
|
9359
|
+
if (!isPlainObject$3(value)) return value;
|
|
9108
9360
|
return Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0).map(([key, field]) => [key, omitUndefined(field)]));
|
|
9109
9361
|
}
|
|
9110
|
-
function isPlainObject$
|
|
9362
|
+
function isPlainObject$3(value) {
|
|
9111
9363
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9112
9364
|
}
|
|
9113
9365
|
function isUnknownArray$2(value) {
|
|
@@ -9672,7 +9924,7 @@ function validateNormalizedFieldValue(plan, value, ctx) {
|
|
|
9672
9924
|
}
|
|
9673
9925
|
}
|
|
9674
9926
|
function validateMediaPlan(plan, value, ctx) {
|
|
9675
|
-
if (!isPlainObject$
|
|
9927
|
+
if (!isPlainObject$2(value)) return [issue(plan, "invalidMedia")];
|
|
9676
9928
|
const allowedKind = value.type === void 0 || typeof value.type === "string" && plan.allowedMediaTypes.includes(value.type);
|
|
9677
9929
|
const admitted = ctx.mode === "render" ? z.safeParse(runtimeMediaSchema, {
|
|
9678
9930
|
...value,
|
|
@@ -9810,7 +10062,7 @@ function selectRepeaterItemPlan(plan, item) {
|
|
|
9810
10062
|
} : { kind: "untyped" };
|
|
9811
10063
|
}
|
|
9812
10064
|
function validateRepeaterItem(plan, item, index, ctx) {
|
|
9813
|
-
if (!isPlainObject$
|
|
10065
|
+
if (!isPlainObject$2(item)) return [{
|
|
9814
10066
|
kind: "wrongType",
|
|
9815
10067
|
path: [...plan.path, index],
|
|
9816
10068
|
fieldId: plan.fieldId,
|
|
@@ -9850,7 +10102,7 @@ function validateFlattenedGroupContainers(groupIds, item, plan, index, ctx) {
|
|
|
9850
10102
|
}
|
|
9851
10103
|
function validateGroupPlan(plan, value, ctx) {
|
|
9852
10104
|
if (plan.valueContract === "location") return validateLocationGroupContract(plan, value, ctx);
|
|
9853
|
-
if (!isPlainObject$
|
|
10105
|
+
if (!isPlainObject$2(value)) return [issue(plan, "wrongType", { expected: "an object" })];
|
|
9854
10106
|
if (plan.childSelection.kind === "discriminatedTabs") {
|
|
9855
10107
|
const selectedType = value[plan.childSelection.activeTabField];
|
|
9856
10108
|
if (selectedType !== void 0 && selectedType !== null && !plan.childSelection.tabs.some((tab) => tab.typeId === selectedType)) return [{
|
|
@@ -10090,7 +10342,7 @@ function isEmptyValue(value) {
|
|
|
10090
10342
|
if (isEmptyRichTextDoc(value)) return true;
|
|
10091
10343
|
return false;
|
|
10092
10344
|
}
|
|
10093
|
-
function isPlainObject$
|
|
10345
|
+
function isPlainObject$2(value) {
|
|
10094
10346
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
10095
10347
|
}
|
|
10096
10348
|
function isUnknownArray$1(value) {
|
|
@@ -10100,7 +10352,7 @@ function isValidRichTextDoc(value) {
|
|
|
10100
10352
|
return isRichTextDoc(value);
|
|
10101
10353
|
}
|
|
10102
10354
|
function isEmptyRichTextDoc(value) {
|
|
10103
|
-
if (!isPlainObject$
|
|
10355
|
+
if (!isPlainObject$2(value)) return false;
|
|
10104
10356
|
if (value.type !== "doc") return false;
|
|
10105
10357
|
const content = value.content;
|
|
10106
10358
|
if (!Array.isArray(content) || content.length === 0) return true;
|
|
@@ -11519,7 +11771,7 @@ function styledCard(children, opts, ...mods) {
|
|
|
11519
11771
|
}
|
|
11520
11772
|
//#endregion
|
|
11521
11773
|
//#region ../blocks/src/system/node/fragments/feedbackCallout.ts
|
|
11522
|
-
function joinClasses$
|
|
11774
|
+
function joinClasses$2(...parts) {
|
|
11523
11775
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
11524
11776
|
}
|
|
11525
11777
|
function feedbackCallout(opts) {
|
|
@@ -11533,7 +11785,7 @@ function feedbackCallout(opts) {
|
|
|
11533
11785
|
} };
|
|
11534
11786
|
return stack({
|
|
11535
11787
|
gap: "sm",
|
|
11536
|
-
className: joinClasses$
|
|
11788
|
+
className: joinClasses$2("feedback-callout rb-rounded-xl rb-border rb-p-6", opts?.className),
|
|
11537
11789
|
style: mergeStyles(backgroundColorStyle("surface"), borderColorStyle("border/60")),
|
|
11538
11790
|
"data-feedback-callout": "",
|
|
11539
11791
|
"data-feedback-tone": tone
|
|
@@ -11559,29 +11811,6 @@ function feedbackCallout(opts) {
|
|
|
11559
11811
|
]);
|
|
11560
11812
|
}
|
|
11561
11813
|
//#endregion
|
|
11562
|
-
//#region ../blocks/src/system/node/fragments/sectionState.shared.ts
|
|
11563
|
-
const SECTION_STATE_KINDS = [
|
|
11564
|
-
"empty",
|
|
11565
|
-
"unavailable",
|
|
11566
|
-
"coming-soon",
|
|
11567
|
-
"no-results"
|
|
11568
|
-
];
|
|
11569
|
-
const SECTION_STATE_TONE = {
|
|
11570
|
-
empty: "info",
|
|
11571
|
-
unavailable: "warning",
|
|
11572
|
-
"coming-soon": "info",
|
|
11573
|
-
"no-results": "warning"
|
|
11574
|
-
};
|
|
11575
|
-
function isSectionStateKind(value) {
|
|
11576
|
-
return typeof value === "string" && SECTION_STATE_KINDS.includes(value);
|
|
11577
|
-
}
|
|
11578
|
-
function sectionStateToneFromKind(kind) {
|
|
11579
|
-
return SECTION_STATE_TONE[kind];
|
|
11580
|
-
}
|
|
11581
|
-
function sectionStateToneFromUnknown(value) {
|
|
11582
|
-
return isSectionStateKind(value) ? sectionStateToneFromKind(value) : "info";
|
|
11583
|
-
}
|
|
11584
|
-
//#endregion
|
|
11585
11814
|
//#region ../blocks/src/system/node/fragments/sectionState.ts
|
|
11586
11815
|
function sectionStateTone(kind) {
|
|
11587
11816
|
return sectionStateToneFromKind(kind);
|
|
@@ -11596,7 +11825,7 @@ function bindSectionStateTone(kind) {
|
|
|
11596
11825
|
...kind.$bind.coerce ? { coerce: kind.$bind.coerce } : {}
|
|
11597
11826
|
} };
|
|
11598
11827
|
}
|
|
11599
|
-
function joinClasses$
|
|
11828
|
+
function joinClasses$1(...parts) {
|
|
11600
11829
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
11601
11830
|
}
|
|
11602
11831
|
function sectionState(opts) {
|
|
@@ -11606,7 +11835,7 @@ function sectionState(opts) {
|
|
|
11606
11835
|
} };
|
|
11607
11836
|
return stack({
|
|
11608
11837
|
gap: "none",
|
|
11609
|
-
className: joinClasses$
|
|
11838
|
+
className: joinClasses$1("section-state rb-mx-auto rb-w-full rb-max-w-3xl", opts?.className),
|
|
11610
11839
|
"data-section-state-kind": kind
|
|
11611
11840
|
}, [feedbackCallout({
|
|
11612
11841
|
tone: bindSectionStateTone(kind),
|
|
@@ -12964,26 +13193,6 @@ function fragmentsToRepeaterField(id, label, fragments, options = {}) {
|
|
|
12964
13193
|
};
|
|
12965
13194
|
}
|
|
12966
13195
|
//#endregion
|
|
12967
|
-
//#region ../blocks/src/system/fields/heroTitleSize.ts
|
|
12968
|
-
/**
|
|
12969
|
-
* The headline sizes owners can pick, the same in the content form and the
|
|
12970
|
-
* Look's knob. Older stored sizes (`editorial`, `poster`) still render.
|
|
12971
|
-
*/
|
|
12972
|
-
const heroTitleSizeOptions = [
|
|
12973
|
-
{
|
|
12974
|
-
value: "quiet",
|
|
12975
|
-
label: "Quieter"
|
|
12976
|
-
},
|
|
12977
|
-
{
|
|
12978
|
-
value: "auto",
|
|
12979
|
-
label: "Standard"
|
|
12980
|
-
},
|
|
12981
|
-
{
|
|
12982
|
-
value: "display",
|
|
12983
|
-
label: "Louder"
|
|
12984
|
-
}
|
|
12985
|
-
];
|
|
12986
|
-
//#endregion
|
|
12987
13196
|
//#region ../blocks/src/system/fragments/library/heroLayoutControls.ts
|
|
12988
13197
|
const heroLayoutControlsFragment = defineFragment({
|
|
12989
13198
|
variantMeaning: { kind: "arrangement" },
|
|
@@ -13885,7 +14094,7 @@ const serviceDetailsBlockDefinition = {
|
|
|
13885
14094
|
version: "1.0.0",
|
|
13886
14095
|
title: "Service details",
|
|
13887
14096
|
titleSource: "heading",
|
|
13888
|
-
description: "Duration, price, location, cancellation terms and
|
|
14097
|
+
description: "Duration, price, location, cancellation terms and who the service is with.",
|
|
13889
14098
|
category: "events-and-bookings",
|
|
13890
14099
|
requiredFeatures: ["bookings.appointments"],
|
|
13891
14100
|
contentSource: { kind: "inline" },
|
|
@@ -14107,46 +14316,6 @@ function createImagePositionField(options = {}) {
|
|
|
14107
14316
|
};
|
|
14108
14317
|
}
|
|
14109
14318
|
//#endregion
|
|
14110
|
-
//#region ../blocks/src/system/fields/imageShape.ts
|
|
14111
|
-
const standardImageShapeOptions = [
|
|
14112
|
-
{
|
|
14113
|
-
value: "default",
|
|
14114
|
-
label: "Default"
|
|
14115
|
-
},
|
|
14116
|
-
{
|
|
14117
|
-
value: "square",
|
|
14118
|
-
label: "Square corners"
|
|
14119
|
-
},
|
|
14120
|
-
{
|
|
14121
|
-
value: "rounded",
|
|
14122
|
-
label: "Rounded corners"
|
|
14123
|
-
},
|
|
14124
|
-
{
|
|
14125
|
-
value: "circle",
|
|
14126
|
-
label: "Circle"
|
|
14127
|
-
},
|
|
14128
|
-
{
|
|
14129
|
-
value: "arch",
|
|
14130
|
-
label: "Arch"
|
|
14131
|
-
}
|
|
14132
|
-
];
|
|
14133
|
-
function createImageShapeField(options = {}) {
|
|
14134
|
-
return {
|
|
14135
|
-
id: options.id ?? "imageShape",
|
|
14136
|
-
type: "select",
|
|
14137
|
-
label: options.label ?? "Image shape",
|
|
14138
|
-
...options.description ? { description: options.description } : {},
|
|
14139
|
-
required: false,
|
|
14140
|
-
defaultValue: options.defaultValue ?? "default",
|
|
14141
|
-
multiple: false,
|
|
14142
|
-
options: [...standardImageShapeOptions],
|
|
14143
|
-
ui: {
|
|
14144
|
-
intent: options.uiIntent ?? "display",
|
|
14145
|
-
...options.visibleWhen ? { visibleWhen: options.visibleWhen } : {}
|
|
14146
|
-
}
|
|
14147
|
-
};
|
|
14148
|
-
}
|
|
14149
|
-
//#endregion
|
|
14150
14319
|
//#region ../blocks/src/system/blocks/hero.ts
|
|
14151
14320
|
const heroCopyAndCta = composeFragments([{ fragment: heroCopyFragment }, { fragment: heroCtaRowFragment }]);
|
|
14152
14321
|
const heroPriorityMediaProps = {
|
|
@@ -14585,50 +14754,6 @@ function gapSelectField(options = {}) {
|
|
|
14585
14754
|
});
|
|
14586
14755
|
}
|
|
14587
14756
|
//#endregion
|
|
14588
|
-
//#region ../blocks/src/system/fields/aspectRatio.ts
|
|
14589
|
-
const standardAspectRatioOptions = [
|
|
14590
|
-
{
|
|
14591
|
-
value: "auto",
|
|
14592
|
-
label: "Auto (original)"
|
|
14593
|
-
},
|
|
14594
|
-
{
|
|
14595
|
-
value: "16/9",
|
|
14596
|
-
label: "16:9 (Landscape)"
|
|
14597
|
-
},
|
|
14598
|
-
{
|
|
14599
|
-
value: "4/3",
|
|
14600
|
-
label: "4:3 (Standard)"
|
|
14601
|
-
},
|
|
14602
|
-
{
|
|
14603
|
-
value: "1/1",
|
|
14604
|
-
label: "1:1 (Square)"
|
|
14605
|
-
},
|
|
14606
|
-
{
|
|
14607
|
-
value: "3/4",
|
|
14608
|
-
label: "3:4 (Portrait)"
|
|
14609
|
-
},
|
|
14610
|
-
{
|
|
14611
|
-
value: "9/16",
|
|
14612
|
-
label: "9:16 (Tall portrait)"
|
|
14613
|
-
}
|
|
14614
|
-
];
|
|
14615
|
-
function createAspectRatioField(options = {}) {
|
|
14616
|
-
return {
|
|
14617
|
-
id: options.id ?? "aspectRatio",
|
|
14618
|
-
type: "select",
|
|
14619
|
-
label: options.label ?? "Aspect ratio",
|
|
14620
|
-
...options.description ? { description: options.description } : {},
|
|
14621
|
-
required: false,
|
|
14622
|
-
defaultValue: options.defaultValue ?? "auto",
|
|
14623
|
-
multiple: false,
|
|
14624
|
-
options: [...standardAspectRatioOptions],
|
|
14625
|
-
ui: {
|
|
14626
|
-
intent: options.uiIntent ?? "display",
|
|
14627
|
-
...options.visibleWhen ? { visibleWhen: options.visibleWhen } : {}
|
|
14628
|
-
}
|
|
14629
|
-
};
|
|
14630
|
-
}
|
|
14631
|
-
//#endregion
|
|
14632
14757
|
//#region ../blocks/src/system/blocks/intro.ts
|
|
14633
14758
|
function introHeading(className) {
|
|
14634
14759
|
return text({
|
|
@@ -14691,10 +14816,13 @@ const introMedia = media({
|
|
|
14691
14816
|
}],
|
|
14692
14817
|
fallback: "rb-intro-media rb-w-full rb-h-auto rb-object-cover"
|
|
14693
14818
|
} },
|
|
14694
|
-
style: {
|
|
14695
|
-
from: "content.
|
|
14696
|
-
|
|
14697
|
-
|
|
14819
|
+
style: {
|
|
14820
|
+
borderRadius: { $bind: { from: "content._lookMediaFrame.borderRadius" } },
|
|
14821
|
+
aspectRatio: { $bind: {
|
|
14822
|
+
from: "content.aspectRatio",
|
|
14823
|
+
fallback: "1/1"
|
|
14824
|
+
} }
|
|
14825
|
+
}
|
|
14698
14826
|
}, bind("content.media"), when("content.media"));
|
|
14699
14827
|
const centeredCopyLayout = styledSection({
|
|
14700
14828
|
children: styledContainer({
|
|
@@ -15990,621 +16118,75 @@ const formattingTransforms = [
|
|
|
15990
16118
|
mapTokenTransform
|
|
15991
16119
|
];
|
|
15992
16120
|
//#endregion
|
|
15993
|
-
//#region ../blocks/src/system/transforms/registry/
|
|
15994
|
-
const joinClasses
|
|
15995
|
-
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
}
|
|
16009
|
-
function
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
}
|
|
16024
|
-
|
|
16025
|
-
|
|
16026
|
-
|
|
16027
|
-
|
|
16028
|
-
circle: "rb-media-shape-circle",
|
|
16029
|
-
arch: "rb-media-shape-arch"
|
|
16030
|
-
};
|
|
16031
|
-
const parseRatio = (raw) => {
|
|
16032
|
-
if (typeof raw !== "string") return null;
|
|
16033
|
-
const value = raw.trim();
|
|
16034
|
-
if (!value || value === "auto") return null;
|
|
16035
|
-
const [wRaw, hRaw] = value.split("/").map((part) => part.trim());
|
|
16036
|
-
const w = Number(wRaw);
|
|
16037
|
-
const h = Number(hRaw);
|
|
16038
|
-
if (!Number.isFinite(w) || !Number.isFinite(h)) return null;
|
|
16039
|
-
if (w <= 0 || h <= 0) return null;
|
|
16040
|
-
return {
|
|
16041
|
-
w,
|
|
16042
|
-
h
|
|
16043
|
-
};
|
|
16044
|
-
};
|
|
16045
|
-
const ratioToHeightFactor = (raw) => {
|
|
16046
|
-
const ratio = parseRatio(raw);
|
|
16047
|
-
if (!ratio) return "1";
|
|
16048
|
-
return String(ratio.h / ratio.w);
|
|
16049
|
-
};
|
|
16050
|
-
function resolveBorderColorValue(border) {
|
|
16051
|
-
if (border.enabled === false) return void 0;
|
|
16052
|
-
const rawColorToken = typeof border.colorToken === "string" ? border.colorToken.trim() : "";
|
|
16053
|
-
const parsed = rawColorToken ? parseBlockColorToken(rawColorToken) : null;
|
|
16054
|
-
const baseName = (parsed ? parsed.split("/")[0] : null) ?? "accent";
|
|
16055
|
-
const opacityRaw = typeof border.opacity === "number" ? border.opacity : 30;
|
|
16056
|
-
return rgbColorValue(`${baseName}/${Math.max(0, Math.min(100, opacityRaw))}`);
|
|
16057
|
-
}
|
|
16058
|
-
/**
|
|
16059
|
-
* Get nav link classes based on nav style
|
|
16060
|
-
* Simplified version that reads navStyle enum from theme
|
|
16061
|
-
*/
|
|
16062
|
-
function getNavStyleClasses(navStyle) {
|
|
16063
|
-
const baseClasses = "rb-inline-flex rb-items-center rb-gap-2 rb-px-3 rb-py-2 rb-transition-colors";
|
|
16064
|
-
switch (navStyle) {
|
|
16065
|
-
case "minimal": return baseClasses;
|
|
16066
|
-
case "underline": return `${baseClasses} rb-nav-underline rb-nav-underline-offset-4`;
|
|
16067
|
-
case "underline-grow": return `${baseClasses} nav-underline-grow nav-underline-active`;
|
|
16068
|
-
case "capsule": return "rb-inline-flex rb-items-center rb-gap-2 rb-transition-colors rb-rounded-full rb-px-3 rb-py-1.5";
|
|
16069
|
-
case "scale": return `${baseClasses} rb-transform-gpu rb-will-change-transform rb-motion-safe-hover-scale-105`;
|
|
16070
|
-
case "frosted": return "rb-inline-flex rb-items-center rb-gap-2 rb-transition-colors rb-rounded-lg rb-px-3 rb-py-1.5";
|
|
16071
|
-
case "solid": return baseClasses;
|
|
16072
|
-
default: return baseClasses;
|
|
16073
|
-
}
|
|
16074
|
-
}
|
|
16075
|
-
const headerNavLinkClassTransform = {
|
|
16076
|
-
id: "ui.headerNavLinkClass",
|
|
16121
|
+
//#region ../blocks/src/system/transforms/registry/layout.ts
|
|
16122
|
+
const joinClasses = (parts) => parts.filter((part) => typeof part === "string" && part.trim().length > 0).join(" ").replace(/\s+/g, " ").trim();
|
|
16123
|
+
/** How the header brand renders; the logo media is hidden for `title-only`. */
|
|
16124
|
+
function resolveHeaderBrandDisplay(logo) {
|
|
16125
|
+
const display = logo?.brandDisplay ?? "logo-plus-title";
|
|
16126
|
+
if (display === "logo-only" || display === "title-only") return display;
|
|
16127
|
+
return "logo-plus-title";
|
|
16128
|
+
}
|
|
16129
|
+
function resolveHeaderLogoSizeClass(logo) {
|
|
16130
|
+
switch (logo?.size ?? "standard") {
|
|
16131
|
+
case "compact": return "header-logo-size-compact";
|
|
16132
|
+
case "generous": return "header-logo-size-generous";
|
|
16133
|
+
case "display": return "header-logo-size-display";
|
|
16134
|
+
default: return "header-logo-size-standard";
|
|
16135
|
+
}
|
|
16136
|
+
}
|
|
16137
|
+
function resolveHeaderLogoAccommodationClass(logo) {
|
|
16138
|
+
if (resolveHeaderBrandDisplay(logo) === "title-only") return "header-logo-accommodation-title-only";
|
|
16139
|
+
switch (logo?.accommodation) {
|
|
16140
|
+
case "logo-plate": return "header-logo-accommodation-plate";
|
|
16141
|
+
case "centered-badge": return "header-logo-accommodation-centered-badge";
|
|
16142
|
+
case "popout-badge": return "header-logo-accommodation-popout-badge";
|
|
16143
|
+
case "centered-masthead": return "header-logo-accommodation-centered-masthead";
|
|
16144
|
+
case "hero-badge": return "header-logo-accommodation-hero-badge";
|
|
16145
|
+
case "inline-logo-only": return "header-logo-accommodation-inline-logo-only";
|
|
16146
|
+
case "inline-wordmark": return "header-logo-accommodation-inline-wordmark";
|
|
16147
|
+
case "inline-mark-with-title": return "header-logo-accommodation-inline-mark-with-title";
|
|
16148
|
+
case "title-only": return "header-logo-accommodation-title-only";
|
|
16149
|
+
case void 0:
|
|
16150
|
+
default: return "header-logo-accommodation-inline";
|
|
16151
|
+
}
|
|
16152
|
+
}
|
|
16153
|
+
const headerLogoClassSchema = z.object({ base: z.string().optional() });
|
|
16154
|
+
const headerLogoClassTransform = {
|
|
16155
|
+
id: "layout.headerLogoClass",
|
|
16077
16156
|
kind: "string",
|
|
16078
|
-
summary: "Compose header
|
|
16079
|
-
schema:
|
|
16157
|
+
summary: "Compose header logo wrapper classes from brand display and accommodation settings",
|
|
16158
|
+
schema: headerLogoClassSchema,
|
|
16080
16159
|
run: (value, options) => {
|
|
16081
|
-
|
|
16160
|
+
const logo = asPartialObject(value);
|
|
16161
|
+
return joinClasses([
|
|
16162
|
+
options.base ?? "header-logo rb-flex rb-min-w-0 rb-items-center rb-gap-3 rb-no-underline rb-transition-opacity rb-hover-opacity-80",
|
|
16163
|
+
`header-brand-display-${resolveHeaderBrandDisplay(logo)}`,
|
|
16164
|
+
resolveHeaderLogoSizeClass(logo),
|
|
16165
|
+
resolveHeaderLogoAccommodationClass(logo)
|
|
16166
|
+
]);
|
|
16082
16167
|
}
|
|
16083
16168
|
};
|
|
16084
|
-
const
|
|
16085
|
-
id: "
|
|
16169
|
+
const headerLogoMediaClassTransform = {
|
|
16170
|
+
id: "layout.headerLogoMediaClass",
|
|
16086
16171
|
kind: "string",
|
|
16087
|
-
summary: "
|
|
16172
|
+
summary: "Compose header logo media classes from brand display and size settings",
|
|
16173
|
+
schema: headerLogoClassSchema,
|
|
16088
16174
|
run: (value, options) => {
|
|
16089
|
-
const
|
|
16090
|
-
|
|
16175
|
+
const logo = asPartialObject(value);
|
|
16176
|
+
const hiddenClass = resolveHeaderBrandDisplay(logo) === "title-only" ? "rb-hidden" : null;
|
|
16177
|
+
return joinClasses([
|
|
16178
|
+
options.base ?? "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300",
|
|
16179
|
+
resolveHeaderLogoSizeClass(logo),
|
|
16180
|
+
hiddenClass
|
|
16181
|
+
]);
|
|
16091
16182
|
}
|
|
16092
16183
|
};
|
|
16093
|
-
const
|
|
16094
|
-
id: "
|
|
16095
|
-
kind: "
|
|
16096
|
-
summary: "
|
|
16097
|
-
run: (value
|
|
16098
|
-
|
|
16099
|
-
return `${options.base} ${extra}`.trim();
|
|
16100
|
-
}
|
|
16101
|
-
};
|
|
16102
|
-
const stackAlignFromAlignment = {
|
|
16103
|
-
id: "ui.stackAlignFromAlignment",
|
|
16104
|
-
kind: "string",
|
|
16105
|
-
summary: "Map text alignment to stack alignment value",
|
|
16106
|
-
run: (value) => value === "center" ? "center" : "start"
|
|
16107
|
-
};
|
|
16108
|
-
const sectionStateToneTransform = {
|
|
16109
|
-
id: "ui.sectionStateTone",
|
|
16110
|
-
kind: "string",
|
|
16111
|
-
summary: "Map semantic section-state kind to feedback tone",
|
|
16112
|
-
run: (value) => sectionStateToneFromUnknown(value)
|
|
16113
|
-
};
|
|
16114
|
-
const heroTitleLengthThresholds = {
|
|
16115
|
-
medium: {
|
|
16116
|
-
maxCharacters: 42,
|
|
16117
|
-
maxWords: 6
|
|
16118
|
-
},
|
|
16119
|
-
long: {
|
|
16120
|
-
maxCharacters: 78,
|
|
16121
|
-
maxWords: 11
|
|
16122
|
-
}
|
|
16123
|
-
};
|
|
16124
|
-
function isPlainObject$2(value) {
|
|
16125
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
16126
|
-
}
|
|
16127
|
-
function readString(obj, key) {
|
|
16128
|
-
const v = obj[key];
|
|
16129
|
-
return typeof v === "string" ? v : void 0;
|
|
16130
|
-
}
|
|
16131
|
-
function resolveGeneratedHeroLayoutStyles(content) {
|
|
16132
|
-
const raw = content._heroLayoutStyles;
|
|
16133
|
-
return isPlainObject$2(raw) ? raw : null;
|
|
16134
|
-
}
|
|
16135
|
-
function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
|
|
16136
|
-
const explicitValue = readString(content, fallbackKey);
|
|
16137
|
-
if (explicitValue !== void 0) return explicitValue;
|
|
16138
|
-
const generated = resolveGeneratedHeroLayoutStyles(content);
|
|
16139
|
-
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
|
|
16140
|
-
}
|
|
16141
|
-
function resolveHeroVariant(content) {
|
|
16142
|
-
const variant = readString(content, "variant");
|
|
16143
|
-
if (variant && variant.trim()) return variant.trim();
|
|
16144
|
-
const layout = readString(content, "layout");
|
|
16145
|
-
if (layout && layout.trim()) return layout.trim();
|
|
16146
|
-
return null;
|
|
16147
|
-
}
|
|
16148
|
-
function resolveHeroContentAlignment(content) {
|
|
16149
|
-
const raw = readHeroLayoutString(content, "contentAlignment");
|
|
16150
|
-
if (raw === "left" || raw === "center" || raw === "right") return raw;
|
|
16151
|
-
const variant = resolveHeroVariant(content);
|
|
16152
|
-
if (variant === "split" || variant === "splitReverse") return "left";
|
|
16153
|
-
return "center";
|
|
16154
|
-
}
|
|
16155
|
-
function resolveHeroVerticalAlignment(content) {
|
|
16156
|
-
const raw = readHeroLayoutString(content, "verticalAlignment");
|
|
16157
|
-
if (raw === "top" || raw === "center" || raw === "bottom") return raw;
|
|
16158
|
-
const minHeight = asPartialObject(content._sectionStyles)?.minHeight;
|
|
16159
|
-
if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
|
|
16160
|
-
const variant = resolveHeroVariant(content);
|
|
16161
|
-
if (variant === "split" || variant === "splitReverse") return "center";
|
|
16162
|
-
return "top";
|
|
16163
|
-
}
|
|
16164
|
-
function resolveHeroContentMaxWidth(content) {
|
|
16165
|
-
const raw = readHeroLayoutString(content, "contentMaxWidth");
|
|
16166
|
-
if (raw === "default" || raw === "narrow" || raw === "medium" || raw === "wide") return raw;
|
|
16167
|
-
return "default";
|
|
16168
|
-
}
|
|
16169
|
-
function resolveHeroTypographyScale(content) {
|
|
16170
|
-
const titleSize = readString(content, "titleSize");
|
|
16171
|
-
if (titleSize === "quiet" || titleSize === "editorial" || titleSize === "display" || titleSize === "poster") return titleSize;
|
|
16172
|
-
const raw = readHeroLayoutString(content, "typographyScale", "heroTypographyScale");
|
|
16173
|
-
if (raw === "quiet" || raw === "editorial" || raw === "display" || raw === "poster") return raw;
|
|
16174
|
-
return null;
|
|
16175
|
-
}
|
|
16176
|
-
function resolveHeroTitleLength(content, policy = "legacy") {
|
|
16177
|
-
const headline = heroHeadlineText(content, policy);
|
|
16178
|
-
const words = headline.split(/\s+/).filter((word) => word.length > 0);
|
|
16179
|
-
const wordCount = words.length;
|
|
16180
|
-
const longestWord = longestHeroWord(words, policy);
|
|
16181
|
-
if (headline.length > heroTitleLengthThresholds.long.maxCharacters || longestWord > 18 || wordCount > heroTitleLengthThresholds.long.maxWords) return "long";
|
|
16182
|
-
if (headline.length > heroTitleLengthThresholds.medium.maxCharacters || longestWord > 12 || wordCount > heroTitleLengthThresholds.medium.maxWords) return "medium";
|
|
16183
|
-
return "short";
|
|
16184
|
-
}
|
|
16185
|
-
const heroContentWrapperClassTransform = {
|
|
16186
|
-
id: "ui.heroContentWrapperClass",
|
|
16187
|
-
kind: "string",
|
|
16188
|
-
summary: "Resolve hero content wrapper className from alignment + max width controls",
|
|
16189
|
-
schema: z.object({ base: z.string().optional() }),
|
|
16190
|
-
run: (value, options, context) => {
|
|
16191
|
-
const content = isPlainObject$2(value) ? value : isPlainObject$2(context.data) ? context.data : {};
|
|
16192
|
-
const alignment = resolveHeroContentAlignment(content);
|
|
16193
|
-
const maxWidth = resolveHeroContentMaxWidth(content);
|
|
16194
|
-
const typographyScale = resolveHeroTypographyScale(content);
|
|
16195
|
-
const titleLength = resolveHeroTitleLength(content);
|
|
16196
|
-
const textAlignClass = alignment === "center" ? "rb-text-center" : alignment === "right" ? "rb-text-right" : "rb-text-left";
|
|
16197
|
-
const maxWidthClass = maxWidth === "narrow" ? "rb-max-w-2xl" : maxWidth === "medium" ? "rb-max-w-3xl" : maxWidth === "wide" ? "rb-max-w-5xl" : "";
|
|
16198
|
-
const positionClass = alignment === "center" ? "rb-mx-auto" : alignment === "right" ? "rb-ml-auto" : "";
|
|
16199
|
-
return joinClasses$1([
|
|
16200
|
-
options?.base,
|
|
16201
|
-
textAlignClass,
|
|
16202
|
-
maxWidthClass,
|
|
16203
|
-
positionClass,
|
|
16204
|
-
...heroLegacyTypographyClasses(content, typographyScale, titleLength)
|
|
16205
|
-
]);
|
|
16206
|
-
}
|
|
16207
|
-
};
|
|
16208
|
-
const heroCtaJustifyTransform = {
|
|
16209
|
-
id: "ui.heroCtaJustify",
|
|
16210
|
-
kind: "string",
|
|
16211
|
-
summary: "Map hero contentAlignment to CTA row justify value",
|
|
16212
|
-
run: (value, _options, context) => {
|
|
16213
|
-
const alignment = resolveHeroContentAlignment(isPlainObject$2(value) ? value : isPlainObject$2(context.data) ? context.data : {});
|
|
16214
|
-
return alignment === "left" ? "start" : alignment === "right" ? "end" : "center";
|
|
16215
|
-
}
|
|
16216
|
-
};
|
|
16217
|
-
const heroStackJustifyFromVerticalAlignmentTransform = {
|
|
16218
|
-
id: "ui.heroStackJustifyFromVerticalAlignment",
|
|
16219
|
-
kind: "string",
|
|
16220
|
-
summary: "Map hero verticalAlignment to stack justify value",
|
|
16221
|
-
run: (value, _options, context) => {
|
|
16222
|
-
const vertical = resolveHeroVerticalAlignment(isPlainObject$2(value) ? value : isPlainObject$2(context.data) ? context.data : {});
|
|
16223
|
-
return vertical === "top" ? "start" : vertical === "bottom" ? "end" : "center";
|
|
16224
|
-
}
|
|
16225
|
-
};
|
|
16226
|
-
const heroGridClassFromVerticalAlignmentTransform = {
|
|
16227
|
-
id: "ui.heroGridClassFromVerticalAlignment",
|
|
16228
|
-
kind: "string",
|
|
16229
|
-
summary: "Append align-items class for hero split layouts based on verticalAlignment",
|
|
16230
|
-
schema: z.object({ base: z.string() }),
|
|
16231
|
-
run: (value, options, context) => {
|
|
16232
|
-
const vertical = resolveHeroVerticalAlignment(isPlainObject$2(value) ? value : isPlainObject$2(context.data) ? context.data : {});
|
|
16233
|
-
const itemsClass = vertical === "top" ? "rb-items-start" : vertical === "bottom" ? "rb-items-end" : "rb-items-center";
|
|
16234
|
-
return joinClasses$1([options.base, itemsClass]);
|
|
16235
|
-
}
|
|
16236
|
-
};
|
|
16237
|
-
const imageFragmentClassTransform = {
|
|
16238
|
-
id: "ui.imageFragmentClass",
|
|
16239
|
-
kind: "string",
|
|
16240
|
-
summary: "Return different classes based on aspectRatio (auto vs fixed)",
|
|
16241
|
-
schema: z.object({
|
|
16242
|
-
base: z.string(),
|
|
16243
|
-
whenAuto: z.string(),
|
|
16244
|
-
whenFixed: z.string()
|
|
16245
|
-
}),
|
|
16246
|
-
run: (value, options) => {
|
|
16247
|
-
const aspectRatio = typeof value === "string" ? value.trim() : "auto";
|
|
16248
|
-
const isAuto = aspectRatio === "" || aspectRatio === "auto";
|
|
16249
|
-
return joinClasses$1([options.base, isAuto ? options.whenAuto : options.whenFixed]);
|
|
16250
|
-
}
|
|
16251
|
-
};
|
|
16252
|
-
const imageFragmentSizeTransform = {
|
|
16253
|
-
id: "ui.imageFragmentSize",
|
|
16254
|
-
kind: "formatter",
|
|
16255
|
-
summary: "Derive Supabase render size options from an aspect ratio",
|
|
16256
|
-
schema: z.object({
|
|
16257
|
-
max: z.number().int().positive().default(1920),
|
|
16258
|
-
quality: z.number().int().min(1).max(100).default(85)
|
|
16259
|
-
}),
|
|
16260
|
-
run: (value, options) => {
|
|
16261
|
-
const ratio = parseRatio(value);
|
|
16262
|
-
const max = options.max ?? 1920;
|
|
16263
|
-
const quality = options.quality ?? 85;
|
|
16264
|
-
if (!ratio) return {
|
|
16265
|
-
width: max,
|
|
16266
|
-
quality,
|
|
16267
|
-
resize: "contain"
|
|
16268
|
-
};
|
|
16269
|
-
const isPortrait = ratio.h > ratio.w;
|
|
16270
|
-
return {
|
|
16271
|
-
width: isPortrait ? Math.round(max * ratio.w / ratio.h) : max,
|
|
16272
|
-
height: isPortrait ? max : Math.round(max * ratio.h / ratio.w),
|
|
16273
|
-
quality,
|
|
16274
|
-
resize: "cover"
|
|
16275
|
-
};
|
|
16276
|
-
}
|
|
16277
|
-
};
|
|
16278
|
-
const conditionalClassTransform = {
|
|
16279
|
-
id: "ui.conditionalClass",
|
|
16280
|
-
kind: "string",
|
|
16281
|
-
summary: "Return different classes based on boolean value",
|
|
16282
|
-
schema: z.object({
|
|
16283
|
-
whenTrue: z.string(),
|
|
16284
|
-
whenFalse: z.string()
|
|
16285
|
-
}),
|
|
16286
|
-
run: (value, options) => {
|
|
16287
|
-
return (typeof value === "boolean" ? value : Boolean(value)) ? options.whenTrue : options.whenFalse;
|
|
16288
|
-
}
|
|
16289
|
-
};
|
|
16290
|
-
const twoColumnContainerClassTransform = {
|
|
16291
|
-
id: "ui.twoColumnContainerClass",
|
|
16292
|
-
kind: "string",
|
|
16293
|
-
summary: "Append a desktop row-reverse class based on imagePosition",
|
|
16294
|
-
schema: z.object({
|
|
16295
|
-
base: z.string(),
|
|
16296
|
-
reverseClass: z.string()
|
|
16297
|
-
}),
|
|
16298
|
-
run: (value, options) => {
|
|
16299
|
-
const position = value === "right" ? "right" : "left";
|
|
16300
|
-
return joinClasses$1([options.base, position === "right" ? options.reverseClass : null]);
|
|
16301
|
-
}
|
|
16302
|
-
};
|
|
16303
|
-
const twoColumnFlexBasisTransform = {
|
|
16304
|
-
id: "ui.twoColumnFlexBasis",
|
|
16305
|
-
kind: "string",
|
|
16306
|
-
summary: "Map a ratio string to a flex-basis percentage for a 2-column layout",
|
|
16307
|
-
schema: z.object({ side: z.enum(["image", "text"]) }),
|
|
16308
|
-
run: (value, options) => {
|
|
16309
|
-
const ratio = typeof value === "string" ? value.trim() : "1/2";
|
|
16310
|
-
const imagePercent = ratio === "1/4" ? 25 : ratio === "1/3" ? 33.333 : ratio === "2/5" ? 40 : ratio === "2/3" ? 66.667 : 50;
|
|
16311
|
-
return `${options.side === "image" ? imagePercent : 100 - imagePercent}%`;
|
|
16312
|
-
}
|
|
16313
|
-
};
|
|
16314
|
-
const columnsDesktopSpanClassTransform = {
|
|
16315
|
-
id: "ui.columnsDesktopSpanClass",
|
|
16316
|
-
kind: "string",
|
|
16317
|
-
summary: "Append lg col-span class for editorial column layouts",
|
|
16318
|
-
schema: z.object({ base: z.string().optional() }),
|
|
16319
|
-
run: (value, options) => {
|
|
16320
|
-
const raw = typeof value === "string" ? value.trim() : "";
|
|
16321
|
-
const spanClass = raw === "2" ? "rb-lg-col-span-2" : raw === "3" ? "rb-lg-col-span-3" : raw === "4" ? "rb-lg-col-span-4" : "rb-lg-col-span-1";
|
|
16322
|
-
return joinClasses$1([options.base, spanClass]);
|
|
16323
|
-
}
|
|
16324
|
-
};
|
|
16325
|
-
const resolveColumnsGridCols = (content) => {
|
|
16326
|
-
const items = Array.isArray(content.columns) ? content.columns : [];
|
|
16327
|
-
const count = Math.min(4, Math.max(1, items.length || 1));
|
|
16328
|
-
const configuredDesktopColumnsRaw = typeof content.desktopColumns === "string" ? content.desktopColumns : "auto";
|
|
16329
|
-
const desktopColumns = configuredDesktopColumnsRaw === "2" ? 2 : configuredDesktopColumnsRaw === "3" ? 3 : configuredDesktopColumnsRaw === "4" ? 4 : count;
|
|
16330
|
-
if (desktopColumns <= 1) return { base: 1 };
|
|
16331
|
-
if (desktopColumns === 2) return {
|
|
16332
|
-
base: 1,
|
|
16333
|
-
md: 2
|
|
16334
|
-
};
|
|
16335
|
-
if (desktopColumns === 3) return {
|
|
16336
|
-
base: 1,
|
|
16337
|
-
md: 2,
|
|
16338
|
-
lg: 3
|
|
16339
|
-
};
|
|
16340
|
-
return {
|
|
16341
|
-
base: 1,
|
|
16342
|
-
md: 2,
|
|
16343
|
-
lg: 3,
|
|
16344
|
-
xl: 4
|
|
16345
|
-
};
|
|
16346
|
-
};
|
|
16347
|
-
const uiTransforms = [
|
|
16348
|
-
{
|
|
16349
|
-
id: "look.splitMinHeight",
|
|
16350
|
-
kind: "string",
|
|
16351
|
-
run: (value) => asPartialObject(value)?._lookSlots === void 0 ? "clamp(18rem, 36vw, 34rem)" : void 0
|
|
16352
|
-
},
|
|
16353
|
-
headerNavLinkClassTransform,
|
|
16354
|
-
headingClassFromAlignment,
|
|
16355
|
-
bodyClassFromAlignment,
|
|
16356
|
-
stackAlignFromAlignment,
|
|
16357
|
-
sectionStateToneTransform,
|
|
16358
|
-
heroContentWrapperClassTransform,
|
|
16359
|
-
heroCtaJustifyTransform,
|
|
16360
|
-
heroStackJustifyFromVerticalAlignmentTransform,
|
|
16361
|
-
heroGridClassFromVerticalAlignmentTransform,
|
|
16362
|
-
imageFragmentClassTransform,
|
|
16363
|
-
imageFragmentSizeTransform,
|
|
16364
|
-
{
|
|
16365
|
-
id: "ui.imageShapeClassName",
|
|
16366
|
-
kind: "string",
|
|
16367
|
-
summary: "Apply a constrained media shape class",
|
|
16368
|
-
run: (value, options) => {
|
|
16369
|
-
return joinClasses$1([typeof options?.baseClass === "string" ? options.baseClass : "", imageShapeClassMap[typeof value === "string" ? value.trim() : "default"] ?? ""]);
|
|
16370
|
-
}
|
|
16371
|
-
},
|
|
16372
|
-
conditionalClassTransform,
|
|
16373
|
-
twoColumnContainerClassTransform,
|
|
16374
|
-
twoColumnFlexBasisTransform,
|
|
16375
|
-
columnsDesktopSpanClassTransform,
|
|
16376
|
-
{
|
|
16377
|
-
id: "ui.columnsGridCols",
|
|
16378
|
-
kind: "formatter",
|
|
16379
|
-
summary: "Resolve responsive grid column counts for columns block",
|
|
16380
|
-
run: (value) => {
|
|
16381
|
-
return resolveColumnsGridCols(asPartialObject(value) ?? {});
|
|
16382
|
-
}
|
|
16383
|
-
},
|
|
16384
|
-
{
|
|
16385
|
-
id: "ui.columnsColsAt",
|
|
16386
|
-
kind: "formatter",
|
|
16387
|
-
summary: "Resolve columns count for a specific breakpoint",
|
|
16388
|
-
schema: z.object({ breakpoint: z.enum([
|
|
16389
|
-
"mobile",
|
|
16390
|
-
"md",
|
|
16391
|
-
"lg",
|
|
16392
|
-
"xl"
|
|
16393
|
-
]) }),
|
|
16394
|
-
run: (value, options) => {
|
|
16395
|
-
const cols = resolveColumnsGridCols(asPartialObject(value) ?? {});
|
|
16396
|
-
const mobile = cols.base;
|
|
16397
|
-
const md = cols.md ?? mobile;
|
|
16398
|
-
const lg = cols.lg ?? md;
|
|
16399
|
-
const xl = cols.xl ?? lg;
|
|
16400
|
-
const resolved = options.breakpoint === "mobile" ? mobile : options.breakpoint === "md" ? md : options.breakpoint === "lg" ? lg : xl;
|
|
16401
|
-
return String(resolved);
|
|
16402
|
-
}
|
|
16403
|
-
},
|
|
16404
|
-
{
|
|
16405
|
-
id: "ui.ratioToHeightFactor",
|
|
16406
|
-
kind: "formatter",
|
|
16407
|
-
summary: "Convert a width/height aspect ratio string to a height factor (h/w)",
|
|
16408
|
-
run: (value) => ratioToHeightFactor(value)
|
|
16409
|
-
},
|
|
16410
|
-
{
|
|
16411
|
-
id: "ui.imageGalleryFilterClass",
|
|
16412
|
-
kind: "string",
|
|
16413
|
-
summary: "Map image filter selection to rb-* filter utility class",
|
|
16414
|
-
run: (value) => {
|
|
16415
|
-
switch (typeof value === "string" ? value.trim() : "none") {
|
|
16416
|
-
case "grayscale": return "rb-filter-grayscale";
|
|
16417
|
-
case "grayscale-hover-reveal": return "rb-filter-grayscale-hover-reveal";
|
|
16418
|
-
case "sepia": return "rb-filter-sepia";
|
|
16419
|
-
default: return "";
|
|
16420
|
-
}
|
|
16421
|
-
}
|
|
16422
|
-
},
|
|
16423
|
-
{
|
|
16424
|
-
id: "ui.imageGalleryTileClass",
|
|
16425
|
-
kind: "string",
|
|
16426
|
-
summary: "Compose image gallery tile wrapper classes (border + corners)",
|
|
16427
|
-
run: (value) => {
|
|
16428
|
-
const content = asPartialObject(value) ?? {};
|
|
16429
|
-
const cornersClass = imageGalleryCornerClassMap[typeof content.imageCorners === "string" ? content.imageCorners : "3xl"] ?? "rb-rounded-3xl";
|
|
16430
|
-
const border = content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {};
|
|
16431
|
-
const borderEnabled = border.enabled !== false;
|
|
16432
|
-
const borderWidth = typeof border.width === "string" ? border.width : "2";
|
|
16433
|
-
return joinClasses$1([
|
|
16434
|
-
"rb-overflow-hidden",
|
|
16435
|
-
"rb-relative",
|
|
16436
|
-
cornersClass,
|
|
16437
|
-
!borderEnabled ? "" : borderWidth === "1" ? "rb-border" : borderWidth === "2" ? "rb-border-2" : borderWidth === "3" ? "rb-border-3" : "rb-border-2"
|
|
16438
|
-
]);
|
|
16439
|
-
}
|
|
16440
|
-
},
|
|
16441
|
-
{
|
|
16442
|
-
id: "ui.imageGalleryTileStyle",
|
|
16443
|
-
kind: "formatter",
|
|
16444
|
-
summary: "Build image gallery tile inline styles (border color)",
|
|
16445
|
-
run: (value) => {
|
|
16446
|
-
const content = asPartialObject(value) ?? {};
|
|
16447
|
-
const borderColor = resolveBorderColorValue(content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {});
|
|
16448
|
-
return borderColor ? { borderColor } : void 0;
|
|
16449
|
-
}
|
|
16450
|
-
},
|
|
16451
|
-
{
|
|
16452
|
-
id: "ui.imageGalleryMarqueeTileStyle",
|
|
16453
|
-
kind: "formatter",
|
|
16454
|
-
summary: "Build marquee tile inline styles (border + fixed size)",
|
|
16455
|
-
run: (value) => {
|
|
16456
|
-
const content = asPartialObject(value) ?? {};
|
|
16457
|
-
const size = typeof content.marqueeImageSize === "string" ? content.marqueeImageSize : "md";
|
|
16458
|
-
const pixels = size === "sm" ? 200 : size === "lg" ? 320 : size === "xl" ? 400 : 256;
|
|
16459
|
-
const style = {
|
|
16460
|
-
width: `${pixels}px`,
|
|
16461
|
-
height: `${pixels}px`
|
|
16462
|
-
};
|
|
16463
|
-
const borderColor = resolveBorderColorValue(content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {});
|
|
16464
|
-
if (borderColor) style.borderColor = borderColor;
|
|
16465
|
-
return style;
|
|
16466
|
-
}
|
|
16467
|
-
},
|
|
16468
|
-
{
|
|
16469
|
-
id: "ui.imageGalleryMarqueeDuration",
|
|
16470
|
-
kind: "string",
|
|
16471
|
-
summary: "Map marquee speed selection to CSS duration",
|
|
16472
|
-
run: (value) => {
|
|
16473
|
-
const speed = typeof value === "string" ? value.trim() : "medium";
|
|
16474
|
-
return speed === "slow" ? "60s" : speed === "fast" ? "20s" : "40s";
|
|
16475
|
-
}
|
|
16476
|
-
},
|
|
16477
|
-
{
|
|
16478
|
-
id: "ui.imageGalleryMarqueeDirection",
|
|
16479
|
-
kind: "string",
|
|
16480
|
-
summary: "Map marquee direction selection to animation-direction",
|
|
16481
|
-
run: (value) => value === "right" ? "reverse" : "normal"
|
|
16482
|
-
},
|
|
16483
|
-
{
|
|
16484
|
-
id: "ui.eyebrowClassName",
|
|
16485
|
-
kind: "string",
|
|
16486
|
-
summary: "Apply a constrained Theme V2 eyebrow treatment class",
|
|
16487
|
-
run: (value, options) => {
|
|
16488
|
-
return joinClasses$1([typeof options?.baseClass === "string" ? options.baseClass : "rb-eyebrow", eyebrowTreatmentClassMap[isEyebrowTreatment(value) ? value : "plain"]]);
|
|
16489
|
-
}
|
|
16490
|
-
},
|
|
16491
|
-
{
|
|
16492
|
-
id: "ui.headingDecorationClassName",
|
|
16493
|
-
kind: "string",
|
|
16494
|
-
summary: "Apply constrained Theme V2 heading decoration classes",
|
|
16495
|
-
run: (value, options) => {
|
|
16496
|
-
const baseClass = typeof options?.baseClass === "string" && options.baseClass.trim() ? options.baseClass : "rb-heading-decoration";
|
|
16497
|
-
const decoration = asPartialObject(value);
|
|
16498
|
-
const family = isHeadingDecorationFamily(decoration?.family) ? decoration.family : null;
|
|
16499
|
-
const colorToken = isHeadingDecorationColorToken(decoration?.colorToken) ? decoration.colorToken : "primary";
|
|
16500
|
-
if (!family) return "rb-hidden";
|
|
16501
|
-
return joinClasses$1([
|
|
16502
|
-
baseClass,
|
|
16503
|
-
`rb-heading-decoration-${family}`,
|
|
16504
|
-
`rb-heading-decoration-color-${colorToken}`
|
|
16505
|
-
]);
|
|
16506
|
-
}
|
|
16507
|
-
}
|
|
16508
|
-
];
|
|
16509
|
-
function longestHeroWord(words, policy) {
|
|
16510
|
-
return policy === "look" ? Math.max(0, ...words.map((word) => word.length)) : 0;
|
|
16511
|
-
}
|
|
16512
|
-
function heroLegacyTypographyClasses(content, scale, length) {
|
|
16513
|
-
return content._effectiveLook ? [] : [scale ? `rb-hero-typography-${scale}` : "", `rb-hero-title-${length}`];
|
|
16514
|
-
}
|
|
16515
|
-
function heroHeadlineText(content, policy) {
|
|
16516
|
-
const plain = readString(content, "headline");
|
|
16517
|
-
return policy === "look" ? inlineTextToPlainText(coerceInlineTextWithFallback(content.headlineInline, plain)).trim() : plain?.trim() ?? "";
|
|
16518
|
-
}
|
|
16519
|
-
//#endregion
|
|
16520
|
-
//#region ../blocks/src/system/transforms/registry/footerArrangement.ts
|
|
16521
|
-
const footerBrandArrangementTransform = {
|
|
16522
|
-
id: "layout.footerBrandArrangement",
|
|
16523
|
-
kind: "string",
|
|
16524
|
-
run: (value) => {
|
|
16525
|
-
const module = asPartialObject(value);
|
|
16526
|
-
return module?.kind === "brand" ? module.slots ? "centred" : "row" : void 0;
|
|
16527
|
-
}
|
|
16528
|
-
};
|
|
16529
|
-
const footerModuleInkStyleTransform = {
|
|
16530
|
-
id: "layout.footerModuleInkStyle",
|
|
16531
|
-
kind: "formatter",
|
|
16532
|
-
run: (value, options) => value === "centred" ? void 0 : textColorStyle(asPartialObject(options)?.opacity === 70 ? "text/70" : "text/80")
|
|
16533
|
-
};
|
|
16534
|
-
/** A centred base without authored bar paint inherits its measured surface line. */
|
|
16535
|
-
function footerBottomBarBorderColorStyle(footer) {
|
|
16536
|
-
return footer?.variant === "centred" && !footer.bottomBar ? { borderColor: "var(--rb-surface-line-color)" } : borderColorStyle(footer?.bottomBar?.borderTop?.colorToken ?? "border");
|
|
16537
|
-
}
|
|
16538
|
-
//#endregion
|
|
16539
|
-
//#region ../blocks/src/system/transforms/registry/layout.ts
|
|
16540
|
-
const joinClasses = (parts) => parts.filter((part) => typeof part === "string" && part.trim().length > 0).join(" ").replace(/\s+/g, " ").trim();
|
|
16541
|
-
/** How the header brand renders; the logo media is hidden for `title-only`. */
|
|
16542
|
-
function resolveHeaderBrandDisplay(logo) {
|
|
16543
|
-
const display = logo?.brandDisplay ?? "logo-plus-title";
|
|
16544
|
-
if (display === "logo-only" || display === "title-only") return display;
|
|
16545
|
-
return "logo-plus-title";
|
|
16546
|
-
}
|
|
16547
|
-
function resolveHeaderLogoSizeClass(logo) {
|
|
16548
|
-
switch (logo?.size ?? "standard") {
|
|
16549
|
-
case "compact": return "header-logo-size-compact";
|
|
16550
|
-
case "generous": return "header-logo-size-generous";
|
|
16551
|
-
case "display": return "header-logo-size-display";
|
|
16552
|
-
default: return "header-logo-size-standard";
|
|
16553
|
-
}
|
|
16554
|
-
}
|
|
16555
|
-
function resolveHeaderLogoAccommodationClass(logo) {
|
|
16556
|
-
if (resolveHeaderBrandDisplay(logo) === "title-only") return "header-logo-accommodation-title-only";
|
|
16557
|
-
switch (logo?.accommodation) {
|
|
16558
|
-
case "logo-plate": return "header-logo-accommodation-plate";
|
|
16559
|
-
case "centered-badge": return "header-logo-accommodation-centered-badge";
|
|
16560
|
-
case "popout-badge": return "header-logo-accommodation-popout-badge";
|
|
16561
|
-
case "centered-masthead": return "header-logo-accommodation-centered-masthead";
|
|
16562
|
-
case "hero-badge": return "header-logo-accommodation-hero-badge";
|
|
16563
|
-
case "inline-logo-only": return "header-logo-accommodation-inline-logo-only";
|
|
16564
|
-
case "inline-wordmark": return "header-logo-accommodation-inline-wordmark";
|
|
16565
|
-
case "inline-mark-with-title": return "header-logo-accommodation-inline-mark-with-title";
|
|
16566
|
-
case "title-only": return "header-logo-accommodation-title-only";
|
|
16567
|
-
case void 0:
|
|
16568
|
-
default: return "header-logo-accommodation-inline";
|
|
16569
|
-
}
|
|
16570
|
-
}
|
|
16571
|
-
const headerLogoClassSchema = z.object({ base: z.string().optional() });
|
|
16572
|
-
const headerLogoClassTransform = {
|
|
16573
|
-
id: "layout.headerLogoClass",
|
|
16574
|
-
kind: "string",
|
|
16575
|
-
summary: "Compose header logo wrapper classes from brand display and accommodation settings",
|
|
16576
|
-
schema: headerLogoClassSchema,
|
|
16577
|
-
run: (value, options) => {
|
|
16578
|
-
const logo = asPartialObject(value);
|
|
16579
|
-
return joinClasses([
|
|
16580
|
-
options.base ?? "header-logo rb-flex rb-min-w-0 rb-items-center rb-gap-3 rb-no-underline rb-transition-opacity rb-hover-opacity-80",
|
|
16581
|
-
`header-brand-display-${resolveHeaderBrandDisplay(logo)}`,
|
|
16582
|
-
resolveHeaderLogoSizeClass(logo),
|
|
16583
|
-
resolveHeaderLogoAccommodationClass(logo)
|
|
16584
|
-
]);
|
|
16585
|
-
}
|
|
16586
|
-
};
|
|
16587
|
-
const headerLogoMediaClassTransform = {
|
|
16588
|
-
id: "layout.headerLogoMediaClass",
|
|
16589
|
-
kind: "string",
|
|
16590
|
-
summary: "Compose header logo media classes from brand display and size settings",
|
|
16591
|
-
schema: headerLogoClassSchema,
|
|
16592
|
-
run: (value, options) => {
|
|
16593
|
-
const logo = asPartialObject(value);
|
|
16594
|
-
const hiddenClass = resolveHeaderBrandDisplay(logo) === "title-only" ? "rb-hidden" : null;
|
|
16595
|
-
return joinClasses([
|
|
16596
|
-
options.base ?? "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300",
|
|
16597
|
-
resolveHeaderLogoSizeClass(logo),
|
|
16598
|
-
hiddenClass
|
|
16599
|
-
]);
|
|
16600
|
-
}
|
|
16601
|
-
};
|
|
16602
|
-
const headerLogoTextVisibleTransform = {
|
|
16603
|
-
id: "layout.headerLogoTextVisible",
|
|
16604
|
-
kind: "formatter",
|
|
16605
|
-
summary: "Return whether header logo text should render",
|
|
16606
|
-
run: (value) => {
|
|
16607
|
-
return resolveHeaderBrandDisplay(asPartialObject(value)) !== "logo-only";
|
|
16184
|
+
const headerLogoTextVisibleTransform = {
|
|
16185
|
+
id: "layout.headerLogoTextVisible",
|
|
16186
|
+
kind: "formatter",
|
|
16187
|
+
summary: "Return whether header logo text should render",
|
|
16188
|
+
run: (value) => {
|
|
16189
|
+
return resolveHeaderBrandDisplay(asPartialObject(value)) !== "logo-only";
|
|
16608
16190
|
}
|
|
16609
16191
|
};
|
|
16610
16192
|
const maxWidthClassTransform = {
|
|
@@ -16658,11 +16240,6 @@ function resolvedForegroundStyle(foreground) {
|
|
|
16658
16240
|
case "known": return surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, rgbColorValue));
|
|
16659
16241
|
}
|
|
16660
16242
|
}
|
|
16661
|
-
function footerBottomBarBorderWidthStyle(width) {
|
|
16662
|
-
if (!width) return void 0;
|
|
16663
|
-
if (width === "none") return { borderTopWidth: "0px" };
|
|
16664
|
-
return { borderTopWidth: width === "thin" ? "1px" : width === "medium" ? "2px" : "3px" };
|
|
16665
|
-
}
|
|
16666
16243
|
const headerRootClassTransform = {
|
|
16667
16244
|
id: "layout.headerRootClass",
|
|
16668
16245
|
kind: "string",
|
|
@@ -16698,27 +16275,6 @@ const headerRootClassTransform = {
|
|
|
16698
16275
|
return joinClasses(classes);
|
|
16699
16276
|
}
|
|
16700
16277
|
};
|
|
16701
|
-
const footerRootClassTransform = {
|
|
16702
|
-
id: "layout.footerRootClass",
|
|
16703
|
-
kind: "string",
|
|
16704
|
-
summary: "Compose footer root classes with optional inversion",
|
|
16705
|
-
schema: z.object({
|
|
16706
|
-
base: z.string().optional(),
|
|
16707
|
-
surface: z.string().optional(),
|
|
16708
|
-
tokenPrefix: z.string().optional(),
|
|
16709
|
-
transparent: z.string().optional()
|
|
16710
|
-
}),
|
|
16711
|
-
run: (value, options) => {
|
|
16712
|
-
const config = {
|
|
16713
|
-
base: "rb-w-full rb-border-t transition-theme",
|
|
16714
|
-
transparent: "rb-bg-transparent",
|
|
16715
|
-
...options
|
|
16716
|
-
};
|
|
16717
|
-
const background = asPartialObject(value)?.background;
|
|
16718
|
-
const backgroundClass = resolveBackgroundVisualStyles(extractBackgroundColorToken(background, "surface")).isTransparent ? config.transparent : null;
|
|
16719
|
-
return joinClasses([config.base, backgroundClass]);
|
|
16720
|
-
}
|
|
16721
|
-
};
|
|
16722
16278
|
const headerRootStyleTransform = {
|
|
16723
16279
|
id: "layout.headerRootStyle",
|
|
16724
16280
|
kind: "formatter",
|
|
@@ -16750,115 +16306,61 @@ function headerSectionBackground(header) {
|
|
|
16750
16306
|
const visuals = resolveHeaderVisualStyles(header);
|
|
16751
16307
|
return header?.background?.type === "color" && !visuals.isTransparent && !visuals.backgroundToken.includes("/") ? visuals.backgroundToken : "background";
|
|
16752
16308
|
}
|
|
16309
|
+
/**
|
|
16310
|
+
* What one footer area looks like: its ground, and the inks certified on it.
|
|
16311
|
+
* The main ground is the footer's own, painted on the root so the edge and every
|
|
16312
|
+
* unpainted area share it. A painted side area sets its ground variable (read by
|
|
16313
|
+
* site-footer.css) and its own inks; an unpainted one adds nothing and sits on
|
|
16314
|
+
* the main ground under a rule.
|
|
16315
|
+
*/
|
|
16316
|
+
function footerAreaPaintStyle(footer, area, context) {
|
|
16317
|
+
const palette = context.theme.palette;
|
|
16318
|
+
if (area === "main") {
|
|
16319
|
+
const foreground = resolveFooterRootForeground(footer, palette, context.proseHoverCandidate);
|
|
16320
|
+
return mergeStyles(backgroundColorStyle(footerMainPaint(footer).ground), resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context), surfaceInkStyles(foreground, palette));
|
|
16321
|
+
}
|
|
16322
|
+
const paint = footerSideBandPaint(footer, area);
|
|
16323
|
+
const foreground = resolveFooterSideBandForeground(footer, area, palette, context.proseHoverCandidate);
|
|
16324
|
+
if (!paint || !foreground) return void 0;
|
|
16325
|
+
return mergeStyles({ [`--rb-footer-${area}-bg`]: rgbColorValue(paint.ground) }, resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context), surfaceInkStyles(foreground, palette));
|
|
16326
|
+
}
|
|
16327
|
+
const footerAreaValues = [
|
|
16328
|
+
"band",
|
|
16329
|
+
"main",
|
|
16330
|
+
"strip",
|
|
16331
|
+
"base"
|
|
16332
|
+
];
|
|
16333
|
+
const isFooterArea = (value) => footerAreaValues.some((area) => area === value);
|
|
16334
|
+
function readThemeFooter(viewModel) {
|
|
16335
|
+
return asPartialObject(asPartialObject(asPartialObject(viewModel?.["$root"])?.theme)?.footer);
|
|
16336
|
+
}
|
|
16337
|
+
/** The footer root: the main ground, its inks and the top rule. */
|
|
16753
16338
|
const footerRootStyleTransform = {
|
|
16754
16339
|
id: "layout.footerRootStyle",
|
|
16755
16340
|
kind: "formatter",
|
|
16756
|
-
summary: "
|
|
16757
|
-
run: (value, _options, context) => {
|
|
16758
|
-
const footer = asPartialObject(value);
|
|
16759
|
-
const background = footer?.background;
|
|
16760
|
-
const visuals = resolveBackgroundVisualStyles(extractBackgroundColorToken(background, "surface"));
|
|
16761
|
-
const styleParts = [];
|
|
16762
|
-
if (!visuals.isTransparent) {
|
|
16763
|
-
if (!background || background.type === "color") {
|
|
16764
|
-
const token = background?.color ?? "surface";
|
|
16765
|
-
styleParts.push(backgroundColorStyle(token));
|
|
16766
|
-
}
|
|
16767
|
-
}
|
|
16768
|
-
const foreground = resolveFooterRootForeground(footer, context.theme.palette, context.proseHoverCandidate);
|
|
16769
|
-
styleParts.push(resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context));
|
|
16770
|
-
if (footer?.variant === "centred") styleParts.push(surfaceInkStyles(foreground, context.theme.palette));
|
|
16771
|
-
styleParts.push(borderColorStyle("border"));
|
|
16772
|
-
return mergeStyles(...styleParts);
|
|
16773
|
-
}
|
|
16774
|
-
};
|
|
16775
|
-
const footerSpacingClassXMap = {
|
|
16776
|
-
none: "rb-px-0",
|
|
16777
|
-
tight: "rb-px-2",
|
|
16778
|
-
compact: "rb-px-4",
|
|
16779
|
-
default: "rb-px-6",
|
|
16780
|
-
relaxed: "rb-px-8",
|
|
16781
|
-
spacious: "rb-px-12"
|
|
16782
|
-
};
|
|
16783
|
-
const footerSpacingClassYMap = {
|
|
16784
|
-
none: "rb-py-0",
|
|
16785
|
-
tight: "rb-py-2",
|
|
16786
|
-
compact: "rb-py-4",
|
|
16787
|
-
default: "rb-py-6",
|
|
16788
|
-
relaxed: "rb-py-8",
|
|
16789
|
-
spacious: "rb-py-12"
|
|
16790
|
-
};
|
|
16791
|
-
const footerBottomBarClassTransform = {
|
|
16792
|
-
id: "layout.footerBottomBarClass",
|
|
16793
|
-
kind: "string",
|
|
16794
|
-
summary: "Compose footer bottom bar classes from theme controls",
|
|
16795
|
-
schema: z.object({ base: z.string().optional() }),
|
|
16796
|
-
run: (value, options) => {
|
|
16797
|
-
const bottomBar = asPartialObject(value)?.bottomBar;
|
|
16798
|
-
const textAlign = bottomBar?.textAlign ?? "center";
|
|
16799
|
-
const alignClass = textAlign === "left" ? "rb-text-left" : textAlign === "right" ? "rb-text-right" : "rb-text-center";
|
|
16800
|
-
const px = footerSpacingClassXMap[bottomBar?.paddingX ?? "default"] ?? "rb-px-6";
|
|
16801
|
-
const py = footerSpacingClassYMap[bottomBar?.paddingY ?? "default"] ?? "rb-py-6";
|
|
16802
|
-
return joinClasses([
|
|
16803
|
-
options.base ?? "rb-w-full rb-border-t",
|
|
16804
|
-
alignClass,
|
|
16805
|
-
px,
|
|
16806
|
-
py
|
|
16807
|
-
]);
|
|
16808
|
-
}
|
|
16809
|
-
};
|
|
16810
|
-
const footerBottomBarContainerClassTransform = {
|
|
16811
|
-
id: "layout.footerBottomBarContainerClass",
|
|
16812
|
-
kind: "string",
|
|
16813
|
-
summary: "Resolve full-bleed vs contained bottom bar container classes",
|
|
16814
|
-
schema: z.object({
|
|
16815
|
-
base: z.string().optional(),
|
|
16816
|
-
fullBleed: z.string().optional(),
|
|
16817
|
-
contained: z.string().optional()
|
|
16818
|
-
}),
|
|
16819
|
-
run: (value, options) => {
|
|
16820
|
-
const footer = asPartialObject(value);
|
|
16821
|
-
const fullBleed = Boolean(footer?.bottomBar?.fullBleed);
|
|
16822
|
-
return joinClasses([options.base ?? "", fullBleed ? options.fullBleed ?? "rb-w-full" : options.contained ?? "rb-container"]);
|
|
16823
|
-
}
|
|
16824
|
-
};
|
|
16825
|
-
const footerBottomBarStyleTransform = {
|
|
16826
|
-
id: "layout.footerBottomBarStyle",
|
|
16827
|
-
kind: "formatter",
|
|
16828
|
-
summary: "Compose footer bottom bar style from theme controls",
|
|
16341
|
+
summary: "Paint the footer root with the main ground and its inks",
|
|
16829
16342
|
run: (value, _options, context) => {
|
|
16830
16343
|
const footer = asPartialObject(value);
|
|
16831
|
-
|
|
16832
|
-
return mergeStyles(bottomBar?.background?.type === "color" ? backgroundColorStyle(bottomBar.background.color ?? "surface") : void 0, footerBottomBarBorderColorStyle(footer), footerBottomBarBorderWidthStyle(bottomBar?.borderTop?.width), ...footerBottomBarForegroundStyles(footer, context));
|
|
16833
|
-
}
|
|
16834
|
-
};
|
|
16835
|
-
/** The bar's own certified contract and inks, its certified text on the footer's ground, or nothing of its own. */
|
|
16836
|
-
function footerBottomBarForegroundStyles(footer, context) {
|
|
16837
|
-
if (!footer) return [];
|
|
16838
|
-
const paint = resolveFooterBottomBarPaint(footer, context.theme.palette);
|
|
16839
|
-
switch (paint.kind) {
|
|
16840
|
-
case "inherits": return [];
|
|
16841
|
-
case "surface": return [resolvedForegroundStyle(paint.foreground), solvedInkStyle(paint.foreground, context)];
|
|
16842
|
-
case "unmeasured": return [textColorStyle(paint.declared)];
|
|
16843
|
-
case "ink": return [paint.paint.fallback ? { color: paint.paint.ink } : textColorStyle(paint.declared)];
|
|
16844
|
-
}
|
|
16845
|
-
}
|
|
16846
|
-
const footerLogoClassTransform = {
|
|
16847
|
-
id: "layout.footerLogoClass",
|
|
16848
|
-
kind: "string",
|
|
16849
|
-
summary: "Compose split-footer logo wrapper classes from footer.logo controls",
|
|
16850
|
-
schema: z.object({ base: z.string().optional() }),
|
|
16851
|
-
run: (value, options) => {
|
|
16852
|
-
const align = asPartialObject(value)?.align ?? "end";
|
|
16853
|
-
const selfAlignClass = align === "start" ? "rb-self-start rb-text-left" : align === "center" ? "rb-self-center rb-text-center" : "rb-self-end rb-text-right";
|
|
16854
|
-
return joinClasses([options.base ?? "footer-logo rb-inline-flex rb-items-center rb-justify-end rb-gap-3 rb-no-underline rb-transition-opacity rb-hover-opacity-80", selfAlignClass]);
|
|
16344
|
+
return mergeStyles(footerAreaPaintStyle(footer, "main", context), borderColorStyle("border"), footerEdgeGrounds(footer));
|
|
16855
16345
|
}
|
|
16856
16346
|
};
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16347
|
+
/**
|
|
16348
|
+
* The grounds the edge can take, published on the root: site-footer.css paints
|
|
16349
|
+
* the edge with the first rendered area, and a skin that insets its band points it back at the main
|
|
16350
|
+
* ground with --rb-footer-edge-paint.
|
|
16351
|
+
*/
|
|
16352
|
+
function footerEdgeGrounds(footer) {
|
|
16353
|
+
return {
|
|
16354
|
+
"--rb-footer-ground": rgbColorValue(footerMainPaint(footer).ground),
|
|
16355
|
+
...Object.fromEntries([
|
|
16356
|
+
"band",
|
|
16357
|
+
"strip",
|
|
16358
|
+
"base"
|
|
16359
|
+
].flatMap((area) => {
|
|
16360
|
+
const paint = footerSideBandPaint(footer, area);
|
|
16361
|
+
return paint ? [[`--rb-footer-${area}-ground`, rgbColorValue(paint.ground)]] : [];
|
|
16362
|
+
}))
|
|
16363
|
+
};
|
|
16862
16364
|
}
|
|
16863
16365
|
const layoutTransforms = [
|
|
16864
16366
|
maxWidthClassTransform,
|
|
@@ -16866,16 +16368,15 @@ const layoutTransforms = [
|
|
|
16866
16368
|
headerLogoClassTransform,
|
|
16867
16369
|
headerLogoMediaClassTransform,
|
|
16868
16370
|
headerLogoTextVisibleTransform,
|
|
16869
|
-
footerRootClassTransform,
|
|
16870
16371
|
headerRootStyleTransform,
|
|
16871
16372
|
headerSectionBackgroundTransform,
|
|
16872
16373
|
footerRootStyleTransform,
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16374
|
+
{
|
|
16375
|
+
id: "layout.footerAreaStyle",
|
|
16376
|
+
kind: "formatter",
|
|
16377
|
+
summary: "Paint one footer area from the compiled footer bands",
|
|
16378
|
+
run: (value, _options, context) => isFooterArea(value) && value !== "main" ? footerAreaPaintStyle(readThemeFooter(context.viewModel), value, context) : void 0
|
|
16379
|
+
}
|
|
16879
16380
|
];
|
|
16880
16381
|
//#endregion
|
|
16881
16382
|
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
@@ -17324,7 +16825,11 @@ const centeredLayout = stack({
|
|
|
17324
16825
|
transforms: pipe(tx("layout.maxWidthClass", { base: `rb-header-layout header-desktop-bar ${desktopOnlyDisplay("flex")} rb-w-full rb-flex-col rb-items-center rb-gap-5 rb-text-center` })),
|
|
17325
16826
|
fallback: `rb-container rb-header-layout header-desktop-bar ${desktopOnlyDisplay("flex")} rb-w-full rb-flex-col rb-items-center rb-gap-5 rb-text-center`
|
|
17326
16827
|
})
|
|
17327
|
-
}, [centeredLogoRow,
|
|
16828
|
+
}, [centeredLogoRow, inline({
|
|
16829
|
+
className: `${desktopOnlyDisplay("flex")} rb-flex-wrap rb-items-center rb-justify-center rb-gap-y-3`,
|
|
16830
|
+
align: "center",
|
|
16831
|
+
justify: "center"
|
|
16832
|
+
}, [createNavRow(`${desktopOnlyDisplay("flex")} rb-flex-wrap rb-justify-center rb-gap-x-6 rb-gap-y-3`, "center"), headerCta])], when("$root.theme.header.variant", { equals: "centered" }));
|
|
17328
16833
|
const floatingLayout = inline({
|
|
17329
16834
|
[SITE_CHROME_VISIBLE_HEADER_ATTR]: "true",
|
|
17330
16835
|
className: bindProp("$root.theme.header.maxWidth", {
|
|
@@ -17393,33 +16898,12 @@ const siteHeaderManifest = createBlockManifest({
|
|
|
17393
16898
|
const siteHeaderBlockDefinition = { manifest: siteHeaderManifest };
|
|
17394
16899
|
//#endregion
|
|
17395
16900
|
//#region ../blocks/src/system/blocks/site-footer-nav-groups-layout.ts
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
align: "start",
|
|
17399
|
-
className: { $bind: {
|
|
17400
|
-
from: "module.navigationGroupsClassName",
|
|
17401
|
-
fallback: "rb-grid rb-grid-cols-1 rb-gap-6"
|
|
17402
|
-
} }
|
|
17403
|
-
}, [stack({
|
|
17404
|
-
gap: "md",
|
|
17405
|
-
align: "start",
|
|
17406
|
-
className: "rb-text-left"
|
|
17407
|
-
}, [text({
|
|
16901
|
+
/** Labelled link sets as columns; the layout's CSS places them. */
|
|
16902
|
+
const footerNavGroupsLayout = el("div", { className: "rb-footer-link-groups" }, [el("div", { className: "rb-footer-link-group" }, [text({
|
|
17408
16903
|
as: "h3",
|
|
17409
16904
|
className: "rb-label",
|
|
17410
|
-
"data-slot":
|
|
17411
|
-
|
|
17412
|
-
from: "content.footerRuntime.arrangement",
|
|
17413
|
-
transforms: [{
|
|
17414
|
-
id: "layout.footerModuleInkStyle",
|
|
17415
|
-
options: { opacity: 70 }
|
|
17416
|
-
}]
|
|
17417
|
-
} }
|
|
17418
|
-
}, when("group.label"), bind("group.label")), stack({
|
|
17419
|
-
gap: "sm",
|
|
17420
|
-
align: "start",
|
|
17421
|
-
className: "rb-space-y-2"
|
|
17422
|
-
}, [link({
|
|
16905
|
+
"data-slot": "group-label"
|
|
16906
|
+
}, when("group.label"), bind("group.label")), el("div", { className: "rb-footer-link-list" }, [link({
|
|
17423
16907
|
className: "rb-block rb-nav-text transition-theme rb-hover-opacity-80",
|
|
17424
16908
|
style: textColorStyle("text"),
|
|
17425
16909
|
href: { $bind: {
|
|
@@ -17445,106 +16929,67 @@ const footerMailingListBindings = {
|
|
|
17445
16929
|
targeting: { $bind: { from: "module.engagement.runtime.targeting" } }
|
|
17446
16930
|
};
|
|
17447
16931
|
const footerSpamProtectionBinding = { spamProtectionEnabled: { $bind: { from: "$root.spamProtectionEnabled" } } };
|
|
17448
|
-
|
|
16932
|
+
/** Shown only in the details strip, where these icons stand in for the headings. */
|
|
16933
|
+
const stripIcon = (value, label, ...mods) => icon({
|
|
16934
|
+
value,
|
|
16935
|
+
"aria-label": label,
|
|
16936
|
+
className: "rb-footer-detail-icon"
|
|
16937
|
+
}, ...mods);
|
|
16938
|
+
const whenInStrip = when("region.slot", { equals: "strip" });
|
|
16939
|
+
const brandLogo = link({
|
|
16940
|
+
href: "/",
|
|
16941
|
+
className: "footer-logo rb-no-underline"
|
|
16942
|
+
}, [el("div", {
|
|
16943
|
+
"data-slot": "media",
|
|
16944
|
+
className: "footer-logo-media"
|
|
16945
|
+
}, [media({ className: "rb-h-10 rb-w-auto" }, when("content.logo"), bind("content", { transforms: [{
|
|
17449
16946
|
id: "layout.chromeLogo",
|
|
17450
16947
|
options: { surface: "footer-root" }
|
|
17451
|
-
}] }))
|
|
17452
|
-
const brandTitle = text({
|
|
16948
|
+
}] }))], when("module.showLogo", { equals: true })), text({
|
|
17453
16949
|
as: "strong",
|
|
17454
|
-
className: "footer-logo-text rb-nav-text"
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
className:
|
|
17459
|
-
|
|
17460
|
-
transforms: [{
|
|
17461
|
-
id: "layout.footerLogoClass",
|
|
17462
|
-
options: { base: "footer-logo rb-inline-flex rb-flex-wrap rb-items-center rb-gap-3 rb-no-underline" }
|
|
17463
|
-
}],
|
|
17464
|
-
fallback: "footer-logo rb-inline-flex rb-flex-wrap rb-items-center rb-gap-3 rb-no-underline"
|
|
17465
|
-
} }
|
|
17466
|
-
}, [brandMedia, brandTitle], (node) => ({
|
|
17467
|
-
...node,
|
|
17468
|
-
$when: {
|
|
17469
|
-
when: {
|
|
17470
|
-
from: "module",
|
|
17471
|
-
transforms: [{ id: "layout.footerBrandArrangement" }]
|
|
17472
|
-
},
|
|
17473
|
-
equals: "row"
|
|
17474
|
-
}
|
|
17475
|
-
}));
|
|
17476
|
-
const centredBrand = stack({
|
|
17477
|
-
gap: "md",
|
|
17478
|
-
align: "center"
|
|
17479
|
-
}, [link({
|
|
17480
|
-
href: "/",
|
|
17481
|
-
"data-slot": { $bind: { from: "module.slots.media" } },
|
|
17482
|
-
className: "footer-logo rb-inline-flex rb-items-center rb-no-underline"
|
|
17483
|
-
}, [brandMedia], when("module.slots.media")), {
|
|
17484
|
-
...brandTitle,
|
|
17485
|
-
props: {
|
|
17486
|
-
...brandTitle.props,
|
|
17487
|
-
"data-slot": { $bind: { from: "module.slots.heading" } }
|
|
17488
|
-
}
|
|
17489
|
-
}], (node) => ({
|
|
17490
|
-
...node,
|
|
17491
|
-
$when: {
|
|
17492
|
-
when: {
|
|
17493
|
-
from: "module",
|
|
17494
|
-
transforms: [{ id: "layout.footerBrandArrangement" }]
|
|
17495
|
-
},
|
|
17496
|
-
equals: "centred"
|
|
17497
|
-
}
|
|
17498
|
-
}));
|
|
17499
|
-
const navigation = stack({
|
|
17500
|
-
gap: "md",
|
|
17501
|
-
className: "rb-w-full"
|
|
16950
|
+
className: "footer-logo-text rb-nav-text",
|
|
16951
|
+
"data-slot": "heading"
|
|
16952
|
+
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
16953
|
+
const navigation = el("div", {
|
|
16954
|
+
className: "rb-footer-links",
|
|
16955
|
+
"data-slot": "navigation"
|
|
17502
16956
|
}, [footerNavGroupsLayout, footerNav({
|
|
17503
16957
|
collectionPath: "footerMenu.items",
|
|
17504
16958
|
mode: "links-only",
|
|
17505
|
-
className:
|
|
17506
|
-
from: "module.navigationClassName",
|
|
17507
|
-
fallback: "footer-nav rb-flex rb-flex-wrap rb-gap-x-6 rb-gap-y-3"
|
|
17508
|
-
} },
|
|
16959
|
+
className: "rb-footer-flat-links",
|
|
17509
16960
|
linkClassName: "footer-nav-link rb-block rb-nav-text transition-theme-standard"
|
|
17510
16961
|
})], when("module.kind", { equals: "navigation" }));
|
|
17511
|
-
const legalNavigation = footerNav({
|
|
16962
|
+
const legalNavigation = el("div", { "data-slot": "navigation" }, [footerNav({
|
|
17512
16963
|
collectionPath: "legalFooterMenu.items",
|
|
17513
16964
|
mode: "links-only",
|
|
17514
|
-
className: "rb-
|
|
16965
|
+
className: "rb-footer-legal-links",
|
|
17515
16966
|
linkClassName: "footer-nav-link rb-caption transition-theme-standard"
|
|
17516
|
-
});
|
|
17517
|
-
const address = text({
|
|
17518
|
-
|
|
17519
|
-
|
|
17520
|
-
|
|
17521
|
-
|
|
17522
|
-
gap: "sm",
|
|
17523
|
-
className: { $bind: {
|
|
17524
|
-
from: "module.contactClassName",
|
|
17525
|
-
fallback: "rb-items-start"
|
|
17526
|
-
} }
|
|
17527
|
-
}, [link({
|
|
16967
|
+
})], when("module.kind", { equals: "legal-navigation" }));
|
|
16968
|
+
const address = el("div", { className: "rb-footer-detail" }, [stripIcon("MapPin", "Address", whenInStrip), text({ as: "address" }, bind("module.address"))], when("module.kind", { equals: "business-address" }));
|
|
16969
|
+
const contact = el("div", {
|
|
16970
|
+
"data-slot": "contact",
|
|
16971
|
+
className: "rb-footer-contact"
|
|
16972
|
+
}, [el("div", { className: "rb-footer-detail" }, [el("div", { className: "rb-footer-detail-icon-slot" }, [stripIcon("Phone", "Phone", when("contactLink.kind", { equals: "phone" })), stripIcon("Mail", "Email", when("contactLink.kind", { equals: "email" }))], whenInStrip), link({
|
|
17528
16973
|
href: { $bind: { from: "contactLink.href" } },
|
|
17529
16974
|
className: "rb-nav-text rb-break-words transition-theme-standard"
|
|
17530
|
-
}, [text({ as: "span" }, bind("contactLink.label"))], repeat("module.contactLinks", "contactLink"))], when("module.kind", { equals: "contact" }));
|
|
17531
|
-
const hours =
|
|
17532
|
-
|
|
17533
|
-
className: "rb-
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
}, bind("
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17543
|
-
|
|
17544
|
-
|
|
16975
|
+
}, [text({ as: "span" }, bind("contactLink.label"))])], repeat("module.contactLinks", "contactLink"))], when("module.kind", { equals: "contact" }));
|
|
16976
|
+
const hours = el("div", { className: "rb-footer-detail" }, [stripIcon("time", "Opening hours", whenInStrip), el("div", {
|
|
16977
|
+
"data-slot": "schedule",
|
|
16978
|
+
className: "rb-footer-hours"
|
|
16979
|
+
}, [el("div", { className: "rb-footer-hours-row" }, [
|
|
16980
|
+
text({
|
|
16981
|
+
as: "span",
|
|
16982
|
+
className: "rb-footer-hours-days"
|
|
16983
|
+
}, bind("hoursRow.days")),
|
|
16984
|
+
text({
|
|
16985
|
+
as: "span",
|
|
16986
|
+
value: " "
|
|
16987
|
+
}),
|
|
16988
|
+
text({ as: "span" }, bind("hoursRow.hours"))
|
|
16989
|
+
], repeat("module.openingHours", "hoursRow"))])], when("module.kind", { equals: "opening-hours" }));
|
|
17545
16990
|
const socials = inline({
|
|
17546
16991
|
className: "rb-footer-socials",
|
|
17547
|
-
"data-slot":
|
|
16992
|
+
"data-slot": "social"
|
|
17548
16993
|
}, [link({
|
|
17549
16994
|
href: { $bind: { from: "social.href" } },
|
|
17550
16995
|
target: "_blank",
|
|
@@ -17552,20 +16997,13 @@ const socials = inline({
|
|
|
17552
16997
|
"aria-label": { $bind: { from: "social.label" } },
|
|
17553
16998
|
className: "rb-footer-social-link rb-nav-text transition-theme-standard"
|
|
17554
16999
|
}, [icon({ className: "rb-footer-social-icon" }, bind("social.icon"), when("social.icon")), text({ as: "span" }, bind("social.label"), when("social.icon", { equals: null }))], repeat("module.socialLinks", "social"))], when("module.kind", { equals: "social-links" }));
|
|
17555
|
-
const authoredCopy = richText({
|
|
17000
|
+
const authoredCopy = (slot, kind) => el("div", { className: "rb-footer-copy" }, [richText({
|
|
17556
17001
|
className: "rb-prose rb-prose-sm rb-max-w-none",
|
|
17557
|
-
"data-slot":
|
|
17558
|
-
style: { $bind: {
|
|
17559
|
-
from: "content.footerRuntime.arrangement",
|
|
17560
|
-
transforms: [{
|
|
17561
|
-
id: "layout.footerModuleInkStyle",
|
|
17562
|
-
options: { opacity: 80 }
|
|
17563
|
-
}]
|
|
17564
|
-
} }
|
|
17002
|
+
"data-slot": slot
|
|
17565
17003
|
}, when("module.content"), bind("module.content", { transforms: [{
|
|
17566
17004
|
id: "content.interpolateRichTextTokens",
|
|
17567
17005
|
options: { tokens: ["year", "site_name"] }
|
|
17568
|
-
}] }));
|
|
17006
|
+
}] }))], when("module.kind", { equals: kind }));
|
|
17569
17007
|
const footerEngagement = stack({
|
|
17570
17008
|
gap: "md",
|
|
17571
17009
|
className: "rb-w-full",
|
|
@@ -17573,7 +17011,8 @@ const footerEngagement = stack({
|
|
|
17573
17011
|
}, [
|
|
17574
17012
|
text({
|
|
17575
17013
|
as: "p",
|
|
17576
|
-
className: "rb-body
|
|
17014
|
+
className: "rb-body",
|
|
17015
|
+
"data-slot": "intro"
|
|
17577
17016
|
}, bind("module.engagement.intro"), when("module.engagement.intro")),
|
|
17578
17017
|
form(withApiBindings({
|
|
17579
17018
|
...footerStandardContactBindings,
|
|
@@ -17614,48 +17053,34 @@ const copyright = text({
|
|
|
17614
17053
|
id: "content.interpolateRichTextTokens",
|
|
17615
17054
|
options: { tokens: ["year", "site_name"] }
|
|
17616
17055
|
}] }), when("module.kind", { equals: "copyright" }));
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
|
|
17622
|
-
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17056
|
+
/**
|
|
17057
|
+
* Each area runs full width, painted by its band (or on the main ground under a
|
|
17058
|
+
* rule); its content sits in the page container.
|
|
17059
|
+
*/
|
|
17060
|
+
const footerRegion = el("div", {
|
|
17061
|
+
className: "rb-footer-area",
|
|
17062
|
+
"data-slot": { $bind: { from: "region.slot" } },
|
|
17063
|
+
style: { $bind: {
|
|
17064
|
+
from: "region.slot",
|
|
17065
|
+
transforms: [{ id: "layout.footerAreaStyle" }]
|
|
17066
|
+
} }
|
|
17067
|
+
}, [el("div", { className: "rb-container rb-footer-area-inner" }, [el("div", {
|
|
17068
|
+
className: "rb-footer-group",
|
|
17627
17069
|
"data-slot": { $bind: { from: "group.slot" } },
|
|
17628
17070
|
"data-footer-group": { $bind: { from: "group.kind" } }
|
|
17629
|
-
}, [
|
|
17630
|
-
|
|
17631
|
-
align: { $bind: {
|
|
17632
|
-
from: "module.align",
|
|
17633
|
-
fallback: "start"
|
|
17634
|
-
} },
|
|
17635
|
-
className: { $bind: { from: "module.className" } },
|
|
17071
|
+
}, [el("div", {
|
|
17072
|
+
className: "rb-footer-module",
|
|
17636
17073
|
"data-footer-module": { $bind: { from: "module.kind" } },
|
|
17637
17074
|
"data-preview-footer-module-id": { $bind: { from: "module.id" } }
|
|
17638
17075
|
}, [
|
|
17639
17076
|
text({
|
|
17640
17077
|
as: "h2",
|
|
17641
17078
|
className: "rb-label",
|
|
17642
|
-
"data-slot":
|
|
17643
|
-
style: { $bind: {
|
|
17644
|
-
from: "content.footerRuntime.arrangement",
|
|
17645
|
-
transforms: [{
|
|
17646
|
-
id: "layout.footerModuleInkStyle",
|
|
17647
|
-
options: { opacity: 70 }
|
|
17648
|
-
}]
|
|
17649
|
-
} }
|
|
17079
|
+
"data-slot": "group-label"
|
|
17650
17080
|
}, bind("module.heading"), when("module.heading")),
|
|
17651
17081
|
brandLogo,
|
|
17652
|
-
centredBrand,
|
|
17653
17082
|
navigation,
|
|
17654
|
-
|
|
17655
|
-
gap: "sm",
|
|
17656
|
-
className: "rb-w-full",
|
|
17657
|
-
"data-slot": { $bind: { from: "module.slots.navigation" } }
|
|
17658
|
-
}, [legalNavigation], when("module.kind", { equals: "legal-navigation" })),
|
|
17083
|
+
legalNavigation,
|
|
17659
17084
|
address,
|
|
17660
17085
|
contact,
|
|
17661
17086
|
hours,
|
|
@@ -17663,36 +17088,20 @@ const footerGroup = stack({
|
|
|
17663
17088
|
footerEngagement,
|
|
17664
17089
|
copyright,
|
|
17665
17090
|
platformAttribution,
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
], repeat("group.modules", "module"))], repeat("region.groups", "group"));
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17675
|
-
|
|
17676
|
-
"data-
|
|
17677
|
-
"data-
|
|
17678
|
-
|
|
17679
|
-
|
|
17680
|
-
from: "$root.theme.footer",
|
|
17681
|
-
transforms: [{ id: "layout.footerBottomBarContainerClass" }],
|
|
17682
|
-
fallback: "rb-w-full"
|
|
17683
|
-
} } }, [stack({
|
|
17684
|
-
className: { $bind: {
|
|
17685
|
-
from: "$root.theme.footer",
|
|
17686
|
-
transforms: [{ id: "layout.footerBottomBarClass" }],
|
|
17687
|
-
fallback: "rb-w-full rb-border-t rb-px-6 rb-py-6 rb-text-center"
|
|
17688
|
-
} },
|
|
17689
|
-
style: { $bind: {
|
|
17690
|
-
from: "$root.theme.footer",
|
|
17691
|
-
transforms: [{ id: "layout.footerBottomBarStyle" }]
|
|
17692
|
-
} },
|
|
17693
|
-
"data-slot": { $bind: { from: "region.slot" } },
|
|
17694
|
-
"data-footer-region": "bottom"
|
|
17695
|
-
}, [footerGroup])], when("region.kind", { equals: "bottom" }), repeat("content.footerRuntime.regions", "region"));
|
|
17091
|
+
authoredCopy("intro", "supporting-text"),
|
|
17092
|
+
authoredCopy("caption", "legal")
|
|
17093
|
+
], repeat("group.modules", "module"))], repeat("region.groups", "group"))])], repeat("content.footerRuntime.regions", "region"));
|
|
17094
|
+
/**
|
|
17095
|
+
* The shape the footer draws up into the last page section. It's the page's
|
|
17096
|
+
* boundary element, placed at the top of the footer, so it uses the same CSS.
|
|
17097
|
+
*/
|
|
17098
|
+
const footerEdge = el("div", {
|
|
17099
|
+
"aria-hidden": "true",
|
|
17100
|
+
"data-block-boundary": "",
|
|
17101
|
+
"data-footer-edge": "",
|
|
17102
|
+
"data-boundary-treatment": { $bind: { from: "$root.theme.footer.edge" } },
|
|
17103
|
+
"data-boundary-placement": "previous"
|
|
17104
|
+
}, null, when("$root.theme.footer.edge"));
|
|
17696
17105
|
const siteFooterManifest = createBlockManifest({
|
|
17697
17106
|
variantMeaning: { kind: "arrangement" },
|
|
17698
17107
|
id: "block.site-footer",
|
|
@@ -17702,23 +17111,18 @@ const siteFooterManifest = createBlockManifest({
|
|
|
17702
17111
|
skipSectionStyles: true,
|
|
17703
17112
|
layout: section({
|
|
17704
17113
|
background: "background",
|
|
17705
|
-
className:
|
|
17706
|
-
from: "$root.theme.footer",
|
|
17707
|
-
transforms: [{ id: "layout.footerRootClass" }],
|
|
17708
|
-
fallback: "rb-w-full rb-border-t transition-theme"
|
|
17709
|
-
} },
|
|
17114
|
+
className: "rb-w-full rb-border-t transition-theme",
|
|
17710
17115
|
style: { $bind: {
|
|
17711
17116
|
from: "$root.theme.footer",
|
|
17712
17117
|
transforms: [{ id: "layout.footerRootStyle" }],
|
|
17713
17118
|
fallback: mergeStyles(backgroundColorStyle("surface"), surfaceForegroundStyle({ text: "rgb(var(--tb-text))" }), borderColorStyle("border"))
|
|
17714
17119
|
} },
|
|
17715
|
-
"data-
|
|
17120
|
+
"data-look": { $bind: { from: "content.footerRuntime.lookId" } },
|
|
17716
17121
|
"data-footer-membership": { $bind: { from: "content.footerRuntime.membershipKey" } }
|
|
17717
|
-
}, [
|
|
17718
|
-
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
]),
|
|
17122
|
+
}, [{
|
|
17123
|
+
...footerEdge,
|
|
17124
|
+
key: "footer-edge"
|
|
17125
|
+
}, footerRegion]),
|
|
17722
17126
|
description: "The footer at the bottom of every page, with your contact details and links.",
|
|
17723
17127
|
styleTokens: { spacing: "md" },
|
|
17724
17128
|
paletteHidden: true
|
|
@@ -19314,7 +18718,10 @@ const mediaTextBlockDefinition = { manifest: createBlockManifest({
|
|
|
19314
18718
|
}],
|
|
19315
18719
|
fallback: "rb-w-full rb-h-auto rb-object-cover"
|
|
19316
18720
|
} },
|
|
19317
|
-
style: {
|
|
18721
|
+
style: {
|
|
18722
|
+
borderRadius: { $bind: { from: "content._lookMediaFrame.borderRadius" } },
|
|
18723
|
+
aspectRatio: { $bind: { from: "content.aspectRatio" } }
|
|
18724
|
+
}
|
|
19318
18725
|
};
|
|
19319
18726
|
const defaultSingleImage = media(defaultImageCommonProps, bind("content.images[0].image"), when("content.images[0].image"));
|
|
19320
18727
|
const defaultCarouselImages = carousel({
|
|
@@ -19483,7 +18890,11 @@ const bookingWizard = bookingForm(withApiBindings({
|
|
|
19483
18890
|
services: { $bind: { from: "data.services" } },
|
|
19484
18891
|
mailingList: { $bind: { from: "$root.mailingList" } },
|
|
19485
18892
|
siteTerms: { $bind: { from: "$root.siteTerms" } },
|
|
19486
|
-
siteName: { $bind: { from: "$root.siteName" } }
|
|
18893
|
+
siteName: { $bind: { from: "$root.siteName" } },
|
|
18894
|
+
businessPerson: { $bind: {
|
|
18895
|
+
from: "$root.businessPerson",
|
|
18896
|
+
fallback: null
|
|
18897
|
+
} }
|
|
19487
18898
|
}), [], when("data.bookingEnabled", {
|
|
19488
18899
|
equals: false,
|
|
19489
18900
|
not: true
|
|
@@ -19783,8 +19194,8 @@ const weeklySlotAvailabilityManifest = createBlockManifest({
|
|
|
19783
19194
|
{
|
|
19784
19195
|
id: "resourceId",
|
|
19785
19196
|
type: "reference",
|
|
19786
|
-
label: "
|
|
19787
|
-
description: "Only show times for one
|
|
19197
|
+
label: "Team member or room",
|
|
19198
|
+
description: "Only show times for one team member or room, if you'd like.",
|
|
19788
19199
|
required: false,
|
|
19789
19200
|
referenceKind: "appointmentResource",
|
|
19790
19201
|
allowManualEntry: false,
|
|
@@ -20667,10 +20078,28 @@ const groupOverrideFields = [
|
|
|
20667
20078
|
];
|
|
20668
20079
|
const offeringsPreviewFields = [
|
|
20669
20080
|
...sectionHeaderFields("Offerings"),
|
|
20081
|
+
{
|
|
20082
|
+
id: "grouping",
|
|
20083
|
+
type: "select",
|
|
20084
|
+
label: "Grouping",
|
|
20085
|
+
required: false,
|
|
20086
|
+
multiple: false,
|
|
20087
|
+
options: [{
|
|
20088
|
+
value: "by-kind",
|
|
20089
|
+
label: "Grouped by kind"
|
|
20090
|
+
}, {
|
|
20091
|
+
value: "one-list",
|
|
20092
|
+
label: "One list"
|
|
20093
|
+
}],
|
|
20094
|
+
ui: {
|
|
20095
|
+
intent: "display",
|
|
20096
|
+
hidden: true
|
|
20097
|
+
}
|
|
20098
|
+
},
|
|
20670
20099
|
{
|
|
20671
20100
|
id: "itemLimit",
|
|
20672
20101
|
type: "select",
|
|
20673
|
-
label: "Items per
|
|
20102
|
+
label: "Items per kind",
|
|
20674
20103
|
required: false,
|
|
20675
20104
|
multiple: false,
|
|
20676
20105
|
defaultValue: "3",
|
|
@@ -20842,6 +20271,7 @@ function offeringsPreviewHeaderNodes() {
|
|
|
20842
20271
|
const offeringsPreviewLayout = [styledSection({
|
|
20843
20272
|
children: sectionContainer([el("offerings-preview", withApiBindings({
|
|
20844
20273
|
...cardListPresentationBindings,
|
|
20274
|
+
offeringsGrouping: { $bind: { from: "content._effectiveKnobs.grouping.value" } },
|
|
20845
20275
|
carouselRegion: { $bind: { from: "content.heading" } },
|
|
20846
20276
|
renderInput: { $bind: { from: "content._offeringsPreviewInput" } },
|
|
20847
20277
|
showHiddenPlaceholder: { $bind: { from: "content._offeringsPreviewShowHiddenPlaceholder" } },
|
|
@@ -20945,6 +20375,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
20945
20375
|
manifest: offeringsPreviewManifest,
|
|
20946
20376
|
contentNormalizer: {
|
|
20947
20377
|
fieldIds: [
|
|
20378
|
+
"grouping",
|
|
20948
20379
|
"displayMode",
|
|
20949
20380
|
"oneOffering",
|
|
20950
20381
|
"heading",
|
|
@@ -21043,29 +20474,29 @@ function eventPresetLoader(eventPresets, extraParams = {}) {
|
|
|
21043
20474
|
mode: "server"
|
|
21044
20475
|
};
|
|
21045
20476
|
}
|
|
20477
|
+
const offeringsContentSchema = z.object({
|
|
20478
|
+
grouping: z.enum(["by-kind", "one-list"]).nullish().catch(void 0),
|
|
20479
|
+
heading: z.string().nullish().catch(void 0),
|
|
20480
|
+
description: z.unknown().optional(),
|
|
20481
|
+
itemLimit: z.custom(isOfferingsPreviewItemLimit).optional().catch(void 0),
|
|
20482
|
+
groupOrder: z.array(z.unknown()).transform((values) => values.filter(isOfferingsPreviewSourceKey)).nullish().catch(void 0),
|
|
20483
|
+
groupOverrides: z.array(z.unknown()).transform((values) => values.flatMap(normalizeOfferingsPreviewGroupOverride)).nullish().catch(void 0),
|
|
20484
|
+
_cardStyles: z.unknown().transform(normalizeCardStylesContent),
|
|
20485
|
+
buttonVariant: z.custom(isButtonVariant).optional().catch(void 0),
|
|
20486
|
+
buttonText: z.string().nullish().catch(void 0),
|
|
20487
|
+
emptyMessage: z.string().nullish().catch(void 0),
|
|
20488
|
+
_sectionStyles: z.unknown().transform(normalizeSectionStylesContent)
|
|
20489
|
+
});
|
|
21046
20490
|
function normalizeOfferingsPreviewBlockContent(value) {
|
|
21047
20491
|
const record = normalizeOfferingsPreviewContentForWrite(value);
|
|
21048
20492
|
if (!record) return { displayMode: DEFAULT_OFFERINGS_PREVIEW_DISPLAY_MODE };
|
|
21049
20493
|
const normalized = {
|
|
21050
20494
|
displayMode: normalizeOfferingsPreviewDisplayMode(record.displayMode),
|
|
21051
20495
|
...oneOfferingContent(record.oneOffering),
|
|
21052
|
-
...normalizeCardListContent(record)
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
if (isOfferingsPreviewItemLimit(record.itemLimit)) normalized.itemLimit = record.itemLimit;
|
|
21057
|
-
if (Array.isArray(record.groupOrder)) normalized.groupOrder = record.groupOrder.filter(isOfferingsPreviewSourceKey);
|
|
21058
|
-
else if (record.groupOrder === null) normalized.groupOrder = null;
|
|
21059
|
-
if (Array.isArray(record.groupOverrides)) normalized.groupOverrides = record.groupOverrides.flatMap(normalizeOfferingsPreviewGroupOverride);
|
|
21060
|
-
else if (record.groupOverrides === null) normalized.groupOverrides = null;
|
|
21061
|
-
const cardStyles = normalizeCardStylesContent(record._cardStyles);
|
|
21062
|
-
if (cardStyles !== void 0) normalized._cardStyles = cardStyles;
|
|
21063
|
-
if (isButtonVariant(record.buttonVariant)) normalized.buttonVariant = record.buttonVariant;
|
|
21064
|
-
if (typeof record.buttonText === "string" || record.buttonText === null) normalized.buttonText = record.buttonText;
|
|
21065
|
-
if (typeof record.emptyMessage === "string" || record.emptyMessage === null) normalized.emptyMessage = record.emptyMessage;
|
|
21066
|
-
const sectionStyles = normalizeSectionStylesContent(record._sectionStyles);
|
|
21067
|
-
if (sectionStyles !== void 0) normalized._sectionStyles = sectionStyles;
|
|
21068
|
-
return normalized;
|
|
20496
|
+
...normalizeCardListContent(record),
|
|
20497
|
+
...offeringsContentSchema.parse(record)
|
|
20498
|
+
};
|
|
20499
|
+
return Object.fromEntries(Object.entries(normalized).filter(([, field]) => field !== void 0));
|
|
21069
20500
|
}
|
|
21070
20501
|
function oneOfferingContent(value) {
|
|
21071
20502
|
return typeof value === "boolean" || value === null ? { oneOffering: value } : {};
|
|
@@ -24678,299 +24109,6 @@ function arrangementSlotParentsForManifest(manifest, target, arrangement, eventR
|
|
|
24678
24109
|
});
|
|
24679
24110
|
}
|
|
24680
24111
|
//#endregion
|
|
24681
|
-
//#region ../blocks/src/system/customize/arrangementKnobs.ts
|
|
24682
|
-
/**
|
|
24683
|
-
* Content stage for knobs, shared by the renderer and the editor so what the
|
|
24684
|
-
* options show and what renders can't disagree. Knob buffets are the block's
|
|
24685
|
-
* customise facets; the Look exposes, forces or narrows them and the style's
|
|
24686
|
-
* offer can only remove or narrow further.
|
|
24687
|
-
*/
|
|
24688
|
-
function resolveArrangementKnobs(input) {
|
|
24689
|
-
const length = input.blockKind === "block.hero" ? resolveHeroTitleLength({ ...input.content }, "look") : null;
|
|
24690
|
-
const exposure = arrangementKnobExposure(input.blockKind, input.look, length, storedSplitPhotoSide(input.blockKind, input.content));
|
|
24691
|
-
return {
|
|
24692
|
-
length,
|
|
24693
|
-
exposure,
|
|
24694
|
-
knobs: resolveEffectiveKnobs({
|
|
24695
|
-
exposure,
|
|
24696
|
-
content: normalizedHeadlinePreference(input.content)
|
|
24697
|
-
})
|
|
24698
|
-
};
|
|
24699
|
-
}
|
|
24700
|
-
function arrangementKnobExposure(blockKind, look, length, splitPhotoSide) {
|
|
24701
|
-
return systemCustomizeFacetDefinitionsForBlock(blockKind).flatMap((facet) => {
|
|
24702
|
-
if (facet.knob === void 0 || facet.target.kind !== "content-field") return [];
|
|
24703
|
-
const id = facet.target.field;
|
|
24704
|
-
const defaults = look.look.structure.knobDefaults ?? {};
|
|
24705
|
-
const storedDefault = id === "imagePosition" ? splitPhotoSide : null;
|
|
24706
|
-
return [{
|
|
24707
|
-
definition: {
|
|
24708
|
-
id,
|
|
24709
|
-
defaultValue: defaults[id] ?? storedDefault ?? facet.defaultValue,
|
|
24710
|
-
values: facet.values.map((value) => value.value),
|
|
24711
|
-
...knobKindMetadata(facet.knob)
|
|
24712
|
-
},
|
|
24713
|
-
exposed: exposedKnobIds(look).includes(id),
|
|
24714
|
-
forced: look.look.structure.forcedKnobs?.[id],
|
|
24715
|
-
lookValues: look.look.structure.knobValues?.[id],
|
|
24716
|
-
styleValues: look.knobValues[id],
|
|
24717
|
-
lengthValues: id === "titleSize" ? headlineAllowedValues(length) : void 0
|
|
24718
|
-
}];
|
|
24719
|
-
});
|
|
24720
|
-
}
|
|
24721
|
-
/**
|
|
24722
|
-
* A hero stored as "Split, photo on the left" or "Split, photo on the right"
|
|
24723
|
-
* already says which side its photo is on. Under a Look that side is the Photo
|
|
24724
|
-
* side default, so the photo stays where it was until the owner picks a side.
|
|
24725
|
-
*/
|
|
24726
|
-
function storedSplitPhotoSide(blockKind, content) {
|
|
24727
|
-
if (blockKind !== "block.hero") return null;
|
|
24728
|
-
switch (content.variant) {
|
|
24729
|
-
case "split": return "left";
|
|
24730
|
-
case "splitReverse": return "right";
|
|
24731
|
-
default: return null;
|
|
24732
|
-
}
|
|
24733
|
-
}
|
|
24734
|
-
function knobKindMetadata(knob) {
|
|
24735
|
-
return knob.kind === "fixed" ? { ordered: knob.ordered } : {
|
|
24736
|
-
ordered: false,
|
|
24737
|
-
textMaxLength: knob.maxLength
|
|
24738
|
-
};
|
|
24739
|
-
}
|
|
24740
|
-
function headlineAllowedValues(length) {
|
|
24741
|
-
switch (length) {
|
|
24742
|
-
case "long": return ["quiet"];
|
|
24743
|
-
case "medium": return ["quiet", "auto"];
|
|
24744
|
-
case "short": return [
|
|
24745
|
-
"quiet",
|
|
24746
|
-
"auto",
|
|
24747
|
-
"display"
|
|
24748
|
-
];
|
|
24749
|
-
case null: return;
|
|
24750
|
-
}
|
|
24751
|
-
}
|
|
24752
|
-
/** `titleSize` keeps its five stored values; under a Look they read as three steps. */
|
|
24753
|
-
function normalizedHeadlinePreference(content) {
|
|
24754
|
-
switch (content.titleSize) {
|
|
24755
|
-
case "editorial": return {
|
|
24756
|
-
...content,
|
|
24757
|
-
titleSize: "auto"
|
|
24758
|
-
};
|
|
24759
|
-
case "poster": return {
|
|
24760
|
-
...content,
|
|
24761
|
-
titleSize: "display"
|
|
24762
|
-
};
|
|
24763
|
-
default: return content;
|
|
24764
|
-
}
|
|
24765
|
-
}
|
|
24766
|
-
function exposedKnobIds(look) {
|
|
24767
|
-
return [...look.look.structure.knobs, ...look.addKnobs ?? []].filter((id) => !look.removeKnobs.some((removed) => removed === id));
|
|
24768
|
-
}
|
|
24769
|
-
//#endregion
|
|
24770
|
-
//#region ../blocks/src/system/customize/facets.ts
|
|
24771
|
-
function defineCustomizeFacet(definition) {
|
|
24772
|
-
return definition;
|
|
24773
|
-
}
|
|
24774
|
-
const eventCalendarListLayoutFacet = defineCustomizeFacet({
|
|
24775
|
-
blockKind: "block.event-calendar",
|
|
24776
|
-
id: "eventCalendar.listLayout",
|
|
24777
|
-
label: "List style",
|
|
24778
|
-
legacyOnly: true,
|
|
24779
|
-
values: eventCalendarListLayoutOptions.map((option) => ({
|
|
24780
|
-
value: option.id,
|
|
24781
|
-
label: option.label
|
|
24782
|
-
})),
|
|
24783
|
-
defaultValue: "stack",
|
|
24784
|
-
target: { kind: "event-calendar-list-layout-content" },
|
|
24785
|
-
appliesToLayoutVariants: eventCalendarListLayoutCompatibleDisplayModeValues
|
|
24786
|
-
});
|
|
24787
|
-
const fixedKnob = (blockKind, id, label, values, defaultValue, ordered = false, boolean = false) => ({
|
|
24788
|
-
blockKind,
|
|
24789
|
-
id,
|
|
24790
|
-
label,
|
|
24791
|
-
values,
|
|
24792
|
-
defaultValue,
|
|
24793
|
-
knob: {
|
|
24794
|
-
kind: "fixed",
|
|
24795
|
-
ordered
|
|
24796
|
-
},
|
|
24797
|
-
target: {
|
|
24798
|
-
kind: "content-field",
|
|
24799
|
-
field: id,
|
|
24800
|
-
...boolean ? { boolean: true } : {}
|
|
24801
|
-
}
|
|
24802
|
-
});
|
|
24803
|
-
const textKnob = (id, label, maxLength) => ({
|
|
24804
|
-
blockKind: "block.hero",
|
|
24805
|
-
id,
|
|
24806
|
-
label,
|
|
24807
|
-
values: [],
|
|
24808
|
-
defaultValue: "",
|
|
24809
|
-
knob: {
|
|
24810
|
-
kind: "text",
|
|
24811
|
-
maxLength
|
|
24812
|
-
},
|
|
24813
|
-
target: {
|
|
24814
|
-
kind: "content-field",
|
|
24815
|
-
field: id
|
|
24816
|
-
}
|
|
24817
|
-
});
|
|
24818
|
-
const onOff = [{
|
|
24819
|
-
value: "true",
|
|
24820
|
-
label: "On"
|
|
24821
|
-
}, {
|
|
24822
|
-
value: "false",
|
|
24823
|
-
label: "Off"
|
|
24824
|
-
}];
|
|
24825
|
-
const columnCounts = [
|
|
24826
|
-
{
|
|
24827
|
-
value: "2",
|
|
24828
|
-
label: "2"
|
|
24829
|
-
},
|
|
24830
|
-
{
|
|
24831
|
-
value: "3",
|
|
24832
|
-
label: "3"
|
|
24833
|
-
},
|
|
24834
|
-
{
|
|
24835
|
-
value: "4",
|
|
24836
|
-
label: "4"
|
|
24837
|
-
}
|
|
24838
|
-
];
|
|
24839
|
-
const systemCustomizeFacetDefinitions = [
|
|
24840
|
-
eventCalendarListLayoutFacet,
|
|
24841
|
-
fixedKnob("block.offerings-preview", "dates", "Dates", [{
|
|
24842
|
-
value: "summary",
|
|
24843
|
-
label: "Summary"
|
|
24844
|
-
}, {
|
|
24845
|
-
value: "next-dates",
|
|
24846
|
-
label: "Next dates"
|
|
24847
|
-
}], "summary"),
|
|
24848
|
-
{
|
|
24849
|
-
...fixedKnob("block.feature-cards", "actionStyle", "Item actions", [{
|
|
24850
|
-
value: "button",
|
|
24851
|
-
label: "Button"
|
|
24852
|
-
}, {
|
|
24853
|
-
value: "link",
|
|
24854
|
-
label: "Link"
|
|
24855
|
-
}], "button"),
|
|
24856
|
-
blockKinds: cardListKnobBlocks
|
|
24857
|
-
},
|
|
24858
|
-
fixedKnob("block.testimonials", "quoteCount", "How many quotes", [
|
|
24859
|
-
{
|
|
24860
|
-
value: "1",
|
|
24861
|
-
label: "1"
|
|
24862
|
-
},
|
|
24863
|
-
{
|
|
24864
|
-
value: "2",
|
|
24865
|
-
label: "2"
|
|
24866
|
-
},
|
|
24867
|
-
{
|
|
24868
|
-
value: "3",
|
|
24869
|
-
label: "3"
|
|
24870
|
-
},
|
|
24871
|
-
{
|
|
24872
|
-
value: "all",
|
|
24873
|
-
label: "All"
|
|
24874
|
-
}
|
|
24875
|
-
], "3", true),
|
|
24876
|
-
{
|
|
24877
|
-
...fixedKnob("block.testimonials", "autoAdvance", "Moves on by itself", onOff, "false", false, true),
|
|
24878
|
-
description: "Moves to the next quote every few seconds, and stops while someone's reading."
|
|
24879
|
-
},
|
|
24880
|
-
fixedKnob("block.testimonials", "tilt", "Tilt the small cards", onOff, "true", false, true),
|
|
24881
|
-
{
|
|
24882
|
-
...fixedKnob("block.testimonials", "archFrame", "Arch frame", onOff, "true", false, true),
|
|
24883
|
-
blockKinds: [
|
|
24884
|
-
"block.testimonials",
|
|
24885
|
-
"block.newsletter-signup",
|
|
24886
|
-
"block.form"
|
|
24887
|
-
]
|
|
24888
|
-
},
|
|
24889
|
-
fixedKnob("block.hero", "photoTint", "Photo tint", [{
|
|
24890
|
-
value: "dark",
|
|
24891
|
-
label: "Dark"
|
|
24892
|
-
}, {
|
|
24893
|
-
value: "brand",
|
|
24894
|
-
label: "Brand colour"
|
|
24895
|
-
}], "dark"),
|
|
24896
|
-
fixedKnob("block.hero", "candleGlow", "Candle glow", onOff, "true", false, true),
|
|
24897
|
-
fixedKnob("block.hero", "columnGuides", "Column guides", onOff, "true", false, true),
|
|
24898
|
-
fixedKnob("block.hero", "titleSize", "Headline size", heroTitleSizeOptions, "auto", true),
|
|
24899
|
-
fixedKnob("block.hero", "imagePosition", "Photo side", [{
|
|
24900
|
-
value: "left",
|
|
24901
|
-
label: "Left"
|
|
24902
|
-
}, {
|
|
24903
|
-
value: "right",
|
|
24904
|
-
label: "Right"
|
|
24905
|
-
}], "right"),
|
|
24906
|
-
fixedKnob("block.intro", "imageShape", "Media shape", standardImageShapeOptions, "default"),
|
|
24907
|
-
fixedKnob("block.intro", "imagePosition", "Photo side", [{
|
|
24908
|
-
value: "left",
|
|
24909
|
-
label: "Left"
|
|
24910
|
-
}, {
|
|
24911
|
-
value: "right",
|
|
24912
|
-
label: "Right"
|
|
24913
|
-
}], "left"),
|
|
24914
|
-
fixedKnob("block.media-text", "imagePosition", "Photo side", [{
|
|
24915
|
-
value: "left",
|
|
24916
|
-
label: "Left"
|
|
24917
|
-
}, {
|
|
24918
|
-
value: "right",
|
|
24919
|
-
label: "Right"
|
|
24920
|
-
}], "left"),
|
|
24921
|
-
fixedKnob("block.media-text", "imageShape", "Media shape", standardImageShapeOptions, "default"),
|
|
24922
|
-
fixedKnob("block.media-text", "aspectRatio", "Media aspect ratio", standardAspectRatioOptions, "auto"),
|
|
24923
|
-
textKnob("stickerLine", "Sticker line", 32),
|
|
24924
|
-
textKnob("smallCaption", "Small caption", 24),
|
|
24925
|
-
{
|
|
24926
|
-
...fixedKnob("block.feature-cards", "showPhotos", "Show photos", onOff, "true", false, true),
|
|
24927
|
-
blockKinds: cardListFamilyBlocks
|
|
24928
|
-
},
|
|
24929
|
-
fixedKnob("block.feature-cards", "columns", "Columns", columnCounts, "3", true),
|
|
24930
|
-
fixedKnob("block.image-gallery", "blackAndWhite", "Black and white", onOff, "false", false, true),
|
|
24931
|
-
fixedKnob("block.event-calendar", "listColumns", "Columns", columnCounts, "3", true),
|
|
24932
|
-
fixedKnob("block.event-calendar", "showPhotos", "Photos", [{
|
|
24933
|
-
value: "true",
|
|
24934
|
-
label: "Show"
|
|
24935
|
-
}, {
|
|
24936
|
-
value: "false",
|
|
24937
|
-
label: "Hide"
|
|
24938
|
-
}], "true", false, true),
|
|
24939
|
-
{
|
|
24940
|
-
...fixedKnob("block.feature-cards", "cardMarker", "Item markers", [
|
|
24941
|
-
{
|
|
24942
|
-
value: "icons",
|
|
24943
|
-
label: "Icons"
|
|
24944
|
-
},
|
|
24945
|
-
{
|
|
24946
|
-
value: "numbers",
|
|
24947
|
-
label: "Numbers"
|
|
24948
|
-
},
|
|
24949
|
-
{
|
|
24950
|
-
value: "none",
|
|
24951
|
-
label: "None"
|
|
24952
|
-
}
|
|
24953
|
-
], "icons"),
|
|
24954
|
-
blockKinds: cardListFamilyBlocks
|
|
24955
|
-
},
|
|
24956
|
-
fixedKnob("block.body-text", "alignment", "Text alignment", [{
|
|
24957
|
-
value: "left",
|
|
24958
|
-
label: "Left"
|
|
24959
|
-
}, {
|
|
24960
|
-
value: "center",
|
|
24961
|
-
label: "Centre"
|
|
24962
|
-
}], "left"),
|
|
24963
|
-
{
|
|
24964
|
-
...fixedKnob("block.event-calendar", "showCapacity", "Places left", onOff, "true", false, true),
|
|
24965
|
-
description: "Show how many places are left on each event"
|
|
24966
|
-
}
|
|
24967
|
-
];
|
|
24968
|
-
systemCustomizeFacetDefinitions.map((definition) => definition.id);
|
|
24969
|
-
Array.from(new Set(systemCustomizeFacetDefinitions.flatMap((definition) => definition.values.map((option) => option.value))));
|
|
24970
|
-
function systemCustomizeFacetDefinitionsForBlock(blockKind) {
|
|
24971
|
-
return systemCustomizeFacetDefinitions.filter((definition) => definition.blockKind === blockKind || "blockKinds" in definition && definition.blockKinds?.some((kind) => kind === blockKind));
|
|
24972
|
-
}
|
|
24973
|
-
//#endregion
|
|
24974
24112
|
//#region ../blocks/src/system/customize/fieldOwnership.ts
|
|
24975
24113
|
/**
|
|
24976
24114
|
* Values with their own owner, whatever their fields are tagged: the Background
|
|
@@ -25564,7 +24702,7 @@ function serviceDetailsFacts(service) {
|
|
|
25564
24702
|
value: describePublicRefundPolicy(service.cancellationPolicy.refunds)
|
|
25565
24703
|
},
|
|
25566
24704
|
...practitioners.length ? [{
|
|
25567
|
-
label:
|
|
24705
|
+
label: "With",
|
|
25568
24706
|
value: practitioners.map((person) => person.roleLabel ? `${person.name}, ${person.roleLabel}` : person.name).join("; ")
|
|
25569
24707
|
}] : []
|
|
25570
24708
|
];
|
|
@@ -27952,7 +27090,7 @@ function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
|
27952
27090
|
...mode !== null ? { variant: mode } : {},
|
|
27953
27091
|
...effectiveContent,
|
|
27954
27092
|
...photoContent,
|
|
27955
|
-
...
|
|
27093
|
+
...arrangementMediaFrameContent(blockKind, effective, values, authored),
|
|
27956
27094
|
...arrangementPanelContent(activeContent, effective, mode),
|
|
27957
27095
|
...arrangementQuoteContent(blockKind, effective, values),
|
|
27958
27096
|
_arrangementLooks: runtime,
|
|
@@ -28004,11 +27142,15 @@ function arrangementPhotoTreatmentContent(content, look, palette, tint) {
|
|
|
28004
27142
|
function arrangementContentSlots(blockKind) {
|
|
28005
27143
|
return Object.fromEntries(arrangementSlotNames.filter((slot) => (!slot.startsWith("price-") || blockKind === "block.shop") && slot !== "schedule-section" && slot !== "shop-section" && (slot !== "background" || blockKind === "block.hero")).map((slot) => [slot, slot]));
|
|
28006
27144
|
}
|
|
28007
|
-
/**
|
|
28008
|
-
function
|
|
28009
|
-
|
|
28010
|
-
|
|
28011
|
-
|
|
27145
|
+
/** One frame declaration owns shape crops and keeps authored ratios for variable layouts. */
|
|
27146
|
+
function arrangementMediaFrameContent(blockKind, look, knobs, authored) {
|
|
27147
|
+
if (blockKind !== "block.intro" && blockKind !== "block.media-text") return {};
|
|
27148
|
+
const frame = resolveLookMediaFrame(look.look.structure.mediaFrame, look.skin, knobs);
|
|
27149
|
+
if (!frame) return {};
|
|
27150
|
+
return frame.kind === "fixed" ? {
|
|
27151
|
+
aspectRatio: frame.aspectRatio,
|
|
27152
|
+
_lookMediaFrame: frame
|
|
27153
|
+
} : { aspectRatio: typeof authored.aspectRatio === "string" ? authored.aspectRatio : frame.aspectRatio };
|
|
28012
27154
|
}
|
|
28013
27155
|
function arrangementQuoteContent(blockKind, effective, values) {
|
|
28014
27156
|
if (blockKind !== "block.testimonials") return {};
|
|
@@ -29103,7 +28245,14 @@ function promote(tree, heading) {
|
|
|
29103
28245
|
return children === tree.props.children ? tree : React.cloneElement(tree, {}, children);
|
|
29104
28246
|
}
|
|
29105
28247
|
/** One page-wide choice; callers receive the final trees and do not recompute heading rules. */
|
|
29106
|
-
function applyPageHeadingSemantics(trees, eventDetailsComponent
|
|
28248
|
+
function applyPageHeadingSemantics(trees, eventDetailsComponent, facts = {
|
|
28249
|
+
scope: "page",
|
|
28250
|
+
overrideOwnsPageHeading: false
|
|
28251
|
+
}) {
|
|
28252
|
+
if (facts.scope === "region" || facts.overrideOwnsPageHeading) return {
|
|
28253
|
+
trees,
|
|
28254
|
+
needsPageTitle: false
|
|
28255
|
+
};
|
|
29107
28256
|
const nodes = [...trees.values()].flatMap(elements);
|
|
29108
28257
|
if (nodes.some((node) => ownsH1(node, eventDetailsComponent))) return {
|
|
29109
28258
|
trees,
|
|
@@ -29365,11 +28514,12 @@ function pageDateRuntimeContext(dataContext) {
|
|
|
29365
28514
|
}
|
|
29366
28515
|
/** Booking context keeps its defaults together across SSR and authoring. */
|
|
29367
28516
|
function pageBookingRuntime(context) {
|
|
29368
|
-
const { bookingTimeZone, bookingOfferingPresets = [], appointmentServicePathPrefix = null } = context ?? {};
|
|
28517
|
+
const { bookingTimeZone, bookingOfferingPresets = [], appointmentServicePathPrefix = null, businessPerson = null } = context ?? {};
|
|
29369
28518
|
return {
|
|
29370
28519
|
bookingTimeZone,
|
|
29371
28520
|
bookingOfferingPresets,
|
|
29372
|
-
appointmentServicePathPrefix
|
|
28521
|
+
appointmentServicePathPrefix,
|
|
28522
|
+
businessPerson
|
|
29373
28523
|
};
|
|
29374
28524
|
}
|
|
29375
28525
|
//#endregion
|
|
@@ -29539,7 +28689,7 @@ function offeringArrangementContent(content, data, context, audience) {
|
|
|
29539
28689
|
const now = new Date(readRuntimeNow(context?.now));
|
|
29540
28690
|
const listing = buildLoadedOfferingsPreviewListing({
|
|
29541
28691
|
now,
|
|
29542
|
-
listingMode: offeringsListingFor(
|
|
28692
|
+
listingMode: offeringsListingFor(readOfferingsGrouping(effectiveOfferingsGrouping(content)), cardListArrangementForContent(content)),
|
|
29543
28693
|
routeCandidates: publicRouteCandidatesSchema.safeParse(data.routeCandidates).data,
|
|
29544
28694
|
...normalized,
|
|
29545
28695
|
presets: context?.bookingOfferingPresets,
|
|
@@ -29561,6 +28711,12 @@ function offeringArrangementContent(content, data, context, audience) {
|
|
|
29561
28711
|
publicVisibility: listing.kind === "no-groups" && listing.reason === "empty-hidden" ? "omitted" : "shown"
|
|
29562
28712
|
};
|
|
29563
28713
|
}
|
|
28714
|
+
function effectiveOfferingsGrouping(content) {
|
|
28715
|
+
const knobs = content._effectiveKnobs;
|
|
28716
|
+
if (typeof knobs !== "object" || knobs === null || !("grouping" in knobs)) return void 0;
|
|
28717
|
+
const grouping = knobs.grouping;
|
|
28718
|
+
return typeof grouping === "object" && grouping !== null && "value" in grouping ? grouping.value : void 0;
|
|
28719
|
+
}
|
|
29564
28720
|
/** Older blocks opt into preparation only when public visibility needs their listing. */
|
|
29565
28721
|
function needsOfferingListing(content, normalized) {
|
|
29566
28722
|
return content._effectiveLook !== void 0 || normalized.groupOverrides?.some((group) => group.hideWhenEmpty === true) === true;
|
|
@@ -30134,24 +29290,29 @@ function PageRendererCore(props) {
|
|
|
30134
29290
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
30135
29291
|
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
30136
29292
|
const readSystemTrees = React$1.useMemo(createPageSystemTreeReader, []);
|
|
29293
|
+
const headingScope = props.headingScope ?? "page";
|
|
30137
29294
|
const headingPresentation = React$1.useMemo(() => applyPageHeadingSemantics(readSystemTrees({
|
|
30138
29295
|
preparation,
|
|
30139
29296
|
dataContext,
|
|
30140
29297
|
registry: resolvedRegistry,
|
|
30141
29298
|
previewAuthoring: props.previewAuthoring,
|
|
30142
29299
|
imageResolveContext
|
|
30143
|
-
}), resolvedRegistry["event-details"]
|
|
29300
|
+
}), resolvedRegistry["event-details"], {
|
|
29301
|
+
scope: headingScope,
|
|
29302
|
+
overrideOwnsPageHeading: overrideOwnsPageHeading(preparation)
|
|
29303
|
+
}), [
|
|
30144
29304
|
preparation,
|
|
30145
29305
|
dataContext,
|
|
30146
29306
|
resolvedRegistry,
|
|
30147
29307
|
props.previewAuthoring,
|
|
30148
29308
|
imageResolveContext,
|
|
30149
|
-
readSystemTrees
|
|
29309
|
+
readSystemTrees,
|
|
29310
|
+
headingScope
|
|
30150
29311
|
]);
|
|
30151
|
-
return wrapRenderedPage(props, plan, !page || preparation.entries.length === 0 ? renderEmptyPage(page, audience) : renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation));
|
|
29312
|
+
return wrapRenderedPage(props, plan, !page || preparation.entries.length === 0 ? renderEmptyPage(page, audience, headingScope) : renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation));
|
|
30152
29313
|
}
|
|
30153
|
-
function renderEmptyPage(page, audience) {
|
|
30154
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [page ? /* @__PURE__ */ jsx(PageTitleFallback, { name: page.name }) : null, presentEmptyPage(audience)] });
|
|
29314
|
+
function renderEmptyPage(page, audience, headingScope) {
|
|
29315
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [page && headingScope === "page" ? /* @__PURE__ */ jsx(PageTitleFallback, { name: page.name }) : null, presentEmptyPage(audience)] });
|
|
30155
29316
|
}
|
|
30156
29317
|
function wrapRenderedPage(props, plan, rendered) {
|
|
30157
29318
|
return props.wrapPage ? props.wrapPage(plan, rendered) : rendered;
|
|
@@ -30159,7 +29320,7 @@ function wrapRenderedPage(props, plan, rendered) {
|
|
|
30159
29320
|
function renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation) {
|
|
30160
29321
|
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
30161
29322
|
const joinSlots = joinSlotsByPair(preparation.joins);
|
|
30162
|
-
const renderRegion = (entries, joins) => entries.map((entry, index) => renderGuardedPlanEntry({
|
|
29323
|
+
const renderRegion = (entries, joins, flow) => entries.map((entry, index) => renderGuardedPlanEntry({
|
|
30163
29324
|
entry,
|
|
30164
29325
|
index,
|
|
30165
29326
|
entries,
|
|
@@ -30169,12 +29330,13 @@ function renderPreparedPage(props, preparation, themeResources, imageResolveCont
|
|
|
30169
29330
|
resolvedRegistry,
|
|
30170
29331
|
systemTrees: headingPresentation.trees,
|
|
30171
29332
|
joinSlots: joins,
|
|
29333
|
+
flow,
|
|
30172
29334
|
wrapBlock: props.wrapBlock,
|
|
30173
29335
|
renderJoin: props.renderJoin
|
|
30174
29336
|
}));
|
|
30175
29337
|
const { main, aside } = preparation.regions;
|
|
30176
29338
|
const title = headingPresentation.needsPageTitle ? /* @__PURE__ */ jsx(PageTitleFallback, { name: props.page?.name ?? "" }) : null;
|
|
30177
|
-
if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots)] });
|
|
29339
|
+
if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots, "main")] });
|
|
30178
29340
|
return /* @__PURE__ */ jsxs("div", {
|
|
30179
29341
|
className: "rb-page-layout",
|
|
30180
29342
|
"data-page-layout": "main-aside",
|
|
@@ -30183,12 +29345,12 @@ function renderPreparedPage(props, preparation, themeResources, imageResolveCont
|
|
|
30183
29345
|
/* @__PURE__ */ jsx("div", {
|
|
30184
29346
|
className: "rb-page-layout__main",
|
|
30185
29347
|
"data-page-region": "main",
|
|
30186
|
-
children: renderRegion(main, joinSlots)
|
|
29348
|
+
children: renderRegion(main, joinSlots, "main")
|
|
30187
29349
|
}),
|
|
30188
29350
|
/* @__PURE__ */ jsx("aside", {
|
|
30189
29351
|
className: "rb-page-layout__aside rb-sticky-below-site-chrome",
|
|
30190
29352
|
"data-page-region": "aside",
|
|
30191
|
-
children: renderRegion(aside, /* @__PURE__ */ new Map())
|
|
29353
|
+
children: renderRegion(aside, /* @__PURE__ */ new Map(), "aside")
|
|
30192
29354
|
})
|
|
30193
29355
|
]
|
|
30194
29356
|
});
|
|
@@ -30277,6 +29439,10 @@ function requireEntryBlockOverride(entry, themeResources) {
|
|
|
30277
29439
|
}
|
|
30278
29440
|
requireBlockOverride(themeResources, entry.override, entry.block.kind);
|
|
30279
29441
|
}
|
|
29442
|
+
/** The footer meets the main flow's last block, which marks itself for the footer edge's reserve. */
|
|
29443
|
+
function pageEndingAttribute(flow, position) {
|
|
29444
|
+
return flow === "main" && (position === "last" || position === "only") ? "" : void 0;
|
|
29445
|
+
}
|
|
30280
29446
|
/**
|
|
30281
29447
|
* Renders one planned block: its wrapper, style-group data attributes,
|
|
30282
29448
|
* boundary reserve space and the join markup that follows it.
|
|
@@ -30337,6 +29503,7 @@ function renderPlanEntry(input) {
|
|
|
30337
29503
|
"data-block-composition": blockComposition?.treatment,
|
|
30338
29504
|
"data-block-composition-kind": blockComposition?.kind,
|
|
30339
29505
|
"data-page-block-position": blockPosition,
|
|
29506
|
+
"data-page-ending": pageEndingAttribute(input.flow, blockPosition),
|
|
30340
29507
|
"data-site-style-boundary-before": reserves.topPlacement,
|
|
30341
29508
|
"data-site-style-boundary-after": reserves.bottomPlacement,
|
|
30342
29509
|
"data-site-style-field-seam": reserves.fieldSeam,
|
|
@@ -30431,6 +29598,9 @@ function resolveSystemBlockTree(input) {
|
|
|
30431
29598
|
return /* @__PURE__ */ jsx(FailedSystemBlockTree, { error });
|
|
30432
29599
|
}
|
|
30433
29600
|
}
|
|
29601
|
+
function overrideOwnsPageHeading(preparation) {
|
|
29602
|
+
return [...preparation.regions.main, ...preparation.regions.aside].some(({ entry }) => (entry.kind === "renderable" || entry.kind === "override-only") && entry.override?.ownsPageHeading === true);
|
|
29603
|
+
}
|
|
30434
29604
|
/** Preserve the block memo's reuse rules while resolving page-wide heading facts. */
|
|
30435
29605
|
function createPageSystemTreeReader() {
|
|
30436
29606
|
const memo = {};
|
|
@@ -30750,6 +29920,14 @@ function resolveSiteCustomBlocks(site) {
|
|
|
30750
29920
|
}
|
|
30751
29921
|
//#endregion
|
|
30752
29922
|
//#region src/rendering/helpers/pageRuntimeSupport.ts
|
|
29923
|
+
/** The booking-related site runtime, with its defaults. */
|
|
29924
|
+
function siteBookingRenderSupport(site) {
|
|
29925
|
+
return {
|
|
29926
|
+
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
29927
|
+
bookingTimeZone: resolveBookingBusinessTimeZone(site.bookingTimeZone),
|
|
29928
|
+
businessPerson: site.bookingPerson ?? null
|
|
29929
|
+
};
|
|
29930
|
+
}
|
|
30753
29931
|
function buildSiteRenderSupport(site, mediaAssets, locationMapSupport) {
|
|
30754
29932
|
const customBlocks = resolveSiteCustomBlocks(site);
|
|
30755
29933
|
return {
|
|
@@ -30759,14 +29937,13 @@ function buildSiteRenderSupport(site, mediaAssets, locationMapSupport) {
|
|
|
30759
29937
|
venuesById: locationMapSupport.venuesById
|
|
30760
29938
|
} : site.site,
|
|
30761
29939
|
sdkConfig: site.sdkConfig ?? null,
|
|
30762
|
-
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
30763
29940
|
openingHours: site.businessDetails?.openingHours ?? null,
|
|
30764
29941
|
siteTerms: site.siteTerms,
|
|
30765
29942
|
mailingList: site.mailingList,
|
|
30766
29943
|
interactionContext: site.interactionContext,
|
|
30767
29944
|
businessLocationPermission: site.site.businessLocationPermission,
|
|
30768
29945
|
businessAddressVisibility: site.businessDetails?.addressVisibility ?? "hidden",
|
|
30769
|
-
|
|
29946
|
+
...siteBookingRenderSupport(site),
|
|
30770
29947
|
now: toUtcIsoDateTimeString((/* @__PURE__ */ new Date()).toISOString()),
|
|
30771
29948
|
...customBlocks ? { customBlocks } : {},
|
|
30772
29949
|
supabaseUrl: site.supabaseUrl,
|
|
@@ -30777,8 +29954,9 @@ function buildSiteRenderSupport(site, mediaAssets, locationMapSupport) {
|
|
|
30777
29954
|
};
|
|
30778
29955
|
}
|
|
30779
29956
|
/** Only already-permitted projections reach the block runtime. */
|
|
30780
|
-
function
|
|
29957
|
+
function siteBlockRenderContext(support) {
|
|
30781
29958
|
return {
|
|
29959
|
+
businessPerson: support.businessPerson,
|
|
30782
29960
|
businessLocationPermission: support.site.businessLocationPermission,
|
|
30783
29961
|
businessAddressVisibility: support.businessAddressVisibility ?? "hidden",
|
|
30784
29962
|
businessLocation: support.site.businessLocation ?? null,
|
|
@@ -31374,15 +30552,17 @@ function normalizeSdkCustomBlocks(customBlocks) {
|
|
|
31374
30552
|
}
|
|
31375
30553
|
function toBlocksBlockOverrides(overrides) {
|
|
31376
30554
|
if (!overrides) return void 0;
|
|
31377
|
-
|
|
31378
|
-
|
|
31379
|
-
|
|
31380
|
-
|
|
30555
|
+
return Object.fromEntries(Object.entries(overrides).map(([key, registration]) => {
|
|
30556
|
+
const entry = typeof registration === "object" && "component" in registration ? registration : {
|
|
30557
|
+
component: registration,
|
|
30558
|
+
ownsPageHeading: false
|
|
30559
|
+
};
|
|
30560
|
+
const adapter = (props) => React$1.createElement(entry.component, {
|
|
31381
30561
|
...props,
|
|
31382
30562
|
entrySubrouteContext: props.entrySubrouteContext
|
|
31383
30563
|
});
|
|
31384
|
-
|
|
31385
|
-
|
|
30564
|
+
return [key, Object.assign(adapter, { ownsPageHeading: entry.ownsPageHeading })];
|
|
30565
|
+
}));
|
|
31386
30566
|
}
|
|
31387
30567
|
function toBlocksPageRendererDataContext(dataContext) {
|
|
31388
30568
|
return {
|
|
@@ -31405,7 +30585,8 @@ function toBlocksCommonProps(props) {
|
|
|
31405
30585
|
registry: props.registry,
|
|
31406
30586
|
blockOverrides: toBlocksBlockOverrides(props.blockOverrides),
|
|
31407
30587
|
sdkConfig: props.sdkConfig ? { customBlocks: normalizeSdkCustomBlocks(props.sdkConfig.customBlocks) } : props.sdkConfig,
|
|
31408
|
-
customBlocks: normalizeSdkCustomBlocks(props.customBlocks)
|
|
30588
|
+
customBlocks: normalizeSdkCustomBlocks(props.customBlocks),
|
|
30589
|
+
headingScope: props.headingScope
|
|
31409
30590
|
};
|
|
31410
30591
|
}
|
|
31411
30592
|
function PageRenderer(props) {
|
|
@@ -31553,6 +30734,7 @@ function buildPageIdentityRenderContext(dataContext) {
|
|
|
31553
30734
|
demoEmailSuppressed: dataContext.demoEmailSuppressed,
|
|
31554
30735
|
now: dataContext.now,
|
|
31555
30736
|
siteName: dataContext.siteName,
|
|
30737
|
+
businessPerson: dataContext.businessPerson ?? null,
|
|
31556
30738
|
businessLocationPermission: dataContext.businessLocationPermission,
|
|
31557
30739
|
businessAddressVisibility: dataContext.businessAddressVisibility,
|
|
31558
30740
|
businessLocation: dataContext.businessLocation,
|
|
@@ -31683,4 +30865,4 @@ function Page(props) {
|
|
|
31683
30865
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(HydratorWithContextProps, { ...toPageHydrationBootstrapConfig(props) }), /* @__PURE__ */ jsx(PageContent, { ...props })] });
|
|
31684
30866
|
}
|
|
31685
30867
|
//#endregion
|
|
31686
|
-
export { flowRepeaterGridItems as $, prefetchBlockDataWithFailures as A, getBlockDefinition as B, resolveSdkBlockManifest as C, MISSING_SDK_THEME_ERROR_CODE as D, resolveSiteCustomBlocks as E, resolveAuthoredLinkHref as F, admitTransportedRenderableManifestContent as G, siteFooterManifest as H, isRouteVisibleInStage as I, admitLayoutGridForPlan as J, compileManifestContentContract as K, normalizeRenderStage as L, makeDefaultBlockComponent as M, renderBlock as N, MissingSdkThemeError as O, getDefaultComponentRegistry as P, projectRepeaterGridLayoutForRendering as Q, resolveRouteHrefForStage as R, readInvalidBlockAdmission as S,
|
|
30868
|
+
export { flowRepeaterGridItems as $, prefetchBlockDataWithFailures as A, getBlockDefinition as B, resolveSdkBlockManifest as C, MISSING_SDK_THEME_ERROR_CODE as D, resolveSiteCustomBlocks as E, resolveAuthoredLinkHref as F, admitTransportedRenderableManifestContent as G, siteFooterManifest as H, isRouteVisibleInStage as I, admitLayoutGridForPlan as J, compileManifestContentContract as K, normalizeRenderStage as L, makeDefaultBlockComponent as M, renderBlock as N, MissingSdkThemeError as O, getDefaultComponentRegistry as P, projectRepeaterGridLayoutForRendering as Q, resolveRouteHrefForStage as R, readInvalidBlockAdmission as S, siteBlockRenderContext as T, siteHeaderManifest as U, systemBlockDefinitions as V, blockDesignCapabilityMapFromDefinitions as W, fieldPlanToZod as X, deriveFieldValidationPlan as Y, projectRepeaterGridLayout as Z, buildRenderablePageOutline as _, solvedInksForThemeRuntime as a, buildPageDesignEditorReadModel as at, invalidRenderableBlock as b, MissingBlockOverrideError as c, isSupportedLoaderEndpoint$1 as ct, buildThemeRuntime as d, normalizeRepeaterGridSpan as et, parseBlocksTheme as f, blockDesignInputsForDefinition as g, resolveRuntimeJoinFacts as h, renderWithSdkThemeRuntime as i, parseListLook as it, materializeEntriesMedia as j, requireSdkTheme as k, PageRenderer as l, readPublishedBlockPlacement as lt, isEntryBoundBlockEmpty as m, planLayoutThemeRuntime as n, isRecord$6 as nt, ThemeScope as o, applyCompiledRuntimeFieldsToContent as ot, applyBindingsToContent as p, registeredManifestContentContract as q, renderWithOverrideOnlyRuntime as r, encodePublicProductCategorySelector as rt, EditorPageRenderer as s, compileEditorModelRuntime as st, Page as t, resolveRepeaterGridAcceptedSpans as tt, toBlocksPageRendererDataContext as u, buildSiteRenderSupport as v, sanitizeSdkRuntimeBlockContent as w, projectRenderablePageOutline as x, collectMediaAssetSidecar as y, allOutlineBlocks as z };
|