@riverbankcms/sdk 0.160.0 → 0.162.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/dist/_dts/{BlocksIslandsHydrator-CoqeotCL.d.ts → BlocksIslandsHydrator-PZUoA872.d.ts} +1 -1
- package/dist/_dts/{Page-C0ENVLCF.d.ts → Page-CdQS6C7i.d.ts} +211 -9
- package/dist/_dts/{SdkPreviewMode-jZK0A49V.d.ts → SdkPreviewMode-CNGO-5f1.d.ts} +59 -92
- package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
- package/dist/_dts/{client-uMMuPq9V.d.ts → client-DGa53rjL.d.ts} +11 -3
- package/dist/_dts/{content-types-D6nXGqdQ.d.ts → content-types-K9R7P-KF.d.ts} +2 -2
- package/dist/_dts/{contracts-Bnmj1nxu.d.ts → contracts-CyBaPaIq.d.ts} +17 -5
- package/dist/_dts/{footerPageOutline-CeLjFX8b.d.ts → footerPageOutline-B6jmKmon.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-nyU8q02J.d.ts → generatePageMetadata-iemoR3AN.d.ts} +2 -2
- package/dist/_dts/{index-BaaGBY1v.d.ts → index-8CN0Nd-Z.d.ts} +2 -2
- package/dist/_dts/{index-nVoi_74l.d.ts → index-BtnsA14K.d.ts} +10 -20
- package/dist/_dts/{index-lkpjIg5i.d.ts → index-C39F9KaB.d.ts} +13 -2
- package/dist/_dts/{index-C5xslEBn.d.ts → index-DEu85xBt.d.ts} +1 -1
- package/dist/_dts/{schema-D0bNcPWK.d.ts → index-DI2yaSPY.d.ts} +22873 -19918
- package/dist/_dts/{types-D8czmbQF.d.ts → index-Dbd0Sn0G.d.ts} +4356 -1827
- package/dist/_dts/{index-CEaKil7G.d.ts → index-Du1IRglc.d.ts} +2 -2
- package/dist/_dts/{index-DahMwisK.d.ts → index-Jlcq6w69.d.ts} +3 -3
- package/dist/_dts/{index-Bg64CkV-.d.ts → index-Wm62sXf2.d.ts} +4 -4
- package/dist/_dts/{loadContent-CYLmzvLq.d.ts → loadContent-BPfAAZDW.d.ts} +13 -10
- package/dist/_dts/{resolvePageContent-DqnxChOs.d.ts → resolvePageContent-DWbrtKf8.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +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/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- 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/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/preview-next/keep-alive.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- 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/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
- package/dist/_dts/{types-DSgmJ15W.d.ts → types-CVv2H4AT.d.ts} +7 -7
- package/dist/_dts/{types-CFrYuXYP.d.ts → types-CfNG5koF.d.ts} +4 -2
- package/dist/_dts/{types-Dm-KW7nj.d.ts → types-ClZ-BQL_.d.ts} +3 -3
- package/dist/_dts/{validation-Bmb4WnHg.d.ts → validation-BJ6Lf_Dr.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DZRKi6tT.mjs → BlocksIslandsHydrator-COqlgWYU.mjs} +23 -21
- package/dist/client/{BookingMailingListNote-C00sLLdL.mjs → BookingMailingListNote-CFYPDEHH.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-CHSi9b3E.mjs → CalendarNavigationChevron-COBVxgHb.mjs} +6 -6
- package/dist/client/{CheckboxChoice-Bhm6RAUL.mjs → CheckboxChoice-C7X9dJ8A.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CaN-7ui7.mjs → DemoBookingPortalAccess-CvT0E9AR.mjs} +26 -10
- package/dist/client/{DemoPortalSignInLink-ClxN5_xZ.mjs → DemoPortalSignInLink-EBOBN5dT.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BncvSa1n.mjs → EventCalendar.client-U6pKcntV.mjs} +16 -17
- package/dist/client/{EventCombined.client-DluBxVVu.mjs → EventCombined.client-CNzwEHws.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-BiJrMtfp.mjs → EventEmbeddedCheckoutStep-B9yAWV_k.mjs} +1 -1
- package/dist/client/{EventItem-CXhnT9pF.mjs → EventItem-M5rpaHxi.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-V-dtoDlD.mjs → EventListWeekNavigation-D4ieBLDY.mjs} +1 -1
- package/dist/client/{EventListing.client-DPO6SZbx.mjs → EventListing.client-B8F40Rmn.mjs} +3 -3
- package/dist/client/{EventListing.view-B-Yi5JZS.mjs → EventListing.view-k4lhuCn5.mjs} +15 -6
- package/dist/client/{EventRegistrationPayment-Dc3Fnlnw.mjs → EventRegistrationPayment-C3g8_Hqb.mjs} +25 -13
- package/dist/client/LocationMapActions-CAjt7qVo.mjs +62 -0
- package/dist/client/MapDrawingSvg-_aIK2ojv.mjs +200 -0
- package/dist/client/{Page-7PkzO04N.mjs → Page-DJBIQBOw.mjs} +2555 -536
- package/dist/client/{StepIndicator-DiD6euZ8.mjs → StepIndicator-CFacB1z6.mjs} +2 -2
- package/dist/client/{TabBarFragment-BHd8GN8y.mjs → TabBarFragment-BLsfQskO.mjs} +1 -1
- package/dist/client/ThemedButton-BWsDgjMC.mjs +2243 -0
- package/dist/client/{accordion-2m27DsIk.mjs → accordion-CtO2XF7M.mjs} +1 -1
- package/dist/client/{booking-form.client-BddWV5w1.mjs → booking-form.client-RICCQ0h2.mjs} +137 -60
- package/dist/client/{bookingForm-bcdXQjmw.mjs → bookingForm-SvjLPx8i.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{carousel-D7nj9I0y.mjs → carousel-BR-zCD3O.mjs} +2 -2
- package/dist/client/{carousel.client-AffDJo_s.mjs → carousel.client-CEWtoZd3.mjs} +1 -1
- package/dist/client/{cart-PN6yCw1H.mjs → cart-C6YpKbZZ.mjs} +3 -3
- package/dist/client/{cart.client-D4t1f0cJ.mjs → cart.client-dC938WrX.mjs} +1 -1
- package/dist/client/{checkout-CsTwXVSb.mjs → checkout-Dy9RlREI.mjs} +3 -3
- package/dist/client/{checkout.client-BhQE3zY7.mjs → checkout.client-CefG0d2F.mjs} +1 -1
- package/dist/client/client.mjs +37 -71
- package/dist/client/{context-BLAvalAa.mjs → context-BFwxgZpB.mjs} +28 -1
- package/dist/client/{cta-CUXhX_D7.mjs → cta-DtA42Xio.mjs} +1 -1
- package/dist/client/{dateFormatting-BHIHxNuo.mjs → dateFormatting-yP1B7F0O.mjs} +39 -2
- package/dist/client/{demoPortalMagicLink-R-awbk_0.mjs → demoPortalMagicLink-WOiT5Ryi.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-9Q93uvTo.mjs → enhanceHeaderSection-Dh8c_Lq-.mjs} +3 -3
- package/dist/client/{event-details.client-BS1WtG-a.mjs → event-details.client-BFgsLqTj.mjs} +3 -17
- package/dist/client/{event-registration.client-BXndwsET.mjs → event-registration.client-BaXZ1-Ky.mjs} +16 -16
- package/dist/client/{eventCalendar-HyoOt1Qz.mjs → eventCalendar-COLwF80U.mjs} +4 -4
- package/dist/client/{eventCombined-sdG5oEaH.mjs → eventCombined-D3Ltwu03.mjs} +4 -4
- package/dist/client/{eventDetails-FFAknE4w.mjs → eventDetails-CBrkimXu.mjs} +2 -2
- package/dist/client/{eventListing-CGK6urk3.mjs → eventListing-CedKVA1S.mjs} +4 -4
- package/dist/client/{eventRegistration-VhrvCs4l.mjs → eventRegistration-DkQQfR1b.mjs} +4 -4
- package/dist/client/{form-C-B5O_ko.mjs → form-XFy9uXSJ.mjs} +3 -3
- package/dist/client/{form.client-DoZVcl8d.mjs → form.client-B0iancFK.mjs} +4 -4
- package/dist/client/{form.parts-mttKpgif.mjs → form.parts-DMbolu9Y.mjs} +3 -3
- package/dist/client/{formatDate-xUSCknEO.mjs → formatDate-Jm5MQOCA.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-BHUEXsaI.mjs → headerSection-WjlECjtV.mjs} +2 -2
- package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BkoW_PEn.mjs} +1 -1
- package/dist/client/{mediaContext-DThoeEBU.mjs → mediaContext-CNzWmoA4.mjs} +1 -1
- package/dist/client/{newsletter-form.client-D_n0rftg.mjs → newsletter-form.client-D-XwJTjN.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DKHye4IE.mjs → newsletter-form.parts-H92f30y0.mjs} +2 -2
- package/dist/client/{newsletterForm-tEaYelzx.mjs → newsletterForm-DMuxzu6I.mjs} +3 -3
- package/dist/client/{noop-B610YKEx.mjs → noop-B3RNPVrt.mjs} +313 -3
- package/dist/client/portal/client.mjs +1116 -85
- package/dist/client/{product-detail.client-DUf5x5Jt.mjs → product-detail.client-B3HuuykE.mjs} +1 -1
- package/dist/client/{product-list.client-Cqp1BPTV.mjs → product-list.client-CzsDrHQO.mjs} +1 -1
- package/dist/client/{productDetail-B8bBiogP.mjs → productDetail-CbBUVWgd.mjs} +3 -3
- package/dist/client/{productList-BKN4D-1z.mjs → productList-vqOKH2mh.mjs} +3 -3
- package/dist/client/{propsDecoder-2nNZh2Oe.mjs → propsDecoder-CkSUep5a.mjs} +4 -28
- package/dist/client/{registry.server-BAm4RPNJ.mjs → registry.server-cZ24QwtW.mjs} +607 -210
- package/dist/client/rendering/client.mjs +28 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +18 -9
- package/dist/client/{richText-coerce-Cv-qomNB.mjs → richText-coerce-DDcCKvBJ.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-C5u8MbAA.mjs → routeIslandApiConfig-DYBioANh.mjs} +1 -1
- package/dist/client/{ThemedButton-C22C9cCF.mjs → schema-DNHLlze-.mjs} +7307 -8363
- package/dist/client/{shop-DZNC0VKk.mjs → shop-CF0dhnfH.mjs} +3 -3
- package/dist/client/{shop-commerce-DdX4LSa3.mjs → shop-commerce-DQznNBEo.mjs} +11 -11
- package/dist/client/{shop-commerce-store-BJtrZov9.mjs → shop-commerce-store-Ba8zPlIg.mjs} +1 -1
- package/dist/client/{shop.client-DmDd-igg.mjs → shop.client-DqfYoqWH.mjs} +12 -12
- package/dist/client/{shop.interactive-5SnnDHz3.mjs → shop.interactive-CreQ0I7i.mjs} +38 -183
- package/dist/client/{shopShared-CPqUlAh9.mjs → shopShared-D-yh-P7g.mjs} +2 -2
- package/dist/client/site-styles-B9HgmY07.mjs +11619 -0
- package/dist/client/{timetableModel-C19rcHEw.mjs → timetableModel-DCdVErTJ.mjs} +149 -8
- package/dist/client/{useAvailableSlots-BjbJXotk.mjs → useAvailableSlots-Cvgdp2DH.mjs} +8 -11
- package/dist/client/{useBookingNowIso-CMgfL7YJ.mjs → useBookingNowIso-DrTnGNzD.mjs} +1 -1
- package/dist/client/{useDiscountApply-KG8jB7WC.mjs → useDiscountApply-CULjnXGl.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-DK2w_i0a.mjs → useDiscountCodeUi-Gn_m7e0o.mjs} +1 -1
- package/dist/client/{useEventPagination-DW6MCirb.mjs → useEventPagination-CsysCF22.mjs} +8 -21
- package/dist/client/{view-CseyBW07.mjs → view-BpBjo9Te.mjs} +71 -59
- package/dist/client/{view-CkUn3Y0Y.mjs → view-DMyTchi7.mjs} +4 -4
- package/dist/client/wizardSteps-BO2OmMO9.mjs +6604 -0
- package/dist/preview-next/before-render.mjs +7 -6
- package/dist/preview-next/chrome.css +2 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-lUHBrzHv.mjs → EventEmbeddedCheckoutStep-DLsSmZbO.mjs} +2 -1
- package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
- package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
- package/dist/preview-next/client/{PreviewEditorSidebar-DWyUGCAG.mjs → PreviewEditorSidebar-ChrW9VEo.mjs} +269 -1100
- package/dist/preview-next/client/{PreviewEditorUI-Wq0b3Daw.mjs → PreviewEditorUI-VaHvYtrA.mjs} +10 -190
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BtZPcwYV.mjs → SdkPreviewModeRuntime-Bz7jR6nl.mjs} +1 -1
- package/dist/preview-next/client/{SdkPreviewModeRuntime-wSI_R361.mjs → SdkPreviewModeRuntime-DWwktlWs.mjs} +639 -536
- package/dist/preview-next/client/{ThemedButton-DzeycIlD.mjs → ThemedButton-CHKOWXxl.mjs} +1706 -692
- package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
- package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
- package/dist/preview-next/client/{SiteChromeCustomizeContext-Hc4pYnNe.mjs → previewAuthStore-C0VUwEHz.mjs} +81363 -136296
- package/dist/preview-next/client/{previewChromeSurface-Corq4AG7.mjs → previewChromeSurface-Dhyx2YrS.mjs} +1 -1
- package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
- package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CWymRWhK.mjs → sdk-runtime-C2GWOCyj.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-DHyzUpv4.mjs +12833 -0
- package/dist/preview-next/client/{spinner-C4If5Y-O.mjs → spinner-BeR2S8oG.mjs} +2 -1
- package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
- package/dist/preview-next/editor-base.css +2 -2
- package/dist/preview-next/keepAlive.mjs +3 -3
- package/dist/preview-next/middleware.mjs +7 -3
- package/dist/preview-next/{refresh-contract-CvmNqZ1Q.mjs → refresh-contract-uQ6BXgLJ.mjs} +5 -0
- package/dist/preview-next/{route-contract-8csADeIT.mjs → route-contract-CkrFDMrl.mjs} +434 -203
- package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-D1_gonwM.mjs → Block.shared-DxvNGDig.mjs} +4 -4
- package/dist/server/{bindings-CFmJg5lm.mjs → bindings-BuhKvYkE.mjs} +2 -1
- package/dist/server/{client-DPsi0Dai.mjs → client-BobW6DOz.mjs} +39 -72
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{siteChromeOverlayClearance-DALIAMwo.mjs → effectiveNavLinkStyle-B-MKSt0p.mjs} +2060 -1680
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-RMCcuVU_.mjs → loadContent-CCG_3mbY.mjs} +14 -5
- package/dist/server/loadPage-Bk9HDh9K.mjs +2 -0
- package/dist/server/{loadPage-DhDGzj7t.mjs → loadPage-jntGoMrf.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-OxY5FMuy.mjs → overrideResolution-BBOlgn4Z.mjs} +1 -1
- package/dist/server/{overrides-Bz_A6sB9.mjs → overrides-DByQwIyW.mjs} +803 -412
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-B_1vrSru.mjs → prebuild-DrwcTk2t.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-B7ukYXXR.mjs → prefetchBlockData-LfgxSJYE.mjs} +156 -89
- package/dist/server/{publicProducts-Djbpc81A.mjs → publicProducts-8A3T5v4M.mjs} +685 -166
- package/dist/server/{registry-eFjKtEhF.mjs → registry-Digv02oV.mjs} +780 -1052
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-DYvEa9c5.mjs → resolveBlockData-C23t8-77.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-C3dJ5UkL.mjs → schema-BiqpDRwB.mjs} +4805 -3561
- package/dist/server/server.mjs +3 -3
- package/dist/server/site-styles-DrkprQPL.mjs +755 -0
- package/dist/server/siteChromeOverlayClearance-BmKKkkbh.mjs +750 -0
- package/dist/server/{src-C5Mu-z0F.mjs → src-08GY1njw.mjs} +1060 -44
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-ruoyXb_0.mjs → themeAdmission-CSd_Vusz.mjs} +151 -53
- package/dist/server/{validation-B-Xar8QS.mjs → validation-DdUTkBOZ.mjs} +2 -2
- package/dist/server/{version-Bg7VHK3i.mjs → version-DdIOqIDe.mjs} +1 -1
- package/dist/styles/index.css +1029 -41
- package/package.json +1 -1
- package/dist/_dts/index-Blwl7yl6.d.ts +0 -13
- package/dist/client/LeafletStaticMap-ClZCCzAm.mjs +0 -135
- package/dist/client/location-map.client-Cylb_MHw.mjs +0 -28
- package/dist/client/location-map.view-Cx4Bl7ij.mjs +0 -345
- package/dist/client/locationMap-QnKJi-nZ.mjs +0 -15
- package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
- package/dist/client/wizardSteps-zgq10lN1.mjs +0 -17181
- package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +0 -1359
- package/dist/server/loadPage-DUPP51C-.mjs +0 -2
- package/dist/server/media-CcHwZkdJ.mjs +0 -243
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as arrangementModes, Cn as textColorStyle, Cr as unsafeAsMediaAssetId, Ct as buildRenderableMediaAssetIndex, Dn as opaqueSurfaceDeclarations, Dr as ok$1, Er as err, Et as resolveManagedMediaReference, F as themeButtonExtraClassesWithTrailingIcon, Fn as PUBLIC_BUTTON_ROLES, G as cardRoleSchema, Gt as defineFrameCapability, I as themeButtonSizeClassName, In as selectLogoVariant, J as normalizeCardRole, Kt as eventListTreatmentValues, L as themeButtonVariantClassNames, Ln as surfaceToneFromForegroundToken, Mn as resolveThemeColorReferenceValue, Ot as parseCanonicalMediaIdentifier, Sn as rgbColorValue, St as runtimeMediaSchema, Tr as unsafeAsStoragePath, Un as surfaceForegroundInputFromResolved, Ut as defineBlockDesignCapability, Wn as surfaceForegroundStyle, Xt as headingDecorationColorTokenValues, an as testimonialsCompositionTreatmentValues, cn as visibleHeadingDecorationFamilyValues, dn as resolveSurface, gr as parseContentVersionId, ht as runtimeBoxBackgroundSchema, ln as parseResolvedSurface, mn as resolveSurfaceForeground, mt as boxBackgroundSchema, on as tileTreatmentValues, p as headerVariantValues, pn as surfaceDecorationColors, pr as parseBlockColorToken, pt as boxBackgroundOverlaySchema, q as cardVariantRoleValues, qt as eyebrowTreatmentValues, sn as toNonEmptyReadonlyArray, tn as offeringsPreviewCompositionTreatmentValues, vn as backgroundColorStyle, vr as parseEventOfferingId, wr as unsafeAsStorageBucketName, xn as mergeStyles, xr as parseSiteTermsVersionId, yn as borderColorStyle, yr as parseEventSeriesId } from "./schema-BiqpDRwB.mjs";
|
|
2
2
|
import { t as assertNever$1 } from "./assert-never-ku-PUn9U.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { A as footerForegroundCandidates, P as headerRootPaint, a as readOpeningForegroundProjection, f as arrangementSlotNames, i as transparentHeaderForegroundInput, n as headerForegroundCandidates, r as headerLeafTextColor, v as resolveModeArrangement, w as compiledRuntimeStyleFieldNames } from "./effectiveNavLinkStyle-B-MKSt0p.mjs";
|
|
4
|
+
import { a as heroPhotoPaintsGround, c as sectionForegroundBackground, l as defineBlockDesignMetadata, o as parseCanonicalRuntimeBackground, s as resolveSectionBackground } from "./site-styles-DrkprQPL.mjs";
|
|
5
5
|
import { a as isRecord$12, t as RichTextDocSchema } from "./richTextSchema-YYc85FX4.mjs";
|
|
6
|
+
import { a as planSiteChromePlacement, i as parseHeaderPositioning, n as desktopOnlyDisplay, o as splitSiteChromePlacementClasses, r as mobileOnlyDisplay, t as SITE_CHROME_VISIBLE_HEADER_ATTR } from "./siteChromeOverlayClearance-BmKKkkbh.mjs";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
import React from "react";
|
|
8
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -911,6 +912,157 @@ function formatTimeZoneCityLabel(timeZone) {
|
|
|
911
912
|
return timeZone.startsWith("Etc/") ? "local time" : `${timeZone.split("/").slice(-1)[0]?.replace(/_/gu, " ") ?? timeZone} time`;
|
|
912
913
|
}
|
|
913
914
|
//#endregion
|
|
915
|
+
//#region ../core/src/map-drawing/model.ts
|
|
916
|
+
const MAX_DRAWING_BYTES = 1024 * 1024;
|
|
917
|
+
/** Current real city extracts fit with >2x headroom; reservations precede allocation. */
|
|
918
|
+
const DRAWING_DECODE_LIMITS = {
|
|
919
|
+
pathsPerFeature: 2048,
|
|
920
|
+
verticesPerPath: 8192,
|
|
921
|
+
verticesPerFeature: 32768,
|
|
922
|
+
featuresPerLayer: 1e4,
|
|
923
|
+
featuresPerTile: 16e3,
|
|
924
|
+
featuresPerAttempt: 6e4,
|
|
925
|
+
verticesPerAttempt: 1e6
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* The two fixed framings. Neighbourhood draws 1 m per view-box unit, wider 4 m, so the same stroke and label
|
|
929
|
+
* sizes read well in both. The wider view leaves out buildings, distant paths and small green patches, which turn to
|
|
930
|
+
* noise at that scale. `minParkArea` is in square view-box units. Labels go to the nearest streets first, with a
|
|
931
|
+
* minor street counted as `minorLabelDistance` times further away than it is, so the wider view names main roads.
|
|
932
|
+
*/
|
|
933
|
+
const FRAMINGS = [{
|
|
934
|
+
name: "neighbourhood",
|
|
935
|
+
radiusMeters: 400,
|
|
936
|
+
zoom: 15,
|
|
937
|
+
roads: [
|
|
938
|
+
"major",
|
|
939
|
+
"minor",
|
|
940
|
+
"path"
|
|
941
|
+
],
|
|
942
|
+
maxPathDistance: 800,
|
|
943
|
+
buildings: true,
|
|
944
|
+
minParkArea: .3,
|
|
945
|
+
maxLabels: 6,
|
|
946
|
+
minorLabelDistance: 1.5
|
|
947
|
+
}, {
|
|
948
|
+
name: "wider",
|
|
949
|
+
radiusMeters: 1600,
|
|
950
|
+
zoom: 14,
|
|
951
|
+
roads: [
|
|
952
|
+
"major",
|
|
953
|
+
"minor",
|
|
954
|
+
"path"
|
|
955
|
+
],
|
|
956
|
+
maxPathDistance: 100,
|
|
957
|
+
buildings: false,
|
|
958
|
+
minParkArea: 40,
|
|
959
|
+
maxLabels: 5,
|
|
960
|
+
minorLabelDistance: 4
|
|
961
|
+
}];
|
|
962
|
+
const tilePoint = z.tuple([z.number().finite().min(-8192).max(12288), z.number().finite().min(-8192).max(12288)]).readonly();
|
|
963
|
+
const paths = z.array(z.array(tilePoint).min(2).max(DRAWING_DECODE_LIMITS.verticesPerPath).readonly()).min(1).max(DRAWING_DECODE_LIMITS.pathsPerFeature).readonly();
|
|
964
|
+
const featureFields = {
|
|
965
|
+
kind: z.string().max(80),
|
|
966
|
+
name: z.string().trim().max(60).regex(/^[^<>\u0000-\u001f\u007f]*$/).nullish().transform((value) => value === void 0 || value === null || value === "" ? null : value),
|
|
967
|
+
sortRank: z.number().finite().min(-1e4).max(1e4).default(0),
|
|
968
|
+
paths: paths.refine((value) => value.reduce((n, path) => n + path.length, 0) <= DRAWING_DECODE_LIMITS.verticesPerFeature)
|
|
969
|
+
};
|
|
970
|
+
const feature = z.discriminatedUnion("geometry", [z.strictObject({
|
|
971
|
+
...featureFields,
|
|
972
|
+
layer: z.literal("roads"),
|
|
973
|
+
geometry: z.literal("line")
|
|
974
|
+
}).readonly(), z.strictObject({
|
|
975
|
+
...featureFields,
|
|
976
|
+
layer: z.enum([
|
|
977
|
+
"earth",
|
|
978
|
+
"water",
|
|
979
|
+
"landuse",
|
|
980
|
+
"buildings"
|
|
981
|
+
]),
|
|
982
|
+
geometry: z.literal("polygon")
|
|
983
|
+
}).refine((value) => value.paths.every((ring) => ring.length >= 3)).readonly()]);
|
|
984
|
+
const tile = z.strictObject({
|
|
985
|
+
z: z.union([z.literal(14), z.literal(15)]),
|
|
986
|
+
x: z.number().int().nonnegative(),
|
|
987
|
+
y: z.number().int().nonnegative(),
|
|
988
|
+
extent: z.literal(4096),
|
|
989
|
+
features: z.array(feature).max(DRAWING_DECODE_LIMITS.featuresPerTile).readonly()
|
|
990
|
+
}).refine((value) => value.x < 2 ** value.z && value.y < 2 ** value.z).readonly();
|
|
991
|
+
z.strictObject({
|
|
992
|
+
buildId: z.string().regex(/^\d{8}$/),
|
|
993
|
+
tileSchemaVersion: z.string().regex(/^4\.\d+\.\d+$/),
|
|
994
|
+
pin: z.lazy(() => locationPinSchema),
|
|
995
|
+
tiles: z.array(tile).min(1).max(96).readonly()
|
|
996
|
+
}).superRefine((value, ctx) => {
|
|
997
|
+
const features = value.tiles.flatMap((item) => item.features);
|
|
998
|
+
if (features.length > DRAWING_DECODE_LIMITS.featuresPerAttempt || features.reduce((sum, item) => sum + item.paths.reduce((count, path) => count + path.length, 0), 0) > DRAWING_DECODE_LIMITS.verticesPerAttempt) ctx.addIssue({
|
|
999
|
+
code: "custom",
|
|
1000
|
+
message: "Decoded geometry exceeds the attempt budget."
|
|
1001
|
+
});
|
|
1002
|
+
}).readonly();
|
|
1003
|
+
const point = z.tuple([z.number().min(0).max(800), z.number().min(0).max(800)]).readonly();
|
|
1004
|
+
const polygon = z.strictObject({
|
|
1005
|
+
kind: z.literal("polygon"),
|
|
1006
|
+
fillRule: z.literal("evenodd"),
|
|
1007
|
+
className: z.enum([
|
|
1008
|
+
"map-land",
|
|
1009
|
+
"map-water",
|
|
1010
|
+
"map-park",
|
|
1011
|
+
"map-building"
|
|
1012
|
+
]),
|
|
1013
|
+
rings: z.array(z.array(point).min(3).max(8192).readonly()).min(1).max(DRAWING_DECODE_LIMITS.pathsPerFeature).readonly()
|
|
1014
|
+
}).readonly();
|
|
1015
|
+
const line = z.strictObject({
|
|
1016
|
+
kind: z.literal("line"),
|
|
1017
|
+
className: z.enum([
|
|
1018
|
+
"map-road-major-casing",
|
|
1019
|
+
"map-road-major",
|
|
1020
|
+
"map-road-minor-casing",
|
|
1021
|
+
"map-road-minor",
|
|
1022
|
+
"map-road-path"
|
|
1023
|
+
]),
|
|
1024
|
+
points: z.array(point).min(2).max(8192).readonly()
|
|
1025
|
+
}).readonly();
|
|
1026
|
+
const drawingPathSchema = z.discriminatedUnion("kind", [polygon, line]);
|
|
1027
|
+
const label = z.strictObject({
|
|
1028
|
+
className: z.literal("map-label"),
|
|
1029
|
+
haloClassName: z.literal("map-label-halo"),
|
|
1030
|
+
text: z.string().trim().min(1).max(60).regex(/^[^<>\u0000-\u001f\u007f]*$/),
|
|
1031
|
+
point,
|
|
1032
|
+
angle: z.number().min(-90).max(90)
|
|
1033
|
+
}).readonly();
|
|
1034
|
+
const drawingFrameSchema = z.strictObject({
|
|
1035
|
+
radiusMeters: z.union([z.literal(FRAMINGS[0].radiusMeters), z.literal(FRAMINGS[1].radiusMeters)]),
|
|
1036
|
+
viewBox: z.tuple([
|
|
1037
|
+
z.literal(0),
|
|
1038
|
+
z.literal(0),
|
|
1039
|
+
z.literal(800),
|
|
1040
|
+
z.literal(800)
|
|
1041
|
+
]).readonly(),
|
|
1042
|
+
backgroundClass: z.literal("map-water"),
|
|
1043
|
+
paths: z.array(drawingPathSchema).max(1800).readonly(),
|
|
1044
|
+
labels: z.array(label).max(12).readonly(),
|
|
1045
|
+
pin: z.strictObject({
|
|
1046
|
+
className: z.literal("map-pin"),
|
|
1047
|
+
point: z.tuple([z.literal(400), z.literal(400)]).readonly()
|
|
1048
|
+
}).readonly()
|
|
1049
|
+
}).superRefine((value, ctx) => {
|
|
1050
|
+
if (value.paths.reduce((sum, path) => sum + (path.kind === "line" ? path.points.length : path.rings.reduce((n, ring) => n + ring.length, 0)), 0) > 5e4) ctx.addIssue({
|
|
1051
|
+
code: "custom",
|
|
1052
|
+
message: "Drawing exceeds its vertex budget."
|
|
1053
|
+
});
|
|
1054
|
+
}).readonly();
|
|
1055
|
+
const mapDrawingSchema = z.strictObject({
|
|
1056
|
+
schemaVersion: z.literal(2),
|
|
1057
|
+
generatorVersion: z.literal(3),
|
|
1058
|
+
buildId: z.string().regex(/^\d{8}$/),
|
|
1059
|
+
tileSchemaVersion: z.string().regex(/^4\.\d+\.\d+$/),
|
|
1060
|
+
frames: z.strictObject({
|
|
1061
|
+
neighbourhood: drawingFrameSchema,
|
|
1062
|
+
wider: drawingFrameSchema
|
|
1063
|
+
}).readonly()
|
|
1064
|
+
}).refine((value) => value.frames.neighbourhood.radiusMeters === FRAMINGS[0].radiusMeters && value.frames.wider.radiusMeters === FRAMINGS[1].radiusMeters).refine((value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= MAX_DRAWING_BYTES, { error: "Drawing exceeds its byte budget." }).readonly();
|
|
1065
|
+
//#endregion
|
|
914
1066
|
//#region ../core/src/string.ts
|
|
915
1067
|
/**
|
|
916
1068
|
* Trim a user-entered string and collapse blank values to null.
|
|
@@ -952,11 +1104,12 @@ const locationAddressMatchSchema = z.strictObject({
|
|
|
952
1104
|
url: z.url().max(2048).refine((value) => /^https?:\/\//.test(value))
|
|
953
1105
|
}).readonly()).min(1).max(4).readonly()
|
|
954
1106
|
}).readonly();
|
|
955
|
-
z.strictObject({
|
|
1107
|
+
const locationValueSchema = z.strictObject({
|
|
956
1108
|
address: locationAddressSchema.nullable().default(null),
|
|
957
1109
|
pin: locationPinSchema.nullable().default(null),
|
|
958
1110
|
doorNote: z.string().trim().max(1e3).nullish().transform(trimmedStringOrNull),
|
|
959
1111
|
addressMatch: locationAddressMatchSchema.nullable().default(null),
|
|
1112
|
+
addressCheckSettled: z.literal(true).optional(),
|
|
960
1113
|
ownerConfirmedPinAndAddress: z.boolean().default(false)
|
|
961
1114
|
}).superRefine((value, context) => {
|
|
962
1115
|
if (value.address === null && value.pin === null) context.addIssue({
|
|
@@ -969,12 +1122,66 @@ z.strictObject({
|
|
|
969
1122
|
path: ["addressMatch"],
|
|
970
1123
|
message: "Address evidence requires an address."
|
|
971
1124
|
});
|
|
1125
|
+
if (value.address === null && value.addressCheckSettled) context.addIssue({
|
|
1126
|
+
code: "custom",
|
|
1127
|
+
path: ["addressCheckSettled"],
|
|
1128
|
+
message: "A settled address check requires an address."
|
|
1129
|
+
});
|
|
972
1130
|
if (value.ownerConfirmedPinAndAddress && (value.address === null || value.pin === null)) context.addIssue({
|
|
973
1131
|
code: "custom",
|
|
974
1132
|
path: ["ownerConfirmedPinAndAddress"],
|
|
975
1133
|
message: "Confirmation requires both address and pin."
|
|
976
1134
|
});
|
|
977
1135
|
}).readonly();
|
|
1136
|
+
/** API/DB ingress parses once. Removed locations are represented by null. */
|
|
1137
|
+
function parseLocationValue(input) {
|
|
1138
|
+
const parsed = locationValueSchema.nullable().safeParse(input);
|
|
1139
|
+
return parsed.success ? ok$1(parsed.data) : err({
|
|
1140
|
+
kind: "invalid_location",
|
|
1141
|
+
issues: parsed.error.issues
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
/** One display formatter: a known matching site country is redundant. */
|
|
1145
|
+
function formatLocationAddress(address, siteCountry) {
|
|
1146
|
+
if (address === null) return null;
|
|
1147
|
+
return [
|
|
1148
|
+
address.building,
|
|
1149
|
+
address.street,
|
|
1150
|
+
address.unit,
|
|
1151
|
+
address.floor,
|
|
1152
|
+
address.locality,
|
|
1153
|
+
address.region,
|
|
1154
|
+
address.postalCode,
|
|
1155
|
+
sameLocationCountry(address.country, siteCountry) ? null : address.country
|
|
1156
|
+
].filter((part) => part !== null).join(", ") || null;
|
|
1157
|
+
}
|
|
1158
|
+
const regionNames = new Intl.DisplayNames(["en"], { type: "region" });
|
|
1159
|
+
const countryIdentity = (country) => {
|
|
1160
|
+
const text = country.trim();
|
|
1161
|
+
const code = text.toUpperCase() === "UK" ? "GB" : text.toUpperCase();
|
|
1162
|
+
return (code.length === 2 && /^[A-Z]{2}$/.test(code) ? regionNames.of(code) ?? text : text).toLowerCase();
|
|
1163
|
+
};
|
|
1164
|
+
function sameLocationCountry(country, siteCountry) {
|
|
1165
|
+
return country !== null && Boolean(siteCountry?.trim()) && countryIdentity(country) === countryIdentity(siteCountry ?? "");
|
|
1166
|
+
}
|
|
1167
|
+
const publicLocationSchema = z.strictObject({
|
|
1168
|
+
drawing: z.lazy(() => mapDrawingSchema).optional().catch(void 0),
|
|
1169
|
+
address: locationAddressSchema.nullable(),
|
|
1170
|
+
displayAddress: z.string().nullable().default(null),
|
|
1171
|
+
pin: locationPinSchema.nullable(),
|
|
1172
|
+
doorNote: z.string().max(1e3).nullable(),
|
|
1173
|
+
attribution: z.array(locationAddressMatchSchema.unwrap().shape.attribution.unwrap().element).max(4).readonly()
|
|
1174
|
+
}).readonly();
|
|
1175
|
+
/** Permission belongs to the resource/source owner before this projection. */
|
|
1176
|
+
function projectPublicLocation(location, siteCountry) {
|
|
1177
|
+
return {
|
|
1178
|
+
address: location.address,
|
|
1179
|
+
displayAddress: formatLocationAddress(location.address, siteCountry),
|
|
1180
|
+
pin: location.pin,
|
|
1181
|
+
doorNote: location.doorNote,
|
|
1182
|
+
attribution: location.addressMatch?.attribution ?? []
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
978
1185
|
function normalizeLocationAddressText(value) {
|
|
979
1186
|
if (typeof value !== "string") return null;
|
|
980
1187
|
return trimmedStringOrNull(value);
|
|
@@ -989,6 +1196,14 @@ function toLocationCoordinates(value) {
|
|
|
989
1196
|
lng: value.lng
|
|
990
1197
|
};
|
|
991
1198
|
}
|
|
1199
|
+
/** Decide permission before loading or projecting the selected source. */
|
|
1200
|
+
function decideLocationSourcePermission(source, businessAddressVisibility) {
|
|
1201
|
+
if (source === "business_address" && businessAddressVisibility === void 0) return { kind: "unresolved" };
|
|
1202
|
+
return source === "business_address" && businessAddressVisibility === "hidden" ? { kind: "hidden" } : {
|
|
1203
|
+
kind: "permitted",
|
|
1204
|
+
source
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
992
1207
|
//#endregion
|
|
993
1208
|
//#region ../core/src/public-profile.ts
|
|
994
1209
|
const publicProfileWeekdays = [
|
|
@@ -1539,10 +1754,14 @@ function assessCustomTargeting(catalog, targeting) {
|
|
|
1539
1754
|
}
|
|
1540
1755
|
}
|
|
1541
1756
|
}
|
|
1757
|
+
/** Shared choice availability decision for both runtime catalogues and captured document facts. */
|
|
1758
|
+
function missingMailingListTargetingChoiceIds(targeting, choices) {
|
|
1759
|
+
const available = new Set(choices.map((choice) => choice.id));
|
|
1760
|
+
return mailingListTargetingChoiceIds(targeting).filter((id) => !available.has(id));
|
|
1761
|
+
}
|
|
1542
1762
|
function assessMatchedChoices(matched, choices) {
|
|
1543
1763
|
const selected = new Set(mailingListTargetingChoiceIds(matched.targeting));
|
|
1544
|
-
const
|
|
1545
|
-
const missingIds = [...selected].filter((id) => !available.has(id));
|
|
1764
|
+
const missingIds = missingMailingListTargetingChoiceIds(matched.targeting, choices);
|
|
1546
1765
|
const value = {
|
|
1547
1766
|
mode: "custom",
|
|
1548
1767
|
...matched,
|
|
@@ -1973,99 +2192,6 @@ function chosenString(value) {
|
|
|
1973
2192
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
1974
2193
|
}
|
|
1975
2194
|
//#endregion
|
|
1976
|
-
//#region ../theme-core/src/site-styles/blockFlow.ts
|
|
1977
|
-
function defineBlockDesignMetadata(input) {
|
|
1978
|
-
const layoutProfiles = (input.layoutProfiles ?? []).map((profile) => ({
|
|
1979
|
-
...profile,
|
|
1980
|
-
variantKey: asLayoutVariantKey(profile.variantKey)
|
|
1981
|
-
}));
|
|
1982
|
-
assertUniqueLayoutProfileKeys(layoutProfiles);
|
|
1983
|
-
return {
|
|
1984
|
-
flow: input.flow,
|
|
1985
|
-
layoutProfiles
|
|
1986
|
-
};
|
|
1987
|
-
}
|
|
1988
|
-
function assertUniqueLayoutProfileKeys(profiles) {
|
|
1989
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1990
|
-
const duplicates = profiles.flatMap((profile) => {
|
|
1991
|
-
if (seen.has(profile.variantKey)) return [profile.variantKey];
|
|
1992
|
-
seen.add(profile.variantKey);
|
|
1993
|
-
return [];
|
|
1994
|
-
});
|
|
1995
|
-
if (duplicates.length > 0) throw new Error(`Duplicate block layout design profiles: ${duplicates.join(", ")}`);
|
|
1996
|
-
}
|
|
1997
|
-
//#endregion
|
|
1998
|
-
//#region ../theme-core/src/site-styles/backgroundAppearance.ts
|
|
1999
|
-
const backgroundAppearanceQuickColorTokenNames = [
|
|
2000
|
-
"background",
|
|
2001
|
-
"surface",
|
|
2002
|
-
"muted",
|
|
2003
|
-
"primary",
|
|
2004
|
-
"secondary",
|
|
2005
|
-
"accent"
|
|
2006
|
-
];
|
|
2007
|
-
const backgroundAppearanceBaseColorTokenNames = [
|
|
2008
|
-
"background",
|
|
2009
|
-
"surface",
|
|
2010
|
-
"surfaceAlt",
|
|
2011
|
-
"muted",
|
|
2012
|
-
"primary",
|
|
2013
|
-
"secondary",
|
|
2014
|
-
"accent",
|
|
2015
|
-
"neutral"
|
|
2016
|
-
];
|
|
2017
|
-
const backgroundAppearanceShadeableColorTokenNames = [
|
|
2018
|
-
"primary",
|
|
2019
|
-
"secondary",
|
|
2020
|
-
"accent",
|
|
2021
|
-
"neutral"
|
|
2022
|
-
];
|
|
2023
|
-
const backgroundAppearanceColorTokenNames = uniqueStrings([...backgroundAppearanceBaseColorTokenNames, ...backgroundAppearanceShadeableColorTokenNames.flatMap((name) => themeColorShadeSteps.map((shade) => `${name}-${shade}`))]);
|
|
2024
|
-
backgroundAppearanceColorTokenNames.filter((tokenName) => !backgroundAppearanceQuickColorTokenNames.includes(tokenName));
|
|
2025
|
-
const backgroundAppearanceColorTokenNameSet = new Set(backgroundAppearanceColorTokenNames);
|
|
2026
|
-
function parseBackgroundAppearanceColorToken(value) {
|
|
2027
|
-
if (typeof value !== "string") return null;
|
|
2028
|
-
const normalized = value.trim();
|
|
2029
|
-
if (!backgroundAppearanceColorTokenNameSet.has(normalized)) return null;
|
|
2030
|
-
return parseThemeColorToken(normalized);
|
|
2031
|
-
}
|
|
2032
|
-
function uniqueStrings(values) {
|
|
2033
|
-
return Array.from(new Set(values));
|
|
2034
|
-
}
|
|
2035
|
-
//#endregion
|
|
2036
|
-
//#region ../theme-core/src/site-styles/cardRoleVocabulary.ts
|
|
2037
|
-
/**
|
|
2038
|
-
* The legacy `itemSurface` treatment vocabulary, and how it reads as a card
|
|
2039
|
-
* role.
|
|
2040
|
-
*
|
|
2041
|
-
* `itemSurface` named a *treatment* ("raised", "inset"); a role names *which
|
|
2042
|
-
* card* a Look wants and defers the appearance to the site style. Phase 3
|
|
2043
|
-
* deleted the treatment vocabulary and the recipe table it fed, so this map is
|
|
2044
|
-
* no longer a migration coexistence device — it is the one parse boundary where
|
|
2045
|
-
* persisted design plans written before the cutover still load, normalizing to
|
|
2046
|
-
* the role they meant.
|
|
2047
|
-
*
|
|
2048
|
-
* Per-value rationale is recorded in
|
|
2049
|
-
* `.project/plans/1297-card-role-contract-site-styles-own-card-surfaces/mapping-table.md`.
|
|
2050
|
-
*/
|
|
2051
|
-
const legacyItemSurfaceCardRoles = {
|
|
2052
|
-
none: "none",
|
|
2053
|
-
flat: "default",
|
|
2054
|
-
default: "default",
|
|
2055
|
-
outlined: "default",
|
|
2056
|
-
raised: "default",
|
|
2057
|
-
inset: "alternative",
|
|
2058
|
-
editorial: "open",
|
|
2059
|
-
"color-blocked": "alternative"
|
|
2060
|
-
};
|
|
2061
|
-
Object.keys(legacyItemSurfaceCardRoles);
|
|
2062
|
-
/**
|
|
2063
|
-
* The parse boundary for card roles reaching design intents and persisted
|
|
2064
|
-
* design plans: roles pass through, legacy `itemSurface` values normalize to
|
|
2065
|
-
* the role they meant, everything else fails the parse.
|
|
2066
|
-
*/
|
|
2067
|
-
const cardRoleWithLegacyAliasSchema = z.preprocess((value) => normalizeCardRole(value) ?? (typeof value === "string" && Object.prototype.hasOwnProperty.call(legacyItemSurfaceCardRoles, value) ? legacyItemSurfaceCardRoles[value] : value), cardRoleSchema);
|
|
2068
|
-
//#endregion
|
|
2069
2195
|
//#region ../media-core/src/fileSafety.ts
|
|
2070
2196
|
const CONTROL_CHARACTER_PATTERN = /[\u0000-\u001f\u007f]/u;
|
|
2071
2197
|
function containsUnsafePathSegmentCharacter(value) {
|
|
@@ -2332,777 +2458,6 @@ function rotateNormalizedPoint(point, rotation) {
|
|
|
2332
2458
|
}
|
|
2333
2459
|
}
|
|
2334
2460
|
//#endregion
|
|
2335
|
-
//#region ../theme-core/src/site-styles/runtimeBackgroundResolution.ts
|
|
2336
|
-
function parseCanonicalRuntimeBackground(content) {
|
|
2337
|
-
const background = readRecord(readRecord(content._sectionStyles)?.background);
|
|
2338
|
-
if (!background) return { kind: "none" };
|
|
2339
|
-
const parsed = runtimeBoxBackgroundSchema.safeParse(background);
|
|
2340
|
-
if (!parsed.success) return { kind: "none" };
|
|
2341
|
-
return parsed.data.contentOwner === "page-design-editor" ? {
|
|
2342
|
-
kind: "page-design-override",
|
|
2343
|
-
background: parsed.data
|
|
2344
|
-
} : {
|
|
2345
|
-
kind: "block-authored",
|
|
2346
|
-
background: parsed.data
|
|
2347
|
-
};
|
|
2348
|
-
}
|
|
2349
|
-
function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
|
|
2350
|
-
if (heroPhotoIsContent(source, arrangementHeroPhoto, rhythm !== void 0)) {
|
|
2351
|
-
if (rhythm !== void 0) return rhythmBackground(rhythm);
|
|
2352
|
-
return {
|
|
2353
|
-
kind: "content-media",
|
|
2354
|
-
background: source.background,
|
|
2355
|
-
ground: {
|
|
2356
|
-
type: "color",
|
|
2357
|
-
color: arrangementHeroPhoto?.fallbackToken ?? "background",
|
|
2358
|
-
textColor: source.background.textColor,
|
|
2359
|
-
headingColor: source.background.headingColor,
|
|
2360
|
-
linkColor: source.background.linkColor,
|
|
2361
|
-
supportingColor: source.background.supportingColor
|
|
2362
|
-
}
|
|
2363
|
-
};
|
|
2364
|
-
}
|
|
2365
|
-
if (source.kind === "page-design-override") return {
|
|
2366
|
-
kind: "override",
|
|
2367
|
-
background: source.background
|
|
2368
|
-
};
|
|
2369
|
-
if (isAuthoredMedia(source)) return {
|
|
2370
|
-
kind: "authored-media",
|
|
2371
|
-
background: lookDefault ? mergeLookForegroundWithAuthoredMedia(lookDefault, source.background) : source.background
|
|
2372
|
-
};
|
|
2373
|
-
if (lookDefault) return {
|
|
2374
|
-
kind: "look-surface",
|
|
2375
|
-
background: lookDefault
|
|
2376
|
-
};
|
|
2377
|
-
if (source.kind === "block-authored") return {
|
|
2378
|
-
kind: "authored-colour",
|
|
2379
|
-
background: source.background
|
|
2380
|
-
};
|
|
2381
|
-
return rhythmBackground(rhythm);
|
|
2382
|
-
}
|
|
2383
|
-
function resolveSectionForeground(background, palette) {
|
|
2384
|
-
return resolveSurfaceForeground(sectionForegroundBackground(background, palette), palette, {}, { compositeBase: "background" });
|
|
2385
|
-
}
|
|
2386
|
-
/** Legacy detached photos keep already-legible authored ink and its exact CSS treatment. */
|
|
2387
|
-
function sectionForegroundBackground(resolved, palette) {
|
|
2388
|
-
if (resolved.kind === "base") return null;
|
|
2389
|
-
if (resolved.kind !== "content-media") return resolved.background;
|
|
2390
|
-
const original = resolveSurfaceForeground(resolved.background, palette);
|
|
2391
|
-
const measured = resolveSurfaceForeground(resolved.ground, palette);
|
|
2392
|
-
if (original.kind === "unknown" || measured.kind === "unknown") return resolved.background;
|
|
2393
|
-
return [
|
|
2394
|
-
"text",
|
|
2395
|
-
"heading",
|
|
2396
|
-
"link",
|
|
2397
|
-
"supporting"
|
|
2398
|
-
].every((role) => original.roles[role] === measured.roles[role]) ? resolved.background : resolved.ground;
|
|
2399
|
-
}
|
|
2400
|
-
/** One photo-placement decision for legacy and arrangement hero renderers. */
|
|
2401
|
-
function heroPhotoPaintsGround(variant) {
|
|
2402
|
-
return ![
|
|
2403
|
-
"split",
|
|
2404
|
-
"splitReverse",
|
|
2405
|
-
"headline-row",
|
|
2406
|
-
"copy-over-gallery",
|
|
2407
|
-
"page-head"
|
|
2408
|
-
].includes(variant ?? "classic");
|
|
2409
|
-
}
|
|
2410
|
-
function mergeLookForegroundWithAuthoredMedia(lookDefault, authored) {
|
|
2411
|
-
const paintsBand = lookDefault.type === "color" || lookDefault.type === "gradient";
|
|
2412
|
-
const lookScrim = paintsBand ? lookDefault.mediaScrim : void 0;
|
|
2413
|
-
if (paintsBand && !lookScrim) return authored;
|
|
2414
|
-
const merged = runtimeBoxBackgroundSchema.safeParse({
|
|
2415
|
-
...lookDefault,
|
|
2416
|
-
type: authored.type,
|
|
2417
|
-
image: authored.image,
|
|
2418
|
-
objectFit: authored.objectFit,
|
|
2419
|
-
scale: authored.scale,
|
|
2420
|
-
position: authored.position,
|
|
2421
|
-
...lookScrim ? { overlay: lookScrim } : {}
|
|
2422
|
-
});
|
|
2423
|
-
return merged.success ? merged.data : authored;
|
|
2424
|
-
}
|
|
2425
|
-
function readRecord(value) {
|
|
2426
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
2427
|
-
}
|
|
2428
|
-
function heroPhotoIsContent(source, photo, hasArrangementGround) {
|
|
2429
|
-
return photo !== void 0 && !photo.paintsGround && source.kind === "block-authored" && source.background.type === "image" && (hasArrangementGround || !source.background.overlay);
|
|
2430
|
-
}
|
|
2431
|
-
function isAuthoredMedia(source) {
|
|
2432
|
-
return source.kind === "block-authored" && (source.background.type === "image" || source.background.type === "video");
|
|
2433
|
-
}
|
|
2434
|
-
function rhythmBackground(background) {
|
|
2435
|
-
return background ? {
|
|
2436
|
-
kind: "rhythm",
|
|
2437
|
-
background
|
|
2438
|
-
} : { kind: "base" };
|
|
2439
|
-
}
|
|
2440
|
-
/**
|
|
2441
|
-
* Semantic section grounds: background/base -> light; muted/surface bands ->
|
|
2442
|
-
* band; primary/secondary/accent (including pop) -> brand; text/inverse and
|
|
2443
|
-
* numbered deep shades -> deep. Media and gradients use the existing resolved
|
|
2444
|
-
* scrim foreground/tone contract: light ink over a dark veil -> deep, dark ink
|
|
2445
|
-
* over a light veil -> light. Unclassified/no veil defaults to light.
|
|
2446
|
-
* Background ownership (override, authored, Look or rhythm) never changes tone.
|
|
2447
|
-
*/
|
|
2448
|
-
const solidGrounds = {
|
|
2449
|
-
background: "light",
|
|
2450
|
-
muted: "band",
|
|
2451
|
-
surface: "band",
|
|
2452
|
-
primary: "brand",
|
|
2453
|
-
secondary: "brand",
|
|
2454
|
-
accent: "brand",
|
|
2455
|
-
text: "deep"
|
|
2456
|
-
};
|
|
2457
|
-
function deriveSectionGround(resolved, palette) {
|
|
2458
|
-
if (resolved.kind === "base") return "light";
|
|
2459
|
-
const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
|
|
2460
|
-
const solid = solidSectionGround(background);
|
|
2461
|
-
if (solid) return solid;
|
|
2462
|
-
return (scrimTone(sectionScrimSamples(background, palette)) ?? sectionForegroundTone(resolved, palette)) === "dark" ? "deep" : "light";
|
|
2463
|
-
}
|
|
2464
|
-
function solidSectionGround(background) {
|
|
2465
|
-
if (background.type !== "color") return null;
|
|
2466
|
-
const color = background.color ?? "background";
|
|
2467
|
-
return solidGrounds[color] ?? (/-(?:[7-9]00|950)$/.test(color) ? "deep" : null);
|
|
2468
|
-
}
|
|
2469
|
-
function sectionForegroundTone(resolved, palette) {
|
|
2470
|
-
const foreground = resolveSectionForeground(resolved, palette);
|
|
2471
|
-
return foreground.kind === "known" ? surfaceToneFromForegroundToken(palette, foreground.roles.text) : "unknown";
|
|
2472
|
-
}
|
|
2473
|
-
function sectionVeil(background) {
|
|
2474
|
-
switch (background.type) {
|
|
2475
|
-
case "color": return null;
|
|
2476
|
-
case "image":
|
|
2477
|
-
case "video": return background.overlay;
|
|
2478
|
-
case "gradient": return {
|
|
2479
|
-
type: "gradient",
|
|
2480
|
-
gradient: background.gradient,
|
|
2481
|
-
opacity: 1
|
|
2482
|
-
};
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
function sectionScrimSamples(background, palette) {
|
|
2486
|
-
const overlay = sectionVeil(background);
|
|
2487
|
-
if (overlay?.type === "gradient") return gradientScrimSamples(overlay.gradient ?? "", overlay.opacity ?? 1, palette);
|
|
2488
|
-
if (overlay?.type !== "color") return [];
|
|
2489
|
-
const hex = resolveConcreteColorHex(overlay.color ?? "", palette);
|
|
2490
|
-
return hex ? [{
|
|
2491
|
-
hex,
|
|
2492
|
-
alpha: overlay.opacity ?? 1
|
|
2493
|
-
}] : [];
|
|
2494
|
-
}
|
|
2495
|
-
//#endregion
|
|
2496
|
-
//#region ../theme-core/src/site-styles/sectionBoundaryComposition.ts
|
|
2497
|
-
const backgroundToken = requireThemeColorToken("background");
|
|
2498
|
-
/**
|
|
2499
|
-
* Classifies a section from its final render content. `_sectionStyles`
|
|
2500
|
-
* already holds the effective background (Look default, page-design override
|
|
2501
|
-
* and block-authored media merged by `resolveSectionBackground`), so this only
|
|
2502
|
-
* reads it and never re-decides precedence. A missing or unparseable
|
|
2503
|
-
* background is the page background, as it is for the renderer.
|
|
2504
|
-
*/
|
|
2505
|
-
function boundaryEndpointForSectionContent(content) {
|
|
2506
|
-
const background = parseCanonicalRuntimeBackground(content);
|
|
2507
|
-
if (background.kind === "none") return {
|
|
2508
|
-
kind: "paint",
|
|
2509
|
-
token: backgroundToken
|
|
2510
|
-
};
|
|
2511
|
-
const effective = background.background;
|
|
2512
|
-
switch (effective.type) {
|
|
2513
|
-
case "color": {
|
|
2514
|
-
if (effective.color === null || effective.color === void 0) return {
|
|
2515
|
-
kind: "paint",
|
|
2516
|
-
token: backgroundToken
|
|
2517
|
-
};
|
|
2518
|
-
const token = parseThemeColorToken(effective.color);
|
|
2519
|
-
return token ? {
|
|
2520
|
-
kind: "paint",
|
|
2521
|
-
token
|
|
2522
|
-
} : {
|
|
2523
|
-
kind: "unpainted",
|
|
2524
|
-
reason: "literal-color"
|
|
2525
|
-
};
|
|
2526
|
-
}
|
|
2527
|
-
case "gradient": return {
|
|
2528
|
-
kind: "unpainted",
|
|
2529
|
-
reason: "gradient"
|
|
2530
|
-
};
|
|
2531
|
-
case "image":
|
|
2532
|
-
case "video": return {
|
|
2533
|
-
kind: "unpainted",
|
|
2534
|
-
reason: "media"
|
|
2535
|
-
};
|
|
2536
|
-
default: return assertNever$2(effective, "Unhandled section background type");
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
/**
|
|
2540
|
-
* Reads both facts from final render content in one place. `_frameStyles` is
|
|
2541
|
-
* the compiled frame; content without one (no page design, an SDK block)
|
|
2542
|
-
* draws a plain frame.
|
|
2543
|
-
*/
|
|
2544
|
-
function sectionFactsForContent(content) {
|
|
2545
|
-
return {
|
|
2546
|
-
endpoint: boundaryEndpointForSectionContent(content),
|
|
2547
|
-
frame: frameKindForContent(content)
|
|
2548
|
-
};
|
|
2549
|
-
}
|
|
2550
|
-
function frameKindForContent(content) {
|
|
2551
|
-
const frameStyles = content._frameStyles;
|
|
2552
|
-
const kind = typeof frameStyles === "object" && frameStyles !== null && "kind" in frameStyles ? frameStyles.kind : null;
|
|
2553
|
-
return kind === "panel" || kind === "flush-panel" ? kind : "plain";
|
|
2554
|
-
}
|
|
2555
|
-
/**
|
|
2556
|
-
* The frame rule: a flush panel owns the edge it runs to, so no break is
|
|
2557
|
-
* drawn next to one. The single home for this rule; the generated
|
|
2558
|
-
* pipeline's budget and the site-style lab ask it with their plan frames.
|
|
2559
|
-
*/
|
|
2560
|
-
function frameNotShownReason(previous, next) {
|
|
2561
|
-
return previous === "flush-panel" || next === "flush-panel" ? "flush-panel" : null;
|
|
2562
|
-
}
|
|
2563
|
-
/**
|
|
2564
|
-
* Decides whether and how a join draws. The frame rule wins before paint is
|
|
2565
|
-
* considered; two unpainted sides show nothing.
|
|
2566
|
-
*/
|
|
2567
|
-
function composeBoundary(previous, next) {
|
|
2568
|
-
const frameReason = frameNotShownReason(previous.frame, next.frame);
|
|
2569
|
-
if (frameReason) return {
|
|
2570
|
-
kind: "not-shown",
|
|
2571
|
-
reason: frameReason
|
|
2572
|
-
};
|
|
2573
|
-
const from = previous.endpoint;
|
|
2574
|
-
const to = next.endpoint;
|
|
2575
|
-
if (from.kind === "paint") return {
|
|
2576
|
-
kind: "shown",
|
|
2577
|
-
composition: to.kind === "paint" ? {
|
|
2578
|
-
kind: "paint-to-paint",
|
|
2579
|
-
from: from.token,
|
|
2580
|
-
to: to.token
|
|
2581
|
-
} : {
|
|
2582
|
-
kind: "paint-to-unpainted",
|
|
2583
|
-
from: from.token
|
|
2584
|
-
}
|
|
2585
|
-
};
|
|
2586
|
-
return to.kind === "paint" ? {
|
|
2587
|
-
kind: "shown",
|
|
2588
|
-
composition: {
|
|
2589
|
-
kind: "unpainted-to-paint",
|
|
2590
|
-
to: to.token
|
|
2591
|
-
}
|
|
2592
|
-
} : {
|
|
2593
|
-
kind: "not-shown",
|
|
2594
|
-
reason: "both-unpainted"
|
|
2595
|
-
};
|
|
2596
|
-
}
|
|
2597
|
-
/**
|
|
2598
|
-
* Placement, reserves and paint for a shown boundary, derived from the
|
|
2599
|
-
* composition and the catalogue's metrics for the treatment.
|
|
2600
|
-
*/
|
|
2601
|
-
function boundaryLayout(intent, composition) {
|
|
2602
|
-
const metrics = boundaryRuntimeMetricsForDecorativeTransition(intent);
|
|
2603
|
-
switch (composition.kind) {
|
|
2604
|
-
case "paint-to-paint": return {
|
|
2605
|
-
placement: "centred",
|
|
2606
|
-
reserves: {
|
|
2607
|
-
before: metrics.reserveCss,
|
|
2608
|
-
after: metrics.reserveCss
|
|
2609
|
-
},
|
|
2610
|
-
paint: {
|
|
2611
|
-
band: composition.from,
|
|
2612
|
-
shape: composition.to
|
|
2613
|
-
}
|
|
2614
|
-
};
|
|
2615
|
-
case "unpainted-to-paint": return {
|
|
2616
|
-
placement: "previous",
|
|
2617
|
-
reserves: {
|
|
2618
|
-
before: metrics.heightCss,
|
|
2619
|
-
after: null
|
|
2620
|
-
},
|
|
2621
|
-
paint: {
|
|
2622
|
-
band: null,
|
|
2623
|
-
shape: composition.to
|
|
2624
|
-
}
|
|
2625
|
-
};
|
|
2626
|
-
case "paint-to-unpainted": return {
|
|
2627
|
-
placement: "next",
|
|
2628
|
-
reserves: {
|
|
2629
|
-
before: null,
|
|
2630
|
-
after: metrics.heightCss
|
|
2631
|
-
},
|
|
2632
|
-
paint: {
|
|
2633
|
-
band: null,
|
|
2634
|
-
shape: composition.from
|
|
2635
|
-
}
|
|
2636
|
-
};
|
|
2637
|
-
default: return assertNever$2(composition, "Unhandled boundary composition");
|
|
2638
|
-
}
|
|
2639
|
-
}
|
|
2640
|
-
function requireThemeColorToken(value) {
|
|
2641
|
-
const token = parseThemeColorToken(value);
|
|
2642
|
-
if (!token) throw new Error(`Expected a theme color token. Received: ${value}`);
|
|
2643
|
-
return token;
|
|
2644
|
-
}
|
|
2645
|
-
//#endregion
|
|
2646
|
-
//#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
2647
|
-
const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
2648
|
-
const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
2649
|
-
siteChromeBackgroundColorTokens.filter((token) => !quickSiteChromeBackgroundColorTokens.includes(token));
|
|
2650
|
-
function parseSiteChromeBackgroundColorToken(value) {
|
|
2651
|
-
const token = parseBackgroundAppearanceColorToken(value);
|
|
2652
|
-
return token ? token : null;
|
|
2653
|
-
}
|
|
2654
|
-
function toSiteChromeBackgroundColorTokens(tokenNames) {
|
|
2655
|
-
return tokenNames.flatMap((name) => {
|
|
2656
|
-
const token = parseSiteChromeBackgroundColorToken(name);
|
|
2657
|
-
return token ? [token] : [];
|
|
2658
|
-
});
|
|
2659
|
-
}
|
|
2660
|
-
const backgroundColorTokenSchema = z.unknown().transform((value, ctx) => {
|
|
2661
|
-
const token = parseSiteChromeBackgroundColorToken(value);
|
|
2662
|
-
if (token === null) {
|
|
2663
|
-
ctx.addIssue({
|
|
2664
|
-
code: "custom",
|
|
2665
|
-
message: "Unknown site chrome background colour token"
|
|
2666
|
-
});
|
|
2667
|
-
return z.NEVER;
|
|
2668
|
-
}
|
|
2669
|
-
return token;
|
|
2670
|
-
});
|
|
2671
|
-
const siteChromeBackgroundOverrideSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("default") }).strict(), z.object({
|
|
2672
|
-
kind: z.literal("color"),
|
|
2673
|
-
token: backgroundColorTokenSchema
|
|
2674
|
-
}).strict()]);
|
|
2675
|
-
z.object({
|
|
2676
|
-
background: siteChromeBackgroundOverrideSchema,
|
|
2677
|
-
navigationLayout: z.enum(["inline-wrap", "stack"])
|
|
2678
|
-
}).strict();
|
|
2679
|
-
z.object({ background: siteChromeBackgroundOverrideSchema }).strict();
|
|
2680
|
-
//#endregion
|
|
2681
|
-
//#region ../theme-core/src/site-styles/compilationPlan.ts
|
|
2682
|
-
const defaultHeaderBrandPreferences = {
|
|
2683
|
-
brandDisplay: "auto",
|
|
2684
|
-
logoSize: "auto"
|
|
2685
|
-
};
|
|
2686
|
-
//#endregion
|
|
2687
|
-
//#region ../theme-core/src/site-styles/effectiveArrangement.ts
|
|
2688
|
-
/** Content stage: legacy Looks leave arrangement to stored intent and defaults. */
|
|
2689
|
-
function resolveEffectiveArrangement(input) {
|
|
2690
|
-
const arrangement = input.look?.structure.byMode[input.mode ?? "default"];
|
|
2691
|
-
if (arrangement !== void 0 && input.manifest.keys.includes(arrangement)) return {
|
|
2692
|
-
kind: "resolved",
|
|
2693
|
-
key: asLayoutVariantKey(arrangement),
|
|
2694
|
-
source: "look"
|
|
2695
|
-
};
|
|
2696
|
-
const stored = validStoredVariant(input.manifest, input.storedVariant);
|
|
2697
|
-
const policyKey = input.policy ? normalizeLayoutVariantForPolicy(input.policy, stored) : stored;
|
|
2698
|
-
if (policyKey && policyKey !== stored) return {
|
|
2699
|
-
kind: "resolved",
|
|
2700
|
-
key: policyKey,
|
|
2701
|
-
source: "policy"
|
|
2702
|
-
};
|
|
2703
|
-
if (stored) return {
|
|
2704
|
-
kind: "resolved",
|
|
2705
|
-
key: stored,
|
|
2706
|
-
source: "stored"
|
|
2707
|
-
};
|
|
2708
|
-
const key = manifestDefaultArrangement(input.manifest);
|
|
2709
|
-
return key === null ? {
|
|
2710
|
-
kind: "none",
|
|
2711
|
-
key: null
|
|
2712
|
-
} : {
|
|
2713
|
-
kind: "resolved",
|
|
2714
|
-
key,
|
|
2715
|
-
source: "manifest-default"
|
|
2716
|
-
};
|
|
2717
|
-
}
|
|
2718
|
-
function validStoredVariant(manifest, stored) {
|
|
2719
|
-
if (stored.kind === "absent") return null;
|
|
2720
|
-
return manifest.keys.includes(stored.key) && !manifest.lookOnlyKeys?.includes(stored.key) ? stored.key : null;
|
|
2721
|
-
}
|
|
2722
|
-
function arrangementManifestFromVariants(manifest) {
|
|
2723
|
-
return {
|
|
2724
|
-
keys: Object.keys(manifest.variants ?? {}),
|
|
2725
|
-
defaultKey: manifest.defaultVariant ?? null,
|
|
2726
|
-
lookOnlyKeys: manifest.variantMeaning?.lookOnlyKeys
|
|
2727
|
-
};
|
|
2728
|
-
}
|
|
2729
|
-
/** A Look-only arrangement is never a default: a block whose only variants are Look-only keeps its plain layout. */
|
|
2730
|
-
function manifestDefaultArrangement(manifest) {
|
|
2731
|
-
const defaults = manifest.keys.filter((key) => !manifest.lookOnlyKeys?.includes(key));
|
|
2732
|
-
const key = manifest.defaultKey !== null && defaults.includes(manifest.defaultKey) ? manifest.defaultKey : defaults[0];
|
|
2733
|
-
return key === void 0 ? null : asLayoutVariantKey(key);
|
|
2734
|
-
}
|
|
2735
|
-
/** A declared secondary axis shares the arrangement rule, without rewriting content. */
|
|
2736
|
-
function resolveModeArrangement(input) {
|
|
2737
|
-
const key = [input.content[input.declaration.arrangementField], input.content.layout].find((value) => typeof value === "string" && input.declaration.keys.includes(value));
|
|
2738
|
-
return resolveEffectiveArrangement({
|
|
2739
|
-
look: input.look,
|
|
2740
|
-
mode: input.mode,
|
|
2741
|
-
storedVariant: key === void 0 ? { kind: "absent" } : {
|
|
2742
|
-
kind: "explicit",
|
|
2743
|
-
key: asLayoutVariantKey(key)
|
|
2744
|
-
},
|
|
2745
|
-
manifest: {
|
|
2746
|
-
keys: [...input.declaration.keys, ...input.declaration.lookOnlyKeys ?? []],
|
|
2747
|
-
defaultKey: input.declaration.defaultKey,
|
|
2748
|
-
lookOnlyKeys: input.declaration.lookOnlyKeys
|
|
2749
|
-
}
|
|
2750
|
-
});
|
|
2751
|
-
}
|
|
2752
|
-
/** Mode is content-owned and independent of the selected Look. */
|
|
2753
|
-
function readStoredMode(manifest, content) {
|
|
2754
|
-
if (manifest.variantMeaning.kind !== "mode") return null;
|
|
2755
|
-
const stored = content.variant;
|
|
2756
|
-
return typeof stored === "string" && manifest.keys.includes(stored) ? stored : manifestDefaultArrangement(manifest);
|
|
2757
|
-
}
|
|
2758
|
-
function resolvePublishedLook(input, visited = /* @__PURE__ */ new Set()) {
|
|
2759
|
-
if (input.audience === "authoring" || visited.has(input.look.id)) return input.look;
|
|
2760
|
-
const fallback = input.look.structure.whenMissing.find((rule) => !input.contentFacts[rule.fact]);
|
|
2761
|
-
const next = input.catalogue.find((entry) => entry.id === fallback?.look && entry.blockKinds.some((kind) => input.look.blockKinds.includes(kind)));
|
|
2762
|
-
return next === void 0 ? input.look : resolvePublishedLook({
|
|
2763
|
-
...input,
|
|
2764
|
-
look: next
|
|
2765
|
-
}, /* @__PURE__ */ new Set([...visited, input.look.id]));
|
|
2766
|
-
}
|
|
2767
|
-
//#endregion
|
|
2768
|
-
//#region ../theme-core/src/site-styles/resolver.ts
|
|
2769
|
-
const blockDesignFallback = {
|
|
2770
|
-
sectionSurface: "base",
|
|
2771
|
-
contentFrame: plainFrame,
|
|
2772
|
-
sectionHeight: "default",
|
|
2773
|
-
heroLegibility: "none",
|
|
2774
|
-
imageSurfaceTreatment: { kind: "none" },
|
|
2775
|
-
imageSurfaceMotion: "static",
|
|
2776
|
-
tileTreatment: "default",
|
|
2777
|
-
eventListTreatment: "plain",
|
|
2778
|
-
eyebrowTreatment: "plain",
|
|
2779
|
-
accordionIconTreatment: null,
|
|
2780
|
-
composition: null
|
|
2781
|
-
};
|
|
2782
|
-
blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
|
|
2783
|
-
//#endregion
|
|
2784
|
-
//#region ../theme-core/src/site-styles/headerBrandPresentation.ts
|
|
2785
|
-
/**
|
|
2786
|
-
* Whether the header wears a brand presentation at all (#1318 Phase 4c).
|
|
2787
|
-
*
|
|
2788
|
-
* `applyHeaderBrandPresentation` is unconditional today: given a logo context
|
|
2789
|
-
* it always writes a `logo` object carrying a resolved display, size and
|
|
2790
|
-
* accommodation. That makes "this header has no brand presentation block" —
|
|
2791
|
-
* which is what several live sites persist, including one whose site *does*
|
|
2792
|
-
* have a logo asset — a state the preference record could not express, so a
|
|
2793
|
-
* recompile would silently give the site a logo treatment it has never
|
|
2794
|
-
* rendered.
|
|
2795
|
-
*
|
|
2796
|
-
* This is the third field in this phase with that shape, after the interaction
|
|
2797
|
-
* palette and the nav text size: the persisted bytes carry intent the reader
|
|
2798
|
-
* cannot say, so the recompile "corrects" it. The fix is the same one — widen
|
|
2799
|
-
* the closed vocabulary with a named member and derive it by baseline
|
|
2800
|
-
* comparison — and it is a *widening*, not a restyle: `'recommended'` is the
|
|
2801
|
-
* default and reproduces today's behaviour exactly, so no row whose bytes carry
|
|
2802
|
-
* a presentation compiles differently for `'plain'` existing.
|
|
2803
|
-
*
|
|
2804
|
-
* `'plain'` is deliberately not "preserve whatever bytes are there". It is a
|
|
2805
|
-
* constructive instruction — *write no presentation block* — so Phase 4e's
|
|
2806
|
-
* compiler, which builds the header from nothing, can produce it.
|
|
2807
|
-
*/
|
|
2808
|
-
const headerBrandPresentationValues = ["recommended", "plain"];
|
|
2809
|
-
defaultHeaderBrandPreferences.brandDisplay, defaultHeaderBrandPreferences.logoSize, defaultHeaderNavPreferences.typography, defaultHeaderNavPreferences.fontSize, defaultHeaderNavPreferences.interactionPalette;
|
|
2810
|
-
//#endregion
|
|
2811
|
-
//#region ../theme-core/src/site-styles/generatedSchemas.ts
|
|
2812
|
-
function uniqueNonEmpty(values) {
|
|
2813
|
-
const uniqueValues = [...new Set(values)];
|
|
2814
|
-
const firstValue = uniqueValues[0];
|
|
2815
|
-
if (!firstValue) throw new Error("Expected at least one generated schema option.");
|
|
2816
|
-
return [firstValue, ...uniqueValues.slice(1)];
|
|
2817
|
-
}
|
|
2818
|
-
const generatedPanelTreatments = uniqueNonEmpty(generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment));
|
|
2819
|
-
const generatedFlushTreatments = uniqueNonEmpty(generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment));
|
|
2820
|
-
const generatedFlushBleeds = uniqueNonEmpty(generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed));
|
|
2821
|
-
const generatedPanelFrameSchema = z.object({
|
|
2822
|
-
kind: z.literal("panel"),
|
|
2823
|
-
treatment: z.enum(generatedPanelTreatments)
|
|
2824
|
-
}).strict();
|
|
2825
|
-
const generatedFlushPanelFrameSchema = z.object({
|
|
2826
|
-
kind: z.literal("flush-panel"),
|
|
2827
|
-
treatment: z.enum(generatedFlushTreatments),
|
|
2828
|
-
bleed: z.enum(generatedFlushBleeds)
|
|
2829
|
-
}).strict();
|
|
2830
|
-
const generatedContentFrameIntentSchema = z.discriminatedUnion("kind", [
|
|
2831
|
-
z.object({ kind: z.literal("plain") }).strict(),
|
|
2832
|
-
generatedPanelFrameSchema,
|
|
2833
|
-
generatedFlushPanelFrameSchema
|
|
2834
|
-
]);
|
|
2835
|
-
const generatedSiteStyleIdSchema = z.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
|
|
2836
|
-
function generatedChoiceSchema(valueSchema) {
|
|
2837
|
-
return z.discriminatedUnion("kind", [z.object({
|
|
2838
|
-
source: z.literal("generated"),
|
|
2839
|
-
kind: z.literal("auto")
|
|
2840
|
-
}).strict(), z.object({
|
|
2841
|
-
source: z.literal("generated"),
|
|
2842
|
-
kind: z.literal("explicit"),
|
|
2843
|
-
value: valueSchema
|
|
2844
|
-
}).strict()]);
|
|
2845
|
-
}
|
|
2846
|
-
const generatedBlockDesignIntentSchema = z.object({
|
|
2847
|
-
sectionSurface: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.sectionSurfaces)),
|
|
2848
|
-
contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
|
|
2849
|
-
cardRole: generatedChoiceSchema(cardRoleWithLegacyAliasSchema),
|
|
2850
|
-
transitionAfter: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.transitions)),
|
|
2851
|
-
emphasis: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.emphases))
|
|
2852
|
-
}).strict();
|
|
2853
|
-
const generatedMediaCompositionIntentSchema = z.enum([
|
|
2854
|
-
"none",
|
|
2855
|
-
"supporting",
|
|
2856
|
-
"dominant"
|
|
2857
|
-
]);
|
|
2858
|
-
const generatedDecorativeCompositionIntentSchema = z.enum(["none", "supporting"]);
|
|
2859
|
-
const generatedHeroLegibilityStrategySchema = z.enum(["none", "scrim-gradient"]);
|
|
2860
|
-
const generatedBlockMediaIntentSchema = z.object({
|
|
2861
|
-
media: generatedMediaCompositionIntentSchema,
|
|
2862
|
-
decorative: generatedDecorativeCompositionIntentSchema,
|
|
2863
|
-
heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
|
|
2864
|
-
}).strict();
|
|
2865
|
-
const generatedBoundaryIntentSchema = z.object({ transitionAfter: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.transitions)) }).strict();
|
|
2866
|
-
const generatedPageDesignBlockIntentSchema = z.object({
|
|
2867
|
-
blockId: z.string().min(1),
|
|
2868
|
-
blockKind: z.string().min(1),
|
|
2869
|
-
purpose: z.string().min(1),
|
|
2870
|
-
design: generatedBlockDesignIntentSchema,
|
|
2871
|
-
mediaIntent: generatedBlockMediaIntentSchema,
|
|
2872
|
-
boundaryIntent: generatedBoundaryIntentSchema
|
|
2873
|
-
}).strict();
|
|
2874
|
-
z.object({
|
|
2875
|
-
siteStyleId: generatedSiteStyleIdSchema,
|
|
2876
|
-
blocks: z.array(generatedPageDesignBlockIntentSchema)
|
|
2877
|
-
}).strict();
|
|
2878
|
-
//#endregion
|
|
2879
|
-
//#region ../theme-core/src/site-styles/headerPreferencesPersistence.ts
|
|
2880
|
-
const logoTextIntentSchema = z.object({
|
|
2881
|
-
mobileMaxWidth: z.enum([
|
|
2882
|
-
"xs",
|
|
2883
|
-
"sm",
|
|
2884
|
-
"md"
|
|
2885
|
-
]).optional(),
|
|
2886
|
-
mobileWrapLines: z.union([z.literal(1), z.literal(2)]).optional(),
|
|
2887
|
-
hideOnShrink: z.boolean().optional()
|
|
2888
|
-
}).strict();
|
|
2889
|
-
const structureSchema = z.object({
|
|
2890
|
-
positioning: z.union([z.literal("inherit"), z.enum(headerPositioningValues)]),
|
|
2891
|
-
shrinkOnScroll: z.union([z.literal("inherit"), z.boolean()]),
|
|
2892
|
-
logoText: z.union([
|
|
2893
|
-
z.literal("inherit"),
|
|
2894
|
-
z.literal("none"),
|
|
2895
|
-
logoTextIntentSchema
|
|
2896
|
-
])
|
|
2897
|
-
}).strict();
|
|
2898
|
-
const headerPreferencesShape = {
|
|
2899
|
-
brandPresentation: z.enum(headerBrandPresentationValues),
|
|
2900
|
-
brandDisplay: z.enum(brandDisplayModeValues),
|
|
2901
|
-
logoSize: z.enum(logoSizePolicyValues),
|
|
2902
|
-
navFontRole: z.enum(headerNavTypographyPreferenceValues),
|
|
2903
|
-
navTextSize: z.enum(headerNavFontSizePreferenceValues),
|
|
2904
|
-
interactionPalette: z.union([z.literal("recommended"), z.enum(headerInteractionPaletteValues)]),
|
|
2905
|
-
background: siteChromeBackgroundOverrideSchema,
|
|
2906
|
-
structure: structureSchema
|
|
2907
|
-
};
|
|
2908
|
-
z.object(headerPreferencesShape).strict();
|
|
2909
|
-
z.object(headerPreferencesShape).omit({
|
|
2910
|
-
brandPresentation: true,
|
|
2911
|
-
structure: true
|
|
2912
|
-
}).strict();
|
|
2913
|
-
//#endregion
|
|
2914
|
-
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
2915
|
-
const nonEmptyStringSchema = z.string().min(1);
|
|
2916
|
-
const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
2917
|
-
const designBlockIdSchema = nonEmptyStringSchema.transform(asDesignBlockId);
|
|
2918
|
-
const designPageIdSchema = nonEmptyStringSchema.transform(asDesignPageId);
|
|
2919
|
-
const designEntryIdSchema = nonEmptyStringSchema.transform(asDesignEntryId);
|
|
2920
|
-
const blockOrderIndexSchema = z.number().int().nonnegative().transform(asBlockOrderIndex);
|
|
2921
|
-
const publishedPageBlockSnapshotSchema = z.object({
|
|
2922
|
-
kind: z.literal("published-block-content"),
|
|
2923
|
-
blockId: designBlockIdSchema,
|
|
2924
|
-
contentVersionId: blockContentVersionIdSchema,
|
|
2925
|
-
identifier: z.string().nullable(),
|
|
2926
|
-
blockKind: nonEmptyStringSchema,
|
|
2927
|
-
orderIndex: blockOrderIndexSchema
|
|
2928
|
-
}).strict();
|
|
2929
|
-
const draftPageBlockSnapshotSchema = z.object({
|
|
2930
|
-
kind: z.literal("draft-block-content"),
|
|
2931
|
-
blockId: designBlockIdSchema,
|
|
2932
|
-
contentVersionId: blockContentVersionIdSchema.nullable(),
|
|
2933
|
-
identifier: z.string().nullable(),
|
|
2934
|
-
blockKind: nonEmptyStringSchema,
|
|
2935
|
-
orderIndex: blockOrderIndexSchema
|
|
2936
|
-
}).strict();
|
|
2937
|
-
const missingPageBlockSnapshotSchema = z.object({
|
|
2938
|
-
kind: z.literal("missing-block-content"),
|
|
2939
|
-
blockId: designBlockIdSchema,
|
|
2940
|
-
identifier: z.string().nullable(),
|
|
2941
|
-
blockKind: nonEmptyStringSchema,
|
|
2942
|
-
orderIndex: blockOrderIndexSchema,
|
|
2943
|
-
reason: z.enum([
|
|
2944
|
-
"new-block",
|
|
2945
|
-
"deleted-content-version",
|
|
2946
|
-
"unpublished-block"
|
|
2947
|
-
])
|
|
2948
|
-
}).strict();
|
|
2949
|
-
const pageBlockSnapshotSchema = z.discriminatedUnion("kind", [
|
|
2950
|
-
publishedPageBlockSnapshotSchema,
|
|
2951
|
-
draftPageBlockSnapshotSchema,
|
|
2952
|
-
missingPageBlockSnapshotSchema
|
|
2953
|
-
]);
|
|
2954
|
-
const publishedPageBlockSequenceSchema = z.array(publishedPageBlockSnapshotSchema).superRefine(validateBlockSequence);
|
|
2955
|
-
const draftPageBlockSequenceSchema = z.array(pageBlockSnapshotSchema).superRefine(validateBlockSequence);
|
|
2956
|
-
const publishedPageDesignVersionDataV1Schema = z.object({
|
|
2957
|
-
schemaVersion: z.literal(1),
|
|
2958
|
-
stage: z.literal("published"),
|
|
2959
|
-
pageId: designPageIdSchema,
|
|
2960
|
-
blockSequence: publishedPageBlockSequenceSchema
|
|
2961
|
-
}).strict();
|
|
2962
|
-
const draftPageDesignVersionDataV1Schema = z.object({
|
|
2963
|
-
schemaVersion: z.literal(1),
|
|
2964
|
-
stage: z.literal("draft"),
|
|
2965
|
-
pageId: designPageIdSchema,
|
|
2966
|
-
blockSequence: draftPageBlockSequenceSchema
|
|
2967
|
-
}).strict();
|
|
2968
|
-
z.discriminatedUnion("stage", [publishedPageDesignVersionDataV1Schema, draftPageDesignVersionDataV1Schema]);
|
|
2969
|
-
z.discriminatedUnion("kind", [
|
|
2970
|
-
z.object({
|
|
2971
|
-
kind: z.literal("block"),
|
|
2972
|
-
blockId: designBlockIdSchema
|
|
2973
|
-
}).strict(),
|
|
2974
|
-
z.object({
|
|
2975
|
-
kind: z.literal("entry"),
|
|
2976
|
-
entryId: designEntryIdSchema
|
|
2977
|
-
}).strict(),
|
|
2978
|
-
z.object({
|
|
2979
|
-
kind: z.literal("page"),
|
|
2980
|
-
pageId: designPageIdSchema
|
|
2981
|
-
}).strict()
|
|
2982
|
-
]);
|
|
2983
|
-
function validateBlockSequence(snapshots, ctx) {
|
|
2984
|
-
for (const issue of collectBlockSequenceIssues(snapshots)) ctx.addIssue(issue);
|
|
2985
|
-
}
|
|
2986
|
-
function collectBlockSequenceIssues(snapshots) {
|
|
2987
|
-
const issues = [];
|
|
2988
|
-
const seenBlockIds = /* @__PURE__ */ new Set();
|
|
2989
|
-
const seenOrderIndexes = /* @__PURE__ */ new Set();
|
|
2990
|
-
let previousOrderIndex = null;
|
|
2991
|
-
snapshots.forEach((snapshot, index) => {
|
|
2992
|
-
if (seenBlockIds.has(snapshot.blockId)) issues.push({
|
|
2993
|
-
code: z.ZodIssueCode.custom,
|
|
2994
|
-
message: `Duplicate blockId in page design blockSequence: ${snapshot.blockId}`,
|
|
2995
|
-
path: [index, "blockId"]
|
|
2996
|
-
});
|
|
2997
|
-
seenBlockIds.add(snapshot.blockId);
|
|
2998
|
-
const orderIndex = snapshot.orderIndex;
|
|
2999
|
-
if (seenOrderIndexes.has(orderIndex)) issues.push({
|
|
3000
|
-
code: z.ZodIssueCode.custom,
|
|
3001
|
-
message: `Duplicate orderIndex in page design blockSequence: ${String(orderIndex)}`,
|
|
3002
|
-
path: [index, "orderIndex"]
|
|
3003
|
-
});
|
|
3004
|
-
seenOrderIndexes.add(orderIndex);
|
|
3005
|
-
if (previousOrderIndex !== null && orderIndex <= previousOrderIndex) issues.push({
|
|
3006
|
-
code: z.ZodIssueCode.custom,
|
|
3007
|
-
message: `Expected orderIndex greater than ${String(previousOrderIndex)} for blockSequence position ${String(index)}; received ${String(orderIndex)}.`,
|
|
3008
|
-
path: [index, "orderIndex"]
|
|
3009
|
-
});
|
|
3010
|
-
previousOrderIndex = orderIndex;
|
|
3011
|
-
});
|
|
3012
|
-
return issues;
|
|
3013
|
-
}
|
|
3014
|
-
//#endregion
|
|
3015
|
-
//#region ../theme-core/src/site-styles/tokenRecipes.ts
|
|
3016
|
-
const themeTokenRecipeOptions = {
|
|
3017
|
-
palette: [
|
|
3018
|
-
"brand-led",
|
|
3019
|
-
"warm-neutral",
|
|
3020
|
-
"high-contrast",
|
|
3021
|
-
"soft-natural"
|
|
3022
|
-
],
|
|
3023
|
-
contrast: [
|
|
3024
|
-
"standard",
|
|
3025
|
-
"strong",
|
|
3026
|
-
"maximum"
|
|
3027
|
-
],
|
|
3028
|
-
radius: [
|
|
3029
|
-
"square",
|
|
3030
|
-
"soft",
|
|
3031
|
-
"rounded",
|
|
3032
|
-
"pill"
|
|
3033
|
-
],
|
|
3034
|
-
shadow: [
|
|
3035
|
-
"none",
|
|
3036
|
-
"subtle",
|
|
3037
|
-
"layered"
|
|
3038
|
-
],
|
|
3039
|
-
typography: [
|
|
3040
|
-
"serif-editorial",
|
|
3041
|
-
"clean-sans",
|
|
3042
|
-
"classic-serif",
|
|
3043
|
-
"friendly-sans"
|
|
3044
|
-
],
|
|
3045
|
-
spacing: [
|
|
3046
|
-
"compact",
|
|
3047
|
-
"regular",
|
|
3048
|
-
"airy"
|
|
3049
|
-
],
|
|
3050
|
-
motion: [
|
|
3051
|
-
"none",
|
|
3052
|
-
"subtle",
|
|
3053
|
-
"expressive"
|
|
3054
|
-
]
|
|
3055
|
-
};
|
|
3056
|
-
z.object({
|
|
3057
|
-
palette: z.enum(themeTokenRecipeOptions.palette),
|
|
3058
|
-
contrast: z.enum(themeTokenRecipeOptions.contrast),
|
|
3059
|
-
radius: z.enum(themeTokenRecipeOptions.radius),
|
|
3060
|
-
shadow: z.enum(themeTokenRecipeOptions.shadow),
|
|
3061
|
-
typography: z.enum(themeTokenRecipeOptions.typography),
|
|
3062
|
-
spacing: z.enum(themeTokenRecipeOptions.spacing),
|
|
3063
|
-
motion: z.enum(themeTokenRecipeOptions.motion)
|
|
3064
|
-
});
|
|
3065
|
-
z.number().int().nonnegative().brand();
|
|
3066
|
-
z.discriminatedUnion("kind", [
|
|
3067
|
-
z.object({
|
|
3068
|
-
kind: z.literal("legacy"),
|
|
3069
|
-
pauseAnnouncedAt: z.string().datetime({ offset: true }).optional()
|
|
3070
|
-
}).strict(),
|
|
3071
|
-
z.object({
|
|
3072
|
-
kind: z.literal("paused"),
|
|
3073
|
-
authority: z.enum(["legacy", "document"]),
|
|
3074
|
-
checkpointId: z.string().uuid(),
|
|
3075
|
-
pausedAt: z.string().datetime({ offset: true })
|
|
3076
|
-
}).strict(),
|
|
3077
|
-
z.object({
|
|
3078
|
-
kind: z.literal("document"),
|
|
3079
|
-
checkpointId: z.string().uuid(),
|
|
3080
|
-
activatedAt: z.string().datetime({ offset: true })
|
|
3081
|
-
}).strict()
|
|
3082
|
-
]);
|
|
3083
|
-
//#endregion
|
|
3084
|
-
//#region ../theme-core/src/site-styles/pageDesignVersionIntent.ts
|
|
3085
|
-
function taggedStyledIntent(intent) {
|
|
3086
|
-
const { siteStyleId, ...decisions } = intent;
|
|
3087
|
-
return {
|
|
3088
|
-
kind: "legacy-styled",
|
|
3089
|
-
siteStyleId,
|
|
3090
|
-
decisions
|
|
3091
|
-
};
|
|
3092
|
-
}
|
|
3093
|
-
z.union([
|
|
3094
|
-
z.nullish(z.never()).transform(() => ({ kind: "automatic" })),
|
|
3095
|
-
pageDesignDecisionsV2Schema.transform((decisions) => ({
|
|
3096
|
-
kind: "decisions",
|
|
3097
|
-
decisions
|
|
3098
|
-
})),
|
|
3099
|
-
pageDesignIntentV2Schema.transform(taggedStyledIntent),
|
|
3100
|
-
pageDesignIntentV1Schema.transform((intent) => taggedStyledIntent(normalizeLegacyPageDesignIntent(intent)))
|
|
3101
|
-
], { error: (issue) => {
|
|
3102
|
-
const value = issue.input;
|
|
3103
|
-
return typeof value === "object" && value !== null && "schemaVersion" in value && value.schemaVersion !== 1 && value.schemaVersion !== 2 ? "Unsupported Theme V2 page design intent schemaVersion." : "Invalid Theme V2 page design intent shape.";
|
|
3104
|
-
} });
|
|
3105
|
-
//#endregion
|
|
3106
2461
|
//#region ../blocks/src/system/manifest/augmentManifest.ts
|
|
3107
2462
|
/**
|
|
3108
2463
|
* Augments a block manifest with synthetic fields and other transformations.
|
|
@@ -3132,11 +2487,12 @@ function createVariantField(manifest) {
|
|
|
3132
2487
|
if (!manifest.variants || Object.keys(manifest.variants).length <= 1) return null;
|
|
3133
2488
|
if (manifest.fields?.some((f) => f.id === "variant")) return null;
|
|
3134
2489
|
const variantKeys = Object.keys(manifest.variants).filter((key) => !manifest.variantMeaning.lookOnlyKeys?.includes(key));
|
|
2490
|
+
if (variantKeys.length === 0) return null;
|
|
3135
2491
|
return {
|
|
3136
2492
|
id: "variant",
|
|
3137
2493
|
type: "select",
|
|
3138
|
-
label: "Variant",
|
|
3139
|
-
description: "Choose how this block is laid out.",
|
|
2494
|
+
label: manifest.variantMeaning.kind === "arrangement" ? "Layout" : "Variant",
|
|
2495
|
+
...manifest.variantMeaning.kind === "arrangement" ? {} : { description: "Choose how this block is laid out." },
|
|
3140
2496
|
ui: { intent: "display" },
|
|
3141
2497
|
required: false,
|
|
3142
2498
|
defaultValue: manifest.defaultVariant ?? variantKeys[0],
|
|
@@ -3996,7 +3352,7 @@ const uiSchema = z.object({
|
|
|
3996
3352
|
"behavior",
|
|
3997
3353
|
"style"
|
|
3998
3354
|
]).optional(),
|
|
3999
|
-
valueContract: z.enum(["boxBackground"]).optional()
|
|
3355
|
+
valueContract: z.enum(["boxBackground", "location"]).optional()
|
|
4000
3356
|
}).partial().superRefine((ui, ctx) => {
|
|
4001
3357
|
if (ui.layoutGridColumns !== void 0 && ui.layoutGridColumnsFields !== void 0) ctx.addIssue({
|
|
4002
3358
|
code: "custom",
|
|
@@ -4471,11 +3827,15 @@ z.object({
|
|
|
4471
3827
|
}).optional()
|
|
4472
3828
|
}).optional(),
|
|
4473
3829
|
promotedFields: z.array(z.string().min(1)).optional(),
|
|
3830
|
+
/** Legacy presentation fields owned by arrangement Looks, including nested schema paths. */
|
|
3831
|
+
arrangementOwnedFieldIds: z.array(z.string().min(1)).readonly().optional(),
|
|
4474
3832
|
variantMeaning: z.discriminatedUnion("kind", [z.object({
|
|
4475
3833
|
kind: z.literal("arrangement"),
|
|
4476
3834
|
lookOnlyKeys: z.array(z.string().min(1)).readonly().optional()
|
|
4477
3835
|
}), z.object({
|
|
4478
3836
|
kind: z.literal("mode"),
|
|
3837
|
+
modes: z.array(z.enum(arrangementModes)).min(1).readonly(),
|
|
3838
|
+
defaultMode: z.enum(arrangementModes),
|
|
4479
3839
|
arrangementField: z.string().min(1),
|
|
4480
3840
|
keys: z.array(z.string().min(1)).min(1).readonly(),
|
|
4481
3841
|
defaultKey: z.string().min(1),
|
|
@@ -7831,6 +7191,20 @@ function resolveFooterRootForeground(footer, palette, proseHoverCandidate) {
|
|
|
7831
7191
|
}, palette, footerForegroundCandidates(footer, proseHoverCandidate), { compositeBase: "background" });
|
|
7832
7192
|
}
|
|
7833
7193
|
function resolveSurfaceForegroundStyles(value, context, options) {
|
|
7194
|
+
const resolved = cachedSectionSurface(value, context, options);
|
|
7195
|
+
const foreground = resolved.foreground;
|
|
7196
|
+
if (foreground.kind === "unknown") return { ...resolved.buttonStyles };
|
|
7197
|
+
return {
|
|
7198
|
+
...arrangementSurfaceInk(foreground, context),
|
|
7199
|
+
...resolved.buttonStyles,
|
|
7200
|
+
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
7201
|
+
};
|
|
7202
|
+
}
|
|
7203
|
+
/** The section ground's resolved foreground, for decorations drawn on that ground (maps). */
|
|
7204
|
+
function resolveSectionSurfaceForeground(value, context, options) {
|
|
7205
|
+
return cachedSectionSurface(value, context, options).foreground;
|
|
7206
|
+
}
|
|
7207
|
+
function cachedSectionSurface(value, context, options) {
|
|
7834
7208
|
const key = JSON.stringify([
|
|
7835
7209
|
value,
|
|
7836
7210
|
context.proseHoverCandidate,
|
|
@@ -7841,13 +7215,7 @@ function resolveSurfaceForegroundStyles(value, context, options) {
|
|
|
7841
7215
|
if (!sectionSurfaceCache.has(context.theme)) sectionSurfaceCache.set(context.theme, cache);
|
|
7842
7216
|
const resolved = cache.get(key) ?? resolveRuntimeSectionSurface(value, context, options);
|
|
7843
7217
|
cache.set(key, resolved);
|
|
7844
|
-
|
|
7845
|
-
if (foreground.kind === "unknown") return { ...resolved.buttonStyles };
|
|
7846
|
-
return {
|
|
7847
|
-
...arrangementSurfaceInk(foreground, context),
|
|
7848
|
-
...resolved.buttonStyles,
|
|
7849
|
-
...surfaceForegroundStyle(surfaceForegroundInputFromResolved(foreground, (token) => resolveBackgroundColorValue(token, context)))
|
|
7850
|
-
};
|
|
7218
|
+
return resolved;
|
|
7851
7219
|
}
|
|
7852
7220
|
/** Cache only the owner's result; no foreground or button rules live here. */
|
|
7853
7221
|
function resolveRuntimeSectionSurface(value, context, options) {
|
|
@@ -9110,7 +8478,7 @@ const heroCopyFragment = defineFragment({
|
|
|
9110
8478
|
{
|
|
9111
8479
|
id: "eyebrow",
|
|
9112
8480
|
type: "text",
|
|
9113
|
-
label: "
|
|
8481
|
+
label: "Small heading above the title",
|
|
9114
8482
|
description: "Optional short line above the headline",
|
|
9115
8483
|
visibleRoles: ["designer", "admin"]
|
|
9116
8484
|
},
|
|
@@ -9307,7 +8675,7 @@ function createButtonGroup(options = {}) {
|
|
|
9307
8675
|
//#endregion
|
|
9308
8676
|
//#region ../blocks/src/system/fields/ctas.ts
|
|
9309
8677
|
function createCtasRepeater(options = {}) {
|
|
9310
|
-
const { id = "ctas", label = "
|
|
8678
|
+
const { id = "ctas", label = "Buttons", itemLabel = "Button", minItems = 0, maxItems, button, defaultValue } = options;
|
|
9311
8679
|
const fieldId = id;
|
|
9312
8680
|
const buttonField = createButtonGroup({
|
|
9313
8681
|
showGroupLabel: false,
|
|
@@ -9336,8 +8704,8 @@ const ctaRowFragment = defineFragment({
|
|
|
9336
8704
|
title: "CTA Row",
|
|
9337
8705
|
description: "Repeatable calls to action rendered inline.",
|
|
9338
8706
|
fields: [createCtasRepeater({
|
|
9339
|
-
label: "
|
|
9340
|
-
itemLabel: "
|
|
8707
|
+
label: "Buttons",
|
|
8708
|
+
itemLabel: "Button",
|
|
9341
8709
|
maxItems: 3
|
|
9342
8710
|
})],
|
|
9343
8711
|
layout: [ctaRow({
|
|
@@ -9350,8 +8718,8 @@ const ctaRowFragment = defineFragment({
|
|
|
9350
8718
|
//#endregion
|
|
9351
8719
|
//#region ../blocks/src/system/fragments/library/heroCtaRow.ts
|
|
9352
8720
|
const heroCtaFields = [createCtasRepeater({
|
|
9353
|
-
label: "
|
|
9354
|
-
itemLabel: "
|
|
8721
|
+
label: "Buttons",
|
|
8722
|
+
itemLabel: "Button",
|
|
9355
8723
|
maxItems: 3,
|
|
9356
8724
|
defaultValue: [],
|
|
9357
8725
|
button: {
|
|
@@ -9417,7 +8785,7 @@ const ctaCopyFragment = defineFragment({
|
|
|
9417
8785
|
{
|
|
9418
8786
|
id: "eyebrow",
|
|
9419
8787
|
type: "text",
|
|
9420
|
-
label: "
|
|
8788
|
+
label: "Small heading above the title",
|
|
9421
8789
|
description: "Optional short line above the title",
|
|
9422
8790
|
visibleRoles: ["designer", "admin"]
|
|
9423
8791
|
},
|
|
@@ -10226,7 +9594,7 @@ const faqHeadingFragment = defineFragment({
|
|
|
10226
9594
|
{
|
|
10227
9595
|
id: "eyebrow",
|
|
10228
9596
|
type: "text",
|
|
10229
|
-
label: "
|
|
9597
|
+
label: "Small heading above the title",
|
|
10230
9598
|
description: "Short label displayed above the title.",
|
|
10231
9599
|
visibleRoles: ["designer", "admin"],
|
|
10232
9600
|
maxLength: 60
|
|
@@ -11339,6 +10707,7 @@ function createBlockManifest(config) {
|
|
|
11339
10707
|
icon: config.icon ?? "Box",
|
|
11340
10708
|
layout,
|
|
11341
10709
|
variants,
|
|
10710
|
+
arrangementOwnedFieldIds: config.arrangementOwnedFieldIds,
|
|
11342
10711
|
variantMeaning: config.variantMeaning,
|
|
11343
10712
|
defaultVariant: config.defaultVariant,
|
|
11344
10713
|
variantOptions: config.variantOptions,
|
|
@@ -11412,7 +10781,12 @@ const lookSticker = text({
|
|
|
11412
10781
|
as: "p",
|
|
11413
10782
|
...lookSlot("sticker")
|
|
11414
10783
|
}, when("content._effectiveKnobs.stickerLine.value"), bind("content.stickerLine"));
|
|
11415
|
-
const
|
|
10784
|
+
const heroActionsNote = richText({ className: "hero-actions-note" }, when("content.actionsNote"), bind("content.actionsNote"));
|
|
10785
|
+
const heroContentNodes = [
|
|
10786
|
+
lookCaption,
|
|
10787
|
+
...heroCopyAndCta.layout,
|
|
10788
|
+
heroActionsNote
|
|
10789
|
+
];
|
|
11416
10790
|
function heroContentCard(children, gap, copyAtCard) {
|
|
11417
10791
|
return styledContainer({
|
|
11418
10792
|
bindFrom: "_contentCardStyles",
|
|
@@ -11541,7 +10915,8 @@ const headlineRowLayout = heroLookLayout([
|
|
|
11541
10915
|
el("div", lookSlot("copy"), [
|
|
11542
10916
|
lookCaption,
|
|
11543
10917
|
...heroCopyFragment.layout.slice(2),
|
|
11544
|
-
...heroCtaRowFragment.layout
|
|
10918
|
+
...heroCtaRowFragment.layout,
|
|
10919
|
+
heroActionsNote
|
|
11545
10920
|
]),
|
|
11546
10921
|
lookPhoto
|
|
11547
10922
|
]);
|
|
@@ -11628,6 +11003,17 @@ const heroBlockDefinition = { manifest: createBlockManifest({
|
|
|
11628
11003
|
hidden: true
|
|
11629
11004
|
}
|
|
11630
11005
|
},
|
|
11006
|
+
{
|
|
11007
|
+
id: "actionsNote",
|
|
11008
|
+
type: "richText",
|
|
11009
|
+
label: "Line in place of the buttons",
|
|
11010
|
+
required: false,
|
|
11011
|
+
ui: {
|
|
11012
|
+
intent: "display",
|
|
11013
|
+
hidden: true,
|
|
11014
|
+
richTextVariant: "limited"
|
|
11015
|
+
}
|
|
11016
|
+
},
|
|
11631
11017
|
createImageShapeField({
|
|
11632
11018
|
id: "imageShape",
|
|
11633
11019
|
label: "Image shape",
|
|
@@ -11658,6 +11044,11 @@ const heroBlockDefinition = { manifest: createBlockManifest({
|
|
|
11658
11044
|
]
|
|
11659
11045
|
},
|
|
11660
11046
|
defaultVariant: "classic",
|
|
11047
|
+
variantOptions: {
|
|
11048
|
+
micro: { label: "Compact" },
|
|
11049
|
+
split: { label: "Split, photo on the left" },
|
|
11050
|
+
splitReverse: { label: "Split, photo on the right" }
|
|
11051
|
+
},
|
|
11661
11052
|
description: "A big opening headline, with a short line underneath and buttons.",
|
|
11662
11053
|
tags: [
|
|
11663
11054
|
"header",
|
|
@@ -12092,8 +11483,8 @@ const introBlockDefinition = { manifest: createBlockManifest({
|
|
|
12092
11483
|
}
|
|
12093
11484
|
}),
|
|
12094
11485
|
createCtasRepeater({
|
|
12095
|
-
label: "
|
|
12096
|
-
itemLabel: "
|
|
11486
|
+
label: "Buttons",
|
|
11487
|
+
itemLabel: "Button",
|
|
12097
11488
|
maxItems: 2
|
|
12098
11489
|
})
|
|
12099
11490
|
],
|
|
@@ -12675,6 +12066,17 @@ function resolvedItemSurfaceProps(surface, slot, style = void 0) {
|
|
|
12675
12066
|
}
|
|
12676
12067
|
};
|
|
12677
12068
|
}
|
|
12069
|
+
const resolvedSurfaceSchema = z.unknown().transform((value, context) => {
|
|
12070
|
+
try {
|
|
12071
|
+
return parseResolvedSurface(value);
|
|
12072
|
+
} catch {
|
|
12073
|
+
context.addIssue({
|
|
12074
|
+
code: "custom",
|
|
12075
|
+
message: "Invalid surface inputs"
|
|
12076
|
+
});
|
|
12077
|
+
return z.NEVER;
|
|
12078
|
+
}
|
|
12079
|
+
});
|
|
12678
12080
|
const lookListPresentationSchemaShape = {
|
|
12679
12081
|
sectionAction: z.object({
|
|
12680
12082
|
label: z.string(),
|
|
@@ -12718,10 +12120,10 @@ const lookListPresentationSchemaShape = {
|
|
|
12718
12120
|
"card",
|
|
12719
12121
|
"statement",
|
|
12720
12122
|
"highlight"
|
|
12721
|
-
]),
|
|
12123
|
+
]), resolvedSurfaceSchema).optional(),
|
|
12722
12124
|
panelHeading: z.string().optional(),
|
|
12723
12125
|
lookSlots: z.partialRecord(z.enum(arrangementSlotNames), z.enum(arrangementSlotNames)).optional(),
|
|
12724
|
-
itemSurfaces: z.record(z.string(),
|
|
12126
|
+
itemSurfaces: z.record(z.string(), resolvedSurfaceSchema).optional()
|
|
12725
12127
|
};
|
|
12726
12128
|
function listLookSlot(presentation, slot) {
|
|
12727
12129
|
const name = presentation.lookSlots?.[slot];
|
|
@@ -14654,6 +14056,98 @@ function readRuntimeNow(value) {
|
|
|
14654
14056
|
return parsed.value;
|
|
14655
14057
|
}
|
|
14656
14058
|
//#endregion
|
|
14059
|
+
//#region ../blocks/src/system/blocks/shared/teamMembers.ts
|
|
14060
|
+
const teamMemberSpecialtiesInputSchema = z.union([z.string(), z.array(z.string())]).nullish();
|
|
14061
|
+
function parseTeamMemberSpecialties(value) {
|
|
14062
|
+
const parsed = teamMemberSpecialtiesInputSchema.safeParse(value);
|
|
14063
|
+
if (!parsed.success) return [];
|
|
14064
|
+
const parts = typeof parsed.data === "string" ? parsed.data.split(/\r?\n|,/) : parsed.data ?? [];
|
|
14065
|
+
return [...new Set(parts.map((part) => part.trim()).filter(Boolean))];
|
|
14066
|
+
}
|
|
14067
|
+
const biographyTextSchema = z.string().transform((text) => text.split(/\r?\n\s*\r?\n/).map((paragraph) => paragraph.trim()).filter(Boolean));
|
|
14068
|
+
const biographySourceSchema = z.union([RichTextDocSchema, biographyTextSchema]).nullish().catch(null);
|
|
14069
|
+
const teamMemberBiographySchema = z.object({
|
|
14070
|
+
profileBio: biographySourceSchema,
|
|
14071
|
+
bio: biographySourceSchema,
|
|
14072
|
+
summary: biographySourceSchema
|
|
14073
|
+
});
|
|
14074
|
+
/**
|
|
14075
|
+
* The bio a section about one person shows, or null when they have none: the
|
|
14076
|
+
* bio from their profile when it says anything, else their short bio. A page
|
|
14077
|
+
* deciding whether someone has a bio and the block showing it both read this,
|
|
14078
|
+
* so a section is never promised words that aren't there.
|
|
14079
|
+
*/
|
|
14080
|
+
function teamMemberBiography(member) {
|
|
14081
|
+
return firstBiography(member, [
|
|
14082
|
+
"profileBio",
|
|
14083
|
+
"bio",
|
|
14084
|
+
"summary"
|
|
14085
|
+
]);
|
|
14086
|
+
}
|
|
14087
|
+
/**
|
|
14088
|
+
* The bio a compact card shows when a page asks for whichever bio the person
|
|
14089
|
+
* has: their short bio first, then their summary, and their profile bio only
|
|
14090
|
+
* when neither says anything.
|
|
14091
|
+
*/
|
|
14092
|
+
function teamMemberCardBiography(member) {
|
|
14093
|
+
return firstBiography(member, [
|
|
14094
|
+
"bio",
|
|
14095
|
+
"summary",
|
|
14096
|
+
"profileBio"
|
|
14097
|
+
]);
|
|
14098
|
+
}
|
|
14099
|
+
/**
|
|
14100
|
+
* What an older grid or stack card adds under its short bio slot: the card
|
|
14101
|
+
* bio, unless the short bio is already a rich-text document that slot shows.
|
|
14102
|
+
* That slot only renders documents, so a staff member's plain-text short bio
|
|
14103
|
+
* comes through here too, and the two never show together.
|
|
14104
|
+
*/
|
|
14105
|
+
function teamMemberCardBiographyFallback(member) {
|
|
14106
|
+
if (firstBiography(member, ["bio"])?.kind === "document") return null;
|
|
14107
|
+
const biography = teamMemberCardBiography(member);
|
|
14108
|
+
return biography ? teamMemberBiographyDocument(biography) : null;
|
|
14109
|
+
}
|
|
14110
|
+
/** A bio as one rich-text document, each plain paragraph its own paragraph. */
|
|
14111
|
+
function teamMemberBiographyDocument(biography) {
|
|
14112
|
+
if (biography.kind === "document") return biography.document;
|
|
14113
|
+
return {
|
|
14114
|
+
type: "doc",
|
|
14115
|
+
content: biography.paragraphs.map((text) => ({
|
|
14116
|
+
type: "paragraph",
|
|
14117
|
+
content: [{
|
|
14118
|
+
type: "text",
|
|
14119
|
+
text
|
|
14120
|
+
}]
|
|
14121
|
+
}))
|
|
14122
|
+
};
|
|
14123
|
+
}
|
|
14124
|
+
function firstBiography(member, order) {
|
|
14125
|
+
const parsed = teamMemberBiographySchema.safeParse(member);
|
|
14126
|
+
if (!parsed.success) return null;
|
|
14127
|
+
return order.map((key) => toBiography(parsed.data[key])).find((biography) => biography !== null) ?? null;
|
|
14128
|
+
}
|
|
14129
|
+
function toBiography(source) {
|
|
14130
|
+
if (source === null || source === void 0) return null;
|
|
14131
|
+
if (Array.isArray(source)) return source.length > 0 ? {
|
|
14132
|
+
kind: "text",
|
|
14133
|
+
paragraphs: source
|
|
14134
|
+
} : null;
|
|
14135
|
+
const document = source;
|
|
14136
|
+
return hasText(document) ? {
|
|
14137
|
+
kind: "document",
|
|
14138
|
+
document
|
|
14139
|
+
} : null;
|
|
14140
|
+
}
|
|
14141
|
+
const textNodeSchema = z.object({
|
|
14142
|
+
text: z.string().optional(),
|
|
14143
|
+
content: z.array(z.unknown()).optional()
|
|
14144
|
+
});
|
|
14145
|
+
function hasText(node) {
|
|
14146
|
+
const parsed = textNodeSchema.safeParse(node);
|
|
14147
|
+
if (!parsed.success) return false;
|
|
14148
|
+
return (parsed.data.text?.trim().length ?? 0) > 0 || (parsed.data.content ?? []).some(hasText);
|
|
14149
|
+
}
|
|
14150
|
+
//#endregion
|
|
14657
14151
|
//#region ../blocks/src/system/transforms/registry/content.ts
|
|
14658
14152
|
const supportedRichTextTokenSchema = z.enum(["year", "site_name"]);
|
|
14659
14153
|
const interpolateRichTextTokensOptionsSchema = z.object({ tokens: z.array(supportedRichTextTokenSchema).default(["year", "site_name"]) });
|
|
@@ -14730,6 +14224,11 @@ const contentTransforms = [{
|
|
|
14730
14224
|
summary: "Interpolate allowed tokens inside rich-text text nodes",
|
|
14731
14225
|
schema: interpolateRichTextTokensOptionsSchema,
|
|
14732
14226
|
run: (value, options, context) => interpolateRichTextTokens(value, options, context)
|
|
14227
|
+
}, {
|
|
14228
|
+
id: "teamMember.cardBiographyFallback",
|
|
14229
|
+
kind: "formatter",
|
|
14230
|
+
summary: "A team member's card bio when they have no short bio",
|
|
14231
|
+
run: (value) => teamMemberCardBiographyFallback(value)
|
|
14733
14232
|
}];
|
|
14734
14233
|
//#endregion
|
|
14735
14234
|
//#region ../blocks/src/system/transforms/typed.ts
|
|
@@ -15576,6 +15075,7 @@ const dataLoaders = { ...entriesLoader ? { entries: {
|
|
|
15576
15075
|
} } : {} };
|
|
15577
15076
|
const testimonialsBlockDefinition = {
|
|
15578
15077
|
manifest: createBlockManifest({
|
|
15078
|
+
arrangementOwnedFieldIds: ["maxEntries", "avatarLayout"],
|
|
15579
15079
|
variantMeaning: {
|
|
15580
15080
|
kind: "arrangement",
|
|
15581
15081
|
lookOnlyKeys: [
|
|
@@ -15593,7 +15093,7 @@ const testimonialsBlockDefinition = {
|
|
|
15593
15093
|
},
|
|
15594
15094
|
promotedFields: ["maxEntries"],
|
|
15595
15095
|
title: "Testimonials",
|
|
15596
|
-
category: "
|
|
15096
|
+
category: "people",
|
|
15597
15097
|
contentSource: { kind: "inline" },
|
|
15598
15098
|
includeContainerStyles: true,
|
|
15599
15099
|
layout: carouselLayout$1,
|
|
@@ -16470,7 +15970,7 @@ const featureCardsBlockDefinition = { manifest: createBlockManifest({
|
|
|
16470
15970
|
{
|
|
16471
15971
|
id: "eyebrow",
|
|
16472
15972
|
type: "text",
|
|
16473
|
-
label: "
|
|
15973
|
+
label: "Small heading above the title",
|
|
16474
15974
|
required: false,
|
|
16475
15975
|
multiline: false,
|
|
16476
15976
|
maxLength: 80
|
|
@@ -16568,8 +16068,8 @@ const featureCardsBlockDefinition = { manifest: createBlockManifest({
|
|
|
16568
16068
|
ui: { richTextVariant: "limited" }
|
|
16569
16069
|
},
|
|
16570
16070
|
createCtasRepeater({
|
|
16571
|
-
label: "
|
|
16572
|
-
itemLabel: "
|
|
16071
|
+
label: "Buttons",
|
|
16072
|
+
itemLabel: "Button",
|
|
16573
16073
|
maxItems: 1,
|
|
16574
16074
|
button: { defaultVariant: "ghost" }
|
|
16575
16075
|
})
|
|
@@ -16844,7 +16344,7 @@ const textCardStylesField = (() => {
|
|
|
16844
16344
|
const mediaTextBlockDefinition = { manifest: createBlockManifest({
|
|
16845
16345
|
id: "block.media-text",
|
|
16846
16346
|
title: "Media and text",
|
|
16847
|
-
category: "
|
|
16347
|
+
category: "text-and-images",
|
|
16848
16348
|
contentSource: { kind: "inline" },
|
|
16849
16349
|
includeContainerStyles: true,
|
|
16850
16350
|
titleSource: "title",
|
|
@@ -16882,7 +16382,7 @@ const mediaTextBlockDefinition = { manifest: createBlockManifest({
|
|
|
16882
16382
|
{
|
|
16883
16383
|
id: "eyebrow",
|
|
16884
16384
|
type: "text",
|
|
16885
|
-
label: "
|
|
16385
|
+
label: "Small heading above the title",
|
|
16886
16386
|
description: "Optional short label above the title",
|
|
16887
16387
|
required: false,
|
|
16888
16388
|
multiline: false,
|
|
@@ -17848,6 +17348,7 @@ const publicEventDestinationSchema = z.discriminatedUnion("kind", [z.object({
|
|
|
17848
17348
|
* Zod schema for venue data
|
|
17849
17349
|
*/
|
|
17850
17350
|
const eventVenueSchema = z.object({
|
|
17351
|
+
drawing: z.lazy(() => mapDrawingSchema).optional().catch(void 0),
|
|
17851
17352
|
id: z.string(),
|
|
17852
17353
|
name: z.string(),
|
|
17853
17354
|
address: z.string().nullable(),
|
|
@@ -17857,6 +17358,14 @@ const eventVenueSchema = z.object({
|
|
|
17857
17358
|
}).nullable()
|
|
17858
17359
|
});
|
|
17859
17360
|
/**
|
|
17361
|
+
* The map for an event details page: one drawing, for the venue of the event the page is about.
|
|
17362
|
+
* It travels beside the events rather than on any of them, so a list of events has no place for one.
|
|
17363
|
+
*/
|
|
17364
|
+
const eventVenueDrawingSchema = z.object({
|
|
17365
|
+
venueId: z.string(),
|
|
17366
|
+
drawing: z.lazy(() => mapDrawingSchema)
|
|
17367
|
+
});
|
|
17368
|
+
/**
|
|
17860
17369
|
* Zod schema for event category data
|
|
17861
17370
|
*/
|
|
17862
17371
|
const eventCategorySchema = z.object({
|
|
@@ -20229,14 +19738,6 @@ function resolveAutoCtaPath(source, routes) {
|
|
|
20229
19738
|
}
|
|
20230
19739
|
return routeByNormalizedPath.get("/offerings") ?? null;
|
|
20231
19740
|
}
|
|
20232
|
-
function resolveOfferingsPreviewRunPath(run, routes) {
|
|
20233
|
-
const routeIds = [run.eventSeriesId, run.eventOfferingId];
|
|
20234
|
-
for (const entityId of routeIds) {
|
|
20235
|
-
const path = normalizeRoutePath((routes ?? []).find((candidate) => candidate.entityId === entityId)?.path);
|
|
20236
|
-
if (path) return path;
|
|
20237
|
-
}
|
|
20238
|
-
return null;
|
|
20239
|
-
}
|
|
20240
19741
|
function preferredPathsForSource(source) {
|
|
20241
19742
|
switch (source.kind) {
|
|
20242
19743
|
case "eventPreset": switch (source.preset) {
|
|
@@ -20485,6 +19986,11 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
20485
19986
|
}
|
|
20486
19987
|
//#endregion
|
|
20487
19988
|
//#region ../blocks/src/system/constants/events.ts
|
|
19989
|
+
/**
|
|
19990
|
+
* Event-related constants
|
|
19991
|
+
*
|
|
19992
|
+
* Shared constants for event content types and booking system integration.
|
|
19993
|
+
*/
|
|
20488
19994
|
const eventCalendarDisplayModeValues = [
|
|
20489
19995
|
"combined",
|
|
20490
19996
|
"calendar",
|
|
@@ -20564,6 +20070,8 @@ function isEventCalendarListLayout(value) {
|
|
|
20564
20070
|
/** The calendar manifest owns its secondary arrangement axis. */
|
|
20565
20071
|
const eventCalendarVariantMeaning = {
|
|
20566
20072
|
kind: "mode",
|
|
20073
|
+
modes: arrangementModes,
|
|
20074
|
+
defaultMode: "list",
|
|
20567
20075
|
arrangementField: "listLayout",
|
|
20568
20076
|
keys: eventCalendarListLayoutValues,
|
|
20569
20077
|
lookOnlyKeys: [
|
|
@@ -21165,6 +20673,16 @@ const eventRegistrationBlockDefinition = {
|
|
|
21165
20673
|
}
|
|
21166
20674
|
};
|
|
21167
20675
|
//#endregion
|
|
20676
|
+
//#region ../blocks/src/system/node/fragments/mapDrawingStyle.ts
|
|
20677
|
+
/** Shared map token binding for the current section ground and site style. */
|
|
20678
|
+
const mapDrawingStyleBinding = { $bind: {
|
|
20679
|
+
from: "content._sectionStyles.background",
|
|
20680
|
+
transforms: [{
|
|
20681
|
+
id: "mapDrawing.resolveStyle",
|
|
20682
|
+
options: { fallbackToken: "background" }
|
|
20683
|
+
}]
|
|
20684
|
+
} };
|
|
20685
|
+
//#endregion
|
|
21168
20686
|
//#region ../blocks/src/contracts/events.ts
|
|
21169
20687
|
const eventAutoApplyDiscountPreviewBaseSchema = z.object({
|
|
21170
20688
|
id: z.string(),
|
|
@@ -21331,7 +20849,7 @@ const eventDetailsBlockDefinition = {
|
|
|
21331
20849
|
layout: [styledSection({
|
|
21332
20850
|
baseClass: "",
|
|
21333
20851
|
spacing: "spacious",
|
|
21334
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("event-details", withApiBindings({
|
|
20852
|
+
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("div", { style: mapDrawingStyleBinding }, [el("event-details", withApiBindings({
|
|
21335
20853
|
entryTitle: { $bind: {
|
|
21336
20854
|
from: "$root.contentEntry.title",
|
|
21337
20855
|
fallback: null
|
|
@@ -21350,6 +20868,10 @@ const eventDetailsBlockDefinition = {
|
|
|
21350
20868
|
fallback: null
|
|
21351
20869
|
} },
|
|
21352
20870
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
20871
|
+
venueDrawing: { $bind: {
|
|
20872
|
+
from: "data.eventDetailsData.venueDrawing",
|
|
20873
|
+
fallback: null
|
|
20874
|
+
} },
|
|
21353
20875
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
21354
20876
|
showTitle: { $bind: { from: "content.showTitle" } },
|
|
21355
20877
|
showDescription: { $bind: { from: "content.showDescription" } },
|
|
@@ -21381,12 +20903,13 @@ const eventDetailsBlockDefinition = {
|
|
|
21381
20903
|
from: "data.eventDetailsData.autoApplyDiscount",
|
|
21382
20904
|
fallback: null
|
|
21383
20905
|
} }
|
|
21384
|
-
}, { includeApiBaseUrl: false }))], { gap: "lg" })
|
|
20906
|
+
}, { includeApiBaseUrl: false }))])], { gap: "lg" })
|
|
21385
20907
|
})]
|
|
21386
20908
|
}),
|
|
21387
20909
|
dataSchemas: {
|
|
21388
20910
|
eventDetailsData: z.object({
|
|
21389
20911
|
events: publicEventsArraySchema,
|
|
20912
|
+
venueDrawing: eventVenueDrawingSchema.optional().catch(void 0),
|
|
21390
20913
|
sitePasses: publicPassProductCollectionSchema,
|
|
21391
20914
|
siteMemberships: publicMembershipProductCollectionSchema,
|
|
21392
20915
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
@@ -22627,14 +22150,21 @@ function resolveTargetAspectRatio(size) {
|
|
|
22627
22150
|
if ("original" in size) return void 0;
|
|
22628
22151
|
if ("width" in size && "height" in size && typeof size.width === "number" && typeof size.height === "number") return size.width / size.height;
|
|
22629
22152
|
}
|
|
22153
|
+
/**
|
|
22154
|
+
* The editor's "Add a photo" sits on the section's ground, so it takes the ground's rule colour where
|
|
22155
|
+
* the surface publishes one (light on light grounds, dark on dark) and reads in the ground's text ink.
|
|
22156
|
+
* A fixed light surface under ground-following muted text vanished on dark sections. Published
|
|
22157
|
+
* "Image unavailable" keeps its existing styling.
|
|
22158
|
+
*/
|
|
22159
|
+
const AUTHORING_PLACEHOLDER_GROUND = { backgroundColor: "var(--rb-surface-line-color, rgb(var(--tb-surface)))" };
|
|
22630
22160
|
function MediaPlaceholder({ className, style, fieldPath, authoring }) {
|
|
22631
22161
|
return /* @__PURE__ */ jsx("div", {
|
|
22632
22162
|
"data-placeholder-field": authoring ? fieldPath : void 0,
|
|
22633
22163
|
className: clsx("rb-flex rb-h-48 rb-w-full rb-items-center rb-justify-center", className),
|
|
22634
|
-
style: mergeStyles(backgroundColorStyle("surface"), style),
|
|
22164
|
+
style: mergeStyles(authoring ? AUTHORING_PLACEHOLDER_GROUND : backgroundColorStyle("surface"), style),
|
|
22635
22165
|
children: /* @__PURE__ */ jsx("span", {
|
|
22636
22166
|
className: "rb-caption",
|
|
22637
|
-
style: textColorStyle("mutedText"),
|
|
22167
|
+
style: textColorStyle(authoring ? "text" : "mutedText"),
|
|
22638
22168
|
children: authoring ? "Add a photo" : "Image unavailable"
|
|
22639
22169
|
})
|
|
22640
22170
|
});
|
|
@@ -23186,14 +22716,23 @@ const partRenderers = {
|
|
|
23186
22716
|
...listLookSlot(presentation, "dates"),
|
|
23187
22717
|
children: item.dates.map((date, index) => /* @__PURE__ */ jsxs("li", {
|
|
23188
22718
|
...listLookSlot(presentation, "date"),
|
|
23189
|
-
children: [
|
|
23190
|
-
|
|
23191
|
-
|
|
23192
|
-
|
|
23193
|
-
|
|
23194
|
-
|
|
23195
|
-
|
|
23196
|
-
|
|
22719
|
+
children: [
|
|
22720
|
+
/* @__PURE__ */ jsx("time", {
|
|
22721
|
+
dateTime: date.startsAt,
|
|
22722
|
+
children: date.label
|
|
22723
|
+
}),
|
|
22724
|
+
date.places ? /* @__PURE__ */ jsx("span", {
|
|
22725
|
+
...listLookSlot(presentation, "date-places"),
|
|
22726
|
+
"data-availability": date.places.status,
|
|
22727
|
+
children: date.places.label
|
|
22728
|
+
}) : null,
|
|
22729
|
+
date.booking ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
22730
|
+
...date.booking,
|
|
22731
|
+
variant: presentation.buttonVariant ?? "primary",
|
|
22732
|
+
size: "sm",
|
|
22733
|
+
extraClassName: "rb-card-list-date-booking"
|
|
22734
|
+
}) : null
|
|
22735
|
+
]
|
|
23197
22736
|
}, `${date.startsAt}-${index}`))
|
|
23198
22737
|
}) : null,
|
|
23199
22738
|
availability: ({ item, presentation }) => item.availability ? /* @__PURE__ */ jsx("p", {
|
|
@@ -24099,7 +23638,7 @@ const eventListingBlockDefinition = {
|
|
|
24099
23638
|
children: styledContainer({
|
|
24100
23639
|
rootType: "stack",
|
|
24101
23640
|
rootProps: { gap: "lg" },
|
|
24102
|
-
children: [...sectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
23641
|
+
children: [...sectionHeaderLayoutNodes(), el("div", { style: mapDrawingStyleBinding }, [el("event-listing", withApiBindings({
|
|
24103
23642
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
24104
23643
|
events: { $bind: { from: "data.events" } },
|
|
24105
23644
|
stage: { $bind: {
|
|
@@ -24156,7 +23695,7 @@ const eventListingBlockDefinition = {
|
|
|
24156
23695
|
fallback: "any"
|
|
24157
23696
|
} },
|
|
24158
23697
|
emptyMessage: { $bind: { from: "content.emptyMessage" } }
|
|
24159
|
-
}))]
|
|
23698
|
+
}))])]
|
|
24160
23699
|
}),
|
|
24161
23700
|
baseClass: "",
|
|
24162
23701
|
spacing: "comfortable"
|
|
@@ -25049,7 +24588,7 @@ const eventCalendarAdditionalFields = [
|
|
|
25049
24588
|
{
|
|
25050
24589
|
id: "eyebrow",
|
|
25051
24590
|
type: "text",
|
|
25052
|
-
label: "
|
|
24591
|
+
label: "Small heading above the title",
|
|
25053
24592
|
required: false,
|
|
25054
24593
|
multiline: false,
|
|
25055
24594
|
maxLength: 80
|
|
@@ -25843,6 +25382,8 @@ const generatedEventCalendarManifest = createBlockManifestWithContentShape({
|
|
|
25843
25382
|
promotedFields: [
|
|
25844
25383
|
"variant",
|
|
25845
25384
|
"listBy",
|
|
25385
|
+
"calendarTabViews",
|
|
25386
|
+
"defaultCalendarView",
|
|
25846
25387
|
"eventSurface",
|
|
25847
25388
|
"filterEventPresets",
|
|
25848
25389
|
"scheduleScope",
|
|
@@ -25883,6 +25424,7 @@ const generatedEventCalendarManifest = createBlockManifestWithContentShape({
|
|
|
25883
25424
|
icon: "CalendarDays",
|
|
25884
25425
|
layout: eventCalendarLayout,
|
|
25885
25426
|
variants: eventCalendarVariants,
|
|
25427
|
+
arrangementOwnedFieldIds: ["defaultCalendarView"],
|
|
25886
25428
|
variantMeaning: eventCalendarVariantMeaning,
|
|
25887
25429
|
defaultVariant: "combined",
|
|
25888
25430
|
variantOptions: {
|
|
@@ -26002,7 +25544,7 @@ const recurringScheduleBlockDefinition = {
|
|
|
26002
25544
|
{
|
|
26003
25545
|
id: "eyebrow",
|
|
26004
25546
|
type: "text",
|
|
26005
|
-
label: "
|
|
25547
|
+
label: "Small heading above the title",
|
|
26006
25548
|
required: false,
|
|
26007
25549
|
maxLength: 80
|
|
26008
25550
|
},
|
|
@@ -26292,6 +25834,16 @@ const offeringsPreviewFields = [
|
|
|
26292
25834
|
schema: { fields: groupOverrideFields }
|
|
26293
25835
|
},
|
|
26294
25836
|
createButtonVariantField(),
|
|
25837
|
+
{
|
|
25838
|
+
id: "oneOffering",
|
|
25839
|
+
type: "boolean",
|
|
25840
|
+
label: "Show one offering with its dates",
|
|
25841
|
+
required: false,
|
|
25842
|
+
ui: {
|
|
25843
|
+
intent: "display",
|
|
25844
|
+
hidden: true
|
|
25845
|
+
}
|
|
25846
|
+
},
|
|
26295
25847
|
{
|
|
26296
25848
|
id: "buttonText",
|
|
26297
25849
|
type: "text",
|
|
@@ -26357,6 +25909,18 @@ function buildOfferingsCatalogueListing(input) {
|
|
|
26357
25909
|
now: input.now
|
|
26358
25910
|
});
|
|
26359
25911
|
}
|
|
25912
|
+
function offeringsCatalogueShape(listing, cards) {
|
|
25913
|
+
return cards.oneOfferingRequested && cards.listDates && countListedOfferings(listing) === 1 ? "single" : "several";
|
|
25914
|
+
}
|
|
25915
|
+
function countListedOfferings(listing) {
|
|
25916
|
+
switch (listing.kind) {
|
|
25917
|
+
case "no-groups":
|
|
25918
|
+
case "nothing-to-show": return 0;
|
|
25919
|
+
case "by-date": return listing.items.length;
|
|
25920
|
+
case "by-type": return listing.groups.reduce((count, load) => count + (load.kind === "items" ? load.items.length : 0), 0);
|
|
25921
|
+
default: return assertNever$1(listing);
|
|
25922
|
+
}
|
|
25923
|
+
}
|
|
26360
25924
|
function matchesGroup(group, event) {
|
|
26361
25925
|
const source = group.source;
|
|
26362
25926
|
switch (source.kind) {
|
|
@@ -26431,6 +25995,10 @@ const offeringsPreviewLayout = [styledSection({
|
|
|
26431
25995
|
carouselRegion: { $bind: { from: "content.heading" } },
|
|
26432
25996
|
renderInput: { $bind: { from: "content._offeringsPreviewInput" } },
|
|
26433
25997
|
displayMode: { $bind: displayModeBinding },
|
|
25998
|
+
oneOffering: { $bind: {
|
|
25999
|
+
from: "content.oneOffering",
|
|
26000
|
+
fallback: false
|
|
26001
|
+
} },
|
|
26434
26002
|
pathname: { $bind: { from: "$root.pathname" } },
|
|
26435
26003
|
catalogueEvents: { $bind: { from: "data.catalogueEvents" } },
|
|
26436
26004
|
quickDateEvents: { $bind: { from: "data.quickDateEvents" } },
|
|
@@ -26472,6 +26040,7 @@ const offeringsPreviewLayout = [styledSection({
|
|
|
26472
26040
|
spacing: "comfortable"
|
|
26473
26041
|
})];
|
|
26474
26042
|
const offeringsPreviewManifest = createBlockManifest({
|
|
26043
|
+
arrangementOwnedFieldIds: ["groupOverrides.presentation"],
|
|
26475
26044
|
variantMeaning: {
|
|
26476
26045
|
kind: "arrangement",
|
|
26477
26046
|
lookOnlyKeys: [
|
|
@@ -26527,6 +26096,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
26527
26096
|
contentNormalizer: {
|
|
26528
26097
|
fieldIds: [
|
|
26529
26098
|
"displayMode",
|
|
26099
|
+
"oneOffering",
|
|
26530
26100
|
"heading",
|
|
26531
26101
|
"description",
|
|
26532
26102
|
"itemLimit",
|
|
@@ -26628,6 +26198,7 @@ function normalizeOfferingsPreviewBlockContent(value) {
|
|
|
26628
26198
|
if (!record) return { displayMode: DEFAULT_OFFERINGS_PREVIEW_DISPLAY_MODE };
|
|
26629
26199
|
const normalized = {
|
|
26630
26200
|
displayMode: normalizeOfferingsPreviewDisplayMode(record.displayMode),
|
|
26201
|
+
...oneOfferingContent(record.oneOffering),
|
|
26631
26202
|
...normalizeCardListContent(record)
|
|
26632
26203
|
};
|
|
26633
26204
|
if (typeof record.heading === "string" || record.heading === null) normalized.heading = record.heading;
|
|
@@ -26646,6 +26217,9 @@ function normalizeOfferingsPreviewBlockContent(value) {
|
|
|
26646
26217
|
if (sectionStyles !== void 0) normalized._sectionStyles = sectionStyles;
|
|
26647
26218
|
return normalized;
|
|
26648
26219
|
}
|
|
26220
|
+
function oneOfferingContent(value) {
|
|
26221
|
+
return typeof value === "boolean" || value === null ? { oneOffering: value } : {};
|
|
26222
|
+
}
|
|
26649
26223
|
function normalizeOfferingsPreviewDisplayMode(value) {
|
|
26650
26224
|
return value === "catalogue" ? "catalogue" : DEFAULT_OFFERINGS_PREVIEW_DISPLAY_MODE;
|
|
26651
26225
|
}
|
|
@@ -26969,6 +26543,7 @@ const imageGalleryFields = parseFieldDefinitions([
|
|
|
26969
26543
|
minItems: 0,
|
|
26970
26544
|
maxItems: 24,
|
|
26971
26545
|
ui: {
|
|
26546
|
+
intent: "behavior",
|
|
26972
26547
|
repeaterPreset: "thumbnailGrid",
|
|
26973
26548
|
thumbnailField: "image",
|
|
26974
26549
|
thumbnailAltField: "caption",
|
|
@@ -27758,7 +27333,7 @@ const imageGalleryBlockDefinition = {
|
|
|
27758
27333
|
icon: "Columns"
|
|
27759
27334
|
},
|
|
27760
27335
|
marquee: {
|
|
27761
|
-
label: "
|
|
27336
|
+
label: "Scrolling strip",
|
|
27762
27337
|
description: "Infinite horizontal scrolling gallery",
|
|
27763
27338
|
icon: "Repeat"
|
|
27764
27339
|
}
|
|
@@ -27874,6 +27449,7 @@ const videoGridLayout = section({
|
|
|
27874
27449
|
const videoGridBlockDefinition = { manifest: createBlockManifest({
|
|
27875
27450
|
variantMeaning: { kind: "arrangement" },
|
|
27876
27451
|
id: "block.video-grid",
|
|
27452
|
+
promotedFields: ["videos"],
|
|
27877
27453
|
title: "Video grid",
|
|
27878
27454
|
category: "photos",
|
|
27879
27455
|
contentSource: { kind: "inline" },
|
|
@@ -27958,6 +27534,7 @@ const videoGridBlockDefinition = { manifest: createBlockManifest({
|
|
|
27958
27534
|
type: "repeater",
|
|
27959
27535
|
label: "Videos",
|
|
27960
27536
|
itemLabel: "Video",
|
|
27537
|
+
ui: { intent: "behavior" },
|
|
27961
27538
|
minItems: 0,
|
|
27962
27539
|
maxItems: 12,
|
|
27963
27540
|
schema: { fields: [
|
|
@@ -28160,7 +27737,7 @@ const fileDownloadBlockDefinition = { manifest: createBlockManifest({
|
|
|
28160
27737
|
id: "block.file-download",
|
|
28161
27738
|
title: "File download",
|
|
28162
27739
|
titleSource: ["title", "file.filename"],
|
|
28163
|
-
category: "
|
|
27740
|
+
category: "text-and-images",
|
|
28164
27741
|
contentSource: { kind: "inline" },
|
|
28165
27742
|
description: "A link visitors can use to download a file, such as a PDF.",
|
|
28166
27743
|
tags: [
|
|
@@ -28881,7 +28458,7 @@ const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
28881
28458
|
buildRender: (source) => {
|
|
28882
28459
|
const passPurchaseMode = source.passPurchaseMode ?? "add_to_cart";
|
|
28883
28460
|
const subscribeButtonText = source.subscribeButtonText ?? "Subscribe";
|
|
28884
|
-
const products =
|
|
28461
|
+
const products = decideShopDisplayedCatalogue(source);
|
|
28885
28462
|
const dateContext = source.dateContext ?? resolveDateRuntimeContext(void 0);
|
|
28886
28463
|
return {
|
|
28887
28464
|
display: buildPassesMembershipsDisplay({
|
|
@@ -29104,16 +28681,17 @@ function shopCardListPresentation(source) {
|
|
|
29104
28681
|
[key]: source[key]
|
|
29105
28682
|
}), {});
|
|
29106
28683
|
}
|
|
29107
|
-
function
|
|
28684
|
+
function decideShopDisplayedCatalogue(source) {
|
|
28685
|
+
const passes = source.showPasses === false ? [] : source.passes ?? [];
|
|
28686
|
+
const memberships = source.showMemberships === false ? [] : source.memberships ?? [];
|
|
29108
28687
|
return {
|
|
29109
|
-
passes
|
|
29110
|
-
memberships
|
|
28688
|
+
passes,
|
|
28689
|
+
memberships,
|
|
28690
|
+
featured: [...passes, ...memberships].some(({ id }) => id === source.featured) ? source.featured ?? null : null
|
|
29111
28691
|
};
|
|
29112
28692
|
}
|
|
29113
28693
|
function shopFeaturedProduct(source, products) {
|
|
29114
|
-
|
|
29115
|
-
const visible = [...products.passes, ...products.memberships].some(({ id }) => id === selectedId);
|
|
29116
|
-
return source.lookSlots && source.itemRoles?.featured && selectedId && visible ? { featured: selectedId } : {};
|
|
28694
|
+
return source.lookSlots && source.itemRoles?.featured && products.featured !== null ? { featured: products.featured } : {};
|
|
29117
28695
|
}
|
|
29118
28696
|
/** Server and hydrated cards share the same decided role and featured marker. */
|
|
29119
28697
|
function shopProductPresentation(hydration, productId, index, count) {
|
|
@@ -29126,6 +28704,7 @@ function shopProductPresentation(hydration, productId, index, count) {
|
|
|
29126
28704
|
}
|
|
29127
28705
|
const shopBlockDefinition = {
|
|
29128
28706
|
manifest: createBlockManifest({
|
|
28707
|
+
arrangementOwnedFieldIds: ["layout", "columns"],
|
|
29129
28708
|
variantMeaning: {
|
|
29130
28709
|
kind: "arrangement",
|
|
29131
28710
|
lookOnlyKeys: [
|
|
@@ -29344,7 +28923,7 @@ const shopBlockDefinition = {
|
|
|
29344
28923
|
animation: false,
|
|
29345
28924
|
paletteHidden: false
|
|
29346
28925
|
},
|
|
29347
|
-
category: "
|
|
28926
|
+
category: "shop",
|
|
29348
28927
|
contentSource: { kind: "entries" },
|
|
29349
28928
|
tags: [
|
|
29350
28929
|
"shop",
|
|
@@ -30755,6 +30334,18 @@ const wrapVariant = (variantLayout) => styledSection({
|
|
|
30755
30334
|
baseClass: "",
|
|
30756
30335
|
spacing: "comfortable"
|
|
30757
30336
|
});
|
|
30337
|
+
const cardBiographyFallbackNode = richText({ className: "rb-prose rb-max-w-none" }, when("content.cardBiography", { equals: "any" }), bind(ITEM_NAME, { transforms: [{ id: "teamMember.cardBiographyFallback" }] }));
|
|
30338
|
+
const teamMemberGridLayout = withCardBiographyFallback(teamMemberFragment.layout);
|
|
30339
|
+
function withCardBiographyFallback(layout) {
|
|
30340
|
+
const roots = Array.isArray(layout) ? layout : [layout];
|
|
30341
|
+
const [card] = roots;
|
|
30342
|
+
if (!card || roots.length !== 1) throw new Error("teamMember fragment must have one root node");
|
|
30343
|
+
const children = card.children ?? [];
|
|
30344
|
+
return {
|
|
30345
|
+
...card,
|
|
30346
|
+
children: [...children, cardBiographyFallbackNode]
|
|
30347
|
+
};
|
|
30348
|
+
}
|
|
30758
30349
|
const teamMemberStackLayout = el("div", { className: "rb-team-member rb-team-member--stack rb-flex rb-flex-col rb-md-flex-row rb-items-start rb-gap-3" }, [el("div", { className: "rb-team-member-photo-col rb-w-full rb-shrink-0" }, [el("div", { className: memberPhotoClassName("rb-team-member-photo-wrap rb-w-full") }, [media({
|
|
30759
30350
|
className: "rb-team-member-photo rb-w-full rb-object-cover",
|
|
30760
30351
|
style: { aspectRatio: "1 / 1" },
|
|
@@ -30777,12 +30368,42 @@ const teamMemberStackLayout = el("div", { className: "rb-team-member rb-team-mem
|
|
|
30777
30368
|
as: "p",
|
|
30778
30369
|
className: "rb-team-member-role"
|
|
30779
30370
|
}, when("role"), bind("role")),
|
|
30780
|
-
richText({ className: "rb-prose rb-max-w-none" }, when("bio"), bind("bio"))
|
|
30371
|
+
richText({ className: "rb-prose rb-max-w-none" }, when("bio"), bind("bio")),
|
|
30372
|
+
cardBiographyFallbackNode
|
|
30781
30373
|
])]);
|
|
30374
|
+
const onePersonAboutWhen = { equals: "about" };
|
|
30375
|
+
const notOnePersonAboutWhen = {
|
|
30376
|
+
equals: "about",
|
|
30377
|
+
not: true
|
|
30378
|
+
};
|
|
30379
|
+
const aboutVariant = styledSection({
|
|
30380
|
+
children: sectionContainer([el("div", {
|
|
30381
|
+
className: "rb-team-layout",
|
|
30382
|
+
"data-one-person": "about"
|
|
30383
|
+
}, [el("div", { className: "rb-team-head" }, [headingNode], when("content.heading")), el("team-members", {
|
|
30384
|
+
onePerson: { $bind: { from: "content.onePerson" } },
|
|
30385
|
+
source: { $bind: {
|
|
30386
|
+
from: "content.source",
|
|
30387
|
+
fallback: "manual"
|
|
30388
|
+
} },
|
|
30389
|
+
members: { $bind: {
|
|
30390
|
+
from: "content.members",
|
|
30391
|
+
fallback: []
|
|
30392
|
+
} },
|
|
30393
|
+
siteMembers: { $bind: {
|
|
30394
|
+
from: "data.members",
|
|
30395
|
+
fallback: []
|
|
30396
|
+
} },
|
|
30397
|
+
sectionHeading: { $bind: { from: "content.heading" } }
|
|
30398
|
+
})])], { gap: "md" }),
|
|
30399
|
+
baseClass: "",
|
|
30400
|
+
spacing: "comfortable"
|
|
30401
|
+
});
|
|
30782
30402
|
const manualGridMembersNode = when("content.source", manualSourceWhen)(repeaterFragmentLayout({
|
|
30783
30403
|
collectionPath: "content.members",
|
|
30784
30404
|
itemName: ITEM_NAME,
|
|
30785
30405
|
fragments: { teamMember: teamMemberFragment },
|
|
30406
|
+
layoutOverrides: { teamMember: teamMemberGridLayout },
|
|
30786
30407
|
itemGap: "sm",
|
|
30787
30408
|
itemClassName: memberCardClassName
|
|
30788
30409
|
}));
|
|
@@ -30790,6 +30411,7 @@ const dynamicGridMembersNode = when("content.source", dynamicSourceWhen)(repeate
|
|
|
30790
30411
|
collectionPath: "data.members",
|
|
30791
30412
|
itemName: ITEM_NAME,
|
|
30792
30413
|
fragments: { teamMember: teamMemberFragment },
|
|
30414
|
+
layoutOverrides: { teamMember: teamMemberGridLayout },
|
|
30793
30415
|
itemGap: "sm",
|
|
30794
30416
|
itemClassName: memberCardClassName
|
|
30795
30417
|
}));
|
|
@@ -30823,14 +30445,23 @@ const stackVariant = wrapVariant({
|
|
|
30823
30445
|
}))]
|
|
30824
30446
|
});
|
|
30825
30447
|
const cardListVariant = styledSection({
|
|
30826
|
-
children: sectionContainer([el("div", {
|
|
30827
|
-
|
|
30448
|
+
children: sectionContainer([el("div", {
|
|
30449
|
+
className: "rb-team-layout",
|
|
30450
|
+
...lookSlot("layout"),
|
|
30451
|
+
"data-one-person": { $bind: { from: "content.onePerson" } }
|
|
30452
|
+
}, [
|
|
30453
|
+
el("div", {
|
|
30454
|
+
className: "rb-team-head",
|
|
30455
|
+
...lookSlot("head")
|
|
30456
|
+
}, [text({
|
|
30828
30457
|
as: "h2",
|
|
30829
30458
|
...lookSlot("heading")
|
|
30830
30459
|
}, bind("content.heading"), when("content.heading"))], when("content.heading")),
|
|
30831
30460
|
el("team-members", {
|
|
30832
30461
|
...cardListPresentationBindings,
|
|
30833
30462
|
biographySource: { $bind: { from: "content._effectiveLook.look.structure.teamBiography" } },
|
|
30463
|
+
onePerson: { $bind: { from: "content.onePerson" } },
|
|
30464
|
+
cardBiography: { $bind: { from: "content.cardBiography" } },
|
|
30834
30465
|
source: { $bind: {
|
|
30835
30466
|
from: "content.source",
|
|
30836
30467
|
fallback: "manual"
|
|
@@ -30905,6 +30536,37 @@ const teamMembersBlockDefinition = {
|
|
|
30905
30536
|
}],
|
|
30906
30537
|
ui: { intent: "behavior" }
|
|
30907
30538
|
}),
|
|
30539
|
+
parseFieldDefinition({
|
|
30540
|
+
id: "onePerson",
|
|
30541
|
+
type: "select",
|
|
30542
|
+
label: "One person",
|
|
30543
|
+
required: false,
|
|
30544
|
+
options: [{
|
|
30545
|
+
value: "about",
|
|
30546
|
+
label: "The section is about them, with their bio"
|
|
30547
|
+
}, {
|
|
30548
|
+
value: "portrait",
|
|
30549
|
+
label: "One small portrait"
|
|
30550
|
+
}],
|
|
30551
|
+
ui: {
|
|
30552
|
+
intent: "display",
|
|
30553
|
+
hidden: true
|
|
30554
|
+
}
|
|
30555
|
+
}),
|
|
30556
|
+
parseFieldDefinition({
|
|
30557
|
+
id: "cardBiography",
|
|
30558
|
+
type: "select",
|
|
30559
|
+
label: "Card bio",
|
|
30560
|
+
required: false,
|
|
30561
|
+
options: [{
|
|
30562
|
+
value: "any",
|
|
30563
|
+
label: "Whichever bio the person has"
|
|
30564
|
+
}],
|
|
30565
|
+
ui: {
|
|
30566
|
+
intent: "display",
|
|
30567
|
+
hidden: true
|
|
30568
|
+
}
|
|
30569
|
+
}),
|
|
30908
30570
|
parseFieldDefinition({
|
|
30909
30571
|
id: "layoutAlign",
|
|
30910
30572
|
type: "select",
|
|
@@ -31050,10 +30712,19 @@ const teamMembersBlockDefinition = {
|
|
|
31050
30712
|
],
|
|
31051
30713
|
layout: gridVariant,
|
|
31052
30714
|
variants: {
|
|
31053
|
-
grid: gridVariant,
|
|
30715
|
+
grid: [when("content.onePerson", notOnePersonAboutWhen)(gridVariant), when("content.onePerson", onePersonAboutWhen)(aboutVariant)],
|
|
31054
30716
|
stack: [when("content._effectiveLook", { not: true })(stackVariant), when("content._effectiveLook")(cardListVariant)],
|
|
31055
30717
|
...Object.fromEntries(arrangementOnlyKeys.map((key) => [key, cardListVariant]))
|
|
31056
30718
|
},
|
|
30719
|
+
arrangementOwnedFieldIds: [
|
|
30720
|
+
"layoutWidth",
|
|
30721
|
+
"thumbnailShape",
|
|
30722
|
+
"thumbnailPadding",
|
|
30723
|
+
"imageColSize",
|
|
30724
|
+
"stackImagePosition",
|
|
30725
|
+
"stackContentAlignment",
|
|
30726
|
+
"gap"
|
|
30727
|
+
],
|
|
31057
30728
|
variantMeaning: {
|
|
31058
30729
|
kind: "arrangement",
|
|
31059
30730
|
lookOnlyKeys: [...arrangementOnlyKeys]
|
|
@@ -31121,14 +30792,6 @@ function normalizeNumber(value, fallback) {
|
|
|
31121
30792
|
}
|
|
31122
30793
|
return fallback;
|
|
31123
30794
|
}
|
|
31124
|
-
function normalizeOptionalNumber(value) {
|
|
31125
|
-
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
31126
|
-
if (typeof value === "string") {
|
|
31127
|
-
const parsed = Number.parseFloat(value);
|
|
31128
|
-
if (Number.isFinite(parsed)) return parsed;
|
|
31129
|
-
}
|
|
31130
|
-
return null;
|
|
31131
|
-
}
|
|
31132
30795
|
function normalizeBoolean(value, fallback) {
|
|
31133
30796
|
if (typeof value === "boolean") return value;
|
|
31134
30797
|
if (typeof value === "string") {
|
|
@@ -31137,18 +30800,18 @@ function normalizeBoolean(value, fallback) {
|
|
|
31137
30800
|
}
|
|
31138
30801
|
return fallback;
|
|
31139
30802
|
}
|
|
31140
|
-
function
|
|
31141
|
-
const normalized = {
|
|
31142
|
-
addressText: normalizeLocationAddressText(typeof record.addressText === "string" ? record.addressText : typeof record.displayAddress === "string" ? record.displayAddress : null),
|
|
31143
|
-
lat: normalizeOptionalNumber(record.lat),
|
|
31144
|
-
lng: normalizeOptionalNumber(record.lng)
|
|
31145
|
-
};
|
|
31146
|
-
if (normalized.addressText === null && normalized.lat === null && normalized.lng === null) return null;
|
|
31147
|
-
return normalized;
|
|
31148
|
-
}
|
|
31149
|
-
function normalizeLocationMapValue(value) {
|
|
30803
|
+
function normalizeLocationMapValue(value, siteCountry) {
|
|
31150
30804
|
if (typeof value !== "object" || value === null) return null;
|
|
31151
|
-
|
|
30805
|
+
const projected = readLocationMapProjection(value, siteCountry);
|
|
30806
|
+
return projected === null ? null : {
|
|
30807
|
+
addressText: projected.displayAddress,
|
|
30808
|
+
...projected.pin ?? {
|
|
30809
|
+
lat: null,
|
|
30810
|
+
lng: null
|
|
30811
|
+
},
|
|
30812
|
+
drawing: projected.drawing,
|
|
30813
|
+
doorNote: projected.doorNote
|
|
30814
|
+
};
|
|
31152
30815
|
}
|
|
31153
30816
|
function normalizeLocationMapSource(value) {
|
|
31154
30817
|
return value === "business_address" || value === "venue" ? value : "custom";
|
|
@@ -31156,7 +30819,7 @@ function normalizeLocationMapSource(value) {
|
|
|
31156
30819
|
function resolveLocationMapLocation(input) {
|
|
31157
30820
|
const source = normalizeLocationMapSource(input.locationSource);
|
|
31158
30821
|
if (source === "business_address") {
|
|
31159
|
-
const locationValue = normalizeLocationMapValue(input.businessAddress
|
|
30822
|
+
const locationValue = normalizeLocationMapValue(input.businessAddress, input.siteCountry);
|
|
31160
30823
|
return locationValue ? {
|
|
31161
30824
|
kind: "business_address",
|
|
31162
30825
|
locationValue
|
|
@@ -31173,7 +30836,7 @@ function resolveLocationMapLocation(input) {
|
|
|
31173
30836
|
source,
|
|
31174
30837
|
reason: "missing_venue_id"
|
|
31175
30838
|
};
|
|
31176
|
-
const locationValue = input.venuesById ? normalizeLocationMapValue(input.venuesById[venueId] ?? null) : null;
|
|
30839
|
+
const locationValue = input.venuesById ? normalizeLocationMapValue(input.venuesById[venueId] ?? null, input.siteCountry) : null;
|
|
31177
30840
|
return locationValue ? {
|
|
31178
30841
|
kind: "venue",
|
|
31179
30842
|
venueId,
|
|
@@ -31184,7 +30847,7 @@ function resolveLocationMapLocation(input) {
|
|
|
31184
30847
|
reason: "missing_venue_location"
|
|
31185
30848
|
};
|
|
31186
30849
|
}
|
|
31187
|
-
const locationValue = normalizeLocationMapValue(input.location);
|
|
30850
|
+
const locationValue = normalizeLocationMapValue(input.location, input.siteCountry);
|
|
31188
30851
|
return locationValue ? {
|
|
31189
30852
|
kind: "custom",
|
|
31190
30853
|
locationValue
|
|
@@ -31209,11 +30872,12 @@ function normalizeLocationMapProps(input) {
|
|
|
31209
30872
|
const locationValue = resolvedLocation.kind === "unresolved" ? null : resolvedLocation.locationValue;
|
|
31210
30873
|
const directionsLabel = normalizeLocationAddressText(input.directionsLabel) ?? LOCATION_MAP_DEFAULTS.directionsLabel;
|
|
31211
30874
|
return {
|
|
30875
|
+
...locationMapDetails(locationValue),
|
|
30876
|
+
wider: input.wider === true,
|
|
30877
|
+
googleMapsLabel: normalizedGoogleMapsLabel(input.googleMapsLabel),
|
|
31212
30878
|
resolvedLocation,
|
|
31213
30879
|
locationValue,
|
|
31214
30880
|
unresolvedMessage: describeUnresolvedLocationMapLocation(resolvedLocation),
|
|
31215
|
-
addressText: locationValue?.addressText ?? null,
|
|
31216
|
-
location: toLocationCoordinates(locationValue),
|
|
31217
30881
|
zoom: Math.min(LOCATION_MAP_LIMITS.zoom.max, Math.max(LOCATION_MAP_LIMITS.zoom.min, Math.round(normalizeNumber(input.zoom, LOCATION_MAP_DEFAULTS.zoom)))),
|
|
31218
30882
|
heightPx: Math.min(LOCATION_MAP_LIMITS.heightPx.max, Math.max(LOCATION_MAP_LIMITS.heightPx.min, Math.round(normalizeNumber(input.heightPx, LOCATION_MAP_DEFAULTS.heightPx)))),
|
|
31219
30883
|
openingHours: parsedHours.ok ? parsedHours.value : null,
|
|
@@ -31224,27 +30888,23 @@ function normalizeLocationMapProps(input) {
|
|
|
31224
30888
|
className: typeof input.className === "string" ? input.className : null
|
|
31225
30889
|
};
|
|
31226
30890
|
}
|
|
31227
|
-
|
|
31228
|
-
|
|
30891
|
+
/** All render-ready permitted details come from the same resolved source value. */
|
|
30892
|
+
function locationMapDetails(value) {
|
|
31229
30893
|
return {
|
|
31230
|
-
|
|
31231
|
-
|
|
31232
|
-
|
|
31233
|
-
|
|
31234
|
-
showOpeningHours: normalized.showOpeningHours,
|
|
31235
|
-
showAddressText: normalized.showAddressText,
|
|
31236
|
-
showDirections: normalized.showDirections,
|
|
31237
|
-
directionsLabel: normalized.directionsLabel,
|
|
31238
|
-
className: normalized.className
|
|
30894
|
+
drawing: value?.drawing ?? null,
|
|
30895
|
+
doorNote: value?.doorNote ?? null,
|
|
30896
|
+
addressText: value?.addressText ?? null,
|
|
30897
|
+
location: toLocationCoordinates(value)
|
|
31239
30898
|
};
|
|
31240
30899
|
}
|
|
31241
|
-
function
|
|
31242
|
-
|
|
31243
|
-
|
|
31244
|
-
|
|
31245
|
-
|
|
31246
|
-
|
|
31247
|
-
|
|
30900
|
+
function normalizedGoogleMapsLabel(value) {
|
|
30901
|
+
return normalizeLocationAddressText(value) ?? "Open in Google Maps";
|
|
30902
|
+
}
|
|
30903
|
+
function readLocationMapProjection(value, siteCountry) {
|
|
30904
|
+
const canonical = parseLocationValue(value);
|
|
30905
|
+
if (canonical.ok && canonical.value !== null) return projectPublicLocation(canonical.value, siteCountry);
|
|
30906
|
+
const projected = publicLocationSchema.safeParse(value);
|
|
30907
|
+
return projected.success ? projected.data : null;
|
|
31248
30908
|
}
|
|
31249
30909
|
//#endregion
|
|
31250
30910
|
//#region ../blocks/src/system/blocks/location-map.ts
|
|
@@ -31263,9 +30923,11 @@ function normalizeLocationMapContent(content) {
|
|
|
31263
30923
|
const locationSource = normalizeLocationMapSource(record.locationSource);
|
|
31264
30924
|
const venueId = typeof record.venueId === "string" && record.venueId.trim() ? record.venueId.trim() : null;
|
|
31265
30925
|
return {
|
|
30926
|
+
wider: record.wider === true,
|
|
30927
|
+
googleMapsLabel: typeof record.googleMapsLabel === "string" ? record.googleMapsLabel : "Open in Google Maps",
|
|
31266
30928
|
heading: typeof record.heading === "string" ? record.heading : void 0,
|
|
31267
30929
|
locationSource,
|
|
31268
|
-
...authoredLocationMapSourceFields(locationSource, venueId,
|
|
30930
|
+
...authoredLocationMapSourceFields(locationSource, venueId, locationSource === "custom" ? parseAuthoredLocation(record.location) : null),
|
|
31269
30931
|
showOpeningHours: record.showOpeningHours !== false,
|
|
31270
30932
|
showAddressText: normalized.showAddressText,
|
|
31271
30933
|
showDirections: normalized.showDirections,
|
|
@@ -31291,9 +30953,91 @@ function authoredLocationMapSourceFields(source, venueId, location) {
|
|
|
31291
30953
|
};
|
|
31292
30954
|
}
|
|
31293
30955
|
}
|
|
30956
|
+
const locationMapNodeProps = {
|
|
30957
|
+
mapStyle: mapDrawingStyleBinding,
|
|
30958
|
+
siteCountry: { $bind: {
|
|
30959
|
+
from: "$root.site.siteCountry",
|
|
30960
|
+
fallback: null
|
|
30961
|
+
} },
|
|
30962
|
+
openingHours: { $bind: {
|
|
30963
|
+
from: "$root.openingHours",
|
|
30964
|
+
fallback: null
|
|
30965
|
+
} },
|
|
30966
|
+
showOpeningHours: { $bind: {
|
|
30967
|
+
from: "content.showOpeningHours",
|
|
30968
|
+
fallback: true
|
|
30969
|
+
} },
|
|
30970
|
+
location: { $bind: {
|
|
30971
|
+
from: "content.location",
|
|
30972
|
+
fallback: null
|
|
30973
|
+
} },
|
|
30974
|
+
businessAddress: { $bind: {
|
|
30975
|
+
from: "$root.site.businessAddress",
|
|
30976
|
+
fallback: null
|
|
30977
|
+
} },
|
|
30978
|
+
locationSource: { $bind: {
|
|
30979
|
+
from: "content.locationSource",
|
|
30980
|
+
fallback: "custom"
|
|
30981
|
+
} },
|
|
30982
|
+
venueId: { $bind: {
|
|
30983
|
+
from: "content.venueId",
|
|
30984
|
+
fallback: null
|
|
30985
|
+
} },
|
|
30986
|
+
venuesById: { $bind: {
|
|
30987
|
+
from: "$root.site.venuesById",
|
|
30988
|
+
fallback: null
|
|
30989
|
+
} },
|
|
30990
|
+
wider: { $bind: {
|
|
30991
|
+
from: "content.wider",
|
|
30992
|
+
fallback: false
|
|
30993
|
+
} },
|
|
30994
|
+
googleMapsLabel: { $bind: {
|
|
30995
|
+
from: "content.googleMapsLabel",
|
|
30996
|
+
fallback: "Open in Google Maps"
|
|
30997
|
+
} },
|
|
30998
|
+
zoom: { $bind: {
|
|
30999
|
+
from: "content.zoom",
|
|
31000
|
+
fallback: LOCATION_MAP_DEFAULTS.zoom
|
|
31001
|
+
} },
|
|
31002
|
+
heightPx: { $bind: {
|
|
31003
|
+
from: "content.heightPx",
|
|
31004
|
+
fallback: LOCATION_MAP_DEFAULTS.heightPx
|
|
31005
|
+
} },
|
|
31006
|
+
showAddressText: { $bind: {
|
|
31007
|
+
from: "content.showAddressText",
|
|
31008
|
+
fallback: LOCATION_MAP_DEFAULTS.showAddressText
|
|
31009
|
+
} },
|
|
31010
|
+
showDirections: { $bind: {
|
|
31011
|
+
from: "content.showDirections",
|
|
31012
|
+
fallback: LOCATION_MAP_DEFAULTS.showDirections
|
|
31013
|
+
} },
|
|
31014
|
+
directionsLabel: { $bind: {
|
|
31015
|
+
from: "content.directionsLabel",
|
|
31016
|
+
fallback: LOCATION_MAP_DEFAULTS.directionsLabel
|
|
31017
|
+
} }
|
|
31018
|
+
};
|
|
31019
|
+
/** Look-only layouts hand the details their compiler-resolved slot and surface (the wide map's sheet). */
|
|
31020
|
+
const lookPresentationProps = {
|
|
31021
|
+
lookSlots: { $bind: { from: "content._lookSlots" } },
|
|
31022
|
+
itemSurfaces: { $bind: { from: "content._effectiveLook.itemSurfaces" } }
|
|
31023
|
+
};
|
|
31024
|
+
const arrangedLayout = (body) => styledSection({
|
|
31025
|
+
baseClass: "",
|
|
31026
|
+
spacing: "comfortable",
|
|
31027
|
+
children: el("div", {
|
|
31028
|
+
className: "rb-container",
|
|
31029
|
+
...lookSlot("layout")
|
|
31030
|
+
}, [el("div", lookSlot("head"), [text({
|
|
31031
|
+
as: "h2",
|
|
31032
|
+
...lookSlot("heading")
|
|
31033
|
+
}, bind("content.heading"))], when("content.heading")), ...body])
|
|
31034
|
+
});
|
|
31294
31035
|
const locationMapBlockDefinition = {
|
|
31295
31036
|
manifest: createBlockManifest({
|
|
31296
|
-
variantMeaning: {
|
|
31037
|
+
variantMeaning: {
|
|
31038
|
+
kind: "arrangement",
|
|
31039
|
+
lookOnlyKeys: ["map-and-details", "photo-and-details"]
|
|
31040
|
+
},
|
|
31297
31041
|
id: "block.location-map",
|
|
31298
31042
|
title: "Map",
|
|
31299
31043
|
titleSource: "heading",
|
|
@@ -31323,20 +31067,20 @@ const locationMapBlockDefinition = {
|
|
|
31323
31067
|
parseFieldDefinition({
|
|
31324
31068
|
id: "locationSource",
|
|
31325
31069
|
type: "select",
|
|
31326
|
-
label: "
|
|
31070
|
+
label: "Which place?",
|
|
31327
31071
|
defaultValue: "custom",
|
|
31328
31072
|
options: [
|
|
31329
31073
|
{
|
|
31330
31074
|
value: "business_address",
|
|
31331
|
-
label: "
|
|
31075
|
+
label: "Your business address"
|
|
31332
31076
|
},
|
|
31333
31077
|
{
|
|
31334
31078
|
value: "venue",
|
|
31335
|
-
label: "
|
|
31079
|
+
label: "One of your venues"
|
|
31336
31080
|
},
|
|
31337
31081
|
{
|
|
31338
31082
|
value: "custom",
|
|
31339
|
-
label: "
|
|
31083
|
+
label: "A different place"
|
|
31340
31084
|
}
|
|
31341
31085
|
],
|
|
31342
31086
|
ui: {
|
|
@@ -31366,6 +31110,7 @@ const locationMapBlockDefinition = {
|
|
|
31366
31110
|
required: false,
|
|
31367
31111
|
ui: {
|
|
31368
31112
|
widget: "locationPicker",
|
|
31113
|
+
valueContract: "location",
|
|
31369
31114
|
intent: "content",
|
|
31370
31115
|
visibleWhen: {
|
|
31371
31116
|
field: "locationSource",
|
|
@@ -31401,6 +31146,15 @@ const locationMapBlockDefinition = {
|
|
|
31401
31146
|
}
|
|
31402
31147
|
] }
|
|
31403
31148
|
}),
|
|
31149
|
+
parseFieldDefinition({
|
|
31150
|
+
id: "entrancePhoto",
|
|
31151
|
+
type: "media",
|
|
31152
|
+
label: "Entrance photo",
|
|
31153
|
+
description: "A photo of the door or the way in. It shows when this section uses the “Entrance photo beside the details” Look.",
|
|
31154
|
+
required: false,
|
|
31155
|
+
mediaKinds: ["image"],
|
|
31156
|
+
ui: { intent: "content" }
|
|
31157
|
+
}),
|
|
31404
31158
|
parseFieldDefinition({
|
|
31405
31159
|
id: "showOpeningHours",
|
|
31406
31160
|
type: "boolean",
|
|
@@ -31437,18 +31191,19 @@ const locationMapBlockDefinition = {
|
|
|
31437
31191
|
}
|
|
31438
31192
|
}),
|
|
31439
31193
|
parseFieldDefinition({
|
|
31440
|
-
id: "
|
|
31441
|
-
type: "
|
|
31442
|
-
label: "
|
|
31443
|
-
defaultValue:
|
|
31444
|
-
|
|
31445
|
-
|
|
31446
|
-
|
|
31447
|
-
|
|
31448
|
-
|
|
31449
|
-
|
|
31450
|
-
|
|
31451
|
-
|
|
31194
|
+
id: "wider",
|
|
31195
|
+
type: "boolean",
|
|
31196
|
+
label: "Show a wider area",
|
|
31197
|
+
defaultValue: false,
|
|
31198
|
+
ui: { intent: "display" }
|
|
31199
|
+
}),
|
|
31200
|
+
parseFieldDefinition({
|
|
31201
|
+
id: "googleMapsLabel",
|
|
31202
|
+
type: "text",
|
|
31203
|
+
label: "Google Maps button label",
|
|
31204
|
+
defaultValue: "Open in Google Maps",
|
|
31205
|
+
maxLength: 60,
|
|
31206
|
+
ui: { intent: "display" }
|
|
31452
31207
|
}),
|
|
31453
31208
|
parseFieldDefinition({
|
|
31454
31209
|
id: "heightPx",
|
|
@@ -31461,64 +31216,27 @@ const locationMapBlockDefinition = {
|
|
|
31461
31216
|
ui: {
|
|
31462
31217
|
intent: "display",
|
|
31463
31218
|
widget: "slider",
|
|
31464
|
-
showValue: true
|
|
31219
|
+
showValue: true,
|
|
31220
|
+
valueUnit: "pixels"
|
|
31465
31221
|
}
|
|
31466
31222
|
})
|
|
31467
31223
|
],
|
|
31468
31224
|
layout: styledSection({
|
|
31469
31225
|
baseClass: "",
|
|
31470
31226
|
spacing: "comfortable",
|
|
31471
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("location-map", {
|
|
31472
|
-
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
|
|
31476
|
-
|
|
31477
|
-
|
|
31478
|
-
|
|
31479
|
-
|
|
31480
|
-
|
|
31481
|
-
|
|
31482
|
-
|
|
31483
|
-
|
|
31484
|
-
businessAddress: { $bind: {
|
|
31485
|
-
from: "site.businessAddress",
|
|
31486
|
-
fallback: null
|
|
31487
|
-
} },
|
|
31488
|
-
locationSource: { $bind: {
|
|
31489
|
-
from: "content.locationSource",
|
|
31490
|
-
fallback: "custom"
|
|
31491
|
-
} },
|
|
31492
|
-
venueId: { $bind: {
|
|
31493
|
-
from: "content.venueId",
|
|
31494
|
-
fallback: null
|
|
31495
|
-
} },
|
|
31496
|
-
venuesById: { $bind: {
|
|
31497
|
-
from: "site.venuesById",
|
|
31498
|
-
fallback: null
|
|
31499
|
-
} },
|
|
31500
|
-
zoom: { $bind: {
|
|
31501
|
-
from: "content.zoom",
|
|
31502
|
-
fallback: LOCATION_MAP_DEFAULTS.zoom
|
|
31503
|
-
} },
|
|
31504
|
-
heightPx: { $bind: {
|
|
31505
|
-
from: "content.heightPx",
|
|
31506
|
-
fallback: LOCATION_MAP_DEFAULTS.heightPx
|
|
31507
|
-
} },
|
|
31508
|
-
showAddressText: { $bind: {
|
|
31509
|
-
from: "content.showAddressText",
|
|
31510
|
-
fallback: LOCATION_MAP_DEFAULTS.showAddressText
|
|
31511
|
-
} },
|
|
31512
|
-
showDirections: { $bind: {
|
|
31513
|
-
from: "content.showDirections",
|
|
31514
|
-
fallback: LOCATION_MAP_DEFAULTS.showDirections
|
|
31515
|
-
} },
|
|
31516
|
-
directionsLabel: { $bind: {
|
|
31517
|
-
from: "content.directionsLabel",
|
|
31518
|
-
fallback: LOCATION_MAP_DEFAULTS.directionsLabel
|
|
31519
|
-
} }
|
|
31520
|
-
})], { gap: "md" })
|
|
31521
|
-
})
|
|
31227
|
+
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("location-map", locationMapNodeProps)], { gap: "md" })
|
|
31228
|
+
}),
|
|
31229
|
+
variants: {
|
|
31230
|
+
"map-and-details": arrangedLayout([el("location-map", {
|
|
31231
|
+
...locationMapNodeProps,
|
|
31232
|
+
...lookPresentationProps
|
|
31233
|
+
})]),
|
|
31234
|
+
"photo-and-details": arrangedLayout([el("div", lookSlot("frame"), [el("div", lookSlot("media"), [media(lookSlot("photo"), bind("content.entrancePhoto"), when("content.entrancePhoto"))], when("content.entrancePhoto")), el("location-map", {
|
|
31235
|
+
...locationMapNodeProps,
|
|
31236
|
+
...lookPresentationProps,
|
|
31237
|
+
showMap: false
|
|
31238
|
+
})])])
|
|
31239
|
+
}
|
|
31522
31240
|
}),
|
|
31523
31241
|
contentNormalizer: {
|
|
31524
31242
|
fieldIds: [
|
|
@@ -31527,6 +31245,8 @@ const locationMapBlockDefinition = {
|
|
|
31527
31245
|
"venueId",
|
|
31528
31246
|
"location",
|
|
31529
31247
|
"showAddressText",
|
|
31248
|
+
"wider",
|
|
31249
|
+
"googleMapsLabel",
|
|
31530
31250
|
"showOpeningHours",
|
|
31531
31251
|
"showDirections",
|
|
31532
31252
|
"directionsLabel",
|
|
@@ -31536,6 +31256,14 @@ const locationMapBlockDefinition = {
|
|
|
31536
31256
|
normalize: normalizeLocationMapContent
|
|
31537
31257
|
}
|
|
31538
31258
|
};
|
|
31259
|
+
function parseAuthoredLocation(value) {
|
|
31260
|
+
if (value == null) return null;
|
|
31261
|
+
const canonical = parseLocationValue(value);
|
|
31262
|
+
if (canonical.ok) return canonical.value;
|
|
31263
|
+
const projected = publicLocationSchema.safeParse(value);
|
|
31264
|
+
if (projected.success) return projected.data;
|
|
31265
|
+
return { kind: "needs_place" };
|
|
31266
|
+
}
|
|
31539
31267
|
//#endregion
|
|
31540
31268
|
//#region ../blocks/src/system/blocks/index.ts
|
|
31541
31269
|
function sectionOnly() {
|
|
@@ -31853,7 +31581,7 @@ const systemBlockDefinitions = [
|
|
|
31853
31581
|
})
|
|
31854
31582
|
]
|
|
31855
31583
|
})),
|
|
31856
|
-
withDesignCapability("block.location-map", locationMapBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
31584
|
+
withDesignCapability("block.location-map", locationMapBlockDefinition, withLookCapability(sectionOnly()), defineBlockDesignMetadata({
|
|
31857
31585
|
flow: utilityFlow,
|
|
31858
31586
|
layoutProfiles: [layoutProfile({
|
|
31859
31587
|
variantKey: "default",
|
|
@@ -32372,4 +32100,4 @@ function listBlockDescriptors() {
|
|
|
32372
32100
|
}));
|
|
32373
32101
|
}
|
|
32374
32102
|
//#endregion
|
|
32375
|
-
export {
|
|
32103
|
+
export { RichText as $, CANCELLED_SESSION_STATUS as $i, formBlockDefinition as $n, lookSkinSlotTransform as $r, formatEventHourLabel as $t, buildOfferingsCatalogueListing as A, publicEventPricingCurrency as Aa, validateManifestLookField as Ai, FEATURE_CARD_ICON_TREATMENTS as An, isBlockButtonRole as Ar, offeringsListingFor as At, buildEventCollectionListingDisplay as B, buildRepeaterGridLayout as Bi, teamMemberBiography as Bn, parseRuntimeBackgroundContent as Br, buildEventListWeek as Bt, buildShopInteractiveIslandProps as C, parseLocalScheduleTime as Ca, blockCategoryEnum as Ci, isEventFull as Cn, formEmbedFragment as Cr, resolveEventRegistrationScopedEvents as Ct, passCardListContent as D, toUtcIsoDateTimeString as Da, normalizeSelectSource as Di, blockBookingConsentSchema as Dn, ctaCopyFragment as Dr, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Dt, membershipClassesLabel as E, toScheduledBookingDateTime as Ea, fieldSchema as Ei, publicEventsArraySchema as En, testimonialsHeadingFragment as Er, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as Et, projectRecurringSchedule as F, formatCurrencyAmount as Fa, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as Fi, composeHeaderSectionWrapperClassName as Fn, boxStyleClassNames as Fr, ThemedButton as Ft, resolveCalendarReadProfile as G, resolveRepeaterGridSpanFieldId as Gi, headerRuntimeTransforms as Gn, el as Gr, eventCalendarWeekStart as Gt, eventCollectionHydrationSchema as H, resolveRepeaterGridColumnFieldId as Hi, readRuntimeNow as Hn, resolveSurfaceForegroundStyles as Hr, formatEventPriceAmount as Ht, eventListingBlockDefinition as I, parseCurrencyCode as Ia, linkSchema as Ii, markEditableSurfaceForwarding as In, normalizeBoxStylesBorder as Ir, ThemedButtonLink as It, CardListContentPart as J, chosenString as Ji, staticHeaderChromeRuntime as Jn, BACKGROUND_POSITION_PRESET_VALUES as Jr, formatCalendarTitle as Jt, catalogueEventCardProps as K, augmentManifest as Ki, chromeLogoTransforms as Kn, when as Kr, eventDateOptions as Kt, buildEventListingInteractiveIslandProps as L, PUBLIC_DOWNLOAD_MEDIA_TYPES as Li, splitPositioningClasses as Ln, resolveCardRoleForBoxStyles as Lr, ThemedDownloadLink as Lt, eventCalendarBlockDefinition as M, publicEventPricingType as Ma, validateSdkBlockDeclaration as Mi, shouldReserveFeatureCardIconZone as Mn, bodyCopyFragment as Mr, resolveOfferingsPreviewGroups as Mt, buildEventCalendarInteractiveIslandProps as N, resolveExactOrFreePriceDisplay as Na, NodeSchema as Ni, siteFooterManifest as Nn, defineFragment as Nr, resolveOfferingsRenderInput as Nt, offeringsPreviewBlockDefinition as O, formatBookingPriceDisplay as Oa, parseFieldDefinition as Oi, bookingConsentCarrierSchema as On, heroCtaRowFragment as Or, buildOfferingsPreviewListing as Ot, buildEventCalendarListingDisplay as P, resolvePricingOptionsPriceDisplay as Pa, bindingSchema as Pi, siteHeaderManifest as Pn, boxStylesTransforms as Pr, ThemedAuthoredButton as Pt, MediaNodeServer as Q, unavailableReadinessFact as Qi, formatDate$1 as Qn, lookQuoteLimitTransform as Qr, formatEventDateParts as Qt, buildEventCollectionDisplay as R, projectRepeaterGridLayout as Ri, contentTransforms as Rn, parseBackgroundContent as Rr, getIconComponent as Rt, buildProductListInteractiveIslandProps as S, parseBookingLocalDate as Sa, PUBLIC_FILE_FIELD_KINDS as Si, getEventAvailabilityStatus as Sn, singleButtonFragment as Sr, normalizeEventRegistrationPageSurfaceSubject as St, membershipCardListContent as T, toBookingTimeZone as Ta, builtInBlockKindsSchema as Ti, groupPublicEventsByRun as Tn, testimonialsCarouselFragment as Tr, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as Tt, eventCollectionSourceSchemaShape as U, resolveRepeaterGridColumnsForBreakpoint as Ui, resolveDateRuntimeContext as Un, resolveBackgroundColorValue as Ur, formatEventPriceDisplay as Ut, eventCollectionDisplaySchemaShape as V, parseRepeaterGridInteger as Vi, teamMemberCardBiography as Vn, resolveSectionSurfaceForeground as Vr, formatEventPrice as Vt, calendarWindowQuerySchema as W, resolveRepeaterGridRowFieldId as Wi, mediaTransforms as Wn, ctaButton as Wr, buildCalendarViewport as Wt, resolveCardListSchedule as X, loadedReadinessFact as Xi, uiTransforms as Xn, lookCarouselRegionTransform as Xr, formatEventClockLabel as Xt, CardListLeadDate as Y, admitReadinessFacts as Yi, resolveHeroTitleLength as Yn, getAnchorClasses as Yr, formatDate as Yt, selectCardListPresentation as Z, pageTemplateFromEntry as Zi, formattingTransforms as Zn, lookLeadSlotTransform as Zr, formatEventCompactDateRail as Zt, productListBlockDefinition as _, inferSiteDateLocale as _a, inlineTextToPlainText as _i, browserReadAuthoritySchema as _n, headingFragment as _r, previewStageSchema as _t, normalizeLocationMapSource as a, parseMailingListProviderScope as aa, resolveBlockIconRenderValue as ai, getLocalDateKey as an, defineClientOwnedBlockRuntime as ar, resolveImageUrlWithContext as at, buildCheckoutInteractiveIslandProps as b, getBookingLocalDateKey as ba, plainTextToInlineText as bi, formatTotalCapacity as bn, faqHeadingFragment as br, eventCalendarListLayoutOptions as bt, sanitizeNewsletterSignupPublicContent as c, decideLocationSourcePermission as ca, CircleMinusIcon as ci, formatDateKey as cn, listLookControl as cr, getCurrentResolveImageUrlContext as ct, newsletterBlockSubmissionMessage as d, projectPublicLocation as da, FileArchiveIcon as di, getWeekCalendarDayTuple as dn, resolvedItemSurfaceProps as dr, getCardOrientation as dt, nextLiveRunSessionStartMs as ea, asPartialObject as ei, formatEventNextDateFact as en, buildFormInteractiveIslandProps as er, ImagePresets as et, giftingBlockDefinition as f, publicLocationSchema as fa, FileAudioIcon as fi, getWeekCalendarDays as fn, itemRole as fr, getContainerClass as ft, productDetailBlockDefinition as g, formatDateTimeRange as ga, PlusIcon as gi, formatBookingSchedulePresentation as gn, richTextFragment as gr, bookingNowSchema as gt, cartBlockDefinition as h, formatDateRange as ha, MinusIcon as hi, resolveRuntimeEventDestination as hn, clsx as hr, buildEventRegistrationInteractiveIslandProps as ht, normalizeLocationMapProps as i, parseMailingListRuntimeContext as ia, parseBlockIconValue as ii, resolveEventTimeZone as in, createZodCodec as ir, resolveImageUrl as it, offeringsCatalogueShape as j, publicEventPricingDisplay as ja, sdkBlockPresentationShape as ji, resolveFeatureCardGeneratedIconSizePx as jn, heroCopyFragment as jr, resolveOfferingsPreviewGroupCta as jt, publicRouteCandidatesSchema as k, isPublicEventPricingOptionDisplayable as ka, parseFieldDefinitions as ki, blockBookingPaymentTermsSchema as kn, ctaRowFragment as kr, normalizeOfferingsPreviewItemLimit as kt, NEWSLETTER_SIGNUPS_PAUSED_MESSAGE as l, locationValueSchema as la, CirclePlusIcon as li, getDayOfWeek as ln, listLookSlot as lr, setContextResolveImageUrlContext as lt, checkoutBlockDefinition as m, formatDate$2 as ma, FileTextIcon as mi, isToday as mn, Grid as mr, eventRegistrationBlockDefinition as mt, listBlockDescriptors as n, resolveWholeSeriesBookingPhase as na, runTransforms as ni, formatTime as nn, createInteractiveIslandCodec as nr, computeMediaTransformStyle as nt, resolveLocationMapLocation as o, parseMailingListPlacementTargeting as oa, ArrowDownIcon as oi, getLocalMinuteOfDay as on, defineProgressiveBlockRuntime as or, resolvePublicMediaUrl as ot, buildGiftingInteractiveIslandProps as p, mapDrawingSchema as pa, FileSpreadsheetIcon as pi, isSameCalendarDay as pn, standardAspectRatioOptions as pr, resolveEventSelection as pt, listingEventCardProps as q, isRecord$5 as qi, layoutTransforms as qn, standardImageShapeOptions as qr, eventLocalDateKey as qt, normalizeBlockContent as r, buildMailingListSignupBlockSourceRef as ra, buildGeneratedBlockIconRenderAssetLookupFromUnknown as ri, groupEventsByDate as rn, defineInteractiveIslandMetaKeys as rr, resolveImageSourceSetWithContext as rt, newsletterSignupBlockDefinition as s, sameMailingListPlacementTargeting as sa, ChevronDownIcon as si, addDays as sn, listItemPresentation as sr, buildResolveImageUrlContext as st, getBlockDefinition as t, orderedLiveRunSessions as ta, createTransformRegistry as ti, formatEventTimeRange as tn, buildInteractiveIslandProps as tr, MediaPlaceholder as tt, buildNewsletterFormInteractiveIslandProps as u, normalizeLocationAddressText as ua, ClockIcon as ui, getOrderedDayNames as un, lookListPresentationSchemaShape as ur, sanitizeHref as ut, shopBlockDefinition as v, compareLocalScheduleDates as va, isInlineTextEmpty as vi, canJoinEventWaitlistOnAnyMode as vn, cardFragment as vr, eventCalendarListGroupingDecision as vt, shopProductPresentation as w, resolveBookingBusinessTimeZone as wa, blockSectionDeclarationShape as wi, blockSiteTermsSchema as wn, formCopyFragment as wr, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as wt, buildProductDetailInteractiveIslandProps as x, getLocalScheduleDate as xa, DEFAULT_MEDIA_FIELD_KINDS as xi, getEventAvailability as xn, blogFeaturedPostFragment as xr, resolveEventCalendarReadPlan as xt, buildCartInteractiveIslandProps as y, formatBookingCompactEnglishTime as ya, parseInlineTextFromUnknown as yi, formatEventRemainingPlaces as yn, faqAccordionFragment as yr, eventCalendarListLayoutCompatibleDisplayModeValues as yt, buildEventCollectionHydration as z, projectRepeaterGridLayoutForRendering as zi, parseTeamMemberSpecialties as zn, parseBackgroundOverlay as zr, SpinnerNode as zt };
|