@riverbankcms/sdk 0.183.0 → 0.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/dist/_dts/{BlocksIslandsHydrator-X1_G96iN.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
- package/dist/_dts/{Page-CEqZJZEE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DQejfbXL.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
- package/dist/_dts/{client-B_B_amKD.d.ts → client-DgTRRtl_.d.ts} +13 -1
- package/dist/_dts/{content-types-Dhx5Ocvx.d.ts → content-types-DZQJp_ak.d.ts} +2 -2
- package/dist/_dts/{contracts-FeOnfoa1.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-m70J6tit.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
- package/dist/_dts/{index-liuhlOX7.d.ts → index-BECaUNYs.d.ts} +2 -2
- package/dist/_dts/{index-BOpUh8kO.d.ts → index-Cc85KVLW.d.ts} +3 -3
- package/dist/_dts/{index-CjAkEWAp.d.ts → index-Cni4jykw.d.ts} +4 -4
- package/dist/_dts/{index-Bizdaxji.d.ts → index-DxxTQ_0V.d.ts} +2 -2
- package/dist/_dts/{index-BxCmCit0.d.ts → index-W9-7djG3.d.ts} +1 -1
- package/dist/_dts/{index-iuFrbIjt.d.ts → index-ukS-Ffem.d.ts} +1 -1
- package/dist/_dts/{loadContent-D4wrTIIw.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
- package/dist/_dts/{request-Gn0O1blj.d.ts → request-CZz2BoXJ.d.ts} +74180 -73974
- package/dist/_dts/{resolveBlockData-D5duwuqS.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-xzJ3c9Na.d.ts → resolvePageContent-BteMsSGP.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +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/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +7 -7
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/portal/index.d.ts +10 -2
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +36 -1
- package/dist/_dts/{serviceBookingOutline-B1gyJon_.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +15 -7
- package/dist/_dts/{types-BoITy0rA.d.ts → types-Bi7R07RX.d.ts} +6 -2
- package/dist/_dts/{types-DBNuMtSk.d.ts → types-CCcQlRBi.d.ts} +9 -10
- package/dist/_dts/{types-DHMcuoeQ.d.ts → types-Du4aMnWC.d.ts} +13 -15
- package/dist/_dts/{validation-BIPO-XlE.d.ts → validation-CjCWVmwe.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-Ct8slgRk.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-qqTxGGS4.mjs → BookingMailingListNote-C4LcfwyA.mjs} +7 -7
- package/dist/client/{BookingQuestionFields-DCh9MUIF.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +1 -1
- package/dist/client/{CalendarAction-RcdaStG7.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-D7Wt-Oaa.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +5 -5
- package/dist/client/{CheckboxChoice-BdGxZWeg.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-HFVkoOac.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
- package/dist/client/{EventCalendar.client-BtkJW8bA.mjs → EventCalendar.client-Ct1B3xI4.mjs} +9 -9
- package/dist/client/{EventCombined.client-DxaGjFFS.mjs → EventCombined.client-DgfNtcgW.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B2c5dR49.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
- package/dist/client/{EventItem-Fr2qi2C2.mjs → EventItem-KGKkK19N.mjs} +5 -5
- package/dist/client/{EventListWeekNavigation-BRMaq0ky.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
- package/dist/client/{EventListing.client-BhGxfbjt.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
- package/dist/client/{EventListing.view-COuEJzbO.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
- package/dist/client/{EventRegistrationPayment-BTLYhVxD.mjs → EventRegistrationPayment-Dth9L00x.mjs} +108 -45
- package/dist/client/{Page-CgbQZP5g.mjs → Page-DB5KODiu.mjs} +1735 -501
- package/dist/client/{ProtectedSubmitButton-BG7my0Qf.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-DQNkfNLA.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +2 -2
- package/dist/client/{StepIndicator-DvPekKeM.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
- package/dist/client/{StepIndicator-DyXoI3ob.mjs → StepIndicator-DRyZ8igu.mjs} +6 -6
- package/dist/client/{ThemedButton-Bc9DBbVp.mjs → ThemedButton-C4rCsPCt.mjs} +11 -2
- package/dist/client/{accessibleSurfaces-wj4Rloo5.mjs → accessibleSurfaces-CqroimVQ.mjs} +745 -557
- package/dist/client/{accordion-BVXfjnh-.mjs → accordion-BQYRP5xV.mjs} +1 -1
- package/dist/client/{booking-form.client-DycPGtke.mjs → booking-form.client-B7ckDuOC.mjs} +16 -16
- package/dist/client/{bookingForm-DrWSUqL3.mjs → bookingForm-BeD4650p.mjs} +7 -6
- package/dist/client/bookings.mjs +4 -4
- package/dist/client/{boxStyleClassNames-CduDRcIk.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
- package/dist/client/{buttonParts-CJEtVOUy.mjs → buttonParts-C39GC0kz.mjs} +9 -2
- package/dist/client/{carousel-DyCLMP8s.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
- package/dist/client/{carousel.client-DffP_Nv0.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
- package/dist/client/{cart-BuEp_cj4.mjs → cart-DdCenbTy.mjs} +3 -3
- package/dist/client/{cart.client-CAO39uDG.mjs → cart.client-BQm06qNw.mjs} +1 -1
- package/dist/client/{checkout-BoxzT64s.mjs → checkout-45wPQULN.mjs} +3 -3
- package/dist/client/{checkout.client-IGUy7XOx.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
- package/dist/client/{checkoutUrls-D0UsiFmm.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
- package/dist/client/client.mjs +23 -35
- package/dist/client/{constants-C_8AxMdm.mjs → constants-DXV4KR7l.mjs} +1 -1
- package/dist/client/{context-D1L0pe__.mjs → context-lCPfX-xe.mjs} +13 -3
- package/dist/client/{demoPortalMagicLink-BunFTnIq.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-CtLAG651.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
- package/dist/client/{event-registration.client-DiSxkBUP.mjs → event-registration.client-DlPfn4YG.mjs} +51 -28
- package/dist/client/{eventCalendar-DUnhwZ1o.mjs → eventCalendar-CioAdryV.mjs} +4 -4
- package/dist/client/{eventCombined-BvBQo0nF.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
- package/dist/client/{eventListing-aTLifOX7.mjs → eventListing-B3H9ifOC.mjs} +4 -4
- package/dist/client/{eventRegistration-DFd7pr09.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
- package/dist/client/{form-Dikmc2AO.mjs → form-CsqzgC6v.mjs} +3 -3
- package/dist/client/{form.client-zHaQK5I9.mjs → form.client-DVDB7hY6.mjs} +4 -4
- package/dist/client/{form.parts-BLl9n8TH.mjs → form.parts-1q2rzSYt.mjs} +3 -3
- package/dist/client/gifting/client.mjs +7 -7
- package/dist/client/{gifting-CufPM38H.mjs → gifting-BrXQGX-k.mjs} +4 -4
- package/dist/client/{gifting.client--N1GaSY8.mjs → gifting.client--zAjnY5N.mjs} +6 -7
- package/dist/client/{gifting.interactive-D9MK4HkV.mjs → gifting.interactive-CrwHpUJG.mjs} +59 -9
- package/dist/client/{gifting.parts-CRtiRzo-.mjs → gifting.parts-CcKdDaQq.mjs} +7 -2
- package/dist/client/{headerSection-BIaBpmk3.mjs → headerSection-DlcDH4bi.mjs} +2 -2
- package/dist/client/{islands-DJDLGQEm.mjs → islands-dMh0Oxli.mjs} +1986 -1170
- package/dist/client/{newsletter-form.client-wg_JHTxm.mjs → newsletter-form.client-BxA1PsdS.mjs} +5 -5
- package/dist/client/{newsletter-form.interactive-hzpkW9NQ.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +6 -5
- package/dist/client/{newsletter-form.parts-CgzpSv9p.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
- package/dist/client/{newsletterForm-CvxLiEBT.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
- package/dist/client/portal/client.mjs +27 -15
- package/dist/client/{portalRoutes-DTHlWg_F.mjs → portalRoutes-DiGibcZI.mjs} +9 -2
- package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
- package/dist/client/{product-detail.client-22Q7zgjN.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
- package/dist/client/{product-list.client-DFWYvK8z.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
- package/dist/client/{productDetail-DhZAwo60.mjs → productDetail-D9-fCY6c.mjs} +3 -3
- package/dist/client/{productList-BiVpbZK2.mjs → productList-PJyxXSac.mjs} +3 -3
- package/dist/client/{propsDecoder-DFYqKnLy.mjs → propsDecoder-B8lrKGPw.mjs} +4 -4
- package/dist/client/{registry.server-C3OBRg7x.mjs → registry.server-CI63JVHW.mjs} +689 -569
- package/dist/client/rendering/client.mjs +28 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +4 -4
- package/dist/client/{richText-coerce-ms477Z08.mjs → richText-coerce-Jt9hDHdh.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-B6nQeqvH.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
- package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
- package/dist/client/{runtimeResponse-BYqsV1Kb.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
- package/dist/client/{shop-xt4dQ3HH.mjs → shop-CbdJlWOw.mjs} +3 -3
- package/dist/client/{shop-commerce-DVsIcPaI.mjs → shop-commerce-BqLbzUUn.mjs} +44 -26
- package/dist/client/{shop-commerce-store-7mO6KY7_.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-L1Vge8tG.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +1 -1
- package/dist/client/{shop.client-DNJfD3VQ.mjs → shop.client-0cNErhJT.mjs} +37 -18
- package/dist/client/{shopShared-DS8t6749.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{timetableModel-Dy3nNfTG.mjs → timetableModel-DqI6U1BS.mjs} +6 -6
- package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
- package/dist/client/{useAvailableSlots-DcjtDpUu.mjs → useAvailableSlots-B0mjVhZr.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-DvdFFWOT.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
- package/dist/client/{useEventPagination-Cq-7sU5_.mjs → useEventPagination-Ct4A6iR1.mjs} +13 -15
- package/dist/client/{view-4gnPcpWJ.mjs → view-Cj151w4m.mjs} +4 -4
- package/dist/client/{wizardSteps-DDvL3iza.mjs → wizardSteps-B3gsXNnb.mjs} +212 -68
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CLqSRUpt.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-CIdAg-Tm.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Bm85jX35.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-D8srnz9R.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +582 -195
- package/dist/preview-next/client/{PreviewEditorSidebar-DVpk5cqp.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +1095 -282
- package/dist/preview-next/client/{PreviewEditorUI-XoTtHSFH.mjs → PreviewEditorUI-BnJ1ughv.mjs} +65 -16
- package/dist/preview-next/client/{PreviewShell-VQHsRg2u.mjs → PreviewShell-C7qWzAe4.mjs} +39 -12
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CLdF9f6o.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +128 -27
- package/dist/preview-next/client/{ThemedButton-ORNN4x-3.mjs → ThemedButton-CRgbU75r.mjs} +18 -2
- package/dist/preview-next/client/{lucide-react-eAi3tDAr.mjs → lucide-react-B4c6U3ZU.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-CqH91EwA.mjs → previewAssistantSlot-DrUoRNu9.mjs} +6239 -2558
- package/dist/preview-next/client/{previewChromeRoot-B3ySEu6p.mjs → previewChromeRoot-CEYp90mM.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CdpSupcr.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-C6eOP6QW.mjs → siteStyleAccess-B3PwHw2z.mjs} +16 -10
- package/dist/preview-next/client/{useAutosaveStatus-BhPg4e-r.mjs → useAutosaveStatus-DrdQ4ier.mjs} +3 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BaWUF9D7.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +4 -3
- package/dist/preview-next/container-responsive.css +150 -3
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-Ch0X99vE.mjs → route-contract-CwrXkLT3.mjs} +16 -28
- package/dist/server/{Block.shared-B2FmczLO.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-DtAyv9qA.mjs → ThemeScopeCore-DvbqYXdK.mjs} +34 -8
- package/dist/server/{accessibleSurfaces-BtPqb76u.mjs → accessibleSurfaces-CAcf1lHT.mjs} +317 -148
- package/dist/server/{accordions-vzdZ2Wt1.mjs → accordions-DjcsqjCK.mjs} +1 -1
- package/dist/server/{bindings-B_9JuU66.mjs → bindings-CFw4M-gZ.mjs} +68 -247
- package/dist/server/{client-DC7cjiSw.mjs → client-D0XCgITW.mjs} +26 -34
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-d6nPNJpe.mjs → constants-BZduY8jG.mjs} +9 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-hb27HYic.mjs → loadContent-C-qyB8Tq.mjs} +4 -4
- package/dist/server/{loadPage-JToD8wDD.mjs → loadPage-BpKKmi8E.mjs} +3 -3
- package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-B2WhGofA.mjs → navigation-DYkuiNXa.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-vD5KTClL.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
- package/dist/server/page-converter.mjs +17 -4
- package/dist/server/{pageRenderPlan-CdqJ1NQZ.mjs → pageRenderPlan-DRB7cUZ0.mjs} +595 -208
- package/dist/server/{pageRuntimeSupport-CAhr4oOf.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +12 -5
- package/dist/server/{pageShared-m80Xu2pd.mjs → pageShared-BdQF875z.mjs} +596 -383
- package/dist/server/{parseThemeForPersistence-CRwOZfpa.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
- package/dist/server/{portal-B2wCQno_.mjs → portal-BQ8qiQnk.mjs} +22 -2
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-BWIkFaXq.mjs → prebuild-B51QZVNe.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-D1PHU-K9.mjs → prefetchBlockData-CppDAfJW.mjs} +3 -3
- package/dist/server/{registry-KtsOsAzY.mjs → registry-Bf4W8Qa7.mjs} +1499 -28631
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +9 -9
- package/dist/server/{resolveBlockData-sjIDJYl7.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
- package/dist/server/{expandPalette-DxPrNOAB.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1662 -1430
- package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
- package/dist/server/{schema-BBEqquBM.mjs → schema-DGaihVwp.mjs} +261 -6
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-ChEZDRwU.mjs → servicePageContent-CRvmreX7.mjs} +8 -7
- package/dist/server/theme-bridge.mjs +5 -4
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DKCIBeb1.mjs → three-pass-converter-mcy2E1Yd.mjs} +1 -1
- package/dist/server/{titleSourceSchema-DybHErxH.mjs → titleSourceSchema-B2qFOUwZ.mjs} +2 -3
- package/dist/server/{types-vyz09w64.mjs → types-C_S0pWbR.mjs} +9 -2
- package/dist/server/{validation-Cvi-1TZZ.mjs → validation-CUtNT_EZ.mjs} +5 -5
- package/dist/server/{version-B-icAIV1.mjs → version-DebJQ4zn.mjs} +1 -1
- package/dist/styles/index.css +495 -50
- package/package.json +1 -1
- package/dist/client/runtimeResponse-CUX_lldL.mjs +0 -3
- package/dist/server/customCss-rtIfEYwQ.mjs +0 -230
- package/dist/server/lookMediaFrame-CTsycLLK.mjs +0 -2756
- package/dist/server/media-gvfIw3z8.mjs +0 -216
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $t as cardListPresentationSchemaShape, Dn as buildMailingListSignupBlockSourceRef, En as formatEventStartingPrice, Mn as sameMailingListPlacementTargeting, Nn as parseContentVersionId, P as occurrenceContextSchema, Pn as unsafeAsContentEntryId, _t as offeringsListingFor, ct as OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE, fn as projectRecurringSchedule, ft as groupOfferingRunsByCourse, gn as resolveHeaderChromeRuntimeContract, hn as isHeaderScrollRuntimeEnabled, kn as parseMailingListPlacementTargeting, m as combinedLookSchema, mt as normalizeOfferingsPreviewContentForWrite, on as buildEventListWeek, ot as OFFERINGS_PREVIEW_AUTHORABLE_SOURCE_KEYS, pn as recurringScheduleProjectionSchema, pt as isOfferingsPreviewSourceKey, rn as quickFactSlots, ut as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, vn as parseHeaderPositioning, vt as offeringsPreviewGroupQuery, yn as planSiteChromePlacement, yt as readOfferingsGrouping } from "./newsletter-form.interactive-
|
|
2
|
+
import { $t as cardListPresentationSchemaShape, Dn as buildMailingListSignupBlockSourceRef, En as formatEventStartingPrice, Mn as sameMailingListPlacementTargeting, Nn as parseContentVersionId, P as occurrenceContextSchema, Pn as unsafeAsContentEntryId, _t as offeringsListingFor, ct as OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE, fn as projectRecurringSchedule, ft as groupOfferingRunsByCourse, gn as resolveHeaderChromeRuntimeContract, hn as isHeaderScrollRuntimeEnabled, kn as parseMailingListPlacementTargeting, m as combinedLookSchema, mt as normalizeOfferingsPreviewContentForWrite, on as buildEventListWeek, ot as OFFERINGS_PREVIEW_AUTHORABLE_SOURCE_KEYS, pn as recurringScheduleProjectionSchema, pt as isOfferingsPreviewSourceKey, rn as quickFactSlots, ut as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, vn as parseHeaderPositioning, vt as offeringsPreviewGroupQuery, yn as planSiteChromePlacement, yt as readOfferingsGrouping } from "./newsletter-form.interactive-D0iRg7p2.mjs";
|
|
3
3
|
import { a as mediaIdentifierSchema, i as resolveManagedMediaReference, n as renderableMediaAssetSchema, r as indexRenderableMediaAssets } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
|
|
4
4
|
import { A as eventCalendarListGroupingDecision, B as RichTextDocSchema, C as publicEventsArraySchema, Cn as toUtcIsoDateTimeString, E as bookingConsentCarrierSchema, H as createRichTextDoc, Hn as unsafeAsEventCategoryId, Ht as EVENT_PRESET_VALUES, It as calendarWindowQuerySchema, Jt as publicLocationSchema, Kt as parseLocationValue, M as eventCalendarLookViews, Qt as trimmedStringOrNull, Sn as parseUtcIsoDateTimeString, U as isRichTextDoc, V as buildRichTextSchema, Vt as isRecord$8, Wt as locationValueSchema, Y as runtimeMediaSchema, Z as PUBLIC_FILE_FIELD_KINDS, _ as publicMembershipProductCollectionSchema, bn as parseBookingLocalDate, ct as isArrangementMode, g as resolveCalendarReadProfile, in as formatDateTime, it as eventListTreatmentValues, lt as tileTreatmentValues, nn as formatDate$1, q as mediaSchema, qt as projectPublicLocation, v as publicPassProductCollectionSchema, wn as resolveBookingBusinessTimeZone, x as publicEventPricingSchema, y as eventVenueDrawingSchema, yn as getLocalScheduleDate, z as resolveEventCalendarReadPlan } from "./src-Do_s2lqH.mjs";
|
|
5
|
-
import { Ai as registrationDataForEventSelection, As as parseBlockColorToken, Cs as runTransforms, Di as planWholeSeriesParentBooking, Ds as plainTextToInlineText, Es as parseInlineTextFromUnknown, Fo as isBlockButtonRole, Fs as isRecord$9, Mi as selectionRepresentativeEvent, Ms as resolveDateRuntimeContext, Os as generateLookMediaFrameCss, Ro as eventCalendarWeekStart, Ss as createTransformRegistry, _s as standardAspectRatioPhrases, bs as sectionStateToneFromKind, fs as resolveArrangementKnobs,
|
|
6
|
-
import { l as monthSlotParents } from "./CalendarNavigationChevron-
|
|
5
|
+
import { Ai as registrationDataForEventSelection, As as parseBlockColorToken, Cs as runTransforms, Di as planWholeSeriesParentBooking, Ds as plainTextToInlineText, Es as parseInlineTextFromUnknown, Fo as isBlockButtonRole, Fs as isRecord$9, Mi as selectionRepresentativeEvent, Ms as resolveDateRuntimeContext, Os as generateLookMediaFrameCss, Ro as eventCalendarWeekStart, Ss as createTransformRegistry, _s as standardAspectRatioPhrases, bs as sectionStateToneFromKind, fs as resolveArrangementKnobs, gc as formatBookingPriceDisplay, gs as createAspectRatioField, hs as heroTitleSizeOptions, js as readRuntimeNow, ks as resolveLookMediaFrame, mc as offeringLabelForPageSurfaceSubject, ms as createImageShapeField, ns as MediaPlaceholder, ps as systemCustomizeFacetDefinitionsForBlock, rs as computeMediaTransformStyle, vi as normalizeEventRegistrationPageSurfaceSubject, vs as uiTransforms, wi as isOrdinaryPublicEvent, ws as inlineTextToPlainText, xs as asPartialObject, ys as SECTION_STATE_KINDS } from "./wizardSteps-B3gsXNnb.mjs";
|
|
6
|
+
import { l as monthSlotParents } from "./CalendarNavigationChevron-ZfrUiiiI.mjs";
|
|
7
7
|
import { h as assertNever$4 } from "./bookingCalendar--aWnqFDn.mjs";
|
|
8
|
-
import { $ as sectionContainer, $n as DEFAULT_MEDIA_FIELD_KINDS, $t as el, A as
|
|
9
|
-
import { $ as
|
|
10
|
-
import {
|
|
11
|
-
import { $ as
|
|
12
|
-
import { _ as parseRuntimeBackgroundContent, a as hasFixedFrameBackgroundMotion, c as resolveItemCardRole, d as isSectionMinHeight, f as isSemanticSpacing, g as parseBackgroundOverlay, h as parseBackgroundContent, i as fixedFrameScopeClass, m as resolveSpacing, n as ROUNDED_CLASSES, o as normalizeBoxStylesBorder, p as resolveSectionMinHeight, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles, t as RAISED_SHADOW_CLASS, u as SEMANTIC_SPACING_VALUES } from "./boxStyleClassNames-
|
|
13
|
-
import {
|
|
8
|
+
import { $ as sectionContainer, $n as DEFAULT_MEDIA_FIELD_KINDS, $t as el, A as admitReadinessFacts, An as publicAppointmentLocationSchema, At as eventHeaderSlotParents, B as formCopyFragment, Bn as lookSlot, C as audioPlayerReadiness, Cn as eventDiscoveryFilterKeys, Ct as normalizeLocationMapProps, D as teamReadiness, Dn as formatAppointmentDuration, E as galleryReadiness, En as resolveEventScope, Et as resolveLocationMapLocation, F as checkoutBlockDefinition, Fn as resolveBackgroundColorValue, G as createSiteOptionSelectField, Gn as ICON_CONFIG, Gt as FEATURE_CARD_ICON_TREATMENTS, H as composeFragments, Hn as ACCORDION_SPACING_MAP, I as cartBlockDefinition, In as lookCarouselRegionTransform, J as parseFieldDefinitions, Jn as pageGround, Jt as accordionList, K as normalizeSelectSource, Kn as ICON_SIZE_PX, Kt as parseBlockIconValue, L as createBlockManifest, Ln as lookLeadSlotTransform, Lt as desktopOnlyDisplay, M as loadedReadinessFact, Mn as teamMemberCardBiographyFallback, Mt as buildAppointmentServicesView, N as pageTemplateFromEntry, Nn as BACKGROUND_POSITION_PRESET_VALUES, O as testimonialsReadiness, On as formatAppointmentLocation, Ot as lookPartShown, P as unavailableReadinessFact, Pn as getAnchorClasses, Q as styledContainer, Qn as placedEditingPaths, Qt as carousel, R as augmentManifest, Rn as lookQuoteLimitTransform, Rt as mobileOnlyDisplay, S as giftingBlockDefinition, Sn as resolveEventScopeRead, St as describeUnresolvedLocationMapLocation, T as fileDownloadReadiness, Tn as eventScopeQueryKeys, Tt as parseLocationMapLoaderResult, U as defineFragment, Un as ACCORDION_TRIGGER_FONT_SCALE, Ut as PUBLIC_DOWNLOAD_MEDIA_TYPES, V as buildFragmentDataLoaders, Vn as ACCORDION_OPEN_ACCENT_THICKNESS, W as createSdkSelectField, Wn as ACCORDION_TRIGGER_LETTER_SPACING, Wt as FEATURE_CARD_GENERATED_ICON_SIZE_PX, X as sectionHeaderFields, Xn as storedSectionPhoto, Xt as bookingForm, Y as withApiBindings, Yn as sectionPhotoPath, Yt as bind, Z as sectionHeaderLayoutNodes, Zn as bindingSchema, Zt as button, _ as cardListSectionActionFields, _n as eventReadinessQuery, _t as createButtonVariantField, a as cardListSectionAction, an as link, ar as mapReadinessFact, at as offeringCourseSlotParents, b as formDataSchema, bn as recurringScheduleRead, bt as LOCATION_MAP_LIMITS, c as newsletterSignupBlockDefinition, cn as repeat, ct as emptyStateField, d as eventListingBlockDefinition, dn as stack, dt as withoutMap, en as fileDownload, er as isAcceptedRepeaterGridSpan, et as layoutSectionGround, f as mapDrawingStyleBinding, fn as text, ft as cardStylesField, g as cardListPresentationBindings, gn as eventReadinessLoaderKey, gt as createButtonGroup, h as cardListPhotoNumberFields, hn as blockChecksForEvents, ht as unreadContainerStylesField, i as shopBlockDefinition, in as inline, ir as resolveRepeaterGridSpanFieldId, it as buildLoadedOfferingsPreviewListing, j as hiddenFromVisitors, jn as publicAppointmentPricingSchema, jt as resolveEventDetailsPresentation, k as videoGridReadiness, kn as formatAppointmentPrice, kt as lookParts, l as sanitizeNewsletterSignupPublicContent, ln as richText, lr as publicMapLocationResultSchema, lt as eventDisplayFields, m as cardListKnobFields, mn as when, mt as sectionStylesField, nn as headerSection, nr as resolveRepeaterGridColumnFieldId, nt as backgroundFrame, o as productListBlockDefinition, on as media, or as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, ot as cardStylingFields, p as eventCalendarBlockDefinition, pn as videoEmbed, pt as containerStylesField, q as parseFieldDefinition, qn as groundPaint, qt as SectionNode, rn as icon, rr as resolveRepeaterGridRowFieldId, s as productDetailBlockDefinition, sn as props, sr as linkSchema, st as columnsField, t as serverComponentRegistry, tn as form, tr as parseRepeaterGridInteger, tt as styledSection, u as normalizeMailingListBlockContent, un as section, ur as isCanonicalRichTextDoc, ut as layoutField, v as normalizeCardListContent, vn as eventReadinessQueryKeys, w as chosenString, wn as eventScopeLoaderParam, wt as normalizeLocationMapSource, x as eventRegistrationBlockDefinition, xn as resolveEventCalendarRead, xt as LOCATION_MAP_LOADER_KEYS, y as formBlockDefinition, yn as eventReadinessResultSchema, yt as LOCATION_MAP_DEFAULTS, z as formEmbedFragment, zn as lookSkinSlotTransform } from "./registry.server-CI63JVHW.mjs";
|
|
9
|
+
import { $ as sectionShapeFromContent, $t as defineBlockDesignCapability, A as resolvePublishedLook, At as resolvePageDesignBoundaryChoice, B as designRuntimeRulesForTheme, Bn as siteChromeBackgroundOverrideOwner, Bt as sectionTransitionFamilies, C as getCompatibleBlockAppearancePresets, Cn as headerVariantValues, Ct as mixGroundColour, D as readStoredMode, Dn as boxBackgroundSchema, Dt as parsePageDesignIntent, E as arrangementManifestFromVariants, Et as groundTextureDataUri, F as filterLayoutProfilesForPolicy, Fn as surfaceCardRoleValues, Ft as boundaryRuntimeMetricsForDecorativeTransition, Gn as asSiteStyleId, Gt as anglePolygonCss, H as requireCuratedSiteStyle, Hn as asDesignBlockId, Ht as spaciousBoundaryOption, I as filterLookIdsForPolicy, It as boundaryTreatmentForBoundaryOptionId, J as brandScrimOverlay, Jt as appearancePresets, K as stripCompiledRuntimeStyleFields, Kn as makeBoundaryId, Kt as transitionCatalogueEntries, L as componentRuntimeRulesForSiteStyle, Ln as asHeaderLayoutId, Lt as isDecorativeTransitionIntent, M as applySiteStyleBlockPoliciesToPageDesignIntent, Mn as cardVariantRoleValues, Mt as boundaryOptionForTreatment, N as buildInitialPolicyPageDesignIntent, Nt as boundaryOptionIdForTreatment, O as resolveEffectiveArrangement, On as runtimeBoxBackgroundSchema, Ot as rebasePageDesignIntentToSiteStyle, P as deriveSiteStyleBlockPolicy, Pt as boundaryOptions, Q as sectionShapeForGround, Qt as assertNever$5, R as componentRuntimeRulesForTheme, Rn as asHeaderStyleId, Rt as noneBoundaryOption, S as compileArrangementLookRuntime, Sn as themeSchema, St as groundFlatZone, T as resolveLookForBlock, Tn as customCssRuleSchema, Tt as resolveSectionTreatment, Un as asLayoutVariantKey, Ut as transitionCatalogueEntryForIntent, V as getCuratedSiteStyle, Vn as asAppearancePresetId, Vt as softBoundaryOption, W as compilePageRuntimeFields, Wn as asPageFlowPresetId, Wt as transitionIntentForTreatment, Y as defaultHeroImageSurfaceTreatment, Zt as lookModes, _ as selectItemSurfacePresentation, _t as navLinkOwnsHoverForeground, an as introCompositionTreatmentValues, at as resolveCardRole, b as arrangementStyleAvailability, bn as sectionStylesOverrideSchema, bt as stripStaleTransitionStyleGroup, c as logger, cn as requireNonEmptyReadonlyArray, ct as footerForegroundCandidates, dn as toNonEmptyReadonlyArray, dt as generateNavLinkCSS, en as defineExactCatalog, et as sectionShapeHook, fn as opaqueSurfaceContextFromTheme, ft as generateEffectsCSS, g as resolveLookSurfacePresentation, gt as navLinkHoverColorCandidate, h as lookPresentationOnPalette, hn as TokenResolver, ht as generateInteractiveChildInheritanceCSS, in as featureCardCompositionTreatmentValues, it as existingStyleEdges, j as applyBlockContentVariantPolicy, jt as boundaryOptionForTransitionIntent, k as resolveModeArrangement, kn as fontWidthFits, kt as resolvePageDesignBlockLookChoice, ln as sectionBackgroundPaintValues, lt as getNavLinkPreset, m as itemRole, mn as arrangementSlotNames, mt as resolveEffectPaint, nn as defineNoBlockDesignCapability, on as offeringsPreviewCompositionTreatmentValues, ot as generateDefaultCardSystem, p as resolvedItemSurfaceProps, pn as opaqueSurfaceDeclarations, pt as resolveEffectApplications, q as surfaceResolutionContextFromTheme, qt as pageDesignDecisionsV2Schema, rn as designIssueSeverityForPolicy, sn as plainFrame, st as generateFooterCss, tn as defineFrameCapability, un as testimonialsCompositionTreatmentValues, ut as buildTextContrastShadow, v as arrangementAppearancePresets, vt as navLinkOwnsUnderline, w as resolveArrangementLookForBlock, wn as blockCustomCssRuleSchema, wt as resolveGroundPaint, x as automaticArrangementLook, xn as sectionTreatmentSchema, xt as themeV2CompilerOwnedFieldNames, y as arrangementLookHooks, yt as sectionOwnerStyleChoices, z as designRuntimeRulesForSiteStyle, zt as sectionBoundaryTreatmentsEqual } from "./islands-dMh0Oxli.mjs";
|
|
10
|
+
import { D as absoluteInkColors, I as parseColorTokenParts, L as parseThemeColorToken, a as partOwnedPseudoElements, d as createStandardButtonSurfacePolicy, i as buttonShadowLayersValue, k as hexColorSchema, m as actionVariableFallback, n as BUTTON_LABEL_CLASS, o as affordanceIconMaskUrl, p as unsafeAsOpaqueButtonColourToken, r as buttonPartsCss, s as DEFAULT_VARIANT_ALIAS_ID, u as buttonSizeNameSchema } from "./buttonParts-C39GC0kz.mjs";
|
|
11
|
+
import { $ as expandPalette, B as cssVarValue, Bt as featuresFromHex, C as materializeRuntimeButtonAppearance, Ct as resolveOpaqueSurfaceHex, Dt as paletteInkToken, E as DEFAULT_BUTTON_SIZES, Et as paletteInkRoles, Ft as hexLuminance, G as callsCssLoadingFunction, Gt as oklchToHexGamut, H as rgbColorValue, It as luminanceInterval, J as safeTokenOr, K as staysInsideDeclaration, Kt as rgbToHex, N as mapButtonVisualAppearances, Nt as ORDINARY_TEXT_MIN_CONTRAST_RATIO, O as FONT_SIZE_MAP, Pt as contrastRatio, Q as SURFACE_SECONDARY_TEXT_TINT_ALPHA, R as backgroundColorStyle, Rt as solidPaint, S as buttonTypographyDeclarations, St as resolveConcreteColorHex, T as BORDER_WIDTH_MAP, Tt as paletteInk, U as textColorStyle, Ut as oklabToOklch, V as mergeStyles, Vt as hexToRgb, W as textColorValue, Wt as oklabToSrgb, Y as surfaceInkPublication, Z as solveSurfaceInks, _ as formatButtonColourContractError, _t as surfaceInkDeclarations, at as planForegroundHover, b as buttonStateAppearanceDeclarations, bt as freezeOwnedThemeValue, ct as contrastThresholdByPolicy, dt as SURFACE_INK_CSS_VARS, ft as surfaceForegroundDeclarations, g as BUTTON_CONTRAST_POLICY, gt as surfaceForegroundValueWithOpacity, h as resolveSolidButtonColour, ht as surfaceForegroundValue, i as prepareSurfaceIndex, it as scrimTone, k as generateShadowValue$1, lt as DEFAULT_SURFACE_TEXT_COLOR, m as compileButtonColourStates, mt as surfaceForegroundStyle, nt as gradientScrimSamples, ot as HOVER_TEXT_THRESHOLD, pt as surfaceForegroundInputFromResolved, q as resolveSurfaceForeground, qt as srgbToOklab, r as parseSurfaceTree, s as resolveSurface, st as certifyPaint, t as certifyFinishedGround, tt as compositeHex, u as surfaceDecorationColors, ut as SURFACE_FOREGROUND_CSS_VARS, v as buttonBorder, vt as surfaceInkStyle, w as paddingDeclarations, wt as neutralInk, x as buttonStateShadow, xt as ownedThemeSnapshot, y as buttonRadius, yt as surfaceInkValue, z as borderColorStyle } from "./accessibleSurfaces-CqroimVQ.mjs";
|
|
12
|
+
import { _ as parseRuntimeBackgroundContent, a as hasFixedFrameBackgroundMotion, c as resolveItemCardRole, d as isSectionMinHeight, f as isSemanticSpacing, g as parseBackgroundOverlay, h as parseBackgroundContent, i as fixedFrameScopeClass, m as resolveSpacing, n as ROUNDED_CLASSES, o as normalizeBoxStylesBorder, p as resolveSectionMinHeight, r as boxStyleClassNames, s as resolveCardRoleForBoxStyles, t as RAISED_SHADOW_CLASS, u as SEMANTIC_SPACING_VALUES } from "./boxStyleClassNames-CA7FirMH.mjs";
|
|
13
|
+
import { A as themeButtonSelector, j as AFFORDANCE_SUPPRESS_CLASS, k as parseThemeButtonVariantId } from "./ThemedButton-C4rCsPCt.mjs";
|
|
14
14
|
import { t as NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES } from "./navDropdownSizing-CUjDrcIt.mjs";
|
|
15
15
|
import { s as declarativeCarouselSlides } from "./carousel.shared-BFQ3kBEw.mjs";
|
|
16
16
|
import { n as getCurrentResolveImageUrlContext, o as setContextResolveImageUrlContext, t as buildResolveImageUrlContext } from "./mediaContext-DzvnjYXm.mjs";
|
|
17
17
|
import { n as eventAutoApplyDiscountPreviewSchema } from "./events-9LPvwbWp.mjs";
|
|
18
|
-
import { t as coerceRichTextDoc } from "./richText-coerce-
|
|
19
|
-
import { a as eventItemSlotParents, i as cardItemSlotParents } from "./EventItem-
|
|
20
|
-
import { n as eventListSlotParents } from "./EventListing.view-
|
|
18
|
+
import { t as coerceRichTextDoc } from "./richText-coerce-Jt9hDHdh.mjs";
|
|
19
|
+
import { a as eventItemSlotParents, i as cardItemSlotParents } from "./EventItem-KGKkK19N.mjs";
|
|
20
|
+
import { n as eventListSlotParents } from "./EventListing.view-Dy36vWHi.mjs";
|
|
21
21
|
import { r as themeRuntimeScopeProps, t as buildThemeDataAttrs } from "./themeScopeUtils-BAOw_fNA.mjs";
|
|
22
22
|
import { t as resolveBlocksPageMediaContext } from "./mediaAssets-COfQolI3.mjs";
|
|
23
23
|
import * as React$1 from "react";
|
|
@@ -353,6 +353,36 @@ function cloneThemeTokens(source) {
|
|
|
353
353
|
return JSON.parse(JSON.stringify(source));
|
|
354
354
|
}
|
|
355
355
|
//#endregion
|
|
356
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
357
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
358
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
359
|
+
if (!token) return null;
|
|
360
|
+
const parts = parseColorTokenParts(token);
|
|
361
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
362
|
+
return resolveConcreteColorHex(parts.token, expandedPalette);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Tone of the surface a foreground token was resolved for.
|
|
366
|
+
*
|
|
367
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
368
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
369
|
+
* a guess.
|
|
370
|
+
*/
|
|
371
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
372
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
373
|
+
if (!hex) return "unknown";
|
|
374
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
378
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
379
|
+
* which is what every site rendered before variants existed.
|
|
380
|
+
*/
|
|
381
|
+
function selectLogoVariant(tone, variants) {
|
|
382
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
383
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
356
386
|
//#region ../theme-core/src/surfaces/mapDrawingTokens.ts
|
|
357
387
|
/**
|
|
358
388
|
* The one map token contract (issue 1611). Drawings carry semantic classes only;
|
|
@@ -704,203 +734,6 @@ function assertUniqueLayoutProfileKeys(profiles) {
|
|
|
704
734
|
if (duplicates.length > 0) throw new Error(`Duplicate block layout design profiles: ${duplicates.join(", ")}`);
|
|
705
735
|
}
|
|
706
736
|
//#endregion
|
|
707
|
-
//#region ../theme-core/src/site-styles/sectionBoundaryComposition.ts
|
|
708
|
-
/**
|
|
709
|
-
* Classifies a section from its final render content. `_sectionStyles`
|
|
710
|
-
* already holds the effective background (Look default, page-design override
|
|
711
|
-
* and block-authored media merged by `resolveSectionBackground`), so this only
|
|
712
|
-
* reads it and never re-decides precedence. What it paints comes from
|
|
713
|
-
* `groundPaint`, the same decision the background layer paints from, given
|
|
714
|
-
* the ground the section declares for when its content sets no colour.
|
|
715
|
-
*/
|
|
716
|
-
function boundaryEndpointForSectionContent(content, ground) {
|
|
717
|
-
const background = parseCanonicalRuntimeBackground(content);
|
|
718
|
-
const paint = groundPaint(background.kind === "none" ? null : background.background, ground.fallback);
|
|
719
|
-
switch (paint.kind) {
|
|
720
|
-
case "fill": {
|
|
721
|
-
const token = parseThemeColorToken(paint.colour);
|
|
722
|
-
return token ? {
|
|
723
|
-
kind: "paint",
|
|
724
|
-
token
|
|
725
|
-
} : {
|
|
726
|
-
kind: "unpainted",
|
|
727
|
-
reason: "literal-color"
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
case "gradient": return {
|
|
731
|
-
kind: "unpainted",
|
|
732
|
-
reason: "gradient"
|
|
733
|
-
};
|
|
734
|
-
case "media": return {
|
|
735
|
-
kind: "unpainted",
|
|
736
|
-
reason: "media"
|
|
737
|
-
};
|
|
738
|
-
case "bare": return {
|
|
739
|
-
kind: "paint",
|
|
740
|
-
token: pageGround.fallback
|
|
741
|
-
};
|
|
742
|
-
default: return assertNever$5(paint, "Unhandled ground paint");
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
/**
|
|
746
|
-
* Reads every fact from final render content in one place. `_frameStyles` is
|
|
747
|
-
* the compiled frame; content without one (no page design, an SDK block)
|
|
748
|
-
* draws a plain frame. `ground` is what the section declares it paints when
|
|
749
|
-
* its content sets no colour (`pageGround` for a section that declares none).
|
|
750
|
-
*/
|
|
751
|
-
function sectionFactsForContent(content, ground) {
|
|
752
|
-
const photoGround = isLookPhotoGround(content);
|
|
753
|
-
return {
|
|
754
|
-
endpoint: photoGround ? {
|
|
755
|
-
kind: "unpainted",
|
|
756
|
-
reason: "media"
|
|
757
|
-
} : boundaryEndpointForSectionContent(content, ground),
|
|
758
|
-
...photoGround || isPhotoBackground(content) ? { photo: true } : {},
|
|
759
|
-
frame: frameKindForContent(content),
|
|
760
|
-
shape: sectionShapeFromContent(content)
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
/** A Look whose photo covers the section (`photoGround`) meets its joins as a photo does, once it has a photo to show. */
|
|
764
|
-
function isLookPhotoGround(content) {
|
|
765
|
-
const look = content._effectiveLook;
|
|
766
|
-
const hooks = content._lookHooks;
|
|
767
|
-
return isRecord$7(look) && look.photoGround === true && isRecord$7(hooks) && hooks["data-has-photo"] === "true";
|
|
768
|
-
}
|
|
769
|
-
function isRecord$7(value) {
|
|
770
|
-
return typeof value === "object" && value !== null;
|
|
771
|
-
}
|
|
772
|
-
function isPhotoBackground(content) {
|
|
773
|
-
const source = parseCanonicalRuntimeBackground(content);
|
|
774
|
-
return source.kind !== "none" && source.background.type === "image" && source.background.image != null;
|
|
775
|
-
}
|
|
776
|
-
function frameKindForContent(content) {
|
|
777
|
-
const frameStyles = content._frameStyles;
|
|
778
|
-
const kind = typeof frameStyles === "object" && frameStyles !== null && "kind" in frameStyles ? frameStyles.kind : null;
|
|
779
|
-
return kind === "panel" || kind === "flush-panel" ? kind : "plain";
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* The frame rule: a flush panel owns the edge it runs to, so no break is
|
|
783
|
-
* drawn next to one. The single home for this rule; the generated
|
|
784
|
-
* pipeline's budget and the site-style lab ask it with their plan frames.
|
|
785
|
-
*/
|
|
786
|
-
function frameNotShownReason(previous, next) {
|
|
787
|
-
return previous === "flush-panel" || next === "flush-panel" ? "flush-panel" : null;
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* A field sits in from the page edge with page ground around it, so a break
|
|
791
|
-
* drawn across its edge would have nothing to join (issue 1659).
|
|
792
|
-
*/
|
|
793
|
-
function shapeNotShownReason(previous, next) {
|
|
794
|
-
return previous === "field" || next === "field" ? "field" : null;
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* Decides whether and how a join draws. The frame and shape rules win before
|
|
798
|
-
* paint is considered; two unpainted sides show nothing.
|
|
799
|
-
*/
|
|
800
|
-
function composeBoundary(previous, next, treatment) {
|
|
801
|
-
const frameReason = frameNotShownReason(previous.frame, next.frame) ?? shapeNotShownReason(previous.shape, next.shape);
|
|
802
|
-
if (frameReason) return {
|
|
803
|
-
kind: "not-shown",
|
|
804
|
-
reason: frameReason
|
|
805
|
-
};
|
|
806
|
-
const paintReason = paintNotShownReason(previous, next, treatment);
|
|
807
|
-
if (paintReason) return {
|
|
808
|
-
kind: "not-shown",
|
|
809
|
-
reason: paintReason
|
|
810
|
-
};
|
|
811
|
-
const from = previous.endpoint;
|
|
812
|
-
const to = next.endpoint;
|
|
813
|
-
if (from.kind === "paint") return {
|
|
814
|
-
kind: "shown",
|
|
815
|
-
composition: to.kind === "paint" ? {
|
|
816
|
-
kind: "paint-to-paint",
|
|
817
|
-
from: from.token,
|
|
818
|
-
to: to.token
|
|
819
|
-
} : {
|
|
820
|
-
kind: "paint-to-unpainted",
|
|
821
|
-
from: from.token
|
|
822
|
-
}
|
|
823
|
-
};
|
|
824
|
-
return to.kind === "paint" ? {
|
|
825
|
-
kind: "shown",
|
|
826
|
-
composition: {
|
|
827
|
-
kind: "unpainted-to-paint",
|
|
828
|
-
to: to.token
|
|
829
|
-
}
|
|
830
|
-
} : {
|
|
831
|
-
kind: "not-shown",
|
|
832
|
-
reason: "both-unpainted"
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
|
-
/**
|
|
836
|
-
* Decides the seam between two adjacent sections from the same facts that
|
|
837
|
-
* decide the boundary. Shared ground needs two platform sections painting the
|
|
838
|
-
* identical theme token, with no field, flush panel or photo on either side;
|
|
839
|
-
* gradients and literal colours are unpainted, so they never merge. A shared
|
|
840
|
-
* ground is always a `same-paint` join, so a seam never sits beside a drawn
|
|
841
|
-
* boundary or its reserves.
|
|
842
|
-
*/
|
|
843
|
-
function sectionSeam(previous, next) {
|
|
844
|
-
if (previous.facts.shape === "field" && next.facts.shape === "field") return "fields";
|
|
845
|
-
return mergesGround(previous) && mergesGround(next) && samePaint(previous.facts.endpoint, next.facts.endpoint) ? "shared-ground" : "none";
|
|
846
|
-
}
|
|
847
|
-
/** A side can share its ground only when the platform paints it edge to edge, with no flush panel or photo. */
|
|
848
|
-
function mergesGround(side) {
|
|
849
|
-
const { facts } = side;
|
|
850
|
-
return side.section === "platform" && facts.shape !== "field" && facts.frame !== "flush-panel" && !facts.photo;
|
|
851
|
-
}
|
|
852
|
-
function samePaint(previous, next) {
|
|
853
|
-
return previous.kind === "paint" && next.kind === "paint" && previous.token === next.token;
|
|
854
|
-
}
|
|
855
|
-
/** Treatment-specific placement and indistinguishable paint are composition decisions. */
|
|
856
|
-
function paintNotShownReason(previous, next, treatment) {
|
|
857
|
-
if (treatment === "wave-edge-echo" && (!previous.photo || next.endpoint.kind !== "paint")) return "photo-required";
|
|
858
|
-
return previous.endpoint.kind === "paint" && next.endpoint.kind === "paint" && previous.endpoint.token === next.endpoint.token ? "same-paint" : null;
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* Placement, reserves and paint for a shown boundary, derived from the
|
|
862
|
-
* composition and the catalogue's metrics for the treatment.
|
|
863
|
-
*/
|
|
864
|
-
function boundaryLayout(intent, composition) {
|
|
865
|
-
const metrics = boundaryRuntimeMetricsForDecorativeTransition(intent);
|
|
866
|
-
switch (composition.kind) {
|
|
867
|
-
case "paint-to-paint": return {
|
|
868
|
-
placement: "centred",
|
|
869
|
-
reserves: {
|
|
870
|
-
before: metrics.reserveCss,
|
|
871
|
-
after: metrics.reserveCss
|
|
872
|
-
},
|
|
873
|
-
paint: {
|
|
874
|
-
band: composition.from,
|
|
875
|
-
shape: composition.to
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
case "unpainted-to-paint": return {
|
|
879
|
-
placement: "previous",
|
|
880
|
-
reserves: {
|
|
881
|
-
before: metrics.heightCss,
|
|
882
|
-
after: null
|
|
883
|
-
},
|
|
884
|
-
paint: {
|
|
885
|
-
band: null,
|
|
886
|
-
shape: composition.to
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
case "paint-to-unpainted": return {
|
|
890
|
-
placement: "next",
|
|
891
|
-
reserves: {
|
|
892
|
-
before: null,
|
|
893
|
-
after: metrics.heightCss
|
|
894
|
-
},
|
|
895
|
-
paint: {
|
|
896
|
-
band: null,
|
|
897
|
-
shape: composition.from
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
default: return assertNever$5(composition, "Unhandled boundary composition");
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
//#endregion
|
|
904
737
|
//#region ../theme-core/src/site-styles/contentTemplateDesignIntent.ts
|
|
905
738
|
function asContentTemplateDesignBlockId(value) {
|
|
906
739
|
return asDesignBlockId(value);
|
|
@@ -1831,6 +1664,228 @@ function readHeaderNavFontSizePreference(value) {
|
|
|
1831
1664
|
return value === "sm" || value === "base" || value === "lg" || value === "xl" ? value : "inherit";
|
|
1832
1665
|
}
|
|
1833
1666
|
//#endregion
|
|
1667
|
+
//#region ../theme-core/src/site-styles/runtimeBackgroundResolution.ts
|
|
1668
|
+
function parseCanonicalRuntimeBackground(content) {
|
|
1669
|
+
const background = readRecord(readRecord(content._sectionStyles)?.background);
|
|
1670
|
+
if (!background) return { kind: "none" };
|
|
1671
|
+
const parsed = runtimeBoxBackgroundSchema.safeParse(background);
|
|
1672
|
+
if (!parsed.success) return { kind: "none" };
|
|
1673
|
+
return parsed.data.contentOwner === "page-design-editor" ? {
|
|
1674
|
+
kind: "page-design-override",
|
|
1675
|
+
background: parsed.data
|
|
1676
|
+
} : {
|
|
1677
|
+
kind: "block-authored",
|
|
1678
|
+
background: parsed.data
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
/** The Look owns photo shading; copy panels keep their independently solved ink. */
|
|
1682
|
+
function applyLookPhotoTreatment(background, treatment, palette, tint = "dark", placement = "foot") {
|
|
1683
|
+
if (background.type !== "image" || !treatment) return background;
|
|
1684
|
+
if (tint === "brand") return brandPhotoTreatment(background, treatment, palette, placement);
|
|
1685
|
+
if (treatment === "photo-only") return background;
|
|
1686
|
+
return darkPhotoTreatment(background, palette, placement);
|
|
1687
|
+
}
|
|
1688
|
+
function darkPhotoTreatment(background, palette, placement, brandWash) {
|
|
1689
|
+
const ink = photoCopyInk(palette);
|
|
1690
|
+
return {
|
|
1691
|
+
...background,
|
|
1692
|
+
overlay: {
|
|
1693
|
+
type: "gradient",
|
|
1694
|
+
opacity: 1,
|
|
1695
|
+
gradient: photoCopyShade(placement, brandWash)
|
|
1696
|
+
},
|
|
1697
|
+
textColor: ink,
|
|
1698
|
+
headingColor: ink,
|
|
1699
|
+
linkColor: ink,
|
|
1700
|
+
supportingColor: ink
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* The least black any photo copy band puts behind its text: the centred band's
|
|
1705
|
+
* even 60%. The foot band is at least 76% where its copy sits and the foot
|
|
1706
|
+
* brand paint 80% (under a wash no lighter than 28% black), so 60% bounds all three.
|
|
1707
|
+
*/
|
|
1708
|
+
const PHOTO_COPY_MIN_SHADE = .6;
|
|
1709
|
+
/** Centred copy gets an even 60% band (white text over a white photo stays above 5.5:1) that eases off at the edges; the foot keeps its original paint. */
|
|
1710
|
+
function photoCopyShade(placement, brandWash) {
|
|
1711
|
+
if (placement === "foot" && brandWash) return `linear-gradient(${brandWash}, ${brandWash}), linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8))`;
|
|
1712
|
+
const band = `rgba(0,0,0,${PHOTO_COPY_MIN_SHADE})`;
|
|
1713
|
+
return `var(--rb-opening-photo-shade, linear-gradient(transparent, transparent)), ${placement === "centre" ? `linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, ${band} 15%, ${band} 85%, rgba(0,0,0,0.15) 100%)` : "linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.76) 25%, rgba(0,0,0,0.4) 46%, transparent 72%)"}${brandWash ? `, linear-gradient(${brandWash}, ${brandWash})` : ""}`;
|
|
1714
|
+
}
|
|
1715
|
+
/** Every pixel behind photo copy: anything from black up to the minimum shade over a white photo. */
|
|
1716
|
+
const PHOTO_COPY_PAINT = luminanceInterval(0, hexLuminance(compositeHex("#000000", PHOTO_COPY_MIN_SHADE, "#ffffff")));
|
|
1717
|
+
/** The palette's own light colour (its background, or its text on a dark palette) when it reads over the copy band, else white. */
|
|
1718
|
+
function photoCopyInk(palette) {
|
|
1719
|
+
const ink = paletteInk(PHOTO_COPY_PAINT, paletteInkRoles(palette));
|
|
1720
|
+
return ink.kind === "unpaintable" ? "absoluteWhite" : paletteInkToken(ink);
|
|
1721
|
+
}
|
|
1722
|
+
/** A light brand's dark ink cannot sit on unknown pixels: give light ink a dark backing. */
|
|
1723
|
+
function brandPhotoTreatment(background, treatment, palette, placement) {
|
|
1724
|
+
const brand = brandScrimOverlay("primary");
|
|
1725
|
+
if (treatment === "photo-only") return {
|
|
1726
|
+
...background,
|
|
1727
|
+
overlay: brand
|
|
1728
|
+
};
|
|
1729
|
+
if (surfaceToneFromForegroundToken(palette, "primaryForeground") === "dark") return {
|
|
1730
|
+
...background,
|
|
1731
|
+
overlay: brand,
|
|
1732
|
+
textColor: "primaryForeground",
|
|
1733
|
+
headingColor: "primaryForeground",
|
|
1734
|
+
linkColor: "primaryForeground",
|
|
1735
|
+
supportingColor: "primaryForeground"
|
|
1736
|
+
};
|
|
1737
|
+
return darkPhotoTreatment(background, palette, placement, `color-mix(in srgb, ${brand.color} ${brand.opacity * 100}%, transparent)`);
|
|
1738
|
+
}
|
|
1739
|
+
function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
|
|
1740
|
+
if (heroPhotoIsContent(source, arrangementHeroPhoto, rhythm !== void 0)) {
|
|
1741
|
+
if (rhythm !== void 0) return rhythmBackground(rhythm);
|
|
1742
|
+
return {
|
|
1743
|
+
kind: "content-media",
|
|
1744
|
+
background: source.background,
|
|
1745
|
+
ground: {
|
|
1746
|
+
type: "color",
|
|
1747
|
+
color: arrangementHeroPhoto?.fallbackToken ?? "background",
|
|
1748
|
+
textColor: source.background.textColor,
|
|
1749
|
+
headingColor: source.background.headingColor,
|
|
1750
|
+
linkColor: source.background.linkColor,
|
|
1751
|
+
supportingColor: source.background.supportingColor
|
|
1752
|
+
}
|
|
1753
|
+
};
|
|
1754
|
+
}
|
|
1755
|
+
if (source.kind === "page-design-override") return {
|
|
1756
|
+
kind: "override",
|
|
1757
|
+
background: source.background
|
|
1758
|
+
};
|
|
1759
|
+
if (isAuthoredMedia(source)) return {
|
|
1760
|
+
kind: "authored-media",
|
|
1761
|
+
background: lookDefault ? mergeLookForegroundWithAuthoredMedia(lookDefault, source.background) : source.background
|
|
1762
|
+
};
|
|
1763
|
+
if (lookDefault) return {
|
|
1764
|
+
kind: "look-surface",
|
|
1765
|
+
background: lookDefault
|
|
1766
|
+
};
|
|
1767
|
+
if (source.kind === "block-authored") return {
|
|
1768
|
+
kind: "authored-colour",
|
|
1769
|
+
background: source.background
|
|
1770
|
+
};
|
|
1771
|
+
return rhythmBackground(rhythm);
|
|
1772
|
+
}
|
|
1773
|
+
function resolveSectionPhotoPlacement(background, heroPhoto) {
|
|
1774
|
+
if (heroPhoto?.paintsGround === false) return "none";
|
|
1775
|
+
return background.kind !== "base" && background.background.type === "image" && background.background.image !== void 0 ? "behind-text" : "none";
|
|
1776
|
+
}
|
|
1777
|
+
function resolveSectionForeground(background, palette) {
|
|
1778
|
+
return resolveSurfaceForeground(sectionForegroundBackground(background, palette), palette, {}, { compositeBase: "background" });
|
|
1779
|
+
}
|
|
1780
|
+
/** Planner-only field, carried by render content rather than persisted owner content. */
|
|
1781
|
+
function sectionDecisionFromContent(content) {
|
|
1782
|
+
const value = content?._sectionDecision;
|
|
1783
|
+
return typeof value === "object" && value !== null && "certifiedBackdrop" in value && "inks" in value ? value : null;
|
|
1784
|
+
}
|
|
1785
|
+
/** Legacy detached photos keep already-legible authored ink and its exact CSS treatment. */
|
|
1786
|
+
function sectionForegroundBackground(resolved, palette) {
|
|
1787
|
+
if (resolved.kind === "base") return null;
|
|
1788
|
+
if (resolved.kind !== "content-media") return resolved.background;
|
|
1789
|
+
const original = resolveSurfaceForeground(resolved.background, palette);
|
|
1790
|
+
const measured = resolveSurfaceForeground(resolved.ground, palette);
|
|
1791
|
+
if (original.kind !== "known" || measured.kind !== "known") return resolved.background;
|
|
1792
|
+
return [
|
|
1793
|
+
"text",
|
|
1794
|
+
"heading",
|
|
1795
|
+
"link",
|
|
1796
|
+
"supporting"
|
|
1797
|
+
].every((role) => original.roles[role] === measured.roles[role]) ? resolved.background : resolved.ground;
|
|
1798
|
+
}
|
|
1799
|
+
function mergeLookForegroundWithAuthoredMedia(lookDefault, authored) {
|
|
1800
|
+
const paintsBand = lookDefault.type === "color" || lookDefault.type === "gradient";
|
|
1801
|
+
const lookScrim = paintsBand ? lookDefault.mediaScrim : void 0;
|
|
1802
|
+
if (paintsBand && !lookScrim) return authored;
|
|
1803
|
+
const merged = runtimeBoxBackgroundSchema.safeParse({
|
|
1804
|
+
...lookDefault,
|
|
1805
|
+
type: authored.type,
|
|
1806
|
+
image: authored.image,
|
|
1807
|
+
objectFit: authored.objectFit,
|
|
1808
|
+
scale: authored.scale,
|
|
1809
|
+
position: authored.position,
|
|
1810
|
+
...lookScrim ? { overlay: lookScrim } : {}
|
|
1811
|
+
});
|
|
1812
|
+
return merged.success ? merged.data : authored;
|
|
1813
|
+
}
|
|
1814
|
+
function readRecord(value) {
|
|
1815
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
1816
|
+
}
|
|
1817
|
+
function heroPhotoIsContent(source, photo, hasArrangementGround) {
|
|
1818
|
+
return photo !== void 0 && !photo.paintsGround && source.kind === "block-authored" && source.background.type === "image" && (hasArrangementGround || !source.background.overlay);
|
|
1819
|
+
}
|
|
1820
|
+
function isAuthoredMedia(source) {
|
|
1821
|
+
return source.kind === "block-authored" && (source.background.type === "image" || source.background.type === "video");
|
|
1822
|
+
}
|
|
1823
|
+
function rhythmBackground(background) {
|
|
1824
|
+
return background ? {
|
|
1825
|
+
kind: "rhythm",
|
|
1826
|
+
background
|
|
1827
|
+
} : { kind: "base" };
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Semantic section grounds: background/base -> light; muted/surface bands ->
|
|
1831
|
+
* band; primary/secondary/accent (including pop) -> brand; text/inverse and
|
|
1832
|
+
* numbered deep shades -> deep. Media and gradients use the existing resolved
|
|
1833
|
+
* scrim foreground/tone contract: light ink over a dark veil -> deep, dark ink
|
|
1834
|
+
* over a light veil -> light. Unclassified/no veil defaults to light.
|
|
1835
|
+
* Background ownership (override, authored, Look or rhythm) never changes tone.
|
|
1836
|
+
*/
|
|
1837
|
+
const solidGrounds = {
|
|
1838
|
+
background: "light",
|
|
1839
|
+
muted: "band",
|
|
1840
|
+
surface: "band",
|
|
1841
|
+
surfaceAlt: "band",
|
|
1842
|
+
primary: "brand",
|
|
1843
|
+
secondary: "brand",
|
|
1844
|
+
accent: "brand",
|
|
1845
|
+
text: "deep"
|
|
1846
|
+
};
|
|
1847
|
+
function deriveSectionGround(resolved, palette) {
|
|
1848
|
+
if (resolved.kind === "base") return "light";
|
|
1849
|
+
const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
|
|
1850
|
+
const solid = solidSectionGround(background);
|
|
1851
|
+
if (solid) return solid;
|
|
1852
|
+
return (scrimTone(sectionScrimSamples(background, palette)) ?? sectionForegroundTone(resolved, palette)) === "dark" ? "deep" : "light";
|
|
1853
|
+
}
|
|
1854
|
+
function solidSectionGround(background) {
|
|
1855
|
+
if (background.type !== "color") return null;
|
|
1856
|
+
return solidTokenGround(background.color ?? "background");
|
|
1857
|
+
}
|
|
1858
|
+
/** Shared classification for section backgrounds and resolved parent surfaces. */
|
|
1859
|
+
function solidTokenGround(color) {
|
|
1860
|
+
return solidGrounds[color] ?? (/-(?:[7-9]00|950)$/.test(color) ? "deep" : null);
|
|
1861
|
+
}
|
|
1862
|
+
function sectionForegroundTone(resolved, palette) {
|
|
1863
|
+
const foreground = resolveSectionForeground(resolved, palette);
|
|
1864
|
+
return foreground.kind === "known" ? surfaceToneFromForegroundToken(palette, foreground.roles.text) : "unknown";
|
|
1865
|
+
}
|
|
1866
|
+
function sectionVeil(background) {
|
|
1867
|
+
switch (background.type) {
|
|
1868
|
+
case "color": return null;
|
|
1869
|
+
case "image":
|
|
1870
|
+
case "video": return background.overlay;
|
|
1871
|
+
case "gradient": return {
|
|
1872
|
+
type: "gradient",
|
|
1873
|
+
gradient: background.gradient,
|
|
1874
|
+
opacity: 1
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
function sectionScrimSamples(background, palette) {
|
|
1879
|
+
const overlay = sectionVeil(background);
|
|
1880
|
+
if (overlay?.type === "gradient") return gradientScrimSamples(overlay.gradient ?? "", overlay.opacity ?? 1, palette);
|
|
1881
|
+
if (overlay?.type !== "color") return [];
|
|
1882
|
+
const hex = resolveConcreteColorHex(overlay.color ?? "", palette);
|
|
1883
|
+
return hex ? [{
|
|
1884
|
+
hex,
|
|
1885
|
+
alpha: overlay.opacity ?? 1
|
|
1886
|
+
}] : [];
|
|
1887
|
+
}
|
|
1888
|
+
//#endregion
|
|
1834
1889
|
//#region ../theme-core/src/site-styles/previewRuntimeCapabilities.ts
|
|
1835
1890
|
function rendererCapabilitiesByBlockKind(blocks) {
|
|
1836
1891
|
return new Map(blocks.map((block) => [block.blockKind, {
|
|
@@ -1950,9 +2005,9 @@ function pageFlowDefaultBoundary(pageFlowPresetId) {
|
|
|
1950
2005
|
*/
|
|
1951
2006
|
function resolveJoinTreatment(input) {
|
|
1952
2007
|
const boundaryId = makeBoundaryId(input.previousBlockId, input.nextBlockId);
|
|
1953
|
-
const selection = selectCandidate(input.candidates);
|
|
2008
|
+
const selection = selectCandidate(input.candidates, siteStyleEdges(input.siteStyleId));
|
|
1954
2009
|
const selectedOutcome = selection.kind === "selected" ? selection.outcome : { kind: "none" };
|
|
1955
|
-
const pin = pinStatus(input.candidates, selectedOutcome);
|
|
2010
|
+
const pin = pinStatus(input.candidates, selectedOutcome, siteStyleEdges(input.siteStyleId));
|
|
1956
2011
|
const issues = pin.kind === "unsupported" ? [{
|
|
1957
2012
|
kind: "pinned-boundary-option-unavailable",
|
|
1958
2013
|
boundaryId,
|
|
@@ -1978,44 +2033,67 @@ function resolveJoinTreatment(input) {
|
|
|
1978
2033
|
previousBlockId: input.previousBlockId,
|
|
1979
2034
|
nextBlockId: input.nextBlockId,
|
|
1980
2035
|
treatment: selection.outcome.treatment,
|
|
2036
|
+
edge: selection.outcome.edge,
|
|
1981
2037
|
source: selection.candidate.source
|
|
1982
2038
|
},
|
|
1983
2039
|
pin,
|
|
1984
2040
|
issues
|
|
1985
2041
|
};
|
|
1986
2042
|
}
|
|
1987
|
-
function pinStatus(candidates, selectedOutcome) {
|
|
2043
|
+
function pinStatus(candidates, selectedOutcome, edges) {
|
|
1988
2044
|
const pinned = candidates.find((candidate) => candidate.source.kind === "user-pinned");
|
|
1989
2045
|
if (!pinned) return { kind: "none" };
|
|
1990
|
-
return candidateOutcome(pinned.treatment).kind === "unsupported" ? {
|
|
2046
|
+
return candidateOutcome(pinned.treatment, edges).kind === "unsupported" ? {
|
|
1991
2047
|
kind: "unsupported",
|
|
1992
2048
|
optionId: fallbackOptionId(selectedOutcome)
|
|
1993
2049
|
} : { kind: "supported" };
|
|
1994
2050
|
}
|
|
1995
|
-
function selectCandidate(candidates) {
|
|
1996
|
-
|
|
1997
|
-
const outcome = candidateOutcome(candidate.treatment);
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
return { kind: "
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2051
|
+
function selectCandidate(candidates, edges) {
|
|
2052
|
+
return candidates.map((candidate) => {
|
|
2053
|
+
const outcome = candidateOutcome(candidate.treatment, edges);
|
|
2054
|
+
return outcome.kind === "unsupported" ? null : {
|
|
2055
|
+
kind: "selected",
|
|
2056
|
+
candidate,
|
|
2057
|
+
outcome
|
|
2058
|
+
};
|
|
2059
|
+
}).find((selection) => selection !== null) ?? { kind: "exhausted" };
|
|
2060
|
+
}
|
|
2061
|
+
/** Every read, write and import uses this admission decision; geometry lookup never grants support. */
|
|
2062
|
+
function candidateOutcome(treatment, edges) {
|
|
2063
|
+
if (treatment.family === "none") return treatment.layers === 1 && treatment.variant === void 0 && treatment.colourPreset === "fade" ? { kind: "none" } : { kind: "unsupported" };
|
|
2064
|
+
const entry = resolveStyleEdgeOption(treatment, edges);
|
|
2065
|
+
if (!entry) return { kind: "unsupported" };
|
|
2066
|
+
const minimum = edges.supported.find((support) => support.family === treatment.family)?.minLayers ?? 1;
|
|
2067
|
+
const edge = {
|
|
2068
|
+
...treatment,
|
|
2069
|
+
variant: entry.treatment.variant,
|
|
2070
|
+
layers: treatment.layers < minimum ? minimum : treatment.layers
|
|
2071
|
+
};
|
|
2072
|
+
const intent = transitionIntentForTreatment(edge);
|
|
2014
2073
|
return intent ? {
|
|
2015
2074
|
kind: "decorative",
|
|
2016
|
-
treatment: intent
|
|
2075
|
+
treatment: intent,
|
|
2076
|
+
edge
|
|
2017
2077
|
} : { kind: "unsupported" };
|
|
2018
2078
|
}
|
|
2079
|
+
/** Resolve the variant within the style's offer, rather than assuming the catalogue default is offered. */
|
|
2080
|
+
function resolveStyleEdgeOption(treatment, edges) {
|
|
2081
|
+
const support = edges.supported.find((entry) => entry.family === treatment.family);
|
|
2082
|
+
if (!support || treatment.layers > support.maxLayers || !support.colourPresets.includes(treatment.colourPreset)) return null;
|
|
2083
|
+
const entry = boundaryOptionForTreatment({
|
|
2084
|
+
...treatment,
|
|
2085
|
+
variant: treatment.variant ?? support.variants?.[0]
|
|
2086
|
+
});
|
|
2087
|
+
if (!entry) return null;
|
|
2088
|
+
return support.variants && !support.variants.includes(entry.treatment.variant ?? "") ? null : entry;
|
|
2089
|
+
}
|
|
2090
|
+
function siteStyleEdges(siteStyleId) {
|
|
2091
|
+
return getCuratedSiteStyle(siteStyleId)?.looks.edges ?? existingStyleEdges;
|
|
2092
|
+
}
|
|
2093
|
+
function boundaryOptionsForStyle(siteStyleId) {
|
|
2094
|
+
const edges = siteStyleEdges(siteStyleId);
|
|
2095
|
+
return boundaryOptions.filter((option) => candidateOutcome(option.treatment, edges).kind !== "unsupported");
|
|
2096
|
+
}
|
|
2019
2097
|
/**
|
|
2020
2098
|
* Unavailable structured treatments use the selected catalogue option in the editor issue.
|
|
2021
2099
|
*/
|
|
@@ -2028,7 +2106,7 @@ function fallbackOptionId(outcome) {
|
|
|
2028
2106
|
}
|
|
2029
2107
|
function requiresPhoto(option) {
|
|
2030
2108
|
const treatment = boundaryTreatmentForBoundaryOptionId(option);
|
|
2031
|
-
return treatment?.
|
|
2109
|
+
return treatment?.family === "wave" && treatment.variant === "echo";
|
|
2032
2110
|
}
|
|
2033
2111
|
/**
|
|
2034
2112
|
* A rule claims blocks on its side before later rules on that side count their first occurrence.
|
|
@@ -2054,10 +2132,6 @@ function pageRuleOptions(rules, blocks) {
|
|
|
2054
2132
|
options: /* @__PURE__ */ new Map()
|
|
2055
2133
|
}).options;
|
|
2056
2134
|
}
|
|
2057
|
-
/** Section facts are read only by style rules; a style without rules needs none resolved. */
|
|
2058
|
-
function siteStyleHasJoinRules(siteStyleId) {
|
|
2059
|
-
return (getCuratedSiteStyle(siteStyleId)?.looks.joinRules?.length ?? 0) > 0;
|
|
2060
|
-
}
|
|
2061
2135
|
/** The page-wide owner of style rules, automatic defaults and owner pins. */
|
|
2062
2136
|
function resolvePageJoins(input) {
|
|
2063
2137
|
const looks = getCuratedSiteStyle(input.siteStyleId)?.looks;
|
|
@@ -2074,6 +2148,7 @@ function resolvePageJoins(input) {
|
|
|
2074
2148
|
treatment: requireDefaultBoundaryTreatment(option)
|
|
2075
2149
|
}] : [], pageFlowDefaultJoinCandidate(input.pageFlowPresetId)];
|
|
2076
2150
|
const ids = {
|
|
2151
|
+
siteStyleId: input.siteStyleId,
|
|
2077
2152
|
previousBlockId: previous.blockId,
|
|
2078
2153
|
nextBlockId: next.blockId
|
|
2079
2154
|
};
|
|
@@ -2095,7 +2170,47 @@ function resolvePageJoins(input) {
|
|
|
2095
2170
|
resolution,
|
|
2096
2171
|
pin
|
|
2097
2172
|
}];
|
|
2098
|
-
})
|
|
2173
|
+
}).reduce((resolved, decision, index) => {
|
|
2174
|
+
const previous = input.blocks[index];
|
|
2175
|
+
const next = input.blocks[index + 1];
|
|
2176
|
+
const last = resolved.reduceRight((found, item) => found ?? item.resolution.join, null);
|
|
2177
|
+
return [...resolved, {
|
|
2178
|
+
...decision,
|
|
2179
|
+
automatic: applyPageJoinRules(decision.automatic, last, previous, next, input.siteStyleId),
|
|
2180
|
+
resolution: applyPageJoinRules(decision.resolution, last, previous, next, input.siteStyleId)
|
|
2181
|
+
}];
|
|
2182
|
+
}, []);
|
|
2183
|
+
}
|
|
2184
|
+
/** Missing names are detached/legacy facts, not evidence that two backgrounds are the same. */
|
|
2185
|
+
function applyPageJoinRules(resolution, last, previous, next, siteStyleId) {
|
|
2186
|
+
const join = resolution.join;
|
|
2187
|
+
if (!join || resolution.selectedSource?.kind === "user-pinned") return resolution;
|
|
2188
|
+
if (samePaintedGround(previous, next)) return {
|
|
2189
|
+
...resolution,
|
|
2190
|
+
join: null
|
|
2191
|
+
};
|
|
2192
|
+
if (!last || !sectionBoundaryTreatmentsEqual(last.edge, join.edge)) return resolution;
|
|
2193
|
+
return {
|
|
2194
|
+
...resolution,
|
|
2195
|
+
join: nextFamilyJoin(join, siteStyleId)
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
function samePaintedGround(previous, next) {
|
|
2199
|
+
return previous?.paint === "paint" && next?.paint === "paint" && previous.groundName !== void 0 && previous.groundName === next.groundName;
|
|
2200
|
+
}
|
|
2201
|
+
/** The replacement keeps the original choice source but uses the next offered family, or a plain cut. */
|
|
2202
|
+
function nextFamilyJoin(join, siteStyleId) {
|
|
2203
|
+
const families = siteStyleEdges(siteStyleId).supported.map((support) => support.family);
|
|
2204
|
+
const current = families.findIndex((family) => family === join.edge.family);
|
|
2205
|
+
const nextFamilies = [...families.slice(current + 1), ...families.slice(0, current)];
|
|
2206
|
+
const options = boundaryOptionsForStyle(siteStyleId);
|
|
2207
|
+
const alternative = nextFamilies.flatMap((family) => options.filter((option) => option.treatment.family === family)).at(0);
|
|
2208
|
+
const outcome = alternative ? candidateOutcome(alternative.treatment, siteStyleEdges(siteStyleId)) : null;
|
|
2209
|
+
return outcome?.kind === "decorative" ? {
|
|
2210
|
+
...join,
|
|
2211
|
+
treatment: outcome.treatment,
|
|
2212
|
+
edge: outcome.edge
|
|
2213
|
+
} : null;
|
|
2099
2214
|
}
|
|
2100
2215
|
/** The last-resort page-design default, also the source of a fully unsupported join. */
|
|
2101
2216
|
function pageFlowDefaultJoinCandidate(pageFlowPresetId) {
|
|
@@ -2165,18 +2280,23 @@ function compileEditorModelRuntime(input) {
|
|
|
2165
2280
|
}
|
|
2166
2281
|
/** The editor boundary's effective break as an intent-only join; none for no break. */
|
|
2167
2282
|
function runtimeJoinForEditorBoundary(boundary) {
|
|
2168
|
-
const treatment = boundary.availableBreaks.find((candidate) => candidate.id === boundary.breakChoice.effectiveValue)?.
|
|
2283
|
+
const treatment = boundary.availableBreaks.find((candidate) => candidate.id === boundary.breakChoice.effectiveValue)?.intent;
|
|
2169
2284
|
return treatment && isDecorativeTransitionIntent(treatment) ? [{
|
|
2170
2285
|
previousBlockId: boundary.previousBlockId,
|
|
2171
2286
|
nextBlockId: boundary.nextBlockId,
|
|
2172
|
-
treatment
|
|
2287
|
+
treatment,
|
|
2288
|
+
...boundary.effectiveEdge ? { edge: boundary.effectiveEdge } : {}
|
|
2173
2289
|
}] : [];
|
|
2174
2290
|
}
|
|
2175
2291
|
function applyCompiledRuntimeFieldsToContent(content, fields) {
|
|
2176
2292
|
const runtimeFields = fields ? preserveContentOwnedBackgroundFields(content, preserveArrangementSectionSpacing(content, fields)) : fields;
|
|
2177
2293
|
return {
|
|
2178
2294
|
...stripCompiledRuntimeStyleFields(content),
|
|
2179
|
-
...runtimeFields
|
|
2295
|
+
...runtimeFields,
|
|
2296
|
+
...runtimeFields?._sectionStyles ? { _sectionStyles: {
|
|
2297
|
+
...sectionOwnerStyleChoices(content),
|
|
2298
|
+
...runtimeFields._sectionStyles
|
|
2299
|
+
} } : {}
|
|
2180
2300
|
};
|
|
2181
2301
|
}
|
|
2182
2302
|
/**
|
|
@@ -2260,7 +2380,7 @@ function resolveEditorArrangementLook(selection, mode, pin) {
|
|
|
2260
2380
|
//#region ../theme-core/src/site-styles/pageJoinFacts.ts
|
|
2261
2381
|
/** Compile fields, then project the render planner's decisions in authored order. No paint decisions live here. */
|
|
2262
2382
|
function withPageJoinFacts(model, resolution) {
|
|
2263
|
-
if (resolution === null
|
|
2383
|
+
if (resolution === null) return model.blocks;
|
|
2264
2384
|
const compiled = compileEditorModelRuntime({
|
|
2265
2385
|
editorModel: model,
|
|
2266
2386
|
...resolution
|
|
@@ -2391,41 +2511,164 @@ function resolveArrangementContentLook(runtime, mode, content, audience) {
|
|
|
2391
2511
|
});
|
|
2392
2512
|
return runtime.available.find((entry) => entry.look.id === published.id) ?? selected;
|
|
2393
2513
|
}
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2514
|
+
function resolveRuntimeSection(rawInput) {
|
|
2515
|
+
const input = {
|
|
2516
|
+
...rawInput,
|
|
2517
|
+
choices: sectionOwnerStyleChoices(rawInput.content)
|
|
2518
|
+
};
|
|
2519
|
+
const automatic = automaticSectionGround(input);
|
|
2520
|
+
const authored = input.placement === "column" ? { kind: "none" } : parseCanonicalRuntimeBackground(input.content);
|
|
2521
|
+
const photo = arrangementHeroGround(input);
|
|
2522
|
+
const ownerGround = ownerSectionGround(input, authored);
|
|
2523
|
+
const background = resolveSectionBackground(ownerGroundSource(authored, namedOwnerGround(input), input, photo), null, input.runtime && input.look ? automatic?.paint ?? null : void 0, photo);
|
|
2524
|
+
return sectionDecision(background, resolvedNamedGround(background, ownerGround, automatic, input.runtime), automatic, input, photo);
|
|
2525
|
+
}
|
|
2526
|
+
function automaticSectionGround(input) {
|
|
2527
|
+
if (!input.runtime || !input.look || input.placement === "column") return void 0;
|
|
2528
|
+
const span = input.rhythmSpan;
|
|
2529
|
+
const index = input.runtime.progression === "deepen" ? span && span.count > 1 ? Math.round(span.position * (input.runtime.rhythm.length - 1) / (span.count - 1)) : 0 : input.position % input.runtime.rhythm.length;
|
|
2530
|
+
return input.look.sectionGround ?? input.runtime.rhythm[index];
|
|
2531
|
+
}
|
|
2532
|
+
/**
|
|
2533
|
+
* A stored name is authoritative, including when two grounds share the same paint. `ground: null`
|
|
2534
|
+
* records a plain palette colour. Content saved before names existed (`ground` absent) keeps the
|
|
2535
|
+
* identity its colour has always given it, so rendering doesn't change before the data migration.
|
|
2536
|
+
*/
|
|
2537
|
+
function ownerSectionGround(input, source) {
|
|
2538
|
+
if (input.choices.ground !== void 0) return namedOwnerGround(input);
|
|
2539
|
+
if (input.placement === "column" || source.kind === "none" || source.background.type !== "color" || !input.runtime) return void 0;
|
|
2540
|
+
const colour = source.background.color;
|
|
2541
|
+
return input.runtime.grounds.find((candidate) => candidate.paint.color === colour);
|
|
2542
|
+
}
|
|
2543
|
+
function namedOwnerGround(input) {
|
|
2544
|
+
if (input.placement === "column") return void 0;
|
|
2545
|
+
const choice = input.choices.ground;
|
|
2546
|
+
return choice ? input.runtime?.grounds.find((ground) => ground.name === choice.name) : void 0;
|
|
2547
|
+
}
|
|
2548
|
+
function ownerGroundSource(source, ground, input, photo) {
|
|
2549
|
+
const photoBehind = photo?.paintsGround !== false;
|
|
2550
|
+
if (source.kind !== "none" && source.background.type === "image" && photoBehind) return source;
|
|
2551
|
+
if (ground) return {
|
|
2552
|
+
kind: "page-design-override",
|
|
2553
|
+
background: namedGroundPaint(ground, authoredInks(source))
|
|
2554
|
+
};
|
|
2555
|
+
if (input.choices.ground && !hasPaletteFallback(source, input.palette)) return { kind: "none" };
|
|
2556
|
+
return paletteColourSource(source, input.runtime);
|
|
2557
|
+
}
|
|
2558
|
+
/** Owner-set inks replace the ground's inks wholesale, exactly as an unnamed matching colour always has. */
|
|
2559
|
+
function namedGroundPaint(ground, inks) {
|
|
2560
|
+
return Object.keys(inks).length === 0 ? ground.paint : {
|
|
2561
|
+
type: "color",
|
|
2562
|
+
color: ground.paint.color,
|
|
2563
|
+
...inks
|
|
2404
2564
|
};
|
|
2405
2565
|
}
|
|
2406
|
-
/**
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
* An owner who set any ink keeps all their own; any other colour keeps the generic contrast resolution.
|
|
2410
|
-
*/
|
|
2411
|
-
function withStyleGroundInks(source, runtime) {
|
|
2412
|
-
if (source.kind === "none" || !runtime || source.background.type !== "color" || !source.background.color) return source;
|
|
2566
|
+
/** Inks the owner set explicitly survive naming the ground, as they did before names existed. */
|
|
2567
|
+
function authoredInks(source) {
|
|
2568
|
+
if (source.kind === "none" || source.background.type !== "color") return {};
|
|
2413
2569
|
const { textColor, headingColor, linkColor, supportingColor } = source.background;
|
|
2570
|
+
return {
|
|
2571
|
+
...textColor ? { textColor } : {},
|
|
2572
|
+
...headingColor ? { headingColor } : {},
|
|
2573
|
+
...linkColor ? { linkColor } : {},
|
|
2574
|
+
...supportingColor ? { supportingColor } : {}
|
|
2575
|
+
};
|
|
2576
|
+
}
|
|
2577
|
+
function hasPaletteFallback(source, palette) {
|
|
2578
|
+
return source.kind !== "none" && source.background.type === "color" && !!source.background.color && !!palette[source.background.color];
|
|
2579
|
+
}
|
|
2580
|
+
/** Authored palette colours retain the style's established inks; identity comes from `ownerSectionGround`. */
|
|
2581
|
+
function paletteColourSource(source, runtime) {
|
|
2582
|
+
if (source.kind === "none" || source.background.type !== "color") return source;
|
|
2414
2583
|
if ([
|
|
2415
|
-
textColor,
|
|
2416
|
-
headingColor,
|
|
2417
|
-
linkColor,
|
|
2418
|
-
supportingColor
|
|
2584
|
+
source.background.textColor,
|
|
2585
|
+
source.background.headingColor,
|
|
2586
|
+
source.background.linkColor,
|
|
2587
|
+
source.background.supportingColor
|
|
2419
2588
|
].some((ink) => ink !== void 0)) return source;
|
|
2420
|
-
const
|
|
2421
|
-
|
|
2589
|
+
const colour = source.background.color;
|
|
2590
|
+
const paint = runtime?.grounds.find((ground) => ground.paint.color === colour)?.paint;
|
|
2591
|
+
return paint ? {
|
|
2422
2592
|
...source,
|
|
2423
2593
|
background: {
|
|
2424
|
-
...
|
|
2594
|
+
...paint,
|
|
2425
2595
|
...source.background
|
|
2426
2596
|
}
|
|
2427
2597
|
} : source;
|
|
2428
2598
|
}
|
|
2599
|
+
function arrangementHeroGround(input) {
|
|
2600
|
+
return input.blockKind === "block.hero" ? { paintsGround: heroPhotoPaintsGround(input.arrangementKey) } : void 0;
|
|
2601
|
+
}
|
|
2602
|
+
function resolvedNamedGround(background, owner, automatic, runtime) {
|
|
2603
|
+
switch (background.kind) {
|
|
2604
|
+
case "base": return runtime?.grounds.find((ground) => ground.name === "base");
|
|
2605
|
+
case "rhythm": return automatic;
|
|
2606
|
+
case "override":
|
|
2607
|
+
case "authored-colour": return background.background.type === "color" ? owner : void 0;
|
|
2608
|
+
case "authored-media":
|
|
2609
|
+
case "content-media":
|
|
2610
|
+
case "look-surface": return;
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
function sectionDecision(background, named, automatic, input, photo) {
|
|
2614
|
+
const identity = named ? {
|
|
2615
|
+
groundName: named.name,
|
|
2616
|
+
ground: named.ground
|
|
2617
|
+
} : { ground: deriveSectionGround(background, input.palette) };
|
|
2618
|
+
const finished = finishedSectionPaint(background, named, input);
|
|
2619
|
+
return {
|
|
2620
|
+
source: sectionSource(background, named, input.look),
|
|
2621
|
+
...identity,
|
|
2622
|
+
paint: sectionBackgroundPaint(background),
|
|
2623
|
+
paintKind: sectionPaint(background),
|
|
2624
|
+
inks: finished?.kind === "certified" ? finished.foreground : resolveSectionForeground(background, input.palette),
|
|
2625
|
+
foregroundBackground: finishedForegroundPaint(background, finished, input.palette),
|
|
2626
|
+
certifiedBackdrop: finished?.kind === "certified" ? {
|
|
2627
|
+
kind: "measured",
|
|
2628
|
+
token: finished.finish.paint.base,
|
|
2629
|
+
samples: finished.finish.samples
|
|
2630
|
+
} : certifiedSectionBackdrop(background, input.palette),
|
|
2631
|
+
background,
|
|
2632
|
+
...sectionFinishFacts(background, finished),
|
|
2633
|
+
shape: input.runtime ? sectionShapeForGround(input.runtime.surfaces, named?.name) : "edge-to-edge",
|
|
2634
|
+
surfaceToken: sectionGroundToken(background),
|
|
2635
|
+
...sectionEditorFacts(automatic, input),
|
|
2636
|
+
openingPhotoBehindText: resolveSectionPhotoPlacement(background, photo) === "behind-text",
|
|
2637
|
+
placement: input.placement
|
|
2638
|
+
};
|
|
2639
|
+
}
|
|
2640
|
+
function sectionEditorFacts(automatic, input) {
|
|
2641
|
+
return {
|
|
2642
|
+
...input.runtime ? { styleGroundName: automatic?.name ?? "base" } : {},
|
|
2643
|
+
ownerGroundFallback: input.choices.ground != null && !namedOwnerGround(input)
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2646
|
+
function sectionSource(background, named, look) {
|
|
2647
|
+
switch (background.kind) {
|
|
2648
|
+
case "base": return "base";
|
|
2649
|
+
case "rhythm": return look?.sectionGround ? "offer" : "rhythm";
|
|
2650
|
+
case "look-surface": return "offer";
|
|
2651
|
+
case "authored-media": return "owner-photo";
|
|
2652
|
+
case "authored-colour":
|
|
2653
|
+
case "content-media":
|
|
2654
|
+
case "override": return ownerSectionSource(background.background, named);
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
function ownerSectionSource(background, named) {
|
|
2658
|
+
if (background.type === "image" || background.type === "video") return "owner-photo";
|
|
2659
|
+
return named ? "owner-ground" : "owner-colour";
|
|
2660
|
+
}
|
|
2661
|
+
function sectionBackgroundPaint(background) {
|
|
2662
|
+
switch (background.kind) {
|
|
2663
|
+
case "base": return null;
|
|
2664
|
+
case "content-media": return background.ground;
|
|
2665
|
+
case "authored-colour":
|
|
2666
|
+
case "authored-media":
|
|
2667
|
+
case "look-surface":
|
|
2668
|
+
case "override":
|
|
2669
|
+
case "rhythm": return background.background;
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2429
2672
|
function sectionPaint(resolved) {
|
|
2430
2673
|
if (resolved.kind === "base" || resolved.kind === "content-media") return "paint";
|
|
2431
2674
|
const background = resolved.background;
|
|
@@ -2441,6 +2684,70 @@ function sectionGroundToken(resolved) {
|
|
|
2441
2684
|
case "gradient": return "gradient";
|
|
2442
2685
|
}
|
|
2443
2686
|
}
|
|
2687
|
+
/** Content media sits beside the text, so its slots sit on the colour ground, as deriveSectionGround reads it. */
|
|
2688
|
+
function certifiedSectionBackdrop(resolved, palette) {
|
|
2689
|
+
if (resolved.kind === "base") return {
|
|
2690
|
+
kind: "measured",
|
|
2691
|
+
token: "background"
|
|
2692
|
+
};
|
|
2693
|
+
const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
|
|
2694
|
+
switch (background.type) {
|
|
2695
|
+
case "image":
|
|
2696
|
+
case "video": return {
|
|
2697
|
+
kind: "unmeasured",
|
|
2698
|
+
paint: "media"
|
|
2699
|
+
};
|
|
2700
|
+
case "gradient": return {
|
|
2701
|
+
kind: "unmeasured",
|
|
2702
|
+
paint: "gradient"
|
|
2703
|
+
};
|
|
2704
|
+
case "color": {
|
|
2705
|
+
const colour = background.color ?? "background";
|
|
2706
|
+
return resolveConcreteColorHex(colour, palette) ? {
|
|
2707
|
+
kind: "measured",
|
|
2708
|
+
token: colour
|
|
2709
|
+
} : {
|
|
2710
|
+
kind: "unmeasured",
|
|
2711
|
+
paint: "colour"
|
|
2712
|
+
};
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
function finishedSectionPaint(background, named, input) {
|
|
2717
|
+
if (!input.runtime?.finishes || input.placement === "column" || sectionPaint(background) !== "paint") return void 0;
|
|
2718
|
+
const choices = input.choices.treatment;
|
|
2719
|
+
const paint = resolveSectionTreatment({
|
|
2720
|
+
base: sectionGroundToken(background),
|
|
2721
|
+
...named?.groundPaint
|
|
2722
|
+
}, choices, input.runtime.finishes);
|
|
2723
|
+
if (!paint.texture && !paint.tone) return void 0;
|
|
2724
|
+
const finish = resolveGroundPaint(paint, input.runtime.finishes, input.palette);
|
|
2725
|
+
return finish ? certifyFinishedGround(finish, resolveSectionForeground(background, input.palette), input.runtime.surfaceContext) : {
|
|
2726
|
+
kind: "dropped",
|
|
2727
|
+
reason: "unmeasurable-finish"
|
|
2728
|
+
};
|
|
2729
|
+
}
|
|
2730
|
+
function sectionFinishFacts(background, finished) {
|
|
2731
|
+
if (finished?.kind === "certified") return {
|
|
2732
|
+
topPaint: finished.finish.topPaint,
|
|
2733
|
+
footPaint: finished.finish.footPaint,
|
|
2734
|
+
finishedPaint: finished.finish
|
|
2735
|
+
};
|
|
2736
|
+
const paint = sectionBackgroundPaint(background);
|
|
2737
|
+
const colour = sectionPaint(background) === "paint" ? paint?.type === "color" ? paint.color ?? "background" : "background" : null;
|
|
2738
|
+
return {
|
|
2739
|
+
topPaint: colour,
|
|
2740
|
+
footPaint: colour,
|
|
2741
|
+
...finished ? { finishDropped: finished.reason } : {}
|
|
2742
|
+
};
|
|
2743
|
+
}
|
|
2744
|
+
/** Even an automatically inherited base becomes an explicit measurable paint when finished. */
|
|
2745
|
+
function finishedForegroundPaint(background, finished, palette) {
|
|
2746
|
+
return finished?.kind === "certified" ? {
|
|
2747
|
+
type: "color",
|
|
2748
|
+
color: finished.finish.paint.base
|
|
2749
|
+
} : sectionForegroundBackground(background, palette);
|
|
2750
|
+
}
|
|
2444
2751
|
//#endregion
|
|
2445
2752
|
//#region ../theme-core/src/site-styles/pageDesignEditorOptions.ts
|
|
2446
2753
|
function isRecipeLookOption(option) {
|
|
@@ -2504,6 +2811,43 @@ function editorEffectiveLayout(input) {
|
|
|
2504
2811
|
});
|
|
2505
2812
|
}
|
|
2506
2813
|
//#endregion
|
|
2814
|
+
//#region ../theme-core/src/site-styles/sectionBreakOffer.ts
|
|
2815
|
+
const noneFamilyOffer = {
|
|
2816
|
+
family: "none",
|
|
2817
|
+
label: "None",
|
|
2818
|
+
variants: [],
|
|
2819
|
+
layers: [1],
|
|
2820
|
+
colourPresets: ["fade"]
|
|
2821
|
+
};
|
|
2822
|
+
/** The families offered, in catalogue order, from the style's admitted breaks and its edge support. */
|
|
2823
|
+
function sectionBreakOffer(availableBreaks, edges) {
|
|
2824
|
+
const offered = new Set(availableBreaks.map((option) => option.id));
|
|
2825
|
+
return sectionTransitionFamilies.flatMap((family) => {
|
|
2826
|
+
const variants = family.variants.filter((variant) => offered.has(variant.boundaryOption.id));
|
|
2827
|
+
if (variants.length === 0) return [];
|
|
2828
|
+
if (family.id === "none") return [noneFamilyOffer];
|
|
2829
|
+
const support = edges.supported.find((entry) => entry.family === family.id);
|
|
2830
|
+
if (!support) return [];
|
|
2831
|
+
return [{
|
|
2832
|
+
family: family.id,
|
|
2833
|
+
label: family.label,
|
|
2834
|
+
variants: variants.map((variant) => ({
|
|
2835
|
+
variant: variant.boundaryOption.treatment.variant ?? variant.variantId,
|
|
2836
|
+
label: variant.label
|
|
2837
|
+
})),
|
|
2838
|
+
layers: layerRange(support.minLayers ?? 1, support.maxLayers),
|
|
2839
|
+
colourPresets: requireNonEmptyReadonlyArray(support.colourPresets, `Edge support for ${family.id} offers no colours.`)
|
|
2840
|
+
}];
|
|
2841
|
+
});
|
|
2842
|
+
}
|
|
2843
|
+
function layerRange(minimum, maximum) {
|
|
2844
|
+
return requireNonEmptyReadonlyArray([
|
|
2845
|
+
1,
|
|
2846
|
+
2,
|
|
2847
|
+
3
|
|
2848
|
+
].filter((layers) => layers >= minimum && layers <= maximum), `Edge support allows no layers between ${minimum} and ${maximum}.`);
|
|
2849
|
+
}
|
|
2850
|
+
//#endregion
|
|
2507
2851
|
//#region ../theme-core/src/site-styles/pageDesignEditorBoundaries.ts
|
|
2508
2852
|
function buildBoundaryReadModels(input) {
|
|
2509
2853
|
return boundaryReadModels({
|
|
@@ -2519,6 +2863,7 @@ function boundaryPinIssues(input) {
|
|
|
2519
2863
|
if (!next) return [];
|
|
2520
2864
|
const choice = resolvePageDesignBoundaryChoice(input.intent, previous.blockId, next.blockId);
|
|
2521
2865
|
return choice.kind === "user-pinned" ? resolveJoinTreatment({
|
|
2866
|
+
siteStyleId: input.siteStyleId,
|
|
2522
2867
|
previousBlockId: previous.blockId,
|
|
2523
2868
|
nextBlockId: next.blockId,
|
|
2524
2869
|
candidates: [{
|
|
@@ -2529,33 +2874,31 @@ function boundaryPinIssues(input) {
|
|
|
2529
2874
|
});
|
|
2530
2875
|
}
|
|
2531
2876
|
function boundaryReadModels(input) {
|
|
2532
|
-
const
|
|
2877
|
+
const availableBreaks = boundaryOptionsForStyle(input.siteStyleId);
|
|
2878
|
+
const breakOffer = sectionBreakOffer(availableBreaks, siteStyleEdges(input.siteStyleId));
|
|
2533
2879
|
return resolvePageJoins({
|
|
2534
2880
|
...input,
|
|
2535
2881
|
blocks: input.blocks.map((block) => ({
|
|
2536
2882
|
blockId: block.blockId,
|
|
2537
|
-
...
|
|
2883
|
+
...requireJoinFacts(block)
|
|
2538
2884
|
}))
|
|
2539
2885
|
}).map((decision) => {
|
|
2540
|
-
const projection = decision.pin.kind === "user-pinned" ? pinnedBreakChoice(decision.resolution) : autoBreakChoice(decision.automatic, input.pageFlowPresetId);
|
|
2886
|
+
const projection = decision.pin.kind === "user-pinned" ? pinnedBreakChoice(decision.resolution, decision.pin.value) : autoBreakChoice(decision.automatic, input.pageFlowPresetId);
|
|
2541
2887
|
return {
|
|
2542
2888
|
boundary: {
|
|
2543
2889
|
boundaryId: makeBoundaryId(decision.previousBlockId, decision.nextBlockId),
|
|
2544
2890
|
previousBlockId: decision.previousBlockId,
|
|
2545
2891
|
nextBlockId: decision.nextBlockId,
|
|
2546
2892
|
breakChoice: projection.breakChoice,
|
|
2547
|
-
|
|
2893
|
+
...decision.pin.kind === "user-pinned" ? { authoredEdge: decision.pin.value } : {},
|
|
2894
|
+
...decision.resolution.join ? { effectiveEdge: decision.resolution.join.edge } : {},
|
|
2895
|
+
availableBreaks,
|
|
2896
|
+
breakOffer
|
|
2548
2897
|
},
|
|
2549
2898
|
issues: projection.issues
|
|
2550
2899
|
};
|
|
2551
2900
|
});
|
|
2552
2901
|
}
|
|
2553
|
-
/** No rule reads these, so a style without rules skips the render plan that would supply them. */
|
|
2554
|
-
const unreadJoinFacts = {
|
|
2555
|
-
lookId: null,
|
|
2556
|
-
ground: "light",
|
|
2557
|
-
paint: "other"
|
|
2558
|
-
};
|
|
2559
2902
|
function requireJoinFacts(block) {
|
|
2560
2903
|
if (!block.joinFacts) throw new Error(`Boundary facts were not resolved for ${block.blockId}`);
|
|
2561
2904
|
return block.joinFacts;
|
|
@@ -2570,7 +2913,7 @@ function autoBreakChoice(resolution, pageFlowPresetId) {
|
|
|
2570
2913
|
issues: resolution.issues
|
|
2571
2914
|
};
|
|
2572
2915
|
}
|
|
2573
|
-
function pinnedBreakChoice(resolution) {
|
|
2916
|
+
function pinnedBreakChoice(resolution, pinned) {
|
|
2574
2917
|
const effectiveValue = effectiveBreak(resolution);
|
|
2575
2918
|
switch (resolution.pin.kind) {
|
|
2576
2919
|
case "unsupported": return {
|
|
@@ -2586,7 +2929,7 @@ function pinnedBreakChoice(resolution) {
|
|
|
2586
2929
|
case "none": return {
|
|
2587
2930
|
breakChoice: {
|
|
2588
2931
|
kind: "user-pinned",
|
|
2589
|
-
value:
|
|
2932
|
+
value: boundaryOptionIdForTreatment(pinned) ?? noneBoundaryOption.id,
|
|
2590
2933
|
status: "supported",
|
|
2591
2934
|
effectiveValue
|
|
2592
2935
|
},
|
|
@@ -2660,6 +3003,7 @@ function buildPageDesignEditorReadModel(input) {
|
|
|
2660
3003
|
pageFlowIssue,
|
|
2661
3004
|
...blockResults.flatMap((result) => result.issues),
|
|
2662
3005
|
...input.joinResolution === null ? boundaryPinIssues({
|
|
3006
|
+
siteStyleId: input.siteStyleId,
|
|
2663
3007
|
intent: input.intent,
|
|
2664
3008
|
blocks
|
|
2665
3009
|
}) : boundaryResults.flatMap((result) => result.issues)
|
|
@@ -3556,6 +3900,498 @@ function parseListLook(kind, value) {
|
|
|
3556
3900
|
return listLooksByKind[kind].find((look) => look === value) ?? null;
|
|
3557
3901
|
}
|
|
3558
3902
|
//#endregion
|
|
3903
|
+
//#region ../theme-core/src/site-styles/boundaryLayers.ts
|
|
3904
|
+
/** Back paints are palette roles, never another section's inherited texture. Fade repeats its own ground. */
|
|
3905
|
+
function boundaryBackPaints(intent, pin, front, previous, palette = {}) {
|
|
3906
|
+
const edge = pin ?? transitionCatalogueEntryForIntent(intent).treatment;
|
|
3907
|
+
return Array.from({ length: edge.layers - 1 }, (_, index) => {
|
|
3908
|
+
if (edge.colourPreset === "fade") return front;
|
|
3909
|
+
const blended = edge.colourPreset === "blend" ? blendedGround(front, previous, palette, (edge.layers - index - 1) / edge.layers) : null;
|
|
3910
|
+
if (blended) return blended;
|
|
3911
|
+
const roles = edge.colourPreset === "accent" ? [
|
|
3912
|
+
"accent",
|
|
3913
|
+
"primary",
|
|
3914
|
+
"secondary",
|
|
3915
|
+
"text"
|
|
3916
|
+
] : edge.colourPreset === "main" ? [
|
|
3917
|
+
"primary",
|
|
3918
|
+
"secondary",
|
|
3919
|
+
"accent",
|
|
3920
|
+
"text"
|
|
3921
|
+
] : [
|
|
3922
|
+
"secondary",
|
|
3923
|
+
"primary",
|
|
3924
|
+
"accent",
|
|
3925
|
+
"text"
|
|
3926
|
+
];
|
|
3927
|
+
const shows = roles.filter((role) => visibleRole(role, front, previous, palette));
|
|
3928
|
+
return { colour: parseThemeColorToken(shows[index % shows.length] ?? roles[index % roles.length] ?? "primary") ?? front.colour };
|
|
3929
|
+
});
|
|
3930
|
+
}
|
|
3931
|
+
function visibleRole(role, front, previous, palette) {
|
|
3932
|
+
const colour = resolveConcreteColorHex(role, palette) ?? role;
|
|
3933
|
+
return colour !== (resolveConcreteColorHex(front.colour, palette) ?? front.colour) && colour !== (previous ? resolveConcreteColorHex(previous.colour, palette) ?? previous.colour : "");
|
|
3934
|
+
}
|
|
3935
|
+
function blendedGround(front, previous, palette, amount) {
|
|
3936
|
+
const from = previous ? resolveConcreteColorHex(previous.colour, palette) : null;
|
|
3937
|
+
const to = resolveConcreteColorHex(front.colour, palette);
|
|
3938
|
+
if (!from || !to || from === to) return null;
|
|
3939
|
+
return { colour: hexColorSchema.parse(mixGroundColour(from, to, amount)) };
|
|
3940
|
+
}
|
|
3941
|
+
//#endregion
|
|
3942
|
+
//#region ../theme-core/src/site-styles/edgePath.ts
|
|
3943
|
+
const waveMaskSvgPaths = {
|
|
3944
|
+
classic: "M0 72V46C130 55 260 24 420 30C590 36 690 62 860 42C1035 21 1160 47 1305 36C1365 31 1415 33 1440 38V72H0Z",
|
|
3945
|
+
balanced: "M0 72V42C120 24 240 24 360 42C480 60 600 60 720 42C840 24 960 24 1080 42C1200 60 1320 60 1440 42V72H0Z",
|
|
3946
|
+
gentle: "M0 72V43C180 32 300 32 480 43C660 54 780 54 960 43C1140 32 1260 32 1440 43V72H0Z",
|
|
3947
|
+
echo: "M0 72V44C180 34 320 29 500 40C680 51 800 55 970 45C1140 35 1270 31 1440 40V72H0Z",
|
|
3948
|
+
bold: "M0 72V44C90 14 270 14 360 44C450 74 630 74 720 44C810 14 990 14 1080 44C1170 74 1350 74 1440 44V72H0Z",
|
|
3949
|
+
drift: "M0 72V39C115 31 205 54 340 48C505 41 610 16 760 33C920 51 1015 64 1160 44C1280 27 1375 35 1440 50V72H0Z"
|
|
3950
|
+
};
|
|
3951
|
+
/**
|
|
3952
|
+
* The arc (issue 1713): the next section's colour rises to a shallow peak in the
|
|
3953
|
+
* middle. With echo, two lines follow the arc below it, cut part-way into the
|
|
3954
|
+
* shape so the colour behind shows through them; that keeps them a blend of the
|
|
3955
|
+
* two sections' colours, whatever the palette. They fade out towards the peak.
|
|
3956
|
+
*/
|
|
3957
|
+
const arcShapePath = "M0 110V60Q720 -30 1440 60V110Z";
|
|
3958
|
+
const arcEchoLinePaths = ["M0 84Q720 -6 1440 84", "M0 102Q720 12 1440 102"];
|
|
3959
|
+
/** The arc turned over: the next section's colour sits lowest in the middle, under the swell of the section above. */
|
|
3960
|
+
const arcBulgeShapePath = "M0 110V50Q720 140 1440 50V110Z";
|
|
3961
|
+
function arcBulgeMaskDataUrl() {
|
|
3962
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 110' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${arcBulgeShapePath}' fill='white'/></svg>`);
|
|
3963
|
+
}
|
|
3964
|
+
function arcMaskDataUrl(echo) {
|
|
3965
|
+
const lines = arcEchoLinePaths.map((d) => `<path d='${d}' fill='none' stroke='url(#fade)' stroke-width='1.5' vector-effect='non-scaling-stroke'/>`).join("");
|
|
3966
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 110' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'>${echo ? `<defs><linearGradient id='fade' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='1440' y2='0'><stop offset='0' stop-color='black' stop-opacity='0.42'/><stop offset='0.5' stop-color='black' stop-opacity='0'/><stop offset='1' stop-color='black' stop-opacity='0.42'/></linearGradient><mask id='lines'><rect width='1440' height='110' fill='white'/>${lines}</mask></defs><path d='${arcShapePath}' fill='white' mask='url(#lines)'/>` : `<path d='${arcShapePath}' fill='white'/>`}</svg>`);
|
|
3967
|
+
}
|
|
3968
|
+
/** One half disc of the next colour, rising from the join. Between two of them the colour above shows as a punched hole would. */
|
|
3969
|
+
function tornMaskDataUrl(pitchPx, holeRadiusPx) {
|
|
3970
|
+
const height = Math.ceil(holeRadiusPx);
|
|
3971
|
+
return svgDataUrl(`<svg viewBox='0 0 ${pitchPx} ${height}' xmlns='http://www.w3.org/2000/svg'><circle cx='${pitchPx / 2}' cy='${height}' r='${holeRadiusPx}' fill='white'/></svg>`);
|
|
3972
|
+
}
|
|
3973
|
+
function waveMaskDataUrl(mask) {
|
|
3974
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${waveMaskSvgPaths[mask]}' fill='white'/></svg>`);
|
|
3975
|
+
}
|
|
3976
|
+
const defaultEdgeTuning = {
|
|
3977
|
+
amplitude: 1,
|
|
3978
|
+
irregularity: 0,
|
|
3979
|
+
rhythm: 2
|
|
3980
|
+
};
|
|
3981
|
+
const fadeMask = "linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / 16%) 34%, rgb(0 0 0 / 68%) 78%, black 100%)";
|
|
3982
|
+
const wavePeaks = {
|
|
3983
|
+
classic: 3,
|
|
3984
|
+
balanced: 2,
|
|
3985
|
+
gentle: 2,
|
|
3986
|
+
echo: 2,
|
|
3987
|
+
bold: 2,
|
|
3988
|
+
drift: 3
|
|
3989
|
+
};
|
|
3990
|
+
/** Existing literal geometry is immutable at every width. Only new families use generated phone paths. */
|
|
3991
|
+
function edgePath(family, variant, tuning, seed, width) {
|
|
3992
|
+
const entry = transitionCatalogueEntries.find((entry) => entry.family === family && (variant === void 0 || entry.variantId === variant));
|
|
3993
|
+
if (!entry) throw new Error(`Unknown edge: ${family}/${variant ?? "default"}`);
|
|
3994
|
+
const shape = entry.shape;
|
|
3995
|
+
switch (shape.kind) {
|
|
3996
|
+
case "fade": return {
|
|
3997
|
+
kind: "fade",
|
|
3998
|
+
mask: fadeMask,
|
|
3999
|
+
clipPath: "none",
|
|
4000
|
+
path: "",
|
|
4001
|
+
viewHeight: 72,
|
|
4002
|
+
peaks: 0,
|
|
4003
|
+
amplitude: 0
|
|
4004
|
+
};
|
|
4005
|
+
case "generated": return generatedEdge(family, tuning, seed, width);
|
|
4006
|
+
case "wave": return waveEdge(shape.mask);
|
|
4007
|
+
case "arc": return arcEdge(shape);
|
|
4008
|
+
case "angle": return angleEdge(shape.polygon);
|
|
4009
|
+
case "torn": return tornEdge(shape.pitchPx, shape.holeRadiusPx);
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
function waveEdge(mask) {
|
|
4013
|
+
return {
|
|
4014
|
+
kind: "mask",
|
|
4015
|
+
mask: `url("${waveMaskDataUrl(mask)}")`,
|
|
4016
|
+
clipPath: "none",
|
|
4017
|
+
path: waveMaskSvgPaths[mask],
|
|
4018
|
+
viewHeight: 72,
|
|
4019
|
+
peaks: wavePeaks[mask],
|
|
4020
|
+
amplitude: mask === "bold" ? 30 : 18
|
|
4021
|
+
};
|
|
4022
|
+
}
|
|
4023
|
+
function angleEdge(polygon) {
|
|
4024
|
+
return {
|
|
4025
|
+
kind: "angle",
|
|
4026
|
+
polygon,
|
|
4027
|
+
mask: "none",
|
|
4028
|
+
clipPath: anglePolygonCss(polygon),
|
|
4029
|
+
path: `M0 ${polygon.startTopPercent}L100 ${polygon.endTopPercent}V100H0Z`,
|
|
4030
|
+
viewHeight: 100,
|
|
4031
|
+
peaks: 1,
|
|
4032
|
+
amplitude: Math.abs(polygon.startTopPercent - polygon.endTopPercent)
|
|
4033
|
+
};
|
|
4034
|
+
}
|
|
4035
|
+
function tornEdge(pitchPx, holeRadiusPx) {
|
|
4036
|
+
const height = Math.ceil(holeRadiusPx);
|
|
4037
|
+
return {
|
|
4038
|
+
kind: "mask",
|
|
4039
|
+
mask: `url("${tornMaskDataUrl(pitchPx, holeRadiusPx)}")`,
|
|
4040
|
+
clipPath: "none",
|
|
4041
|
+
path: `M0 ${height}A${holeRadiusPx} ${holeRadiusPx} 0 0 1 ${pitchPx} ${height}Z`,
|
|
4042
|
+
viewHeight: height,
|
|
4043
|
+
peaks: 0,
|
|
4044
|
+
amplitude: holeRadiusPx,
|
|
4045
|
+
tilePx: pitchPx
|
|
4046
|
+
};
|
|
4047
|
+
}
|
|
4048
|
+
function arcEdge({ echo, bulge }) {
|
|
4049
|
+
const path = bulge ? arcBulgeShapePath : arcShapePath;
|
|
4050
|
+
return {
|
|
4051
|
+
kind: "mask",
|
|
4052
|
+
mask: `url("${bulge ? arcBulgeMaskDataUrl() : arcMaskDataUrl(echo === true)}")`,
|
|
4053
|
+
clipPath: "none",
|
|
4054
|
+
path,
|
|
4055
|
+
viewHeight: 110,
|
|
4056
|
+
peaks: 1,
|
|
4057
|
+
amplitude: 90
|
|
4058
|
+
};
|
|
4059
|
+
}
|
|
4060
|
+
function seedValue(seed) {
|
|
4061
|
+
return Array.from(seed).reduce((value, character) => Math.imul(value, 31) + character.charCodeAt(0) >>> 0, 2166136261);
|
|
4062
|
+
}
|
|
4063
|
+
function generatedEdge(family, tuning, seed, width) {
|
|
4064
|
+
const narrow = width === "narrow";
|
|
4065
|
+
const peaks = narrow ? Math.max(1, Math.min(2, Math.round(tuning.rhythm / 2))) : Math.max(3, Math.min(8, Math.round(tuning.rhythm * 2)));
|
|
4066
|
+
const amplitude = Math.min(26, Math.max(16, tuning.amplitude * 18)) * (narrow ? .8 : 1);
|
|
4067
|
+
const irregularity = Math.max(0, Math.min(1, tuning.irregularity));
|
|
4068
|
+
const phase = seedValue(seed);
|
|
4069
|
+
const points = Array.from({ length: peaks * 2 + 1 }, (_, index) => ({
|
|
4070
|
+
x: index * 1440 / (peaks * 2),
|
|
4071
|
+
y: index === 0 || index === peaks * 2 ? 42 : 42 + (index % 2 === 0 ? amplitude : -amplitude) * (1 + Math.sin(phase + index * 17) * irregularity * .1)
|
|
4072
|
+
}));
|
|
4073
|
+
const path = `M0 72V42${points.flatMap((previous, index) => {
|
|
4074
|
+
const point = points[index + 1];
|
|
4075
|
+
return point ? [family === "ridge" ? `L${point.x} ${point.y}` : `Q${(previous.x + point.x) / 2} ${previous.y} ${point.x} ${point.y}`] : [];
|
|
4076
|
+
}).join("")}V72H0Z`;
|
|
4077
|
+
return {
|
|
4078
|
+
kind: "mask",
|
|
4079
|
+
mask: `url("${svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${path}' fill='white'/></svg>`)}")`,
|
|
4080
|
+
clipPath: "none",
|
|
4081
|
+
path,
|
|
4082
|
+
viewHeight: 72,
|
|
4083
|
+
peaks,
|
|
4084
|
+
amplitude
|
|
4085
|
+
};
|
|
4086
|
+
}
|
|
4087
|
+
/** Reflect a texture overlay's alpha mask; the texture field itself stays untransformed. */
|
|
4088
|
+
function reflectEdgeMask(mask, viewHeight, axis) {
|
|
4089
|
+
if (axis === "y" && mask.startsWith("linear-gradient")) return mask.replace("to bottom", "to top");
|
|
4090
|
+
if (!mask.startsWith("url(\"data:image/svg+xml,")) return mask;
|
|
4091
|
+
const svg = decodeURIComponent(mask.slice(24, -2));
|
|
4092
|
+
const viewWidth = Number(/viewBox='0 0 ([\d.]+) /.exec(svg)?.[1] ?? 1440);
|
|
4093
|
+
return `url("${svgDataUrl(svg.replace("</svg>", "</g></svg>").replace(/(<svg[^>]*>)/, `$1<g transform='${axis === "x" ? `translate(${viewWidth} 0) scale(-1 1)` : `translate(0 ${viewHeight}) scale(1 -1)`}'>`))}")`;
|
|
4094
|
+
}
|
|
4095
|
+
function svgDataUrl(svg) {
|
|
4096
|
+
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
4097
|
+
}
|
|
4098
|
+
//#endregion
|
|
4099
|
+
//#region ../theme-core/src/site-styles/boundaryGeometry.ts
|
|
4100
|
+
const fadeFallback = "linear-gradient(to bottom, transparent 0%, var(--boundary-shape-paint) 100%)";
|
|
4101
|
+
const fadeBackground = "linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--boundary-shape-paint) 16%, transparent) 34%, color-mix(in srgb, var(--boundary-shape-paint) 68%, transparent) 78%, var(--boundary-shape-paint) 100%)";
|
|
4102
|
+
/** One geometry delivery path for page joins and footer markup. */
|
|
4103
|
+
function boundaryGeometryStyle(intent, seed, placement = "previous", tuning = defaultEdgeTuning) {
|
|
4104
|
+
const entry = transitionCatalogueEntryForIntent(intent);
|
|
4105
|
+
const wide = edgePath(entry.family, entry.variantId, tuning, seed, "wide");
|
|
4106
|
+
const narrow = edgePath(entry.family, entry.variantId, tuning, seed, "narrow");
|
|
4107
|
+
return {
|
|
4108
|
+
"--boundary-height": boundaryRuntimeMetricsForDecorativeTransition(intent).heightCss,
|
|
4109
|
+
"--boundary-footer-back-content": entry.treatment.layers > 1 ? "''" : "none",
|
|
4110
|
+
"--boundary-shape-height": entry.family === "arc" || entry.family === "angle" ? "calc(var(--boundary-height) + 2px)" : "var(--boundary-height)",
|
|
4111
|
+
...wide.tilePx === void 0 ? {} : {
|
|
4112
|
+
"--boundary-mask-tile-width": `${wide.tilePx}px`,
|
|
4113
|
+
"--boundary-mask-repeat": "repeat-x"
|
|
4114
|
+
},
|
|
4115
|
+
"--boundary-shape-background": wide.kind === "fade" ? fadeFallback : "var(--boundary-shape-paint)",
|
|
4116
|
+
"--boundary-shape-background-mixed": wide.kind === "fade" ? fadeBackground : "var(--boundary-shape-paint)",
|
|
4117
|
+
...widthStyle(wide, "wide", placement, false),
|
|
4118
|
+
...widthStyle(narrow, "narrow", placement, false),
|
|
4119
|
+
...backWidthStyle(wide, "wide", placement),
|
|
4120
|
+
...backWidthStyle(narrow, "narrow", placement)
|
|
4121
|
+
};
|
|
4122
|
+
}
|
|
4123
|
+
function widthStyle(shape, width, placement, mirror) {
|
|
4124
|
+
const reflected = mirror ? reflectEdgeMask(shape.mask, shape.viewHeight, "x") : shape.mask;
|
|
4125
|
+
const mask = placement === "next" ? reflectEdgeMask(reflected, shape.viewHeight, "y") : reflected;
|
|
4126
|
+
const clip = textureClip(shape, placement, mirror);
|
|
4127
|
+
return {
|
|
4128
|
+
[`--boundary-mask-${width}`]: shape.kind === "fade" ? "none" : shape.mask,
|
|
4129
|
+
[`--boundary-texture-mask-${width}`]: mask,
|
|
4130
|
+
[`--boundary-clip-${width}`]: shape.clipPath,
|
|
4131
|
+
[`--boundary-texture-clip-${width}`]: clip,
|
|
4132
|
+
...sectionMaskStyle(shape, width, placement, mirror)
|
|
4133
|
+
};
|
|
4134
|
+
}
|
|
4135
|
+
/** Back layers reuse the same tuned path, reflected in its geometry rather than its textured box. */
|
|
4136
|
+
function backWidthStyle(shape, width, placement) {
|
|
4137
|
+
return Object.fromEntries(Object.entries(widthStyle(shape, width, placement, true)).filter(([key]) => key.includes("texture") || key.includes("section-mask")).map(([key, value]) => [key.replace("--boundary-", "--boundary-back-"), value]));
|
|
4138
|
+
}
|
|
4139
|
+
function textureClip(shape, placement, mirror) {
|
|
4140
|
+
if (shape.kind !== "angle") return "none";
|
|
4141
|
+
const start = mirror ? shape.polygon.endTopPercent : shape.polygon.startTopPercent;
|
|
4142
|
+
const end = mirror ? shape.polygon.startTopPercent : shape.polygon.endTopPercent;
|
|
4143
|
+
return placement === "next" ? `polygon(0 0, 100% 0, 100% ${100 - end}%, 0 ${100 - start}%)` : `polygon(0 ${start}%, 100% ${end}%, 100% 100%, 0 100%)`;
|
|
4144
|
+
}
|
|
4145
|
+
/** Full section planes need an alpha mask for angles, and the fallback alpha ramp for fades. */
|
|
4146
|
+
function sectionMaskStyle(shape, width, placement, mirror) {
|
|
4147
|
+
if (shape.kind !== "angle" && shape.kind !== "fade") return {};
|
|
4148
|
+
const mask = shape.kind === "angle" ? `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='M0 ${shape.polygon.startTopPercent}L1440 ${shape.polygon.endTopPercent}V100H0Z' fill='white'/></svg>`)}")` : "linear-gradient(to bottom, transparent 0%, black 100%)";
|
|
4149
|
+
const reflected = mirror ? reflectEdgeMask(mask, shape.viewHeight, "x") : mask;
|
|
4150
|
+
return { [`--boundary-section-mask-${width}`]: placement === "next" ? reflectEdgeMask(reflected, shape.viewHeight, "y") : reflected };
|
|
4151
|
+
}
|
|
4152
|
+
//#endregion
|
|
4153
|
+
//#region ../theme-core/src/site-styles/sectionBoundaryComposition.ts
|
|
4154
|
+
/**
|
|
4155
|
+
* Classifies a section from its final render content. `_sectionStyles`
|
|
4156
|
+
* already holds the effective background (Look default, page-design override
|
|
4157
|
+
* and block-authored media merged by `resolveSectionBackground`), so this only
|
|
4158
|
+
* reads it and never re-decides precedence. What it paints comes from
|
|
4159
|
+
* `groundPaint`, the same decision the background layer paints from, given
|
|
4160
|
+
* the ground the section declares for when its content sets no colour.
|
|
4161
|
+
*/
|
|
4162
|
+
function boundaryEndpointForSectionContent(content, ground, side = "top") {
|
|
4163
|
+
const decision = sectionDecisionFromContent(content);
|
|
4164
|
+
const finished = decidedBoundaryEndpoint(decision, side);
|
|
4165
|
+
if (finished) return finished;
|
|
4166
|
+
const background = decision?.background ?? parseCanonicalRuntimeBackground(content);
|
|
4167
|
+
const paint = groundPaint(background.kind === "none" || background.kind === "base" ? null : background.background, ground.fallback);
|
|
4168
|
+
switch (paint.kind) {
|
|
4169
|
+
case "fill": {
|
|
4170
|
+
const token = parseThemeColorToken(paint.colour);
|
|
4171
|
+
return token ? {
|
|
4172
|
+
kind: "paint",
|
|
4173
|
+
token
|
|
4174
|
+
} : {
|
|
4175
|
+
kind: "unpainted",
|
|
4176
|
+
reason: "literal-color"
|
|
4177
|
+
};
|
|
4178
|
+
}
|
|
4179
|
+
case "gradient": return {
|
|
4180
|
+
kind: "unpainted",
|
|
4181
|
+
reason: "gradient"
|
|
4182
|
+
};
|
|
4183
|
+
case "media": return {
|
|
4184
|
+
kind: "unpainted",
|
|
4185
|
+
reason: "media"
|
|
4186
|
+
};
|
|
4187
|
+
case "bare": return {
|
|
4188
|
+
kind: "paint",
|
|
4189
|
+
token: pageGround.fallback
|
|
4190
|
+
};
|
|
4191
|
+
default: return assertNever$5(paint, "Unhandled ground paint");
|
|
4192
|
+
}
|
|
4193
|
+
}
|
|
4194
|
+
/**
|
|
4195
|
+
* Reads every fact from final render content in one place. `_frameStyles` is
|
|
4196
|
+
* the compiled frame; content without one (no page design, an SDK block)
|
|
4197
|
+
* draws a plain frame. `ground` is what the section declares it paints when
|
|
4198
|
+
* its content sets no colour (`pageGround` for a section that declares none).
|
|
4199
|
+
*/
|
|
4200
|
+
function sectionFactsForContent(content, ground) {
|
|
4201
|
+
const photoGround = isLookPhotoGround(content);
|
|
4202
|
+
return {
|
|
4203
|
+
...sectionDecisionFromContent(content)?.groundName ? { groundName: sectionDecisionFromContent(content)?.groundName } : {},
|
|
4204
|
+
...sectionDecisionFromContent(content)?.finishedPaint ? {
|
|
4205
|
+
finished: true,
|
|
4206
|
+
footEndpoint: photoGround ? {
|
|
4207
|
+
kind: "unpainted",
|
|
4208
|
+
reason: "media"
|
|
4209
|
+
} : boundaryEndpointForSectionContent(content, ground, "foot")
|
|
4210
|
+
} : {},
|
|
4211
|
+
endpoint: photoGround ? {
|
|
4212
|
+
kind: "unpainted",
|
|
4213
|
+
reason: "media"
|
|
4214
|
+
} : boundaryEndpointForSectionContent(content, ground),
|
|
4215
|
+
...photoGround || isPhotoBackground(content) ? { photo: true } : {},
|
|
4216
|
+
frame: frameKindForContent(content),
|
|
4217
|
+
shape: sectionShapeFromContent(content)
|
|
4218
|
+
};
|
|
4219
|
+
}
|
|
4220
|
+
/** A Look whose photo covers the section (`photoGround`) meets its joins as a photo does, once it has a photo to show. */
|
|
4221
|
+
function isLookPhotoGround(content) {
|
|
4222
|
+
const look = content._effectiveLook;
|
|
4223
|
+
const hooks = content._lookHooks;
|
|
4224
|
+
return isRecord$7(look) && look.photoGround === true && isRecord$7(hooks) && hooks["data-has-photo"] === "true";
|
|
4225
|
+
}
|
|
4226
|
+
function isRecord$7(value) {
|
|
4227
|
+
return typeof value === "object" && value !== null;
|
|
4228
|
+
}
|
|
4229
|
+
function isPhotoBackground(content) {
|
|
4230
|
+
const source = parseCanonicalRuntimeBackground(content);
|
|
4231
|
+
return source.kind !== "none" && source.background.type === "image" && source.background.image != null;
|
|
4232
|
+
}
|
|
4233
|
+
function frameKindForContent(content) {
|
|
4234
|
+
const frameStyles = content._frameStyles;
|
|
4235
|
+
const kind = typeof frameStyles === "object" && frameStyles !== null && "kind" in frameStyles ? frameStyles.kind : null;
|
|
4236
|
+
return kind === "panel" || kind === "flush-panel" ? kind : "plain";
|
|
4237
|
+
}
|
|
4238
|
+
/**
|
|
4239
|
+
* The frame rule: a flush panel owns the edge it runs to, so no break is
|
|
4240
|
+
* drawn next to one. The single home for this rule; the generated
|
|
4241
|
+
* pipeline's budget and the site-style lab ask it with their plan frames.
|
|
4242
|
+
*/
|
|
4243
|
+
function frameNotShownReason(previous, next) {
|
|
4244
|
+
return previous === "flush-panel" || next === "flush-panel" ? "flush-panel" : null;
|
|
4245
|
+
}
|
|
4246
|
+
/**
|
|
4247
|
+
* A field sits in from the page edge with page ground around it, so a break
|
|
4248
|
+
* drawn across its edge would have nothing to join (issue 1659).
|
|
4249
|
+
*/
|
|
4250
|
+
function shapeNotShownReason(previous, next) {
|
|
4251
|
+
return previous === "field" || next === "field" ? "field" : null;
|
|
4252
|
+
}
|
|
4253
|
+
/**
|
|
4254
|
+
* Decides whether and how a join draws. The frame and shape rules win before
|
|
4255
|
+
* paint is considered; two unpainted sides show nothing.
|
|
4256
|
+
*/
|
|
4257
|
+
function composeBoundary(previous, next, treatment) {
|
|
4258
|
+
const frameReason = frameNotShownReason(previous.frame, next.frame) ?? shapeNotShownReason(previous.shape, next.shape);
|
|
4259
|
+
if (frameReason) return {
|
|
4260
|
+
kind: "not-shown",
|
|
4261
|
+
reason: frameReason
|
|
4262
|
+
};
|
|
4263
|
+
const touching = touchingFoot(previous);
|
|
4264
|
+
const paintReason = paintNotShownReason(touching, next, treatment);
|
|
4265
|
+
if (paintReason) return {
|
|
4266
|
+
kind: "not-shown",
|
|
4267
|
+
reason: paintReason
|
|
4268
|
+
};
|
|
4269
|
+
return composeEndpoints(touching.endpoint, next.endpoint);
|
|
4270
|
+
}
|
|
4271
|
+
/** The previous section as it meets the next: a finished ground's foot, not its top. */
|
|
4272
|
+
function touchingFoot(previous) {
|
|
4273
|
+
return previous.footEndpoint ? {
|
|
4274
|
+
...previous,
|
|
4275
|
+
endpoint: previous.footEndpoint
|
|
4276
|
+
} : previous;
|
|
4277
|
+
}
|
|
4278
|
+
/**
|
|
4279
|
+
* Decides the seam between two adjacent sections from the same facts that
|
|
4280
|
+
* decide the boundary. Shared ground needs two platform sections painting the
|
|
4281
|
+
* identical theme token, with no field, flush panel or photo on either side;
|
|
4282
|
+
* gradients and literal colours are unpainted, so they never merge. A shared
|
|
4283
|
+
* ground is always a `same-paint` join, so a seam never sits beside a drawn
|
|
4284
|
+
* boundary or its reserves.
|
|
4285
|
+
*/
|
|
4286
|
+
function sectionSeam(previous, next) {
|
|
4287
|
+
if (previous.facts.shape === "field" && next.facts.shape === "field") return "fields";
|
|
4288
|
+
return mergesGround(previous) && mergesGround(next) && sameGroundPaint(touchingFoot(previous.facts), next.facts) ? "shared-ground" : "none";
|
|
4289
|
+
}
|
|
4290
|
+
/** A side can share its ground only when the platform paints it edge to edge, with no flush panel or photo. */
|
|
4291
|
+
function mergesGround(side) {
|
|
4292
|
+
const { facts } = side;
|
|
4293
|
+
return side.section === "platform" && facts.shape !== "field" && facts.frame !== "flush-panel" && !facts.photo;
|
|
4294
|
+
}
|
|
4295
|
+
/** Treatment-specific placement and indistinguishable paint are composition decisions. */
|
|
4296
|
+
function paintNotShownReason(previous, next, treatment) {
|
|
4297
|
+
if (treatment === "wave-edge-echo" && (!previous.photo || next.endpoint.kind !== "paint")) return "photo-required";
|
|
4298
|
+
return sameGroundPaint(previous, next) ? "same-paint" : null;
|
|
4299
|
+
}
|
|
4300
|
+
/**
|
|
4301
|
+
* Placement, reserves and paint for a shown boundary, derived from the
|
|
4302
|
+
* composition and the catalogue's metrics for the treatment.
|
|
4303
|
+
*/
|
|
4304
|
+
function boundaryLayout(intent, composition, options = {}) {
|
|
4305
|
+
const metrics = boundaryRuntimeMetricsForDecorativeTransition(intent);
|
|
4306
|
+
const placement = composition.kind === "paint-to-paint" ? "centred" : composition.kind === "unpainted-to-paint" ? "previous" : "next";
|
|
4307
|
+
const front = frontGround(composition);
|
|
4308
|
+
const underlay = composition.kind === "paint-to-paint" ? {
|
|
4309
|
+
colour: composition.from,
|
|
4310
|
+
...composition.fromTexture ? { texture: composition.fromTexture } : {}
|
|
4311
|
+
} : null;
|
|
4312
|
+
return {
|
|
4313
|
+
placement,
|
|
4314
|
+
underlay,
|
|
4315
|
+
geometry: boundaryGeometryStyle(intent, options.seed ?? "boundary", placement, options.tuning),
|
|
4316
|
+
reserves: placement === "centred" ? {
|
|
4317
|
+
before: metrics.reserveCss,
|
|
4318
|
+
after: metrics.reserveCss
|
|
4319
|
+
} : placement === "previous" ? {
|
|
4320
|
+
before: metrics.heightCss,
|
|
4321
|
+
after: null
|
|
4322
|
+
} : {
|
|
4323
|
+
before: null,
|
|
4324
|
+
after: metrics.heightCss
|
|
4325
|
+
},
|
|
4326
|
+
paint: {
|
|
4327
|
+
front,
|
|
4328
|
+
back: boundaryBackPaints(intent, options.edge, front, underlay, options.palette)
|
|
4329
|
+
}
|
|
4330
|
+
};
|
|
4331
|
+
}
|
|
4332
|
+
function frontGround(composition) {
|
|
4333
|
+
return composition.kind === "paint-to-unpainted" ? {
|
|
4334
|
+
colour: composition.from,
|
|
4335
|
+
...composition.fromTexture ? { texture: composition.fromTexture } : {}
|
|
4336
|
+
} : {
|
|
4337
|
+
colour: composition.to,
|
|
4338
|
+
...composition.toTexture ? { texture: composition.toTexture } : {}
|
|
4339
|
+
};
|
|
4340
|
+
}
|
|
4341
|
+
/** Read the single flat colour the section owner decided for this side. */
|
|
4342
|
+
function decidedBoundaryEndpoint(decision, side) {
|
|
4343
|
+
if (!decision) return null;
|
|
4344
|
+
const paint = side === "top" ? decision.topPaint : decision.footPaint;
|
|
4345
|
+
if (!paint) return null;
|
|
4346
|
+
const token = parseThemeColorToken(paint) ?? (decision.finishedPaint ? hexColorSchema.safeParse(paint).data : void 0);
|
|
4347
|
+
if (!token) return null;
|
|
4348
|
+
const texture = decision.finishedPaint?.texture;
|
|
4349
|
+
return {
|
|
4350
|
+
kind: "paint",
|
|
4351
|
+
token,
|
|
4352
|
+
...texture ? { texture } : {}
|
|
4353
|
+
};
|
|
4354
|
+
}
|
|
4355
|
+
/** A texture change is a paint change; untouched named grounds retain their established identity rule. */
|
|
4356
|
+
function sameGroundPaint(previous, next) {
|
|
4357
|
+
if (previous.endpoint.kind !== "paint" || next.endpoint.kind !== "paint") return false;
|
|
4358
|
+
if (JSON.stringify(previous.endpoint.texture) !== JSON.stringify(next.endpoint.texture)) return false;
|
|
4359
|
+
if (!previous.finished && !next.finished && previous.groundName !== void 0 && next.groundName !== void 0) return previous.groundName === next.groundName;
|
|
4360
|
+
return previous.endpoint.token === next.endpoint.token;
|
|
4361
|
+
}
|
|
4362
|
+
function composeEndpoints(from, to) {
|
|
4363
|
+
if (from.kind === "unpainted" && to.kind === "unpainted") return {
|
|
4364
|
+
kind: "not-shown",
|
|
4365
|
+
reason: "both-unpainted"
|
|
4366
|
+
};
|
|
4367
|
+
if (to.kind === "unpainted") return from.kind === "paint" ? {
|
|
4368
|
+
kind: "shown",
|
|
4369
|
+
composition: {
|
|
4370
|
+
kind: "paint-to-unpainted",
|
|
4371
|
+
from: from.token,
|
|
4372
|
+
...from.texture ? { fromTexture: from.texture } : {}
|
|
4373
|
+
}
|
|
4374
|
+
} : {
|
|
4375
|
+
kind: "not-shown",
|
|
4376
|
+
reason: "both-unpainted"
|
|
4377
|
+
};
|
|
4378
|
+
const texture = to.texture ? { toTexture: to.texture } : {};
|
|
4379
|
+
return {
|
|
4380
|
+
kind: "shown",
|
|
4381
|
+
composition: from.kind === "paint" ? {
|
|
4382
|
+
kind: "paint-to-paint",
|
|
4383
|
+
from: from.token,
|
|
4384
|
+
to: to.token,
|
|
4385
|
+
...from.texture ? { fromTexture: from.texture } : {},
|
|
4386
|
+
...texture
|
|
4387
|
+
} : {
|
|
4388
|
+
kind: "unpainted-to-paint",
|
|
4389
|
+
to: to.token,
|
|
4390
|
+
...texture
|
|
4391
|
+
}
|
|
4392
|
+
};
|
|
4393
|
+
}
|
|
4394
|
+
//#endregion
|
|
3559
4395
|
//#region ../theme-core/src/site-styles/pageDesignVersionIntent.ts
|
|
3560
4396
|
/** Ordinary page versions contain decisions; the site owns their current style. */
|
|
3561
4397
|
const decodedPageDesignIntentSchema = z.union([z.nullish(z.never()).transform(() => ({ kind: "automatic" })), pageDesignDecisionsV2Schema.transform((decisions) => ({
|
|
@@ -3639,9 +4475,9 @@ function generateHoverEffects(axes) {
|
|
|
3639
4475
|
//#endregion
|
|
3640
4476
|
//#region ../theme-core/src/accordions/accordionInks.ts
|
|
3641
4477
|
const TEXT = contrastThresholdByPolicy["body-aa"];
|
|
3642
|
-
/** The CSS colour for a certified ink: a palette variable,
|
|
4478
|
+
/** The CSS colour for a certified ink: a palette variable, including absolute black and white. */
|
|
3643
4479
|
function accordionInkCss(ink) {
|
|
3644
|
-
return rgbColorValue(
|
|
4480
|
+
return rgbColorValue(ink);
|
|
3645
4481
|
}
|
|
3646
4482
|
/** The foreground contract certified on an accordion's own background, or null when it has none. */
|
|
3647
4483
|
function resolveAccordionSurfaceForeground(theme, system) {
|
|
@@ -3821,15 +4657,14 @@ function resolveHeaderDropdownForeground(header, theme) {
|
|
|
3821
4657
|
}, palette);
|
|
3822
4658
|
const text = foreground.kind === "known" ? foreground.roles.text : candidate;
|
|
3823
4659
|
const fill = style?.hoverBackground === void 0 ? text : style.hoverBackground;
|
|
3824
|
-
const menu = foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
3825
4660
|
return {
|
|
3826
4661
|
style,
|
|
3827
4662
|
backgroundToken,
|
|
3828
4663
|
candidate,
|
|
3829
4664
|
foreground,
|
|
3830
|
-
textToken:
|
|
3831
|
-
linkFill: fill
|
|
3832
|
-
...linkInks(style, text, fill,
|
|
4665
|
+
textToken: text,
|
|
4666
|
+
linkFill: fill,
|
|
4667
|
+
...linkInks(style, text, fill, foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null, palette)
|
|
3833
4668
|
};
|
|
3834
4669
|
}
|
|
3835
4670
|
/** A translucent menu keeps its declared hover text, unmeasured; an opaque one certifies each state. */
|
|
@@ -3858,7 +4693,7 @@ function certifyLinkText(ink, declared, fill, menu, palette) {
|
|
|
3858
4693
|
};
|
|
3859
4694
|
});
|
|
3860
4695
|
return {
|
|
3861
|
-
linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state,
|
|
4696
|
+
linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state, paint?.ink ?? ink]] : [])),
|
|
3862
4697
|
linkPaints: states.flatMap(({ paint }) => paint ? [paint] : []),
|
|
3863
4698
|
linkUnmeasured: states.flatMap(({ state, paint }) => paint ? [] : [linkPlace(state)])
|
|
3864
4699
|
};
|
|
@@ -3971,7 +4806,10 @@ function formatFontFamily(family, fallback = "sans-serif") {
|
|
|
3971
4806
|
*/
|
|
3972
4807
|
function generateCssVars(palette) {
|
|
3973
4808
|
const cssVars = {};
|
|
3974
|
-
Object.entries(
|
|
4809
|
+
Object.entries({
|
|
4810
|
+
...palette,
|
|
4811
|
+
...absoluteInkColors
|
|
4812
|
+
}).forEach(([key, value]) => {
|
|
3975
4813
|
if (key === "meta" || value === null || value === void 0 || typeof value !== "string") return;
|
|
3976
4814
|
const { r, g, b } = hexToRgb(value);
|
|
3977
4815
|
cssVars[`--tb-${key}`] = `${r} ${g} ${b}`;
|
|
@@ -5881,11 +6719,24 @@ function getResponsiveScopeSpec(mode = DEFAULT_THEME_RESPONSIVE_MODE) {
|
|
|
5881
6719
|
selector: `[${THEME_RESPONSIVE_MODE_ATTR}="viewport"]`
|
|
5882
6720
|
};
|
|
5883
6721
|
}
|
|
6722
|
+
function getContainerResponsiveScopeSpec() {
|
|
6723
|
+
return {
|
|
6724
|
+
kind: "container",
|
|
6725
|
+
selector: `[${THEME_RESPONSIVE_MODE_ATTR}="container"]`,
|
|
6726
|
+
containerName: THEME_RESPONSIVE_CONTAINER_NAME
|
|
6727
|
+
};
|
|
6728
|
+
}
|
|
6729
|
+
function buildResponsiveScopeRule(spec, css) {
|
|
6730
|
+
return `${buildResponsiveScopePrelude(spec)}\n${css.trim()}\n}`;
|
|
6731
|
+
}
|
|
6732
|
+
function buildResponsiveScopePrelude(spec) {
|
|
6733
|
+
return `@scope (${spec.selector}) to (:scope [${THEME_RESPONSIVE_MODE_ATTR}]) {`;
|
|
6734
|
+
}
|
|
5884
6735
|
function escapeRegExp(value) {
|
|
5885
6736
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5886
6737
|
}
|
|
5887
|
-
new RegExp(buildResponsiveScopeRulePatternSource(), "g");
|
|
5888
|
-
new RegExp(buildResponsiveScopeRulePatternSource(), "y");
|
|
6738
|
+
const RESPONSIVE_SCOPE_RULE_PATTERN = new RegExp(buildResponsiveScopeRulePatternSource(), "g");
|
|
6739
|
+
const RESPONSIVE_SCOPE_RULE_AT_PATTERN = new RegExp(buildResponsiveScopeRulePatternSource(), "y");
|
|
5889
6740
|
function buildResponsiveScopeRulePatternSource() {
|
|
5890
6741
|
return [
|
|
5891
6742
|
"@scope",
|
|
@@ -5899,6 +6750,19 @@ function buildResponsiveScopeRulePatternSource() {
|
|
|
5899
6750
|
"\\{"
|
|
5900
6751
|
].join("\\s*");
|
|
5901
6752
|
}
|
|
6753
|
+
function findResponsiveScopeRuleAt(css, index) {
|
|
6754
|
+
RESPONSIVE_SCOPE_RULE_AT_PATTERN.lastIndex = index;
|
|
6755
|
+
if (!RESPONSIVE_SCOPE_RULE_AT_PATTERN.exec(css)) return null;
|
|
6756
|
+
return { openBraceIndex: RESPONSIVE_SCOPE_RULE_AT_PATTERN.lastIndex - 1 };
|
|
6757
|
+
}
|
|
6758
|
+
function hasResponsiveScopeRule(css) {
|
|
6759
|
+
RESPONSIVE_SCOPE_RULE_PATTERN.lastIndex = 0;
|
|
6760
|
+
return RESPONSIVE_SCOPE_RULE_PATTERN.test(css);
|
|
6761
|
+
}
|
|
6762
|
+
function retargetResponsiveScopeRules(css, spec) {
|
|
6763
|
+
RESPONSIVE_SCOPE_RULE_PATTERN.lastIndex = 0;
|
|
6764
|
+
return css.replace(RESPONSIVE_SCOPE_RULE_PATTERN, buildResponsiveScopePrelude(spec));
|
|
6765
|
+
}
|
|
5902
6766
|
//#endregion
|
|
5903
6767
|
//#region ../theme-core/src/header/paintTargets.ts
|
|
5904
6768
|
/** Resolve the element that owns the visible header surface for each layout. */
|
|
@@ -6834,54 +7698,216 @@ function resolveHeaderLogoSurfaceTone(header, palette, surface) {
|
|
|
6834
7698
|
return surfaceToneFromForegroundToken(palette, foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header));
|
|
6835
7699
|
}
|
|
6836
7700
|
//#endregion
|
|
6837
|
-
//#region ../theme-core/src/
|
|
7701
|
+
//#region ../theme-core/src/site-styles/groundPaintCss.ts
|
|
7702
|
+
function groundTextureStyle(texture) {
|
|
7703
|
+
return {
|
|
7704
|
+
"--rb-ground-texture-content": "''",
|
|
7705
|
+
"--rb-ground-texture": `var(--rb-texture-${texture.kind})`,
|
|
7706
|
+
"--rb-ground-texture-opacity": String(texture.strength),
|
|
7707
|
+
"--rb-ground-texture-blend": texture.blend
|
|
7708
|
+
};
|
|
7709
|
+
}
|
|
7710
|
+
/** Only the section's existing background layer receives these properties. */
|
|
7711
|
+
function finishedGroundStyle(finish) {
|
|
7712
|
+
return {
|
|
7713
|
+
background: finish.background,
|
|
7714
|
+
...finish.texture ? groundTextureStyle(finish.texture) : {}
|
|
7715
|
+
};
|
|
7716
|
+
}
|
|
7717
|
+
function generateGroundPaintCss(selector) {
|
|
7718
|
+
return `${selector} {\n ${[
|
|
7719
|
+
"paper-grain",
|
|
7720
|
+
"handmade-paper",
|
|
7721
|
+
"plaster"
|
|
7722
|
+
].map((kind) => `--rb-texture-${kind}: ${groundTextureDataUri(kind)};`).join("\n ")}\n}
|
|
7723
|
+
${selector} [data-ground-tone] > :where([data-slot='section'], [data-slot='schedule-section'], [data-slot='shop-section']) {
|
|
7724
|
+
min-height: calc(2 * ${groundFlatZone} + 1px);
|
|
7725
|
+
}
|
|
7726
|
+
${selector} .background-style::before {
|
|
7727
|
+
content: var(--rb-ground-texture-content, none); position: absolute; inset: 0; pointer-events: none;
|
|
7728
|
+
background-image: var(--rb-ground-texture); background-position: 0 0; opacity: var(--rb-ground-texture-opacity);
|
|
7729
|
+
mix-blend-mode: var(--rb-ground-texture-blend);
|
|
7730
|
+
}
|
|
7731
|
+
${selector} [data-section-edge-paint] {
|
|
7732
|
+
position: absolute; inset-inline: 0; z-index: 4; pointer-events: none;
|
|
7733
|
+
mask-image: var(--boundary-section-mask-wide, var(--boundary-texture-mask-wide));
|
|
7734
|
+
-webkit-mask-image: var(--boundary-section-mask-wide, var(--boundary-texture-mask-wide));
|
|
7735
|
+
mask-size: var(--boundary-mask-tile-width, 100%) var(--section-edge-height); -webkit-mask-size: var(--boundary-mask-tile-width, 100%) var(--section-edge-height);
|
|
7736
|
+
mask-repeat: var(--boundary-mask-repeat, no-repeat); -webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);
|
|
7737
|
+
}
|
|
7738
|
+
${selector} [data-section-edge-paint][data-section-edge-paint='underlay'] {
|
|
7739
|
+
mask-image: linear-gradient(black, black); -webkit-mask-image: linear-gradient(black, black);
|
|
7740
|
+
}
|
|
7741
|
+
${selector} [data-section-edge-paint]::before {
|
|
7742
|
+
content: var(--rb-ground-texture-content, none); position: absolute; inset: 0; pointer-events: none;
|
|
7743
|
+
background-image: var(--rb-ground-texture); background-position: 0 var(--section-texture-y);
|
|
7744
|
+
opacity: var(--rb-ground-texture-opacity); mix-blend-mode: var(--rb-ground-texture-blend);
|
|
7745
|
+
}
|
|
7746
|
+
@supports (color: color-mix(in srgb, black, white)) {
|
|
7747
|
+
${selector} [data-section-edge-fade] {
|
|
7748
|
+
mask-image: var(--boundary-texture-mask-wide); -webkit-mask-image: var(--boundary-texture-mask-wide);
|
|
7749
|
+
}
|
|
7750
|
+
}`;
|
|
7751
|
+
}
|
|
7752
|
+
/** A tone needs space for both flat edge zones and its ramp; texture alone does not. */
|
|
7753
|
+
function groundFinishHooks(finish) {
|
|
7754
|
+
return finish?.paint.tone ? { "data-ground-tone": "true" } : {};
|
|
7755
|
+
}
|
|
7756
|
+
//#endregion
|
|
7757
|
+
//#region ../theme-core/src/responsive/cssScan.ts
|
|
6838
7758
|
/**
|
|
6839
|
-
*
|
|
6840
|
-
*
|
|
6841
|
-
* The renderer emits one element per shown join:
|
|
6842
|
-
*
|
|
6843
|
-
* <div data-block-boundary data-boundary-treatment="wave-edge-gentle"
|
|
6844
|
-
* data-boundary-placement="previous"
|
|
6845
|
-
* style="--boundary-shape-paint: …; --boundary-band-paint: …">
|
|
6846
|
-
*
|
|
6847
|
-
* Every selector matches an exact attribute value, so there is no reliance on
|
|
6848
|
-
* prefix ordering in the cascade and nothing reads colours out of a string.
|
|
6849
|
-
* The shape layer is `::after`; the band layer (paint → paint only) is
|
|
6850
|
-
* `::before`.
|
|
7759
|
+
* Scanning for CSS source. Comments and quoted strings are read as whole tokens and
|
|
7760
|
+
* skipped, so a brace or semicolon inside `content: "{"` or a comment never counts.
|
|
6851
7761
|
*/
|
|
6852
|
-
const
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
7762
|
+
const CSS_TOKENS = /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*(?:"|$)|'(?:\\[\s\S]|[^'\\])*(?:'|$)|[()[\]{};]|[^"'()[\]{};/]+|\//g;
|
|
7763
|
+
/** The only iteration shell: transitions never mutate their input state. */
|
|
7764
|
+
function* scanTokens(source, from, initial, transition) {
|
|
7765
|
+
const pattern = new RegExp(CSS_TOKENS.source, "g");
|
|
7766
|
+
pattern.lastIndex = from;
|
|
7767
|
+
const cursor = { state: initial };
|
|
7768
|
+
for (const match of source.matchAll(pattern)) {
|
|
7769
|
+
const next = transition(cursor.state, {
|
|
7770
|
+
text: match[0],
|
|
7771
|
+
index: match.index
|
|
7772
|
+
});
|
|
7773
|
+
cursor.state = next.state;
|
|
7774
|
+
yield next.output;
|
|
7775
|
+
}
|
|
7776
|
+
}
|
|
7777
|
+
const isSkippedToken = (token) => token.startsWith("/*") || token.startsWith("\"") || token.startsWith("'");
|
|
7778
|
+
function findTransition(depth, token, matches) {
|
|
7779
|
+
if (isSkippedToken(token.text)) return {
|
|
7780
|
+
state: depth,
|
|
7781
|
+
output: -1
|
|
7782
|
+
};
|
|
7783
|
+
const offset = token.text.split("").findIndex((ch, offset) => matches(ch, token.index + offset, depth));
|
|
7784
|
+
return {
|
|
7785
|
+
state: Math.max(0, depth + (token.text === "(" ? 1 : token.text === ")" ? -1 : 0)),
|
|
7786
|
+
output: offset === -1 ? -1 : token.index + offset
|
|
7787
|
+
};
|
|
7788
|
+
}
|
|
7789
|
+
/** First matching character outside comments/strings; depth is before the character. */
|
|
7790
|
+
function findOutsideStringsAndComments(source, from, matches) {
|
|
7791
|
+
for (const found of scanTokens(source, from, 0, (depth, token) => findTransition(depth, token, matches))) if (found !== -1) return found;
|
|
7792
|
+
return -1;
|
|
7793
|
+
}
|
|
7794
|
+
/** The next `target` outside comments, strings and parentheses, or -1. */
|
|
7795
|
+
function findTopLevelChar(source, from, target) {
|
|
7796
|
+
return findOutsideStringsAndComments(source, from, (ch, _index, parenDepth) => ch === target && parenDepth === 0);
|
|
7797
|
+
}
|
|
7798
|
+
function braceTransition(depth, token) {
|
|
7799
|
+
const state = depth + (token.text === "{" ? 1 : token.text === "}" ? -1 : 0);
|
|
7800
|
+
return {
|
|
7801
|
+
state,
|
|
7802
|
+
output: token.text === "}" && state === 0 ? token.index : -1
|
|
7803
|
+
};
|
|
7804
|
+
}
|
|
7805
|
+
/** The index of the brace closing the one at `openIndex`, or -1. */
|
|
7806
|
+
function findMatchingBrace(source, openIndex) {
|
|
7807
|
+
for (const found of scanTokens(source, openIndex, 0, braceTransition)) if (found !== -1) return found;
|
|
7808
|
+
return -1;
|
|
7809
|
+
}
|
|
7810
|
+
const WHITESPACE_AND_COMMENTS = /(?:\s+|\/\*[\s\S]*?(?:\*\/|$))*/y;
|
|
7811
|
+
/** The first index at or after `from` that is not whitespace or inside a comment. */
|
|
7812
|
+
function skipWhitespaceAndComments(source, from) {
|
|
7813
|
+
const pattern = new RegExp(WHITESPACE_AND_COMMENTS.source, "y");
|
|
7814
|
+
pattern.lastIndex = from;
|
|
7815
|
+
const match = pattern.exec(source);
|
|
7816
|
+
return Math.min(source.length, from + (match?.[0].length ?? 0));
|
|
7817
|
+
}
|
|
7818
|
+
//#endregion
|
|
7819
|
+
//#region ../theme-core/src/responsive/transformMediaRules.ts
|
|
7820
|
+
const findNextOpeningBrace = (source, from) => findTopLevelChar(source, from, "{");
|
|
7821
|
+
/** The next `@media` at-rule outside comments and strings, or -1. */
|
|
7822
|
+
const findNextMediaRule = (source, from) => findOutsideStringsAndComments(source, from, (ch, index) => ch === "@" && source.startsWith("@media", index) && !/[a-zA-Z0-9_-]/.test(source[index + 6] ?? ""));
|
|
6860
7823
|
/**
|
|
6861
|
-
*
|
|
6862
|
-
*
|
|
6863
|
-
* shape so the colour behind shows through them; that keeps them a blend of the
|
|
6864
|
-
* two sections' colours, whatever the palette. They fade out towards the peak.
|
|
7824
|
+
* Rewrites eligible @media blocks to named @container blocks.
|
|
7825
|
+
* Keeps unsupported @media queries unchanged.
|
|
6865
7826
|
*/
|
|
6866
|
-
|
|
6867
|
-
const
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
7827
|
+
function convertMediaRulesToContainerRules(css, containerName = getContainerResponsiveScopeSpec().containerName) {
|
|
7828
|
+
const containerScope = getContainerResponsiveScopeSpec();
|
|
7829
|
+
let output = "";
|
|
7830
|
+
let index = 0;
|
|
7831
|
+
while (index < css.length) {
|
|
7832
|
+
const mediaStart = findNextMediaRule(css, index);
|
|
7833
|
+
if (mediaStart === -1) {
|
|
7834
|
+
output += css.slice(index);
|
|
7835
|
+
break;
|
|
7836
|
+
}
|
|
7837
|
+
output += css.slice(index, mediaStart);
|
|
7838
|
+
const parsed = parseMediaRule(css, mediaStart);
|
|
7839
|
+
if (!parsed) {
|
|
7840
|
+
output += css.slice(mediaStart, mediaStart + 6);
|
|
7841
|
+
index = mediaStart + 6;
|
|
7842
|
+
continue;
|
|
7843
|
+
}
|
|
7844
|
+
const transformedBody = convertMediaRulesToContainerRules(parsed.body, containerName);
|
|
7845
|
+
const containerQuery = convertMediaQueryToContainerQuery(parsed.query);
|
|
7846
|
+
if (containerQuery) {
|
|
7847
|
+
const hasScope = hasResponsiveScopeRule(transformedBody);
|
|
7848
|
+
const rootQualifiedBody = rewriteScopedRootSelectors(hasScope ? retargetResponsiveScopeRules(transformedBody, containerScope) : transformedBody);
|
|
7849
|
+
const scopedBody = hasScope && !hasTopLevelContentOutsideResponsiveScopes(transformedBody) ? rootQualifiedBody : buildResponsiveScopeRule(containerScope, rootQualifiedBody);
|
|
7850
|
+
output += `@container ${containerName} ${containerQuery} {\n${scopedBody}\n}`;
|
|
7851
|
+
} else output += `@media ${parsed.query} {${transformedBody}}`;
|
|
7852
|
+
index = parsed.endIndex;
|
|
7853
|
+
}
|
|
7854
|
+
return output;
|
|
6872
7855
|
}
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
7856
|
+
/** Keep scope-root selectors eligible inside the generated preview scope. */
|
|
7857
|
+
function rewriteScopedRootSelectors(source) {
|
|
7858
|
+
const open = findNextOpeningBrace(source, 0);
|
|
7859
|
+
if (open === -1) return source;
|
|
7860
|
+
const close = findMatchingBrace(source, open);
|
|
7861
|
+
if (close === -1) return source;
|
|
7862
|
+
const prelude = source.slice(0, open);
|
|
7863
|
+
const body = source.slice(open + 1, close);
|
|
7864
|
+
const isAtRule = prelude[skipWhitespaceAndComments(prelude, 0)] === "@";
|
|
7865
|
+
const isKeyframes = /^@(?:-\w+-)?keyframes\b/.test(prelude.trimStart());
|
|
7866
|
+
return `${isAtRule ? prelude : qualifyScopeRoots(prelude)}{${isAtRule && !isKeyframes ? rewriteScopedRootSelectors(body) : body}}${rewriteScopedRootSelectors(source.slice(close + 1))}`;
|
|
7867
|
+
}
|
|
7868
|
+
function qualifyScopeRoots(selector) {
|
|
7869
|
+
return selector.replace(/\/\*[\s\S]*?\*\/|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\[(?:\\.|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^\]\\])*\]|\.theme-scope(?![\w-])/g, (token, offset) => {
|
|
7870
|
+
const isRoot = token === ".theme-scope" || /^\[data-(?:skin|theme-scope)\s*=/.test(token);
|
|
7871
|
+
const alreadyQualified = /^:is\(\s*\*\s*,\s*:scope\s*\)/.test(selector.slice(offset + token.length));
|
|
7872
|
+
return isRoot && !alreadyQualified ? `${token}:is(*, :scope)` : token;
|
|
7873
|
+
});
|
|
6876
7874
|
}
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
7875
|
+
function hasTopLevelContentOutsideResponsiveScopes(source) {
|
|
7876
|
+
let index = 0;
|
|
7877
|
+
while (index < source.length) {
|
|
7878
|
+
index = skipWhitespaceAndComments(source, index);
|
|
7879
|
+
if (index >= source.length) return false;
|
|
7880
|
+
if (!source.startsWith("@scope", index)) return true;
|
|
7881
|
+
const parsedScope = parseScopeRule(source, index);
|
|
7882
|
+
if (!parsedScope) return true;
|
|
7883
|
+
index = parsedScope.endIndex;
|
|
7884
|
+
}
|
|
7885
|
+
return false;
|
|
6881
7886
|
}
|
|
6882
|
-
function
|
|
6883
|
-
|
|
7887
|
+
function parseScopeRule(source, start) {
|
|
7888
|
+
const match = findResponsiveScopeRuleAt(source, start);
|
|
7889
|
+
if (!match) return null;
|
|
7890
|
+
const closeBraceIndex = findMatchingBrace(source, match.openBraceIndex);
|
|
7891
|
+
if (closeBraceIndex === -1) return null;
|
|
7892
|
+
return { endIndex: closeBraceIndex + 1 };
|
|
7893
|
+
}
|
|
7894
|
+
function parseMediaRule(source, start) {
|
|
7895
|
+
let i = start + 6;
|
|
7896
|
+
while (i < source.length && /\s/.test(source[i] ?? "")) i++;
|
|
7897
|
+
const queryStart = i;
|
|
7898
|
+
const openBraceIndex = findNextOpeningBrace(source, i);
|
|
7899
|
+
if (openBraceIndex === -1) return null;
|
|
7900
|
+
const closeBraceIndex = findMatchingBrace(source, openBraceIndex);
|
|
7901
|
+
if (closeBraceIndex === -1) return null;
|
|
7902
|
+
return {
|
|
7903
|
+
query: source.slice(queryStart, openBraceIndex).trim(),
|
|
7904
|
+
body: source.slice(openBraceIndex + 1, closeBraceIndex),
|
|
7905
|
+
endIndex: closeBraceIndex + 1
|
|
7906
|
+
};
|
|
6884
7907
|
}
|
|
7908
|
+
//#endregion
|
|
7909
|
+
//#region ../theme-core/src/layout/boundaryCss.ts
|
|
7910
|
+
/** Geometry comes only from renderer-provided variables. This stylesheet owns placement and reserves. */
|
|
6885
7911
|
/**
|
|
6886
7912
|
* How each placement anchors the layers against the zero-height boundary
|
|
6887
7913
|
* element that sits exactly on the join.
|
|
@@ -6910,7 +7936,7 @@ const placementRules = {
|
|
|
6910
7936
|
* the schedule and shop sections too.
|
|
6911
7937
|
*/
|
|
6912
7938
|
const blockSection = ":where([data-slot='section'], [data-slot='schedule-section'], [data-slot='shop-section'])";
|
|
6913
|
-
function generateBoundaryCss(selector) {
|
|
7939
|
+
function generateBoundaryCss(selector, responsiveMode = "viewport") {
|
|
6914
7940
|
const boundary = `${selector} [data-block-boundary]`;
|
|
6915
7941
|
return [
|
|
6916
7942
|
rule(boundary, [
|
|
@@ -6932,8 +7958,8 @@ function generateBoundaryCss(selector) {
|
|
|
6932
7958
|
rule(`${boundary}::before`, ["z-index: 0;", "background: var(--boundary-band-paint, transparent);"]),
|
|
6933
7959
|
rule(`${boundary}::after`, ["z-index: 1;"]),
|
|
6934
7960
|
...placementCss(boundary),
|
|
6935
|
-
...transitionCatalogueEntries.flatMap((entry) =>
|
|
6936
|
-
|
|
7961
|
+
...transitionCatalogueEntries.flatMap((entry) => footerEdgeReserveCss(selector, entry)),
|
|
7962
|
+
variableBoundaryCss(boundary, responsiveMode, selector)
|
|
6937
7963
|
].join("\n\n");
|
|
6938
7964
|
}
|
|
6939
7965
|
/**
|
|
@@ -6968,66 +7994,61 @@ function placementCss(boundary) {
|
|
|
6968
7994
|
return [rule(`${placed}::after`, rules.shape), rules.band ? rule(`${placed}::before`, rules.band) : rule(`${placed}::before`, ["content: none;"])];
|
|
6969
7995
|
});
|
|
6970
7996
|
}
|
|
6971
|
-
function
|
|
6972
|
-
|
|
7997
|
+
function rule(selector, declarations) {
|
|
7998
|
+
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
7999
|
+
}
|
|
8000
|
+
function variableBoundaryCss(boundary, responsiveMode, scope) {
|
|
8001
|
+
const selected = `${boundary}[data-boundary-geometry]`;
|
|
8002
|
+
const shapes = `${selected}::after, ${selected} > [data-boundary-back]`;
|
|
6973
8003
|
return [
|
|
6974
|
-
rule(
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
"
|
|
8004
|
+
rule(shapes, [
|
|
8005
|
+
"height: var(--boundary-shape-height);",
|
|
8006
|
+
"background: var(--boundary-shape-background);",
|
|
8007
|
+
"mask-image: var(--boundary-mask-wide);",
|
|
8008
|
+
"-webkit-mask-image: var(--boundary-mask-wide);",
|
|
8009
|
+
"clip-path: var(--boundary-clip-wide);",
|
|
8010
|
+
"mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8011
|
+
"-webkit-mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8012
|
+
"mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
8013
|
+
"-webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
8014
|
+
"mask-position: center;",
|
|
8015
|
+
"-webkit-mask-position: center;"
|
|
8016
|
+
]),
|
|
8017
|
+
`@supports (color: color-mix(in srgb, black, white)) {\n${rule(shapes, ["background: var(--boundary-shape-background-mixed);"])}\n}`,
|
|
8018
|
+
rule(`${selected}::after`, ["z-index: 2;"]),
|
|
8019
|
+
rule(`${selected}[data-boundary-section-owned]::before, ${selected}[data-boundary-section-owned]::after`, ["content: none;"]),
|
|
8020
|
+
rule(`${selected}::before`, ["mask: none;", "opacity: 1;"]),
|
|
8021
|
+
rule(`${selected}[data-boundary-placement='previous']::before, ${selected}[data-boundary-placement='next']::before`, ["content: none;"]),
|
|
8022
|
+
rule(`${selected} > [data-boundary-back]`, [
|
|
8023
|
+
"position: absolute;",
|
|
8024
|
+
"inset-inline: 0;",
|
|
8025
|
+
"pointer-events: none;",
|
|
8026
|
+
"z-index: 1;"
|
|
8027
|
+
]),
|
|
8028
|
+
rule(`${selected}[data-footer-edge]::before`, [
|
|
8029
|
+
"content: var(--boundary-footer-back-content);",
|
|
8030
|
+
"background: var(--boundary-shape-paint);",
|
|
8031
|
+
"top: auto;",
|
|
6979
8032
|
"bottom: 0;",
|
|
8033
|
+
"height: var(--boundary-shape-height);",
|
|
6980
8034
|
"transform: translateY(-12%) scaleX(-1);",
|
|
6981
|
-
"opacity: 0.5;"
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
"
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
const mask = tornMaskDataUrl(entry.shape.pitchPx, entry.shape.holeRadiusPx);
|
|
6996
|
-
return [
|
|
6997
|
-
"background: var(--boundary-shape-paint);",
|
|
6998
|
-
`mask-image: url("${mask}");`,
|
|
6999
|
-
"mask-repeat: repeat-x;",
|
|
7000
|
-
`mask-size: ${entry.shape.pitchPx}px 100%;`,
|
|
7001
|
-
"mask-position: center bottom;",
|
|
7002
|
-
`-webkit-mask-image: url("${mask}");`,
|
|
7003
|
-
"-webkit-mask-repeat: repeat-x;",
|
|
7004
|
-
`-webkit-mask-size: ${entry.shape.pitchPx}px 100%;`,
|
|
7005
|
-
"-webkit-mask-position: center bottom;"
|
|
7006
|
-
];
|
|
7007
|
-
}
|
|
7008
|
-
case "angle": return [
|
|
7009
|
-
"height: calc(var(--boundary-height) + 2px);",
|
|
7010
|
-
"background: var(--boundary-shape-paint);",
|
|
7011
|
-
`clip-path: ${anglePolygonCss(entry.shape.polygon)};`
|
|
7012
|
-
];
|
|
7013
|
-
}
|
|
7014
|
-
}
|
|
7015
|
-
function maskDeclarations(mask) {
|
|
7016
|
-
return [
|
|
7017
|
-
"background: var(--boundary-shape-paint);",
|
|
7018
|
-
`mask-image: url("${mask}");`,
|
|
7019
|
-
"mask-repeat: no-repeat;",
|
|
7020
|
-
"mask-size: 100% 100%;",
|
|
7021
|
-
`-webkit-mask-image: url("${mask}");`,
|
|
7022
|
-
"-webkit-mask-repeat: no-repeat;",
|
|
7023
|
-
"-webkit-mask-size: 100% 100%;"
|
|
7024
|
-
];
|
|
7025
|
-
}
|
|
7026
|
-
function rule(selector, declarations) {
|
|
7027
|
-
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
8035
|
+
"opacity: 0.5;",
|
|
8036
|
+
"mask-image: var(--boundary-mask-wide);",
|
|
8037
|
+
"-webkit-mask-image: var(--boundary-mask-wide);",
|
|
8038
|
+
"mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8039
|
+
"-webkit-mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8040
|
+
"mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
8041
|
+
"-webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);"
|
|
8042
|
+
]),
|
|
8043
|
+
narrowBoundaryCss(`@media (max-width: 767px) {\n${rule(`${scope} [data-section-edge-paint]`, ["mask-image: var(--boundary-section-mask-narrow, var(--boundary-texture-mask-narrow));", "-webkit-mask-image: var(--boundary-section-mask-narrow, var(--boundary-texture-mask-narrow));"])}\n@supports (color: color-mix(in srgb, black, white)) {\n${rule(`${scope} [data-section-edge-fade]`, ["mask-image: var(--boundary-texture-mask-narrow);", "-webkit-mask-image: var(--boundary-texture-mask-narrow);"])}\n}\n${rule(shapes, [
|
|
8044
|
+
"mask-image: var(--boundary-mask-narrow);",
|
|
8045
|
+
"-webkit-mask-image: var(--boundary-mask-narrow);",
|
|
8046
|
+
"clip-path: var(--boundary-clip-narrow);"
|
|
8047
|
+
])}\n${rule(`${selected}[data-footer-edge]::before`, ["mask-image: var(--boundary-mask-narrow);", "-webkit-mask-image: var(--boundary-mask-narrow);"])}\n}`, responsiveMode)
|
|
8048
|
+
].join("\n\n");
|
|
7028
8049
|
}
|
|
7029
|
-
function
|
|
7030
|
-
return
|
|
8050
|
+
function narrowBoundaryCss(css, responsiveMode) {
|
|
8051
|
+
return responsiveMode === "container" ? convertMediaRulesToContainerRules(css) : css;
|
|
7031
8052
|
}
|
|
7032
8053
|
//#endregion
|
|
7033
8054
|
//#region ../theme-core/src/layout/generateLayoutCss.ts
|
|
@@ -7054,7 +8075,8 @@ function generateLayoutCss(options) {
|
|
|
7054
8075
|
if (heroTypographyCss) cssChunks.push(heroTypographyCss);
|
|
7055
8076
|
const bodyTextTypographyCss = generateBodyTextTypographyCss(themeId, theme);
|
|
7056
8077
|
if (bodyTextTypographyCss) cssChunks.push(bodyTextTypographyCss);
|
|
7057
|
-
cssChunks.push(
|
|
8078
|
+
cssChunks.push(generateGroundPaintCss(selector));
|
|
8079
|
+
cssChunks.push(generateBoundaryCss(selector, options.responsiveMode));
|
|
7058
8080
|
return cssChunks.join("\n\n");
|
|
7059
8081
|
}
|
|
7060
8082
|
function toPaddingValue(preset) {
|
|
@@ -8597,7 +9619,8 @@ function buildThemeRuntime$1(theme, options) {
|
|
|
8597
9619
|
});
|
|
8598
9620
|
const layoutCss = generateLayoutCss({
|
|
8599
9621
|
themeId,
|
|
8600
|
-
theme
|
|
9622
|
+
theme,
|
|
9623
|
+
responsiveMode
|
|
8601
9624
|
});
|
|
8602
9625
|
const statusCss = generateStatusCss({
|
|
8603
9626
|
themeId,
|
|
@@ -9714,7 +10737,7 @@ function discountItem(discount, currency, copy) {
|
|
|
9714
10737
|
kind: "discount",
|
|
9715
10738
|
figure,
|
|
9716
10739
|
label: copy.discountLabel?.trim() || discount.publicLabel,
|
|
9717
|
-
text: copy.discountText?.trim() || (minimum ? `When you
|
|
10740
|
+
text: copy.discountText?.trim() || (minimum ? `When you book ${minimum} or more places.` : "Applied automatically when you book."),
|
|
9718
10741
|
...itemLink("discount", copy)
|
|
9719
10742
|
}];
|
|
9720
10743
|
}
|
|
@@ -9981,6 +11004,7 @@ function resolveSectionSurfaceForeground(value, context, options) {
|
|
|
9981
11004
|
}
|
|
9982
11005
|
function cachedSectionSurface(value, context, options) {
|
|
9983
11006
|
const key = JSON.stringify([
|
|
11007
|
+
sectionDecisionFromContent(context.data),
|
|
9984
11008
|
value,
|
|
9985
11009
|
context.proseHoverCandidate,
|
|
9986
11010
|
options,
|
|
@@ -9994,17 +11018,23 @@ function cachedSectionSurface(value, context, options) {
|
|
|
9994
11018
|
}
|
|
9995
11019
|
/** Cache only the owner's result; no foreground or button rules live here. */
|
|
9996
11020
|
function resolveRuntimeSectionSurface(value, context, options) {
|
|
11021
|
+
const decision = sectionDecisionFromContent(context.data);
|
|
11022
|
+
const background = decision?.background ?? resolveSectionBackground(parseCanonicalRuntimeBackground({ _sectionStyles: { background: value } }), null, void 0, {
|
|
11023
|
+
paintsGround: options?.photoPaintsGround !== false,
|
|
11024
|
+
fallbackToken: options?.fallbackToken
|
|
11025
|
+
});
|
|
9997
11026
|
return resolveSurface({
|
|
9998
11027
|
kind: "section",
|
|
9999
|
-
background:
|
|
10000
|
-
paintsGround: options?.photoPaintsGround !== false,
|
|
10001
|
-
fallbackToken: options?.fallbackToken
|
|
10002
|
-
}), context.theme.palette)
|
|
11028
|
+
background: decision ? decision.foregroundBackground : sectionForegroundBackground(background, context.theme.palette)
|
|
10003
11029
|
}, {
|
|
10004
11030
|
palette: context.theme.palette,
|
|
10005
11031
|
buttonSystem: context.theme.buttons,
|
|
10006
11032
|
linkHoverToken: context.proseHoverCandidate,
|
|
10007
11033
|
compositeBase: options?.fallbackToken,
|
|
11034
|
+
...decision?.finishedPaint ? {
|
|
11035
|
+
foreground: decision.inks.kind === "known" ? decision.inks.roles : void 0,
|
|
11036
|
+
backdropSamples: decision.finishedPaint.samples
|
|
11037
|
+
} : {},
|
|
10008
11038
|
solvedInks: transformSolvedInks(context)
|
|
10009
11039
|
});
|
|
10010
11040
|
}
|
|
@@ -10242,6 +11272,18 @@ function readThemeFooter(viewModel) {
|
|
|
10242
11272
|
return asPartialObject(asPartialObject(asPartialObject(viewModel?.["$root"])?.theme)?.footer);
|
|
10243
11273
|
}
|
|
10244
11274
|
/** The footer root: the main ground, its inks and the top rule. */
|
|
11275
|
+
const footerEdgeStyleTransform = {
|
|
11276
|
+
id: "layout.footerEdgeStyle",
|
|
11277
|
+
kind: "formatter",
|
|
11278
|
+
summary: "Resolve footer boundary geometry through the shared edge builder",
|
|
11279
|
+
run: (value, _options, context) => {
|
|
11280
|
+
const footer = asPartialObject(value);
|
|
11281
|
+
if (!footer?.edge) return void 0;
|
|
11282
|
+
const root = asPartialObject(context.viewModel?.$root);
|
|
11283
|
+
const tuning = root?.theme?.siteStyleId ? siteStyleEdges(asSiteStyleId(root.theme.siteStyleId)).supported.find((support) => footer.edge && transitionCatalogueEntryForIntent(footer.edge).family === support.family)?.tuning : void 0;
|
|
11284
|
+
return boundaryGeometryStyle(footer.edge, "footer", "previous", tuning);
|
|
11285
|
+
}
|
|
11286
|
+
};
|
|
10245
11287
|
const footerRootStyleTransform = {
|
|
10246
11288
|
id: "layout.footerRootStyle",
|
|
10247
11289
|
kind: "formatter",
|
|
@@ -10278,6 +11320,7 @@ const layoutTransforms = [
|
|
|
10278
11320
|
headerRootStyleTransform,
|
|
10279
11321
|
headerSectionBackgroundTransform,
|
|
10280
11322
|
footerRootStyleTransform,
|
|
11323
|
+
footerEdgeStyleTransform,
|
|
10281
11324
|
{
|
|
10282
11325
|
id: "layout.footerAreaStyle",
|
|
10283
11326
|
kind: "formatter",
|
|
@@ -10458,7 +11501,8 @@ const backgroundTransforms = [
|
|
|
10458
11501
|
summary: "Resolve inline styles for background color/gradient layers",
|
|
10459
11502
|
run: (value, options, context) => {
|
|
10460
11503
|
const fallbackToken = options?.fallbackToken;
|
|
10461
|
-
|
|
11504
|
+
const finish = asPartialObject(options)?.sectionGround ? sectionDecisionFromContent(context.data)?.finishedPaint : void 0;
|
|
11505
|
+
return finish ? finishedGroundStyle(finish) : resolveBackgroundLayerStyle(value, fallbackToken, context);
|
|
10462
11506
|
}
|
|
10463
11507
|
},
|
|
10464
11508
|
{
|
|
@@ -11369,7 +12413,7 @@ function serviceDetailsFacts(service) {
|
|
|
11369
12413
|
value: location
|
|
11370
12414
|
}] : [],
|
|
11371
12415
|
{
|
|
11372
|
-
label: "
|
|
12416
|
+
label: "Cancellation policy",
|
|
11373
12417
|
value: describePublicRefundPolicy(service.cancellationPolicy.refunds)
|
|
11374
12418
|
},
|
|
11375
12419
|
...practitioners.length ? [{
|
|
@@ -15582,7 +16626,7 @@ function canonicalizeFieldValue(plan, value) {
|
|
|
15582
16626
|
switch (plan.kind) {
|
|
15583
16627
|
case "media": return canonicalizeMedia(value);
|
|
15584
16628
|
case "group":
|
|
15585
|
-
if (plan.valueContract === "location") return value;
|
|
16629
|
+
if (plan.valueContract === "location" || plan.valueContract === "sectionGround" || plan.valueContract === "sectionTreatment") return value;
|
|
15586
16630
|
return plan.childSelection.kind === "discriminatedTabs" ? canonicalizeDiscriminatedGroup(plan, value) : canonicalizeObjectForWrite(plan.childSelection.fields, value);
|
|
15587
16631
|
case "repeater": return canonicalizeRepeater(plan, value);
|
|
15588
16632
|
case "string":
|
|
@@ -16032,10 +17076,11 @@ function normalizeManifestContentForWrite(plans, content, options = {}) {
|
|
|
16032
17076
|
return canonicalizeObjectForWrite(plans, normalizeStoredContentValues(plans, content, options));
|
|
16033
17077
|
}
|
|
16034
17078
|
function normalizeStoredFieldValueWithContext(plan, value, ctx) {
|
|
16035
|
-
if (value === null && !plan.required) return;
|
|
17079
|
+
if (value === null && !plan.required && !(plan.kind === "group" && sectionChoiceSchema(plan))) return;
|
|
16036
17080
|
switch (plan.kind) {
|
|
16037
17081
|
case "group":
|
|
16038
17082
|
if (plan.valueContract === "location") return normalizeLocationContract(value, ctx.mode);
|
|
17083
|
+
if (sectionChoiceSchema(plan)) return value;
|
|
16039
17084
|
return normalizeStoredObjectChildren(selectedGroupChildPlans(plan, value), value, childValidationContext(plan, ctx));
|
|
16040
17085
|
case "repeater": return normalizeStoredRepeaterItems(plan, value, ctx);
|
|
16041
17086
|
case "string":
|
|
@@ -16074,6 +17119,7 @@ function normalizeFieldValue(plan, value, ctx) {
|
|
|
16074
17119
|
case "string": return acceptsOptionalBlankAsMissing(plan, value) ? void 0 : value;
|
|
16075
17120
|
case "group":
|
|
16076
17121
|
if (plan.valueContract === "location") return normalizeLocationContract(value, ctx.mode);
|
|
17122
|
+
if (sectionChoiceSchema(plan)) return value;
|
|
16077
17123
|
return normalizeObjectChildren(selectedGroupChildPlans(plan, value), value, childValidationContext(plan, ctx));
|
|
16078
17124
|
case "repeater": return normalizeRepeaterItems(plan, value, ctx);
|
|
16079
17125
|
case "link":
|
|
@@ -16324,6 +17370,8 @@ function validateFlattenedGroupContainers(groupIds, item, plan, index, ctx) {
|
|
|
16324
17370
|
}] : []);
|
|
16325
17371
|
}
|
|
16326
17372
|
function validateGroupPlan(plan, value, ctx) {
|
|
17373
|
+
const choiceSchema = sectionChoiceSchema(plan);
|
|
17374
|
+
if (choiceSchema) return choiceSchema.safeParse(value).success ? [] : [issue(plan, "wrongType", { expected: "a section choice" })];
|
|
16327
17375
|
if (plan.valueContract === "location") return validateLocationGroupContract(plan, value, ctx);
|
|
16328
17376
|
if (!isPlainObject$1(value)) return [issue(plan, "wrongType", { expected: "an object" })];
|
|
16329
17377
|
if (plan.childSelection.kind === "discriminatedTabs") {
|
|
@@ -16504,6 +17552,9 @@ function isCanonicalEmailValue(value) {
|
|
|
16504
17552
|
function isCanonicalPhoneValue(value) {
|
|
16505
17553
|
return TEL_RE.test(value);
|
|
16506
17554
|
}
|
|
17555
|
+
function sectionChoiceSchema(plan) {
|
|
17556
|
+
return plan.valueContract === "sectionGround" ? sectionStylesOverrideSchema.shape.ground : plan.valueContract === "sectionTreatment" ? sectionTreatmentSchema.nullable() : null;
|
|
17557
|
+
}
|
|
16507
17558
|
function isCanonicalUrlValue(value, options = {}) {
|
|
16508
17559
|
if (!value) return false;
|
|
16509
17560
|
if (options.allowRelative === true && value.startsWith("/")) return true;
|
|
@@ -17494,9 +18545,9 @@ function joinAcrossRun(byPair, previousBlockId, nextBlockId, run) {
|
|
|
17494
18545
|
const exiting = lastOmittedId ? byPair.get(pairKey(lastOmittedId, nextBlockId)) : void 0;
|
|
17495
18546
|
const donor = entering ?? exiting;
|
|
17496
18547
|
return donor ? {
|
|
18548
|
+
...donor,
|
|
17497
18549
|
previousBlockId,
|
|
17498
|
-
nextBlockId
|
|
17499
|
-
treatment: donor.treatment
|
|
18550
|
+
nextBlockId
|
|
17500
18551
|
} : void 0;
|
|
17501
18552
|
}
|
|
17502
18553
|
/**
|
|
@@ -17520,24 +18571,39 @@ function composePageJoins(input) {
|
|
|
17520
18571
|
return [{
|
|
17521
18572
|
previousBlockId: previous.id,
|
|
17522
18573
|
nextBlockId: next.id,
|
|
17523
|
-
join: join ? composeJoin(join, before.facts, after.facts) : null,
|
|
18574
|
+
join: join ? composeJoin(join, before.facts, after.facts, input.context) : null,
|
|
17524
18575
|
seam: sectionSeam(before, after)
|
|
17525
18576
|
}];
|
|
17526
18577
|
});
|
|
17527
18578
|
}
|
|
17528
|
-
function composeJoin(join, previous, next) {
|
|
17529
|
-
|
|
17530
|
-
|
|
18579
|
+
function composeJoin(join, previous, next, context) {
|
|
18580
|
+
const boundaryId = pairKey(join.previousBlockId, join.nextBlockId);
|
|
18581
|
+
const outcome = composeBoundary(previous, next, join.treatment);
|
|
18582
|
+
const family = transitionCatalogueEntryForIntent(join.treatment).family;
|
|
18583
|
+
const tuning = context?.siteStyleId ? siteStyleEdges(asSiteStyleId(context.siteStyleId)).supported.find((support) => support.family === family)?.tuning : void 0;
|
|
18584
|
+
const identity = {
|
|
18585
|
+
boundaryId,
|
|
17531
18586
|
previousBlockId: join.previousBlockId,
|
|
17532
18587
|
nextBlockId: join.nextBlockId,
|
|
17533
|
-
treatment: join.treatment
|
|
17534
|
-
|
|
18588
|
+
treatment: join.treatment
|
|
18589
|
+
};
|
|
18590
|
+
return outcome.kind === "shown" ? {
|
|
18591
|
+
...identity,
|
|
18592
|
+
outcome,
|
|
18593
|
+
layout: boundaryLayout(join.treatment, outcome.composition, {
|
|
18594
|
+
edge: join.edge,
|
|
18595
|
+
palette: context?.palette,
|
|
18596
|
+
tuning,
|
|
18597
|
+
seed: boundaryId
|
|
18598
|
+
})
|
|
18599
|
+
} : {
|
|
18600
|
+
...identity,
|
|
18601
|
+
outcome
|
|
17535
18602
|
};
|
|
17536
18603
|
}
|
|
17537
18604
|
/** Placement, reserves and paint for a join that draws; null otherwise. */
|
|
17538
18605
|
function renderedJoinLayout(join) {
|
|
17539
|
-
|
|
17540
|
-
return boundaryLayout(join.treatment, join.outcome.composition);
|
|
18606
|
+
return join?.layout ?? null;
|
|
17541
18607
|
}
|
|
17542
18608
|
/** Joins with a missing id on either side cannot sit between two blocks. */
|
|
17543
18609
|
function joinsByPair(joins) {
|
|
@@ -17551,6 +18617,62 @@ function pairKey(previousBlockId, nextBlockId) {
|
|
|
17551
18617
|
return makeBoundaryId(asDesignBlockId(previousBlockId), asDesignBlockId(nextBlockId));
|
|
17552
18618
|
}
|
|
17553
18619
|
//#endregion
|
|
18620
|
+
//#region ../blocks/src/sectionBoundaryTextures.tsx
|
|
18621
|
+
/** A textured join's entire paint stack moves together, preserving colour/alpha order. */
|
|
18622
|
+
function sectionOwnsBoundaryPaint(layout) {
|
|
18623
|
+
return Boolean(layout.underlay?.texture || layout.paint.front.texture || layout.paint.back.some((paint) => paint.texture));
|
|
18624
|
+
}
|
|
18625
|
+
function boundaryColourCss(colour) {
|
|
18626
|
+
return colour.startsWith("#") ? colour : `rgb(var(--tb-${colour}))`;
|
|
18627
|
+
}
|
|
18628
|
+
/** Planes share their owner's full height. Only their edge masks extend outside its box. */
|
|
18629
|
+
function sectionBoundaryPaint(input) {
|
|
18630
|
+
const planes = [edgePlanes(renderedJoinLayout(input.before?.join ?? null), "start"), edgePlanes(renderedJoinLayout(input.after?.join ?? null), "end")].flat();
|
|
18631
|
+
return planes.length ? planes : null;
|
|
18632
|
+
}
|
|
18633
|
+
function edgePlanes(layout, side) {
|
|
18634
|
+
if (!layout || !sectionOwnsBoundaryPaint(layout)) return [];
|
|
18635
|
+
const underlay = side === "end" && layout.underlay ? [paintPlane(layout, layout.underlay, side, "underlay", -1)] : [];
|
|
18636
|
+
return side === (layout.placement === "next" ? "end" : "start") ? [
|
|
18637
|
+
...underlay,
|
|
18638
|
+
...layout.paint.back.map((paint, index) => paintPlane(layout, paint, side, "back", index)).reverse(),
|
|
18639
|
+
paintPlane(layout, layout.paint.front, side, "front", -1)
|
|
18640
|
+
] : underlay;
|
|
18641
|
+
}
|
|
18642
|
+
function planeGeometry(layout, side, underlay, index) {
|
|
18643
|
+
const height = underlay ? "var(--boundary-height)" : "var(--boundary-shape-height)";
|
|
18644
|
+
const offset = index < 0 ? 0 : (index + 1) * .12;
|
|
18645
|
+
const overhang = `calc(${height} * ${underlay || layout.placement === "centred" ? .5 + offset : 1 + offset})`;
|
|
18646
|
+
return {
|
|
18647
|
+
"--section-edge-height": height,
|
|
18648
|
+
top: side === "start" ? `calc(-1 * ${overhang})` : 0,
|
|
18649
|
+
bottom: side === "end" ? `calc(-1 * ${overhang})` : 0,
|
|
18650
|
+
"--section-texture-y": side === "start" ? overhang : "0px",
|
|
18651
|
+
maskPosition: side === "start" ? "0 0" : "0 100%",
|
|
18652
|
+
WebkitMaskPosition: side === "start" ? "0 0" : "0 100%"
|
|
18653
|
+
};
|
|
18654
|
+
}
|
|
18655
|
+
function backMasks(index) {
|
|
18656
|
+
return index >= 0 && index % 2 === 0 ? Object.fromEntries(["texture-mask", "section-mask"].flatMap((property) => ["wide", "narrow"].map((width) => [`--boundary-${property}-${width}`, `var(--boundary-back-${property}-${width})`]))) : {};
|
|
18657
|
+
}
|
|
18658
|
+
function paintPlane(layout, paint, side, role, index) {
|
|
18659
|
+
const style = {
|
|
18660
|
+
...layout.geometry,
|
|
18661
|
+
...backMasks(index),
|
|
18662
|
+
...planeGeometry(layout, side, role === "underlay", index),
|
|
18663
|
+
...paint.texture ? groundTextureStyle(paint.texture) : {},
|
|
18664
|
+
backgroundColor: boundaryColourCss(paint.colour),
|
|
18665
|
+
opacity: index < 0 ? 1 : (layout.paint.back.length - index) / (layout.paint.back.length + 1)
|
|
18666
|
+
};
|
|
18667
|
+
return /* @__PURE__ */ jsx("span", {
|
|
18668
|
+
"aria-hidden": "true",
|
|
18669
|
+
"data-section-edge-paint": role,
|
|
18670
|
+
"data-section-edge-side": side,
|
|
18671
|
+
"data-section-edge-fade": role !== "underlay" && layout.geometry["--boundary-shape-background"]?.startsWith("linear-gradient") ? "" : void 0,
|
|
18672
|
+
style
|
|
18673
|
+
}, `${side}:${role}:${index}`);
|
|
18674
|
+
}
|
|
18675
|
+
//#endregion
|
|
17554
18676
|
//#region ../blocks/src/pageRendererBoundaries.tsx
|
|
17555
18677
|
function joinSlotsByPair(slots) {
|
|
17556
18678
|
return new Map(slots.map((slot) => [joinSlotKey(slot.previousBlockId, slot.nextBlockId), slot]));
|
|
@@ -17567,16 +18689,7 @@ function renderJoinSlot(input) {
|
|
|
17567
18689
|
const { slot } = input;
|
|
17568
18690
|
if (!slot) return null;
|
|
17569
18691
|
const layout = renderedJoinLayout(slot.join);
|
|
17570
|
-
const painted = slot.join && layout ?
|
|
17571
|
-
"aria-hidden": "true",
|
|
17572
|
-
"data-block-boundary": "",
|
|
17573
|
-
"data-boundary-id": slot.join.boundaryId,
|
|
17574
|
-
"data-boundary-previous-block-id": slot.previousBlockId,
|
|
17575
|
-
"data-boundary-next-block-id": slot.nextBlockId,
|
|
17576
|
-
"data-boundary-treatment": slot.join.treatment,
|
|
17577
|
-
"data-boundary-placement": layout.placement,
|
|
17578
|
-
style: boundaryPaintStyle(layout.paint)
|
|
17579
|
-
}, `${input.blockKey}:boundary`) : null;
|
|
18692
|
+
const painted = slot.join && layout ? paintedBoundary(slot, slot.join, layout, input.blockKey) : null;
|
|
17580
18693
|
const extra = input.renderJoin?.({
|
|
17581
18694
|
previousBlockId: slot.previousBlockId,
|
|
17582
18695
|
nextBlockId: slot.nextBlockId,
|
|
@@ -17585,18 +18698,65 @@ function renderJoinSlot(input) {
|
|
|
17585
18698
|
if (!painted && (extra === null || extra === void 0)) return null;
|
|
17586
18699
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [painted, extra] }, `${input.blockKey}:join`);
|
|
17587
18700
|
}
|
|
17588
|
-
|
|
17589
|
-
* The one render-edge place a theme token becomes CSS.
|
|
17590
|
-
*/
|
|
17591
|
-
function themeTokenCss(token) {
|
|
17592
|
-
return `rgb(var(--tb-${token}))`;
|
|
17593
|
-
}
|
|
17594
|
-
function boundaryPaintStyle(paint) {
|
|
18701
|
+
function boundaryPaintStyle(layout) {
|
|
17595
18702
|
return {
|
|
17596
|
-
|
|
17597
|
-
|
|
18703
|
+
...layout.geometry,
|
|
18704
|
+
"--boundary-shape-paint": boundaryColourCss(layout.paint.front.colour),
|
|
18705
|
+
...layout.underlay ? { "--boundary-band-paint": boundaryColourCss(layout.underlay.colour) } : {}
|
|
17598
18706
|
};
|
|
17599
18707
|
}
|
|
18708
|
+
function paintedBoundary(slot, join, layout, key) {
|
|
18709
|
+
return /* @__PURE__ */ jsx("div", {
|
|
18710
|
+
"aria-hidden": "true",
|
|
18711
|
+
"data-block-boundary": "",
|
|
18712
|
+
"data-boundary-geometry": "",
|
|
18713
|
+
"data-boundary-section-owned": sectionOwnsBoundaryPaint(layout) ? "" : void 0,
|
|
18714
|
+
"data-boundary-id": join.boundaryId,
|
|
18715
|
+
"data-boundary-previous-block-id": slot.previousBlockId,
|
|
18716
|
+
"data-boundary-next-block-id": slot.nextBlockId,
|
|
18717
|
+
"data-boundary-treatment": join.treatment,
|
|
18718
|
+
"data-boundary-placement": layout.placement,
|
|
18719
|
+
style: boundaryPaintStyle(layout),
|
|
18720
|
+
children: sectionOwnsBoundaryPaint(layout) ? null : layout.paint.back.map((paint, index) => renderBackLayer(paint, index, layout))
|
|
18721
|
+
}, `${key}:boundary`);
|
|
18722
|
+
}
|
|
18723
|
+
function renderBackLayer(paint, index, layout) {
|
|
18724
|
+
const offset = 12 * (index + 1);
|
|
18725
|
+
const mirror = index % 2 === 0 ? "-1" : "1";
|
|
18726
|
+
const opacity = (layout.paint.back.length - index) / (layout.paint.back.length + 1);
|
|
18727
|
+
return /* @__PURE__ */ jsx("span", {
|
|
18728
|
+
"data-boundary-back": "",
|
|
18729
|
+
style: {
|
|
18730
|
+
...{
|
|
18731
|
+
previous: {
|
|
18732
|
+
paint: {
|
|
18733
|
+
bottom: 0,
|
|
18734
|
+
transform: `translateY(-${offset}%) scaleX(${mirror})`
|
|
18735
|
+
},
|
|
18736
|
+
texture: { bottom: `calc(var(--boundary-height) * ${offset / 100})` }
|
|
18737
|
+
},
|
|
18738
|
+
next: {
|
|
18739
|
+
paint: {
|
|
18740
|
+
top: 0,
|
|
18741
|
+
transform: `translateY(${offset}%) scaleY(-1) scaleX(${mirror})`
|
|
18742
|
+
},
|
|
18743
|
+
texture: { top: `calc(var(--boundary-height) * ${offset / 100})` }
|
|
18744
|
+
},
|
|
18745
|
+
centred: {
|
|
18746
|
+
paint: {
|
|
18747
|
+
top: 0,
|
|
18748
|
+
transform: `translateY(-${50 + offset}%) scaleX(${mirror})`
|
|
18749
|
+
},
|
|
18750
|
+
texture: { top: `calc(var(--boundary-shape-height) / -2 - var(--boundary-height) * ${offset / 100})` }
|
|
18751
|
+
}
|
|
18752
|
+
}[layout.placement].paint,
|
|
18753
|
+
opacity,
|
|
18754
|
+
"--boundary-shape-paint": boundaryColourCss(paint.colour),
|
|
18755
|
+
"--boundary-shape-background": layout.geometry["--boundary-shape-background"],
|
|
18756
|
+
"--boundary-shape-background-mixed": layout.geometry["--boundary-shape-background-mixed"]
|
|
18757
|
+
}
|
|
18758
|
+
}, index);
|
|
18759
|
+
}
|
|
17600
18760
|
/**
|
|
17601
18761
|
* Reserve attributes and variables for a block wrapper, from the joins on
|
|
17602
18762
|
* either side. A join's `before` reserve sits inside its previous section, so
|
|
@@ -17606,16 +18766,19 @@ function boundaryPaintStyle(paint) {
|
|
|
17606
18766
|
function blockBoundaryReserves(input) {
|
|
17607
18767
|
const top = reserveOnSide(input.before, "after");
|
|
17608
18768
|
const bottom = reserveOnSide(input.after, "before");
|
|
18769
|
+
const edgePaint = sectionBoundaryPaint(input);
|
|
17609
18770
|
const style = {
|
|
18771
|
+
...edgePaint ? { position: "relative" } : {},
|
|
17610
18772
|
...top ? { "--site-style-boundary-before-reserve": top.length } : {},
|
|
17611
18773
|
...bottom ? { "--site-style-boundary-after-reserve": bottom.length } : {}
|
|
17612
18774
|
};
|
|
17613
18775
|
return {
|
|
18776
|
+
edgePaint,
|
|
17614
18777
|
topPlacement: top?.placement,
|
|
17615
18778
|
bottomPlacement: bottom?.placement,
|
|
17616
18779
|
seamBefore: seamAttribute(input.before),
|
|
17617
18780
|
seamAfter: seamAttribute(input.after),
|
|
17618
|
-
style:
|
|
18781
|
+
style: Object.keys(style).length ? style : void 0
|
|
17619
18782
|
};
|
|
17620
18783
|
}
|
|
17621
18784
|
function seamAttribute(slot) {
|
|
@@ -18198,18 +19361,11 @@ function heroSplitImagePane() {
|
|
|
18198
19361
|
return stack({
|
|
18199
19362
|
gap: "none",
|
|
18200
19363
|
...lookSlot("media"),
|
|
18201
|
-
className:
|
|
18202
|
-
|
|
18203
|
-
transforms: [{
|
|
18204
|
-
id: "ui.imageShapeClassName",
|
|
18205
|
-
options: { baseClass: "rb-relative rb-overflow-hidden rb-rounded-3xl" }
|
|
18206
|
-
}],
|
|
18207
|
-
fallback: "rb-relative rb-overflow-hidden rb-rounded-3xl"
|
|
18208
|
-
} },
|
|
18209
|
-
style: { minHeight: { $bind: {
|
|
19364
|
+
className: "rb-relative rb-overflow-hidden rb-rounded-3xl",
|
|
19365
|
+
style: { $bind: {
|
|
18210
19366
|
from: "content",
|
|
18211
|
-
transforms: [{ id: "look.
|
|
18212
|
-
} }
|
|
19367
|
+
transforms: [{ id: "look.splitPhotoStyle" }]
|
|
19368
|
+
} }
|
|
18213
19369
|
}, [media({
|
|
18214
19370
|
className: "rb-absolute rb-inset-0 rb-h-full rb-w-full rb-object-cover",
|
|
18215
19371
|
...heroPriorityMediaProps,
|
|
@@ -18736,17 +19892,23 @@ const classPricesEditing = {
|
|
|
18736
19892
|
const priceItem = styledCard([
|
|
18737
19893
|
text({
|
|
18738
19894
|
as: "p",
|
|
19895
|
+
className: "class-prices-figure",
|
|
18739
19896
|
...lookSlot("item-meta")
|
|
18740
19897
|
}, bind("price.figure")),
|
|
18741
19898
|
text({
|
|
18742
19899
|
as: "h3",
|
|
19900
|
+
className: "class-prices-name",
|
|
18743
19901
|
...lookSlot("item-title")
|
|
18744
19902
|
}, bind("price.label")),
|
|
18745
19903
|
text({
|
|
18746
19904
|
as: "p",
|
|
19905
|
+
className: "class-prices-text",
|
|
18747
19906
|
...lookSlot("item-text")
|
|
18748
19907
|
}, bind("price.text"), when("price.text")),
|
|
18749
|
-
el("div",
|
|
19908
|
+
el("div", {
|
|
19909
|
+
className: "class-prices-action",
|
|
19910
|
+
...lookSlot("item-actions")
|
|
19911
|
+
}, [link({
|
|
18750
19912
|
className: "rb-item-text-link",
|
|
18751
19913
|
linkRequired: true,
|
|
18752
19914
|
href: { $bind: {
|
|
@@ -18757,12 +19919,14 @@ const priceItem = styledCard([
|
|
|
18757
19919
|
], {
|
|
18758
19920
|
stylesFrom: "content._cardStyles",
|
|
18759
19921
|
backgroundFrom: "content._cardStyles.background",
|
|
19922
|
+
baseClassName: "class-prices-item rb-relative rb-isolate rb-overflow-visible rb-border",
|
|
18760
19923
|
dataProps: {
|
|
18761
19924
|
...lookSlot("item"),
|
|
18762
19925
|
"data-card-list-item": true
|
|
18763
19926
|
}
|
|
18764
19927
|
});
|
|
18765
19928
|
const items = el("div", {
|
|
19929
|
+
className: "class-prices-list",
|
|
18766
19930
|
...lookSlot("items"),
|
|
18767
19931
|
"data-meta-position": "end",
|
|
18768
19932
|
"data-card-list": true
|
|
@@ -19183,21 +20347,18 @@ function introCopyStack(options = {}) {
|
|
|
19183
20347
|
}
|
|
19184
20348
|
const introMedia = media({
|
|
19185
20349
|
...lookSlot("photo"),
|
|
19186
|
-
className:
|
|
20350
|
+
className: "rb-intro-media rb-w-full rb-h-auto rb-object-cover",
|
|
20351
|
+
"data-photo-shape": { $bind: {
|
|
19187
20352
|
from: "content.imageShape",
|
|
19188
|
-
|
|
19189
|
-
id: "ui.imageShapeClassName",
|
|
19190
|
-
options: { baseClass: "rb-intro-media rb-w-full rb-h-auto rb-object-cover" }
|
|
19191
|
-
}],
|
|
19192
|
-
fallback: "rb-intro-media rb-w-full rb-h-auto rb-object-cover"
|
|
20353
|
+
fallback: "default"
|
|
19193
20354
|
} },
|
|
19194
|
-
style: {
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
}
|
|
19200
|
-
}
|
|
20355
|
+
style: { $bind: {
|
|
20356
|
+
from: "content",
|
|
20357
|
+
transforms: [{
|
|
20358
|
+
id: "ui.photoFrameStyle",
|
|
20359
|
+
options: { fallbackRatio: "1/1" }
|
|
20360
|
+
}]
|
|
20361
|
+
} }
|
|
19201
20362
|
}, bind("content.media"), when("content.media"));
|
|
19202
20363
|
const centeredCopyLayout = styledSection({
|
|
19203
20364
|
children: styledContainer({
|
|
@@ -21042,6 +22203,11 @@ const footerEdge = el("div", {
|
|
|
21042
22203
|
"aria-hidden": "true",
|
|
21043
22204
|
"data-block-boundary": "",
|
|
21044
22205
|
"data-footer-edge": "",
|
|
22206
|
+
"data-boundary-geometry": "",
|
|
22207
|
+
style: { $bind: {
|
|
22208
|
+
from: "$root.theme.footer",
|
|
22209
|
+
transforms: [{ id: "layout.footerEdgeStyle" }]
|
|
22210
|
+
} },
|
|
21045
22211
|
"data-boundary-treatment": { $bind: { from: "$root.theme.footer.edge" } },
|
|
21046
22212
|
"data-boundary-placement": "previous"
|
|
21047
22213
|
}, null, when("$root.theme.footer.edge"));
|
|
@@ -23035,18 +24201,15 @@ const mediaTextBlockDefinition = { manifest: createBlockManifest({
|
|
|
23035
24201
|
const bioTextColumn = el("div", { className: "rb-flex rb-h-full rb-w-full rb-max-w-prose rb-flex-col rb-justify-center rb-gap-5" }, [copyHeading, ...textContentNodes(bodyClassNameFromAlignment)]);
|
|
23036
24202
|
const defaultImageCommonProps = {
|
|
23037
24203
|
...lookSlot("photo"),
|
|
23038
|
-
className:
|
|
24204
|
+
className: "rb-w-full rb-h-auto rb-object-cover",
|
|
24205
|
+
"data-photo-shape": { $bind: {
|
|
23039
24206
|
from: "content.imageShape",
|
|
23040
|
-
|
|
23041
|
-
id: "ui.imageShapeClassName",
|
|
23042
|
-
options: { baseClass: "rb-w-full rb-h-auto rb-object-cover" }
|
|
23043
|
-
}],
|
|
23044
|
-
fallback: "rb-w-full rb-h-auto rb-object-cover"
|
|
24207
|
+
fallback: "default"
|
|
23045
24208
|
} },
|
|
23046
|
-
style: {
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
}
|
|
24209
|
+
style: { $bind: {
|
|
24210
|
+
from: "content",
|
|
24211
|
+
transforms: [{ id: "ui.photoFrameStyle" }]
|
|
24212
|
+
} }
|
|
23050
24213
|
};
|
|
23051
24214
|
const defaultSingleImage = media(defaultImageCommonProps, bind("content.images[0].image"), when("content.images[0].image"));
|
|
23052
24215
|
const defaultCarouselImages = carousel({
|
|
@@ -23484,7 +24647,16 @@ const appointmentServicesBlockDefinition = {
|
|
|
23484
24647
|
required: false,
|
|
23485
24648
|
multiple: false,
|
|
23486
24649
|
optionSource: "appointmentServiceCategories",
|
|
23487
|
-
ui: {
|
|
24650
|
+
ui: {
|
|
24651
|
+
intent: "content",
|
|
24652
|
+
visibleWhen: { anyOf: [{
|
|
24653
|
+
fact: "appointments.serviceCategories",
|
|
24654
|
+
is: "some"
|
|
24655
|
+
}, {
|
|
24656
|
+
field: "categoryId",
|
|
24657
|
+
hasValue: true
|
|
24658
|
+
}] }
|
|
24659
|
+
}
|
|
23488
24660
|
}),
|
|
23489
24661
|
sectionStylesField({
|
|
23490
24662
|
id: "_sectionStyles",
|
|
@@ -23567,7 +24739,16 @@ const weeklySlotAvailabilityManifest = createBlockManifest({
|
|
|
23567
24739
|
required: false,
|
|
23568
24740
|
referenceKind: "appointmentResource",
|
|
23569
24741
|
allowManualEntry: false,
|
|
23570
|
-
ui: {
|
|
24742
|
+
ui: {
|
|
24743
|
+
intent: "behavior",
|
|
24744
|
+
visibleWhen: { anyOf: [{
|
|
24745
|
+
fact: "appointments.resources",
|
|
24746
|
+
is: "several"
|
|
24747
|
+
}, {
|
|
24748
|
+
field: "resourceId",
|
|
24749
|
+
hasValue: true
|
|
24750
|
+
}] }
|
|
24751
|
+
}
|
|
23571
24752
|
},
|
|
23572
24753
|
{
|
|
23573
24754
|
id: "horizonWeeks",
|
|
@@ -29492,14 +30673,14 @@ function planPageRender(input, previous = null) {
|
|
|
29492
30673
|
return [entry, {
|
|
29493
30674
|
position,
|
|
29494
30675
|
placement,
|
|
29495
|
-
entry: cached?.position === position && cached.placement === placement ? cached.entry : applyArrangementRhythm(entry, position, placement)
|
|
30676
|
+
entry: cached?.position === position && cached.placement === placement ? cached.entry : applyArrangementRhythm(entry, position, placement, input.palette)
|
|
29496
30677
|
}];
|
|
29497
30678
|
});
|
|
29498
30679
|
return {
|
|
29499
30680
|
region,
|
|
29500
30681
|
planned,
|
|
29501
30682
|
rhythmic,
|
|
29502
|
-
entries: rhythmic
|
|
30683
|
+
entries: deepenArrangementRhythm(rhythmic, placement, input.palette).filter(shown)
|
|
29503
30684
|
};
|
|
29504
30685
|
});
|
|
29505
30686
|
const regions = {
|
|
@@ -29526,7 +30707,7 @@ function planPageRender(input, previous = null) {
|
|
|
29526
30707
|
};
|
|
29527
30708
|
}
|
|
29528
30709
|
function samePlanSettings(previous, current) {
|
|
29529
|
-
return previous.siteStyleId === current.siteStyleId && previous.audience === current.audience && previous.previewStage === current.previewStage && previous.sdkConfig === current.sdkConfig && previous.customBlocks === current.customBlocks && previous.blockOverrides === current.blockOverrides;
|
|
30710
|
+
return previous.siteStyleId === current.siteStyleId && previous.palette === current.palette && previous.audience === current.audience && previous.previewStage === current.previewStage && previous.sdkConfig === current.sdkConfig && previous.customBlocks === current.customBlocks && previous.blockOverrides === current.blockOverrides;
|
|
29530
30711
|
}
|
|
29531
30712
|
/**
|
|
29532
30713
|
* Mirrors the order of the checks `MemoBlockSection` used to make inline, so no
|
|
@@ -29678,11 +30859,8 @@ function restoreCompiledLook(look) {
|
|
|
29678
30859
|
};
|
|
29679
30860
|
}
|
|
29680
30861
|
function restoreArrangementRuntime(runtime) {
|
|
29681
|
-
const transported = runtime;
|
|
29682
|
-
const fieldGrounds = Array.isArray(transported.fieldGrounds) ? transported.fieldGrounds.filter((token) => typeof token === "string") : [];
|
|
29683
30862
|
return {
|
|
29684
30863
|
...runtime,
|
|
29685
|
-
fieldGrounds,
|
|
29686
30864
|
available: runtime.available.map(restoreCompiledLook),
|
|
29687
30865
|
byMode: Object.fromEntries(Object.entries(runtime.byMode).map(([mode, look]) => [mode, restoreCompiledLook(look)]))
|
|
29688
30866
|
};
|
|
@@ -29693,7 +30871,27 @@ function effectiveLookFromContent(content) {
|
|
|
29693
30871
|
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
29694
30872
|
}
|
|
29695
30873
|
function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
29696
|
-
|
|
30874
|
+
const content = withoutSectionDecision(planArrangementBlockContent(blockKind, manifest, authored, audience).renderableContent);
|
|
30875
|
+
const runtime = arrangementRuntime(content);
|
|
30876
|
+
const look = effectiveLookFromContent(content);
|
|
30877
|
+
if (!runtime || !look) return content;
|
|
30878
|
+
const section = resolveRuntimeSection({
|
|
30879
|
+
content,
|
|
30880
|
+
runtime,
|
|
30881
|
+
look,
|
|
30882
|
+
blockKind,
|
|
30883
|
+
arrangementKey: look.look.structure.byMode[readStoredMode({
|
|
30884
|
+
...arrangementManifestFromVariants(manifest),
|
|
30885
|
+
variantMeaning: manifest.variantMeaning
|
|
30886
|
+
}, content) ?? "default"],
|
|
30887
|
+
position: 0,
|
|
30888
|
+
placement: "page-wide",
|
|
30889
|
+
palette: runtime.surfaceContext.palette
|
|
30890
|
+
});
|
|
30891
|
+
return {
|
|
30892
|
+
...content,
|
|
30893
|
+
_sectionDecision: section
|
|
30894
|
+
};
|
|
29697
30895
|
}
|
|
29698
30896
|
function planArrangementBlockContent(blockKind, manifest, authored, audience) {
|
|
29699
30897
|
const runtime = arrangementRuntime(authored);
|
|
@@ -29861,47 +31059,73 @@ function arrangementContentHooks(effective, mode, length, facts, values, photoCo
|
|
|
29861
31059
|
...Object.fromEntries(Object.entries(values).map(([key, value]) => [`data-knob-${key === "titleSize" ? "headline" : key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}`, value]))
|
|
29862
31060
|
};
|
|
29863
31061
|
}
|
|
29864
|
-
|
|
31062
|
+
/** Read participation from the section owner; the planner supplies composition, never grounds. */
|
|
31063
|
+
function deepenArrangementRhythm(rhythmic, placement, palette) {
|
|
31064
|
+
const driven = rhythmic.filter(([, value]) => value.entry.sectionDecision?.source === "rhythm").map(([entry]) => entry);
|
|
31065
|
+
return rhythmic.map(([original, value]) => {
|
|
31066
|
+
if (arrangementRuntime(original.renderableContent)?.progression !== "deepen") return value.entry;
|
|
31067
|
+
const position = driven.indexOf(original);
|
|
31068
|
+
return position < 0 ? value.entry : applyArrangementRhythm(original, value.position, placement, palette, {
|
|
31069
|
+
position,
|
|
31070
|
+
count: driven.length
|
|
31071
|
+
});
|
|
31072
|
+
});
|
|
31073
|
+
}
|
|
31074
|
+
function applyArrangementRhythm(entry, position, placement, palette = {}, rhythmSpan) {
|
|
29865
31075
|
const runtime = arrangementRuntime(entry.renderableContent);
|
|
29866
31076
|
const look = effectiveLookFromContent(entry.renderableContent);
|
|
29867
|
-
|
|
29868
|
-
const content = entry.renderableContent;
|
|
31077
|
+
const content = withoutSectionDecision(entry.renderableContent);
|
|
29869
31078
|
const section = resolveRuntimeSection({
|
|
29870
31079
|
content,
|
|
29871
31080
|
runtime,
|
|
29872
31081
|
look,
|
|
29873
31082
|
position,
|
|
29874
31083
|
placement,
|
|
31084
|
+
rhythmSpan,
|
|
29875
31085
|
blockKind: entry.block.kind,
|
|
29876
31086
|
arrangementKey: entry.kind === "renderable" ? entry.effectiveArrangementKey ?? void 0 : void 0,
|
|
29877
|
-
palette: runtime
|
|
31087
|
+
palette: runtime?.surfaceContext.palette ?? palette
|
|
29878
31088
|
});
|
|
29879
31089
|
const resolved = section.background;
|
|
29880
31090
|
const updated = applyResolvedArrangementBackground(content, resolved);
|
|
29881
|
-
|
|
31091
|
+
if (!runtime || !look) return {
|
|
31092
|
+
...entry,
|
|
31093
|
+
renderableContent: content,
|
|
31094
|
+
sectionDecision: {
|
|
31095
|
+
...section,
|
|
31096
|
+
lookId: null
|
|
31097
|
+
}
|
|
31098
|
+
};
|
|
31099
|
+
const surface = section.surfaceToken;
|
|
29882
31100
|
const grounded = resolveArrangementSurfaces(entry, look, runtime, section, updated);
|
|
29883
|
-
const shape = sectionShapeHook(
|
|
31101
|
+
const shape = sectionShapeHook(section.shape);
|
|
29884
31102
|
const combined = resolveCombinedLook(entry, grounded, runtime, section, updated);
|
|
29885
31103
|
return {
|
|
29886
31104
|
...entry,
|
|
29887
31105
|
sectionDecision: {
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
paint: section.paint
|
|
31106
|
+
...section,
|
|
31107
|
+
lookId: look.look.id
|
|
29891
31108
|
},
|
|
29892
|
-
styleBackground: section.styleBackground,
|
|
29893
31109
|
renderableContent: {
|
|
29894
31110
|
...updated,
|
|
31111
|
+
_sectionDecision: section,
|
|
29895
31112
|
...combined ? { _combinedLook: combined } : {},
|
|
29896
31113
|
_effectiveLook: grounded,
|
|
29897
31114
|
_lookHooks: {
|
|
29898
31115
|
...isObjectRecord(updated._lookHooks) ? updated._lookHooks : {},
|
|
29899
31116
|
"data-surface": surface,
|
|
29900
|
-
...shape
|
|
31117
|
+
...shape,
|
|
31118
|
+
...groundFinishHooks(section.finishedPaint)
|
|
29901
31119
|
}
|
|
29902
31120
|
}
|
|
29903
31121
|
};
|
|
29904
31122
|
}
|
|
31123
|
+
/** Only the planner mints `_sectionDecision`; one arriving with content (an import, an SDK payload, an earlier plan) is dropped. */
|
|
31124
|
+
function withoutSectionDecision(content) {
|
|
31125
|
+
if (!("_sectionDecision" in content)) return content;
|
|
31126
|
+
const { _sectionDecision: _stale, ...rest } = content;
|
|
31127
|
+
return rest;
|
|
31128
|
+
}
|
|
29905
31129
|
function applyResolvedArrangementBackground(content, resolved) {
|
|
29906
31130
|
const section = isObjectRecord(content._sectionStyles) ? content._sectionStyles : {};
|
|
29907
31131
|
const photo = isObjectRecord(section.background) ? section.background.image : void 0;
|
|
@@ -29961,11 +31185,13 @@ function resolveArrangementSurfaces(entry, look, runtime, section, content) {
|
|
|
29961
31185
|
surfaces: runtime.surfaces,
|
|
29962
31186
|
context: runtime.surfaceContext
|
|
29963
31187
|
};
|
|
31188
|
+
const parents = plannedSlotParents(entry, look);
|
|
31189
|
+
const base = section.certifiedBackdrop;
|
|
29964
31190
|
const surfacePresentation = resolveLookSurfacePresentation({
|
|
29965
31191
|
look,
|
|
29966
|
-
parents
|
|
31192
|
+
parents,
|
|
29967
31193
|
ground,
|
|
29968
|
-
base
|
|
31194
|
+
base,
|
|
29969
31195
|
style,
|
|
29970
31196
|
content
|
|
29971
31197
|
});
|
|
@@ -29988,7 +31214,7 @@ function resolveCombinedLook(entry, list, runtime, section, content) {
|
|
|
29988
31214
|
look: month,
|
|
29989
31215
|
parents: arrangementSlotParentsForManifest(entry.kind === "renderable" ? entry.definition.manifest : void 0, month.look.target, arrangement),
|
|
29990
31216
|
ground,
|
|
29991
|
-
base:
|
|
31217
|
+
base: section.certifiedBackdrop,
|
|
29992
31218
|
content,
|
|
29993
31219
|
style: {
|
|
29994
31220
|
roleMap: month.roleMap,
|
|
@@ -30181,10 +31407,17 @@ const formSchema = z.union([z.null(), z.object({
|
|
|
30181
31407
|
const productsSchema = z.object({ products: z.array(z.object({ slug: z.string() })) });
|
|
30182
31408
|
const passesSchema = z.object({ passes: countSchema }).transform(({ passes }) => passes);
|
|
30183
31409
|
const membershipsSchema = z.object({ memberships: countSchema }).transform(({ memberships }) => memberships);
|
|
31410
|
+
const giftingSchema = z.object({
|
|
31411
|
+
giftCards: countSchema,
|
|
31412
|
+
vouchers: countSchema
|
|
31413
|
+
});
|
|
30184
31414
|
/** Both producers pass raw facts through the same stage admission. */
|
|
30185
31415
|
function readinessFactsFromLoaders(stage, input) {
|
|
30186
31416
|
const facts = {
|
|
30187
31417
|
catalogue: loaderFactProducers.catalogue(input),
|
|
31418
|
+
gifting: loaderFactProducers.gifting(input),
|
|
31419
|
+
eventFilters: loaderFactProducers.eventFilters(input),
|
|
31420
|
+
appointments: loaderFactProducers.appointments(input),
|
|
30188
31421
|
mailingList: loaderFactProducers.mailingList(input),
|
|
30189
31422
|
testimonials: loaderFactProducers.testimonials(input),
|
|
30190
31423
|
events: loaderFactProducers.events(input),
|
|
@@ -30207,6 +31440,9 @@ const loaderFactProducers = {
|
|
|
30207
31440
|
memberships: memberships.value
|
|
30208
31441
|
}) : unavailableReadinessFact;
|
|
30209
31442
|
},
|
|
31443
|
+
gifting: (input) => firstLoaderFact(input, "gifting", "offers", giftingSchema),
|
|
31444
|
+
eventFilters: () => unavailableReadinessFact,
|
|
31445
|
+
appointments: () => unavailableReadinessFact,
|
|
30210
31446
|
mailingList: (input) => input.mailingList === void 0 ? unavailableReadinessFact : loadedReadinessFact(input.mailingList),
|
|
30211
31447
|
testimonials: (input) => mapReadinessFact(firstLoaderFact(input, "testimonials", "entries", countSchema), (count) => ({
|
|
30212
31448
|
count,
|
|
@@ -30521,6 +31757,10 @@ function composeSurvivorJoins(plan, survivors, themeResources) {
|
|
|
30521
31757
|
originalBlocks: plan.regions.main.map((planned) => planned.block),
|
|
30522
31758
|
survivingBlocks: new Set(survivors.map((survivor) => survivor.entry.block))
|
|
30523
31759
|
}),
|
|
31760
|
+
context: themeResources.kind === "available" ? {
|
|
31761
|
+
siteStyleId: themeResources.config?.siteStyleId,
|
|
31762
|
+
palette: themeResources.tokens.palette
|
|
31763
|
+
} : void 0,
|
|
30524
31764
|
survivors: survivors.map(({ entry }) => ({
|
|
30525
31765
|
id: entry.block.id,
|
|
30526
31766
|
kind: entry.block.kind,
|
|
@@ -31026,7 +32266,7 @@ function renderPlanEntry(input) {
|
|
|
31026
32266
|
before: joinBefore,
|
|
31027
32267
|
after: joinAfter
|
|
31028
32268
|
});
|
|
31029
|
-
const blockElement = /* @__PURE__ */
|
|
32269
|
+
const blockElement = /* @__PURE__ */ jsxs("div", {
|
|
31030
32270
|
id: blockAnchorId(block),
|
|
31031
32271
|
className: wrapperClassName,
|
|
31032
32272
|
...arrangementHooksFromContent(renderableContent),
|
|
@@ -31046,7 +32286,7 @@ function renderPlanEntry(input) {
|
|
|
31046
32286
|
"data-site-style-seam-after": reserves.seamAfter,
|
|
31047
32287
|
"data-style-group": styleGroup,
|
|
31048
32288
|
style: reserves.style,
|
|
31049
|
-
children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
|
|
32289
|
+
children: [/* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }), reserves.edgePaint]
|
|
31050
32290
|
}, blockKey);
|
|
31051
32291
|
if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
|
|
31052
32292
|
return blockElement;
|
|
@@ -32442,6 +33682,7 @@ function blockDesignInputsForDefinition(blockKind, definition, content) {
|
|
|
32442
33682
|
const resolveRuntimeJoinFacts = (blocks, palette, siteStyleId) => {
|
|
32443
33683
|
const plan = buildPageRenderPlan({
|
|
32444
33684
|
page: { blocks: blocks.map(joinPresentationBlock) },
|
|
33685
|
+
palette,
|
|
32445
33686
|
siteStyleId,
|
|
32446
33687
|
audience: "public",
|
|
32447
33688
|
runtimeJoins: void 0,
|
|
@@ -32458,20 +33699,13 @@ const resolveRuntimeJoinFacts = (blocks, palette, siteStyleId) => {
|
|
|
32458
33699
|
ground: "light",
|
|
32459
33700
|
paint: "other"
|
|
32460
33701
|
}];
|
|
32461
|
-
const section = entry.sectionDecision
|
|
32462
|
-
|
|
32463
|
-
palette,
|
|
32464
|
-
runtime: null,
|
|
32465
|
-
look: null,
|
|
32466
|
-
blockKind: block.blockKind,
|
|
32467
|
-
arrangementKey: void 0,
|
|
32468
|
-
position: 0,
|
|
32469
|
-
placement: "page-wide"
|
|
32470
|
-
});
|
|
33702
|
+
const section = entry.sectionDecision;
|
|
33703
|
+
if (!section) throw new Error("Render planner did not decide the section");
|
|
32471
33704
|
return [block.blockId, {
|
|
32472
33705
|
lookId: entry.sectionDecision?.lookId ?? block.lookId,
|
|
32473
33706
|
ground: section.ground,
|
|
32474
|
-
|
|
33707
|
+
groundName: section.groundName ?? section.surfaceToken,
|
|
33708
|
+
paint: section.paintKind
|
|
32475
33709
|
}];
|
|
32476
33710
|
}));
|
|
32477
33711
|
};
|
|
@@ -34668,7 +35902,7 @@ function outlineFromFacts({ event, identity, details }, design, sections) {
|
|
|
34668
35902
|
attrs: { level: 2 },
|
|
34669
35903
|
content: [{
|
|
34670
35904
|
type: "text",
|
|
34671
|
-
text: "
|
|
35905
|
+
text: "Cancellation policy"
|
|
34672
35906
|
}]
|
|
34673
35907
|
}, {
|
|
34674
35908
|
type: "paragraph",
|