@riverbankcms/sdk 0.166.0 → 0.168.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/CHANGELOG.md +7 -0
- package/README.md +5 -0
- package/dist/_dts/{BlocksIslandsHydrator-CPvN6RBW.d.ts → BlocksIslandsHydrator-CiD_VVGM.d.ts} +1 -1
- package/dist/_dts/{Page-rW0xgQCA.d.ts → Page-Bj6VJRS5.d.ts} +9 -8
- package/dist/_dts/{SdkPreviewMode-BWZh2WCk.d.ts → SdkPreviewMode-ChpsnwDX.d.ts} +2 -2
- package/dist/_dts/{client-D4BXQEZc.d.ts → client-C8mfUxrJ.d.ts} +73 -35
- package/dist/_dts/{content-types-MUzta0l9.d.ts → content-types-_vXZyR4H.d.ts} +2 -2
- package/dist/_dts/{contracts-Cl9Xh1DO.d.ts → contracts-CJFfrVKU.d.ts} +9 -5
- package/dist/_dts/{footerPageOutline-4BgLKehl.d.ts → footerPageOutline-CMegb23G.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-BsmJ0qKh.d.ts → generatePageMetadata-D9YdAIMh.d.ts} +2 -2
- package/dist/_dts/{index-DdcwPqQN.d.ts → index-BQXaZ7aY.d.ts} +4 -4
- package/dist/_dts/{index-ahxQCUc7.d.ts → index-Bpr-wT5k.d.ts} +2 -2
- package/dist/_dts/{index--qflsCiy.d.ts → index-C7_Rz8EY.d.ts} +3 -3
- package/dist/_dts/{index-kQ5xkM6X.d.ts → index-Cx2BQlHL.d.ts} +3 -3
- package/dist/_dts/{index-Bmboeb49.d.ts → index-Dgz6yhsy.d.ts} +1 -1
- package/dist/_dts/index-Vh8B9FSa.d.ts +14 -0
- package/dist/_dts/{index-BgJ2aU5c.d.ts → index-vR3p9Bu-.d.ts} +2 -2
- package/dist/_dts/{loadContent-BG5IAV-V.d.ts → loadContent-dhWSgLeS.d.ts} +7 -7
- package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +1 -0
- package/dist/_dts/{index-wbBZ0awa.d.ts → request-BrYhNV9Z.d.ts} +81287 -47810
- package/dist/_dts/{resolveBlockData-Cmcle_zV.d.ts → resolveBlockData-BfSHm8Ms.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BRJUTFoH.d.ts → resolvePageContent-gZJ4i1wN.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/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +6 -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/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -5
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-BX3Y-EW3.d.ts → types-BB33-Spd.d.ts} +3 -3
- package/dist/_dts/{types-DF54stxv.d.ts → types-BVFXYtRg.d.ts} +7 -7
- package/dist/_dts/{types-DuiHLiPo.d.ts → types-FOsJ-KYb.d.ts} +4 -2
- package/dist/_dts/{validation-Bxi0f81D.d.ts → validation-DckTc6TQ.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DwiRGtgh.mjs → BlocksIslandsHydrator-DcwEaliO.mjs} +21 -21
- package/dist/client/BookingMailingListNote-Dsugoe-n.mjs +946 -0
- package/dist/client/BookingQuestionFields-Bhh0cvsl.mjs +359 -0
- package/dist/client/{CalendarNavigationChevron-5a0x0vcC.mjs → CalendarNavigationChevron-CNe3ZjdC.mjs} +166 -17
- package/dist/client/{CheckboxChoice-CZ-anOqV.mjs → CheckboxChoice-W_uiRgDK.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-B2qLkPRB.mjs → DemoBookingPortalAccess-BeiZxEUJ.mjs} +7 -7
- package/dist/client/{EventCalendar.client-BhADnDCg.mjs → EventCalendar.client-BL943-tl.mjs} +11 -30
- package/dist/client/{EventCombined.client-jik34zTb.mjs → EventCombined.client-BFVxECTp.mjs} +137 -61
- package/dist/client/{EventEmbeddedCheckoutStep-D_14yqAU.mjs → EventEmbeddedCheckoutStep-Cf-HRHtb.mjs} +1 -1
- package/dist/client/{EventItem-CMKrtkT7.mjs → EventItem-BIc4gjiD.mjs} +86 -17
- package/dist/client/{EventListWeekNavigation-AGHjxy6C.mjs → EventListWeekNavigation-a0QEIEf0.mjs} +1 -1
- package/dist/client/{EventListing.client-DZeDM0Qt.mjs → EventListing.client-CEFTC3jH.mjs} +3 -3
- package/dist/client/{EventListing.view-3BBRdNVa.mjs → EventListing.view-Bt2sBBms.mjs} +41 -50
- package/dist/client/{EventRegistrationPayment-CpNcpga4.mjs → EventRegistrationPayment-D9YBNb_E.mjs} +255 -40
- package/dist/client/{LocationMapActions-D5-H9ooQ.mjs → LocationMapActions-gqzt5gkW.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-C30geMl-.mjs → MapDrawingSvg-13JQI7_z.mjs} +22 -2
- package/dist/client/{Page-DNDZLRlB.mjs → Page-D_M2Vxz3.mjs} +26063 -22139
- package/dist/client/{ProtectedSubmitButton-8DuDw2ag.mjs → ProtectedSubmitButton-C3H26pN9.mjs} +1 -1
- package/dist/client/{StepIndicator-Bin7YR0A.mjs → StepIndicator-CaN8snZ8.mjs} +3 -3
- package/dist/client/{TabBarFragment-_IAthZVM.mjs → TabBarFragment-DkVKtK5a.mjs} +19 -19
- package/dist/client/{ThemedButton-8jUc02mZ.mjs → ThemedButton-BdnEwA38.mjs} +2 -5
- package/dist/client/accessibleSurfaces-chpD4C2c.mjs +4278 -0
- package/dist/client/{accordion-uVqNowRX.mjs → accordion-DE7OG--d.mjs} +1 -1
- package/dist/client/{booking-form.client-w-PvyWBv.mjs → booking-form.client-CS1PPjw7.mjs} +842 -374
- package/dist/client/{bookingForm-DNMojb6A.mjs → bookingForm-DE2CwIU9.mjs} +5 -4
- package/dist/client/{src-DjnxOjXG.mjs → bookingQuestionValues-BjcyCru5.mjs} +88 -1
- package/dist/client/bookingQuestions-BHq83mzS.mjs +13 -0
- package/dist/client/bookings.mjs +18 -13
- package/dist/client/{carousel-C8kxI3Dm.mjs → carousel-DZyUdnFh.mjs} +3 -3
- package/dist/client/{carousel.client-BO7sCEpH.mjs → carousel.client-BD4DXMtI.mjs} +62 -16
- package/dist/client/{carousel.shared-DBnWEJzo.mjs → carousel.shared-BFQ3kBEw.mjs} +6 -3
- package/dist/client/{cart-DCxjE3Is.mjs → cart-D7HkkNwe.mjs} +3 -3
- package/dist/client/{cart.client-Ceeng8fB.mjs → cart.client-H4sv2TpD.mjs} +1 -1
- package/dist/client/{checkout-B0EKbeVv.mjs → checkout-2qVyG-Sh.mjs} +3 -3
- package/dist/client/{checkout.client-DtPj3fYk.mjs → checkout.client-DAjrBZ74.mjs} +1 -1
- package/dist/client/client.mjs +325 -65
- package/dist/client/{context-n6IZigd3.mjs → context-DXmIbXCK.mjs} +300 -3
- package/dist/client/{cta-CDeAwYoN.mjs → cta-DP_IBnq3.mjs} +2 -2
- package/dist/client/{dateFormatting-BWPzdeZE.mjs → dateFormatting-CwrkFZTr.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BdXu0fj-.mjs → demoPortalMagicLink-DQXK-Fh6.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-VHfv8M6-.mjs → enhanceHeaderSection-DheQj7rg.mjs} +4 -4
- package/dist/client/{event-details.client-Cfr1_Cj4.mjs → event-details.client-C5UufcRp.mjs} +1 -1
- package/dist/client/{event-registration.client-BhygihpQ.mjs → event-registration.client-CMGg63IU.mjs} +73 -239
- package/dist/client/{eventCalendar-B4XCL9u6.mjs → eventCalendar-DlD0GCEy.mjs} +4 -4
- package/dist/client/{eventCombined-DVjz4wdf.mjs → eventCombined-DoSi8p_l.mjs} +4 -4
- package/dist/client/{eventDetails-B0DA1Nw1.mjs → eventDetails-DzuQYgmO.mjs} +2 -2
- package/dist/client/{eventListing-2-xjn2nz.mjs → eventListing-CkiMjl0g.mjs} +4 -4
- package/dist/client/{eventRegistration-ng4iGo9O.mjs → eventRegistration-CjS3Zpjp.mjs} +4 -4
- package/dist/client/{form-BeNQiZ2V.mjs → form-DgQqm7T2.mjs} +3 -3
- package/dist/client/{form.client-BFdCKlp7.mjs → form.client-BI9Dcsq5.mjs} +5 -5
- package/dist/client/{form.parts-C7gLK3jh.mjs → form.parts-DevF0L_A.mjs} +3 -3
- package/dist/client/{formatDate-CWfelfMt.mjs → formatDate-DDyURjoe.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CalNAShx.mjs → headerSection-DYIG6Pwb.mjs} +2 -2
- package/dist/client/{mediaAssets-DpPauppt.mjs → mediaAssets-B99AP7ai.mjs} +1 -1
- package/dist/client/{mediaContext-BLo4NtjP.mjs → mediaContext-Fusweriw.mjs} +1 -1
- package/dist/client/{newsletter-form.client-Dq7GHGXU.mjs → newsletter-form.client-BWp7Y1e1.mjs} +6 -6
- package/dist/client/{newsletter-form.parts-BSMDYQiS.mjs → newsletter-form.parts-Dg8s9NwJ.mjs} +2 -2
- package/dist/client/{newsletterForm-snzZ4L6i.mjs → newsletterForm-DnPraMzx.mjs} +3 -3
- package/dist/client/{noop-D-RG9eR3.mjs → noop-ByFRHYQ2.mjs} +456 -491
- package/dist/client/portal/client.mjs +76 -229
- package/dist/client/{product-detail.client-Gu0INDb7.mjs → product-detail.client-BFAgHrdg.mjs} +1 -1
- package/dist/client/{product-list.client-BmH40fNf.mjs → product-list.client-DVrs_DyY.mjs} +1 -1
- package/dist/client/{productDetail-DsPUmJ0z.mjs → productDetail-D4rvl6Xg.mjs} +3 -3
- package/dist/client/{productList-DjGrjOwD.mjs → productList-B8o5AOMX.mjs} +3 -3
- package/dist/client/{propsDecoder-kTVPMnfD.mjs → propsDecoder-hhotPP6P.mjs} +5 -5
- package/dist/client/{registry.server-CKK_RXZo.mjs → registry.server-Ch3EpupA.mjs} +2296 -2489
- package/dist/client/{surfaceTransportMarker-BXepAVF6.mjs → renderableMediaAssetAdmission-BlfqYLJW.mjs} +1 -18
- package/dist/client/rendering/client.mjs +30 -30
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +10 -9
- package/dist/client/{richText-coerce-BcjTX-7h.mjs → richText-coerce-C3LabQ1O.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CaXesATK.mjs → routeIslandApiConfig-CQGlxId8.mjs} +1 -1
- package/dist/client/runtimeResponse-BP-L6exS.mjs +3 -0
- package/dist/client/runtimeResponse-Dg4XFsuM.mjs +9 -0
- package/dist/client/{shop-commerce-BxYYXLNK.mjs → shop-commerce-VDbVaKY-.mjs} +12 -12
- package/dist/client/{shop-commerce-store-Dp3Nl5YK.mjs → shop-commerce-store-DqdgJ8Zw.mjs} +1 -1
- package/dist/client/{shop-DLufMauE.mjs → shop-rRXplPGZ.mjs} +3 -3
- package/dist/client/{shop.client-CBy9_alG.mjs → shop.client-DdwvMvaK.mjs} +13 -13
- package/dist/client/{shop.interactive-BM0NRsFQ.mjs → shop.interactive-C8OvFY06.mjs} +167 -68
- package/dist/client/{shopShared-lS23OQE-.mjs → shopShared-BeuJiGPU.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/surfaceTransportMarker-BuwkYxsI.mjs +19 -0
- package/dist/client/{timetableModel-DzRWikCU.mjs → timetableModel-Cko9LRKy.mjs} +13 -158
- package/dist/client/{types-sF-IrGQr.mjs → types-5fOsPIpL.mjs} +248 -111
- package/dist/client/{useAvailableSlots-C3LphWDX.mjs → useAvailableSlots-M6QIEiWf.mjs} +3 -3
- package/dist/client/{useDiscountApply-SLoWhcen.mjs → useDiscountApply-BJSnyO0f.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-D6a2BJij.mjs → useDiscountCodeUi-D3XnOSCi.mjs} +1 -1
- package/dist/client/{useEventPagination-Ccr4TZlm.mjs → useEventPagination-PhTIoFVX.mjs} +7 -7
- package/dist/client/{view-DAVEoe8A.mjs → view-448wvvEY.mjs} +21 -12
- package/dist/client/{view-8w4GA8rf.mjs → view-L_mkgtnk.mjs} +4 -4
- package/dist/client/{site-styles-DELkUk9s.mjs → wizardSteps-CFulHWnT.mjs} +19371 -17045
- package/dist/preview-next/client/{ArrangementLookControls-DY5TzhEa.mjs → ArrangementLookControls-BpvnOGlN.mjs} +26 -17
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-C_h1cMYm.mjs → EventEmbeddedCheckoutStep-8-qtHjpb.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-D56RD3e_.mjs → LocationPickerEnvironment-CZQ4vkRe.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-DFnyCckr.mjs → MapLibreEditMap-CP4w7T_0.mjs} +2 -2
- package/dist/preview-next/client/{PreviewEditorSidebar-DdnhmdFO.mjs → PreviewEditorSidebar-C0OtdWu_.mjs} +432 -127
- package/dist/preview-next/client/{PreviewEditorUI-C7ZmYE33.mjs → PreviewEditorUI-Csc5vH5k.mjs} +6 -6
- package/dist/preview-next/client/{PreviewShell-DnO38NaL.mjs → PreviewShell-BOLH_pm-.mjs} +252 -158
- package/dist/preview-next/client/{SdkPreviewModeRuntime-D2OtoRMB.mjs → SdkPreviewModeRuntime-CKodLReY.mjs} +31 -32
- package/dist/preview-next/client/{SiteChromeCustomizeButton-eIu2RejJ.mjs → SiteChromeCustomizeButton-BeEZpeKn.mjs} +19484 -18082
- package/dist/preview-next/client/{ThemedButton-C0dgGJ5k.mjs → ThemedButton-BQU45t-E.mjs} +260 -121
- package/dist/preview-next/client/{lucide-react-CPBCf6QT.mjs → lucide-react-DkZ8fO-G.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-Bp1AlAxx.mjs → previewAssistantSlot-BBdN5kfY.mjs} +21470 -16697
- package/dist/preview-next/client/{previewChromeSurface-D2cREDJ5.mjs → previewChromeSurface-VZtGwPuH.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DK0PUhLL.mjs → sdk-runtime-kiZkMcuR.mjs} +2 -2
- package/dist/preview-next/client/{useAutosaveStatus--Pw8vnef.mjs → useAutosaveStatus-BiIHEeE0.mjs} +2 -2
- package/dist/preview-next/client/{useBlockCustomizeControls-C1Rl73N4.mjs → useBlockCustomizeControls-BuFLIpmX.mjs} +2 -93
- package/dist/preview-next/client/{useOpenBlockForSetup-CL3842FM.mjs → useOpenBlockForSetup-DlxYgmh_.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-Bq7SUX3K.mjs → route-contract-C0sCvCYL.mjs} +248 -0
- package/dist/server/{Block.shared-wXr7Iwhs.mjs → Block.shared-Dnhc0Wu5.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BI2mld9R.mjs → ThemeScopeCore-NAQ_zsFu.mjs} +1173 -148
- package/dist/server/{accessibleSurfaces-CuN8U_iU.mjs → accessibleSurfaces-108nxyGc.mjs} +520 -129
- package/dist/server/{bindings-DjdUq9FR.mjs → bindings-DLoZYUxG.mjs} +2 -2
- package/dist/server/{client-07UeMDzA.mjs → client-Bc8jI8zN.mjs} +346 -63
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +1 -1
- package/dist/server/{validation-CDd6m8Ry.mjs → customCss-QymcmOZ-.mjs} +12 -55
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/headerVariant-BwR9NV4b.mjs +463 -0
- package/dist/server/{identity-Bn9OQiT1.mjs → identity-20XHqyuO.mjs} +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-ClpaSlBb.mjs → loadContent-D61gpqHB.mjs} +4 -5
- package/dist/server/{loadPage-BwtVqpaA.mjs → loadPage-B4ZYpIcd.mjs} +2 -2
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/{media-DnlczCMA.mjs → media-Brn9FW5s.mjs} +15 -1
- package/dist/server/metadata.mjs +5 -1
- package/dist/server/{mode-Cv_TG9gP.mjs → mode-bkFS8glh.mjs} +4 -2
- package/dist/server/next/revalidate.mjs +9 -4
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-3YSDPtDe.mjs → opaqueSurface-BawlEAd_.mjs} +6 -6
- package/dist/server/{overrideResolution-Du_w3LY4.mjs → overrideResolution-CDReKy2P.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-BShULdc2.mjs → pageRenderPlan-ByVTA7-4.mjs} +375 -171
- package/dist/server/{pageRuntimeSupport-C4Dh5-mB.mjs → pageRuntimeSupport-Dzz_Dze6.mjs} +291 -5
- package/dist/server/{pageShared-HdKFBpaX.mjs → pageShared-Dk5Ku6hs.mjs} +12184 -11593
- package/dist/server/{schema-C2PqHrMo.mjs → parseThemeForPersistence-pJPGfMrf.mjs} +593 -1591
- package/dist/server/{prebuild-Cl-bkaMA.mjs → prebuild-CW4M0WEZ.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-C4yUmz-r.mjs → prefetchBlockData-Bvx0SiIM.mjs} +5 -34
- package/dist/server/{registry-TFPJdGQi.mjs → registry-Bh0Y25zH.mjs} +6041 -4562
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-OHlOXlOE.mjs → resolveBlockData-CnHHst9r.mjs} +1 -1
- package/dist/server/{resolveButtonColourStates-lry2ORwX.mjs → resolveButtonColourStates-Cn6j8Ee0.mjs} +393 -502
- package/dist/server/responseMedia-t6gs0cB7.mjs +115 -0
- package/dist/server/{richTextSchema-Euhuj-7V.mjs → richTextSchema-DQ2NBP0n.mjs} +5 -16
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -3
- package/dist/server/theme.mjs +1 -2
- package/dist/server/{three-pass-converter-_j2UE2tR.mjs → three-pass-converter-CQWdnfjV.mjs} +1 -1
- package/dist/server/{validation-DIBFZeMB.mjs → validation-D2bHWSxJ.mjs} +59 -10
- package/dist/server/{version-DZWZM1H6.mjs → version-DkM1eAxG.mjs} +1 -1
- package/dist/styles/index.css +991 -48
- package/package.json +4 -3
- package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
- package/dist/_dts/index-mMMvLLAJ.d.ts +0 -31339
- package/dist/client/BookingMailingListNote-DOWOZYlK.mjs +0 -331
- package/dist/client/DemoPortalSignInLink-B9YrzZt2.mjs +0 -19
- package/dist/client/events-BmqPeeQm.mjs +0 -20
- package/dist/client/site-styles-D8jEPGxA.mjs +0 -3
- package/dist/client/useBookingNowIso-Da-f9iHw.mjs +0 -58
- package/dist/client/wizardSteps-DNpajrAH.mjs +0 -6926
- package/dist/server/parseThemeForPersistence-CJMrEkze.mjs +0 -52
- package/dist/server/publicProducts-W9hDRwjz.mjs +0 -64
package/dist/preview-next/client/{PreviewEditorUI-C7ZmYE33.mjs → PreviewEditorUI-Csc5vH5k.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { C as Palette, E as Monitor, M as LoaderCircle, Q as Eye, b as Pencil, et as EllipsisVertical, f as Smartphone, l as Tablet, mt as ChevronDown, o as Undo2, s as TriangleAlert, v as Redo2 } from "./lucide-react-
|
|
4
|
-
import { i as formatEditorStatus, n as useEditorWriteState, o as Spinner, r as decideEditorStatus } from "./useAutosaveStatus
|
|
5
|
-
import { A as TooltipTrigger, D as Tooltip, F as DropdownMenuTrigger, M as DropdownMenuContent, N as DropdownMenuItem, O as TooltipContent, i as needsSetupAsk, j as DropdownMenu, t as resolveBlockManifest } from "./useBlockCustomizeControls-
|
|
6
|
-
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, f as useEditor, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as readPreviewThemeCookie, p as FixedBottomSurface, r as applyPreviewChromeSurfaceToElement, t as PREVIEW_CHROME_PORTAL_CLASS_NAME } from "./previewChromeSurface-
|
|
7
|
-
import { t as useOpenBlockForSetup } from "./useOpenBlockForSetup-
|
|
2
|
+
import { Cp as resolveBlockTitle, En as editorAuthoredBlockDocument, G as useEntryEditorController, Hp as unwrapResponse, Jp as Select, Kt as PREVIEW_CHROME_Z_INDEX, Op as editorAdmissionIsOpen, Q as useSessionJournalHistory, Qp as SelectValue, T_ as authoredValuesEqual, Tu as pageTemplateFromEntry, V as usePreviewAuth, X as useServerRefresh, Xp as SelectItem, Yp as SelectContent, Z as useSessionJournal, Zp as SelectTrigger, _m as DialogHeader, _r as PUBLISH_READINESS_COPY, en as useEditorUiStore, fm as Dialog, gm as DialogFooter, hm as DialogDescription, iv as displayedValues, mm as DialogContent, mn as canDiscardDraft, mv as unsafeAsEditorBlockId, n as usePreviewAssistantSlot, ot as EditorWriteSurface, ph as cva, tn as useEditorUiStoreInstance, uh as Button, vh as cn, vm as DialogTitle, vr as publishReadinessWarning, yr as readinessFactsFromPayload } from "./previewAssistantSlot-BBdN5kfY.mjs";
|
|
3
|
+
import { C as Palette, E as Monitor, M as LoaderCircle, Q as Eye, b as Pencil, et as EllipsisVertical, f as Smartphone, l as Tablet, mt as ChevronDown, o as Undo2, s as TriangleAlert, v as Redo2 } from "./lucide-react-DkZ8fO-G.mjs";
|
|
4
|
+
import { i as formatEditorStatus, n as useEditorWriteState, o as Spinner, r as decideEditorStatus } from "./useAutosaveStatus-BiIHEeE0.mjs";
|
|
5
|
+
import { A as TooltipTrigger, D as Tooltip, F as DropdownMenuTrigger, M as DropdownMenuContent, N as DropdownMenuItem, O as TooltipContent, i as needsSetupAsk, j as DropdownMenu, t as resolveBlockManifest } from "./useBlockCustomizeControls-BuFLIpmX.mjs";
|
|
6
|
+
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, f as useEditor, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as readPreviewThemeCookie, p as FixedBottomSurface, r as applyPreviewChromeSurfaceToElement, t as PREVIEW_CHROME_PORTAL_CLASS_NAME } from "./previewChromeSurface-VZtGwPuH.mjs";
|
|
7
|
+
import { t as useOpenBlockForSetup } from "./useOpenBlockForSetup-DlxYgmh_.mjs";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { useCallback, useEffect, useMemo, useRef, useState, useTransition } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-BC0V7iAR.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { G as GripVertical } from "./lucide-react-
|
|
5
|
-
import { $
|
|
6
|
-
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-
|
|
7
|
-
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, d as EditorProvider, f as useEditor, i as getPreviewChromeSurfaceDataProps, l as PREVIEW_KEEP_ALIVE_INTERVAL_MS, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as readPreviewThemeCookie, p as FixedBottomSurface, s as subscribePreviewThemeCookie, u as PREVIEW_KEEP_ALIVE_JITTER_RATIO } from "./previewChromeSurface-
|
|
3
|
+
import { B as renewPreviewSession, Bl as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, E as PreviewRenderObservationsProvider, G as useEntryEditorController, Gl as planSiteOverlayHeaderClearance, Gt as ApiRequestError, H as usePreviewToken, Hl as SITE_STICKY_CHROME_HEIGHT_FALLBACK, Hp as unwrapResponse, Jt as createSnapshotFromPageRecord, Kl as siteTopChromeMeasurementTargets, L as createGuardedPreviewApiClient, Lt as blocksKeys, Mp as observeEditorAdmission, Np as OPERATION_ID_HEADER, Pa as buildResolveImageUrlContext, Pp as API_ENDPOINTS, Qf as assertNever$1, R as initPreviewAuth, T_ as authoredValuesEqual, Tn as unsafeAsLinkedContentEntryId, U as EntryControllerProvider, Ul as measureSiteStickyChromeHeightPx, V as usePreviewAuth, Vl as SITE_STICKY_CHROME_HEIGHT_CSS_VAR, X as useServerRefresh, _m as DialogHeader, _n as remoteDraftValues, a as PreviewPageDesignEditorStateProvider, at as EditLeaseModal, bh as baselineRevisionOf, bn as resolveRenderedValues, c_ as renderableMediaAssetSchema$1, cn as parseStoredSidebarWidth, cu as planSiteChromePlacement, en as useEditorUiStore, et as savedContentReceipt, f as PreviewThemeJournalProvider, fm as Dialog, g as previewThemeBase, gm as DialogFooter, gn as planLinkedSaveHandoverRetention, hm as DialogDescription, hn as activeLinkedSaveHandover, i as usePreviewSidebarNavigation, it as EditLeaseDiscardedNotice, jp as editorAdmissionSession, kp as editorAdmissionNotice, l as SiteChromeCustomizeProvider, l_ as indexRenderableMediaAssets, lt as getEditorClientId, m as usePreviewThemeSourceOptional, mm as DialogContent, mv as unsafeAsEditorBlockId, nm as Callout, nn as useOptionalEditorUiStoreInstance, nt as useRetentionTicks, ot as EditorWriteSurface, p as usePreviewThemeSource, qt as createRoutingHelpers, qv as assertNever$2, r as PreviewSidebarBootstrap, rm as CalloutDescription, rt as VIEWING_PARTICIPATION, rv as parseEditLeaseScope, s_ as buildRenderableMediaAssetIndex, sn as SIDEBAR_WIDTH, t as PreviewAssistantSlotProvider, tn as useEditorUiStoreInstance, tt as savedRouteReceipt, uh as Button, vh as cn, vm as DialogTitle, vn as renderSourceFor, wh as canEditorWrite, xh as isEdited, z as registerPreviewRenewalFetcher } from "./previewAssistantSlot-BBdN5kfY.mjs";
|
|
4
|
+
import { G as GripVertical } from "./lucide-react-DkZ8fO-G.mjs";
|
|
5
|
+
import { $t as TabsList, E as usePreviewCompiledTheme, Gt as DEFAULT_THEME_RESPONSIVE_MODE, I as SessionJournalHost, Kt as getResponsiveScopeSpec, Mt as LINKED_CONTENT_ENTRY_META_KEY, N as mergeResolvedDataContext, Pt as getLinkedContentEntryMeta, Qt as TabsContent, R as renderSiteChromeBlock, T as PreviewThemeRenderingProvider, Ut as escapeStyleContent, V as createEditorApiClientFactory, Vt as themeRuntimeScopeProps, Z as MediaEditorContextProvider, Zt as Tabs, a as PreviewChromeLayerProvider, b as SiteFontStorageProvider, bt as ThemeScopeCore, c as PREVIEW_SITE_BANNER_ATTRIBUTE, en as TabsTrigger, et as useApiMediaUploader, f as canInspectSiteStyle, g as sanitizeDashboardPath, h as resolvePreviewDashboardSetupHandoff, it as ImageResolveContextProvider, m as buildPreviewDashboardSetupUrl, p as resolveSiteStyleAccess, pn as parseFooterModuleId, qt as Toaster, st as BlockApiProvider, t as SiteChromeCustomizeButton, v as resolvePreviewSetupBannerModel, w as PreviewCompiledThemeProvider, xt as containerResponsiveThemeCss, yt as revealEditorElement, zt as buildThemeDataAttrs } from "./SiteChromeCustomizeButton-BeEZpeKn.mjs";
|
|
6
|
+
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-CZQ4vkRe.mjs";
|
|
7
|
+
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, d as EditorProvider, f as useEditor, i as getPreviewChromeSurfaceDataProps, l as PREVIEW_KEEP_ALIVE_INTERVAL_MS, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as readPreviewThemeCookie, p as FixedBottomSurface, s as subscribePreviewThemeCookie, u as PREVIEW_KEEP_ALIVE_JITTER_RATIO } from "./previewChromeSurface-VZtGwPuH.mjs";
|
|
8
8
|
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useQueryClient } from "@tanstack/react-query";
|
|
@@ -251,6 +251,38 @@ function ResponsiveScope({ children, responsiveMode = DEFAULT_THEME_RESPONSIVE_M
|
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
//#endregion
|
|
254
|
+
//#region ../theme-core/src/SiteStickyChromeOffset.tsx
|
|
255
|
+
/**
|
|
256
|
+
* Publishes how far a sticky or fixed site header reaches below the top of the
|
|
257
|
+
* page as {@link SITE_STICKY_CHROME_HEIGHT_CSS_VAR} on its own site document
|
|
258
|
+
* layout. Sticky page columns (.rb-sticky-below-site-chrome) and anchor targets
|
|
259
|
+
* inside the layout read it, so they stay clear of the header as it shrinks,
|
|
260
|
+
* wraps or gains a banner. The layout renders a fallback until this measures.
|
|
261
|
+
*/
|
|
262
|
+
function SiteStickyChromeOffset() {
|
|
263
|
+
const markerRef = useRef(null);
|
|
264
|
+
useEffect(() => {
|
|
265
|
+
const layoutRoot = markerRef.current?.closest("[data-site-document-layout]");
|
|
266
|
+
if (!layoutRoot) return void 0;
|
|
267
|
+
const publish = () => {
|
|
268
|
+
layoutRoot.style.setProperty(SITE_STICKY_CHROME_HEIGHT_CSS_VAR, `${measureSiteStickyChromeHeightPx(layoutRoot)}px`);
|
|
269
|
+
};
|
|
270
|
+
const targets = siteTopChromeMeasurementTargets(void 0, layoutRoot);
|
|
271
|
+
const shells = targets.flatMap((target) => target.parentElement ? [target.parentElement] : []);
|
|
272
|
+
const observer = new ResizeObserver(publish);
|
|
273
|
+
for (const target of /* @__PURE__ */ new Set([...targets, ...shells])) observer.observe(target);
|
|
274
|
+
return () => {
|
|
275
|
+
observer.disconnect();
|
|
276
|
+
layoutRoot.style.removeProperty(SITE_STICKY_CHROME_HEIGHT_CSS_VAR);
|
|
277
|
+
};
|
|
278
|
+
}, []);
|
|
279
|
+
return /* @__PURE__ */ jsx("span", {
|
|
280
|
+
ref: markerRef,
|
|
281
|
+
hidden: true,
|
|
282
|
+
"data-site-sticky-chrome-offset": ""
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
//#endregion
|
|
254
286
|
//#region ../theme-core/src/siteChromePlanning.ts
|
|
255
287
|
function planSiteDocument(input) {
|
|
256
288
|
const placement = planSiteChromePlacement(input.hasVisibleHeader ?? true ? input.headerPositioning : "static");
|
|
@@ -318,16 +350,18 @@ function renderSiteTopChrome({ headerNode, bannerNode = null, bannerShellBehavio
|
|
|
318
350
|
}
|
|
319
351
|
function SiteDocumentLayout({ plan, headerNode, bannerNode = null, footerNode, children, as: Root = "div", role, className = null, minHeightClassName = SITE_CHROME_CLASS_NAMES.defaultMinHeight, contentClassName = null, style }) {
|
|
320
352
|
const isHeaderOverlay = plan.layoutMode === "header-overlay";
|
|
353
|
+
const stickyChromeOffset = renderStickyChromeOffset(plan);
|
|
321
354
|
const topShell = renderSiteTopChrome({
|
|
322
355
|
headerNode,
|
|
323
356
|
bannerNode,
|
|
324
357
|
bannerShellBehavior: plan.topShell.behavior
|
|
325
358
|
});
|
|
359
|
+
const layoutStyle = stickyChromeLayoutStyle(plan, style);
|
|
326
360
|
const rootStyle = isHeaderOverlay ? {
|
|
327
|
-
...
|
|
361
|
+
...layoutStyle,
|
|
328
362
|
gridTemplateColumns: "minmax(0, 1fr)",
|
|
329
363
|
gridTemplateRows: "1fr auto"
|
|
330
|
-
} :
|
|
364
|
+
} : layoutStyle;
|
|
331
365
|
const rootClassName = joinSiteChromeClassNames(minHeightClassName, isHeaderOverlay ? SITE_CHROME_CLASS_NAMES.overlayRoot : SITE_CHROME_CLASS_NAMES.normalFlowRoot, className);
|
|
332
366
|
if (isHeaderOverlay) {
|
|
333
367
|
const contentStyle = plan.overlayHeaderClearance.kind === "opening-content" ? {
|
|
@@ -355,6 +389,7 @@ function SiteDocumentLayout({ plan, headerNode, bannerNode = null, footerNode, c
|
|
|
355
389
|
},
|
|
356
390
|
children: topShell
|
|
357
391
|
}),
|
|
392
|
+
stickyChromeOffset,
|
|
358
393
|
/* @__PURE__ */ jsx("div", {
|
|
359
394
|
"data-site-document-overlay-content": plan.overlayHeaderClearance.kind === "opening-content" ? "true" : void 0,
|
|
360
395
|
className: joinSiteChromeClassNames(SITE_CHROME_CLASS_NAMES.overlayContent, contentClassName),
|
|
@@ -375,11 +410,12 @@ function SiteDocumentLayout({ plan, headerNode, bannerNode = null, footerNode, c
|
|
|
375
410
|
return /* @__PURE__ */ jsxs(Root, {
|
|
376
411
|
role,
|
|
377
412
|
className: rootClassName,
|
|
378
|
-
style,
|
|
413
|
+
style: layoutStyle,
|
|
379
414
|
"data-site-document-layout": "",
|
|
380
415
|
"data-site-document-layout-mode": plan.layoutMode,
|
|
381
416
|
children: [
|
|
382
417
|
topShell,
|
|
418
|
+
stickyChromeOffset,
|
|
383
419
|
/* @__PURE__ */ jsx("div", {
|
|
384
420
|
className: joinSiteChromeClassNames(SITE_CHROME_CLASS_NAMES.normalFlowContent, contentClassName),
|
|
385
421
|
children
|
|
@@ -388,6 +424,20 @@ function SiteDocumentLayout({ plan, headerNode, bannerNode = null, footerNode, c
|
|
|
388
424
|
]
|
|
389
425
|
});
|
|
390
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* A header that stays on screen gets a guessed height from the server, so a
|
|
429
|
+
* link straight to a section clears it before the layout has measured it.
|
|
430
|
+
*/
|
|
431
|
+
function stickyChromeLayoutStyle(plan, style) {
|
|
432
|
+
return plan.placement.kind === "static" ? style : {
|
|
433
|
+
...style,
|
|
434
|
+
[SITE_STICKY_CHROME_HEIGHT_CSS_VAR]: SITE_STICKY_CHROME_HEIGHT_FALLBACK
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
/** Only a header that stays on screen needs its height published. */
|
|
438
|
+
function renderStickyChromeOffset(plan) {
|
|
439
|
+
return plan.placement.kind === "static" ? null : /* @__PURE__ */ jsx(SiteStickyChromeOffset, {});
|
|
440
|
+
}
|
|
391
441
|
function joinSiteChromeClassNames(...values) {
|
|
392
442
|
const className = values.filter(Boolean).join(" ");
|
|
393
443
|
return className.length > 0 ? className : void 0;
|
|
@@ -4147,10 +4197,10 @@ function resolveShellThemeRoles(props, journalSource) {
|
|
|
4147
4197
|
}
|
|
4148
4198
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
4149
4199
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
4150
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
4200
|
+
return { default: (await import("./PreviewEditorSidebar-C0OtdWu_.mjs")).PreviewEditorSidebar };
|
|
4151
4201
|
});
|
|
4152
4202
|
const PreviewEditorUI = React.lazy(async () => {
|
|
4153
|
-
return { default: (await import("./PreviewEditorUI-
|
|
4203
|
+
return { default: (await import("./PreviewEditorUI-Csc5vH5k.mjs")).PreviewEditorUI };
|
|
4154
4204
|
});
|
|
4155
4205
|
function renderShellProviders(input) {
|
|
4156
4206
|
if (!input.themeRoles) return input.content;
|
|
@@ -4210,187 +4260,231 @@ function PreviewThemeUnavailable() {
|
|
|
4210
4260
|
}
|
|
4211
4261
|
function AvailablePreviewShellLayout({ props, themeRoles }) {
|
|
4212
4262
|
const { children, rendering, surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, apiClient, themeSelectionButtonStyleRepairs, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, sdkConfig, bookingOfferingPresets, themeRuntime = defaultPreviewThemeRuntime, siteStyleAccess = { kind: "hidden" } } = props;
|
|
4213
|
-
const
|
|
4214
|
-
const
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4263
|
+
const editorScopeKey = entryData?.id ? `entry:${entryData.id}` : `page:${pageId ?? "none"}`;
|
|
4264
|
+
const sidebar = /* @__PURE__ */ jsx(React.Suspense, {
|
|
4265
|
+
fallback: null,
|
|
4266
|
+
children: /* @__PURE__ */ jsx(PreviewEditorSidebar, {
|
|
4267
|
+
surfaceId,
|
|
4268
|
+
siteId,
|
|
4269
|
+
dashboardBaseUrl,
|
|
4270
|
+
pageId,
|
|
4271
|
+
pageNodeType: props.pageNodeType,
|
|
4272
|
+
entryData,
|
|
4273
|
+
contentTypeSchema,
|
|
4274
|
+
referenceContentTypeKeys,
|
|
4275
|
+
draftContent,
|
|
4276
|
+
currentTemplate,
|
|
4277
|
+
theme: themeRoles?.persistenceTheme,
|
|
4278
|
+
apiClient,
|
|
4279
|
+
themeSelectionButtonStyleRepairs,
|
|
4280
|
+
sdkConfig: sdkConfig ?? null,
|
|
4281
|
+
entrySubrouteContext: entrySubrouteContext ?? null,
|
|
4282
|
+
bookingOfferingPresets,
|
|
4283
|
+
siteStyleAccess
|
|
4284
|
+
}, editorScopeKey)
|
|
4285
|
+
});
|
|
4286
|
+
return renderShellProviders({
|
|
4287
|
+
props,
|
|
4288
|
+
themeRoles,
|
|
4289
|
+
content: /* @__PURE__ */ jsx(PreviewShellPanes, {
|
|
4290
|
+
rendering,
|
|
4291
|
+
themeRuntime,
|
|
4292
|
+
surfaceId,
|
|
4293
|
+
editorChrome: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
4294
|
+
/* @__PURE__ */ jsx(LinkedEntryEditEventBridge, {}),
|
|
4295
|
+
/* @__PURE__ */ jsx(React.Suspense, {
|
|
4296
|
+
fallback: null,
|
|
4297
|
+
children: /* @__PURE__ */ jsx(PreviewEditorUI, {
|
|
4298
|
+
entryData,
|
|
4299
|
+
dashboardBaseUrl,
|
|
4300
|
+
inMaintenanceMode: maintenanceModeEnabled,
|
|
4301
|
+
siteId,
|
|
4302
|
+
surfaceId,
|
|
4303
|
+
isSiteLaunched,
|
|
4304
|
+
apiClient
|
|
4305
|
+
})
|
|
4306
|
+
}),
|
|
4307
|
+
/* @__PURE__ */ jsx(PreviewAccessBanners, {
|
|
4308
|
+
dashboardBaseUrl,
|
|
4309
|
+
surfaceId,
|
|
4310
|
+
isEntry: Boolean(entryData),
|
|
4311
|
+
pageNodeType: props.pageNodeType
|
|
4312
|
+
})
|
|
4313
|
+
] }),
|
|
4314
|
+
sidebar,
|
|
4315
|
+
children
|
|
4316
|
+
})
|
|
4317
|
+
});
|
|
4318
|
+
}
|
|
4319
|
+
/**
|
|
4320
|
+
* The canvas and the sidebar beside it, with the viewport preferences that size
|
|
4321
|
+
* the canvas. The shell decides what fills the sidebar and the editor chrome.
|
|
4322
|
+
*/
|
|
4323
|
+
function PreviewShellPanes({ children, rendering, themeRuntime, surfaceId, editorChrome, sidebar }) {
|
|
4219
4324
|
const isOpen = usePreviewDrawerOpen();
|
|
4220
4325
|
const { requestedEditingMode, isEditingMode } = useEditor();
|
|
4221
4326
|
usePreviewModeRootAttribute(isEditingMode);
|
|
4222
|
-
const
|
|
4223
|
-
const
|
|
4327
|
+
const layoutNodes = usePreviewLayoutNodes();
|
|
4328
|
+
const viewport = useStoredViewportPreferences();
|
|
4329
|
+
const measured = usePreviewDocumentMeasurements(viewport.mode, viewport.width);
|
|
4330
|
+
const renderedViewport = resolvePreviewViewport({
|
|
4331
|
+
requestedEditingMode,
|
|
4332
|
+
viewportMode: viewport.mode,
|
|
4333
|
+
viewportWidth: viewport.width,
|
|
4334
|
+
zoom: viewport.zoom,
|
|
4335
|
+
containerWidth: measured.containerWidth
|
|
4336
|
+
});
|
|
4337
|
+
const leftPane = /* @__PURE__ */ jsx(PreviewScrollViewport, { children: /* @__PURE__ */ jsx(PreviewDocumentContent, {
|
|
4338
|
+
rendering,
|
|
4339
|
+
themeRuntime,
|
|
4340
|
+
...layoutNodes,
|
|
4341
|
+
viewportMode: renderedViewport.viewportMode,
|
|
4342
|
+
viewportWidth: renderedViewport.viewportWidth,
|
|
4343
|
+
scale: renderedViewport.scale,
|
|
4344
|
+
contentHeight: measured.contentHeight,
|
|
4345
|
+
scaleContainerRef: measured.scaleContainerRef,
|
|
4346
|
+
contentRef: measured.contentRef,
|
|
4347
|
+
children
|
|
4348
|
+
}) });
|
|
4349
|
+
return /* @__PURE__ */ jsxs(PreviewRenderObservationsProvider, { children: [
|
|
4350
|
+
/* @__PURE__ */ jsx(PreviewSidebarBootstrap, {}),
|
|
4351
|
+
editorChrome,
|
|
4352
|
+
/* @__PURE__ */ jsx("div", {
|
|
4353
|
+
className: "fixed inset-0 overflow-hidden bg-background",
|
|
4354
|
+
children: isOpen ? /* @__PURE__ */ jsx(ResizableSplitPane, {
|
|
4355
|
+
left: leftPane,
|
|
4356
|
+
right: /* @__PURE__ */ jsx(EditorWriteSurface, { children: /* @__PURE__ */ jsx(PreviewSidebarPane, {
|
|
4357
|
+
surfaceId,
|
|
4358
|
+
children: sidebar
|
|
4359
|
+
}) }),
|
|
4360
|
+
rightWidth: {
|
|
4361
|
+
px: viewport.sidebarWidth,
|
|
4362
|
+
min: SIDEBAR_WIDTH.min,
|
|
4363
|
+
max: SIDEBAR_WIDTH.max,
|
|
4364
|
+
minLeft: PREVIEW_MIN_WIDTH,
|
|
4365
|
+
onChange: viewport.setSidebarWidth
|
|
4366
|
+
},
|
|
4367
|
+
leftLabel: "Preview",
|
|
4368
|
+
rightLabel: "Editor",
|
|
4369
|
+
defaultTab: "right",
|
|
4370
|
+
rightPaneClassName: "h-full min-h-0 overflow-hidden"
|
|
4371
|
+
}) : leftPane
|
|
4372
|
+
})
|
|
4373
|
+
] });
|
|
4374
|
+
}
|
|
4375
|
+
function PreviewSidebarPane({ surfaceId, children }) {
|
|
4376
|
+
const surfaceDocument = useMemo(() => resolvePreviewChromeSurface(surfaceId), [surfaceId]);
|
|
4377
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4378
|
+
className: `${PREVIEW_CHROME_THEME_CLASS_NAME} flex h-full min-h-0 flex-col overflow-hidden ${surfaceDocument.surfaceClassName ?? ""}`,
|
|
4379
|
+
...getPreviewChromeSurfaceDataProps(surfaceDocument),
|
|
4380
|
+
children
|
|
4381
|
+
});
|
|
4382
|
+
}
|
|
4383
|
+
/** The site's header, banner and footer from the host layout, when there is one. */
|
|
4384
|
+
function usePreviewLayoutNodes() {
|
|
4385
|
+
const layout = useOptionalPreviewLayout();
|
|
4386
|
+
return {
|
|
4387
|
+
headerNode: layout?.headerNode ?? null,
|
|
4388
|
+
bannerNode: layout?.bannerNode ?? null,
|
|
4389
|
+
footerNode: layout?.footerNode ?? null,
|
|
4390
|
+
siteChromeRenderModel: layout?.siteChromeRenderModel ?? null
|
|
4391
|
+
};
|
|
4392
|
+
}
|
|
4393
|
+
/** Viewport preferences live in the editor store, loaded from and saved to localStorage. */
|
|
4394
|
+
function useStoredViewportPreferences() {
|
|
4395
|
+
const mode = useEditorUiStore((s) => s.viewport.mode);
|
|
4396
|
+
const width = useEditorUiStore((s) => s.viewport.width);
|
|
4224
4397
|
const sidebarWidth = useEditorUiStore((s) => s.viewport.sidebarWidth);
|
|
4225
4398
|
const zoom = useEditorUiStore((s) => s.viewport.zoom);
|
|
4226
|
-
const
|
|
4227
|
-
const
|
|
4399
|
+
const setMode = useEditorUiStore((s) => s.viewport.setMode);
|
|
4400
|
+
const setWidth = useEditorUiStore((s) => s.viewport.setWidth);
|
|
4228
4401
|
const setSidebarWidth = useEditorUiStore((s) => s.viewport.setSidebarWidth);
|
|
4229
4402
|
const setZoom = useEditorUiStore((s) => s.viewport.setZoom);
|
|
4230
4403
|
useEffect(() => {
|
|
4231
|
-
const
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
if (
|
|
4236
|
-
if (storedWidth) if (storedWidth === "full") setViewportWidth("full");
|
|
4237
|
-
else {
|
|
4238
|
-
const width = parseInt(storedWidth, 10);
|
|
4239
|
-
if (Number.isFinite(width)) setViewportWidth(width);
|
|
4240
|
-
}
|
|
4241
|
-
const sidebarWidthPreference = parseStoredSidebarWidth(storedSidebarWidth);
|
|
4242
|
-
if (sidebarWidthPreference !== null) setSidebarWidth(sidebarWidthPreference);
|
|
4243
|
-
if (storedZoom) if (storedZoom === "fit") setZoom("fit");
|
|
4244
|
-
else {
|
|
4245
|
-
const zoomValue = parseInt(storedZoom, 10);
|
|
4246
|
-
if (zoomValue === 33 || zoomValue === 50 || zoomValue === 75 || zoomValue === 100) setZoom(zoomValue);
|
|
4247
|
-
}
|
|
4404
|
+
const stored = readStoredViewportPreferences();
|
|
4405
|
+
if (stored.mode) setMode(stored.mode);
|
|
4406
|
+
if (stored.width !== null) setWidth(stored.width);
|
|
4407
|
+
if (stored.sidebarWidth !== null) setSidebarWidth(stored.sidebarWidth);
|
|
4408
|
+
if (stored.zoom !== null) setZoom(stored.zoom);
|
|
4248
4409
|
}, [
|
|
4249
|
-
|
|
4250
|
-
|
|
4410
|
+
setMode,
|
|
4411
|
+
setWidth,
|
|
4251
4412
|
setSidebarWidth,
|
|
4252
4413
|
setZoom
|
|
4253
4414
|
]);
|
|
4254
4415
|
useEffect(() => {
|
|
4255
|
-
localStorage.setItem("preview-viewport-mode",
|
|
4256
|
-
}, [
|
|
4416
|
+
localStorage.setItem("preview-viewport-mode", mode);
|
|
4417
|
+
}, [mode]);
|
|
4257
4418
|
useEffect(() => {
|
|
4258
|
-
localStorage.setItem("preview-viewport-width", String(
|
|
4259
|
-
}, [
|
|
4419
|
+
localStorage.setItem("preview-viewport-width", String(width));
|
|
4420
|
+
}, [width]);
|
|
4260
4421
|
useEffect(() => {
|
|
4261
4422
|
localStorage.setItem("preview-sidebar-width", String(sidebarWidth));
|
|
4262
4423
|
}, [sidebarWidth]);
|
|
4263
4424
|
useEffect(() => {
|
|
4264
4425
|
localStorage.setItem("preview-zoom-level", String(zoom));
|
|
4265
4426
|
}, [zoom]);
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4427
|
+
return {
|
|
4428
|
+
mode,
|
|
4429
|
+
width,
|
|
4430
|
+
sidebarWidth,
|
|
4431
|
+
zoom,
|
|
4432
|
+
setSidebarWidth
|
|
4433
|
+
};
|
|
4434
|
+
}
|
|
4435
|
+
function readStoredViewportPreferences() {
|
|
4436
|
+
return {
|
|
4437
|
+
mode: parseStoredViewportMode(localStorage.getItem("preview-viewport-mode")),
|
|
4438
|
+
width: parseStoredViewportWidth(localStorage.getItem("preview-viewport-width")),
|
|
4439
|
+
sidebarWidth: parseStoredSidebarWidth(localStorage.getItem("preview-sidebar-width")),
|
|
4440
|
+
zoom: parseStoredZoom(localStorage.getItem("preview-zoom-level"))
|
|
4441
|
+
};
|
|
4442
|
+
}
|
|
4443
|
+
function parseStoredViewportMode(stored) {
|
|
4444
|
+
return stored === "squeeze" || stored === "fixed" ? stored : null;
|
|
4445
|
+
}
|
|
4446
|
+
function parseStoredViewportWidth(stored) {
|
|
4447
|
+
if (!stored) return null;
|
|
4448
|
+
if (stored === "full") return "full";
|
|
4449
|
+
const width = parseInt(stored, 10);
|
|
4450
|
+
return Number.isFinite(width) ? width : null;
|
|
4451
|
+
}
|
|
4452
|
+
function parseStoredZoom(stored) {
|
|
4453
|
+
if (!stored) return null;
|
|
4454
|
+
if (stored === "fit") return "fit";
|
|
4455
|
+
const zoom = parseInt(stored, 10);
|
|
4456
|
+
return zoom === 33 || zoom === 50 || zoom === 75 || zoom === 100 ? zoom : null;
|
|
4457
|
+
}
|
|
4458
|
+
/** The canvas container's width and the document's height, kept current by resize observers. */
|
|
4459
|
+
function usePreviewDocumentMeasurements(viewportMode, viewportWidth) {
|
|
4270
4460
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
4271
4461
|
const [contentHeight, setContentHeight] = useState(0);
|
|
4272
4462
|
const containerObserverRef = useRef(null);
|
|
4273
|
-
const contentObserverRef = useRef(null);
|
|
4274
4463
|
const contentRef = useRef(null);
|
|
4275
4464
|
const scaleContainerRef = useCallback((node) => {
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
};
|
|
4284
|
-
containerObserverRef.current = new ResizeObserver(updateWidth);
|
|
4285
|
-
containerObserverRef.current.observe(node);
|
|
4286
|
-
updateWidth();
|
|
4287
|
-
}
|
|
4465
|
+
containerObserverRef.current?.disconnect();
|
|
4466
|
+
containerObserverRef.current = null;
|
|
4467
|
+
if (!node) return;
|
|
4468
|
+
const updateWidth = () => setContainerWidth(node.offsetWidth);
|
|
4469
|
+
containerObserverRef.current = new ResizeObserver(updateWidth);
|
|
4470
|
+
containerObserverRef.current.observe(node);
|
|
4471
|
+
updateWidth();
|
|
4288
4472
|
}, []);
|
|
4289
4473
|
useEffect(() => {
|
|
4290
4474
|
const contentNode = contentRef.current;
|
|
4291
4475
|
if (!contentNode) return;
|
|
4292
|
-
const updateHeight = () =>
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
contentObserverRef.current = new ResizeObserver(updateHeight);
|
|
4296
|
-
contentObserverRef.current.observe(contentNode);
|
|
4476
|
+
const updateHeight = () => setContentHeight(contentNode.scrollHeight);
|
|
4477
|
+
const observer = new ResizeObserver(updateHeight);
|
|
4478
|
+
observer.observe(contentNode);
|
|
4297
4479
|
updateHeight();
|
|
4298
|
-
return () =>
|
|
4299
|
-
contentObserverRef.current?.disconnect();
|
|
4300
|
-
};
|
|
4480
|
+
return () => observer.disconnect();
|
|
4301
4481
|
}, [viewportMode, viewportWidth]);
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
viewportMode,
|
|
4305
|
-
viewportWidth,
|
|
4306
|
-
zoom,
|
|
4307
|
-
containerWidth
|
|
4308
|
-
});
|
|
4309
|
-
const leftPane = /* @__PURE__ */ jsx(PreviewScrollViewport, { children: /* @__PURE__ */ jsx(PreviewDocumentContent, {
|
|
4310
|
-
rendering,
|
|
4311
|
-
themeRuntime,
|
|
4312
|
-
viewportMode: renderedViewport.viewportMode,
|
|
4313
|
-
viewportWidth: renderedViewport.viewportWidth,
|
|
4314
|
-
scale: renderedViewport.scale,
|
|
4482
|
+
return {
|
|
4483
|
+
containerWidth,
|
|
4315
4484
|
contentHeight,
|
|
4316
4485
|
scaleContainerRef,
|
|
4317
|
-
contentRef
|
|
4318
|
-
|
|
4319
|
-
bannerNode,
|
|
4320
|
-
footerNode,
|
|
4321
|
-
siteChromeRenderModel,
|
|
4322
|
-
children
|
|
4323
|
-
}) });
|
|
4324
|
-
const rightPane = /* @__PURE__ */ jsx("div", {
|
|
4325
|
-
className: `${PREVIEW_CHROME_THEME_CLASS_NAME} flex h-full min-h-0 flex-col overflow-hidden ${surfaceDocument.surfaceClassName ?? ""}`,
|
|
4326
|
-
...getPreviewChromeSurfaceDataProps(surfaceDocument),
|
|
4327
|
-
children: /* @__PURE__ */ jsx(React.Suspense, {
|
|
4328
|
-
fallback: null,
|
|
4329
|
-
children: /* @__PURE__ */ jsx(PreviewEditorSidebar, {
|
|
4330
|
-
surfaceId,
|
|
4331
|
-
siteId,
|
|
4332
|
-
dashboardBaseUrl,
|
|
4333
|
-
pageId,
|
|
4334
|
-
pageNodeType: props.pageNodeType,
|
|
4335
|
-
entryData,
|
|
4336
|
-
contentTypeSchema,
|
|
4337
|
-
referenceContentTypeKeys,
|
|
4338
|
-
draftContent,
|
|
4339
|
-
currentTemplate,
|
|
4340
|
-
theme: themeRoles?.persistenceTheme,
|
|
4341
|
-
apiClient,
|
|
4342
|
-
themeSelectionButtonStyleRepairs,
|
|
4343
|
-
sdkConfig: sdkConfig ?? null,
|
|
4344
|
-
entrySubrouteContext: entrySubrouteContext ?? null,
|
|
4345
|
-
bookingOfferingPresets,
|
|
4346
|
-
siteStyleAccess
|
|
4347
|
-
}, editorScopeKey)
|
|
4348
|
-
})
|
|
4349
|
-
});
|
|
4350
|
-
return renderShellProviders({
|
|
4351
|
-
props,
|
|
4352
|
-
themeRoles,
|
|
4353
|
-
content: /* @__PURE__ */ jsxs(PreviewRenderObservationsProvider, { children: [
|
|
4354
|
-
/* @__PURE__ */ jsx(PreviewSidebarBootstrap, {}),
|
|
4355
|
-
/* @__PURE__ */ jsx(LinkedEntryEditEventBridge, {}),
|
|
4356
|
-
/* @__PURE__ */ jsx(React.Suspense, {
|
|
4357
|
-
fallback: null,
|
|
4358
|
-
children: /* @__PURE__ */ jsx(PreviewEditorUI, {
|
|
4359
|
-
entryData,
|
|
4360
|
-
dashboardBaseUrl,
|
|
4361
|
-
inMaintenanceMode: maintenanceModeEnabled,
|
|
4362
|
-
siteId,
|
|
4363
|
-
surfaceId,
|
|
4364
|
-
isSiteLaunched,
|
|
4365
|
-
apiClient
|
|
4366
|
-
})
|
|
4367
|
-
}),
|
|
4368
|
-
/* @__PURE__ */ jsx(PreviewAccessBanners, {
|
|
4369
|
-
dashboardBaseUrl,
|
|
4370
|
-
surfaceId,
|
|
4371
|
-
isEntry: Boolean(entryData),
|
|
4372
|
-
pageNodeType: props.pageNodeType
|
|
4373
|
-
}),
|
|
4374
|
-
/* @__PURE__ */ jsx("div", {
|
|
4375
|
-
className: "fixed inset-0 overflow-hidden bg-background",
|
|
4376
|
-
children: isOpen ? /* @__PURE__ */ jsx(ResizableSplitPane, {
|
|
4377
|
-
left: leftPane,
|
|
4378
|
-
right: /* @__PURE__ */ jsx(EditorWriteSurface, { children: rightPane }),
|
|
4379
|
-
rightWidth: {
|
|
4380
|
-
px: sidebarWidth,
|
|
4381
|
-
min: SIDEBAR_WIDTH.min,
|
|
4382
|
-
max: SIDEBAR_WIDTH.max,
|
|
4383
|
-
minLeft: PREVIEW_MIN_WIDTH,
|
|
4384
|
-
onChange: handleSidebarWidthChange
|
|
4385
|
-
},
|
|
4386
|
-
leftLabel: "Preview",
|
|
4387
|
-
rightLabel: "Editor",
|
|
4388
|
-
defaultTab: "right",
|
|
4389
|
-
rightPaneClassName: "h-full min-h-0 overflow-hidden"
|
|
4390
|
-
}) : leftPane
|
|
4391
|
-
})
|
|
4392
|
-
] })
|
|
4393
|
-
});
|
|
4486
|
+
contentRef
|
|
4487
|
+
};
|
|
4394
4488
|
}
|
|
4395
4489
|
/** The sidebar belongs to edit mode; a stale open preference cannot expose it while viewing. */
|
|
4396
4490
|
function usePreviewDrawerOpen() {
|