@riverbankcms/sdk 0.183.0 → 0.185.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-Bu0O7l4p.d.ts} +1 -1
- package/dist/_dts/{Page-CEqZJZEE.d.ts → Page-DYoL0IWL.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DQejfbXL.d.ts → SdkPreviewMode-DgFAiR8r.d.ts} +2 -2
- package/dist/_dts/{client-B_B_amKD.d.ts → client-BKdjJ7A0.d.ts} +35 -4
- package/dist/_dts/{content-types-Dhx5Ocvx.d.ts → content-types-6K7zlJuF.d.ts} +2 -2
- package/dist/_dts/{contracts-FeOnfoa1.d.ts → contracts-CUR8ccnX.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-m70J6tit.d.ts → generatePageMetadata-CveWSMew.d.ts} +2 -2
- package/dist/_dts/{index-CjAkEWAp.d.ts → index-6WypKfbu.d.ts} +4 -4
- package/dist/_dts/{index-iuFrbIjt.d.ts → index-BMwrFX_K.d.ts} +1 -1
- package/dist/_dts/{index-BxCmCit0.d.ts → index-Bp5lk6I8.d.ts} +1 -1
- package/dist/_dts/{index-BOpUh8kO.d.ts → index-DTKn1H8g.d.ts} +3 -3
- package/dist/_dts/{index-Bizdaxji.d.ts → index-DX-Xe54X.d.ts} +2 -2
- package/dist/_dts/{index-liuhlOX7.d.ts → index-SD1fTP_7.d.ts} +2 -2
- package/dist/_dts/{loadContent-D4wrTIIw.d.ts → loadContent-BN8GtRsL.d.ts} +7 -7
- package/dist/_dts/{request-Gn0O1blj.d.ts → request-BwYvMqLf.d.ts} +78461 -77905
- package/dist/_dts/{resolveBlockData-D5duwuqS.d.ts → resolveBlockData-CYy0VlSK.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-xzJ3c9Na.d.ts → resolvePageContent-BwUDLi_W.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-CMNev0gz.d.ts} +19 -8
- package/dist/_dts/{types-DBNuMtSk.d.ts → types-BBazdRQf.d.ts} +9 -10
- package/dist/_dts/{types-DHMcuoeQ.d.ts → types-BwngWRQ8.d.ts} +13 -15
- package/dist/_dts/{types-BoITy0rA.d.ts → types-C9_amrul.d.ts} +6 -2
- package/dist/_dts/{validation-BIPO-XlE.d.ts → validation-B58kUTuV.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-Ct8slgRk.mjs → BlocksIslandsHydrator-CooOPhs3.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-qqTxGGS4.mjs → BookingMailingListNote-D_khdttF.mjs} +61 -62
- package/dist/client/{BookingQuestionFields-DCh9MUIF.mjs → BookingQuestionFields-Bia1E7Cj.mjs} +49 -36
- package/dist/client/{CalendarAction-RcdaStG7.mjs → CalendarAction-C-AbMmct.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-D7Wt-Oaa.mjs → CalendarNavigationChevron-oaHxRbUO.mjs} +7 -7
- package/dist/client/{CheckboxChoice-BdGxZWeg.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-HFVkoOac.mjs → DemoBookingPortalAccess-M2xKYQjX.mjs} +7 -5
- package/dist/client/{EventCalendar.client-BtkJW8bA.mjs → EventCalendar.client-By7e9nyF.mjs} +11 -11
- package/dist/client/{EventCombined.client-DxaGjFFS.mjs → EventCombined.client-BdRZXB14.mjs} +10 -10
- package/dist/client/EventEmbeddedCheckoutStep-CJoxbx2Y.mjs +147 -0
- package/dist/client/{EventItem-Fr2qi2C2.mjs → EventItem-CDMa9zOX.mjs} +5 -5
- package/dist/client/{EventListWeekNavigation-BRMaq0ky.mjs → EventListWeekNavigation-B8WKaCrN.mjs} +1 -1
- package/dist/client/{EventListing.client-BhGxfbjt.mjs → EventListing.client-BEGiiFnO.mjs} +3 -3
- package/dist/client/{EventListing.view-COuEJzbO.mjs → EventListing.view-B6LOK-z4.mjs} +84 -7
- package/dist/client/{EventRegistrationPayment-BTLYhVxD.mjs → EventRegistrationPayment-CARdr15t.mjs} +140 -68
- package/dist/client/{Page-CgbQZP5g.mjs → Page-uP7AKSyp.mjs} +1762 -521
- package/dist/client/{ProtectedSubmitButton-BG7my0Qf.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
- package/dist/client/SiteChoiceGroup-BZ5I0Vhy.mjs +96 -0
- package/dist/client/{SiteTermsAgreementField-DQNkfNLA.mjs → SiteTermsAgreementField-BDqRo2C5.mjs} +3 -3
- package/dist/client/{StepIndicator-DvPekKeM.mjs → StepIndicator-BWrXAKvs.mjs} +1 -1
- package/dist/client/{StepIndicator-DyXoI3ob.mjs → StepIndicator-Cb3NMw-Y.mjs} +30 -18
- package/dist/client/{ThemedButton-Bc9DBbVp.mjs → ThemedButton-C4rCsPCt.mjs} +11 -2
- package/dist/client/{accessibleSurfaces-wj4Rloo5.mjs → accessibleSurfaces-q-dDOwsW.mjs} +750 -560
- package/dist/client/{accordion-BVXfjnh-.mjs → accordion-BYW2YSUN.mjs} +1 -1
- package/dist/client/{booking-form.client-DycPGtke.mjs → booking-form.client-DAlWWWjV.mjs} +110 -72
- package/dist/client/{bookingCalendar--aWnqFDn.mjs → bookingCalendar-9nFa_do4.mjs} +6 -2
- package/dist/client/{bookingForm-DrWSUqL3.mjs → bookingForm-DtVk9p5l.mjs} +7 -6
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-CduDRcIk.mjs → boxStyleClassNames-CaSq3-r-.mjs} +2 -2
- package/dist/client/{EventEmbeddedCheckoutStep-B2c5dR49.mjs → browserStripe-Dh-LcDoW.mjs} +36 -142
- package/dist/client/{buttonParts-CJEtVOUy.mjs → buttonParts-C39GC0kz.mjs} +9 -2
- package/dist/client/{carousel-DyCLMP8s.mjs → carousel-msur7fxW.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-Bx-JuY2n.mjs} +3 -3
- package/dist/client/{cart.client-CAO39uDG.mjs → cart.client-hB_9MimN.mjs} +1 -1
- package/dist/client/{checkout-BoxzT64s.mjs → checkout-BVWZn5Qu.mjs} +3 -3
- package/dist/client/{checkout.client-IGUy7XOx.mjs → checkout.client-Bt_GtHW9.mjs} +1 -1
- package/dist/client/{checkoutUrls-D0UsiFmm.mjs → checkoutUrls-CP-rQOZV.mjs} +1 -1
- package/dist/client/client.mjs +61 -48
- package/dist/client/{constants-C_8AxMdm.mjs → constants-yA1RJGXD.mjs} +1 -1
- package/dist/client/{context-D1L0pe__.mjs → context-CG77Keax.mjs} +43 -6
- package/dist/client/{dateFormatting-HvfmS_cH.mjs → dateFormatting-DIRIgfYr.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BunFTnIq.mjs → demoPortalMagicLink-CgzNiOQ0.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-CtLAG651.mjs → enhanceHeaderSection-DgzZNM2M.mjs} +4 -4
- package/dist/client/{event-registration.client-DiSxkBUP.mjs → event-registration.client-Ckb4aDE9.mjs} +118 -74
- package/dist/client/{eventCalendar-DUnhwZ1o.mjs → eventCalendar-lqqQSzBQ.mjs} +4 -4
- package/dist/client/{eventCombined-BvBQo0nF.mjs → eventCombined-BIMyHrd-.mjs} +4 -4
- package/dist/client/{eventListing-aTLifOX7.mjs → eventListing-CBYxfvNf.mjs} +4 -4
- package/dist/client/{eventRegistration-DFd7pr09.mjs → eventRegistration-BhAqvkCb.mjs} +7 -6
- package/dist/client/{form-Dikmc2AO.mjs → form-CkOfk-Eb.mjs} +3 -3
- package/dist/client/{form.client-zHaQK5I9.mjs → form.client-Whi43oio.mjs} +5 -5
- package/dist/client/{form.parts-BLl9n8TH.mjs → form.parts-BgsWo2Me.mjs} +3 -3
- package/dist/client/gifting/client.mjs +8 -8
- package/dist/client/{gifting-CufPM38H.mjs → gifting-XtNpLcFI.mjs} +4 -4
- package/dist/client/{gifting.client--N1GaSY8.mjs → gifting.client-CraWj4I4.mjs} +174 -73
- package/dist/client/{gifting.interactive-D9MK4HkV.mjs → gifting.interactive-DiPDObN0.mjs} +61 -10
- package/dist/client/{gifting.parts-CRtiRzo-.mjs → gifting.parts-_mgGOcbA.mjs} +17 -43
- package/dist/client/{headerSection-BIaBpmk3.mjs → headerSection-CPIN3VSU.mjs} +2 -2
- package/dist/client/{islands-DJDLGQEm.mjs → islands-C95FyxUF.mjs} +1996 -1178
- package/dist/client/{newsletter-form.client-wg_JHTxm.mjs → newsletter-form.client-BgVJdKVe.mjs} +7 -7
- package/dist/client/{newsletter-form.interactive-hzpkW9NQ.mjs → newsletter-form.interactive-DpcfRbI_.mjs} +39 -18
- package/dist/client/{newsletter-form.parts-CgzpSv9p.mjs → newsletter-form.parts-poPgHrUh.mjs} +2 -2
- package/dist/client/{newsletterForm-CvxLiEBT.mjs → newsletterForm-Dt6wFjTe.mjs} +3 -3
- package/dist/client/portal/client.mjs +999 -81
- package/dist/client/{portalOrders-tCxS04g0.mjs → portalOrders-CAfjTyV9.mjs} +1 -1
- package/dist/client/{portalRoutes-DTHlWg_F.mjs → portalRoutes-D3Ttfv5x.mjs} +54 -12
- package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
- package/dist/client/presentation-CudSUZ6Q.mjs +169 -0
- package/dist/client/{product-detail.client-22Q7zgjN.mjs → product-detail.client-BrBNT7Mq.mjs} +1 -1
- package/dist/client/{product-list.client-DFWYvK8z.mjs → product-list.client-CftTl7n6.mjs} +1 -1
- package/dist/client/{productDetail-DhZAwo60.mjs → productDetail-b1tpt585.mjs} +3 -3
- package/dist/client/{productList-BiVpbZK2.mjs → productList-DRT5sabi.mjs} +3 -3
- package/dist/client/{propsDecoder-DFYqKnLy.mjs → propsDecoder-Co1VXFaW.mjs} +4 -4
- package/dist/client/{registry.server-C3OBRg7x.mjs → registry.server-0UDNY7dO.mjs} +796 -715
- package/dist/client/rendering/client.mjs +28 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-ms477Z08.mjs → richText-coerce-BFDEPZZA.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-B6nQeqvH.mjs → routeIslandApiConfig-DtqRutuX.mjs} +1 -1
- package/dist/client/{runtimeResponse-BYqsV1Kb.mjs → runtimeResponse-DBVXbcuz.mjs} +1 -1
- package/dist/client/runtimeResponse-LQnQdtNI.mjs +3 -0
- package/dist/client/{shop-xt4dQ3HH.mjs → shop-DL3CYR7i.mjs} +3 -3
- package/dist/client/{shop-commerce-DVsIcPaI.mjs → shop-commerce-CDth2_qq.mjs} +45 -27
- package/dist/client/{shop-commerce-store-7mO6KY7_.mjs → shop-commerce-store-CE0aaSHJ.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-L1Vge8tG.mjs → shop-discount-apply.state-p4aXtVsF.mjs} +2 -2
- package/dist/client/{shop.client-DNJfD3VQ.mjs → shop.client-BI2iw6Z3.mjs} +83 -29
- package/dist/client/{shopShared-DS8t6749.mjs → shopShared-BNWzgWAC.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{src-Do_s2lqH.mjs → src-CJf3u16T.mjs} +1 -1
- package/dist/{preview-next/client/src-lX6heoDA.mjs → client/src-CMuv8vSO.mjs} +5 -1
- package/dist/client/src-CXOxpNtj.mjs +3 -0
- package/dist/client/{timetableModel-Dy3nNfTG.mjs → timetableModel-DZzGD6rS.mjs} +9 -9
- package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CJDylOUe.mjs} +44 -1
- package/dist/client/{useAvailableSlots-DcjtDpUu.mjs → useAvailableSlots-nD6nuvSW.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-DvdFFWOT.mjs → useDiscountCodeUi-DMtTHqex.mjs} +6 -2
- package/dist/client/{useEventPagination-Cq-7sU5_.mjs → useEventPagination-CM-DCokc.mjs} +14 -16
- package/dist/client/{view-4gnPcpWJ.mjs → view-CHOhliHv.mjs} +4 -4
- package/dist/client/{wizardSteps-DDvL3iza.mjs → wizardSteps-BbroaNkT.mjs} +277 -87
- 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-CR99z8BL.mjs} +582 -195
- package/dist/preview-next/client/{PreviewEditorSidebar-DVpk5cqp.mjs → PreviewEditorSidebar-BaKS6H8F.mjs} +1096 -283
- package/dist/preview-next/client/{PreviewEditorUI-XoTtHSFH.mjs → PreviewEditorUI-D6IG119o.mjs} +65 -16
- package/dist/preview-next/client/{PreviewShell-VQHsRg2u.mjs → PreviewShell-CKjkFOZS.mjs} +39 -12
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CLdF9f6o.mjs → SdkPreviewModeRuntime-BexDQWGj.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-DcEwU9l_.mjs} +7192 -3039
- package/dist/preview-next/client/{previewChromeRoot-B3ySEu6p.mjs → previewChromeRoot-VqseF0yf.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CdpSupcr.mjs → sdk-runtime-DcoVpKUf.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-C6eOP6QW.mjs → siteStyleAccess-BL1fZnUD.mjs} +16 -10
- package/dist/{client/src-uwCpbHXG.mjs → preview-next/client/src-B5x3r4cg.mjs} +5 -1
- package/dist/preview-next/client/src-CrT7h--V.mjs +3 -0
- package/dist/preview-next/client/{useAutosaveStatus-BhPg4e-r.mjs → useAutosaveStatus-CdFnzKac.mjs} +3 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BaWUF9D7.mjs → useOpenBlockForSetup-B62h7dhR.mjs} +4 -3
- package/dist/preview-next/container-responsive.css +158 -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-CQfEvfbg.mjs} +54 -41
- package/dist/server/{Block.shared-B2FmczLO.mjs → Block.shared-CbGnxkWX.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-DtAyv9qA.mjs → ThemeScopeCore-BjxlpVaV.mjs} +34 -8
- package/dist/server/{accessibleSurfaces-BtPqb76u.mjs → accessibleSurfaces-CZ7pLuJ7.mjs} +317 -148
- package/dist/server/{accordions-vzdZ2Wt1.mjs → accordions-C_C52VkS.mjs} +1 -1
- package/dist/server/{bindings-B_9JuU66.mjs → bindings-D-n66Oqc.mjs} +68 -247
- package/dist/server/{client-DC7cjiSw.mjs → client-BGGlrkft.mjs} +64 -47
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-d6nPNJpe.mjs → constants-TkO9Uxma.mjs} +51 -9
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-hb27HYic.mjs → loadContent-8H1hHdXo.mjs} +4 -4
- package/dist/server/{loadPage-JToD8wDD.mjs → loadPage-BZyqF_g3.mjs} +3 -3
- package/dist/server/lookMediaFrame-Dw6R9B0L.mjs +31837 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-B2WhGofA.mjs → navigation-9TOyY5Zf.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-vD5KTClL.mjs → overrideResolution-CuduOS6V.mjs} +1 -1
- package/dist/server/page-converter.mjs +17 -4
- package/dist/server/{pageRenderPlan-CdqJ1NQZ.mjs → pageRenderPlan-DmP0HVMu.mjs} +618 -209
- package/dist/server/{pageRuntimeSupport-CAhr4oOf.mjs → pageRuntimeSupport-BQ1dWs1V.mjs} +12 -5
- package/dist/server/{pageShared-m80Xu2pd.mjs → pageShared-ALu7y5Dq.mjs} +836 -516
- package/dist/server/{parseThemeForPersistence-CRwOZfpa.mjs → parseThemeForPersistence-D_8I28BB.mjs} +3 -3
- package/dist/server/{portal-B2wCQno_.mjs → portal-P4oHSRho.mjs} +23 -2
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-BWIkFaXq.mjs → prebuild-BLL6RhjS.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-D1PHU-K9.mjs → prefetchBlockData-aR5W1dVF.mjs} +3 -3
- package/dist/server/{registry-KtsOsAzY.mjs → registry-DD_s7l3Y.mjs} +1575 -28658
- 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-DnQ2N0lI.mjs} +2 -2
- package/dist/server/{expandPalette-DxPrNOAB.mjs → resolveButtonColourStates-ChlP4NJ9.mjs} +1662 -1430
- package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-D6F1tvIm.mjs} +1 -1
- package/dist/server/{schema-BBEqquBM.mjs → schema-ClDfFtz2.mjs} +261 -6
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-ChEZDRwU.mjs → servicePageContent-CsUerbJ1.mjs} +15 -12
- 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-CLJrZb7s.mjs} +1 -1
- package/dist/server/{titleSourceSchema-DybHErxH.mjs → titleSourceSchema-DA_iErtG.mjs} +2 -3
- package/dist/server/{types-vyz09w64.mjs → types-CcKy8_tj.mjs} +14 -5
- package/dist/server/{validation-Cvi-1TZZ.mjs → validation-BbImAsVs.mjs} +5 -5
- package/dist/server/{version-B-icAIV1.mjs → version-BY48jPoe.mjs} +1 -1
- package/dist/styles/index.css +684 -181
- package/package.json +1 -1
- package/dist/client/appointment-service-categories-Cl2pqw-z.mjs +0 -70
- package/dist/client/runtimeResponse-CUX_lldL.mjs +0 -3
- package/dist/client/src-DqMbCjI1.mjs +0 -3
- package/dist/preview-next/client/src-EO5QoRlU.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,24 @@
|
|
|
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-DpcfRbI_.mjs";
|
|
3
3
|
import { a as mediaIdentifierSchema, i as resolveManagedMediaReference, n as renderableMediaAssetSchema, r as indexRenderableMediaAssets } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
|
|
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-
|
|
5
|
-
import {
|
|
6
|
-
import { l as monthSlotParents } from "./CalendarNavigationChevron-
|
|
7
|
-
import { h as assertNever$4 } from "./bookingCalendar
|
|
8
|
-
import {
|
|
9
|
-
import { $ as
|
|
10
|
-
import { F as
|
|
11
|
-
import {
|
|
12
|
-
import { _ as
|
|
13
|
-
import {
|
|
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-CJf3u16T.mjs";
|
|
5
|
+
import { As as generateLookMediaFrameCss, Bo as eventCalendarWeekStart, Cs as asPartialObject, Es as inlineTextToPlainText, Lo as isBlockButtonRole, Ls as isRecord$9, Ms as parseBlockColorToken, Ni as selectionRepresentativeEvent, Ns as readRuntimeNow, Oi as planWholeSeriesParentBooking, Os as parseInlineTextFromUnknown, Ps as resolveDateRuntimeContext, Ss as sectionStateToneFromKind, Ti as isOrdinaryPublicEvent, Ts as runTransforms, _c as offeringLabelForPageSurfaceSubject, _s as heroTitleSizeOptions, as as computeMediaTransformStyle, bs as uiTransforms, gs as createImageShapeField, ho as publicEventCancellation, hs as systemCustomizeFacetDefinitionsForBlock, is as MediaPlaceholder, ji as registrationDataForEventSelection, js as resolveLookMediaFrame, ks as plainTextToInlineText, ms as resolveArrangementKnobs, vs as createAspectRatioField, ws as createTransformRegistry, xs as SECTION_STATE_KINDS, yc as formatBookingPriceDisplay, yi as normalizeEventRegistrationPageSurfaceSubject, ys as standardAspectRatioPhrases } from "./wizardSteps-BbroaNkT.mjs";
|
|
6
|
+
import { l as monthSlotParents } from "./CalendarNavigationChevron-oaHxRbUO.mjs";
|
|
7
|
+
import { h as assertNever$4 } from "./bookingCalendar-9nFa_do4.mjs";
|
|
8
|
+
import { a as publicAppointmentPricingSchema, i as publicAppointmentLocationSchema, n as formatAppointmentLocation, r as formatAppointmentPrice, t as formatAppointmentDuration } from "./presentation-CudSUZ6Q.mjs";
|
|
9
|
+
import { $ as sectionContainer, $n as resolveRepeaterGridSpanFieldId, $t as el, A as admitReadinessFacts, An as resolveBackgroundColorValue, At as eventHeaderSlotParents, B as formCopyFragment, Bn as ICON_CONFIG, C as audioPlayerReadiness, Cn as eventDiscoveryFilterKeys, Ct as normalizeLocationMapProps, D as teamReadiness, Dn as teamMemberCardBiographyFallback, E as galleryReadiness, En as resolveEventScope, Et as resolveLocationMapLocation, F as checkoutBlockDefinition, Fn as lookSlot, G as createSiteOptionSelectField, Gn as storedSectionPhoto, Gt as FEATURE_CARD_ICON_TREATMENTS, H as composeFragments, Hn as groundPaint, I as cartBlockDefinition, In as ACCORDION_OPEN_ACCENT_THICKNESS, J as parseFieldDefinitions, Jn as DEFAULT_MEDIA_FIELD_KINDS, Jt as accordionList, K as normalizeSelectSource, Kn as bindingSchema, Kt as parseBlockIconValue, L as createBlockManifest, Ln as ACCORDION_SPACING_MAP, Lt as desktopOnlyDisplay, M as loadedReadinessFact, Mn as lookLeadSlotTransform, Mt as buildAppointmentServicesView, N as pageTemplateFromEntry, Nn as lookQuoteLimitTransform, O as testimonialsReadiness, On as BACKGROUND_POSITION_PRESET_VALUES, Ot as lookPartShown, P as unavailableReadinessFact, Pn as lookSkinSlotTransform, Q as styledContainer, Qn as resolveRepeaterGridRowFieldId, Qt as carousel, R as augmentManifest, Rn as ACCORDION_TRIGGER_FONT_SCALE, 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 pageGround, Ut as PUBLIC_DOWNLOAD_MEDIA_TYPES, V as buildFragmentDataLoaders, Vn as ICON_SIZE_PX, W as createSdkSelectField, Wn as sectionPhotoPath, Wt as FEATURE_CARD_GENERATED_ICON_SIZE_PX, X as sectionHeaderFields, Xn as parseRepeaterGridInteger, Xt as bookingForm, Y as withApiBindings, Yn as isAcceptedRepeaterGridSpan, Yt as bind, Z as sectionHeaderLayoutNodes, Zn as resolveRepeaterGridColumnFieldId, Zt as button, _ as cardListSectionActionFields, _n as eventReadinessQuery, _t as createButtonVariantField, a as cardListSectionAction, an as link, ar as isCanonicalRichTextDoc, 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 mapReadinessFact, 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 publicMapLocationResultSchema, it as buildLoadedOfferingsPreviewListing, j as hiddenFromVisitors, jn as lookCarouselRegionTransform, jt as resolveEventDetailsPresentation, k as videoGridReadiness, kn as getAnchorClasses, kt as lookParts, l as sanitizeNewsletterSignupPublicContent, ln as richText, lt as eventDisplayFields, m as cardListKnobFields, mn as when, mt as sectionStylesField, nn as headerSection, nr as linkSchema, nt as backgroundFrame, o as productListBlockDefinition, on as media, ot as cardStylingFields, p as eventCalendarBlockDefinition, pn as videoEmbed, pt as containerStylesField, q as parseFieldDefinition, qn as placedEditingPaths, qt as SectionNode, rn as icon, s as productDetailBlockDefinition, sn as props, st as columnsField, t as serverComponentRegistry, tn as form, tr as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, tt as styledSection, u as normalizeMailingListBlockContent, un as section, 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 ACCORDION_TRIGGER_LETTER_SPACING } from "./registry.server-0UDNY7dO.mjs";
|
|
10
|
+
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-C95FyxUF.mjs";
|
|
11
|
+
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";
|
|
12
|
+
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-q-dDOwsW.mjs";
|
|
13
|
+
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-CaSq3-r-.mjs";
|
|
14
|
+
import { A as themeButtonSelector, j as AFFORDANCE_SUPPRESS_CLASS, k as parseThemeButtonVariantId } from "./ThemedButton-C4rCsPCt.mjs";
|
|
14
15
|
import { t as NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES } from "./navDropdownSizing-CUjDrcIt.mjs";
|
|
15
16
|
import { s as declarativeCarouselSlides } from "./carousel.shared-BFQ3kBEw.mjs";
|
|
16
17
|
import { n as getCurrentResolveImageUrlContext, o as setContextResolveImageUrlContext, t as buildResolveImageUrlContext } from "./mediaContext-DzvnjYXm.mjs";
|
|
17
18
|
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-
|
|
19
|
+
import { t as coerceRichTextDoc } from "./richText-coerce-BFDEPZZA.mjs";
|
|
20
|
+
import { a as eventItemSlotParents, i as cardItemSlotParents } from "./EventItem-CDMa9zOX.mjs";
|
|
21
|
+
import { n as eventListSlotParents } from "./EventListing.view-B6LOK-z4.mjs";
|
|
21
22
|
import { r as themeRuntimeScopeProps, t as buildThemeDataAttrs } from "./themeScopeUtils-BAOw_fNA.mjs";
|
|
22
23
|
import { t as resolveBlocksPageMediaContext } from "./mediaAssets-COfQolI3.mjs";
|
|
23
24
|
import * as React$1 from "react";
|
|
@@ -353,6 +354,36 @@ function cloneThemeTokens(source) {
|
|
|
353
354
|
return JSON.parse(JSON.stringify(source));
|
|
354
355
|
}
|
|
355
356
|
//#endregion
|
|
357
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
358
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
359
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
360
|
+
if (!token) return null;
|
|
361
|
+
const parts = parseColorTokenParts(token);
|
|
362
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
363
|
+
return resolveConcreteColorHex(parts.token, expandedPalette);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Tone of the surface a foreground token was resolved for.
|
|
367
|
+
*
|
|
368
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
369
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
370
|
+
* a guess.
|
|
371
|
+
*/
|
|
372
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
373
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
374
|
+
if (!hex) return "unknown";
|
|
375
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
379
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
380
|
+
* which is what every site rendered before variants existed.
|
|
381
|
+
*/
|
|
382
|
+
function selectLogoVariant(tone, variants) {
|
|
383
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
384
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
385
|
+
}
|
|
386
|
+
//#endregion
|
|
356
387
|
//#region ../theme-core/src/surfaces/mapDrawingTokens.ts
|
|
357
388
|
/**
|
|
358
389
|
* The one map token contract (issue 1611). Drawings carry semantic classes only;
|
|
@@ -704,203 +735,6 @@ function assertUniqueLayoutProfileKeys(profiles) {
|
|
|
704
735
|
if (duplicates.length > 0) throw new Error(`Duplicate block layout design profiles: ${duplicates.join(", ")}`);
|
|
705
736
|
}
|
|
706
737
|
//#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
738
|
//#region ../theme-core/src/site-styles/contentTemplateDesignIntent.ts
|
|
905
739
|
function asContentTemplateDesignBlockId(value) {
|
|
906
740
|
return asDesignBlockId(value);
|
|
@@ -1831,6 +1665,228 @@ function readHeaderNavFontSizePreference(value) {
|
|
|
1831
1665
|
return value === "sm" || value === "base" || value === "lg" || value === "xl" ? value : "inherit";
|
|
1832
1666
|
}
|
|
1833
1667
|
//#endregion
|
|
1668
|
+
//#region ../theme-core/src/site-styles/runtimeBackgroundResolution.ts
|
|
1669
|
+
function parseCanonicalRuntimeBackground(content) {
|
|
1670
|
+
const background = readRecord(readRecord(content._sectionStyles)?.background);
|
|
1671
|
+
if (!background) return { kind: "none" };
|
|
1672
|
+
const parsed = runtimeBoxBackgroundSchema.safeParse(background);
|
|
1673
|
+
if (!parsed.success) return { kind: "none" };
|
|
1674
|
+
return parsed.data.contentOwner === "page-design-editor" ? {
|
|
1675
|
+
kind: "page-design-override",
|
|
1676
|
+
background: parsed.data
|
|
1677
|
+
} : {
|
|
1678
|
+
kind: "block-authored",
|
|
1679
|
+
background: parsed.data
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
/** The Look owns photo shading; copy panels keep their independently solved ink. */
|
|
1683
|
+
function applyLookPhotoTreatment(background, treatment, palette, tint = "dark", placement = "foot") {
|
|
1684
|
+
if (background.type !== "image" || !treatment) return background;
|
|
1685
|
+
if (tint === "brand") return brandPhotoTreatment(background, treatment, palette, placement);
|
|
1686
|
+
if (treatment === "photo-only") return background;
|
|
1687
|
+
return darkPhotoTreatment(background, palette, placement);
|
|
1688
|
+
}
|
|
1689
|
+
function darkPhotoTreatment(background, palette, placement, brandWash) {
|
|
1690
|
+
const ink = photoCopyInk(palette);
|
|
1691
|
+
return {
|
|
1692
|
+
...background,
|
|
1693
|
+
overlay: {
|
|
1694
|
+
type: "gradient",
|
|
1695
|
+
opacity: 1,
|
|
1696
|
+
gradient: photoCopyShade(placement, brandWash)
|
|
1697
|
+
},
|
|
1698
|
+
textColor: ink,
|
|
1699
|
+
headingColor: ink,
|
|
1700
|
+
linkColor: ink,
|
|
1701
|
+
supportingColor: ink
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
/**
|
|
1705
|
+
* The least black any photo copy band puts behind its text: the centred band's
|
|
1706
|
+
* even 60%. The foot band is at least 76% where its copy sits and the foot
|
|
1707
|
+
* brand paint 80% (under a wash no lighter than 28% black), so 60% bounds all three.
|
|
1708
|
+
*/
|
|
1709
|
+
const PHOTO_COPY_MIN_SHADE = .6;
|
|
1710
|
+
/** 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. */
|
|
1711
|
+
function photoCopyShade(placement, brandWash) {
|
|
1712
|
+
if (placement === "foot" && brandWash) return `linear-gradient(${brandWash}, ${brandWash}), linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8))`;
|
|
1713
|
+
const band = `rgba(0,0,0,${PHOTO_COPY_MIN_SHADE})`;
|
|
1714
|
+
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})` : ""}`;
|
|
1715
|
+
}
|
|
1716
|
+
/** Every pixel behind photo copy: anything from black up to the minimum shade over a white photo. */
|
|
1717
|
+
const PHOTO_COPY_PAINT = luminanceInterval(0, hexLuminance(compositeHex("#000000", PHOTO_COPY_MIN_SHADE, "#ffffff")));
|
|
1718
|
+
/** The palette's own light colour (its background, or its text on a dark palette) when it reads over the copy band, else white. */
|
|
1719
|
+
function photoCopyInk(palette) {
|
|
1720
|
+
const ink = paletteInk(PHOTO_COPY_PAINT, paletteInkRoles(palette));
|
|
1721
|
+
return ink.kind === "unpaintable" ? "absoluteWhite" : paletteInkToken(ink);
|
|
1722
|
+
}
|
|
1723
|
+
/** A light brand's dark ink cannot sit on unknown pixels: give light ink a dark backing. */
|
|
1724
|
+
function brandPhotoTreatment(background, treatment, palette, placement) {
|
|
1725
|
+
const brand = brandScrimOverlay("primary");
|
|
1726
|
+
if (treatment === "photo-only") return {
|
|
1727
|
+
...background,
|
|
1728
|
+
overlay: brand
|
|
1729
|
+
};
|
|
1730
|
+
if (surfaceToneFromForegroundToken(palette, "primaryForeground") === "dark") return {
|
|
1731
|
+
...background,
|
|
1732
|
+
overlay: brand,
|
|
1733
|
+
textColor: "primaryForeground",
|
|
1734
|
+
headingColor: "primaryForeground",
|
|
1735
|
+
linkColor: "primaryForeground",
|
|
1736
|
+
supportingColor: "primaryForeground"
|
|
1737
|
+
};
|
|
1738
|
+
return darkPhotoTreatment(background, palette, placement, `color-mix(in srgb, ${brand.color} ${brand.opacity * 100}%, transparent)`);
|
|
1739
|
+
}
|
|
1740
|
+
function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
|
|
1741
|
+
if (heroPhotoIsContent(source, arrangementHeroPhoto, rhythm !== void 0)) {
|
|
1742
|
+
if (rhythm !== void 0) return rhythmBackground(rhythm);
|
|
1743
|
+
return {
|
|
1744
|
+
kind: "content-media",
|
|
1745
|
+
background: source.background,
|
|
1746
|
+
ground: {
|
|
1747
|
+
type: "color",
|
|
1748
|
+
color: arrangementHeroPhoto?.fallbackToken ?? "background",
|
|
1749
|
+
textColor: source.background.textColor,
|
|
1750
|
+
headingColor: source.background.headingColor,
|
|
1751
|
+
linkColor: source.background.linkColor,
|
|
1752
|
+
supportingColor: source.background.supportingColor
|
|
1753
|
+
}
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
if (source.kind === "page-design-override") return {
|
|
1757
|
+
kind: "override",
|
|
1758
|
+
background: source.background
|
|
1759
|
+
};
|
|
1760
|
+
if (isAuthoredMedia(source)) return {
|
|
1761
|
+
kind: "authored-media",
|
|
1762
|
+
background: lookDefault ? mergeLookForegroundWithAuthoredMedia(lookDefault, source.background) : source.background
|
|
1763
|
+
};
|
|
1764
|
+
if (lookDefault) return {
|
|
1765
|
+
kind: "look-surface",
|
|
1766
|
+
background: lookDefault
|
|
1767
|
+
};
|
|
1768
|
+
if (source.kind === "block-authored") return {
|
|
1769
|
+
kind: "authored-colour",
|
|
1770
|
+
background: source.background
|
|
1771
|
+
};
|
|
1772
|
+
return rhythmBackground(rhythm);
|
|
1773
|
+
}
|
|
1774
|
+
function resolveSectionPhotoPlacement(background, heroPhoto) {
|
|
1775
|
+
if (heroPhoto?.paintsGround === false) return "none";
|
|
1776
|
+
return background.kind !== "base" && background.background.type === "image" && background.background.image !== void 0 ? "behind-text" : "none";
|
|
1777
|
+
}
|
|
1778
|
+
function resolveSectionForeground(background, palette) {
|
|
1779
|
+
return resolveSurfaceForeground(sectionForegroundBackground(background, palette), palette, {}, { compositeBase: "background" });
|
|
1780
|
+
}
|
|
1781
|
+
/** Planner-only field, carried by render content rather than persisted owner content. */
|
|
1782
|
+
function sectionDecisionFromContent(content) {
|
|
1783
|
+
const value = content?._sectionDecision;
|
|
1784
|
+
return typeof value === "object" && value !== null && "certifiedBackdrop" in value && "inks" in value ? value : null;
|
|
1785
|
+
}
|
|
1786
|
+
/** Legacy detached photos keep already-legible authored ink and its exact CSS treatment. */
|
|
1787
|
+
function sectionForegroundBackground(resolved, palette) {
|
|
1788
|
+
if (resolved.kind === "base") return null;
|
|
1789
|
+
if (resolved.kind !== "content-media") return resolved.background;
|
|
1790
|
+
const original = resolveSurfaceForeground(resolved.background, palette);
|
|
1791
|
+
const measured = resolveSurfaceForeground(resolved.ground, palette);
|
|
1792
|
+
if (original.kind !== "known" || measured.kind !== "known") return resolved.background;
|
|
1793
|
+
return [
|
|
1794
|
+
"text",
|
|
1795
|
+
"heading",
|
|
1796
|
+
"link",
|
|
1797
|
+
"supporting"
|
|
1798
|
+
].every((role) => original.roles[role] === measured.roles[role]) ? resolved.background : resolved.ground;
|
|
1799
|
+
}
|
|
1800
|
+
function mergeLookForegroundWithAuthoredMedia(lookDefault, authored) {
|
|
1801
|
+
const paintsBand = lookDefault.type === "color" || lookDefault.type === "gradient";
|
|
1802
|
+
const lookScrim = paintsBand ? lookDefault.mediaScrim : void 0;
|
|
1803
|
+
if (paintsBand && !lookScrim) return authored;
|
|
1804
|
+
const merged = runtimeBoxBackgroundSchema.safeParse({
|
|
1805
|
+
...lookDefault,
|
|
1806
|
+
type: authored.type,
|
|
1807
|
+
image: authored.image,
|
|
1808
|
+
objectFit: authored.objectFit,
|
|
1809
|
+
scale: authored.scale,
|
|
1810
|
+
position: authored.position,
|
|
1811
|
+
...lookScrim ? { overlay: lookScrim } : {}
|
|
1812
|
+
});
|
|
1813
|
+
return merged.success ? merged.data : authored;
|
|
1814
|
+
}
|
|
1815
|
+
function readRecord(value) {
|
|
1816
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
1817
|
+
}
|
|
1818
|
+
function heroPhotoIsContent(source, photo, hasArrangementGround) {
|
|
1819
|
+
return photo !== void 0 && !photo.paintsGround && source.kind === "block-authored" && source.background.type === "image" && (hasArrangementGround || !source.background.overlay);
|
|
1820
|
+
}
|
|
1821
|
+
function isAuthoredMedia(source) {
|
|
1822
|
+
return source.kind === "block-authored" && (source.background.type === "image" || source.background.type === "video");
|
|
1823
|
+
}
|
|
1824
|
+
function rhythmBackground(background) {
|
|
1825
|
+
return background ? {
|
|
1826
|
+
kind: "rhythm",
|
|
1827
|
+
background
|
|
1828
|
+
} : { kind: "base" };
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Semantic section grounds: background/base -> light; muted/surface bands ->
|
|
1832
|
+
* band; primary/secondary/accent (including pop) -> brand; text/inverse and
|
|
1833
|
+
* numbered deep shades -> deep. Media and gradients use the existing resolved
|
|
1834
|
+
* scrim foreground/tone contract: light ink over a dark veil -> deep, dark ink
|
|
1835
|
+
* over a light veil -> light. Unclassified/no veil defaults to light.
|
|
1836
|
+
* Background ownership (override, authored, Look or rhythm) never changes tone.
|
|
1837
|
+
*/
|
|
1838
|
+
const solidGrounds = {
|
|
1839
|
+
background: "light",
|
|
1840
|
+
muted: "band",
|
|
1841
|
+
surface: "band",
|
|
1842
|
+
surfaceAlt: "band",
|
|
1843
|
+
primary: "brand",
|
|
1844
|
+
secondary: "brand",
|
|
1845
|
+
accent: "brand",
|
|
1846
|
+
text: "deep"
|
|
1847
|
+
};
|
|
1848
|
+
function deriveSectionGround(resolved, palette) {
|
|
1849
|
+
if (resolved.kind === "base") return "light";
|
|
1850
|
+
const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
|
|
1851
|
+
const solid = solidSectionGround(background);
|
|
1852
|
+
if (solid) return solid;
|
|
1853
|
+
return (scrimTone(sectionScrimSamples(background, palette)) ?? sectionForegroundTone(resolved, palette)) === "dark" ? "deep" : "light";
|
|
1854
|
+
}
|
|
1855
|
+
function solidSectionGround(background) {
|
|
1856
|
+
if (background.type !== "color") return null;
|
|
1857
|
+
return solidTokenGround(background.color ?? "background");
|
|
1858
|
+
}
|
|
1859
|
+
/** Shared classification for section backgrounds and resolved parent surfaces. */
|
|
1860
|
+
function solidTokenGround(color) {
|
|
1861
|
+
return solidGrounds[color] ?? (/-(?:[7-9]00|950)$/.test(color) ? "deep" : null);
|
|
1862
|
+
}
|
|
1863
|
+
function sectionForegroundTone(resolved, palette) {
|
|
1864
|
+
const foreground = resolveSectionForeground(resolved, palette);
|
|
1865
|
+
return foreground.kind === "known" ? surfaceToneFromForegroundToken(palette, foreground.roles.text) : "unknown";
|
|
1866
|
+
}
|
|
1867
|
+
function sectionVeil(background) {
|
|
1868
|
+
switch (background.type) {
|
|
1869
|
+
case "color": return null;
|
|
1870
|
+
case "image":
|
|
1871
|
+
case "video": return background.overlay;
|
|
1872
|
+
case "gradient": return {
|
|
1873
|
+
type: "gradient",
|
|
1874
|
+
gradient: background.gradient,
|
|
1875
|
+
opacity: 1
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
function sectionScrimSamples(background, palette) {
|
|
1880
|
+
const overlay = sectionVeil(background);
|
|
1881
|
+
if (overlay?.type === "gradient") return gradientScrimSamples(overlay.gradient ?? "", overlay.opacity ?? 1, palette);
|
|
1882
|
+
if (overlay?.type !== "color") return [];
|
|
1883
|
+
const hex = resolveConcreteColorHex(overlay.color ?? "", palette);
|
|
1884
|
+
return hex ? [{
|
|
1885
|
+
hex,
|
|
1886
|
+
alpha: overlay.opacity ?? 1
|
|
1887
|
+
}] : [];
|
|
1888
|
+
}
|
|
1889
|
+
//#endregion
|
|
1834
1890
|
//#region ../theme-core/src/site-styles/previewRuntimeCapabilities.ts
|
|
1835
1891
|
function rendererCapabilitiesByBlockKind(blocks) {
|
|
1836
1892
|
return new Map(blocks.map((block) => [block.blockKind, {
|
|
@@ -1950,9 +2006,9 @@ function pageFlowDefaultBoundary(pageFlowPresetId) {
|
|
|
1950
2006
|
*/
|
|
1951
2007
|
function resolveJoinTreatment(input) {
|
|
1952
2008
|
const boundaryId = makeBoundaryId(input.previousBlockId, input.nextBlockId);
|
|
1953
|
-
const selection = selectCandidate(input.candidates);
|
|
2009
|
+
const selection = selectCandidate(input.candidates, siteStyleEdges(input.siteStyleId));
|
|
1954
2010
|
const selectedOutcome = selection.kind === "selected" ? selection.outcome : { kind: "none" };
|
|
1955
|
-
const pin = pinStatus(input.candidates, selectedOutcome);
|
|
2011
|
+
const pin = pinStatus(input.candidates, selectedOutcome, siteStyleEdges(input.siteStyleId));
|
|
1956
2012
|
const issues = pin.kind === "unsupported" ? [{
|
|
1957
2013
|
kind: "pinned-boundary-option-unavailable",
|
|
1958
2014
|
boundaryId,
|
|
@@ -1978,44 +2034,67 @@ function resolveJoinTreatment(input) {
|
|
|
1978
2034
|
previousBlockId: input.previousBlockId,
|
|
1979
2035
|
nextBlockId: input.nextBlockId,
|
|
1980
2036
|
treatment: selection.outcome.treatment,
|
|
2037
|
+
edge: selection.outcome.edge,
|
|
1981
2038
|
source: selection.candidate.source
|
|
1982
2039
|
},
|
|
1983
2040
|
pin,
|
|
1984
2041
|
issues
|
|
1985
2042
|
};
|
|
1986
2043
|
}
|
|
1987
|
-
function pinStatus(candidates, selectedOutcome) {
|
|
2044
|
+
function pinStatus(candidates, selectedOutcome, edges) {
|
|
1988
2045
|
const pinned = candidates.find((candidate) => candidate.source.kind === "user-pinned");
|
|
1989
2046
|
if (!pinned) return { kind: "none" };
|
|
1990
|
-
return candidateOutcome(pinned.treatment).kind === "unsupported" ? {
|
|
2047
|
+
return candidateOutcome(pinned.treatment, edges).kind === "unsupported" ? {
|
|
1991
2048
|
kind: "unsupported",
|
|
1992
2049
|
optionId: fallbackOptionId(selectedOutcome)
|
|
1993
2050
|
} : { kind: "supported" };
|
|
1994
2051
|
}
|
|
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
|
-
|
|
2052
|
+
function selectCandidate(candidates, edges) {
|
|
2053
|
+
return candidates.map((candidate) => {
|
|
2054
|
+
const outcome = candidateOutcome(candidate.treatment, edges);
|
|
2055
|
+
return outcome.kind === "unsupported" ? null : {
|
|
2056
|
+
kind: "selected",
|
|
2057
|
+
candidate,
|
|
2058
|
+
outcome
|
|
2059
|
+
};
|
|
2060
|
+
}).find((selection) => selection !== null) ?? { kind: "exhausted" };
|
|
2061
|
+
}
|
|
2062
|
+
/** Every read, write and import uses this admission decision; geometry lookup never grants support. */
|
|
2063
|
+
function candidateOutcome(treatment, edges) {
|
|
2064
|
+
if (treatment.family === "none") return treatment.layers === 1 && treatment.variant === void 0 && treatment.colourPreset === "fade" ? { kind: "none" } : { kind: "unsupported" };
|
|
2065
|
+
const entry = resolveStyleEdgeOption(treatment, edges);
|
|
2066
|
+
if (!entry) return { kind: "unsupported" };
|
|
2067
|
+
const minimum = edges.supported.find((support) => support.family === treatment.family)?.minLayers ?? 1;
|
|
2068
|
+
const edge = {
|
|
2069
|
+
...treatment,
|
|
2070
|
+
variant: entry.treatment.variant,
|
|
2071
|
+
layers: treatment.layers < minimum ? minimum : treatment.layers
|
|
2072
|
+
};
|
|
2073
|
+
const intent = transitionIntentForTreatment(edge);
|
|
2014
2074
|
return intent ? {
|
|
2015
2075
|
kind: "decorative",
|
|
2016
|
-
treatment: intent
|
|
2076
|
+
treatment: intent,
|
|
2077
|
+
edge
|
|
2017
2078
|
} : { kind: "unsupported" };
|
|
2018
2079
|
}
|
|
2080
|
+
/** Resolve the variant within the style's offer, rather than assuming the catalogue default is offered. */
|
|
2081
|
+
function resolveStyleEdgeOption(treatment, edges) {
|
|
2082
|
+
const support = edges.supported.find((entry) => entry.family === treatment.family);
|
|
2083
|
+
if (!support || treatment.layers > support.maxLayers || !support.colourPresets.includes(treatment.colourPreset)) return null;
|
|
2084
|
+
const entry = boundaryOptionForTreatment({
|
|
2085
|
+
...treatment,
|
|
2086
|
+
variant: treatment.variant ?? support.variants?.[0]
|
|
2087
|
+
});
|
|
2088
|
+
if (!entry) return null;
|
|
2089
|
+
return support.variants && !support.variants.includes(entry.treatment.variant ?? "") ? null : entry;
|
|
2090
|
+
}
|
|
2091
|
+
function siteStyleEdges(siteStyleId) {
|
|
2092
|
+
return getCuratedSiteStyle(siteStyleId)?.looks.edges ?? existingStyleEdges;
|
|
2093
|
+
}
|
|
2094
|
+
function boundaryOptionsForStyle(siteStyleId) {
|
|
2095
|
+
const edges = siteStyleEdges(siteStyleId);
|
|
2096
|
+
return boundaryOptions.filter((option) => candidateOutcome(option.treatment, edges).kind !== "unsupported");
|
|
2097
|
+
}
|
|
2019
2098
|
/**
|
|
2020
2099
|
* Unavailable structured treatments use the selected catalogue option in the editor issue.
|
|
2021
2100
|
*/
|
|
@@ -2028,7 +2107,7 @@ function fallbackOptionId(outcome) {
|
|
|
2028
2107
|
}
|
|
2029
2108
|
function requiresPhoto(option) {
|
|
2030
2109
|
const treatment = boundaryTreatmentForBoundaryOptionId(option);
|
|
2031
|
-
return treatment?.
|
|
2110
|
+
return treatment?.family === "wave" && treatment.variant === "echo";
|
|
2032
2111
|
}
|
|
2033
2112
|
/**
|
|
2034
2113
|
* A rule claims blocks on its side before later rules on that side count their first occurrence.
|
|
@@ -2054,10 +2133,6 @@ function pageRuleOptions(rules, blocks) {
|
|
|
2054
2133
|
options: /* @__PURE__ */ new Map()
|
|
2055
2134
|
}).options;
|
|
2056
2135
|
}
|
|
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
2136
|
/** The page-wide owner of style rules, automatic defaults and owner pins. */
|
|
2062
2137
|
function resolvePageJoins(input) {
|
|
2063
2138
|
const looks = getCuratedSiteStyle(input.siteStyleId)?.looks;
|
|
@@ -2074,6 +2149,7 @@ function resolvePageJoins(input) {
|
|
|
2074
2149
|
treatment: requireDefaultBoundaryTreatment(option)
|
|
2075
2150
|
}] : [], pageFlowDefaultJoinCandidate(input.pageFlowPresetId)];
|
|
2076
2151
|
const ids = {
|
|
2152
|
+
siteStyleId: input.siteStyleId,
|
|
2077
2153
|
previousBlockId: previous.blockId,
|
|
2078
2154
|
nextBlockId: next.blockId
|
|
2079
2155
|
};
|
|
@@ -2095,7 +2171,47 @@ function resolvePageJoins(input) {
|
|
|
2095
2171
|
resolution,
|
|
2096
2172
|
pin
|
|
2097
2173
|
}];
|
|
2098
|
-
})
|
|
2174
|
+
}).reduce((resolved, decision, index) => {
|
|
2175
|
+
const previous = input.blocks[index];
|
|
2176
|
+
const next = input.blocks[index + 1];
|
|
2177
|
+
const last = resolved.reduceRight((found, item) => found ?? item.resolution.join, null);
|
|
2178
|
+
return [...resolved, {
|
|
2179
|
+
...decision,
|
|
2180
|
+
automatic: applyPageJoinRules(decision.automatic, last, previous, next, input.siteStyleId),
|
|
2181
|
+
resolution: applyPageJoinRules(decision.resolution, last, previous, next, input.siteStyleId)
|
|
2182
|
+
}];
|
|
2183
|
+
}, []);
|
|
2184
|
+
}
|
|
2185
|
+
/** Missing names are detached/legacy facts, not evidence that two backgrounds are the same. */
|
|
2186
|
+
function applyPageJoinRules(resolution, last, previous, next, siteStyleId) {
|
|
2187
|
+
const join = resolution.join;
|
|
2188
|
+
if (!join || resolution.selectedSource?.kind === "user-pinned") return resolution;
|
|
2189
|
+
if (samePaintedGround(previous, next)) return {
|
|
2190
|
+
...resolution,
|
|
2191
|
+
join: null
|
|
2192
|
+
};
|
|
2193
|
+
if (!last || !sectionBoundaryTreatmentsEqual(last.edge, join.edge)) return resolution;
|
|
2194
|
+
return {
|
|
2195
|
+
...resolution,
|
|
2196
|
+
join: nextFamilyJoin(join, siteStyleId)
|
|
2197
|
+
};
|
|
2198
|
+
}
|
|
2199
|
+
function samePaintedGround(previous, next) {
|
|
2200
|
+
return previous?.paint === "paint" && next?.paint === "paint" && previous.groundName !== void 0 && previous.groundName === next.groundName;
|
|
2201
|
+
}
|
|
2202
|
+
/** The replacement keeps the original choice source but uses the next offered family, or a plain cut. */
|
|
2203
|
+
function nextFamilyJoin(join, siteStyleId) {
|
|
2204
|
+
const families = siteStyleEdges(siteStyleId).supported.map((support) => support.family);
|
|
2205
|
+
const current = families.findIndex((family) => family === join.edge.family);
|
|
2206
|
+
const nextFamilies = [...families.slice(current + 1), ...families.slice(0, current)];
|
|
2207
|
+
const options = boundaryOptionsForStyle(siteStyleId);
|
|
2208
|
+
const alternative = nextFamilies.flatMap((family) => options.filter((option) => option.treatment.family === family)).at(0);
|
|
2209
|
+
const outcome = alternative ? candidateOutcome(alternative.treatment, siteStyleEdges(siteStyleId)) : null;
|
|
2210
|
+
return outcome?.kind === "decorative" ? {
|
|
2211
|
+
...join,
|
|
2212
|
+
treatment: outcome.treatment,
|
|
2213
|
+
edge: outcome.edge
|
|
2214
|
+
} : null;
|
|
2099
2215
|
}
|
|
2100
2216
|
/** The last-resort page-design default, also the source of a fully unsupported join. */
|
|
2101
2217
|
function pageFlowDefaultJoinCandidate(pageFlowPresetId) {
|
|
@@ -2165,18 +2281,23 @@ function compileEditorModelRuntime(input) {
|
|
|
2165
2281
|
}
|
|
2166
2282
|
/** The editor boundary's effective break as an intent-only join; none for no break. */
|
|
2167
2283
|
function runtimeJoinForEditorBoundary(boundary) {
|
|
2168
|
-
const treatment = boundary.availableBreaks.find((candidate) => candidate.id === boundary.breakChoice.effectiveValue)?.
|
|
2284
|
+
const treatment = boundary.availableBreaks.find((candidate) => candidate.id === boundary.breakChoice.effectiveValue)?.intent;
|
|
2169
2285
|
return treatment && isDecorativeTransitionIntent(treatment) ? [{
|
|
2170
2286
|
previousBlockId: boundary.previousBlockId,
|
|
2171
2287
|
nextBlockId: boundary.nextBlockId,
|
|
2172
|
-
treatment
|
|
2288
|
+
treatment,
|
|
2289
|
+
...boundary.effectiveEdge ? { edge: boundary.effectiveEdge } : {}
|
|
2173
2290
|
}] : [];
|
|
2174
2291
|
}
|
|
2175
2292
|
function applyCompiledRuntimeFieldsToContent(content, fields) {
|
|
2176
2293
|
const runtimeFields = fields ? preserveContentOwnedBackgroundFields(content, preserveArrangementSectionSpacing(content, fields)) : fields;
|
|
2177
2294
|
return {
|
|
2178
2295
|
...stripCompiledRuntimeStyleFields(content),
|
|
2179
|
-
...runtimeFields
|
|
2296
|
+
...runtimeFields,
|
|
2297
|
+
...runtimeFields?._sectionStyles ? { _sectionStyles: {
|
|
2298
|
+
...sectionOwnerStyleChoices(content),
|
|
2299
|
+
...runtimeFields._sectionStyles
|
|
2300
|
+
} } : {}
|
|
2180
2301
|
};
|
|
2181
2302
|
}
|
|
2182
2303
|
/**
|
|
@@ -2260,7 +2381,7 @@ function resolveEditorArrangementLook(selection, mode, pin) {
|
|
|
2260
2381
|
//#region ../theme-core/src/site-styles/pageJoinFacts.ts
|
|
2261
2382
|
/** Compile fields, then project the render planner's decisions in authored order. No paint decisions live here. */
|
|
2262
2383
|
function withPageJoinFacts(model, resolution) {
|
|
2263
|
-
if (resolution === null
|
|
2384
|
+
if (resolution === null) return model.blocks;
|
|
2264
2385
|
const compiled = compileEditorModelRuntime({
|
|
2265
2386
|
editorModel: model,
|
|
2266
2387
|
...resolution
|
|
@@ -2391,41 +2512,164 @@ function resolveArrangementContentLook(runtime, mode, content, audience) {
|
|
|
2391
2512
|
});
|
|
2392
2513
|
return runtime.available.find((entry) => entry.look.id === published.id) ?? selected;
|
|
2393
2514
|
}
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2515
|
+
function resolveRuntimeSection(rawInput) {
|
|
2516
|
+
const input = {
|
|
2517
|
+
...rawInput,
|
|
2518
|
+
choices: sectionOwnerStyleChoices(rawInput.content)
|
|
2519
|
+
};
|
|
2520
|
+
const automatic = automaticSectionGround(input);
|
|
2521
|
+
const authored = input.placement === "column" ? { kind: "none" } : parseCanonicalRuntimeBackground(input.content);
|
|
2522
|
+
const photo = arrangementHeroGround(input);
|
|
2523
|
+
const ownerGround = ownerSectionGround(input, authored);
|
|
2524
|
+
const background = resolveSectionBackground(ownerGroundSource(authored, namedOwnerGround(input), input, photo), null, input.runtime && input.look ? automatic?.paint ?? null : void 0, photo);
|
|
2525
|
+
return sectionDecision(background, resolvedNamedGround(background, ownerGround, automatic, input.runtime), automatic, input, photo);
|
|
2526
|
+
}
|
|
2527
|
+
function automaticSectionGround(input) {
|
|
2528
|
+
if (!input.runtime || !input.look || input.placement === "column") return void 0;
|
|
2529
|
+
const span = input.rhythmSpan;
|
|
2530
|
+
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;
|
|
2531
|
+
return input.look.sectionGround ?? input.runtime.rhythm[index];
|
|
2532
|
+
}
|
|
2533
|
+
/**
|
|
2534
|
+
* A stored name is authoritative, including when two grounds share the same paint. `ground: null`
|
|
2535
|
+
* records a plain palette colour. Content saved before names existed (`ground` absent) keeps the
|
|
2536
|
+
* identity its colour has always given it, so rendering doesn't change before the data migration.
|
|
2537
|
+
*/
|
|
2538
|
+
function ownerSectionGround(input, source) {
|
|
2539
|
+
if (input.choices.ground !== void 0) return namedOwnerGround(input);
|
|
2540
|
+
if (input.placement === "column" || source.kind === "none" || source.background.type !== "color" || !input.runtime) return void 0;
|
|
2541
|
+
const colour = source.background.color;
|
|
2542
|
+
return input.runtime.grounds.find((candidate) => candidate.paint.color === colour);
|
|
2543
|
+
}
|
|
2544
|
+
function namedOwnerGround(input) {
|
|
2545
|
+
if (input.placement === "column") return void 0;
|
|
2546
|
+
const choice = input.choices.ground;
|
|
2547
|
+
return choice ? input.runtime?.grounds.find((ground) => ground.name === choice.name) : void 0;
|
|
2548
|
+
}
|
|
2549
|
+
function ownerGroundSource(source, ground, input, photo) {
|
|
2550
|
+
const photoBehind = photo?.paintsGround !== false;
|
|
2551
|
+
if (source.kind !== "none" && source.background.type === "image" && photoBehind) return source;
|
|
2552
|
+
if (ground) return {
|
|
2553
|
+
kind: "page-design-override",
|
|
2554
|
+
background: namedGroundPaint(ground, authoredInks(source))
|
|
2555
|
+
};
|
|
2556
|
+
if (input.choices.ground && !hasPaletteFallback(source, input.palette)) return { kind: "none" };
|
|
2557
|
+
return paletteColourSource(source, input.runtime);
|
|
2558
|
+
}
|
|
2559
|
+
/** Owner-set inks replace the ground's inks wholesale, exactly as an unnamed matching colour always has. */
|
|
2560
|
+
function namedGroundPaint(ground, inks) {
|
|
2561
|
+
return Object.keys(inks).length === 0 ? ground.paint : {
|
|
2562
|
+
type: "color",
|
|
2563
|
+
color: ground.paint.color,
|
|
2564
|
+
...inks
|
|
2404
2565
|
};
|
|
2405
2566
|
}
|
|
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;
|
|
2567
|
+
/** Inks the owner set explicitly survive naming the ground, as they did before names existed. */
|
|
2568
|
+
function authoredInks(source) {
|
|
2569
|
+
if (source.kind === "none" || source.background.type !== "color") return {};
|
|
2413
2570
|
const { textColor, headingColor, linkColor, supportingColor } = source.background;
|
|
2571
|
+
return {
|
|
2572
|
+
...textColor ? { textColor } : {},
|
|
2573
|
+
...headingColor ? { headingColor } : {},
|
|
2574
|
+
...linkColor ? { linkColor } : {},
|
|
2575
|
+
...supportingColor ? { supportingColor } : {}
|
|
2576
|
+
};
|
|
2577
|
+
}
|
|
2578
|
+
function hasPaletteFallback(source, palette) {
|
|
2579
|
+
return source.kind !== "none" && source.background.type === "color" && !!source.background.color && !!palette[source.background.color];
|
|
2580
|
+
}
|
|
2581
|
+
/** Authored palette colours retain the style's established inks; identity comes from `ownerSectionGround`. */
|
|
2582
|
+
function paletteColourSource(source, runtime) {
|
|
2583
|
+
if (source.kind === "none" || source.background.type !== "color") return source;
|
|
2414
2584
|
if ([
|
|
2415
|
-
textColor,
|
|
2416
|
-
headingColor,
|
|
2417
|
-
linkColor,
|
|
2418
|
-
supportingColor
|
|
2585
|
+
source.background.textColor,
|
|
2586
|
+
source.background.headingColor,
|
|
2587
|
+
source.background.linkColor,
|
|
2588
|
+
source.background.supportingColor
|
|
2419
2589
|
].some((ink) => ink !== void 0)) return source;
|
|
2420
|
-
const
|
|
2421
|
-
|
|
2590
|
+
const colour = source.background.color;
|
|
2591
|
+
const paint = runtime?.grounds.find((ground) => ground.paint.color === colour)?.paint;
|
|
2592
|
+
return paint ? {
|
|
2422
2593
|
...source,
|
|
2423
2594
|
background: {
|
|
2424
|
-
...
|
|
2595
|
+
...paint,
|
|
2425
2596
|
...source.background
|
|
2426
2597
|
}
|
|
2427
2598
|
} : source;
|
|
2428
2599
|
}
|
|
2600
|
+
function arrangementHeroGround(input) {
|
|
2601
|
+
return input.blockKind === "block.hero" ? { paintsGround: heroPhotoPaintsGround(input.arrangementKey) } : void 0;
|
|
2602
|
+
}
|
|
2603
|
+
function resolvedNamedGround(background, owner, automatic, runtime) {
|
|
2604
|
+
switch (background.kind) {
|
|
2605
|
+
case "base": return runtime?.grounds.find((ground) => ground.name === "base");
|
|
2606
|
+
case "rhythm": return automatic;
|
|
2607
|
+
case "override":
|
|
2608
|
+
case "authored-colour": return background.background.type === "color" ? owner : void 0;
|
|
2609
|
+
case "authored-media":
|
|
2610
|
+
case "content-media":
|
|
2611
|
+
case "look-surface": return;
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
function sectionDecision(background, named, automatic, input, photo) {
|
|
2615
|
+
const identity = named ? {
|
|
2616
|
+
groundName: named.name,
|
|
2617
|
+
ground: named.ground
|
|
2618
|
+
} : { ground: deriveSectionGround(background, input.palette) };
|
|
2619
|
+
const finished = finishedSectionPaint(background, named, input);
|
|
2620
|
+
return {
|
|
2621
|
+
source: sectionSource(background, named, input.look),
|
|
2622
|
+
...identity,
|
|
2623
|
+
paint: sectionBackgroundPaint(background),
|
|
2624
|
+
paintKind: sectionPaint(background),
|
|
2625
|
+
inks: finished?.kind === "certified" ? finished.foreground : resolveSectionForeground(background, input.palette),
|
|
2626
|
+
foregroundBackground: finishedForegroundPaint(background, finished, input.palette),
|
|
2627
|
+
certifiedBackdrop: finished?.kind === "certified" ? {
|
|
2628
|
+
kind: "measured",
|
|
2629
|
+
token: finished.finish.paint.base,
|
|
2630
|
+
samples: finished.finish.samples
|
|
2631
|
+
} : certifiedSectionBackdrop(background, input.palette),
|
|
2632
|
+
background,
|
|
2633
|
+
...sectionFinishFacts(background, finished),
|
|
2634
|
+
shape: input.runtime ? sectionShapeForGround(input.runtime.surfaces, named?.name) : "edge-to-edge",
|
|
2635
|
+
surfaceToken: sectionGroundToken(background),
|
|
2636
|
+
...sectionEditorFacts(automatic, input),
|
|
2637
|
+
openingPhotoBehindText: resolveSectionPhotoPlacement(background, photo) === "behind-text",
|
|
2638
|
+
placement: input.placement
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
function sectionEditorFacts(automatic, input) {
|
|
2642
|
+
return {
|
|
2643
|
+
...input.runtime ? { styleGroundName: automatic?.name ?? "base" } : {},
|
|
2644
|
+
ownerGroundFallback: input.choices.ground != null && !namedOwnerGround(input)
|
|
2645
|
+
};
|
|
2646
|
+
}
|
|
2647
|
+
function sectionSource(background, named, look) {
|
|
2648
|
+
switch (background.kind) {
|
|
2649
|
+
case "base": return "base";
|
|
2650
|
+
case "rhythm": return look?.sectionGround ? "offer" : "rhythm";
|
|
2651
|
+
case "look-surface": return "offer";
|
|
2652
|
+
case "authored-media": return "owner-photo";
|
|
2653
|
+
case "authored-colour":
|
|
2654
|
+
case "content-media":
|
|
2655
|
+
case "override": return ownerSectionSource(background.background, named);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
function ownerSectionSource(background, named) {
|
|
2659
|
+
if (background.type === "image" || background.type === "video") return "owner-photo";
|
|
2660
|
+
return named ? "owner-ground" : "owner-colour";
|
|
2661
|
+
}
|
|
2662
|
+
function sectionBackgroundPaint(background) {
|
|
2663
|
+
switch (background.kind) {
|
|
2664
|
+
case "base": return null;
|
|
2665
|
+
case "content-media": return background.ground;
|
|
2666
|
+
case "authored-colour":
|
|
2667
|
+
case "authored-media":
|
|
2668
|
+
case "look-surface":
|
|
2669
|
+
case "override":
|
|
2670
|
+
case "rhythm": return background.background;
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2429
2673
|
function sectionPaint(resolved) {
|
|
2430
2674
|
if (resolved.kind === "base" || resolved.kind === "content-media") return "paint";
|
|
2431
2675
|
const background = resolved.background;
|
|
@@ -2441,6 +2685,70 @@ function sectionGroundToken(resolved) {
|
|
|
2441
2685
|
case "gradient": return "gradient";
|
|
2442
2686
|
}
|
|
2443
2687
|
}
|
|
2688
|
+
/** Content media sits beside the text, so its slots sit on the colour ground, as deriveSectionGround reads it. */
|
|
2689
|
+
function certifiedSectionBackdrop(resolved, palette) {
|
|
2690
|
+
if (resolved.kind === "base") return {
|
|
2691
|
+
kind: "measured",
|
|
2692
|
+
token: "background"
|
|
2693
|
+
};
|
|
2694
|
+
const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
|
|
2695
|
+
switch (background.type) {
|
|
2696
|
+
case "image":
|
|
2697
|
+
case "video": return {
|
|
2698
|
+
kind: "unmeasured",
|
|
2699
|
+
paint: "media"
|
|
2700
|
+
};
|
|
2701
|
+
case "gradient": return {
|
|
2702
|
+
kind: "unmeasured",
|
|
2703
|
+
paint: "gradient"
|
|
2704
|
+
};
|
|
2705
|
+
case "color": {
|
|
2706
|
+
const colour = background.color ?? "background";
|
|
2707
|
+
return resolveConcreteColorHex(colour, palette) ? {
|
|
2708
|
+
kind: "measured",
|
|
2709
|
+
token: colour
|
|
2710
|
+
} : {
|
|
2711
|
+
kind: "unmeasured",
|
|
2712
|
+
paint: "colour"
|
|
2713
|
+
};
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
function finishedSectionPaint(background, named, input) {
|
|
2718
|
+
if (!input.runtime?.finishes || input.placement === "column" || sectionPaint(background) !== "paint") return void 0;
|
|
2719
|
+
const choices = input.choices.treatment;
|
|
2720
|
+
const paint = resolveSectionTreatment({
|
|
2721
|
+
base: sectionGroundToken(background),
|
|
2722
|
+
...named?.groundPaint
|
|
2723
|
+
}, choices, input.runtime.finishes);
|
|
2724
|
+
if (!paint.texture && !paint.tone) return void 0;
|
|
2725
|
+
const finish = resolveGroundPaint(paint, input.runtime.finishes, input.palette);
|
|
2726
|
+
return finish ? certifyFinishedGround(finish, resolveSectionForeground(background, input.palette), input.runtime.surfaceContext) : {
|
|
2727
|
+
kind: "dropped",
|
|
2728
|
+
reason: "unmeasurable-finish"
|
|
2729
|
+
};
|
|
2730
|
+
}
|
|
2731
|
+
function sectionFinishFacts(background, finished) {
|
|
2732
|
+
if (finished?.kind === "certified") return {
|
|
2733
|
+
topPaint: finished.finish.topPaint,
|
|
2734
|
+
footPaint: finished.finish.footPaint,
|
|
2735
|
+
finishedPaint: finished.finish
|
|
2736
|
+
};
|
|
2737
|
+
const paint = sectionBackgroundPaint(background);
|
|
2738
|
+
const colour = sectionPaint(background) === "paint" ? paint?.type === "color" ? paint.color ?? "background" : "background" : null;
|
|
2739
|
+
return {
|
|
2740
|
+
topPaint: colour,
|
|
2741
|
+
footPaint: colour,
|
|
2742
|
+
...finished ? { finishDropped: finished.reason } : {}
|
|
2743
|
+
};
|
|
2744
|
+
}
|
|
2745
|
+
/** Even an automatically inherited base becomes an explicit measurable paint when finished. */
|
|
2746
|
+
function finishedForegroundPaint(background, finished, palette) {
|
|
2747
|
+
return finished?.kind === "certified" ? {
|
|
2748
|
+
type: "color",
|
|
2749
|
+
color: finished.finish.paint.base
|
|
2750
|
+
} : sectionForegroundBackground(background, palette);
|
|
2751
|
+
}
|
|
2444
2752
|
//#endregion
|
|
2445
2753
|
//#region ../theme-core/src/site-styles/pageDesignEditorOptions.ts
|
|
2446
2754
|
function isRecipeLookOption(option) {
|
|
@@ -2504,6 +2812,43 @@ function editorEffectiveLayout(input) {
|
|
|
2504
2812
|
});
|
|
2505
2813
|
}
|
|
2506
2814
|
//#endregion
|
|
2815
|
+
//#region ../theme-core/src/site-styles/sectionBreakOffer.ts
|
|
2816
|
+
const noneFamilyOffer = {
|
|
2817
|
+
family: "none",
|
|
2818
|
+
label: "None",
|
|
2819
|
+
variants: [],
|
|
2820
|
+
layers: [1],
|
|
2821
|
+
colourPresets: ["fade"]
|
|
2822
|
+
};
|
|
2823
|
+
/** The families offered, in catalogue order, from the style's admitted breaks and its edge support. */
|
|
2824
|
+
function sectionBreakOffer(availableBreaks, edges) {
|
|
2825
|
+
const offered = new Set(availableBreaks.map((option) => option.id));
|
|
2826
|
+
return sectionTransitionFamilies.flatMap((family) => {
|
|
2827
|
+
const variants = family.variants.filter((variant) => offered.has(variant.boundaryOption.id));
|
|
2828
|
+
if (variants.length === 0) return [];
|
|
2829
|
+
if (family.id === "none") return [noneFamilyOffer];
|
|
2830
|
+
const support = edges.supported.find((entry) => entry.family === family.id);
|
|
2831
|
+
if (!support) return [];
|
|
2832
|
+
return [{
|
|
2833
|
+
family: family.id,
|
|
2834
|
+
label: family.label,
|
|
2835
|
+
variants: variants.map((variant) => ({
|
|
2836
|
+
variant: variant.boundaryOption.treatment.variant ?? variant.variantId,
|
|
2837
|
+
label: variant.label
|
|
2838
|
+
})),
|
|
2839
|
+
layers: layerRange(support.minLayers ?? 1, support.maxLayers),
|
|
2840
|
+
colourPresets: requireNonEmptyReadonlyArray(support.colourPresets, `Edge support for ${family.id} offers no colours.`)
|
|
2841
|
+
}];
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
function layerRange(minimum, maximum) {
|
|
2845
|
+
return requireNonEmptyReadonlyArray([
|
|
2846
|
+
1,
|
|
2847
|
+
2,
|
|
2848
|
+
3
|
|
2849
|
+
].filter((layers) => layers >= minimum && layers <= maximum), `Edge support allows no layers between ${minimum} and ${maximum}.`);
|
|
2850
|
+
}
|
|
2851
|
+
//#endregion
|
|
2507
2852
|
//#region ../theme-core/src/site-styles/pageDesignEditorBoundaries.ts
|
|
2508
2853
|
function buildBoundaryReadModels(input) {
|
|
2509
2854
|
return boundaryReadModels({
|
|
@@ -2519,6 +2864,7 @@ function boundaryPinIssues(input) {
|
|
|
2519
2864
|
if (!next) return [];
|
|
2520
2865
|
const choice = resolvePageDesignBoundaryChoice(input.intent, previous.blockId, next.blockId);
|
|
2521
2866
|
return choice.kind === "user-pinned" ? resolveJoinTreatment({
|
|
2867
|
+
siteStyleId: input.siteStyleId,
|
|
2522
2868
|
previousBlockId: previous.blockId,
|
|
2523
2869
|
nextBlockId: next.blockId,
|
|
2524
2870
|
candidates: [{
|
|
@@ -2529,33 +2875,31 @@ function boundaryPinIssues(input) {
|
|
|
2529
2875
|
});
|
|
2530
2876
|
}
|
|
2531
2877
|
function boundaryReadModels(input) {
|
|
2532
|
-
const
|
|
2878
|
+
const availableBreaks = boundaryOptionsForStyle(input.siteStyleId);
|
|
2879
|
+
const breakOffer = sectionBreakOffer(availableBreaks, siteStyleEdges(input.siteStyleId));
|
|
2533
2880
|
return resolvePageJoins({
|
|
2534
2881
|
...input,
|
|
2535
2882
|
blocks: input.blocks.map((block) => ({
|
|
2536
2883
|
blockId: block.blockId,
|
|
2537
|
-
...
|
|
2884
|
+
...requireJoinFacts(block)
|
|
2538
2885
|
}))
|
|
2539
2886
|
}).map((decision) => {
|
|
2540
|
-
const projection = decision.pin.kind === "user-pinned" ? pinnedBreakChoice(decision.resolution) : autoBreakChoice(decision.automatic, input.pageFlowPresetId);
|
|
2887
|
+
const projection = decision.pin.kind === "user-pinned" ? pinnedBreakChoice(decision.resolution, decision.pin.value) : autoBreakChoice(decision.automatic, input.pageFlowPresetId);
|
|
2541
2888
|
return {
|
|
2542
2889
|
boundary: {
|
|
2543
2890
|
boundaryId: makeBoundaryId(decision.previousBlockId, decision.nextBlockId),
|
|
2544
2891
|
previousBlockId: decision.previousBlockId,
|
|
2545
2892
|
nextBlockId: decision.nextBlockId,
|
|
2546
2893
|
breakChoice: projection.breakChoice,
|
|
2547
|
-
|
|
2894
|
+
...decision.pin.kind === "user-pinned" ? { authoredEdge: decision.pin.value } : {},
|
|
2895
|
+
...decision.resolution.join ? { effectiveEdge: decision.resolution.join.edge } : {},
|
|
2896
|
+
availableBreaks,
|
|
2897
|
+
breakOffer
|
|
2548
2898
|
},
|
|
2549
2899
|
issues: projection.issues
|
|
2550
2900
|
};
|
|
2551
2901
|
});
|
|
2552
2902
|
}
|
|
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
2903
|
function requireJoinFacts(block) {
|
|
2560
2904
|
if (!block.joinFacts) throw new Error(`Boundary facts were not resolved for ${block.blockId}`);
|
|
2561
2905
|
return block.joinFacts;
|
|
@@ -2570,7 +2914,7 @@ function autoBreakChoice(resolution, pageFlowPresetId) {
|
|
|
2570
2914
|
issues: resolution.issues
|
|
2571
2915
|
};
|
|
2572
2916
|
}
|
|
2573
|
-
function pinnedBreakChoice(resolution) {
|
|
2917
|
+
function pinnedBreakChoice(resolution, pinned) {
|
|
2574
2918
|
const effectiveValue = effectiveBreak(resolution);
|
|
2575
2919
|
switch (resolution.pin.kind) {
|
|
2576
2920
|
case "unsupported": return {
|
|
@@ -2586,7 +2930,7 @@ function pinnedBreakChoice(resolution) {
|
|
|
2586
2930
|
case "none": return {
|
|
2587
2931
|
breakChoice: {
|
|
2588
2932
|
kind: "user-pinned",
|
|
2589
|
-
value:
|
|
2933
|
+
value: boundaryOptionIdForTreatment(pinned) ?? noneBoundaryOption.id,
|
|
2590
2934
|
status: "supported",
|
|
2591
2935
|
effectiveValue
|
|
2592
2936
|
},
|
|
@@ -2660,6 +3004,7 @@ function buildPageDesignEditorReadModel(input) {
|
|
|
2660
3004
|
pageFlowIssue,
|
|
2661
3005
|
...blockResults.flatMap((result) => result.issues),
|
|
2662
3006
|
...input.joinResolution === null ? boundaryPinIssues({
|
|
3007
|
+
siteStyleId: input.siteStyleId,
|
|
2663
3008
|
intent: input.intent,
|
|
2664
3009
|
blocks
|
|
2665
3010
|
}) : boundaryResults.flatMap((result) => result.issues)
|
|
@@ -3556,6 +3901,498 @@ function parseListLook(kind, value) {
|
|
|
3556
3901
|
return listLooksByKind[kind].find((look) => look === value) ?? null;
|
|
3557
3902
|
}
|
|
3558
3903
|
//#endregion
|
|
3904
|
+
//#region ../theme-core/src/site-styles/boundaryLayers.ts
|
|
3905
|
+
/** Back paints are palette roles, never another section's inherited texture. Fade repeats its own ground. */
|
|
3906
|
+
function boundaryBackPaints(intent, pin, front, previous, palette = {}) {
|
|
3907
|
+
const edge = pin ?? transitionCatalogueEntryForIntent(intent).treatment;
|
|
3908
|
+
return Array.from({ length: edge.layers - 1 }, (_, index) => {
|
|
3909
|
+
if (edge.colourPreset === "fade") return front;
|
|
3910
|
+
const blended = edge.colourPreset === "blend" ? blendedGround(front, previous, palette, (edge.layers - index - 1) / edge.layers) : null;
|
|
3911
|
+
if (blended) return blended;
|
|
3912
|
+
const roles = edge.colourPreset === "accent" ? [
|
|
3913
|
+
"accent",
|
|
3914
|
+
"primary",
|
|
3915
|
+
"secondary",
|
|
3916
|
+
"text"
|
|
3917
|
+
] : edge.colourPreset === "main" ? [
|
|
3918
|
+
"primary",
|
|
3919
|
+
"secondary",
|
|
3920
|
+
"accent",
|
|
3921
|
+
"text"
|
|
3922
|
+
] : [
|
|
3923
|
+
"secondary",
|
|
3924
|
+
"primary",
|
|
3925
|
+
"accent",
|
|
3926
|
+
"text"
|
|
3927
|
+
];
|
|
3928
|
+
const shows = roles.filter((role) => visibleRole(role, front, previous, palette));
|
|
3929
|
+
return { colour: parseThemeColorToken(shows[index % shows.length] ?? roles[index % roles.length] ?? "primary") ?? front.colour };
|
|
3930
|
+
});
|
|
3931
|
+
}
|
|
3932
|
+
function visibleRole(role, front, previous, palette) {
|
|
3933
|
+
const colour = resolveConcreteColorHex(role, palette) ?? role;
|
|
3934
|
+
return colour !== (resolveConcreteColorHex(front.colour, palette) ?? front.colour) && colour !== (previous ? resolveConcreteColorHex(previous.colour, palette) ?? previous.colour : "");
|
|
3935
|
+
}
|
|
3936
|
+
function blendedGround(front, previous, palette, amount) {
|
|
3937
|
+
const from = previous ? resolveConcreteColorHex(previous.colour, palette) : null;
|
|
3938
|
+
const to = resolveConcreteColorHex(front.colour, palette);
|
|
3939
|
+
if (!from || !to || from === to) return null;
|
|
3940
|
+
return { colour: hexColorSchema.parse(mixGroundColour(from, to, amount)) };
|
|
3941
|
+
}
|
|
3942
|
+
//#endregion
|
|
3943
|
+
//#region ../theme-core/src/site-styles/edgePath.ts
|
|
3944
|
+
const waveMaskSvgPaths = {
|
|
3945
|
+
classic: "M0 72V46C130 55 260 24 420 30C590 36 690 62 860 42C1035 21 1160 47 1305 36C1365 31 1415 33 1440 38V72H0Z",
|
|
3946
|
+
balanced: "M0 72V42C120 24 240 24 360 42C480 60 600 60 720 42C840 24 960 24 1080 42C1200 60 1320 60 1440 42V72H0Z",
|
|
3947
|
+
gentle: "M0 72V43C180 32 300 32 480 43C660 54 780 54 960 43C1140 32 1260 32 1440 43V72H0Z",
|
|
3948
|
+
echo: "M0 72V44C180 34 320 29 500 40C680 51 800 55 970 45C1140 35 1270 31 1440 40V72H0Z",
|
|
3949
|
+
bold: "M0 72V44C90 14 270 14 360 44C450 74 630 74 720 44C810 14 990 14 1080 44C1170 74 1350 74 1440 44V72H0Z",
|
|
3950
|
+
drift: "M0 72V39C115 31 205 54 340 48C505 41 610 16 760 33C920 51 1015 64 1160 44C1280 27 1375 35 1440 50V72H0Z"
|
|
3951
|
+
};
|
|
3952
|
+
/**
|
|
3953
|
+
* The arc (issue 1713): the next section's colour rises to a shallow peak in the
|
|
3954
|
+
* middle. With echo, two lines follow the arc below it, cut part-way into the
|
|
3955
|
+
* shape so the colour behind shows through them; that keeps them a blend of the
|
|
3956
|
+
* two sections' colours, whatever the palette. They fade out towards the peak.
|
|
3957
|
+
*/
|
|
3958
|
+
const arcShapePath = "M0 110V60Q720 -30 1440 60V110Z";
|
|
3959
|
+
const arcEchoLinePaths = ["M0 84Q720 -6 1440 84", "M0 102Q720 12 1440 102"];
|
|
3960
|
+
/** The arc turned over: the next section's colour sits lowest in the middle, under the swell of the section above. */
|
|
3961
|
+
const arcBulgeShapePath = "M0 110V50Q720 140 1440 50V110Z";
|
|
3962
|
+
function arcBulgeMaskDataUrl() {
|
|
3963
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 110' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${arcBulgeShapePath}' fill='white'/></svg>`);
|
|
3964
|
+
}
|
|
3965
|
+
function arcMaskDataUrl(echo) {
|
|
3966
|
+
const lines = arcEchoLinePaths.map((d) => `<path d='${d}' fill='none' stroke='url(#fade)' stroke-width='1.5' vector-effect='non-scaling-stroke'/>`).join("");
|
|
3967
|
+
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>`);
|
|
3968
|
+
}
|
|
3969
|
+
/** One half disc of the next colour, rising from the join. Between two of them the colour above shows as a punched hole would. */
|
|
3970
|
+
function tornMaskDataUrl(pitchPx, holeRadiusPx) {
|
|
3971
|
+
const height = Math.ceil(holeRadiusPx);
|
|
3972
|
+
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>`);
|
|
3973
|
+
}
|
|
3974
|
+
function waveMaskDataUrl(mask) {
|
|
3975
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${waveMaskSvgPaths[mask]}' fill='white'/></svg>`);
|
|
3976
|
+
}
|
|
3977
|
+
const defaultEdgeTuning = {
|
|
3978
|
+
amplitude: 1,
|
|
3979
|
+
irregularity: 0,
|
|
3980
|
+
rhythm: 2
|
|
3981
|
+
};
|
|
3982
|
+
const fadeMask = "linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / 16%) 34%, rgb(0 0 0 / 68%) 78%, black 100%)";
|
|
3983
|
+
const wavePeaks = {
|
|
3984
|
+
classic: 3,
|
|
3985
|
+
balanced: 2,
|
|
3986
|
+
gentle: 2,
|
|
3987
|
+
echo: 2,
|
|
3988
|
+
bold: 2,
|
|
3989
|
+
drift: 3
|
|
3990
|
+
};
|
|
3991
|
+
/** Existing literal geometry is immutable at every width. Only new families use generated phone paths. */
|
|
3992
|
+
function edgePath(family, variant, tuning, seed, width) {
|
|
3993
|
+
const entry = transitionCatalogueEntries.find((entry) => entry.family === family && (variant === void 0 || entry.variantId === variant));
|
|
3994
|
+
if (!entry) throw new Error(`Unknown edge: ${family}/${variant ?? "default"}`);
|
|
3995
|
+
const shape = entry.shape;
|
|
3996
|
+
switch (shape.kind) {
|
|
3997
|
+
case "fade": return {
|
|
3998
|
+
kind: "fade",
|
|
3999
|
+
mask: fadeMask,
|
|
4000
|
+
clipPath: "none",
|
|
4001
|
+
path: "",
|
|
4002
|
+
viewHeight: 72,
|
|
4003
|
+
peaks: 0,
|
|
4004
|
+
amplitude: 0
|
|
4005
|
+
};
|
|
4006
|
+
case "generated": return generatedEdge(family, tuning, seed, width);
|
|
4007
|
+
case "wave": return waveEdge(shape.mask);
|
|
4008
|
+
case "arc": return arcEdge(shape);
|
|
4009
|
+
case "angle": return angleEdge(shape.polygon);
|
|
4010
|
+
case "torn": return tornEdge(shape.pitchPx, shape.holeRadiusPx);
|
|
4011
|
+
}
|
|
4012
|
+
}
|
|
4013
|
+
function waveEdge(mask) {
|
|
4014
|
+
return {
|
|
4015
|
+
kind: "mask",
|
|
4016
|
+
mask: `url("${waveMaskDataUrl(mask)}")`,
|
|
4017
|
+
clipPath: "none",
|
|
4018
|
+
path: waveMaskSvgPaths[mask],
|
|
4019
|
+
viewHeight: 72,
|
|
4020
|
+
peaks: wavePeaks[mask],
|
|
4021
|
+
amplitude: mask === "bold" ? 30 : 18
|
|
4022
|
+
};
|
|
4023
|
+
}
|
|
4024
|
+
function angleEdge(polygon) {
|
|
4025
|
+
return {
|
|
4026
|
+
kind: "angle",
|
|
4027
|
+
polygon,
|
|
4028
|
+
mask: "none",
|
|
4029
|
+
clipPath: anglePolygonCss(polygon),
|
|
4030
|
+
path: `M0 ${polygon.startTopPercent}L100 ${polygon.endTopPercent}V100H0Z`,
|
|
4031
|
+
viewHeight: 100,
|
|
4032
|
+
peaks: 1,
|
|
4033
|
+
amplitude: Math.abs(polygon.startTopPercent - polygon.endTopPercent)
|
|
4034
|
+
};
|
|
4035
|
+
}
|
|
4036
|
+
function tornEdge(pitchPx, holeRadiusPx) {
|
|
4037
|
+
const height = Math.ceil(holeRadiusPx);
|
|
4038
|
+
return {
|
|
4039
|
+
kind: "mask",
|
|
4040
|
+
mask: `url("${tornMaskDataUrl(pitchPx, holeRadiusPx)}")`,
|
|
4041
|
+
clipPath: "none",
|
|
4042
|
+
path: `M0 ${height}A${holeRadiusPx} ${holeRadiusPx} 0 0 1 ${pitchPx} ${height}Z`,
|
|
4043
|
+
viewHeight: height,
|
|
4044
|
+
peaks: 0,
|
|
4045
|
+
amplitude: holeRadiusPx,
|
|
4046
|
+
tilePx: pitchPx
|
|
4047
|
+
};
|
|
4048
|
+
}
|
|
4049
|
+
function arcEdge({ echo, bulge }) {
|
|
4050
|
+
const path = bulge ? arcBulgeShapePath : arcShapePath;
|
|
4051
|
+
return {
|
|
4052
|
+
kind: "mask",
|
|
4053
|
+
mask: `url("${bulge ? arcBulgeMaskDataUrl() : arcMaskDataUrl(echo === true)}")`,
|
|
4054
|
+
clipPath: "none",
|
|
4055
|
+
path,
|
|
4056
|
+
viewHeight: 110,
|
|
4057
|
+
peaks: 1,
|
|
4058
|
+
amplitude: 90
|
|
4059
|
+
};
|
|
4060
|
+
}
|
|
4061
|
+
function seedValue(seed) {
|
|
4062
|
+
return Array.from(seed).reduce((value, character) => Math.imul(value, 31) + character.charCodeAt(0) >>> 0, 2166136261);
|
|
4063
|
+
}
|
|
4064
|
+
function generatedEdge(family, tuning, seed, width) {
|
|
4065
|
+
const narrow = width === "narrow";
|
|
4066
|
+
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)));
|
|
4067
|
+
const amplitude = Math.min(26, Math.max(16, tuning.amplitude * 18)) * (narrow ? .8 : 1);
|
|
4068
|
+
const irregularity = Math.max(0, Math.min(1, tuning.irregularity));
|
|
4069
|
+
const phase = seedValue(seed);
|
|
4070
|
+
const points = Array.from({ length: peaks * 2 + 1 }, (_, index) => ({
|
|
4071
|
+
x: index * 1440 / (peaks * 2),
|
|
4072
|
+
y: index === 0 || index === peaks * 2 ? 42 : 42 + (index % 2 === 0 ? amplitude : -amplitude) * (1 + Math.sin(phase + index * 17) * irregularity * .1)
|
|
4073
|
+
}));
|
|
4074
|
+
const path = `M0 72V42${points.flatMap((previous, index) => {
|
|
4075
|
+
const point = points[index + 1];
|
|
4076
|
+
return point ? [family === "ridge" ? `L${point.x} ${point.y}` : `Q${(previous.x + point.x) / 2} ${previous.y} ${point.x} ${point.y}`] : [];
|
|
4077
|
+
}).join("")}V72H0Z`;
|
|
4078
|
+
return {
|
|
4079
|
+
kind: "mask",
|
|
4080
|
+
mask: `url("${svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${path}' fill='white'/></svg>`)}")`,
|
|
4081
|
+
clipPath: "none",
|
|
4082
|
+
path,
|
|
4083
|
+
viewHeight: 72,
|
|
4084
|
+
peaks,
|
|
4085
|
+
amplitude
|
|
4086
|
+
};
|
|
4087
|
+
}
|
|
4088
|
+
/** Reflect a texture overlay's alpha mask; the texture field itself stays untransformed. */
|
|
4089
|
+
function reflectEdgeMask(mask, viewHeight, axis) {
|
|
4090
|
+
if (axis === "y" && mask.startsWith("linear-gradient")) return mask.replace("to bottom", "to top");
|
|
4091
|
+
if (!mask.startsWith("url(\"data:image/svg+xml,")) return mask;
|
|
4092
|
+
const svg = decodeURIComponent(mask.slice(24, -2));
|
|
4093
|
+
const viewWidth = Number(/viewBox='0 0 ([\d.]+) /.exec(svg)?.[1] ?? 1440);
|
|
4094
|
+
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)`}'>`))}")`;
|
|
4095
|
+
}
|
|
4096
|
+
function svgDataUrl(svg) {
|
|
4097
|
+
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
4098
|
+
}
|
|
4099
|
+
//#endregion
|
|
4100
|
+
//#region ../theme-core/src/site-styles/boundaryGeometry.ts
|
|
4101
|
+
const fadeFallback = "linear-gradient(to bottom, transparent 0%, var(--boundary-shape-paint) 100%)";
|
|
4102
|
+
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%)";
|
|
4103
|
+
/** One geometry delivery path for page joins and footer markup. */
|
|
4104
|
+
function boundaryGeometryStyle(intent, seed, placement = "previous", tuning = defaultEdgeTuning) {
|
|
4105
|
+
const entry = transitionCatalogueEntryForIntent(intent);
|
|
4106
|
+
const wide = edgePath(entry.family, entry.variantId, tuning, seed, "wide");
|
|
4107
|
+
const narrow = edgePath(entry.family, entry.variantId, tuning, seed, "narrow");
|
|
4108
|
+
return {
|
|
4109
|
+
"--boundary-height": boundaryRuntimeMetricsForDecorativeTransition(intent).heightCss,
|
|
4110
|
+
"--boundary-footer-back-content": entry.treatment.layers > 1 ? "''" : "none",
|
|
4111
|
+
"--boundary-shape-height": entry.family === "arc" || entry.family === "angle" ? "calc(var(--boundary-height) + 2px)" : "var(--boundary-height)",
|
|
4112
|
+
...wide.tilePx === void 0 ? {} : {
|
|
4113
|
+
"--boundary-mask-tile-width": `${wide.tilePx}px`,
|
|
4114
|
+
"--boundary-mask-repeat": "repeat-x"
|
|
4115
|
+
},
|
|
4116
|
+
"--boundary-shape-background": wide.kind === "fade" ? fadeFallback : "var(--boundary-shape-paint)",
|
|
4117
|
+
"--boundary-shape-background-mixed": wide.kind === "fade" ? fadeBackground : "var(--boundary-shape-paint)",
|
|
4118
|
+
...widthStyle(wide, "wide", placement, false),
|
|
4119
|
+
...widthStyle(narrow, "narrow", placement, false),
|
|
4120
|
+
...backWidthStyle(wide, "wide", placement),
|
|
4121
|
+
...backWidthStyle(narrow, "narrow", placement)
|
|
4122
|
+
};
|
|
4123
|
+
}
|
|
4124
|
+
function widthStyle(shape, width, placement, mirror) {
|
|
4125
|
+
const reflected = mirror ? reflectEdgeMask(shape.mask, shape.viewHeight, "x") : shape.mask;
|
|
4126
|
+
const mask = placement === "next" ? reflectEdgeMask(reflected, shape.viewHeight, "y") : reflected;
|
|
4127
|
+
const clip = textureClip(shape, placement, mirror);
|
|
4128
|
+
return {
|
|
4129
|
+
[`--boundary-mask-${width}`]: shape.kind === "fade" ? "none" : shape.mask,
|
|
4130
|
+
[`--boundary-texture-mask-${width}`]: mask,
|
|
4131
|
+
[`--boundary-clip-${width}`]: shape.clipPath,
|
|
4132
|
+
[`--boundary-texture-clip-${width}`]: clip,
|
|
4133
|
+
...sectionMaskStyle(shape, width, placement, mirror)
|
|
4134
|
+
};
|
|
4135
|
+
}
|
|
4136
|
+
/** Back layers reuse the same tuned path, reflected in its geometry rather than its textured box. */
|
|
4137
|
+
function backWidthStyle(shape, width, placement) {
|
|
4138
|
+
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]));
|
|
4139
|
+
}
|
|
4140
|
+
function textureClip(shape, placement, mirror) {
|
|
4141
|
+
if (shape.kind !== "angle") return "none";
|
|
4142
|
+
const start = mirror ? shape.polygon.endTopPercent : shape.polygon.startTopPercent;
|
|
4143
|
+
const end = mirror ? shape.polygon.startTopPercent : shape.polygon.endTopPercent;
|
|
4144
|
+
return placement === "next" ? `polygon(0 0, 100% 0, 100% ${100 - end}%, 0 ${100 - start}%)` : `polygon(0 ${start}%, 100% ${end}%, 100% 100%, 0 100%)`;
|
|
4145
|
+
}
|
|
4146
|
+
/** Full section planes need an alpha mask for angles, and the fallback alpha ramp for fades. */
|
|
4147
|
+
function sectionMaskStyle(shape, width, placement, mirror) {
|
|
4148
|
+
if (shape.kind !== "angle" && shape.kind !== "fade") return {};
|
|
4149
|
+
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%)";
|
|
4150
|
+
const reflected = mirror ? reflectEdgeMask(mask, shape.viewHeight, "x") : mask;
|
|
4151
|
+
return { [`--boundary-section-mask-${width}`]: placement === "next" ? reflectEdgeMask(reflected, shape.viewHeight, "y") : reflected };
|
|
4152
|
+
}
|
|
4153
|
+
//#endregion
|
|
4154
|
+
//#region ../theme-core/src/site-styles/sectionBoundaryComposition.ts
|
|
4155
|
+
/**
|
|
4156
|
+
* Classifies a section from its final render content. `_sectionStyles`
|
|
4157
|
+
* already holds the effective background (Look default, page-design override
|
|
4158
|
+
* and block-authored media merged by `resolveSectionBackground`), so this only
|
|
4159
|
+
* reads it and never re-decides precedence. What it paints comes from
|
|
4160
|
+
* `groundPaint`, the same decision the background layer paints from, given
|
|
4161
|
+
* the ground the section declares for when its content sets no colour.
|
|
4162
|
+
*/
|
|
4163
|
+
function boundaryEndpointForSectionContent(content, ground, side = "top") {
|
|
4164
|
+
const decision = sectionDecisionFromContent(content);
|
|
4165
|
+
const finished = decidedBoundaryEndpoint(decision, side);
|
|
4166
|
+
if (finished) return finished;
|
|
4167
|
+
const background = decision?.background ?? parseCanonicalRuntimeBackground(content);
|
|
4168
|
+
const paint = groundPaint(background.kind === "none" || background.kind === "base" ? null : background.background, ground.fallback);
|
|
4169
|
+
switch (paint.kind) {
|
|
4170
|
+
case "fill": {
|
|
4171
|
+
const token = parseThemeColorToken(paint.colour);
|
|
4172
|
+
return token ? {
|
|
4173
|
+
kind: "paint",
|
|
4174
|
+
token
|
|
4175
|
+
} : {
|
|
4176
|
+
kind: "unpainted",
|
|
4177
|
+
reason: "literal-color"
|
|
4178
|
+
};
|
|
4179
|
+
}
|
|
4180
|
+
case "gradient": return {
|
|
4181
|
+
kind: "unpainted",
|
|
4182
|
+
reason: "gradient"
|
|
4183
|
+
};
|
|
4184
|
+
case "media": return {
|
|
4185
|
+
kind: "unpainted",
|
|
4186
|
+
reason: "media"
|
|
4187
|
+
};
|
|
4188
|
+
case "bare": return {
|
|
4189
|
+
kind: "paint",
|
|
4190
|
+
token: pageGround.fallback
|
|
4191
|
+
};
|
|
4192
|
+
default: return assertNever$5(paint, "Unhandled ground paint");
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
/**
|
|
4196
|
+
* Reads every fact from final render content in one place. `_frameStyles` is
|
|
4197
|
+
* the compiled frame; content without one (no page design, an SDK block)
|
|
4198
|
+
* draws a plain frame. `ground` is what the section declares it paints when
|
|
4199
|
+
* its content sets no colour (`pageGround` for a section that declares none).
|
|
4200
|
+
*/
|
|
4201
|
+
function sectionFactsForContent(content, ground) {
|
|
4202
|
+
const photoGround = isLookPhotoGround(content);
|
|
4203
|
+
return {
|
|
4204
|
+
...sectionDecisionFromContent(content)?.groundName ? { groundName: sectionDecisionFromContent(content)?.groundName } : {},
|
|
4205
|
+
...sectionDecisionFromContent(content)?.finishedPaint ? {
|
|
4206
|
+
finished: true,
|
|
4207
|
+
footEndpoint: photoGround ? {
|
|
4208
|
+
kind: "unpainted",
|
|
4209
|
+
reason: "media"
|
|
4210
|
+
} : boundaryEndpointForSectionContent(content, ground, "foot")
|
|
4211
|
+
} : {},
|
|
4212
|
+
endpoint: photoGround ? {
|
|
4213
|
+
kind: "unpainted",
|
|
4214
|
+
reason: "media"
|
|
4215
|
+
} : boundaryEndpointForSectionContent(content, ground),
|
|
4216
|
+
...photoGround || isPhotoBackground(content) ? { photo: true } : {},
|
|
4217
|
+
frame: frameKindForContent(content),
|
|
4218
|
+
shape: sectionShapeFromContent(content)
|
|
4219
|
+
};
|
|
4220
|
+
}
|
|
4221
|
+
/** A Look whose photo covers the section (`photoGround`) meets its joins as a photo does, once it has a photo to show. */
|
|
4222
|
+
function isLookPhotoGround(content) {
|
|
4223
|
+
const look = content._effectiveLook;
|
|
4224
|
+
const hooks = content._lookHooks;
|
|
4225
|
+
return isRecord$7(look) && look.photoGround === true && isRecord$7(hooks) && hooks["data-has-photo"] === "true";
|
|
4226
|
+
}
|
|
4227
|
+
function isRecord$7(value) {
|
|
4228
|
+
return typeof value === "object" && value !== null;
|
|
4229
|
+
}
|
|
4230
|
+
function isPhotoBackground(content) {
|
|
4231
|
+
const source = parseCanonicalRuntimeBackground(content);
|
|
4232
|
+
return source.kind !== "none" && source.background.type === "image" && source.background.image != null;
|
|
4233
|
+
}
|
|
4234
|
+
function frameKindForContent(content) {
|
|
4235
|
+
const frameStyles = content._frameStyles;
|
|
4236
|
+
const kind = typeof frameStyles === "object" && frameStyles !== null && "kind" in frameStyles ? frameStyles.kind : null;
|
|
4237
|
+
return kind === "panel" || kind === "flush-panel" ? kind : "plain";
|
|
4238
|
+
}
|
|
4239
|
+
/**
|
|
4240
|
+
* The frame rule: a flush panel owns the edge it runs to, so no break is
|
|
4241
|
+
* drawn next to one. The single home for this rule; the generated
|
|
4242
|
+
* pipeline's budget and the site-style lab ask it with their plan frames.
|
|
4243
|
+
*/
|
|
4244
|
+
function frameNotShownReason(previous, next) {
|
|
4245
|
+
return previous === "flush-panel" || next === "flush-panel" ? "flush-panel" : null;
|
|
4246
|
+
}
|
|
4247
|
+
/**
|
|
4248
|
+
* A field sits in from the page edge with page ground around it, so a break
|
|
4249
|
+
* drawn across its edge would have nothing to join (issue 1659).
|
|
4250
|
+
*/
|
|
4251
|
+
function shapeNotShownReason(previous, next) {
|
|
4252
|
+
return previous === "field" || next === "field" ? "field" : null;
|
|
4253
|
+
}
|
|
4254
|
+
/**
|
|
4255
|
+
* Decides whether and how a join draws. The frame and shape rules win before
|
|
4256
|
+
* paint is considered; two unpainted sides show nothing.
|
|
4257
|
+
*/
|
|
4258
|
+
function composeBoundary(previous, next, treatment) {
|
|
4259
|
+
const frameReason = frameNotShownReason(previous.frame, next.frame) ?? shapeNotShownReason(previous.shape, next.shape);
|
|
4260
|
+
if (frameReason) return {
|
|
4261
|
+
kind: "not-shown",
|
|
4262
|
+
reason: frameReason
|
|
4263
|
+
};
|
|
4264
|
+
const touching = touchingFoot(previous);
|
|
4265
|
+
const paintReason = paintNotShownReason(touching, next, treatment);
|
|
4266
|
+
if (paintReason) return {
|
|
4267
|
+
kind: "not-shown",
|
|
4268
|
+
reason: paintReason
|
|
4269
|
+
};
|
|
4270
|
+
return composeEndpoints(touching.endpoint, next.endpoint);
|
|
4271
|
+
}
|
|
4272
|
+
/** The previous section as it meets the next: a finished ground's foot, not its top. */
|
|
4273
|
+
function touchingFoot(previous) {
|
|
4274
|
+
return previous.footEndpoint ? {
|
|
4275
|
+
...previous,
|
|
4276
|
+
endpoint: previous.footEndpoint
|
|
4277
|
+
} : previous;
|
|
4278
|
+
}
|
|
4279
|
+
/**
|
|
4280
|
+
* Decides the seam between two adjacent sections from the same facts that
|
|
4281
|
+
* decide the boundary. Shared ground needs two platform sections painting the
|
|
4282
|
+
* identical theme token, with no field, flush panel or photo on either side;
|
|
4283
|
+
* gradients and literal colours are unpainted, so they never merge. A shared
|
|
4284
|
+
* ground is always a `same-paint` join, so a seam never sits beside a drawn
|
|
4285
|
+
* boundary or its reserves.
|
|
4286
|
+
*/
|
|
4287
|
+
function sectionSeam(previous, next) {
|
|
4288
|
+
if (previous.facts.shape === "field" && next.facts.shape === "field") return "fields";
|
|
4289
|
+
return mergesGround(previous) && mergesGround(next) && sameGroundPaint(touchingFoot(previous.facts), next.facts) ? "shared-ground" : "none";
|
|
4290
|
+
}
|
|
4291
|
+
/** A side can share its ground only when the platform paints it edge to edge, with no flush panel or photo. */
|
|
4292
|
+
function mergesGround(side) {
|
|
4293
|
+
const { facts } = side;
|
|
4294
|
+
return side.section === "platform" && facts.shape !== "field" && facts.frame !== "flush-panel" && !facts.photo;
|
|
4295
|
+
}
|
|
4296
|
+
/** Treatment-specific placement and indistinguishable paint are composition decisions. */
|
|
4297
|
+
function paintNotShownReason(previous, next, treatment) {
|
|
4298
|
+
if (treatment === "wave-edge-echo" && (!previous.photo || next.endpoint.kind !== "paint")) return "photo-required";
|
|
4299
|
+
return sameGroundPaint(previous, next) ? "same-paint" : null;
|
|
4300
|
+
}
|
|
4301
|
+
/**
|
|
4302
|
+
* Placement, reserves and paint for a shown boundary, derived from the
|
|
4303
|
+
* composition and the catalogue's metrics for the treatment.
|
|
4304
|
+
*/
|
|
4305
|
+
function boundaryLayout(intent, composition, options = {}) {
|
|
4306
|
+
const metrics = boundaryRuntimeMetricsForDecorativeTransition(intent);
|
|
4307
|
+
const placement = composition.kind === "paint-to-paint" ? "centred" : composition.kind === "unpainted-to-paint" ? "previous" : "next";
|
|
4308
|
+
const front = frontGround(composition);
|
|
4309
|
+
const underlay = composition.kind === "paint-to-paint" ? {
|
|
4310
|
+
colour: composition.from,
|
|
4311
|
+
...composition.fromTexture ? { texture: composition.fromTexture } : {}
|
|
4312
|
+
} : null;
|
|
4313
|
+
return {
|
|
4314
|
+
placement,
|
|
4315
|
+
underlay,
|
|
4316
|
+
geometry: boundaryGeometryStyle(intent, options.seed ?? "boundary", placement, options.tuning),
|
|
4317
|
+
reserves: placement === "centred" ? {
|
|
4318
|
+
before: metrics.reserveCss,
|
|
4319
|
+
after: metrics.reserveCss
|
|
4320
|
+
} : placement === "previous" ? {
|
|
4321
|
+
before: metrics.heightCss,
|
|
4322
|
+
after: null
|
|
4323
|
+
} : {
|
|
4324
|
+
before: null,
|
|
4325
|
+
after: metrics.heightCss
|
|
4326
|
+
},
|
|
4327
|
+
paint: {
|
|
4328
|
+
front,
|
|
4329
|
+
back: boundaryBackPaints(intent, options.edge, front, underlay, options.palette)
|
|
4330
|
+
}
|
|
4331
|
+
};
|
|
4332
|
+
}
|
|
4333
|
+
function frontGround(composition) {
|
|
4334
|
+
return composition.kind === "paint-to-unpainted" ? {
|
|
4335
|
+
colour: composition.from,
|
|
4336
|
+
...composition.fromTexture ? { texture: composition.fromTexture } : {}
|
|
4337
|
+
} : {
|
|
4338
|
+
colour: composition.to,
|
|
4339
|
+
...composition.toTexture ? { texture: composition.toTexture } : {}
|
|
4340
|
+
};
|
|
4341
|
+
}
|
|
4342
|
+
/** Read the single flat colour the section owner decided for this side. */
|
|
4343
|
+
function decidedBoundaryEndpoint(decision, side) {
|
|
4344
|
+
if (!decision) return null;
|
|
4345
|
+
const paint = side === "top" ? decision.topPaint : decision.footPaint;
|
|
4346
|
+
if (!paint) return null;
|
|
4347
|
+
const token = parseThemeColorToken(paint) ?? (decision.finishedPaint ? hexColorSchema.safeParse(paint).data : void 0);
|
|
4348
|
+
if (!token) return null;
|
|
4349
|
+
const texture = decision.finishedPaint?.texture;
|
|
4350
|
+
return {
|
|
4351
|
+
kind: "paint",
|
|
4352
|
+
token,
|
|
4353
|
+
...texture ? { texture } : {}
|
|
4354
|
+
};
|
|
4355
|
+
}
|
|
4356
|
+
/** A texture change is a paint change; untouched named grounds retain their established identity rule. */
|
|
4357
|
+
function sameGroundPaint(previous, next) {
|
|
4358
|
+
if (previous.endpoint.kind !== "paint" || next.endpoint.kind !== "paint") return false;
|
|
4359
|
+
if (JSON.stringify(previous.endpoint.texture) !== JSON.stringify(next.endpoint.texture)) return false;
|
|
4360
|
+
if (!previous.finished && !next.finished && previous.groundName !== void 0 && next.groundName !== void 0) return previous.groundName === next.groundName;
|
|
4361
|
+
return previous.endpoint.token === next.endpoint.token;
|
|
4362
|
+
}
|
|
4363
|
+
function composeEndpoints(from, to) {
|
|
4364
|
+
if (from.kind === "unpainted" && to.kind === "unpainted") return {
|
|
4365
|
+
kind: "not-shown",
|
|
4366
|
+
reason: "both-unpainted"
|
|
4367
|
+
};
|
|
4368
|
+
if (to.kind === "unpainted") return from.kind === "paint" ? {
|
|
4369
|
+
kind: "shown",
|
|
4370
|
+
composition: {
|
|
4371
|
+
kind: "paint-to-unpainted",
|
|
4372
|
+
from: from.token,
|
|
4373
|
+
...from.texture ? { fromTexture: from.texture } : {}
|
|
4374
|
+
}
|
|
4375
|
+
} : {
|
|
4376
|
+
kind: "not-shown",
|
|
4377
|
+
reason: "both-unpainted"
|
|
4378
|
+
};
|
|
4379
|
+
const texture = to.texture ? { toTexture: to.texture } : {};
|
|
4380
|
+
return {
|
|
4381
|
+
kind: "shown",
|
|
4382
|
+
composition: from.kind === "paint" ? {
|
|
4383
|
+
kind: "paint-to-paint",
|
|
4384
|
+
from: from.token,
|
|
4385
|
+
to: to.token,
|
|
4386
|
+
...from.texture ? { fromTexture: from.texture } : {},
|
|
4387
|
+
...texture
|
|
4388
|
+
} : {
|
|
4389
|
+
kind: "unpainted-to-paint",
|
|
4390
|
+
to: to.token,
|
|
4391
|
+
...texture
|
|
4392
|
+
}
|
|
4393
|
+
};
|
|
4394
|
+
}
|
|
4395
|
+
//#endregion
|
|
3559
4396
|
//#region ../theme-core/src/site-styles/pageDesignVersionIntent.ts
|
|
3560
4397
|
/** Ordinary page versions contain decisions; the site owns their current style. */
|
|
3561
4398
|
const decodedPageDesignIntentSchema = z.union([z.nullish(z.never()).transform(() => ({ kind: "automatic" })), pageDesignDecisionsV2Schema.transform((decisions) => ({
|
|
@@ -3639,9 +4476,9 @@ function generateHoverEffects(axes) {
|
|
|
3639
4476
|
//#endregion
|
|
3640
4477
|
//#region ../theme-core/src/accordions/accordionInks.ts
|
|
3641
4478
|
const TEXT = contrastThresholdByPolicy["body-aa"];
|
|
3642
|
-
/** The CSS colour for a certified ink: a palette variable,
|
|
4479
|
+
/** The CSS colour for a certified ink: a palette variable, including absolute black and white. */
|
|
3643
4480
|
function accordionInkCss(ink) {
|
|
3644
|
-
return rgbColorValue(
|
|
4481
|
+
return rgbColorValue(ink);
|
|
3645
4482
|
}
|
|
3646
4483
|
/** The foreground contract certified on an accordion's own background, or null when it has none. */
|
|
3647
4484
|
function resolveAccordionSurfaceForeground(theme, system) {
|
|
@@ -3821,15 +4658,14 @@ function resolveHeaderDropdownForeground(header, theme) {
|
|
|
3821
4658
|
}, palette);
|
|
3822
4659
|
const text = foreground.kind === "known" ? foreground.roles.text : candidate;
|
|
3823
4660
|
const fill = style?.hoverBackground === void 0 ? text : style.hoverBackground;
|
|
3824
|
-
const menu = foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
|
|
3825
4661
|
return {
|
|
3826
4662
|
style,
|
|
3827
4663
|
backgroundToken,
|
|
3828
4664
|
candidate,
|
|
3829
4665
|
foreground,
|
|
3830
|
-
textToken:
|
|
3831
|
-
linkFill: fill
|
|
3832
|
-
...linkInks(style, text, fill,
|
|
4666
|
+
textToken: text,
|
|
4667
|
+
linkFill: fill,
|
|
4668
|
+
...linkInks(style, text, fill, foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null, palette)
|
|
3833
4669
|
};
|
|
3834
4670
|
}
|
|
3835
4671
|
/** A translucent menu keeps its declared hover text, unmeasured; an opaque one certifies each state. */
|
|
@@ -3858,7 +4694,7 @@ function certifyLinkText(ink, declared, fill, menu, palette) {
|
|
|
3858
4694
|
};
|
|
3859
4695
|
});
|
|
3860
4696
|
return {
|
|
3861
|
-
linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state,
|
|
4697
|
+
linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state, paint?.ink ?? ink]] : [])),
|
|
3862
4698
|
linkPaints: states.flatMap(({ paint }) => paint ? [paint] : []),
|
|
3863
4699
|
linkUnmeasured: states.flatMap(({ state, paint }) => paint ? [] : [linkPlace(state)])
|
|
3864
4700
|
};
|
|
@@ -3971,7 +4807,10 @@ function formatFontFamily(family, fallback = "sans-serif") {
|
|
|
3971
4807
|
*/
|
|
3972
4808
|
function generateCssVars(palette) {
|
|
3973
4809
|
const cssVars = {};
|
|
3974
|
-
Object.entries(
|
|
4810
|
+
Object.entries({
|
|
4811
|
+
...palette,
|
|
4812
|
+
...absoluteInkColors
|
|
4813
|
+
}).forEach(([key, value]) => {
|
|
3975
4814
|
if (key === "meta" || value === null || value === void 0 || typeof value !== "string") return;
|
|
3976
4815
|
const { r, g, b } = hexToRgb(value);
|
|
3977
4816
|
cssVars[`--tb-${key}`] = `${r} ${g} ${b}`;
|
|
@@ -5881,11 +6720,24 @@ function getResponsiveScopeSpec(mode = DEFAULT_THEME_RESPONSIVE_MODE) {
|
|
|
5881
6720
|
selector: `[${THEME_RESPONSIVE_MODE_ATTR}="viewport"]`
|
|
5882
6721
|
};
|
|
5883
6722
|
}
|
|
6723
|
+
function getContainerResponsiveScopeSpec() {
|
|
6724
|
+
return {
|
|
6725
|
+
kind: "container",
|
|
6726
|
+
selector: `[${THEME_RESPONSIVE_MODE_ATTR}="container"]`,
|
|
6727
|
+
containerName: THEME_RESPONSIVE_CONTAINER_NAME
|
|
6728
|
+
};
|
|
6729
|
+
}
|
|
6730
|
+
function buildResponsiveScopeRule(spec, css) {
|
|
6731
|
+
return `${buildResponsiveScopePrelude(spec)}\n${css.trim()}\n}`;
|
|
6732
|
+
}
|
|
6733
|
+
function buildResponsiveScopePrelude(spec) {
|
|
6734
|
+
return `@scope (${spec.selector}) to (:scope [${THEME_RESPONSIVE_MODE_ATTR}]) {`;
|
|
6735
|
+
}
|
|
5884
6736
|
function escapeRegExp(value) {
|
|
5885
6737
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5886
6738
|
}
|
|
5887
|
-
new RegExp(buildResponsiveScopeRulePatternSource(), "g");
|
|
5888
|
-
new RegExp(buildResponsiveScopeRulePatternSource(), "y");
|
|
6739
|
+
const RESPONSIVE_SCOPE_RULE_PATTERN = new RegExp(buildResponsiveScopeRulePatternSource(), "g");
|
|
6740
|
+
const RESPONSIVE_SCOPE_RULE_AT_PATTERN = new RegExp(buildResponsiveScopeRulePatternSource(), "y");
|
|
5889
6741
|
function buildResponsiveScopeRulePatternSource() {
|
|
5890
6742
|
return [
|
|
5891
6743
|
"@scope",
|
|
@@ -5899,6 +6751,19 @@ function buildResponsiveScopeRulePatternSource() {
|
|
|
5899
6751
|
"\\{"
|
|
5900
6752
|
].join("\\s*");
|
|
5901
6753
|
}
|
|
6754
|
+
function findResponsiveScopeRuleAt(css, index) {
|
|
6755
|
+
RESPONSIVE_SCOPE_RULE_AT_PATTERN.lastIndex = index;
|
|
6756
|
+
if (!RESPONSIVE_SCOPE_RULE_AT_PATTERN.exec(css)) return null;
|
|
6757
|
+
return { openBraceIndex: RESPONSIVE_SCOPE_RULE_AT_PATTERN.lastIndex - 1 };
|
|
6758
|
+
}
|
|
6759
|
+
function hasResponsiveScopeRule(css) {
|
|
6760
|
+
RESPONSIVE_SCOPE_RULE_PATTERN.lastIndex = 0;
|
|
6761
|
+
return RESPONSIVE_SCOPE_RULE_PATTERN.test(css);
|
|
6762
|
+
}
|
|
6763
|
+
function retargetResponsiveScopeRules(css, spec) {
|
|
6764
|
+
RESPONSIVE_SCOPE_RULE_PATTERN.lastIndex = 0;
|
|
6765
|
+
return css.replace(RESPONSIVE_SCOPE_RULE_PATTERN, buildResponsiveScopePrelude(spec));
|
|
6766
|
+
}
|
|
5902
6767
|
//#endregion
|
|
5903
6768
|
//#region ../theme-core/src/header/paintTargets.ts
|
|
5904
6769
|
/** Resolve the element that owns the visible header surface for each layout. */
|
|
@@ -6834,54 +7699,216 @@ function resolveHeaderLogoSurfaceTone(header, palette, surface) {
|
|
|
6834
7699
|
return surfaceToneFromForegroundToken(palette, foreground.kind === "known" ? foreground.roles.text : headerLeafTextColor(header));
|
|
6835
7700
|
}
|
|
6836
7701
|
//#endregion
|
|
6837
|
-
//#region ../theme-core/src/
|
|
7702
|
+
//#region ../theme-core/src/site-styles/groundPaintCss.ts
|
|
7703
|
+
function groundTextureStyle(texture) {
|
|
7704
|
+
return {
|
|
7705
|
+
"--rb-ground-texture-content": "''",
|
|
7706
|
+
"--rb-ground-texture": `var(--rb-texture-${texture.kind})`,
|
|
7707
|
+
"--rb-ground-texture-opacity": String(texture.strength),
|
|
7708
|
+
"--rb-ground-texture-blend": texture.blend
|
|
7709
|
+
};
|
|
7710
|
+
}
|
|
7711
|
+
/** Only the section's existing background layer receives these properties. */
|
|
7712
|
+
function finishedGroundStyle(finish) {
|
|
7713
|
+
return {
|
|
7714
|
+
background: finish.background,
|
|
7715
|
+
...finish.texture ? groundTextureStyle(finish.texture) : {}
|
|
7716
|
+
};
|
|
7717
|
+
}
|
|
7718
|
+
function generateGroundPaintCss(selector) {
|
|
7719
|
+
return `${selector} {\n ${[
|
|
7720
|
+
"paper-grain",
|
|
7721
|
+
"handmade-paper",
|
|
7722
|
+
"plaster"
|
|
7723
|
+
].map((kind) => `--rb-texture-${kind}: ${groundTextureDataUri(kind)};`).join("\n ")}\n}
|
|
7724
|
+
${selector} [data-ground-tone] > :where([data-slot='section'], [data-slot='schedule-section'], [data-slot='shop-section']) {
|
|
7725
|
+
min-height: calc(2 * ${groundFlatZone} + 1px);
|
|
7726
|
+
}
|
|
7727
|
+
${selector} .background-style::before {
|
|
7728
|
+
content: var(--rb-ground-texture-content, none); position: absolute; inset: 0; pointer-events: none;
|
|
7729
|
+
background-image: var(--rb-ground-texture); background-position: 0 0; opacity: var(--rb-ground-texture-opacity);
|
|
7730
|
+
mix-blend-mode: var(--rb-ground-texture-blend);
|
|
7731
|
+
}
|
|
7732
|
+
${selector} [data-section-edge-paint] {
|
|
7733
|
+
position: absolute; inset-inline: 0; z-index: 4; pointer-events: none;
|
|
7734
|
+
mask-image: var(--boundary-section-mask-wide, var(--boundary-texture-mask-wide));
|
|
7735
|
+
-webkit-mask-image: var(--boundary-section-mask-wide, var(--boundary-texture-mask-wide));
|
|
7736
|
+
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);
|
|
7737
|
+
mask-repeat: var(--boundary-mask-repeat, no-repeat); -webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);
|
|
7738
|
+
}
|
|
7739
|
+
${selector} [data-section-edge-paint][data-section-edge-paint='underlay'] {
|
|
7740
|
+
mask-image: linear-gradient(black, black); -webkit-mask-image: linear-gradient(black, black);
|
|
7741
|
+
}
|
|
7742
|
+
${selector} [data-section-edge-paint]::before {
|
|
7743
|
+
content: var(--rb-ground-texture-content, none); position: absolute; inset: 0; pointer-events: none;
|
|
7744
|
+
background-image: var(--rb-ground-texture); background-position: 0 var(--section-texture-y);
|
|
7745
|
+
opacity: var(--rb-ground-texture-opacity); mix-blend-mode: var(--rb-ground-texture-blend);
|
|
7746
|
+
}
|
|
7747
|
+
@supports (color: color-mix(in srgb, black, white)) {
|
|
7748
|
+
${selector} [data-section-edge-fade] {
|
|
7749
|
+
mask-image: var(--boundary-texture-mask-wide); -webkit-mask-image: var(--boundary-texture-mask-wide);
|
|
7750
|
+
}
|
|
7751
|
+
}`;
|
|
7752
|
+
}
|
|
7753
|
+
/** A tone needs space for both flat edge zones and its ramp; texture alone does not. */
|
|
7754
|
+
function groundFinishHooks(finish) {
|
|
7755
|
+
return finish?.paint.tone ? { "data-ground-tone": "true" } : {};
|
|
7756
|
+
}
|
|
7757
|
+
//#endregion
|
|
7758
|
+
//#region ../theme-core/src/responsive/cssScan.ts
|
|
6838
7759
|
/**
|
|
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`.
|
|
7760
|
+
* Scanning for CSS source. Comments and quoted strings are read as whole tokens and
|
|
7761
|
+
* skipped, so a brace or semicolon inside `content: "{"` or a comment never counts.
|
|
6851
7762
|
*/
|
|
6852
|
-
const
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
7763
|
+
const CSS_TOKENS = /\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*(?:"|$)|'(?:\\[\s\S]|[^'\\])*(?:'|$)|[()[\]{};]|[^"'()[\]{};/]+|\//g;
|
|
7764
|
+
/** The only iteration shell: transitions never mutate their input state. */
|
|
7765
|
+
function* scanTokens(source, from, initial, transition) {
|
|
7766
|
+
const pattern = new RegExp(CSS_TOKENS.source, "g");
|
|
7767
|
+
pattern.lastIndex = from;
|
|
7768
|
+
const cursor = { state: initial };
|
|
7769
|
+
for (const match of source.matchAll(pattern)) {
|
|
7770
|
+
const next = transition(cursor.state, {
|
|
7771
|
+
text: match[0],
|
|
7772
|
+
index: match.index
|
|
7773
|
+
});
|
|
7774
|
+
cursor.state = next.state;
|
|
7775
|
+
yield next.output;
|
|
7776
|
+
}
|
|
7777
|
+
}
|
|
7778
|
+
const isSkippedToken = (token) => token.startsWith("/*") || token.startsWith("\"") || token.startsWith("'");
|
|
7779
|
+
function findTransition(depth, token, matches) {
|
|
7780
|
+
if (isSkippedToken(token.text)) return {
|
|
7781
|
+
state: depth,
|
|
7782
|
+
output: -1
|
|
7783
|
+
};
|
|
7784
|
+
const offset = token.text.split("").findIndex((ch, offset) => matches(ch, token.index + offset, depth));
|
|
7785
|
+
return {
|
|
7786
|
+
state: Math.max(0, depth + (token.text === "(" ? 1 : token.text === ")" ? -1 : 0)),
|
|
7787
|
+
output: offset === -1 ? -1 : token.index + offset
|
|
7788
|
+
};
|
|
7789
|
+
}
|
|
7790
|
+
/** First matching character outside comments/strings; depth is before the character. */
|
|
7791
|
+
function findOutsideStringsAndComments(source, from, matches) {
|
|
7792
|
+
for (const found of scanTokens(source, from, 0, (depth, token) => findTransition(depth, token, matches))) if (found !== -1) return found;
|
|
7793
|
+
return -1;
|
|
7794
|
+
}
|
|
7795
|
+
/** The next `target` outside comments, strings and parentheses, or -1. */
|
|
7796
|
+
function findTopLevelChar(source, from, target) {
|
|
7797
|
+
return findOutsideStringsAndComments(source, from, (ch, _index, parenDepth) => ch === target && parenDepth === 0);
|
|
7798
|
+
}
|
|
7799
|
+
function braceTransition(depth, token) {
|
|
7800
|
+
const state = depth + (token.text === "{" ? 1 : token.text === "}" ? -1 : 0);
|
|
7801
|
+
return {
|
|
7802
|
+
state,
|
|
7803
|
+
output: token.text === "}" && state === 0 ? token.index : -1
|
|
7804
|
+
};
|
|
7805
|
+
}
|
|
7806
|
+
/** The index of the brace closing the one at `openIndex`, or -1. */
|
|
7807
|
+
function findMatchingBrace(source, openIndex) {
|
|
7808
|
+
for (const found of scanTokens(source, openIndex, 0, braceTransition)) if (found !== -1) return found;
|
|
7809
|
+
return -1;
|
|
7810
|
+
}
|
|
7811
|
+
const WHITESPACE_AND_COMMENTS = /(?:\s+|\/\*[\s\S]*?(?:\*\/|$))*/y;
|
|
7812
|
+
/** The first index at or after `from` that is not whitespace or inside a comment. */
|
|
7813
|
+
function skipWhitespaceAndComments(source, from) {
|
|
7814
|
+
const pattern = new RegExp(WHITESPACE_AND_COMMENTS.source, "y");
|
|
7815
|
+
pattern.lastIndex = from;
|
|
7816
|
+
const match = pattern.exec(source);
|
|
7817
|
+
return Math.min(source.length, from + (match?.[0].length ?? 0));
|
|
7818
|
+
}
|
|
7819
|
+
//#endregion
|
|
7820
|
+
//#region ../theme-core/src/responsive/transformMediaRules.ts
|
|
7821
|
+
const findNextOpeningBrace = (source, from) => findTopLevelChar(source, from, "{");
|
|
7822
|
+
/** The next `@media` at-rule outside comments and strings, or -1. */
|
|
7823
|
+
const findNextMediaRule = (source, from) => findOutsideStringsAndComments(source, from, (ch, index) => ch === "@" && source.startsWith("@media", index) && !/[a-zA-Z0-9_-]/.test(source[index + 6] ?? ""));
|
|
6860
7824
|
/**
|
|
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.
|
|
7825
|
+
* Rewrites eligible @media blocks to named @container blocks.
|
|
7826
|
+
* Keeps unsupported @media queries unchanged.
|
|
6865
7827
|
*/
|
|
6866
|
-
|
|
6867
|
-
const
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
7828
|
+
function convertMediaRulesToContainerRules(css, containerName = getContainerResponsiveScopeSpec().containerName) {
|
|
7829
|
+
const containerScope = getContainerResponsiveScopeSpec();
|
|
7830
|
+
let output = "";
|
|
7831
|
+
let index = 0;
|
|
7832
|
+
while (index < css.length) {
|
|
7833
|
+
const mediaStart = findNextMediaRule(css, index);
|
|
7834
|
+
if (mediaStart === -1) {
|
|
7835
|
+
output += css.slice(index);
|
|
7836
|
+
break;
|
|
7837
|
+
}
|
|
7838
|
+
output += css.slice(index, mediaStart);
|
|
7839
|
+
const parsed = parseMediaRule(css, mediaStart);
|
|
7840
|
+
if (!parsed) {
|
|
7841
|
+
output += css.slice(mediaStart, mediaStart + 6);
|
|
7842
|
+
index = mediaStart + 6;
|
|
7843
|
+
continue;
|
|
7844
|
+
}
|
|
7845
|
+
const transformedBody = convertMediaRulesToContainerRules(parsed.body, containerName);
|
|
7846
|
+
const containerQuery = convertMediaQueryToContainerQuery(parsed.query);
|
|
7847
|
+
if (containerQuery) {
|
|
7848
|
+
const hasScope = hasResponsiveScopeRule(transformedBody);
|
|
7849
|
+
const rootQualifiedBody = rewriteScopedRootSelectors(hasScope ? retargetResponsiveScopeRules(transformedBody, containerScope) : transformedBody);
|
|
7850
|
+
const scopedBody = hasScope && !hasTopLevelContentOutsideResponsiveScopes(transformedBody) ? rootQualifiedBody : buildResponsiveScopeRule(containerScope, rootQualifiedBody);
|
|
7851
|
+
output += `@container ${containerName} ${containerQuery} {\n${scopedBody}\n}`;
|
|
7852
|
+
} else output += `@media ${parsed.query} {${transformedBody}}`;
|
|
7853
|
+
index = parsed.endIndex;
|
|
7854
|
+
}
|
|
7855
|
+
return output;
|
|
6872
7856
|
}
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
7857
|
+
/** Keep scope-root selectors eligible inside the generated preview scope. */
|
|
7858
|
+
function rewriteScopedRootSelectors(source) {
|
|
7859
|
+
const open = findNextOpeningBrace(source, 0);
|
|
7860
|
+
if (open === -1) return source;
|
|
7861
|
+
const close = findMatchingBrace(source, open);
|
|
7862
|
+
if (close === -1) return source;
|
|
7863
|
+
const prelude = source.slice(0, open);
|
|
7864
|
+
const body = source.slice(open + 1, close);
|
|
7865
|
+
const isAtRule = prelude[skipWhitespaceAndComments(prelude, 0)] === "@";
|
|
7866
|
+
const isKeyframes = /^@(?:-\w+-)?keyframes\b/.test(prelude.trimStart());
|
|
7867
|
+
return `${isAtRule ? prelude : qualifyScopeRoots(prelude)}{${isAtRule && !isKeyframes ? rewriteScopedRootSelectors(body) : body}}${rewriteScopedRootSelectors(source.slice(close + 1))}`;
|
|
7868
|
+
}
|
|
7869
|
+
function qualifyScopeRoots(selector) {
|
|
7870
|
+
return selector.replace(/\/\*[\s\S]*?\*\/|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\[(?:\\.|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^\]\\])*\]|\.theme-scope(?![\w-])/g, (token, offset) => {
|
|
7871
|
+
const isRoot = token === ".theme-scope" || /^\[data-(?:skin|theme-scope)\s*=/.test(token);
|
|
7872
|
+
const alreadyQualified = /^:is\(\s*\*\s*,\s*:scope\s*\)/.test(selector.slice(offset + token.length));
|
|
7873
|
+
return isRoot && !alreadyQualified ? `${token}:is(*, :scope)` : token;
|
|
7874
|
+
});
|
|
6876
7875
|
}
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
7876
|
+
function hasTopLevelContentOutsideResponsiveScopes(source) {
|
|
7877
|
+
let index = 0;
|
|
7878
|
+
while (index < source.length) {
|
|
7879
|
+
index = skipWhitespaceAndComments(source, index);
|
|
7880
|
+
if (index >= source.length) return false;
|
|
7881
|
+
if (!source.startsWith("@scope", index)) return true;
|
|
7882
|
+
const parsedScope = parseScopeRule(source, index);
|
|
7883
|
+
if (!parsedScope) return true;
|
|
7884
|
+
index = parsedScope.endIndex;
|
|
7885
|
+
}
|
|
7886
|
+
return false;
|
|
6881
7887
|
}
|
|
6882
|
-
function
|
|
6883
|
-
|
|
7888
|
+
function parseScopeRule(source, start) {
|
|
7889
|
+
const match = findResponsiveScopeRuleAt(source, start);
|
|
7890
|
+
if (!match) return null;
|
|
7891
|
+
const closeBraceIndex = findMatchingBrace(source, match.openBraceIndex);
|
|
7892
|
+
if (closeBraceIndex === -1) return null;
|
|
7893
|
+
return { endIndex: closeBraceIndex + 1 };
|
|
6884
7894
|
}
|
|
7895
|
+
function parseMediaRule(source, start) {
|
|
7896
|
+
let i = start + 6;
|
|
7897
|
+
while (i < source.length && /\s/.test(source[i] ?? "")) i++;
|
|
7898
|
+
const queryStart = i;
|
|
7899
|
+
const openBraceIndex = findNextOpeningBrace(source, i);
|
|
7900
|
+
if (openBraceIndex === -1) return null;
|
|
7901
|
+
const closeBraceIndex = findMatchingBrace(source, openBraceIndex);
|
|
7902
|
+
if (closeBraceIndex === -1) return null;
|
|
7903
|
+
return {
|
|
7904
|
+
query: source.slice(queryStart, openBraceIndex).trim(),
|
|
7905
|
+
body: source.slice(openBraceIndex + 1, closeBraceIndex),
|
|
7906
|
+
endIndex: closeBraceIndex + 1
|
|
7907
|
+
};
|
|
7908
|
+
}
|
|
7909
|
+
//#endregion
|
|
7910
|
+
//#region ../theme-core/src/layout/boundaryCss.ts
|
|
7911
|
+
/** Geometry comes only from renderer-provided variables. This stylesheet owns placement and reserves. */
|
|
6885
7912
|
/**
|
|
6886
7913
|
* How each placement anchors the layers against the zero-height boundary
|
|
6887
7914
|
* element that sits exactly on the join.
|
|
@@ -6910,7 +7937,7 @@ const placementRules = {
|
|
|
6910
7937
|
* the schedule and shop sections too.
|
|
6911
7938
|
*/
|
|
6912
7939
|
const blockSection = ":where([data-slot='section'], [data-slot='schedule-section'], [data-slot='shop-section'])";
|
|
6913
|
-
function generateBoundaryCss(selector) {
|
|
7940
|
+
function generateBoundaryCss(selector, responsiveMode = "viewport") {
|
|
6914
7941
|
const boundary = `${selector} [data-block-boundary]`;
|
|
6915
7942
|
return [
|
|
6916
7943
|
rule(boundary, [
|
|
@@ -6932,8 +7959,8 @@ function generateBoundaryCss(selector) {
|
|
|
6932
7959
|
rule(`${boundary}::before`, ["z-index: 0;", "background: var(--boundary-band-paint, transparent);"]),
|
|
6933
7960
|
rule(`${boundary}::after`, ["z-index: 1;"]),
|
|
6934
7961
|
...placementCss(boundary),
|
|
6935
|
-
...transitionCatalogueEntries.flatMap((entry) =>
|
|
6936
|
-
|
|
7962
|
+
...transitionCatalogueEntries.flatMap((entry) => footerEdgeReserveCss(selector, entry)),
|
|
7963
|
+
variableBoundaryCss(boundary, responsiveMode, selector)
|
|
6937
7964
|
].join("\n\n");
|
|
6938
7965
|
}
|
|
6939
7966
|
/**
|
|
@@ -6968,66 +7995,61 @@ function placementCss(boundary) {
|
|
|
6968
7995
|
return [rule(`${placed}::after`, rules.shape), rules.band ? rule(`${placed}::before`, rules.band) : rule(`${placed}::before`, ["content: none;"])];
|
|
6969
7996
|
});
|
|
6970
7997
|
}
|
|
6971
|
-
function
|
|
6972
|
-
|
|
7998
|
+
function rule(selector, declarations) {
|
|
7999
|
+
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
8000
|
+
}
|
|
8001
|
+
function variableBoundaryCss(boundary, responsiveMode, scope) {
|
|
8002
|
+
const selected = `${boundary}[data-boundary-geometry]`;
|
|
8003
|
+
const shapes = `${selected}::after, ${selected} > [data-boundary-back]`;
|
|
6973
8004
|
return [
|
|
6974
|
-
rule(
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
"
|
|
8005
|
+
rule(shapes, [
|
|
8006
|
+
"height: var(--boundary-shape-height);",
|
|
8007
|
+
"background: var(--boundary-shape-background);",
|
|
8008
|
+
"mask-image: var(--boundary-mask-wide);",
|
|
8009
|
+
"-webkit-mask-image: var(--boundary-mask-wide);",
|
|
8010
|
+
"clip-path: var(--boundary-clip-wide);",
|
|
8011
|
+
"mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8012
|
+
"-webkit-mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8013
|
+
"mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
8014
|
+
"-webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
8015
|
+
"mask-position: center;",
|
|
8016
|
+
"-webkit-mask-position: center;"
|
|
8017
|
+
]),
|
|
8018
|
+
`@supports (color: color-mix(in srgb, black, white)) {\n${rule(shapes, ["background: var(--boundary-shape-background-mixed);"])}\n}`,
|
|
8019
|
+
rule(`${selected}::after`, ["z-index: 2;"]),
|
|
8020
|
+
rule(`${selected}[data-boundary-section-owned]::before, ${selected}[data-boundary-section-owned]::after`, ["content: none;"]),
|
|
8021
|
+
rule(`${selected}::before`, ["mask: none;", "opacity: 1;"]),
|
|
8022
|
+
rule(`${selected}[data-boundary-placement='previous']::before, ${selected}[data-boundary-placement='next']::before`, ["content: none;"]),
|
|
8023
|
+
rule(`${selected} > [data-boundary-back]`, [
|
|
8024
|
+
"position: absolute;",
|
|
8025
|
+
"inset-inline: 0;",
|
|
8026
|
+
"pointer-events: none;",
|
|
8027
|
+
"z-index: 1;"
|
|
8028
|
+
]),
|
|
8029
|
+
rule(`${selected}[data-footer-edge]::before`, [
|
|
8030
|
+
"content: var(--boundary-footer-back-content);",
|
|
8031
|
+
"background: var(--boundary-shape-paint);",
|
|
8032
|
+
"top: auto;",
|
|
6979
8033
|
"bottom: 0;",
|
|
8034
|
+
"height: var(--boundary-shape-height);",
|
|
6980
8035
|
"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}`;
|
|
8036
|
+
"opacity: 0.5;",
|
|
8037
|
+
"mask-image: var(--boundary-mask-wide);",
|
|
8038
|
+
"-webkit-mask-image: var(--boundary-mask-wide);",
|
|
8039
|
+
"mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8040
|
+
"-webkit-mask-size: var(--boundary-mask-tile-width, 100%) 100%;",
|
|
8041
|
+
"mask-repeat: var(--boundary-mask-repeat, no-repeat);",
|
|
8042
|
+
"-webkit-mask-repeat: var(--boundary-mask-repeat, no-repeat);"
|
|
8043
|
+
]),
|
|
8044
|
+
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, [
|
|
8045
|
+
"mask-image: var(--boundary-mask-narrow);",
|
|
8046
|
+
"-webkit-mask-image: var(--boundary-mask-narrow);",
|
|
8047
|
+
"clip-path: var(--boundary-clip-narrow);"
|
|
8048
|
+
])}\n${rule(`${selected}[data-footer-edge]::before`, ["mask-image: var(--boundary-mask-narrow);", "-webkit-mask-image: var(--boundary-mask-narrow);"])}\n}`, responsiveMode)
|
|
8049
|
+
].join("\n\n");
|
|
7028
8050
|
}
|
|
7029
|
-
function
|
|
7030
|
-
return
|
|
8051
|
+
function narrowBoundaryCss(css, responsiveMode) {
|
|
8052
|
+
return responsiveMode === "container" ? convertMediaRulesToContainerRules(css) : css;
|
|
7031
8053
|
}
|
|
7032
8054
|
//#endregion
|
|
7033
8055
|
//#region ../theme-core/src/layout/generateLayoutCss.ts
|
|
@@ -7054,7 +8076,8 @@ function generateLayoutCss(options) {
|
|
|
7054
8076
|
if (heroTypographyCss) cssChunks.push(heroTypographyCss);
|
|
7055
8077
|
const bodyTextTypographyCss = generateBodyTextTypographyCss(themeId, theme);
|
|
7056
8078
|
if (bodyTextTypographyCss) cssChunks.push(bodyTextTypographyCss);
|
|
7057
|
-
cssChunks.push(
|
|
8079
|
+
cssChunks.push(generateGroundPaintCss(selector));
|
|
8080
|
+
cssChunks.push(generateBoundaryCss(selector, options.responsiveMode));
|
|
7058
8081
|
return cssChunks.join("\n\n");
|
|
7059
8082
|
}
|
|
7060
8083
|
function toPaddingValue(preset) {
|
|
@@ -8597,7 +9620,8 @@ function buildThemeRuntime$1(theme, options) {
|
|
|
8597
9620
|
});
|
|
8598
9621
|
const layoutCss = generateLayoutCss({
|
|
8599
9622
|
themeId,
|
|
8600
|
-
theme
|
|
9623
|
+
theme,
|
|
9624
|
+
responsiveMode
|
|
8601
9625
|
});
|
|
8602
9626
|
const statusCss = generateStatusCss({
|
|
8603
9627
|
themeId,
|
|
@@ -9714,7 +10738,7 @@ function discountItem(discount, currency, copy) {
|
|
|
9714
10738
|
kind: "discount",
|
|
9715
10739
|
figure,
|
|
9716
10740
|
label: copy.discountLabel?.trim() || discount.publicLabel,
|
|
9717
|
-
text: copy.discountText?.trim() || (minimum ? `When you
|
|
10741
|
+
text: copy.discountText?.trim() || (minimum ? `When you book ${minimum} or more places.` : "Applied automatically when you book."),
|
|
9718
10742
|
...itemLink("discount", copy)
|
|
9719
10743
|
}];
|
|
9720
10744
|
}
|
|
@@ -9956,7 +10980,7 @@ function resolveSurfaceForegroundStyles(value, context, options) {
|
|
|
9956
10980
|
...inks
|
|
9957
10981
|
};
|
|
9958
10982
|
case "known": return {
|
|
9959
|
-
...
|
|
10983
|
+
...arrangementDecorations(foreground, context),
|
|
9960
10984
|
...resolved.buttonStyles,
|
|
9961
10985
|
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context))),
|
|
9962
10986
|
...inks
|
|
@@ -9981,6 +11005,7 @@ function resolveSectionSurfaceForeground(value, context, options) {
|
|
|
9981
11005
|
}
|
|
9982
11006
|
function cachedSectionSurface(value, context, options) {
|
|
9983
11007
|
const key = JSON.stringify([
|
|
11008
|
+
sectionDecisionFromContent(context.data),
|
|
9984
11009
|
value,
|
|
9985
11010
|
context.proseHoverCandidate,
|
|
9986
11011
|
options,
|
|
@@ -9994,35 +11019,39 @@ function cachedSectionSurface(value, context, options) {
|
|
|
9994
11019
|
}
|
|
9995
11020
|
/** Cache only the owner's result; no foreground or button rules live here. */
|
|
9996
11021
|
function resolveRuntimeSectionSurface(value, context, options) {
|
|
11022
|
+
const decision = sectionDecisionFromContent(context.data);
|
|
11023
|
+
const background = decision?.background ?? resolveSectionBackground(parseCanonicalRuntimeBackground({ _sectionStyles: { background: value } }), null, void 0, {
|
|
11024
|
+
paintsGround: options?.photoPaintsGround !== false,
|
|
11025
|
+
fallbackToken: options?.fallbackToken
|
|
11026
|
+
});
|
|
9997
11027
|
return resolveSurface({
|
|
9998
11028
|
kind: "section",
|
|
9999
|
-
background:
|
|
10000
|
-
paintsGround: options?.photoPaintsGround !== false,
|
|
10001
|
-
fallbackToken: options?.fallbackToken
|
|
10002
|
-
}), context.theme.palette)
|
|
11029
|
+
background: decision ? decision.foregroundBackground : sectionForegroundBackground(background, context.theme.palette)
|
|
10003
11030
|
}, {
|
|
10004
11031
|
palette: context.theme.palette,
|
|
10005
11032
|
buttonSystem: context.theme.buttons,
|
|
10006
11033
|
linkHoverToken: context.proseHoverCandidate,
|
|
10007
11034
|
compositeBase: options?.fallbackToken,
|
|
11035
|
+
...decision?.finishedPaint ? {
|
|
11036
|
+
foreground: decision.inks.kind === "known" ? decision.inks.roles : void 0,
|
|
11037
|
+
backdropSamples: decision.finishedPaint.samples
|
|
11038
|
+
} : {},
|
|
10008
11039
|
solvedInks: transformSolvedInks(context)
|
|
10009
11040
|
});
|
|
10010
11041
|
}
|
|
10011
|
-
|
|
11042
|
+
/** Line and mark are drawn by arrangements only; muted comes with the other foreground roles. */
|
|
11043
|
+
function arrangementDecorations(foreground, context) {
|
|
10012
11044
|
if (context.data?._lookSlots === void 0) return {};
|
|
10013
|
-
return
|
|
11045
|
+
return surfaceDecorationStyles(foreground, context.theme.palette);
|
|
10014
11046
|
}
|
|
10015
11047
|
/** Decoration roles already resolved by the surface owner, shared with footer arrangements. */
|
|
10016
|
-
function
|
|
11048
|
+
function surfaceDecorationStyles(foreground, palette) {
|
|
10017
11049
|
if (foreground.kind !== "known") return {};
|
|
10018
11050
|
const decorations = surfaceDecorationColors(foreground, palette);
|
|
10019
|
-
return {
|
|
10020
|
-
"--rb-surface-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
"--rb-surface-mark-color": decorations.mark
|
|
10024
|
-
} : {}
|
|
10025
|
-
};
|
|
11051
|
+
return decorations ? {
|
|
11052
|
+
"--rb-surface-line-color": decorations.line,
|
|
11053
|
+
"--rb-surface-mark-color": decorations.mark
|
|
11054
|
+
} : {};
|
|
10026
11055
|
}
|
|
10027
11056
|
//#endregion
|
|
10028
11057
|
//#region ../blocks/src/system/transforms/registry/layout.ts
|
|
@@ -10224,12 +11253,12 @@ function footerAreaPaintStyle(footer, area, context) {
|
|
|
10224
11253
|
const palette = context.theme.palette;
|
|
10225
11254
|
if (area === "main") {
|
|
10226
11255
|
const foreground = resolveFooterRootForeground(footer, palette, context.proseHoverCandidate);
|
|
10227
|
-
return mergeStyles(backgroundColorStyle(footerMainPaint(footer).ground), resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context),
|
|
11256
|
+
return mergeStyles(backgroundColorStyle(footerMainPaint(footer).ground), resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context), surfaceDecorationStyles(foreground, palette));
|
|
10228
11257
|
}
|
|
10229
11258
|
const paint = footerSideBandPaint(footer, area);
|
|
10230
11259
|
const foreground = resolveFooterSideBandForeground(footer, area, palette, context.proseHoverCandidate);
|
|
10231
11260
|
if (!paint || !foreground) return void 0;
|
|
10232
|
-
return mergeStyles({ [`--rb-footer-${area}-bg`]: rgbColorValue(paint.ground) }, resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context),
|
|
11261
|
+
return mergeStyles({ [`--rb-footer-${area}-bg`]: rgbColorValue(paint.ground) }, resolvedForegroundStyle(foreground), solvedInkStyle(foreground, context), surfaceDecorationStyles(foreground, palette));
|
|
10233
11262
|
}
|
|
10234
11263
|
const footerAreaValues = [
|
|
10235
11264
|
"band",
|
|
@@ -10242,6 +11271,18 @@ function readThemeFooter(viewModel) {
|
|
|
10242
11271
|
return asPartialObject(asPartialObject(asPartialObject(viewModel?.["$root"])?.theme)?.footer);
|
|
10243
11272
|
}
|
|
10244
11273
|
/** The footer root: the main ground, its inks and the top rule. */
|
|
11274
|
+
const footerEdgeStyleTransform = {
|
|
11275
|
+
id: "layout.footerEdgeStyle",
|
|
11276
|
+
kind: "formatter",
|
|
11277
|
+
summary: "Resolve footer boundary geometry through the shared edge builder",
|
|
11278
|
+
run: (value, _options, context) => {
|
|
11279
|
+
const footer = asPartialObject(value);
|
|
11280
|
+
if (!footer?.edge) return void 0;
|
|
11281
|
+
const root = asPartialObject(context.viewModel?.$root);
|
|
11282
|
+
const tuning = root?.theme?.siteStyleId ? siteStyleEdges(asSiteStyleId(root.theme.siteStyleId)).supported.find((support) => footer.edge && transitionCatalogueEntryForIntent(footer.edge).family === support.family)?.tuning : void 0;
|
|
11283
|
+
return boundaryGeometryStyle(footer.edge, "footer", "previous", tuning);
|
|
11284
|
+
}
|
|
11285
|
+
};
|
|
10245
11286
|
const footerRootStyleTransform = {
|
|
10246
11287
|
id: "layout.footerRootStyle",
|
|
10247
11288
|
kind: "formatter",
|
|
@@ -10278,6 +11319,7 @@ const layoutTransforms = [
|
|
|
10278
11319
|
headerRootStyleTransform,
|
|
10279
11320
|
headerSectionBackgroundTransform,
|
|
10280
11321
|
footerRootStyleTransform,
|
|
11322
|
+
footerEdgeStyleTransform,
|
|
10281
11323
|
{
|
|
10282
11324
|
id: "layout.footerAreaStyle",
|
|
10283
11325
|
kind: "formatter",
|
|
@@ -10458,7 +11500,8 @@ const backgroundTransforms = [
|
|
|
10458
11500
|
summary: "Resolve inline styles for background color/gradient layers",
|
|
10459
11501
|
run: (value, options, context) => {
|
|
10460
11502
|
const fallbackToken = options?.fallbackToken;
|
|
10461
|
-
|
|
11503
|
+
const finish = asPartialObject(options)?.sectionGround ? sectionDecisionFromContent(context.data)?.finishedPaint : void 0;
|
|
11504
|
+
return finish ? finishedGroundStyle(finish) : resolveBackgroundLayerStyle(value, fallbackToken, context);
|
|
10462
11505
|
}
|
|
10463
11506
|
},
|
|
10464
11507
|
{
|
|
@@ -11369,7 +12412,7 @@ function serviceDetailsFacts(service) {
|
|
|
11369
12412
|
value: location
|
|
11370
12413
|
}] : [],
|
|
11371
12414
|
{
|
|
11372
|
-
label: "
|
|
12415
|
+
label: "Cancellation policy",
|
|
11373
12416
|
value: describePublicRefundPolicy(service.cancellationPolicy.refunds)
|
|
11374
12417
|
},
|
|
11375
12418
|
...practitioners.length ? [{
|
|
@@ -15582,7 +16625,7 @@ function canonicalizeFieldValue(plan, value) {
|
|
|
15582
16625
|
switch (plan.kind) {
|
|
15583
16626
|
case "media": return canonicalizeMedia(value);
|
|
15584
16627
|
case "group":
|
|
15585
|
-
if (plan.valueContract === "location") return value;
|
|
16628
|
+
if (plan.valueContract === "location" || plan.valueContract === "sectionGround" || plan.valueContract === "sectionTreatment") return value;
|
|
15586
16629
|
return plan.childSelection.kind === "discriminatedTabs" ? canonicalizeDiscriminatedGroup(plan, value) : canonicalizeObjectForWrite(plan.childSelection.fields, value);
|
|
15587
16630
|
case "repeater": return canonicalizeRepeater(plan, value);
|
|
15588
16631
|
case "string":
|
|
@@ -16032,10 +17075,11 @@ function normalizeManifestContentForWrite(plans, content, options = {}) {
|
|
|
16032
17075
|
return canonicalizeObjectForWrite(plans, normalizeStoredContentValues(plans, content, options));
|
|
16033
17076
|
}
|
|
16034
17077
|
function normalizeStoredFieldValueWithContext(plan, value, ctx) {
|
|
16035
|
-
if (value === null && !plan.required) return;
|
|
17078
|
+
if (value === null && !plan.required && !(plan.kind === "group" && sectionChoiceSchema(plan))) return;
|
|
16036
17079
|
switch (plan.kind) {
|
|
16037
17080
|
case "group":
|
|
16038
17081
|
if (plan.valueContract === "location") return normalizeLocationContract(value, ctx.mode);
|
|
17082
|
+
if (sectionChoiceSchema(plan)) return value;
|
|
16039
17083
|
return normalizeStoredObjectChildren(selectedGroupChildPlans(plan, value), value, childValidationContext(plan, ctx));
|
|
16040
17084
|
case "repeater": return normalizeStoredRepeaterItems(plan, value, ctx);
|
|
16041
17085
|
case "string":
|
|
@@ -16074,6 +17118,7 @@ function normalizeFieldValue(plan, value, ctx) {
|
|
|
16074
17118
|
case "string": return acceptsOptionalBlankAsMissing(plan, value) ? void 0 : value;
|
|
16075
17119
|
case "group":
|
|
16076
17120
|
if (plan.valueContract === "location") return normalizeLocationContract(value, ctx.mode);
|
|
17121
|
+
if (sectionChoiceSchema(plan)) return value;
|
|
16077
17122
|
return normalizeObjectChildren(selectedGroupChildPlans(plan, value), value, childValidationContext(plan, ctx));
|
|
16078
17123
|
case "repeater": return normalizeRepeaterItems(plan, value, ctx);
|
|
16079
17124
|
case "link":
|
|
@@ -16324,6 +17369,8 @@ function validateFlattenedGroupContainers(groupIds, item, plan, index, ctx) {
|
|
|
16324
17369
|
}] : []);
|
|
16325
17370
|
}
|
|
16326
17371
|
function validateGroupPlan(plan, value, ctx) {
|
|
17372
|
+
const choiceSchema = sectionChoiceSchema(plan);
|
|
17373
|
+
if (choiceSchema) return choiceSchema.safeParse(value).success ? [] : [issue(plan, "wrongType", { expected: "a section choice" })];
|
|
16327
17374
|
if (plan.valueContract === "location") return validateLocationGroupContract(plan, value, ctx);
|
|
16328
17375
|
if (!isPlainObject$1(value)) return [issue(plan, "wrongType", { expected: "an object" })];
|
|
16329
17376
|
if (plan.childSelection.kind === "discriminatedTabs") {
|
|
@@ -16504,6 +17551,9 @@ function isCanonicalEmailValue(value) {
|
|
|
16504
17551
|
function isCanonicalPhoneValue(value) {
|
|
16505
17552
|
return TEL_RE.test(value);
|
|
16506
17553
|
}
|
|
17554
|
+
function sectionChoiceSchema(plan) {
|
|
17555
|
+
return plan.valueContract === "sectionGround" ? sectionStylesOverrideSchema.shape.ground : plan.valueContract === "sectionTreatment" ? sectionTreatmentSchema.nullable() : null;
|
|
17556
|
+
}
|
|
16507
17557
|
function isCanonicalUrlValue(value, options = {}) {
|
|
16508
17558
|
if (!value) return false;
|
|
16509
17559
|
if (options.allowRelative === true && value.startsWith("/")) return true;
|
|
@@ -17494,9 +18544,9 @@ function joinAcrossRun(byPair, previousBlockId, nextBlockId, run) {
|
|
|
17494
18544
|
const exiting = lastOmittedId ? byPair.get(pairKey(lastOmittedId, nextBlockId)) : void 0;
|
|
17495
18545
|
const donor = entering ?? exiting;
|
|
17496
18546
|
return donor ? {
|
|
18547
|
+
...donor,
|
|
17497
18548
|
previousBlockId,
|
|
17498
|
-
nextBlockId
|
|
17499
|
-
treatment: donor.treatment
|
|
18549
|
+
nextBlockId
|
|
17500
18550
|
} : void 0;
|
|
17501
18551
|
}
|
|
17502
18552
|
/**
|
|
@@ -17520,24 +18570,39 @@ function composePageJoins(input) {
|
|
|
17520
18570
|
return [{
|
|
17521
18571
|
previousBlockId: previous.id,
|
|
17522
18572
|
nextBlockId: next.id,
|
|
17523
|
-
join: join ? composeJoin(join, before.facts, after.facts) : null,
|
|
18573
|
+
join: join ? composeJoin(join, before.facts, after.facts, input.context) : null,
|
|
17524
18574
|
seam: sectionSeam(before, after)
|
|
17525
18575
|
}];
|
|
17526
18576
|
});
|
|
17527
18577
|
}
|
|
17528
|
-
function composeJoin(join, previous, next) {
|
|
17529
|
-
|
|
17530
|
-
|
|
18578
|
+
function composeJoin(join, previous, next, context) {
|
|
18579
|
+
const boundaryId = pairKey(join.previousBlockId, join.nextBlockId);
|
|
18580
|
+
const outcome = composeBoundary(previous, next, join.treatment);
|
|
18581
|
+
const family = transitionCatalogueEntryForIntent(join.treatment).family;
|
|
18582
|
+
const tuning = context?.siteStyleId ? siteStyleEdges(asSiteStyleId(context.siteStyleId)).supported.find((support) => support.family === family)?.tuning : void 0;
|
|
18583
|
+
const identity = {
|
|
18584
|
+
boundaryId,
|
|
17531
18585
|
previousBlockId: join.previousBlockId,
|
|
17532
18586
|
nextBlockId: join.nextBlockId,
|
|
17533
|
-
treatment: join.treatment
|
|
17534
|
-
|
|
18587
|
+
treatment: join.treatment
|
|
18588
|
+
};
|
|
18589
|
+
return outcome.kind === "shown" ? {
|
|
18590
|
+
...identity,
|
|
18591
|
+
outcome,
|
|
18592
|
+
layout: boundaryLayout(join.treatment, outcome.composition, {
|
|
18593
|
+
edge: join.edge,
|
|
18594
|
+
palette: context?.palette,
|
|
18595
|
+
tuning,
|
|
18596
|
+
seed: boundaryId
|
|
18597
|
+
})
|
|
18598
|
+
} : {
|
|
18599
|
+
...identity,
|
|
18600
|
+
outcome
|
|
17535
18601
|
};
|
|
17536
18602
|
}
|
|
17537
18603
|
/** Placement, reserves and paint for a join that draws; null otherwise. */
|
|
17538
18604
|
function renderedJoinLayout(join) {
|
|
17539
|
-
|
|
17540
|
-
return boundaryLayout(join.treatment, join.outcome.composition);
|
|
18605
|
+
return join?.layout ?? null;
|
|
17541
18606
|
}
|
|
17542
18607
|
/** Joins with a missing id on either side cannot sit between two blocks. */
|
|
17543
18608
|
function joinsByPair(joins) {
|
|
@@ -17551,6 +18616,62 @@ function pairKey(previousBlockId, nextBlockId) {
|
|
|
17551
18616
|
return makeBoundaryId(asDesignBlockId(previousBlockId), asDesignBlockId(nextBlockId));
|
|
17552
18617
|
}
|
|
17553
18618
|
//#endregion
|
|
18619
|
+
//#region ../blocks/src/sectionBoundaryTextures.tsx
|
|
18620
|
+
/** A textured join's entire paint stack moves together, preserving colour/alpha order. */
|
|
18621
|
+
function sectionOwnsBoundaryPaint(layout) {
|
|
18622
|
+
return Boolean(layout.underlay?.texture || layout.paint.front.texture || layout.paint.back.some((paint) => paint.texture));
|
|
18623
|
+
}
|
|
18624
|
+
function boundaryColourCss(colour) {
|
|
18625
|
+
return colour.startsWith("#") ? colour : `rgb(var(--tb-${colour}))`;
|
|
18626
|
+
}
|
|
18627
|
+
/** Planes share their owner's full height. Only their edge masks extend outside its box. */
|
|
18628
|
+
function sectionBoundaryPaint(input) {
|
|
18629
|
+
const planes = [edgePlanes(renderedJoinLayout(input.before?.join ?? null), "start"), edgePlanes(renderedJoinLayout(input.after?.join ?? null), "end")].flat();
|
|
18630
|
+
return planes.length ? planes : null;
|
|
18631
|
+
}
|
|
18632
|
+
function edgePlanes(layout, side) {
|
|
18633
|
+
if (!layout || !sectionOwnsBoundaryPaint(layout)) return [];
|
|
18634
|
+
const underlay = side === "end" && layout.underlay ? [paintPlane(layout, layout.underlay, side, "underlay", -1)] : [];
|
|
18635
|
+
return side === (layout.placement === "next" ? "end" : "start") ? [
|
|
18636
|
+
...underlay,
|
|
18637
|
+
...layout.paint.back.map((paint, index) => paintPlane(layout, paint, side, "back", index)).reverse(),
|
|
18638
|
+
paintPlane(layout, layout.paint.front, side, "front", -1)
|
|
18639
|
+
] : underlay;
|
|
18640
|
+
}
|
|
18641
|
+
function planeGeometry(layout, side, underlay, index) {
|
|
18642
|
+
const height = underlay ? "var(--boundary-height)" : "var(--boundary-shape-height)";
|
|
18643
|
+
const offset = index < 0 ? 0 : (index + 1) * .12;
|
|
18644
|
+
const overhang = `calc(${height} * ${underlay || layout.placement === "centred" ? .5 + offset : 1 + offset})`;
|
|
18645
|
+
return {
|
|
18646
|
+
"--section-edge-height": height,
|
|
18647
|
+
top: side === "start" ? `calc(-1 * ${overhang})` : 0,
|
|
18648
|
+
bottom: side === "end" ? `calc(-1 * ${overhang})` : 0,
|
|
18649
|
+
"--section-texture-y": side === "start" ? overhang : "0px",
|
|
18650
|
+
maskPosition: side === "start" ? "0 0" : "0 100%",
|
|
18651
|
+
WebkitMaskPosition: side === "start" ? "0 0" : "0 100%"
|
|
18652
|
+
};
|
|
18653
|
+
}
|
|
18654
|
+
function backMasks(index) {
|
|
18655
|
+
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})`]))) : {};
|
|
18656
|
+
}
|
|
18657
|
+
function paintPlane(layout, paint, side, role, index) {
|
|
18658
|
+
const style = {
|
|
18659
|
+
...layout.geometry,
|
|
18660
|
+
...backMasks(index),
|
|
18661
|
+
...planeGeometry(layout, side, role === "underlay", index),
|
|
18662
|
+
...paint.texture ? groundTextureStyle(paint.texture) : {},
|
|
18663
|
+
backgroundColor: boundaryColourCss(paint.colour),
|
|
18664
|
+
opacity: index < 0 ? 1 : (layout.paint.back.length - index) / (layout.paint.back.length + 1)
|
|
18665
|
+
};
|
|
18666
|
+
return /* @__PURE__ */ jsx("span", {
|
|
18667
|
+
"aria-hidden": "true",
|
|
18668
|
+
"data-section-edge-paint": role,
|
|
18669
|
+
"data-section-edge-side": side,
|
|
18670
|
+
"data-section-edge-fade": role !== "underlay" && layout.geometry["--boundary-shape-background"]?.startsWith("linear-gradient") ? "" : void 0,
|
|
18671
|
+
style
|
|
18672
|
+
}, `${side}:${role}:${index}`);
|
|
18673
|
+
}
|
|
18674
|
+
//#endregion
|
|
17554
18675
|
//#region ../blocks/src/pageRendererBoundaries.tsx
|
|
17555
18676
|
function joinSlotsByPair(slots) {
|
|
17556
18677
|
return new Map(slots.map((slot) => [joinSlotKey(slot.previousBlockId, slot.nextBlockId), slot]));
|
|
@@ -17567,16 +18688,7 @@ function renderJoinSlot(input) {
|
|
|
17567
18688
|
const { slot } = input;
|
|
17568
18689
|
if (!slot) return null;
|
|
17569
18690
|
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;
|
|
18691
|
+
const painted = slot.join && layout ? paintedBoundary(slot, slot.join, layout, input.blockKey) : null;
|
|
17580
18692
|
const extra = input.renderJoin?.({
|
|
17581
18693
|
previousBlockId: slot.previousBlockId,
|
|
17582
18694
|
nextBlockId: slot.nextBlockId,
|
|
@@ -17585,18 +18697,65 @@ function renderJoinSlot(input) {
|
|
|
17585
18697
|
if (!painted && (extra === null || extra === void 0)) return null;
|
|
17586
18698
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [painted, extra] }, `${input.blockKey}:join`);
|
|
17587
18699
|
}
|
|
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) {
|
|
18700
|
+
function boundaryPaintStyle(layout) {
|
|
17595
18701
|
return {
|
|
17596
|
-
|
|
17597
|
-
|
|
18702
|
+
...layout.geometry,
|
|
18703
|
+
"--boundary-shape-paint": boundaryColourCss(layout.paint.front.colour),
|
|
18704
|
+
...layout.underlay ? { "--boundary-band-paint": boundaryColourCss(layout.underlay.colour) } : {}
|
|
17598
18705
|
};
|
|
17599
18706
|
}
|
|
18707
|
+
function paintedBoundary(slot, join, layout, key) {
|
|
18708
|
+
return /* @__PURE__ */ jsx("div", {
|
|
18709
|
+
"aria-hidden": "true",
|
|
18710
|
+
"data-block-boundary": "",
|
|
18711
|
+
"data-boundary-geometry": "",
|
|
18712
|
+
"data-boundary-section-owned": sectionOwnsBoundaryPaint(layout) ? "" : void 0,
|
|
18713
|
+
"data-boundary-id": join.boundaryId,
|
|
18714
|
+
"data-boundary-previous-block-id": slot.previousBlockId,
|
|
18715
|
+
"data-boundary-next-block-id": slot.nextBlockId,
|
|
18716
|
+
"data-boundary-treatment": join.treatment,
|
|
18717
|
+
"data-boundary-placement": layout.placement,
|
|
18718
|
+
style: boundaryPaintStyle(layout),
|
|
18719
|
+
children: sectionOwnsBoundaryPaint(layout) ? null : layout.paint.back.map((paint, index) => renderBackLayer(paint, index, layout))
|
|
18720
|
+
}, `${key}:boundary`);
|
|
18721
|
+
}
|
|
18722
|
+
function renderBackLayer(paint, index, layout) {
|
|
18723
|
+
const offset = 12 * (index + 1);
|
|
18724
|
+
const mirror = index % 2 === 0 ? "-1" : "1";
|
|
18725
|
+
const opacity = (layout.paint.back.length - index) / (layout.paint.back.length + 1);
|
|
18726
|
+
return /* @__PURE__ */ jsx("span", {
|
|
18727
|
+
"data-boundary-back": "",
|
|
18728
|
+
style: {
|
|
18729
|
+
...{
|
|
18730
|
+
previous: {
|
|
18731
|
+
paint: {
|
|
18732
|
+
bottom: 0,
|
|
18733
|
+
transform: `translateY(-${offset}%) scaleX(${mirror})`
|
|
18734
|
+
},
|
|
18735
|
+
texture: { bottom: `calc(var(--boundary-height) * ${offset / 100})` }
|
|
18736
|
+
},
|
|
18737
|
+
next: {
|
|
18738
|
+
paint: {
|
|
18739
|
+
top: 0,
|
|
18740
|
+
transform: `translateY(${offset}%) scaleY(-1) scaleX(${mirror})`
|
|
18741
|
+
},
|
|
18742
|
+
texture: { top: `calc(var(--boundary-height) * ${offset / 100})` }
|
|
18743
|
+
},
|
|
18744
|
+
centred: {
|
|
18745
|
+
paint: {
|
|
18746
|
+
top: 0,
|
|
18747
|
+
transform: `translateY(-${50 + offset}%) scaleX(${mirror})`
|
|
18748
|
+
},
|
|
18749
|
+
texture: { top: `calc(var(--boundary-shape-height) / -2 - var(--boundary-height) * ${offset / 100})` }
|
|
18750
|
+
}
|
|
18751
|
+
}[layout.placement].paint,
|
|
18752
|
+
opacity,
|
|
18753
|
+
"--boundary-shape-paint": boundaryColourCss(paint.colour),
|
|
18754
|
+
"--boundary-shape-background": layout.geometry["--boundary-shape-background"],
|
|
18755
|
+
"--boundary-shape-background-mixed": layout.geometry["--boundary-shape-background-mixed"]
|
|
18756
|
+
}
|
|
18757
|
+
}, index);
|
|
18758
|
+
}
|
|
17600
18759
|
/**
|
|
17601
18760
|
* Reserve attributes and variables for a block wrapper, from the joins on
|
|
17602
18761
|
* either side. A join's `before` reserve sits inside its previous section, so
|
|
@@ -17606,16 +18765,19 @@ function boundaryPaintStyle(paint) {
|
|
|
17606
18765
|
function blockBoundaryReserves(input) {
|
|
17607
18766
|
const top = reserveOnSide(input.before, "after");
|
|
17608
18767
|
const bottom = reserveOnSide(input.after, "before");
|
|
18768
|
+
const edgePaint = sectionBoundaryPaint(input);
|
|
17609
18769
|
const style = {
|
|
18770
|
+
...edgePaint ? { position: "relative" } : {},
|
|
17610
18771
|
...top ? { "--site-style-boundary-before-reserve": top.length } : {},
|
|
17611
18772
|
...bottom ? { "--site-style-boundary-after-reserve": bottom.length } : {}
|
|
17612
18773
|
};
|
|
17613
18774
|
return {
|
|
18775
|
+
edgePaint,
|
|
17614
18776
|
topPlacement: top?.placement,
|
|
17615
18777
|
bottomPlacement: bottom?.placement,
|
|
17616
18778
|
seamBefore: seamAttribute(input.before),
|
|
17617
18779
|
seamAfter: seamAttribute(input.after),
|
|
17618
|
-
style:
|
|
18780
|
+
style: Object.keys(style).length ? style : void 0
|
|
17619
18781
|
};
|
|
17620
18782
|
}
|
|
17621
18783
|
function seamAttribute(slot) {
|
|
@@ -18198,18 +19360,11 @@ function heroSplitImagePane() {
|
|
|
18198
19360
|
return stack({
|
|
18199
19361
|
gap: "none",
|
|
18200
19362
|
...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: {
|
|
19363
|
+
className: "rb-relative rb-overflow-hidden rb-rounded-3xl",
|
|
19364
|
+
style: { $bind: {
|
|
18210
19365
|
from: "content",
|
|
18211
|
-
transforms: [{ id: "look.
|
|
18212
|
-
} }
|
|
19366
|
+
transforms: [{ id: "look.splitPhotoStyle" }]
|
|
19367
|
+
} }
|
|
18213
19368
|
}, [media({
|
|
18214
19369
|
className: "rb-absolute rb-inset-0 rb-h-full rb-w-full rb-object-cover",
|
|
18215
19370
|
...heroPriorityMediaProps,
|
|
@@ -18736,17 +19891,23 @@ const classPricesEditing = {
|
|
|
18736
19891
|
const priceItem = styledCard([
|
|
18737
19892
|
text({
|
|
18738
19893
|
as: "p",
|
|
19894
|
+
className: "class-prices-figure",
|
|
18739
19895
|
...lookSlot("item-meta")
|
|
18740
19896
|
}, bind("price.figure")),
|
|
18741
19897
|
text({
|
|
18742
19898
|
as: "h3",
|
|
19899
|
+
className: "class-prices-name",
|
|
18743
19900
|
...lookSlot("item-title")
|
|
18744
19901
|
}, bind("price.label")),
|
|
18745
19902
|
text({
|
|
18746
19903
|
as: "p",
|
|
19904
|
+
className: "class-prices-text",
|
|
18747
19905
|
...lookSlot("item-text")
|
|
18748
19906
|
}, bind("price.text"), when("price.text")),
|
|
18749
|
-
el("div",
|
|
19907
|
+
el("div", {
|
|
19908
|
+
className: "class-prices-action",
|
|
19909
|
+
...lookSlot("item-actions")
|
|
19910
|
+
}, [link({
|
|
18750
19911
|
className: "rb-item-text-link",
|
|
18751
19912
|
linkRequired: true,
|
|
18752
19913
|
href: { $bind: {
|
|
@@ -18757,12 +19918,14 @@ const priceItem = styledCard([
|
|
|
18757
19918
|
], {
|
|
18758
19919
|
stylesFrom: "content._cardStyles",
|
|
18759
19920
|
backgroundFrom: "content._cardStyles.background",
|
|
19921
|
+
baseClassName: "class-prices-item rb-relative rb-isolate rb-overflow-visible rb-border",
|
|
18760
19922
|
dataProps: {
|
|
18761
19923
|
...lookSlot("item"),
|
|
18762
19924
|
"data-card-list-item": true
|
|
18763
19925
|
}
|
|
18764
19926
|
});
|
|
18765
19927
|
const items = el("div", {
|
|
19928
|
+
className: "class-prices-list",
|
|
18766
19929
|
...lookSlot("items"),
|
|
18767
19930
|
"data-meta-position": "end",
|
|
18768
19931
|
"data-card-list": true
|
|
@@ -19183,21 +20346,18 @@ function introCopyStack(options = {}) {
|
|
|
19183
20346
|
}
|
|
19184
20347
|
const introMedia = media({
|
|
19185
20348
|
...lookSlot("photo"),
|
|
19186
|
-
className:
|
|
20349
|
+
className: "rb-intro-media rb-w-full rb-h-auto rb-object-cover",
|
|
20350
|
+
"data-photo-shape": { $bind: {
|
|
19187
20351
|
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"
|
|
20352
|
+
fallback: "default"
|
|
19193
20353
|
} },
|
|
19194
|
-
style: {
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
}
|
|
19200
|
-
}
|
|
20354
|
+
style: { $bind: {
|
|
20355
|
+
from: "content",
|
|
20356
|
+
transforms: [{
|
|
20357
|
+
id: "ui.photoFrameStyle",
|
|
20358
|
+
options: { fallbackRatio: "1/1" }
|
|
20359
|
+
}]
|
|
20360
|
+
} }
|
|
19201
20361
|
}, bind("content.media"), when("content.media"));
|
|
19202
20362
|
const centeredCopyLayout = styledSection({
|
|
19203
20363
|
children: styledContainer({
|
|
@@ -21042,6 +22202,11 @@ const footerEdge = el("div", {
|
|
|
21042
22202
|
"aria-hidden": "true",
|
|
21043
22203
|
"data-block-boundary": "",
|
|
21044
22204
|
"data-footer-edge": "",
|
|
22205
|
+
"data-boundary-geometry": "",
|
|
22206
|
+
style: { $bind: {
|
|
22207
|
+
from: "$root.theme.footer",
|
|
22208
|
+
transforms: [{ id: "layout.footerEdgeStyle" }]
|
|
22209
|
+
} },
|
|
21045
22210
|
"data-boundary-treatment": { $bind: { from: "$root.theme.footer.edge" } },
|
|
21046
22211
|
"data-boundary-placement": "previous"
|
|
21047
22212
|
}, null, when("$root.theme.footer.edge"));
|
|
@@ -23035,18 +24200,15 @@ const mediaTextBlockDefinition = { manifest: createBlockManifest({
|
|
|
23035
24200
|
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
24201
|
const defaultImageCommonProps = {
|
|
23037
24202
|
...lookSlot("photo"),
|
|
23038
|
-
className:
|
|
24203
|
+
className: "rb-w-full rb-h-auto rb-object-cover",
|
|
24204
|
+
"data-photo-shape": { $bind: {
|
|
23039
24205
|
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"
|
|
24206
|
+
fallback: "default"
|
|
23045
24207
|
} },
|
|
23046
|
-
style: {
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
}
|
|
24208
|
+
style: { $bind: {
|
|
24209
|
+
from: "content",
|
|
24210
|
+
transforms: [{ id: "ui.photoFrameStyle" }]
|
|
24211
|
+
} }
|
|
23050
24212
|
};
|
|
23051
24213
|
const defaultSingleImage = media(defaultImageCommonProps, bind("content.images[0].image"), when("content.images[0].image"));
|
|
23052
24214
|
const defaultCarouselImages = carousel({
|
|
@@ -23484,7 +24646,16 @@ const appointmentServicesBlockDefinition = {
|
|
|
23484
24646
|
required: false,
|
|
23485
24647
|
multiple: false,
|
|
23486
24648
|
optionSource: "appointmentServiceCategories",
|
|
23487
|
-
ui: {
|
|
24649
|
+
ui: {
|
|
24650
|
+
intent: "content",
|
|
24651
|
+
visibleWhen: { anyOf: [{
|
|
24652
|
+
fact: "appointments.serviceCategories",
|
|
24653
|
+
is: "some"
|
|
24654
|
+
}, {
|
|
24655
|
+
field: "categoryId",
|
|
24656
|
+
hasValue: true
|
|
24657
|
+
}] }
|
|
24658
|
+
}
|
|
23488
24659
|
}),
|
|
23489
24660
|
sectionStylesField({
|
|
23490
24661
|
id: "_sectionStyles",
|
|
@@ -23567,7 +24738,16 @@ const weeklySlotAvailabilityManifest = createBlockManifest({
|
|
|
23567
24738
|
required: false,
|
|
23568
24739
|
referenceKind: "appointmentResource",
|
|
23569
24740
|
allowManualEntry: false,
|
|
23570
|
-
ui: {
|
|
24741
|
+
ui: {
|
|
24742
|
+
intent: "behavior",
|
|
24743
|
+
visibleWhen: { anyOf: [{
|
|
24744
|
+
fact: "appointments.resources",
|
|
24745
|
+
is: "several"
|
|
24746
|
+
}, {
|
|
24747
|
+
field: "resourceId",
|
|
24748
|
+
hasValue: true
|
|
24749
|
+
}] }
|
|
24750
|
+
}
|
|
23571
24751
|
},
|
|
23572
24752
|
{
|
|
23573
24753
|
id: "horizonWeeks",
|
|
@@ -24131,6 +25311,10 @@ const eventDetailsBlockDefinition = {
|
|
|
24131
25311
|
fallback: null
|
|
24132
25312
|
} },
|
|
24133
25313
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
25314
|
+
eventOverview: { $bind: {
|
|
25315
|
+
from: "data.eventDetailsData.eventOverview",
|
|
25316
|
+
fallback: false
|
|
25317
|
+
} },
|
|
24134
25318
|
venueDrawing: { $bind: {
|
|
24135
25319
|
from: "data.eventDetailsData.venueDrawing",
|
|
24136
25320
|
fallback: null
|
|
@@ -24171,6 +25355,8 @@ const eventDetailsBlockDefinition = {
|
|
|
24171
25355
|
dataSchemas: {
|
|
24172
25356
|
eventDetailsData: z.object({
|
|
24173
25357
|
events: publicEventsArraySchema,
|
|
25358
|
+
/** The page is about the whole event, not the date the page's booking column holds. */
|
|
25359
|
+
eventOverview: z.boolean().optional(),
|
|
24174
25360
|
venueDrawing: eventVenueDrawingSchema.optional().catch(void 0),
|
|
24175
25361
|
sitePasses: publicPassProductCollectionSchema,
|
|
24176
25362
|
siteMemberships: publicMembershipProductCollectionSchema,
|
|
@@ -29492,14 +30678,14 @@ function planPageRender(input, previous = null) {
|
|
|
29492
30678
|
return [entry, {
|
|
29493
30679
|
position,
|
|
29494
30680
|
placement,
|
|
29495
|
-
entry: cached?.position === position && cached.placement === placement ? cached.entry : applyArrangementRhythm(entry, position, placement)
|
|
30681
|
+
entry: cached?.position === position && cached.placement === placement ? cached.entry : applyArrangementRhythm(entry, position, placement, input.palette)
|
|
29496
30682
|
}];
|
|
29497
30683
|
});
|
|
29498
30684
|
return {
|
|
29499
30685
|
region,
|
|
29500
30686
|
planned,
|
|
29501
30687
|
rhythmic,
|
|
29502
|
-
entries: rhythmic
|
|
30688
|
+
entries: deepenArrangementRhythm(rhythmic, placement, input.palette).filter(shown)
|
|
29503
30689
|
};
|
|
29504
30690
|
});
|
|
29505
30691
|
const regions = {
|
|
@@ -29526,7 +30712,7 @@ function planPageRender(input, previous = null) {
|
|
|
29526
30712
|
};
|
|
29527
30713
|
}
|
|
29528
30714
|
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;
|
|
30715
|
+
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
30716
|
}
|
|
29531
30717
|
/**
|
|
29532
30718
|
* Mirrors the order of the checks `MemoBlockSection` used to make inline, so no
|
|
@@ -29678,11 +30864,8 @@ function restoreCompiledLook(look) {
|
|
|
29678
30864
|
};
|
|
29679
30865
|
}
|
|
29680
30866
|
function restoreArrangementRuntime(runtime) {
|
|
29681
|
-
const transported = runtime;
|
|
29682
|
-
const fieldGrounds = Array.isArray(transported.fieldGrounds) ? transported.fieldGrounds.filter((token) => typeof token === "string") : [];
|
|
29683
30867
|
return {
|
|
29684
30868
|
...runtime,
|
|
29685
|
-
fieldGrounds,
|
|
29686
30869
|
available: runtime.available.map(restoreCompiledLook),
|
|
29687
30870
|
byMode: Object.fromEntries(Object.entries(runtime.byMode).map(([mode, look]) => [mode, restoreCompiledLook(look)]))
|
|
29688
30871
|
};
|
|
@@ -29693,7 +30876,27 @@ function effectiveLookFromContent(content) {
|
|
|
29693
30876
|
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
29694
30877
|
}
|
|
29695
30878
|
function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
29696
|
-
|
|
30879
|
+
const content = withoutSectionDecision(planArrangementBlockContent(blockKind, manifest, authored, audience).renderableContent);
|
|
30880
|
+
const runtime = arrangementRuntime(content);
|
|
30881
|
+
const look = effectiveLookFromContent(content);
|
|
30882
|
+
if (!runtime || !look) return content;
|
|
30883
|
+
const section = resolveRuntimeSection({
|
|
30884
|
+
content,
|
|
30885
|
+
runtime,
|
|
30886
|
+
look,
|
|
30887
|
+
blockKind,
|
|
30888
|
+
arrangementKey: look.look.structure.byMode[readStoredMode({
|
|
30889
|
+
...arrangementManifestFromVariants(manifest),
|
|
30890
|
+
variantMeaning: manifest.variantMeaning
|
|
30891
|
+
}, content) ?? "default"],
|
|
30892
|
+
position: 0,
|
|
30893
|
+
placement: "page-wide",
|
|
30894
|
+
palette: runtime.surfaceContext.palette
|
|
30895
|
+
});
|
|
30896
|
+
return {
|
|
30897
|
+
...content,
|
|
30898
|
+
_sectionDecision: section
|
|
30899
|
+
};
|
|
29697
30900
|
}
|
|
29698
30901
|
function planArrangementBlockContent(blockKind, manifest, authored, audience) {
|
|
29699
30902
|
const runtime = arrangementRuntime(authored);
|
|
@@ -29861,47 +31064,73 @@ function arrangementContentHooks(effective, mode, length, facts, values, photoCo
|
|
|
29861
31064
|
...Object.fromEntries(Object.entries(values).map(([key, value]) => [`data-knob-${key === "titleSize" ? "headline" : key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}`, value]))
|
|
29862
31065
|
};
|
|
29863
31066
|
}
|
|
29864
|
-
|
|
31067
|
+
/** Read participation from the section owner; the planner supplies composition, never grounds. */
|
|
31068
|
+
function deepenArrangementRhythm(rhythmic, placement, palette) {
|
|
31069
|
+
const driven = rhythmic.filter(([, value]) => value.entry.sectionDecision?.source === "rhythm").map(([entry]) => entry);
|
|
31070
|
+
return rhythmic.map(([original, value]) => {
|
|
31071
|
+
if (arrangementRuntime(original.renderableContent)?.progression !== "deepen") return value.entry;
|
|
31072
|
+
const position = driven.indexOf(original);
|
|
31073
|
+
return position < 0 ? value.entry : applyArrangementRhythm(original, value.position, placement, palette, {
|
|
31074
|
+
position,
|
|
31075
|
+
count: driven.length
|
|
31076
|
+
});
|
|
31077
|
+
});
|
|
31078
|
+
}
|
|
31079
|
+
function applyArrangementRhythm(entry, position, placement, palette = {}, rhythmSpan) {
|
|
29865
31080
|
const runtime = arrangementRuntime(entry.renderableContent);
|
|
29866
31081
|
const look = effectiveLookFromContent(entry.renderableContent);
|
|
29867
|
-
|
|
29868
|
-
const content = entry.renderableContent;
|
|
31082
|
+
const content = withoutSectionDecision(entry.renderableContent);
|
|
29869
31083
|
const section = resolveRuntimeSection({
|
|
29870
31084
|
content,
|
|
29871
31085
|
runtime,
|
|
29872
31086
|
look,
|
|
29873
31087
|
position,
|
|
29874
31088
|
placement,
|
|
31089
|
+
rhythmSpan,
|
|
29875
31090
|
blockKind: entry.block.kind,
|
|
29876
31091
|
arrangementKey: entry.kind === "renderable" ? entry.effectiveArrangementKey ?? void 0 : void 0,
|
|
29877
|
-
palette: runtime
|
|
31092
|
+
palette: runtime?.surfaceContext.palette ?? palette
|
|
29878
31093
|
});
|
|
29879
31094
|
const resolved = section.background;
|
|
29880
31095
|
const updated = applyResolvedArrangementBackground(content, resolved);
|
|
29881
|
-
|
|
31096
|
+
if (!runtime || !look) return {
|
|
31097
|
+
...entry,
|
|
31098
|
+
renderableContent: content,
|
|
31099
|
+
sectionDecision: {
|
|
31100
|
+
...section,
|
|
31101
|
+
lookId: null
|
|
31102
|
+
}
|
|
31103
|
+
};
|
|
31104
|
+
const surface = section.surfaceToken;
|
|
29882
31105
|
const grounded = resolveArrangementSurfaces(entry, look, runtime, section, updated);
|
|
29883
|
-
const shape = sectionShapeHook(
|
|
31106
|
+
const shape = sectionShapeHook(section.shape);
|
|
29884
31107
|
const combined = resolveCombinedLook(entry, grounded, runtime, section, updated);
|
|
29885
31108
|
return {
|
|
29886
31109
|
...entry,
|
|
29887
31110
|
sectionDecision: {
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
paint: section.paint
|
|
31111
|
+
...section,
|
|
31112
|
+
lookId: look.look.id
|
|
29891
31113
|
},
|
|
29892
|
-
styleBackground: section.styleBackground,
|
|
29893
31114
|
renderableContent: {
|
|
29894
31115
|
...updated,
|
|
31116
|
+
_sectionDecision: section,
|
|
29895
31117
|
...combined ? { _combinedLook: combined } : {},
|
|
29896
31118
|
_effectiveLook: grounded,
|
|
29897
31119
|
_lookHooks: {
|
|
29898
31120
|
...isObjectRecord(updated._lookHooks) ? updated._lookHooks : {},
|
|
29899
31121
|
"data-surface": surface,
|
|
29900
|
-
...shape
|
|
31122
|
+
...shape,
|
|
31123
|
+
...groundFinishHooks(section.finishedPaint)
|
|
29901
31124
|
}
|
|
29902
31125
|
}
|
|
29903
31126
|
};
|
|
29904
31127
|
}
|
|
31128
|
+
/** Only the planner mints `_sectionDecision`; one arriving with content (an import, an SDK payload, an earlier plan) is dropped. */
|
|
31129
|
+
function withoutSectionDecision(content) {
|
|
31130
|
+
if (!("_sectionDecision" in content)) return content;
|
|
31131
|
+
const { _sectionDecision: _stale, ...rest } = content;
|
|
31132
|
+
return rest;
|
|
31133
|
+
}
|
|
29905
31134
|
function applyResolvedArrangementBackground(content, resolved) {
|
|
29906
31135
|
const section = isObjectRecord(content._sectionStyles) ? content._sectionStyles : {};
|
|
29907
31136
|
const photo = isObjectRecord(section.background) ? section.background.image : void 0;
|
|
@@ -29961,11 +31190,13 @@ function resolveArrangementSurfaces(entry, look, runtime, section, content) {
|
|
|
29961
31190
|
surfaces: runtime.surfaces,
|
|
29962
31191
|
context: runtime.surfaceContext
|
|
29963
31192
|
};
|
|
31193
|
+
const parents = plannedSlotParents(entry, look);
|
|
31194
|
+
const base = section.certifiedBackdrop;
|
|
29964
31195
|
const surfacePresentation = resolveLookSurfacePresentation({
|
|
29965
31196
|
look,
|
|
29966
|
-
parents
|
|
31197
|
+
parents,
|
|
29967
31198
|
ground,
|
|
29968
|
-
base
|
|
31199
|
+
base,
|
|
29969
31200
|
style,
|
|
29970
31201
|
content
|
|
29971
31202
|
});
|
|
@@ -29988,7 +31219,7 @@ function resolveCombinedLook(entry, list, runtime, section, content) {
|
|
|
29988
31219
|
look: month,
|
|
29989
31220
|
parents: arrangementSlotParentsForManifest(entry.kind === "renderable" ? entry.definition.manifest : void 0, month.look.target, arrangement),
|
|
29990
31221
|
ground,
|
|
29991
|
-
base:
|
|
31222
|
+
base: section.certifiedBackdrop,
|
|
29992
31223
|
content,
|
|
29993
31224
|
style: {
|
|
29994
31225
|
roleMap: month.roleMap,
|
|
@@ -30181,10 +31412,17 @@ const formSchema = z.union([z.null(), z.object({
|
|
|
30181
31412
|
const productsSchema = z.object({ products: z.array(z.object({ slug: z.string() })) });
|
|
30182
31413
|
const passesSchema = z.object({ passes: countSchema }).transform(({ passes }) => passes);
|
|
30183
31414
|
const membershipsSchema = z.object({ memberships: countSchema }).transform(({ memberships }) => memberships);
|
|
31415
|
+
const giftingSchema = z.object({
|
|
31416
|
+
giftCards: countSchema,
|
|
31417
|
+
vouchers: countSchema
|
|
31418
|
+
});
|
|
30184
31419
|
/** Both producers pass raw facts through the same stage admission. */
|
|
30185
31420
|
function readinessFactsFromLoaders(stage, input) {
|
|
30186
31421
|
const facts = {
|
|
30187
31422
|
catalogue: loaderFactProducers.catalogue(input),
|
|
31423
|
+
gifting: loaderFactProducers.gifting(input),
|
|
31424
|
+
eventFilters: loaderFactProducers.eventFilters(input),
|
|
31425
|
+
appointments: loaderFactProducers.appointments(input),
|
|
30188
31426
|
mailingList: loaderFactProducers.mailingList(input),
|
|
30189
31427
|
testimonials: loaderFactProducers.testimonials(input),
|
|
30190
31428
|
events: loaderFactProducers.events(input),
|
|
@@ -30207,6 +31445,9 @@ const loaderFactProducers = {
|
|
|
30207
31445
|
memberships: memberships.value
|
|
30208
31446
|
}) : unavailableReadinessFact;
|
|
30209
31447
|
},
|
|
31448
|
+
gifting: (input) => firstLoaderFact(input, "gifting", "offers", giftingSchema),
|
|
31449
|
+
eventFilters: () => unavailableReadinessFact,
|
|
31450
|
+
appointments: () => unavailableReadinessFact,
|
|
30210
31451
|
mailingList: (input) => input.mailingList === void 0 ? unavailableReadinessFact : loadedReadinessFact(input.mailingList),
|
|
30211
31452
|
testimonials: (input) => mapReadinessFact(firstLoaderFact(input, "testimonials", "entries", countSchema), (count) => ({
|
|
30212
31453
|
count,
|
|
@@ -30521,6 +31762,10 @@ function composeSurvivorJoins(plan, survivors, themeResources) {
|
|
|
30521
31762
|
originalBlocks: plan.regions.main.map((planned) => planned.block),
|
|
30522
31763
|
survivingBlocks: new Set(survivors.map((survivor) => survivor.entry.block))
|
|
30523
31764
|
}),
|
|
31765
|
+
context: themeResources.kind === "available" ? {
|
|
31766
|
+
siteStyleId: themeResources.config?.siteStyleId,
|
|
31767
|
+
palette: themeResources.tokens.palette
|
|
31768
|
+
} : void 0,
|
|
30524
31769
|
survivors: survivors.map(({ entry }) => ({
|
|
30525
31770
|
id: entry.block.id,
|
|
30526
31771
|
kind: entry.block.kind,
|
|
@@ -31026,7 +32271,7 @@ function renderPlanEntry(input) {
|
|
|
31026
32271
|
before: joinBefore,
|
|
31027
32272
|
after: joinAfter
|
|
31028
32273
|
});
|
|
31029
|
-
const blockElement = /* @__PURE__ */
|
|
32274
|
+
const blockElement = /* @__PURE__ */ jsxs("div", {
|
|
31030
32275
|
id: blockAnchorId(block),
|
|
31031
32276
|
className: wrapperClassName,
|
|
31032
32277
|
...arrangementHooksFromContent(renderableContent),
|
|
@@ -31046,7 +32291,7 @@ function renderPlanEntry(input) {
|
|
|
31046
32291
|
"data-site-style-seam-after": reserves.seamAfter,
|
|
31047
32292
|
"data-style-group": styleGroup,
|
|
31048
32293
|
style: reserves.style,
|
|
31049
|
-
children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
|
|
32294
|
+
children: [/* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }), reserves.edgePaint]
|
|
31050
32295
|
}, blockKey);
|
|
31051
32296
|
if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
|
|
31052
32297
|
return blockElement;
|
|
@@ -32442,6 +33687,7 @@ function blockDesignInputsForDefinition(blockKind, definition, content) {
|
|
|
32442
33687
|
const resolveRuntimeJoinFacts = (blocks, palette, siteStyleId) => {
|
|
32443
33688
|
const plan = buildPageRenderPlan({
|
|
32444
33689
|
page: { blocks: blocks.map(joinPresentationBlock) },
|
|
33690
|
+
palette,
|
|
32445
33691
|
siteStyleId,
|
|
32446
33692
|
audience: "public",
|
|
32447
33693
|
runtimeJoins: void 0,
|
|
@@ -32458,20 +33704,13 @@ const resolveRuntimeJoinFacts = (blocks, palette, siteStyleId) => {
|
|
|
32458
33704
|
ground: "light",
|
|
32459
33705
|
paint: "other"
|
|
32460
33706
|
}];
|
|
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
|
-
});
|
|
33707
|
+
const section = entry.sectionDecision;
|
|
33708
|
+
if (!section) throw new Error("Render planner did not decide the section");
|
|
32471
33709
|
return [block.blockId, {
|
|
32472
33710
|
lookId: entry.sectionDecision?.lookId ?? block.lookId,
|
|
32473
33711
|
ground: section.ground,
|
|
32474
|
-
|
|
33712
|
+
groundName: section.groundName ?? section.surfaceToken,
|
|
33713
|
+
paint: section.paintKind
|
|
32475
33714
|
}];
|
|
32476
33715
|
}));
|
|
32477
33716
|
};
|
|
@@ -34640,7 +35879,8 @@ function bookingPageFacts(selection) {
|
|
|
34640
35879
|
event: selectionRepresentativeEvent(selection),
|
|
34641
35880
|
identity: bookingPageIdentity(selection),
|
|
34642
35881
|
details: bookingDetailEvents(selection),
|
|
34643
|
-
registration: registrationDataForEventSelection(selection)
|
|
35882
|
+
registration: registrationDataForEventSelection(selection),
|
|
35883
|
+
eventOverview: selection.kind === "occurrence" && Boolean(selection.cancelledEventDates?.length)
|
|
34644
35884
|
};
|
|
34645
35885
|
}
|
|
34646
35886
|
function outlineFromFacts({ event, identity, details }, design, sections) {
|
|
@@ -34657,7 +35897,7 @@ function outlineFromFacts({ event, identity, details }, design, sections) {
|
|
|
34657
35897
|
showCapacity: true,
|
|
34658
35898
|
showVenue: true
|
|
34659
35899
|
}
|
|
34660
|
-
}, {
|
|
35900
|
+
}, ...publicEventCancellation(event) ? [] : [{
|
|
34661
35901
|
id: BOOKING_PAGE_BLOCK_IDS.refundPolicy,
|
|
34662
35902
|
kind: "block.body-text",
|
|
34663
35903
|
purpose: "refund-policy",
|
|
@@ -34668,7 +35908,7 @@ function outlineFromFacts({ event, identity, details }, design, sections) {
|
|
|
34668
35908
|
attrs: { level: 2 },
|
|
34669
35909
|
content: [{
|
|
34670
35910
|
type: "text",
|
|
34671
|
-
text: "
|
|
35911
|
+
text: "Cancellation policy"
|
|
34672
35912
|
}]
|
|
34673
35913
|
}, {
|
|
34674
35914
|
type: "paragraph",
|
|
@@ -34678,7 +35918,7 @@ function outlineFromFacts({ event, identity, details }, design, sections) {
|
|
|
34678
35918
|
}]
|
|
34679
35919
|
}]
|
|
34680
35920
|
} }
|
|
34681
|
-
}], design);
|
|
35921
|
+
}]], design);
|
|
34682
35922
|
return {
|
|
34683
35923
|
name: identity.title,
|
|
34684
35924
|
path: design.path,
|
|
@@ -34746,7 +35986,7 @@ function bookingMainBlocks(event, identity, hasDetails) {
|
|
|
34746
35986
|
/** A multi-run parent must not imply that one run's facts describe all its dates. */
|
|
34747
35987
|
function bookingDetailEvents(selection) {
|
|
34748
35988
|
switch (selection.kind) {
|
|
34749
|
-
case "occurrence": return [selection.event];
|
|
35989
|
+
case "occurrence": return [selection.event, ...selection.cancelledEventDates ?? []];
|
|
34750
35990
|
case "dateChoice": return selection.dates;
|
|
34751
35991
|
case "wholeSeriesRun": return [selection.run.representative];
|
|
34752
35992
|
case "wholeSeriesParent": {
|
|
@@ -34757,11 +35997,12 @@ function bookingDetailEvents(selection) {
|
|
|
34757
35997
|
}
|
|
34758
35998
|
}
|
|
34759
35999
|
/** Seed the route's admitted facts, never select or fetch its Event a second time. */
|
|
34760
|
-
function bookingPageSeedData({ registration, details }) {
|
|
36000
|
+
function bookingPageSeedData({ registration, details, eventOverview }) {
|
|
34761
36001
|
return {
|
|
34762
36002
|
[BOOKING_PAGE_BLOCK_IDS.registration]: { ..."events" in registration ? { events: registration.events } : { wholeSeriesRunEvents: registration.wholeSeriesRunEvents } },
|
|
34763
36003
|
[BOOKING_PAGE_BLOCK_IDS.details]: { eventDetailsData: {
|
|
34764
36004
|
events: details,
|
|
36005
|
+
...eventOverview ? { eventOverview: true } : {},
|
|
34765
36006
|
sitePasses: { passes: [] },
|
|
34766
36007
|
siteMemberships: { memberships: [] }
|
|
34767
36008
|
} }
|