@riverbankcms/sdk 0.160.0 → 0.161.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-Bx4kLiTA.d.ts} +1 -1
- package/dist/_dts/{Page-C0ENVLCF.d.ts → Page-Dm7_P13o.d.ts} +211 -9
- package/dist/_dts/{SdkPreviewMode-jZK0A49V.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +4 -4
- package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
- package/dist/_dts/{client-uMMuPq9V.d.ts → client-Ep0jI9eE.d.ts} +1 -1
- package/dist/_dts/{content-types-D6nXGqdQ.d.ts → content-types-BgAzCrBc.d.ts} +2 -2
- package/dist/_dts/{contracts-Bnmj1nxu.d.ts → contracts-DUiOnj9e.d.ts} +8 -5
- package/dist/_dts/{footerPageOutline-CeLjFX8b.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-nyU8q02J.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
- package/dist/_dts/{index-Blwl7yl6.d.ts → index-BQDBQvdu.d.ts} +1 -1
- package/dist/_dts/{index-lkpjIg5i.d.ts → index-BVkP8f70.d.ts} +1 -1
- package/dist/_dts/{index-CEaKil7G.d.ts → index-CF6Cjs7b.d.ts} +2 -2
- package/dist/_dts/{index-nVoi_74l.d.ts → index-CSsfq6KG.d.ts} +3 -17
- package/dist/_dts/{index-DahMwisK.d.ts → index-D_8uz4OP.d.ts} +3 -3
- package/dist/_dts/{index-Bg64CkV-.d.ts → index-DvKQA6AZ.d.ts} +4 -4
- package/dist/_dts/{index-C5xslEBn.d.ts → index-KPrWM0KF.d.ts} +1 -1
- package/dist/_dts/{index-BaaGBY1v.d.ts → index-ylivB7Jj.d.ts} +2 -2
- package/dist/_dts/{loadContent-CYLmzvLq.d.ts → loadContent-DTjKOO-T.d.ts} +10 -10
- package/dist/_dts/{resolvePageContent-DqnxChOs.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
- package/dist/_dts/{schema-D0bNcPWK.d.ts → schema-BHu0PYWl.d.ts} +18821 -16622
- 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-D8czmbQF.d.ts → types-BR1Yboa9.d.ts} +1060 -140
- package/dist/_dts/{types-Dm-KW7nj.d.ts → types-CJXTCF_F.d.ts} +3 -3
- package/dist/_dts/{types-CFrYuXYP.d.ts → types-D02ngcUH.d.ts} +4 -2
- package/dist/_dts/{types-DSgmJ15W.d.ts → types-ZGUiHpDE.d.ts} +7 -7
- package/dist/_dts/{validation-Bmb4WnHg.d.ts → validation-BaV565gb.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DZRKi6tT.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
- package/dist/client/{BookingMailingListNote-C00sLLdL.mjs → BookingMailingListNote-BDpxmn1p.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-CHSi9b3E.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
- package/dist/client/{CheckboxChoice-Bhm6RAUL.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CaN-7ui7.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-ClxN5_xZ.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BncvSa1n.mjs → EventCalendar.client-BxQLY5cX.mjs} +9 -9
- package/dist/client/{EventCombined.client-DluBxVVu.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-BiJrMtfp.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
- package/dist/client/{EventItem-CXhnT9pF.mjs → EventItem-BEx-qiDE.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-V-dtoDlD.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
- package/dist/client/{EventListing.client-DPO6SZbx.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
- package/dist/client/{EventListing.view-B-Yi5JZS.mjs → EventListing.view-9RFrBejr.mjs} +29 -13
- package/dist/client/{EventRegistrationPayment-Dc3Fnlnw.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +25 -13
- package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
- package/dist/client/{Page-7PkzO04N.mjs → Page-Bf2nPACI.mjs} +809 -298
- package/dist/client/{StepIndicator-DiD6euZ8.mjs → StepIndicator-CZweb1vs.mjs} +2 -2
- package/dist/client/{TabBarFragment-BHd8GN8y.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
- package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
- package/dist/client/{accordion-2m27DsIk.mjs → accordion-TcimLLRQ.mjs} +1 -1
- package/dist/client/{booking-form.client-BddWV5w1.mjs → booking-form.client-q-RpJ4aF.mjs} +12 -12
- package/dist/client/{bookingForm-bcdXQjmw.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{carousel-D7nj9I0y.mjs → carousel-CGAk6j0m.mjs} +2 -2
- package/dist/client/{carousel.client-AffDJo_s.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
- package/dist/client/{cart-PN6yCw1H.mjs → cart-D_h3rAZ2.mjs} +3 -3
- package/dist/client/{cart.client-D4t1f0cJ.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
- package/dist/client/{checkout-CsTwXVSb.mjs → checkout-tC-3CzuM.mjs} +3 -3
- package/dist/client/{checkout.client-BhQE3zY7.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
- package/dist/client/client.mjs +5 -4
- package/dist/client/{context-BLAvalAa.mjs → context-9ZfMb6GA.mjs} +1 -1
- package/dist/client/{cta-CUXhX_D7.mjs → cta-D-ZqL7-e.mjs} +1 -1
- package/dist/client/{dateFormatting-BHIHxNuo.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-R-awbk_0.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-9Q93uvTo.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
- package/dist/client/{event-details.client-BS1WtG-a.mjs → event-details.client-C670TgRd.mjs} +2 -17
- package/dist/client/{event-registration.client-BXndwsET.mjs → event-registration.client-C6GApWTB.mjs} +16 -16
- package/dist/client/{eventCalendar-HyoOt1Qz.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
- package/dist/client/{eventCombined-sdG5oEaH.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
- package/dist/client/{eventDetails-FFAknE4w.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
- package/dist/client/{eventListing-CGK6urk3.mjs → eventListing-C_yXmHyz.mjs} +4 -4
- package/dist/client/{eventRegistration-VhrvCs4l.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
- package/dist/client/{form-C-B5O_ko.mjs → form-QZhtdFHA.mjs} +3 -3
- package/dist/client/{form.client-DoZVcl8d.mjs → form.client-CgvPACwG.mjs} +4 -4
- package/dist/client/{form.parts-mttKpgif.mjs → form.parts-2uI0-5N-.mjs} +3 -3
- package/dist/client/{formatDate-xUSCknEO.mjs → formatDate-Danr0Nk4.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-BHUEXsaI.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
- package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
- package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
- package/dist/client/{newsletter-form.client-D_n0rftg.mjs → newsletter-form.client-Cbepz2KU.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DKHye4IE.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
- package/dist/client/{newsletterForm-tEaYelzx.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
- package/dist/client/{noop-B610YKEx.mjs → noop-B7H6gCbj.mjs} +297 -3
- package/dist/client/portal/client.mjs +12 -12
- package/dist/client/{product-detail.client-DUf5x5Jt.mjs → product-detail.client-CYTR165c.mjs} +1 -1
- package/dist/client/{product-list.client-Cqp1BPTV.mjs → product-list.client-B4vTvag8.mjs} +1 -1
- package/dist/client/{productDetail-B8bBiogP.mjs → productDetail-k8LEMSWn.mjs} +3 -3
- package/dist/client/{productList-BKN4D-1z.mjs → productList-DEo8Bqoe.mjs} +3 -3
- package/dist/client/{propsDecoder-2nNZh2Oe.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
- package/dist/client/{registry.server-BAm4RPNJ.mjs → registry.server-BTmSXE3D.mjs} +355 -162
- package/dist/client/rendering/client.mjs +27 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +15 -9
- package/dist/client/{richText-coerce-Cv-qomNB.mjs → richText-coerce-B19taoH6.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-C5u8MbAA.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
- package/dist/client/{ThemedButton-C22C9cCF.mjs → schema-C-m8XHuW.mjs} +990 -2310
- package/dist/client/{shop-DZNC0VKk.mjs → shop-RGWa43H7.mjs} +3 -3
- package/dist/client/{shop-commerce-DdX4LSa3.mjs → shop-commerce-TJYCBO_H.mjs} +11 -11
- package/dist/client/{shop-commerce-store-BJtrZov9.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
- package/dist/client/{shop.client-DmDd-igg.mjs → shop.client-tsKfZw1W.mjs} +12 -12
- package/dist/client/{shop.interactive-5SnnDHz3.mjs → shop.interactive-CVqLAU53.mjs} +6 -158
- package/dist/client/{shopShared-CPqUlAh9.mjs → shopShared-C3lHMz_R.mjs} +2 -2
- package/dist/client/{timetableModel-C19rcHEw.mjs → timetableModel-V2ifvGGy.mjs} +148 -8
- package/dist/client/{useAvailableSlots-BjbJXotk.mjs → useAvailableSlots-D1X69-pN.mjs} +3 -3
- package/dist/client/{useBookingNowIso-CMgfL7YJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
- package/dist/client/{useDiscountApply-KG8jB7WC.mjs → useDiscountApply-Bwzr1RjV.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-DK2w_i0a.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
- package/dist/client/{useEventPagination-DW6MCirb.mjs → useEventPagination-CLAS0upd.mjs} +8 -21
- package/dist/client/{view-CkUn3Y0Y.mjs → view-BUh4LnLS.mjs} +4 -4
- package/dist/client/{view-CseyBW07.mjs → view-Dj_FZHmg.mjs} +18 -15
- package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
- package/dist/preview-next/before-render.mjs +5 -4
- package/dist/preview-next/chrome.css +2 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-lUHBrzHv.mjs → EventEmbeddedCheckoutStep-CwerMfzn.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-Dvq-RW9-.mjs} +110 -63
- package/dist/preview-next/client/{PreviewEditorUI-Wq0b3Daw.mjs → PreviewEditorUI-BdFjS39R.mjs} +4 -3
- package/dist/preview-next/client/{SdkPreviewModeRuntime-wSI_R361.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +425 -412
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BtZPcwYV.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
- package/dist/preview-next/client/{SiteChromeCustomizeContext-Hc4pYnNe.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +2982 -53859
- package/dist/preview-next/client/{ThemedButton-DzeycIlD.mjs → ThemedButton-b14Bv03E.mjs} +1079 -340
- 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/{previewChromeSurface-Corq4AG7.mjs → previewChromeSurface-Dd1_mNIg.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-B-CXyGVb.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
- package/dist/preview-next/client/{spinner-C4If5Y-O.mjs → spinner-CGxS8Ns-.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 +2 -2
- package/dist/preview-next/middleware.mjs +7 -3
- package/dist/preview-next/{route-contract-8csADeIT.mjs → route-contract-hLg-yjQN.mjs} +41 -4
- 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-CeTd2saO.mjs} +4 -4
- package/dist/server/{bindings-CFmJg5lm.mjs → bindings-C5YpKuKt.mjs} +2 -1
- package/dist/server/{client-DPsi0Dai.mjs → client-Cv26lZQ4.mjs} +7 -5
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{siteChromeOverlayClearance-DALIAMwo.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +461 -1064
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-RMCcuVU_.mjs → loadContent-C8a0b-cC.mjs} +11 -5
- package/dist/server/loadPage--DXBwI8V.mjs +2 -0
- package/dist/server/{loadPage-DhDGzj7t.mjs → loadPage-BW7dklu3.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-OxY5FMuy.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
- package/dist/server/{overrides-Bz_A6sB9.mjs → overrides-D1fiPOKF.mjs} +596 -301
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-B_1vrSru.mjs → prebuild--fO0E2tr.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-B7ukYXXR.mjs → prefetchBlockData-CqJnokWJ.mjs} +133 -87
- package/dist/server/{publicProducts-Djbpc81A.mjs → publicProducts-CvvZ4JIe.mjs} +41 -3
- package/dist/server/{registry-eFjKtEhF.mjs → registry-BVfCqaCq.mjs} +477 -1021
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-DYvEa9c5.mjs → resolveBlockData-DPNvhXEz.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-C3dJ5UkL.mjs → schema-CD4peO7m.mjs} +2203 -1223
- package/dist/server/server.mjs +3 -3
- package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
- package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
- package/dist/server/{src-C5Mu-z0F.mjs → src-ILxc6pid.mjs} +161 -3
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-ruoyXb_0.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
- package/dist/server/{validation-B-Xar8QS.mjs → validation-B1ieVemg.mjs} +2 -2
- package/dist/server/{version-Bg7VHK3i.mjs → version-BQK44wFg.mjs} +1 -1
- package/dist/styles/index.css +157 -0
- package/package.json +1 -1
- 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/mediaContext-DThoeEBU.mjs +0 -136
- 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,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Ir as makeBoundaryId, K as corners, Qn as paletteModeSchema, Qt as resolveSurface, Tr as assertNever$1, U as parseThemeForPersistence, Zn as paletteColorsSchema, _r as asDesignBlockId, cr as indexRenderableMediaAssets, kn as defaultThemeTokens, or as buildRenderableMediaAssetIndex, sn as textColorStyle, sr as renderableMediaAssetSchema$1, vt as stripStaleTransitionStyleGroup, wr as asSiteStyleId, xn as expandPalette } from "./ThemedButton-DzeycIlD.mjs";
|
|
3
2
|
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-BC0V7iAR.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
3
|
+
import { Br as makeBoundaryId, Ln as defaultThemeTokens, Or as asSiteStyleId, U as parseThemeForPersistence, cn as parseResolvedSurface, dn as resolveSurface, dr as renderableMediaAssetSchema$1, fr as indexRenderableMediaAssets, kn as expandPalette, kr as assertNever$1, ln as parseSurfaceTree, nn as textColorStyle, ur as buildRenderableMediaAssetIndex, vt as stripStaleTransitionStyleGroup, xr as asDesignBlockId } from "./ThemedButton-b14Bv03E.mjs";
|
|
4
|
+
import { $ as lookTilePosition, $a as heroPhotoPaintsGround, $i as testimonialsHeadingFragment, Ai as resolveEntryRouteTarget, An as useEditorUiStoreInstance, At as useRetentionTicks, Bi as buildResolveImageUrlContext, Bn as unsafeAsLinkedContentEntryId, Br as isSupportedLoaderEndpoint, Ca as readStoredMode, Ci as logger, Ct as useEntryEditorController, Da as deriveSiteStyleBlockPolicy, Di as calendarWindowQuerySchema, Ea as resolvePublishedLook, Ei as defaultTransforms, Fi as LINKED_CONTENT_ENTRY_META_KEY, Fn as remoteDraftValues, Fs as NO_BLOCK_VERSIONS, Ft as EditorWriteSurface, Ga as boundaryLayout, Gi as cardFragment, Go as TabsList, Gr as createCustomBlockRegistry, Hi as setContextResolveImageUrlContext, Hn as isEdited, Ii as coerceLinkedContentEntriesPayload, In as renderSourceFor, Is as readEditorBlockVersionsFromPlacement, It as editorAdmissionNotice, Ja as defaultSectionTransitionVariantForFamily, Ji as blogFeaturedPostFragment, Jo as DialogContent, Jr as getBlockDefinition, Js as toUtcIsoDateTimeString, Ka as composeBoundary, Ki as faqAccordionFragment, Ko as TabsTrigger, Kr as makeDefaultBlockComponent, Li as getLinkedContentEntryMeta, Ln as renderedFieldChanges, Ls as readPublishedBlockPlacement, Mi as resolveRouteTarget, Ms as parseFooterModuleId, Nn as activeLinkedSaveHandover, No as Callout, Ns as parseMailingListPlacementTargeting, Nt as EditLeaseDiscardedNotice, Oa as componentRuntimeRulesForTheme, Oi as publicEventsArraySchema, Os as cn, Ot as createEditorApiClientFactory, Pa as surfaceResolutionContextFromTheme, Pi as formatDate, Pn as planLinkedSaveHandoverRetention, Po as CalloutDescription, Ps as sameMailingListPlacementTargeting, Pt as EditLeaseModal, Q as lookPositionLabel, Qa as deriveSectionGround, Qi as testimonialsCarouselFragment, Qo as DialogTitle, Qr as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Rn as resolveRenderedValues, Rs as selectedContentVersionId, Sa as arrangementManifestFromVariants, Si as renderInlineText, Ta as resolveModeArrangement, Ti as RichText$1, Ts as Button, Ui as richTextFragment, Uo as Tabs, Us as unsafeAsEditorBlockId, Vi as getCurrentResolveImageUrlContext, Vn as baselineRevisionOf, Vr as ThemeScope, Wa as formatSiteChromeBackgroundTokenLabel, Wi as headingFragment, Wn as canEditorWrite, Wo as TabsContent, Wr as resolveSdkFooterMode, Xa as sectionTransitionFamilyForBoundaryOptionId, Xi as formEmbedFragment, Xo as DialogFooter, Xr as offeringsPreviewBlockDefinition, Ya as sectionTransitionFamilies, Yi as singleButtonFragment, Yo as DialogDescription, Yr as normalizeBlockContent, Ys as assertNever$2, Za as sectionTransitionVariantForBoundaryOptionId, Zi as formCopyFragment, Zo as DialogHeader, Zr as publicRouteCandidatesSchema, _ as PreviewDesignHistoryOrderProvider, _i as buildAppointmentServicesView, _o as isInlineTextEmpty, _r as unwrapResponse, _t as PREVIEW_EDITABLE_OUTLINE, ai as resolveArrangementKnobs, ao as admitReadinessFacts, ar as DEFAULT_LAUNCH_READINESS_INPUT, at as registerPreviewRenewalFetcher, ba as resolveItemSurface, bn as createRoutingHelpers, bo as getAtPath, br as BlockApiProvider, bt as EditableBlockProvider, ca as runTransforms, ci as mergeContentWithBlockStyleOverrides, cn as EditorProvider, co as unavailableReadinessFact, ct as usePreviewToken, da as blockLookFromContent, di as chosenString, do as isRecord$7, ea as ctaCopyFragment, eo as parseCanonicalRuntimeBackground, fa as readBlockComposition, fo as parseBlockIconValue, ft as renderSiteChromeBlock, g as usePreviewPageDesignEditorState, gi as resolveLocationMapLocation, go as inlineTextToPlainText, gr as API_ENDPOINTS, gt as PreviewTextEditor, h as PreviewPageDesignEditorStateProvider, ha as compileEditorModelRuntime, hi as normalizeLocationMapSource, ho as coerceInlineTextWithFallback, ht as PreviewInlineTextEditor, i as PreviewDesignCoordinatorProvider, ii as systemCustomizeFacetDefinitionsForBlock, io as resolveDateRuntimeContext, ir as decodePublicProductCategorySelectorQuery, it as initPreviewAuth, ja as headerStyleRecipeForTheme, ji as resolvePageRouteTarget, jn as useOptionalEditorUiStoreInstance, js as buildMailingListSignupBlockSourceRef, jt as VIEWING_PARTICIPATION, ka as designRuntimeRulesForTheme, ki as bookingConsentCarrierSchema, kn as useEditorUiStore, kt as createPageSurfaceEditorServices, la as defineFragment, li as getDefaultComponentRegistry, ln as useEditor, lo as isRichTextDoc, lr as useApiMediaUploader, lt as SiteAdmissionObserver, ma as applyCompiledRuntimeFieldsToContent, mi as buildLoadedOfferingsPreviewListing, mo as parseGeneratedIconSetId, mt as PreviewRichTextEditor, n as useSiteChromeCustomizeOptional, na as ctaRowFragment, ni as compileManifestContentContract, no as resolveSectionBackground, o as PreviewThemeOverlayProvider, oa as ctaButton, oi as buildThemeRuntime, oo as loadedReadinessFact, or as deriveLaunchReadiness, ot as renewPreviewSession, pa as applyPageOpeningForegroundToTheme, po as parseGeneratedIconAssetId, qa as sectionFactsForContent, qi as faqHeadingFragment, qo as Dialog, qr as resolveBlockVariantKey, ra as heroCopyFragment, ri as validateManifestDraft, ro as readRuntimeNow, rr as blocksKeys, rt as createGuardedPreviewApiClient, s as usePreviewThemeOverlay, sa as bodyCopyFragment, so as pageTemplateFromEntry, sr as MediaEditorContextProvider, st as usePreviewAuth, t as SiteChromeCustomizeProvider, ta as heroCtaRowFragment, ti as parseStoredVariant, to as resolveCompiledSectionForegroundFromContent, ua as arrangementHooksFromContent, ui as projectRecurringSchedule, uo as isObjectRecord, ur as ApiRequestError, ut as SessionJournalHost, vi as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, vo as plainTextToInlineText, vr as clientComponentRegistry, wa as resolveEffectiveArrangement, wi as Text$1, wt as useOptionalSessionJournal, xa as resolveLookSlotSurfaces, xn as createSnapshotFromPageRecord, xo as siblingPath, xt as EntryControllerProvider, ya as arrangementSlotNames, yi as offeringsListingFor, yo as bindingSchema, yr as ImageResolveContextProvider, zs as parseEditLeaseScope } from "./SiteChromeCustomizeContext-CDbxk_qZ.mjs";
|
|
5
|
+
import { Ft as parseLocationValue, H as GripVertical, It as projectPublicLocation, Lt as publicLocationSchema, _ as RotateCcw, kt as decideLocationSourcePermission, lt as ChevronRight, n as X, ut as ChevronLeft } from "./lucide-react-CA9cpo0P.mjs";
|
|
6
|
+
import { A as PreviewBlockCustomizeSelectionProvider, F as planSiteDocument, I as ResponsiveScope, L as Toaster, N as SITE_CHROME_CLASS_NAMES, P as SiteDocumentLayout, a as sanitizeDashboardPath, b as cyclePageDesignBlockLook, d as useBlockCustomizeControls, g as LookCyclePill, i as resolvePreviewDashboardSetupHandoff, j as usePreviewBlockCustomizeSelectionOptional, k as CustomizeBackgroundColorPicker, l as PreviewSiteFontStorageProvider, m as ArrangementModeSwitchPill, n as resolveSiteStyleAccess, p as ArrangementLookPill, r as buildPreviewDashboardSetupUrl, s as resolvePreviewSetupBannerModel, t as canInspectSiteStyle, v as useArrangementToolbar, x as pageDesignLookPosition, y as CustomizeBackgroundControlRows } from "./siteStyleAccess-Kqk0j0dE.mjs";
|
|
7
|
+
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-QtSG2Bl-.mjs";
|
|
8
|
+
import { a as resolvePreviewChromeSurface, i as getPreviewChromeSurfaceDataProps, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as PREVIEW_KEEP_ALIVE_INTERVAL_MS, s as PREVIEW_KEEP_ALIVE_JITTER_RATIO, u as FixedBottomSurface } from "./previewChromeSurface-Dd1_mNIg.mjs";
|
|
7
9
|
import * as React$1 from "react";
|
|
8
10
|
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
9
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -136,6 +138,75 @@ function ResizableSplitPane({ left, right, defaultSplit = 40, minLeftWidth = 300
|
|
|
136
138
|
});
|
|
137
139
|
}
|
|
138
140
|
//#endregion
|
|
141
|
+
//#region ../ui/src/toast.tsx
|
|
142
|
+
function ToastProvider() {
|
|
143
|
+
return /* @__PURE__ */ jsx(Toaster, {
|
|
144
|
+
position: "bottom-right",
|
|
145
|
+
offset: {
|
|
146
|
+
right: "calc(var(--assistant-dock-inset, 0px) + 24px)",
|
|
147
|
+
bottom: "24px"
|
|
148
|
+
},
|
|
149
|
+
richColors: false,
|
|
150
|
+
className: "rb-sonner-toaster",
|
|
151
|
+
toastOptions: { classNames: {
|
|
152
|
+
toast: "rb-sonner-toast",
|
|
153
|
+
success: "rb-sonner-toast-success",
|
|
154
|
+
info: "rb-sonner-toast-info",
|
|
155
|
+
error: "rb-sonner-toast-error"
|
|
156
|
+
} }
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region ../blocks/src/pageRenderAudience.tsx
|
|
161
|
+
/**
|
|
162
|
+
* The single policy for what a non-renderable block looks like.
|
|
163
|
+
*
|
|
164
|
+
* Public visitors never see renderer diagnostics, so every reason omits.
|
|
165
|
+
* Authoring surfaces keep the wording they have always had — the strings below
|
|
166
|
+
* are moved verbatim from the five former `fallback()` call sites.
|
|
167
|
+
*/
|
|
168
|
+
function presentNotRenderableBlock(reason, audience) {
|
|
169
|
+
if (audience === "public") return null;
|
|
170
|
+
if (reason.kind === "hidden-business-location" && reason.businessDetailsHref) return diagnostic(/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
171
|
+
authoringMessage(reason),
|
|
172
|
+
" ",
|
|
173
|
+
/* @__PURE__ */ jsx("a", {
|
|
174
|
+
href: reason.businessDetailsHref,
|
|
175
|
+
children: "Open Business details"
|
|
176
|
+
})
|
|
177
|
+
] }));
|
|
178
|
+
return diagnostic(authoringMessage(reason));
|
|
179
|
+
}
|
|
180
|
+
function authoringMessage(reason) {
|
|
181
|
+
switch (reason.kind) {
|
|
182
|
+
case "invalid-admission": return `Invalid content for block kind "${reason.blockKind}".`;
|
|
183
|
+
case "missing-definition": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${reason.blockKind}".`;
|
|
184
|
+
case "missing-layout": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${reason.blockKind}"].` : `No renderer available for block kind "${reason.blockKind}".`;
|
|
185
|
+
case "hidden-business-location": return "This map is hidden because your business address is hidden.";
|
|
186
|
+
case "unresolved-location":
|
|
187
|
+
if (reason.source === "business_address") return "Business address details are not configured yet.";
|
|
188
|
+
return reason.source === "venue" ? "This map is hidden on your site until the venue has a location." : "This map is hidden on your site until you choose a place.";
|
|
189
|
+
case "editor-unpreviewable":
|
|
190
|
+
case "render-threw": return `Unable to render block kind "${reason.blockKind}".`;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* The empty-page notice. Authoring-only for the same reason as the block
|
|
195
|
+
* diagnostics: "No blocks found." is a message for whoever is building the
|
|
196
|
+
* page, not for whoever is reading it.
|
|
197
|
+
*/
|
|
198
|
+
function presentEmptyPage(audience) {
|
|
199
|
+
if (audience === "public") return null;
|
|
200
|
+
return diagnostic("No blocks found.");
|
|
201
|
+
}
|
|
202
|
+
function diagnostic(message) {
|
|
203
|
+
return /* @__PURE__ */ jsx("div", {
|
|
204
|
+
className: "rb-p-6 rb-caption",
|
|
205
|
+
style: textColorStyle("mutedText"),
|
|
206
|
+
children: message
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
139
210
|
//#region ../blocks/src/system/fragments/library/headerCta.ts
|
|
140
211
|
const headerCtaFragment = defineFragment({
|
|
141
212
|
variantMeaning: { kind: "arrangement" },
|
|
@@ -524,27 +595,33 @@ function pageBlockPosition(index, blockCount) {
|
|
|
524
595
|
//#endregion
|
|
525
596
|
//#region ../blocks/src/pageRendererContracts.ts
|
|
526
597
|
function buildPageRendererRootRuntime(dataContext) {
|
|
527
|
-
const { siteId = null, siteName, pageId = null, pathname = null,
|
|
598
|
+
const { siteId = null, siteName, pageId = null, pathname = null, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, openingHours, siteTerms, mailingList = { tag: "not_configured" }, loaderFailures = {} } = dataContext ?? {};
|
|
528
599
|
return {
|
|
529
600
|
siteId,
|
|
530
601
|
demoEmailSuppressed: resolveDemoEmailSuppression(dataContext),
|
|
531
602
|
siteName,
|
|
603
|
+
site: publicLocationRuntime(dataContext),
|
|
532
604
|
pageId,
|
|
533
605
|
pathname,
|
|
534
|
-
|
|
606
|
+
...pageBookingRuntime(dataContext),
|
|
535
607
|
...pageRuntimeContext(dataContext),
|
|
536
608
|
previewStage,
|
|
537
609
|
apiBaseUrl,
|
|
538
610
|
portalToken,
|
|
539
611
|
readAuthority,
|
|
540
|
-
bookingOfferingPresets,
|
|
541
|
-
appointmentServicePathPrefix,
|
|
542
612
|
openingHours,
|
|
543
613
|
siteTerms,
|
|
544
614
|
mailingList,
|
|
545
615
|
loaderFailures
|
|
546
616
|
};
|
|
547
617
|
}
|
|
618
|
+
function publicLocationRuntime(context) {
|
|
619
|
+
return {
|
|
620
|
+
businessAddress: context?.businessLocation ?? null,
|
|
621
|
+
venuesById: context?.venuesById ?? {},
|
|
622
|
+
siteCountry: context?.siteCountry ?? null
|
|
623
|
+
};
|
|
624
|
+
}
|
|
548
625
|
function resolveDemoEmailSuppression(dataContext) {
|
|
549
626
|
return dataContext?.demoEmailSuppressed === true;
|
|
550
627
|
}
|
|
@@ -558,43 +635,14 @@ function pageRuntimeContext(dataContext) {
|
|
|
558
635
|
function pageDateRuntimeContext(dataContext) {
|
|
559
636
|
return dataContext?.dateContext ?? resolveDateRuntimeContext(dataContext?.bookingTimeZone);
|
|
560
637
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
*/
|
|
570
|
-
function presentNotRenderableBlock(reason, audience) {
|
|
571
|
-
if (audience === "public") return null;
|
|
572
|
-
return diagnostic(authoringMessage(reason));
|
|
573
|
-
}
|
|
574
|
-
function authoringMessage(reason) {
|
|
575
|
-
switch (reason.kind) {
|
|
576
|
-
case "invalid-admission": return `Invalid content for block kind "${reason.blockKind}".`;
|
|
577
|
-
case "missing-definition": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${reason.blockKind}".`;
|
|
578
|
-
case "missing-layout": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${reason.blockKind}"].` : `No renderer available for block kind "${reason.blockKind}".`;
|
|
579
|
-
case "editor-unpreviewable":
|
|
580
|
-
case "render-threw": return `Unable to render block kind "${reason.blockKind}".`;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* The empty-page notice. Authoring-only for the same reason as the block
|
|
585
|
-
* diagnostics: "No blocks found." is a message for whoever is building the
|
|
586
|
-
* page, not for whoever is reading it.
|
|
587
|
-
*/
|
|
588
|
-
function presentEmptyPage(audience) {
|
|
589
|
-
if (audience === "public") return null;
|
|
590
|
-
return diagnostic("No blocks found.");
|
|
591
|
-
}
|
|
592
|
-
function diagnostic(message) {
|
|
593
|
-
return /* @__PURE__ */ jsx("div", {
|
|
594
|
-
className: "rb-p-6 rb-caption",
|
|
595
|
-
style: textColorStyle("mutedText"),
|
|
596
|
-
children: message
|
|
597
|
-
});
|
|
638
|
+
/** Booking context keeps its defaults together across SSR and authoring. */
|
|
639
|
+
function pageBookingRuntime(context) {
|
|
640
|
+
const { bookingTimeZone, bookingOfferingPresets = [], appointmentServicePathPrefix = null } = context ?? {};
|
|
641
|
+
return {
|
|
642
|
+
bookingTimeZone,
|
|
643
|
+
bookingOfferingPresets,
|
|
644
|
+
appointmentServicePathPrefix
|
|
645
|
+
};
|
|
598
646
|
}
|
|
599
647
|
//#endregion
|
|
600
648
|
//#region ../blocks/src/pageRenderDiagnostics.ts
|
|
@@ -868,12 +916,31 @@ function getRenderableContent(block, previewStage = "published") {
|
|
|
868
916
|
return selectBlockContent(block, previewStage);
|
|
869
917
|
}
|
|
870
918
|
function arrangementRuntime(content) {
|
|
871
|
-
const value = content._arrangementLooks;
|
|
872
|
-
return isObjectRecord(value) && isObjectRecord(value.byMode) && Array.isArray(value.available) && Array.isArray(value.rhythm) ? value : null;
|
|
919
|
+
const value = parseSurfaceTree(content._arrangementLooks);
|
|
920
|
+
return isObjectRecord(value) && isObjectRecord(value.byMode) && Array.isArray(value.available) && Array.isArray(value.rhythm) ? restoreArrangementRuntime(value) : null;
|
|
921
|
+
}
|
|
922
|
+
/** JSON transports carry resolver inputs; rebuild every surface at this boundary. */
|
|
923
|
+
function restoreCompiledLook(look) {
|
|
924
|
+
return {
|
|
925
|
+
...look,
|
|
926
|
+
itemSurfaces: Object.fromEntries(Object.entries(look.itemSurfaces).map(([slot, surface]) => [slot, parseResolvedSurface(surface)])),
|
|
927
|
+
...look.roleSurfaces ? { roleSurfaces: {
|
|
928
|
+
card: parseResolvedSurface(look.roleSurfaces.card),
|
|
929
|
+
statement: parseResolvedSurface(look.roleSurfaces.statement),
|
|
930
|
+
highlight: parseResolvedSurface(look.roleSurfaces.highlight)
|
|
931
|
+
} } : {}
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
function restoreArrangementRuntime(runtime) {
|
|
935
|
+
return {
|
|
936
|
+
...runtime,
|
|
937
|
+
available: runtime.available.map(restoreCompiledLook),
|
|
938
|
+
byMode: Object.fromEntries(Object.entries(runtime.byMode).map(([mode, look]) => [mode, restoreCompiledLook(look)]))
|
|
939
|
+
};
|
|
873
940
|
}
|
|
874
941
|
function effectiveLookFromContent(content) {
|
|
875
942
|
const value = content._effectiveLook;
|
|
876
|
-
return isObjectRecord(value) && isObjectRecord(value.look) ? value : null;
|
|
943
|
+
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
877
944
|
}
|
|
878
945
|
function planArrangementContent(blockKind, manifest, content, audience) {
|
|
879
946
|
const runtime = arrangementRuntime(content);
|
|
@@ -916,6 +983,7 @@ function planArrangementContent(blockKind, manifest, content, audience) {
|
|
|
916
983
|
}),
|
|
917
984
|
...arrangementPanelContent(activeContent, effective, mode),
|
|
918
985
|
...arrangementQuoteContent(blockKind, effective, values),
|
|
986
|
+
_arrangementLooks: runtime,
|
|
919
987
|
_effectiveLook: effective,
|
|
920
988
|
_lookHooks: arrangementContentHooks(effective, mode, length, {
|
|
921
989
|
...facts,
|
|
@@ -975,7 +1043,8 @@ function arrangementContentFacts(content) {
|
|
|
975
1043
|
facts: Array.isArray(content.facts) && content.facts.length > 0,
|
|
976
1044
|
featured,
|
|
977
1045
|
outcome: typeof content.outcome === "string" && content.outcome.length > 0,
|
|
978
|
-
figure: typeof content.figure === "string" && content.figure.trim().length > 0
|
|
1046
|
+
figure: typeof content.figure === "string" && content.figure.trim().length > 0,
|
|
1047
|
+
entrance: isObjectRecord(content.entrancePhoto)
|
|
979
1048
|
}
|
|
980
1049
|
};
|
|
981
1050
|
}
|
|
@@ -984,7 +1053,7 @@ function arrangementPhotoCount(content) {
|
|
|
984
1053
|
if (Array.isArray(content.cards)) return content.cards.filter((card) => isObjectRecord(card) && isObjectRecord(card.media)).length;
|
|
985
1054
|
if (Array.isArray(content.members)) return content.members.filter((member) => isObjectRecord(member) && isObjectRecord(member.photo)).length;
|
|
986
1055
|
if (Array.isArray(content.images)) return content.images.filter((item) => isObjectRecord(item) && isObjectRecord(item.image)).length;
|
|
987
|
-
if (isObjectRecord(content.media)) return 1;
|
|
1056
|
+
if (isObjectRecord(content.media) || isObjectRecord(content.entrancePhoto)) return 1;
|
|
988
1057
|
const section = isObjectRecord(content._sectionStyles) ? content._sectionStyles : {};
|
|
989
1058
|
return isObjectRecord((isObjectRecord(section.background) ? section.background : {}).image) ? 1 : 0;
|
|
990
1059
|
}
|
|
@@ -1407,15 +1476,44 @@ function preparePageRender(input) {
|
|
|
1407
1476
|
mailingList: input.dataContext?.mailingList,
|
|
1408
1477
|
template: input.dataContext?.template ?? pageTemplateFromEntry(input.dataContext?.contentEntry)
|
|
1409
1478
|
});
|
|
1410
|
-
const
|
|
1411
|
-
const
|
|
1412
|
-
const
|
|
1479
|
+
const permission = input.dataContext?.businessLocationPermission ?? decideLocationSourcePermission("business_address", input.dataContext?.businessAddressVisibility);
|
|
1480
|
+
const entries = input.plan.entries.filter((entry) => input.audience === "authoring" || !entryNeedsSetup(entry, facts)).filter((entry) => isPublicSourcePermitted(entry, permission) || input.audience === "authoring" && permission.kind === "hidden").map((entry) => preparedPlanEntry(entry, prepareSourceEntry(entry, input, permission)));
|
|
1481
|
+
const constructionFailures = entries.filter((candidate) => candidate.prepared.kind === "render-threw").map((candidate) => candidate.entry);
|
|
1482
|
+
const survivors = input.audience === "authoring" ? entries : entries.filter((candidate) => candidate.prepared.kind !== "render-threw" && candidate.prepared.kind !== "unresolved-location");
|
|
1413
1483
|
return {
|
|
1414
1484
|
entries: survivors,
|
|
1415
1485
|
constructionFailures,
|
|
1416
1486
|
joins: composeSurvivorJoins(input.plan, survivors, input.themeResources)
|
|
1417
1487
|
};
|
|
1418
1488
|
}
|
|
1489
|
+
/** Source availability is decided before constructing the block or its hydration props. */
|
|
1490
|
+
function prepareSourceEntry(entry, input, permission) {
|
|
1491
|
+
if (!isPublicSourcePermitted(entry, permission)) return {
|
|
1492
|
+
kind: "hidden-business-location",
|
|
1493
|
+
businessDetailsHref: input.dataContext?.authoringBusinessDetailsHref ?? null
|
|
1494
|
+
};
|
|
1495
|
+
if (entry.block.kind === "block.location-map") {
|
|
1496
|
+
const content = entry.renderableContent;
|
|
1497
|
+
const resolved = resolveLocationMapLocation({
|
|
1498
|
+
location: content.location,
|
|
1499
|
+
locationSource: typeof content.locationSource === "string" ? content.locationSource : null,
|
|
1500
|
+
venueId: typeof content.venueId === "string" ? content.venueId : null,
|
|
1501
|
+
businessAddress: input.dataContext?.businessLocation,
|
|
1502
|
+
venuesById: input.dataContext?.venuesById
|
|
1503
|
+
});
|
|
1504
|
+
if (resolved.kind === "unresolved") return {
|
|
1505
|
+
kind: "unresolved-location",
|
|
1506
|
+
source: resolved.source
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
return prepareEntry(entry, input);
|
|
1510
|
+
}
|
|
1511
|
+
/** No source data, override component or wrapper is touched for a hidden map. */
|
|
1512
|
+
function isPublicSourcePermitted(entry, permission) {
|
|
1513
|
+
if (entry.block.kind !== "block.location-map") return true;
|
|
1514
|
+
const rawSource = entry.renderableContent.locationSource;
|
|
1515
|
+
return normalizeLocationMapSource(typeof rawSource === "string" ? rawSource : null) !== "business_address" || permission.kind === "permitted";
|
|
1516
|
+
}
|
|
1419
1517
|
/**
|
|
1420
1518
|
* The only place joins are composed. Plan-time omissions were already
|
|
1421
1519
|
* re-pointed by the plan; construction failures are re-pointed here by the
|
|
@@ -1996,6 +2094,64 @@ function renderSystemBlockElement(input) {
|
|
|
1996
2094
|
previewAuthoring: input.previewAuthoring
|
|
1997
2095
|
});
|
|
1998
2096
|
}
|
|
2097
|
+
/** Pure diagnostic choice; the audience owner controls its presentation. */
|
|
2098
|
+
function preparationDiagnostic(prepared, blockKind) {
|
|
2099
|
+
switch (prepared.kind) {
|
|
2100
|
+
case "hidden-business-location": return {
|
|
2101
|
+
reason: {
|
|
2102
|
+
kind: prepared.kind,
|
|
2103
|
+
blockKind,
|
|
2104
|
+
businessDetailsHref: prepared.businessDetailsHref
|
|
2105
|
+
},
|
|
2106
|
+
outcome: "invalidPlaceholder"
|
|
2107
|
+
};
|
|
2108
|
+
case "unresolved-location": return {
|
|
2109
|
+
reason: {
|
|
2110
|
+
kind: prepared.kind,
|
|
2111
|
+
blockKind,
|
|
2112
|
+
source: prepared.source
|
|
2113
|
+
},
|
|
2114
|
+
outcome: "invalidPlaceholder"
|
|
2115
|
+
};
|
|
2116
|
+
case "editor-unpreviewable": return {
|
|
2117
|
+
reason: {
|
|
2118
|
+
kind: prepared.kind,
|
|
2119
|
+
blockKind
|
|
2120
|
+
},
|
|
2121
|
+
outcome: "invalidPlaceholder"
|
|
2122
|
+
};
|
|
2123
|
+
case "render-threw": return {
|
|
2124
|
+
reason: {
|
|
2125
|
+
kind: prepared.kind,
|
|
2126
|
+
blockKind
|
|
2127
|
+
},
|
|
2128
|
+
outcome: "exception"
|
|
2129
|
+
};
|
|
2130
|
+
case "content":
|
|
2131
|
+
case "plan-decided": return null;
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
function blockRenderPerformanceMeta(meta) {
|
|
2135
|
+
return {
|
|
2136
|
+
outcome: meta?.outcome ?? "ok",
|
|
2137
|
+
override: meta?.override ?? false,
|
|
2138
|
+
hasResolvedData: meta?.hasResolvedData ?? false
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
function finishBlockRender(node, block, perfStart, meta) {
|
|
2142
|
+
if (!perfStart) return node;
|
|
2143
|
+
const durationMs = Date.now() - perfStart;
|
|
2144
|
+
if (durationMs < getPerfSlowBlockRenderThresholdMs()) return node;
|
|
2145
|
+
try {
|
|
2146
|
+
console.debug("perf.blocks.blockRender", {
|
|
2147
|
+
blockId: block.id ?? null,
|
|
2148
|
+
blockKind: block.kind,
|
|
2149
|
+
durationMs,
|
|
2150
|
+
...blockRenderPerformanceMeta(meta)
|
|
2151
|
+
});
|
|
2152
|
+
} catch {}
|
|
2153
|
+
return node;
|
|
2154
|
+
}
|
|
1999
2155
|
/**
|
|
2000
2156
|
* Memoized block section component.
|
|
2001
2157
|
*
|
|
@@ -2008,22 +2164,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
2008
2164
|
const block = entry.block;
|
|
2009
2165
|
const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
|
|
2010
2166
|
const resolvedImageResolveContext = imageResolveContext ?? getCurrentResolveImageUrlContext();
|
|
2011
|
-
|
|
2012
|
-
if (!perfStart) return node;
|
|
2013
|
-
const durationMs = Date.now() - perfStart;
|
|
2014
|
-
if (durationMs < getPerfSlowBlockRenderThresholdMs()) return node;
|
|
2015
|
-
try {
|
|
2016
|
-
console.debug("perf.blocks.blockRender", {
|
|
2017
|
-
blockId: block.id ?? null,
|
|
2018
|
-
blockKind: block.kind,
|
|
2019
|
-
durationMs,
|
|
2020
|
-
outcome: meta?.outcome ?? "ok",
|
|
2021
|
-
override: meta?.override ?? false,
|
|
2022
|
-
hasResolvedData: meta?.hasResolvedData ?? false
|
|
2023
|
-
});
|
|
2024
|
-
} catch {}
|
|
2025
|
-
return node;
|
|
2026
|
-
}
|
|
2167
|
+
const finish = (node, meta) => finishBlockRender(node, block, perfStart, meta);
|
|
2027
2168
|
function wrapped(node) {
|
|
2028
2169
|
return wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, node) }) : /* @__PURE__ */ jsx(Fragment$1, { children: node });
|
|
2029
2170
|
}
|
|
@@ -2039,6 +2180,11 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
2039
2180
|
override: false
|
|
2040
2181
|
});
|
|
2041
2182
|
}
|
|
2183
|
+
const diagnostic = preparationDiagnostic(prepared, block.kind);
|
|
2184
|
+
if (diagnostic) return finish(wrapped(presentNotRenderableBlock(diagnostic.reason, audience)), {
|
|
2185
|
+
outcome: diagnostic.outcome,
|
|
2186
|
+
override: false
|
|
2187
|
+
});
|
|
2042
2188
|
if (entry.kind === "override-only") {
|
|
2043
2189
|
const OverrideOnlyComponent = entry.override;
|
|
2044
2190
|
return finish(wrapped(/* @__PURE__ */ jsx(OverrideOnlyComponent, { ...buildBlockOverrideProps({
|
|
@@ -2055,20 +2201,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
2055
2201
|
hasResolvedData: false
|
|
2056
2202
|
});
|
|
2057
2203
|
}
|
|
2058
|
-
if (prepared.kind
|
|
2059
|
-
kind: "editor-unpreviewable",
|
|
2060
|
-
blockKind: block.kind
|
|
2061
|
-
}, audience)), {
|
|
2062
|
-
outcome: "invalidPlaceholder",
|
|
2063
|
-
override: false
|
|
2064
|
-
});
|
|
2065
|
-
if (prepared.kind !== "content") return finish(wrapped(presentNotRenderableBlock({
|
|
2066
|
-
kind: "render-threw",
|
|
2067
|
-
blockKind: block.kind
|
|
2068
|
-
}, audience)), {
|
|
2069
|
-
outcome: "exception",
|
|
2070
|
-
override: false
|
|
2071
|
-
});
|
|
2204
|
+
if (prepared.kind !== "content") return null;
|
|
2072
2205
|
let rendered;
|
|
2073
2206
|
if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...prepared.baseProps });
|
|
2074
2207
|
else {
|
|
@@ -2134,214 +2267,6 @@ function usePageDateRuntime(props) {
|
|
|
2134
2267
|
};
|
|
2135
2268
|
}
|
|
2136
2269
|
//#endregion
|
|
2137
|
-
//#region ../theme-core/src/ResponsiveScope.tsx
|
|
2138
|
-
/**
|
|
2139
|
-
* Structural responsive root for SDK/runtime chrome that opts out of CMS theme
|
|
2140
|
-
* styling but still depends on scoped rb-* responsive utility classes.
|
|
2141
|
-
*/
|
|
2142
|
-
function ResponsiveScope({ children, responsiveMode = DEFAULT_THEME_RESPONSIVE_MODE, className }) {
|
|
2143
|
-
const responsiveScope = getResponsiveScopeSpec(responsiveMode);
|
|
2144
|
-
const isContainerResponsive = responsiveScope.kind === "container";
|
|
2145
|
-
const wrapperStyle = isContainerResponsive ? {
|
|
2146
|
-
containerType: "inline-size",
|
|
2147
|
-
containerName: responsiveScope.containerName
|
|
2148
|
-
} : {};
|
|
2149
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
2150
|
-
className: className ? `theme-scope ${className}` : "theme-scope",
|
|
2151
|
-
style: wrapperStyle,
|
|
2152
|
-
"data-rb-responsive-mode": responsiveScope.kind,
|
|
2153
|
-
children: [isContainerResponsive && /* @__PURE__ */ jsx("style", {
|
|
2154
|
-
"data-container-responsive-overrides": true,
|
|
2155
|
-
dangerouslySetInnerHTML: { __html: escapeStyleContent(containerResponsiveThemeCss) }
|
|
2156
|
-
}), children]
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
z.object({
|
|
2160
|
-
tokens: z.record(z.string(), z.string()),
|
|
2161
|
-
typography: z.object({
|
|
2162
|
-
headingFamily: z.string().optional(),
|
|
2163
|
-
bodyFamily: z.string().optional(),
|
|
2164
|
-
headingWeight: z.number().optional(),
|
|
2165
|
-
bodyWeight: z.number().optional()
|
|
2166
|
-
}).optional(),
|
|
2167
|
-
spacing: z.enum([
|
|
2168
|
-
"comfortable",
|
|
2169
|
-
"standard",
|
|
2170
|
-
"dense"
|
|
2171
|
-
]).optional(),
|
|
2172
|
-
corners: z.enum([
|
|
2173
|
-
"square",
|
|
2174
|
-
"soft",
|
|
2175
|
-
"rounded",
|
|
2176
|
-
"pill"
|
|
2177
|
-
]).optional(),
|
|
2178
|
-
shadows: z.enum([
|
|
2179
|
-
"none",
|
|
2180
|
-
"low",
|
|
2181
|
-
"medium",
|
|
2182
|
-
"high"
|
|
2183
|
-
]).optional(),
|
|
2184
|
-
components: z.object({
|
|
2185
|
-
buttons: z.union([z.boolean(), z.object({ variants: z.array(z.enum([
|
|
2186
|
-
"primary",
|
|
2187
|
-
"secondary",
|
|
2188
|
-
"outline",
|
|
2189
|
-
"ghost"
|
|
2190
|
-
])).optional() })]).optional(),
|
|
2191
|
-
cards: z.union([z.boolean(), z.object({ variants: z.array(z.enum([
|
|
2192
|
-
"default",
|
|
2193
|
-
"alternative",
|
|
2194
|
-
"open",
|
|
2195
|
-
"elevated",
|
|
2196
|
-
"outlined"
|
|
2197
|
-
])).optional() })]).optional(),
|
|
2198
|
-
inputs: z.boolean().optional()
|
|
2199
|
-
}).optional(),
|
|
2200
|
-
overrides: z.record(z.string(), z.string()).optional()
|
|
2201
|
-
}).passthrough();
|
|
2202
|
-
//#endregion
|
|
2203
|
-
//#region ../theme-core/src/siteChromePlanning.ts
|
|
2204
|
-
function planSiteDocument(input) {
|
|
2205
|
-
const placement = planSiteChromePlacement(input.hasVisibleHeader ?? true ? input.headerPositioning : "static");
|
|
2206
|
-
const topShell = planSiteTopShell(input);
|
|
2207
|
-
const layoutMode = topShell.contentStartsUnderHeader ? "header-overlay" : "normal-flow";
|
|
2208
|
-
return {
|
|
2209
|
-
placement,
|
|
2210
|
-
topShell,
|
|
2211
|
-
layoutMode,
|
|
2212
|
-
overlayHeaderClearance: planSiteOverlayHeaderClearance({
|
|
2213
|
-
topShell,
|
|
2214
|
-
layoutMode
|
|
2215
|
-
})
|
|
2216
|
-
};
|
|
2217
|
-
}
|
|
2218
|
-
function planSiteTopShell(input) {
|
|
2219
|
-
if (input.hasVisibleHeader === false) return {
|
|
2220
|
-
behavior: "normal-flow",
|
|
2221
|
-
contentStartsUnderHeader: false,
|
|
2222
|
-
requiresHeaderOffset: false
|
|
2223
|
-
};
|
|
2224
|
-
const isOverlayHeader = input.headerVariant === "floating" && (input.headerPositioning === "sticky" || input.headerPositioning === "fixed");
|
|
2225
|
-
if (input.hasVisibleBanner && isOverlayHeader) return {
|
|
2226
|
-
behavior: "banner-above-overlay-header",
|
|
2227
|
-
contentStartsUnderHeader: true,
|
|
2228
|
-
requiresHeaderOffset: true
|
|
2229
|
-
};
|
|
2230
|
-
if (input.hasVisibleBanner && (input.headerPositioning === "sticky" || input.headerPositioning === "fixed")) return {
|
|
2231
|
-
behavior: "shared-sticky-shell",
|
|
2232
|
-
contentStartsUnderHeader: false,
|
|
2233
|
-
requiresHeaderOffset: false
|
|
2234
|
-
};
|
|
2235
|
-
return {
|
|
2236
|
-
behavior: "normal-flow",
|
|
2237
|
-
contentStartsUnderHeader: isOverlayHeader,
|
|
2238
|
-
requiresHeaderOffset: false
|
|
2239
|
-
};
|
|
2240
|
-
}
|
|
2241
|
-
//#endregion
|
|
2242
|
-
//#region ../theme-core/src/siteChrome.tsx
|
|
2243
|
-
const SITE_CHROME_CLASS_NAMES = {
|
|
2244
|
-
standaloneStickyHeaderShell: "sticky top-0 z-40 w-full",
|
|
2245
|
-
standaloneFixedHeaderShell: "fixed left-0 right-0 top-0 z-40 w-full",
|
|
2246
|
-
sharedStickyTopShell: "rb-sticky rb-top-0 rb-z-40 rb-w-full",
|
|
2247
|
-
defaultMinHeight: "rb-min-h-screen",
|
|
2248
|
-
fullMinHeight: "rb-min-h-full",
|
|
2249
|
-
overlayRoot: "rb-grid rb-grid-rows-main-footer rb-grid-cols-1",
|
|
2250
|
-
normalFlowRoot: "rb-flex rb-flex-col",
|
|
2251
|
-
overlayTopShell: "rb-row-start-1 rb-col-start-1 rb-z-40",
|
|
2252
|
-
overlayTopShellPlacementMarker: "rb-site-document-overlay-top-shell",
|
|
2253
|
-
overlayContent: "rb-row-start-1 rb-col-start-1",
|
|
2254
|
-
overlayFooter: "rb-row-start-2 rb-col-start-1",
|
|
2255
|
-
normalFlowContent: "rb-flex-1"
|
|
2256
|
-
};
|
|
2257
|
-
function renderSiteTopChrome({ headerNode, bannerNode = null, bannerShellBehavior = "normal-flow" }) {
|
|
2258
|
-
switch (bannerShellBehavior) {
|
|
2259
|
-
case "normal-flow": return /* @__PURE__ */ jsxs(Fragment$1, { children: [headerNode, bannerNode] });
|
|
2260
|
-
case "shared-sticky-shell": return /* @__PURE__ */ jsxs("div", {
|
|
2261
|
-
className: SITE_CHROME_CLASS_NAMES.sharedStickyTopShell,
|
|
2262
|
-
children: [headerNode, bannerNode]
|
|
2263
|
-
});
|
|
2264
|
-
case "banner-above-overlay-header": return /* @__PURE__ */ jsxs(Fragment$1, { children: [bannerNode, headerNode] });
|
|
2265
|
-
default: return assertNever$1(bannerShellBehavior);
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
function SiteDocumentLayout({ plan, headerNode, bannerNode = null, footerNode, children, as: Root = "div", role, className = null, minHeightClassName = SITE_CHROME_CLASS_NAMES.defaultMinHeight, contentClassName = null, style }) {
|
|
2269
|
-
const isHeaderOverlay = plan.layoutMode === "header-overlay";
|
|
2270
|
-
const topShell = renderSiteTopChrome({
|
|
2271
|
-
headerNode,
|
|
2272
|
-
bannerNode,
|
|
2273
|
-
bannerShellBehavior: plan.topShell.behavior
|
|
2274
|
-
});
|
|
2275
|
-
const rootStyle = isHeaderOverlay ? {
|
|
2276
|
-
...style,
|
|
2277
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
2278
|
-
gridTemplateRows: "1fr auto"
|
|
2279
|
-
} : style;
|
|
2280
|
-
const rootClassName = joinSiteChromeClassNames(minHeightClassName, isHeaderOverlay ? SITE_CHROME_CLASS_NAMES.overlayRoot : SITE_CHROME_CLASS_NAMES.normalFlowRoot, className);
|
|
2281
|
-
if (isHeaderOverlay) {
|
|
2282
|
-
const contentStyle = plan.overlayHeaderClearance.kind === "opening-content" ? {
|
|
2283
|
-
gridColumn: "1",
|
|
2284
|
-
gridRow: "1",
|
|
2285
|
-
[SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR]: plan.overlayHeaderClearance.cssValue
|
|
2286
|
-
} : {
|
|
2287
|
-
gridColumn: "1",
|
|
2288
|
-
gridRow: "1"
|
|
2289
|
-
};
|
|
2290
|
-
return /* @__PURE__ */ jsxs(Root, {
|
|
2291
|
-
role,
|
|
2292
|
-
className: rootClassName,
|
|
2293
|
-
style: rootStyle,
|
|
2294
|
-
"data-site-document-layout": "",
|
|
2295
|
-
"data-site-document-layout-mode": plan.layoutMode,
|
|
2296
|
-
children: [
|
|
2297
|
-
/* @__PURE__ */ jsx("div", {
|
|
2298
|
-
className: joinSiteChromeClassNames(SITE_CHROME_CLASS_NAMES.overlayTopShell, SITE_CHROME_CLASS_NAMES.overlayTopShellPlacementMarker, plan.placement.headerRootClassName),
|
|
2299
|
-
"data-site-document-overlay-top-shell": "",
|
|
2300
|
-
style: {
|
|
2301
|
-
gridColumn: "1",
|
|
2302
|
-
gridRow: "1",
|
|
2303
|
-
alignSelf: "start"
|
|
2304
|
-
},
|
|
2305
|
-
children: topShell
|
|
2306
|
-
}),
|
|
2307
|
-
/* @__PURE__ */ jsx("div", {
|
|
2308
|
-
"data-site-document-overlay-content": plan.overlayHeaderClearance.kind === "opening-content" ? "true" : void 0,
|
|
2309
|
-
className: joinSiteChromeClassNames(SITE_CHROME_CLASS_NAMES.overlayContent, contentClassName),
|
|
2310
|
-
style: contentStyle,
|
|
2311
|
-
children
|
|
2312
|
-
}),
|
|
2313
|
-
/* @__PURE__ */ jsx("div", {
|
|
2314
|
-
className: SITE_CHROME_CLASS_NAMES.overlayFooter,
|
|
2315
|
-
style: {
|
|
2316
|
-
gridColumn: "1",
|
|
2317
|
-
gridRow: "2"
|
|
2318
|
-
},
|
|
2319
|
-
children: footerNode
|
|
2320
|
-
})
|
|
2321
|
-
]
|
|
2322
|
-
});
|
|
2323
|
-
}
|
|
2324
|
-
return /* @__PURE__ */ jsxs(Root, {
|
|
2325
|
-
role,
|
|
2326
|
-
className: rootClassName,
|
|
2327
|
-
style,
|
|
2328
|
-
"data-site-document-layout": "",
|
|
2329
|
-
"data-site-document-layout-mode": plan.layoutMode,
|
|
2330
|
-
children: [
|
|
2331
|
-
topShell,
|
|
2332
|
-
/* @__PURE__ */ jsx("div", {
|
|
2333
|
-
className: joinSiteChromeClassNames(SITE_CHROME_CLASS_NAMES.normalFlowContent, contentClassName),
|
|
2334
|
-
children
|
|
2335
|
-
}),
|
|
2336
|
-
footerNode
|
|
2337
|
-
]
|
|
2338
|
-
});
|
|
2339
|
-
}
|
|
2340
|
-
function joinSiteChromeClassNames(...values) {
|
|
2341
|
-
const className = values.filter(Boolean).join(" ");
|
|
2342
|
-
return className.length > 0 ? className : void 0;
|
|
2343
|
-
}
|
|
2344
|
-
//#endregion
|
|
2345
2270
|
//#region ../blocks/src/system/data/utils.ts
|
|
2346
2271
|
/**
|
|
2347
2272
|
* Normalize data loaders from block definition
|
|
@@ -5912,20 +5837,23 @@ function resolvePreviewThemeRoles(input) {
|
|
|
5912
5837
|
documentTheme: input.renderTheme ?? input.theme
|
|
5913
5838
|
};
|
|
5914
5839
|
}
|
|
5915
|
-
z.object({
|
|
5916
|
-
palette: paletteColorsSchema,
|
|
5917
|
-
paletteMode: paletteModeSchema,
|
|
5918
|
-
typography: z.object({
|
|
5919
|
-
headingFamily: z.string().trim().min(1),
|
|
5920
|
-
bodyFamily: z.string().trim().min(1)
|
|
5921
|
-
}).strict(),
|
|
5922
|
-
corners
|
|
5923
|
-
}).strict();
|
|
5924
5840
|
const DEFAULT_PREVIEW_CHROME_FLOATING_PLACEMENT = Object.freeze({
|
|
5925
5841
|
kind: "anchor-top-right",
|
|
5926
5842
|
topPx: 8,
|
|
5927
5843
|
rightPx: 16
|
|
5928
5844
|
});
|
|
5845
|
+
/** Set by the preview shell on the wrapper around the site's banner. */
|
|
5846
|
+
const PREVIEW_SITE_BANNER_ATTRIBUTE = "data-preview-site-banner";
|
|
5847
|
+
/** Room a rich-text format bar needs above its field: its own height plus the gap. */
|
|
5848
|
+
const FLOATING_BAR_ROOM_PX = 56;
|
|
5849
|
+
/**
|
|
5850
|
+
* A format bar sits above its field while it fits below the site's top chrome,
|
|
5851
|
+
* and drops under the field once it would cover the header or a banner.
|
|
5852
|
+
*/
|
|
5853
|
+
function planFloatingBarSide(input) {
|
|
5854
|
+
const chromeBottomPx = input.headerClearance.kind === "overlay" ? input.headerClearance.px : 0;
|
|
5855
|
+
return input.anchorTopPx - chromeBottomPx >= FLOATING_BAR_ROOM_PX ? "above" : "below";
|
|
5856
|
+
}
|
|
5929
5857
|
function headerClearanceFromPx(px) {
|
|
5930
5858
|
return Number.isFinite(px) && px > 0 ? {
|
|
5931
5859
|
kind: "overlay",
|
|
@@ -6016,6 +5944,97 @@ function isUsableAnchorBox(box) {
|
|
|
6016
5944
|
return Boolean(box && Number.isFinite(box.top) && Number.isFinite(box.right) && Number.isFinite(box.bottom) && Number.isFinite(box.height) && box.height > 0);
|
|
6017
5945
|
}
|
|
6018
5946
|
//#endregion
|
|
5947
|
+
//#region ../preview-next/src/client/preview/useSiteTopChromeClearance.ts
|
|
5948
|
+
const SITE_HEADER_SELECTOR = ".block-site-header";
|
|
5949
|
+
/** The banner's own elements, inside the box-less wrapper the preview shell puts round it. */
|
|
5950
|
+
const SITE_BANNER_SELECTOR = `[${PREVIEW_SITE_BANNER_ATTRIBUTE}] > *`;
|
|
5951
|
+
function findSiteTopChrome() {
|
|
5952
|
+
return {
|
|
5953
|
+
header: document.querySelector(SITE_HEADER_SELECTOR),
|
|
5954
|
+
banners: Array.from(document.querySelectorAll(SITE_BANNER_SELECTOR))
|
|
5955
|
+
};
|
|
5956
|
+
}
|
|
5957
|
+
function clearanceOf({ header, banners }) {
|
|
5958
|
+
return siteTopChromeClearance({
|
|
5959
|
+
header: header ? chromeBox(visibleHeaderPart(header)) : null,
|
|
5960
|
+
banners: banners.map(chromeBox)
|
|
5961
|
+
});
|
|
5962
|
+
}
|
|
5963
|
+
/** One live reading, for chrome that already re-measures itself on layout changes. */
|
|
5964
|
+
function measureSiteTopChromeClearance() {
|
|
5965
|
+
return clearanceOf(findSiteTopChrome());
|
|
5966
|
+
}
|
|
5967
|
+
/**
|
|
5968
|
+
* How far the site's header and any banner stacked with it reach down the
|
|
5969
|
+
* canvas right now. Re-measured on scroll as well as on layout changes, since
|
|
5970
|
+
* sticky chrome and a header scrolling away both change it.
|
|
5971
|
+
*/
|
|
5972
|
+
function useSiteTopChromeClearance() {
|
|
5973
|
+
const [clearance, setClearance] = useState({ kind: "none" });
|
|
5974
|
+
useEffect(() => {
|
|
5975
|
+
const frame = { id: null };
|
|
5976
|
+
const observed = { elements: [] };
|
|
5977
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(() => schedule());
|
|
5978
|
+
const measure = () => {
|
|
5979
|
+
frame.id = null;
|
|
5980
|
+
const chrome = findSiteTopChrome();
|
|
5981
|
+
observe(chrome.header ? [chrome.header, ...chrome.banners] : chrome.banners);
|
|
5982
|
+
const next = clearanceOf(chrome);
|
|
5983
|
+
setClearance((current) => headerClearanceEquals(current, next) ? current : next);
|
|
5984
|
+
};
|
|
5985
|
+
const schedule = () => {
|
|
5986
|
+
if (frame.id === null) frame.id = window.requestAnimationFrame(measure);
|
|
5987
|
+
};
|
|
5988
|
+
const observe = (elements) => {
|
|
5989
|
+
if (!resizeObserver || sameElements(observed.elements, elements)) return;
|
|
5990
|
+
resizeObserver.disconnect();
|
|
5991
|
+
elements.forEach((element) => resizeObserver.observe(element));
|
|
5992
|
+
observed.elements = elements;
|
|
5993
|
+
};
|
|
5994
|
+
measure();
|
|
5995
|
+
const mutationObserver = new MutationObserver(schedule);
|
|
5996
|
+
mutationObserver.observe(document.body, {
|
|
5997
|
+
attributes: true,
|
|
5998
|
+
attributeFilter: ["class"],
|
|
5999
|
+
childList: true,
|
|
6000
|
+
subtree: true
|
|
6001
|
+
});
|
|
6002
|
+
window.addEventListener("resize", schedule);
|
|
6003
|
+
window.addEventListener("scroll", schedule, true);
|
|
6004
|
+
return () => {
|
|
6005
|
+
if (frame.id !== null) window.cancelAnimationFrame(frame.id);
|
|
6006
|
+
resizeObserver?.disconnect();
|
|
6007
|
+
mutationObserver.disconnect();
|
|
6008
|
+
window.removeEventListener("resize", schedule);
|
|
6009
|
+
window.removeEventListener("scroll", schedule, true);
|
|
6010
|
+
};
|
|
6011
|
+
}, []);
|
|
6012
|
+
return clearance;
|
|
6013
|
+
}
|
|
6014
|
+
/** The header's visible bar, when it marks one, rather than its whole box. */
|
|
6015
|
+
function visibleHeaderPart(header) {
|
|
6016
|
+
return Array.from(header.querySelectorAll(SITE_CHROME_VISIBLE_HEADER_SELECTOR)).find((candidate) => {
|
|
6017
|
+
const rect = candidate.getBoundingClientRect();
|
|
6018
|
+
return window.getComputedStyle(candidate).display !== "none" && rect.height > 0 && rect.bottom > 0;
|
|
6019
|
+
}) ?? header;
|
|
6020
|
+
}
|
|
6021
|
+
function chromeBox(element) {
|
|
6022
|
+
const rect = element.getBoundingClientRect();
|
|
6023
|
+
return {
|
|
6024
|
+
top: rect.top,
|
|
6025
|
+
bottom: rect.bottom
|
|
6026
|
+
};
|
|
6027
|
+
}
|
|
6028
|
+
function sameElements(left, right) {
|
|
6029
|
+
return left.length === right.length && left.every((element, index) => element === right[index]);
|
|
6030
|
+
}
|
|
6031
|
+
function headerClearanceEquals(left, right) {
|
|
6032
|
+
switch (left.kind) {
|
|
6033
|
+
case "none": return right.kind === "none";
|
|
6034
|
+
case "overlay": return right.kind === "overlay" && left.px === right.px;
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
6037
|
+
//#endregion
|
|
6019
6038
|
//#region ../preview-next/src/client/preview/PreviewChromeLayer.tsx
|
|
6020
6039
|
const PreviewChromeLayerContext = createContext(null);
|
|
6021
6040
|
function PreviewChromeLayerProvider({ children }) {
|
|
@@ -6234,6 +6253,21 @@ function PreviewChromeFloatingControl({ anchorSelector, anchorTargetSelector, pl
|
|
|
6234
6253
|
children
|
|
6235
6254
|
}), layer.portalTarget)] });
|
|
6236
6255
|
}
|
|
6256
|
+
/** Where a format bar goes for its field right now, in the chrome layer's coordinates. */
|
|
6257
|
+
function measureFloatingBarPosition(anchor, portalTarget, gapPx) {
|
|
6258
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
6259
|
+
const layerRect = portalTarget.getBoundingClientRect();
|
|
6260
|
+
const placement = planFloatingBarSide({
|
|
6261
|
+
anchorTopPx: anchorRect.top,
|
|
6262
|
+
headerClearance: measureSiteTopChromeClearance()
|
|
6263
|
+
});
|
|
6264
|
+
return {
|
|
6265
|
+
left: anchorRect.left - layerRect.left,
|
|
6266
|
+
top: placement === "above" ? anchorRect.top - layerRect.top - gapPx : anchorRect.bottom - layerRect.top + gapPx,
|
|
6267
|
+
width: anchorRect.width,
|
|
6268
|
+
placement
|
|
6269
|
+
};
|
|
6270
|
+
}
|
|
6237
6271
|
function PreviewChromeFloatingBar({ anchorSelector, gapPx = 8, children }) {
|
|
6238
6272
|
const layer = usePreviewChromeLayerOptional();
|
|
6239
6273
|
const probeRef = useRef(null);
|
|
@@ -6258,16 +6292,8 @@ function PreviewChromeFloatingBar({ anchorSelector, gapPx = 8, children }) {
|
|
|
6258
6292
|
setPosition(null);
|
|
6259
6293
|
return;
|
|
6260
6294
|
}
|
|
6261
|
-
const anchorRect = anchor.getBoundingClientRect();
|
|
6262
|
-
const layerRect = portalTarget.getBoundingClientRect();
|
|
6263
|
-
const placement = anchorRect.top >= 56 ? "above" : "below";
|
|
6264
6295
|
setThemeCustomProperties(readThemeCustomProperties(anchor));
|
|
6265
|
-
setPosition(
|
|
6266
|
-
left: anchorRect.left - layerRect.left,
|
|
6267
|
-
top: placement === "above" ? anchorRect.top - layerRect.top - gapPx : anchorRect.bottom - layerRect.top + gapPx,
|
|
6268
|
-
width: anchorRect.width,
|
|
6269
|
-
placement
|
|
6270
|
-
});
|
|
6296
|
+
setPosition(measureFloatingBarPosition(anchor, portalTarget, gapPx));
|
|
6271
6297
|
};
|
|
6272
6298
|
update();
|
|
6273
6299
|
const unsubscribe = layer.subscribeLayout(update);
|
|
@@ -7714,6 +7740,8 @@ function PreviewThemedSiteDocument({ children, themeRuntime = defaultPreviewThem
|
|
|
7714
7740
|
const { effectiveTheme: overlayTheme } = usePreviewThemeOverlay();
|
|
7715
7741
|
const effectiveTheme = usePreviewOpeningTheme(overlayTheme);
|
|
7716
7742
|
const headerNode = renderPreviewHeader(siteChromeRenderModel, effectiveTheme, staticHeaderNode);
|
|
7743
|
+
const siteDocumentPlan = planPreviewSiteDocument(effectiveTheme, bannerNode, headerNode);
|
|
7744
|
+
const footerNode = renderPreviewFooter(siteChromeRenderModel, effectiveTheme, staticFooterNode);
|
|
7717
7745
|
const documentNode = renderPreviewDocument({
|
|
7718
7746
|
viewportMode,
|
|
7719
7747
|
viewportWidth,
|
|
@@ -7721,14 +7749,26 @@ function PreviewThemedSiteDocument({ children, themeRuntime = defaultPreviewThem
|
|
|
7721
7749
|
contentHeight,
|
|
7722
7750
|
scaleContainerRef,
|
|
7723
7751
|
contentRef,
|
|
7724
|
-
siteDocumentPlan
|
|
7752
|
+
siteDocumentPlan,
|
|
7725
7753
|
headerNode,
|
|
7726
|
-
bannerNode,
|
|
7727
|
-
footerNode
|
|
7754
|
+
bannerNode: markPreviewSiteBanner(bannerNode),
|
|
7755
|
+
footerNode,
|
|
7728
7756
|
children
|
|
7729
7757
|
});
|
|
7730
7758
|
return renderThemedDocument(themeRuntime, effectiveTheme, resolveDocumentResponsiveMode(themeRuntime, useContainerResponsiveMode), documentNode);
|
|
7731
7759
|
}
|
|
7760
|
+
/**
|
|
7761
|
+
* The shell marks whatever banner it's given, so preview chrome can stay clear
|
|
7762
|
+
* of it without the site's own markup having to cooperate (SDK sites render
|
|
7763
|
+
* their own). The wrapper has no box; the banner's elements are its children.
|
|
7764
|
+
*/
|
|
7765
|
+
function markPreviewSiteBanner(bannerNode) {
|
|
7766
|
+
return bannerNode ? /* @__PURE__ */ jsx("div", {
|
|
7767
|
+
[PREVIEW_SITE_BANNER_ATTRIBUTE]: "",
|
|
7768
|
+
style: { display: "contents" },
|
|
7769
|
+
children: bannerNode
|
|
7770
|
+
}) : null;
|
|
7771
|
+
}
|
|
7732
7772
|
function renderPreviewFooter(model, theme, fallback) {
|
|
7733
7773
|
if (!model || model.footer.canRenderReactively === false) return fallback;
|
|
7734
7774
|
return /* @__PURE__ */ jsx(SiteChromeEditableSurface, {
|
|
@@ -7915,10 +7955,10 @@ function resolveShellThemeRoles(props) {
|
|
|
7915
7955
|
}
|
|
7916
7956
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
7917
7957
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
7918
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
7958
|
+
return { default: (await import("./PreviewEditorSidebar-Dvq-RW9-.mjs")).PreviewEditorSidebar };
|
|
7919
7959
|
});
|
|
7920
7960
|
const PreviewEditorUI = React.lazy(async () => {
|
|
7921
|
-
return { default: (await import("./PreviewEditorUI-
|
|
7961
|
+
return { default: (await import("./PreviewEditorUI-BdFjS39R.mjs")).PreviewEditorUI };
|
|
7922
7962
|
});
|
|
7923
7963
|
const previewPaneContainmentStyle = {
|
|
7924
7964
|
contain: "layout paint",
|
|
@@ -8356,24 +8396,30 @@ function PreviewShell(props) {
|
|
|
8356
8396
|
...props,
|
|
8357
8397
|
hideSiteStyleConfigurator: props.hideSiteStyleConfigurator ?? false
|
|
8358
8398
|
});
|
|
8359
|
-
return /* @__PURE__ */
|
|
8360
|
-
session: props.previewSession,
|
|
8361
|
-
token: props.previewToken,
|
|
8399
|
+
return /* @__PURE__ */ jsxs(LocationPickerEnvironmentProvider, {
|
|
8362
8400
|
siteId: props.siteId,
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8401
|
+
apiClient,
|
|
8402
|
+
tilesKey: props.previewSession?.tilesKey,
|
|
8403
|
+
dashboardBaseUrl: props.dashboardBaseUrl ?? props.apiBaseUrl,
|
|
8404
|
+
children: [/* @__PURE__ */ jsx(ToastProvider, {}), /* @__PURE__ */ jsx(PreviewQueryProvider, { children: /* @__PURE__ */ jsx(PreviewAuthInit, {
|
|
8405
|
+
session: props.previewSession,
|
|
8406
|
+
token: props.previewToken,
|
|
8407
|
+
siteId: props.siteId,
|
|
8408
|
+
siteSlug: props.siteSlug,
|
|
8409
|
+
pageId: props.editableId,
|
|
8410
|
+
children: /* @__PURE__ */ jsx(PreviewBlockApiProvider, {
|
|
8411
|
+
config: props.blockApiConfig,
|
|
8412
|
+
children: /* @__PURE__ */ jsx(PreviewEditingModeProvider, {
|
|
8413
|
+
siteId: props.siteId,
|
|
8414
|
+
children: /* @__PURE__ */ jsx(PreviewEditorMount, {
|
|
8415
|
+
props,
|
|
8416
|
+
apiClient,
|
|
8417
|
+
access
|
|
8418
|
+
})
|
|
8373
8419
|
})
|
|
8374
8420
|
})
|
|
8375
|
-
})
|
|
8376
|
-
})
|
|
8421
|
+
}) })]
|
|
8422
|
+
});
|
|
8377
8423
|
}
|
|
8378
8424
|
function previewJournalScope(props) {
|
|
8379
8425
|
const nodeId = props.pageId ?? props.entryData?.id;
|
|
@@ -8455,6 +8501,46 @@ function resolveShellAccess(input) {
|
|
|
8455
8501
|
};
|
|
8456
8502
|
}
|
|
8457
8503
|
//#endregion
|
|
8504
|
+
//#region ../preview-next/src/client/blocks/authoringLocationMaps.ts
|
|
8505
|
+
/** A render-only projection. Canonical drafts in the editor store remain untouched. */
|
|
8506
|
+
function projectAuthoringLocationMaps(page, admitted, siteCountry) {
|
|
8507
|
+
const ready = new Map((admitted?.blocks ?? []).flatMap((block) => {
|
|
8508
|
+
const parsed = publicLocationSchema.safeParse(block.content?.location);
|
|
8509
|
+
return block.id && parsed.success ? [[block.id, parsed.data]] : [];
|
|
8510
|
+
}));
|
|
8511
|
+
return {
|
|
8512
|
+
...page,
|
|
8513
|
+
blocks: page.blocks.map((block) => {
|
|
8514
|
+
if (block.kind !== "block.location-map") return block;
|
|
8515
|
+
const project = (content) => projectAuthoringMapContent(content, block.id ? ready.get(block.id) : void 0, siteCountry);
|
|
8516
|
+
return {
|
|
8517
|
+
...block,
|
|
8518
|
+
content: project(block.content),
|
|
8519
|
+
draftContent: block.draftContent ? project(block.draftContent) : block.draftContent
|
|
8520
|
+
};
|
|
8521
|
+
})
|
|
8522
|
+
};
|
|
8523
|
+
}
|
|
8524
|
+
function projectAuthoringMapContent(content, ready, siteCountry) {
|
|
8525
|
+
if (!content || content.locationSource === "business_address" || content.locationSource === "venue") return content ?? void 0;
|
|
8526
|
+
const canonical = parseLocationValue(content.location ?? null);
|
|
8527
|
+
if (!canonical.ok || canonical.value === null) return content;
|
|
8528
|
+
const location = projectPublicLocation(canonical.value, siteCountry);
|
|
8529
|
+
const drawing = drawingAtCurrentPin(location, ready);
|
|
8530
|
+
return {
|
|
8531
|
+
...content,
|
|
8532
|
+
location: {
|
|
8533
|
+
...location,
|
|
8534
|
+
...drawing ? { drawing } : {}
|
|
8535
|
+
}
|
|
8536
|
+
};
|
|
8537
|
+
}
|
|
8538
|
+
/** Geometry identity is the pin, never the block ID or an older address label. */
|
|
8539
|
+
function drawingAtCurrentPin(location, ready) {
|
|
8540
|
+
if (!ready?.pin || !location.pin) return void 0;
|
|
8541
|
+
return ready.pin.lat === location.pin.lat && ready.pin.lng === location.pin.lng ? ready.drawing : void 0;
|
|
8542
|
+
}
|
|
8543
|
+
//#endregion
|
|
8458
8544
|
//#region ../preview-next/src/client/blocks/composer/mergeDrafts.ts
|
|
8459
8545
|
const EMPTY_LINKED_ENTRY_OVERLAY = /* @__PURE__ */ new Map();
|
|
8460
8546
|
/**
|
|
@@ -8892,8 +8978,9 @@ function ToolbarLook({ controls, toolbar, onCycleSdk, onCycleLegacy }) {
|
|
|
8892
8978
|
onCycle: onCycleSdk
|
|
8893
8979
|
}) : null;
|
|
8894
8980
|
}
|
|
8895
|
-
if (toolbar?.controls.look) return toolbar.controls.
|
|
8981
|
+
if (toolbar?.controls.look) return toolbar.controls.tiles.length > 1 ? /* @__PURE__ */ jsx(ArrangementLookPill, {
|
|
8896
8982
|
look: toolbar.controls.look,
|
|
8983
|
+
position: lookTilePosition(toolbar.controls.tiles),
|
|
8897
8984
|
onCycle: toolbar.cycleLook
|
|
8898
8985
|
}) : null;
|
|
8899
8986
|
if (!controls.designBlock) return null;
|
|
@@ -9271,85 +9358,6 @@ function formatBlockKindLabel(blockKind) {
|
|
|
9271
9358
|
return ((blockKind.includes(".") ? blockKindParts[blockKindParts.length - 1] : blockKind) ?? blockKind).split(/[-_]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
9272
9359
|
}
|
|
9273
9360
|
//#endregion
|
|
9274
|
-
//#region ../preview-next/src/client/preview/useSiteTopChromeClearance.ts
|
|
9275
|
-
const SITE_HEADER_SELECTOR = ".block-site-header";
|
|
9276
|
-
/** Announcement banners mark themselves so preview chrome can stay clear of them. */
|
|
9277
|
-
const SITE_BANNER_SELECTOR = "[data-site-banner]";
|
|
9278
|
-
/**
|
|
9279
|
-
* How far the site's header and any banner stacked with it reach down the
|
|
9280
|
-
* canvas right now. Re-measured on scroll as well as on layout changes, since
|
|
9281
|
-
* sticky chrome and a header scrolling away both change it.
|
|
9282
|
-
*/
|
|
9283
|
-
function useSiteTopChromeClearance() {
|
|
9284
|
-
const [clearance, setClearance] = useState({ kind: "none" });
|
|
9285
|
-
useEffect(() => {
|
|
9286
|
-
const frame = { id: null };
|
|
9287
|
-
const observed = { elements: [] };
|
|
9288
|
-
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(() => schedule());
|
|
9289
|
-
const measure = () => {
|
|
9290
|
-
frame.id = null;
|
|
9291
|
-
const header = document.querySelector(SITE_HEADER_SELECTOR);
|
|
9292
|
-
const banners = Array.from(document.querySelectorAll(SITE_BANNER_SELECTOR));
|
|
9293
|
-
observe(header ? [header, ...banners] : banners);
|
|
9294
|
-
const next = siteTopChromeClearance({
|
|
9295
|
-
header: header ? chromeBox(visibleHeaderPart(header)) : null,
|
|
9296
|
-
banners: banners.map(chromeBox)
|
|
9297
|
-
});
|
|
9298
|
-
setClearance((current) => headerClearanceEquals(current, next) ? current : next);
|
|
9299
|
-
};
|
|
9300
|
-
const schedule = () => {
|
|
9301
|
-
if (frame.id === null) frame.id = window.requestAnimationFrame(measure);
|
|
9302
|
-
};
|
|
9303
|
-
const observe = (elements) => {
|
|
9304
|
-
if (!resizeObserver || sameElements(observed.elements, elements)) return;
|
|
9305
|
-
resizeObserver.disconnect();
|
|
9306
|
-
elements.forEach((element) => resizeObserver.observe(element));
|
|
9307
|
-
observed.elements = elements;
|
|
9308
|
-
};
|
|
9309
|
-
measure();
|
|
9310
|
-
const mutationObserver = new MutationObserver(schedule);
|
|
9311
|
-
mutationObserver.observe(document.body, {
|
|
9312
|
-
attributes: true,
|
|
9313
|
-
attributeFilter: ["class"],
|
|
9314
|
-
childList: true,
|
|
9315
|
-
subtree: true
|
|
9316
|
-
});
|
|
9317
|
-
window.addEventListener("resize", schedule);
|
|
9318
|
-
window.addEventListener("scroll", schedule, true);
|
|
9319
|
-
return () => {
|
|
9320
|
-
if (frame.id !== null) window.cancelAnimationFrame(frame.id);
|
|
9321
|
-
resizeObserver?.disconnect();
|
|
9322
|
-
mutationObserver.disconnect();
|
|
9323
|
-
window.removeEventListener("resize", schedule);
|
|
9324
|
-
window.removeEventListener("scroll", schedule, true);
|
|
9325
|
-
};
|
|
9326
|
-
}, []);
|
|
9327
|
-
return clearance;
|
|
9328
|
-
}
|
|
9329
|
-
/** The header's visible bar, when it marks one, rather than its whole box. */
|
|
9330
|
-
function visibleHeaderPart(header) {
|
|
9331
|
-
return Array.from(header.querySelectorAll(SITE_CHROME_VISIBLE_HEADER_SELECTOR)).find((candidate) => {
|
|
9332
|
-
const rect = candidate.getBoundingClientRect();
|
|
9333
|
-
return window.getComputedStyle(candidate).display !== "none" && rect.height > 0 && rect.bottom > 0;
|
|
9334
|
-
}) ?? header;
|
|
9335
|
-
}
|
|
9336
|
-
function chromeBox(element) {
|
|
9337
|
-
const rect = element.getBoundingClientRect();
|
|
9338
|
-
return {
|
|
9339
|
-
top: rect.top,
|
|
9340
|
-
bottom: rect.bottom
|
|
9341
|
-
};
|
|
9342
|
-
}
|
|
9343
|
-
function sameElements(left, right) {
|
|
9344
|
-
return left.length === right.length && left.every((element, index) => element === right[index]);
|
|
9345
|
-
}
|
|
9346
|
-
function headerClearanceEquals(left, right) {
|
|
9347
|
-
switch (left.kind) {
|
|
9348
|
-
case "none": return right.kind === "none";
|
|
9349
|
-
case "overlay": return right.kind === "overlay" && left.px === right.px;
|
|
9350
|
-
}
|
|
9351
|
-
}
|
|
9352
|
-
//#endregion
|
|
9353
9361
|
//#region ../preview-next/src/client/blocks/previewBatchLoaderParams.ts
|
|
9354
9362
|
function isBatchableEndpoint(endpoint) {
|
|
9355
9363
|
return endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow" || endpoint === "getPublicEventDetails" || endpoint === "listPublicRouteCandidates" || endpoint === "listPublicTeamMembers" || endpoint === "listPublicProducts" || endpoint === "getPublicBookingServices" || endpoint === "getPublicWeeklySlotAvailability" || endpoint === "getPublicFormById";
|
|
@@ -9564,7 +9572,7 @@ function EditableDraftPageRenderer(props) {
|
|
|
9564
9572
|
return applyPreviewStructureProjections(blockItems, aiProjections);
|
|
9565
9573
|
}, [aiProjections, blockItems]);
|
|
9566
9574
|
const dateContext = usePreviewDateContext(pageRendererProps.dataContext);
|
|
9567
|
-
const
|
|
9575
|
+
const mergedPage = useMemo(() => {
|
|
9568
9576
|
return composePageFromBlocks({
|
|
9569
9577
|
page: pageRendererProps.page,
|
|
9570
9578
|
dateContext,
|
|
@@ -9582,12 +9590,17 @@ function EditableDraftPageRenderer(props) {
|
|
|
9582
9590
|
remoteDrafts,
|
|
9583
9591
|
contentSnapshot,
|
|
9584
9592
|
renderSource
|
|
9585
|
-
])
|
|
9593
|
+
]);
|
|
9594
|
+
const renderPage = useMemo(() => projectAuthoringLocationMaps(mergedPage ?? {
|
|
9586
9595
|
name: "",
|
|
9587
9596
|
path: "",
|
|
9588
9597
|
purpose: "",
|
|
9589
9598
|
blocks: []
|
|
9590
|
-
}
|
|
9599
|
+
}, pageRendererProps.page, linkedEntryDataContext?.siteCountry), [
|
|
9600
|
+
mergedPage,
|
|
9601
|
+
pageRendererProps.page,
|
|
9602
|
+
linkedEntryDataContext?.siteCountry
|
|
9603
|
+
]);
|
|
9591
9604
|
const runtimeJoins = editorRuntimeJoins(runtimeProjection, pageRendererProps.runtimeJoins);
|
|
9592
9605
|
const renderedBlockById = useMemo(() => {
|
|
9593
9606
|
return new Map((renderPage?.blocks ?? []).filter((block) => Boolean(block.id)).map((block) => [block.id, block]));
|