@riverbankcms/sdk 0.171.0 → 0.172.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-xuFmD41p.d.ts → BlocksIslandsHydrator-DtrzTJ77.d.ts} +1 -1
- package/dist/_dts/{Page-4fzXy8H9.d.ts → Page-DViYbakk.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BlHgMsc8.d.ts → SdkPreviewMode-D-5OeDbT.d.ts} +2 -2
- package/dist/_dts/{client-BPoU758C.d.ts → client-DZBOzd3U.d.ts} +1 -2
- package/dist/_dts/{content-types-TnkhoSls.d.ts → content-types-DS3DrYn_.d.ts} +3 -3
- package/dist/_dts/{contracts-7wrMA79U.d.ts → contracts-C3QGPCUf.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DaOsPQ_Q.d.ts → footerPageOutline-D9Q7VIul.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9aDEzKK.d.ts → generatePageMetadata-R7NeFT1u.d.ts} +2 -2
- package/dist/_dts/{index-DDKJfaLY.d.ts → index-BnMavhoh.d.ts} +2 -2
- package/dist/_dts/{index-585vn6qb.d.ts → index-C0zjLMAW.d.ts} +49 -38
- package/dist/_dts/{index-W9R3Bnf2.d.ts → index-CpOkfBt1.d.ts} +3 -3
- package/dist/_dts/{index-Cbw0IiY7.d.ts → index-Da4UMgbs.d.ts} +2 -2
- package/dist/_dts/{index-DNCDENic.d.ts → index-DkFV_1Bc.d.ts} +1 -1
- package/dist/_dts/{index-ChNbrcgD.d.ts → index-Dns7OHyl.d.ts} +1 -1
- package/dist/_dts/{index-CZKSUcDs.d.ts → index-MuMYjetm.d.ts} +4 -4
- package/dist/_dts/{loadContent-DPyNAJym.d.ts → loadContent-DJmXHzfi.d.ts} +7 -7
- package/dist/_dts/{request-jXTRN1Y4.d.ts → request-wQ28JWbr.d.ts} +66983 -65876
- package/dist/_dts/{resolveBlockData-BbvE-gsZ.d.ts → resolveBlockData-C-IP53u9.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BBgih00D.d.ts → resolvePageContent-Cc4zqaEC.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 +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/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +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 +18 -1
- package/dist/_dts/{types-kWvBwYK6.d.ts → types-CpjyP5I4.d.ts} +7 -7
- package/dist/_dts/{types-DEAKoDNi.d.ts → types-DrinAfeW.d.ts} +3 -3
- package/dist/_dts/{types-BXuVxDYo.d.ts → types-ZuZoGsZV.d.ts} +2 -2
- package/dist/_dts/{validation-BAO0_ntM.d.ts → validation-CIZ_fP5l.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DfMsMIej.mjs → BlocksIslandsHydrator-UFmQB1BE.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-aaSicywS.mjs → BookingMailingListNote-VjRYhx1c.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-OgftZ9QC.mjs → BookingPanelArrangement-DpqnRo-t.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-CzOT8ZWo.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-iMWrY6Hz.mjs → CalendarNavigationChevron-CNckKZct.mjs} +7 -7
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BCumOTLY.mjs → DemoBookingPortalAccess-CmZLVXOy.mjs} +6 -6
- package/dist/client/{EventCalendar.client-kh7mkYnW.mjs → EventCalendar.client-BU-SxLCn.mjs} +9 -9
- package/dist/client/{EventCombined.client-DXD5i0Ar.mjs → EventCombined.client-f28VltfY.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-BnwcoFQN.mjs → EventItem-sKBofjiW.mjs} +40 -14
- package/dist/client/{EventListWeekNavigation-DuG6z02f.mjs → EventListWeekNavigation-IAcax47T.mjs} +1 -1
- package/dist/client/{EventListing.client-18yfHrcr.mjs → EventListing.client-BEtnRvZr.mjs} +3 -3
- package/dist/client/{EventListing.view-BM7rTVSL.mjs → EventListing.view-BZ4l_rmT.mjs} +189 -73
- package/dist/client/{EventRegistrationPayment-D5J3DR0x.mjs → EventRegistrationPayment-BWb295cD.mjs} +9 -9
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-Hsj2HC_1.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-C7E7Lyfa.mjs} +1 -1
- package/dist/client/{Page-DH2sm4Cf.mjs → Page-Ds1s3DuC.mjs} +1425 -490
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-CsRlU46Y.mjs → StepIndicator-CSCyAaKY.mjs} +6 -6
- package/dist/client/{TabBarFragment-CsAufYwT.mjs → TabBarFragment-BqfRLojo.mjs} +1 -1
- package/dist/client/{ThemedButton-BMDHwnM6.mjs → ThemedButton-DuaYtnvG.mjs} +1 -1
- package/dist/client/{accessibleSurfaces-Bbn1-jJ8.mjs → accessibleSurfaces-OsAseM7H.mjs} +57 -42
- package/dist/client/{accordion-DT4MD3Np.mjs → accordion-DgwFZJSx.mjs} +1 -1
- package/dist/client/{booking-form.client-DdqNQNCa.mjs → booking-form.client-CKY9oksp.mjs} +33 -29
- package/dist/client/{bookingForm-CLN396HU.mjs → bookingForm-CsHhcdSF.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-iLF_3KX9.mjs → boxStyleClassNames-B1Z_TGAe.mjs} +1 -1
- package/dist/client/{carousel-DFLomCGm.mjs → carousel-0sw2Kc3a.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-BozMM5NK.mjs → cart-CPfvMDGJ.mjs} +3 -3
- package/dist/client/{cart.client-CqOOxPbW.mjs → cart.client-BJBPUTmg.mjs} +1 -1
- package/dist/client/{checkout-CTWF5nbB.mjs → checkout-DU4JFjGT.mjs} +3 -3
- package/dist/client/{checkout.client-CpqxN8e0.mjs → checkout.client-BbNCO4xa.mjs} +1 -1
- package/dist/client/{checkoutUrls-Ccg6yfjq.mjs → checkoutUrls-BQ3OlWlM.mjs} +1 -1
- package/dist/client/client.mjs +151 -6
- package/dist/client/{context-Dzjv2CpA.mjs → context-xNC1Cyjw.mjs} +14 -1
- package/dist/client/{cta-pzQkBLgS.mjs → cta-CNVQHLKs.mjs} +53 -11
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-B6ea-egy.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-BhjGxhX3.mjs} +1 -1
- package/dist/client/{display-Cl6mgSJa.mjs → display-B5DfNb6A.mjs} +1869 -333
- package/dist/client/{enhanceHeaderSection-CJCl0HJC.mjs → enhanceHeaderSection-BFcHLuqk.mjs} +139 -16
- package/dist/client/{event-details.client-Pn9Kxh3I.mjs → event-details.client-WHT5GLn2.mjs} +1 -1
- package/dist/client/{event-registration.client-BAmBdWXE.mjs → event-registration.client-CmnRKELC.mjs} +11 -11
- package/dist/client/{eventCalendar-C5Bh2L8L.mjs → eventCalendar-2NbdCyov.mjs} +4 -4
- package/dist/client/{eventCombined-dELKxxIe.mjs → eventCombined-D1lH1n2T.mjs} +4 -4
- package/dist/client/{eventDetails-Do9D_fJ_.mjs → eventDetails-BHvnF2Tw.mjs} +2 -2
- package/dist/client/{eventListing-B2HTUWLq.mjs → eventListing-EhSDk4UL.mjs} +4 -4
- package/dist/client/{eventRegistration-ByOJnqGc.mjs → eventRegistration-z_0jN_KS.mjs} +4 -4
- package/dist/client/{form-DX70QG-J.mjs → form-BfChzSkS.mjs} +3 -3
- package/dist/client/{form.client-CJoqBrS6.mjs → form.client-D1zehtPk.mjs} +4 -4
- package/dist/client/{form.parts-DTof9pL3.mjs → form.parts-rMDlUQIv.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-ymSVT9Y5.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJuPX_1K.mjs → headerSection-BX9bQ84k.mjs} +2 -2
- package/dist/client/{newsletter-form.client-CqzNjOft.mjs → newsletter-form.client-DMbuJCtJ.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DjJsFms2.mjs → newsletter-form.parts-BxrVsoI0.mjs} +2 -2
- package/dist/client/{newsletterForm-D1MHoPbh.mjs → newsletterForm-B_I3FJFS.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CamIX2yK.mjs} +17 -1
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DOQ7El1d.mjs → product-detail.client-qxuiYCof.mjs} +1 -1
- package/dist/client/{product-list.client-CmxOZbzL.mjs → product-list.client-CDL-jihv.mjs} +1 -1
- package/dist/client/{productDetail-BN3zv5sa.mjs → productDetail-B97m0uZy.mjs} +3 -3
- package/dist/client/{productList-GN_Id4bF.mjs → productList-DE4vSSG_.mjs} +3 -3
- package/dist/client/{propsDecoder-BdmzM3D5.mjs → propsDecoder-BTde6Syh.mjs} +3 -3
- package/dist/client/{registry.server-BOyra8CA.mjs → registry.server-Cn8XjRte.mjs} +1464 -1183
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +22 -16
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-Bcl3vTb4.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DnaJ8PQc.mjs → routeIslandApiConfig-BjRoLoMD.mjs} +1 -1
- package/dist/client/{runtimeResponse-BN8PoIVp.mjs → runtimeResponse-B-lrAGhX.mjs} +1 -1
- package/dist/client/{runtimeResponse-B1-cyLXt.mjs → runtimeResponse-CPcA8xSm.mjs} +1 -1
- package/dist/client/{shop-LjBLDBqF.mjs → shop-BC4H0oYT.mjs} +3 -3
- package/dist/client/{shop-commerce-B8aZTdRJ.mjs → shop-commerce-BsY7a71m.mjs} +12 -12
- package/dist/client/{shop-commerce-store-C1FtHYl7.mjs → shop-commerce-store-BZ5j90HD.mjs} +1 -1
- package/dist/client/{shop.client-D0qZ3KZp.mjs → shop.client-WgGVGelc.mjs} +12 -12
- package/dist/client/{shop.interactive-DAKyWK1B.mjs → shop.interactive-Bb67gPLL.mjs} +187 -81
- package/dist/client/{shopShared-CztcSe9i.mjs → shopShared-BE6TEk2A.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{timetableModel-D1jDTbms.mjs → timetableModel-Bbz_ECL5.mjs} +10 -10
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-CdP14E_b.mjs} +2 -2
- package/dist/client/{useDiscountApply-CHGYDxdM.mjs → useDiscountApply-DvOSso2l.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Dew9UAEy.mjs → useDiscountCodeUi-B4fRd2jy.mjs} +1 -1
- package/dist/client/{useEventPagination-BpC7-ksE.mjs → useEventPagination-M3jC8lgP.mjs} +6 -6
- package/dist/client/{view-BxeiAL3c.mjs → view-B0TFnP4y.mjs} +198 -60
- package/dist/client/{view-ShYH3WXh.mjs → view-DNNNbnNj.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-lW2aLGWd.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-C9InQJpd.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs} +320 -395
- package/dist/preview-next/client/{PreviewEditorSidebar-BEEWzXnU.mjs → PreviewEditorSidebar-CjOIZlUk.mjs} +761 -416
- package/dist/preview-next/client/{PreviewEditorUI-C86Out4V.mjs → PreviewEditorUI--kS9Cwsc.mjs} +126 -137
- package/dist/preview-next/client/PreviewLayoutContext-Dy0LwcHc.mjs +26 -0
- package/dist/preview-next/client/PreviewQueryProvider-BgIucg_5.mjs +21 -0
- package/dist/preview-next/client/{PreviewShell-CBWYjBvQ.mjs → PreviewShell-Bi8-rclb.mjs} +312 -63
- package/dist/preview-next/client/{SdkPreviewModeRuntime-o-mVqWLx.mjs → SdkPreviewModeRuntime-CWTUw-3L.mjs} +308 -135
- package/dist/preview-next/client/{SiteChromeCustomizeButton-H_ciMNHA.mjs → SiteChromeCustomizeButton-CrgS3I8d.mjs} +1936 -320
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-DygTyy7K.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-CuOcsG_N.mjs → previewAssistantSlot-Caofnr1Z.mjs} +23441 -21340
- package/dist/preview-next/client/{previewChromeRoot-DPeV7KaP.mjs → previewChromeRoot-CbAI_jSH.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-DY65_hLk.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-DNA1Q4L1.mjs → useAutosaveStatus-CakNU3lp.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BdnMlHC6.mjs → useOpenBlockForSetup-CCEMkosU.mjs} +126 -11
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/editor-base.css +14 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CtSgU8UZ.mjs → route-contract-DsKDQoVW.mjs} +147 -2
- package/dist/server/{Block.shared-ifgaBglp.mjs → Block.shared-D7Qy9F4a.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DGDOH6OU.mjs → ThemeScopeCore-D1NTXZdX.mjs} +15 -10
- package/dist/server/{accessibleSurfaces-BuPNCWAK.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-CiYpie1M.mjs → bindings-Bp6OnR3n.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-ngWuFsmN.mjs → client-dROAfMRa.mjs} +149 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-DeLQeJAZ.mjs → loadContent-zOIrtqz-.mjs} +19 -14
- package/dist/server/{loadPage-D4J747FQ.mjs → loadPage-vwFiq1Rk.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-ukEz1BaM.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-DSuVkpqm.mjs → overrideResolution-DjboggbB.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-DFv3h4Ib.mjs → pageRenderPlan-BR4t1rOw.mjs} +954 -337
- package/dist/server/{pageRuntimeSupport-yHaRNWMj.mjs → pageRuntimeSupport-BKo6XVK-.mjs} +3 -2
- package/dist/server/{pageShared-CAZD0LcY.mjs → pageShared-BJjptSGp.mjs} +1039 -853
- package/dist/server/{parseThemeForPersistence-Dl7LIBJq.mjs → parseThemeForPersistence-B18KDEue.mjs} +2 -2
- package/dist/server/{prebuild-BKOCND3b.mjs → prebuild-CntSkZQI.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-GIoExi8A.mjs → prefetchBlockData-BM9Ds0OQ.mjs} +2 -2
- package/dist/server/{registry-BogXzcOD.mjs → registry-wYH0LH5f.mjs} +7269 -4975
- 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 +7 -7
- package/dist/server/{resolveBlockData-CT4YSBve.mjs → resolveBlockData-Bu_p4HxZ.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-DVISOQD9.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +53 -33
- package/dist/server/{schema-C92Q8y0-.mjs → schema-BFOqYIMQ.mjs} +2 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-vSBCWU3w.mjs → validation-DAQdPDku.mjs} +4 -4
- package/dist/server/{version-Cw5vFmUY.mjs → version-DAB0O3yx.mjs} +1 -1
- package/dist/styles/index.css +1260 -15
- package/package.json +1 -1
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-zTTFZ4MM.mjs +0 -5
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { n as useOptionalPreviewLayout } from "./PreviewLayoutContext-Dy0LwcHc.mjs";
|
|
3
|
+
import { t as PreviewQueryProvider } from "./PreviewQueryProvider-BgIucg_5.mjs";
|
|
4
|
+
import { $_ as authoredValuesEqual, B as renewPreviewSession, Bm as DialogHeader, Cm as unwrapResponse, Cy as assertNever$2, Du as planSiteChromePlacement, E as PreviewRenderObservationsProvider, F_ as renderableMediaAssetSchema$1, Fm as Dialog, G as useEntryEditorController, H as usePreviewToken, I_ as indexRenderableMediaAssets, Ih as Button, Kh as baselineRevisionOf, L as createGuardedPreviewApiClient, Lm as DialogContent, Mm as Callout, Nm as CalloutDescription, Np as assertNever$1, Nv as parseEditLeaseScope, P_ as buildRenderableMediaAssetIndex, Pt as blocksKeys, Qt as useOptionalEditorUiStoreInstance, R as initPreviewAuth, Rm as DialogDescription, U as EntryControllerProvider, Ut as createRoutingHelpers, V as usePreviewAuth, Vm as DialogTitle, Vt as ApiRequestError, Wh as cn, Wt as createSnapshotFromPageRecord, Wv as unsafeAsEditorBlockId, X as useServerRefresh, Xh as canEditorWrite, Xt as useEditorUiStore, Zt as useEditorUiStoreInstance, a as PreviewPageDesignEditorStateProvider, at as EditLeaseModal, au as SITE_STICKY_CHROME_HEIGHT_CSS_VAR, dn as activeLinkedSaveHandover, et as savedContentReceipt, f as PreviewThemeJournalProvider, fm as editorAdmissionSession, fn as planLinkedSaveHandoverRetention, g as previewThemeBase, gn as resolveRenderedValues, hm as API_ENDPOINTS, i as usePreviewSidebarNavigation, in as parseStoredSidebarWidth, it as EditLeaseDiscardedNotice, iu as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, l as SiteChromeCustomizeProvider, lt as getEditorClientId, lu as planSiteOverlayHeaderClearance, m as usePreviewThemeSourceOptional, mm as OPERATION_ID_HEADER, mn as renderSourceFor, nt as useRetentionTicks, ot as EditorWriteSurface, ou as SITE_STICKY_CHROME_HEIGHT_FALLBACK, p as usePreviewThemeSource, pm as observeEditorAdmission, pn as remoteDraftValues, qh as isEdited, r as PreviewSidebarBootstrap, rn as SIDEBAR_WIDTH, rt as VIEWING_PARTICIPATION, su as measureSiteStickyChromeHeightPx, t as PreviewAssistantSlotProvider, tt as savedPageSurfaceMetadataReceipt, um as editorAdmissionNotice, uu as siteTopChromeMeasurementTargets, wa as buildResolveImageUrlContext, wm as selectedCanvasBlockId, xn as unsafeAsLinkedContentEntryId, z as registerPreviewRenewalFetcher, zm as DialogFooter } from "./previewAssistantSlot-Caofnr1Z.mjs";
|
|
5
|
+
import { U as GripVertical } from "./lucide-react-BCNn8dEQ.mjs";
|
|
6
|
+
import { $ as MediaEditorContextProvider, B as renderSiteChromeBlock, D as usePreviewCompiledTheme, E as PreviewThemeRenderingProvider, Ft as LINKED_CONTENT_ENTRY_META_KEY, Ht as buildThemeDataAttrs, Jt as DEFAULT_THEME_RESPONSIVE_MODE, Lt as getLinkedContentEntryMeta, P as mergeResolvedDataContext, Qt as Toaster, R as SessionJournalHost, St as ThemeScopeCore, T as PreviewCompiledThemeProvider, U as createEditorApiClientFactory, Wt as themeRuntimeScopeProps, Yt as getResponsiveScopeSpec, _ as sanitizeDashboardPath, g as resolvePreviewDashboardSetupHandoff, gn as TabsTrigger, h as buildPreviewDashboardSetupUrl, hn as TabsList, kn as parseFooterModuleId, l as PREVIEW_SITE_BANNER_ATTRIBUTE, lt as BlockApiProvider, m as resolveSiteStyleAccess, mn as TabsContent, nt as useApiMediaUploader, o as PreviewChromeLayerProvider, ot as ImageResolveContextProvider, p as canInspectSiteStyle, pn as Tabs, t as SiteChromeCustomizeButton, x as SiteFontStorageProvider, xt as revealEditorElement, y as resolvePreviewSetupBannerModel } from "./SiteChromeCustomizeButton-CrgS3I8d.mjs";
|
|
7
|
+
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-D4F_5rnr.mjs";
|
|
8
|
+
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, d as EditorProvider, f as useEditor, i as getPreviewChromeSurfaceDataProps, l as PREVIEW_KEEP_ALIVE_INTERVAL_MS, o as readPreviewThemeCookie, p as FixedBottomSurface, r as PREVIEW_CHROME_THEME_CLASS_NAME, s as subscribePreviewThemeCookie, t as PreviewChromeRootProvider, u as PREVIEW_KEEP_ALIVE_JITTER_RATIO } from "./previewChromeRoot-CbAI_jSH.mjs";
|
|
8
9
|
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
9
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { useQueryClient } from "@tanstack/react-query";
|
|
@@ -88,7 +89,7 @@ function ResizableSplitPane({ left, right, defaultSplit = 40, minLeftWidth = 300
|
|
|
88
89
|
className: "flex h-full flex-col",
|
|
89
90
|
children: [
|
|
90
91
|
/* @__PURE__ */ jsxs(TabsList, {
|
|
91
|
-
className: "w-full justify-start rounded-none
|
|
92
|
+
className: "w-full justify-start rounded-none",
|
|
92
93
|
children: [/* @__PURE__ */ jsx(TabsTrigger, {
|
|
93
94
|
value: "left",
|
|
94
95
|
className: "flex-1",
|
|
@@ -2174,6 +2175,155 @@ function toPageSurfaceMetadataPayload(payload, baseline) {
|
|
|
2174
2175
|
...typeof payload.ogImageId === "string" || payload.ogImageId === null ? { ogImageId: payload.ogImageId } : {}
|
|
2175
2176
|
};
|
|
2176
2177
|
}
|
|
2178
|
+
//#endregion
|
|
2179
|
+
//#region ../content-editor/src/services/teamMemberProfileApiClient.ts
|
|
2180
|
+
/** Both editors use the same translation into the staff-profile write owner. */
|
|
2181
|
+
function createTeamMemberProfileApiClient(input, deps) {
|
|
2182
|
+
const scopedClient = async (call) => {
|
|
2183
|
+
const mapped = profileContentCall(call, input) ?? profilePublicationCall(call, input) ?? profileMetadataCall(call, input);
|
|
2184
|
+
if (!mapped) throw new Error(`Team member profile editor attempted an unsupported API endpoint: ${String(call.endpoint)}`);
|
|
2185
|
+
return sendProfileCall(deps.apiClient, mapped);
|
|
2186
|
+
};
|
|
2187
|
+
return scopedClient;
|
|
2188
|
+
}
|
|
2189
|
+
/** ApiClient's query contract is not distributive: dispatch the closed request union by endpoint. */
|
|
2190
|
+
function sendProfileCall(client, call) {
|
|
2191
|
+
switch (call.endpoint) {
|
|
2192
|
+
case "getTeamMemberProfileContent": return client(call);
|
|
2193
|
+
case "listTeamMemberProfileContentSlots": return client(call);
|
|
2194
|
+
case "updateTeamMemberProfileContent": return client(call);
|
|
2195
|
+
case "discardTeamMemberProfileDraft": return client(call);
|
|
2196
|
+
case "publishTeamMemberProfile": return client(call);
|
|
2197
|
+
case "scheduleTeamMemberProfile": return client(call);
|
|
2198
|
+
case "cancelScheduledTeamMemberProfile": return client(call);
|
|
2199
|
+
case "updateTeamMemberProfileRouteMetadata": return client(call);
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
function profileParams(params, input) {
|
|
2203
|
+
const content = assertTeamMemberContentParams(params, input);
|
|
2204
|
+
return {
|
|
2205
|
+
siteId: content.siteId,
|
|
2206
|
+
resourceId: input.staffMemberId,
|
|
2207
|
+
entryId: content.entryId
|
|
2208
|
+
};
|
|
2209
|
+
}
|
|
2210
|
+
function profileContentCall(call, input) {
|
|
2211
|
+
if (call.endpoint === "getContentEntry") return {
|
|
2212
|
+
endpoint: "getTeamMemberProfileContent",
|
|
2213
|
+
params: profileParams(call.params, input),
|
|
2214
|
+
options: call.options
|
|
2215
|
+
};
|
|
2216
|
+
if (call.endpoint === "listEntryPageContentSlots") return {
|
|
2217
|
+
endpoint: "listTeamMemberProfileContentSlots",
|
|
2218
|
+
params: profileParams(call.params, input),
|
|
2219
|
+
options: call.options
|
|
2220
|
+
};
|
|
2221
|
+
if (call.endpoint === "updateContentEntryContent") return {
|
|
2222
|
+
endpoint: "updateTeamMemberProfileContent",
|
|
2223
|
+
params: profileParams(call.params, input),
|
|
2224
|
+
body: call.body,
|
|
2225
|
+
options: call.options
|
|
2226
|
+
};
|
|
2227
|
+
if (call.endpoint === "discardContentEntry") return {
|
|
2228
|
+
endpoint: "discardTeamMemberProfileDraft",
|
|
2229
|
+
params: profileParams(call.params, input),
|
|
2230
|
+
options: call.options
|
|
2231
|
+
};
|
|
2232
|
+
return null;
|
|
2233
|
+
}
|
|
2234
|
+
function profilePublicationCall(call, input) {
|
|
2235
|
+
if (call.endpoint === "publishContentEntry") return {
|
|
2236
|
+
endpoint: "publishTeamMemberProfile",
|
|
2237
|
+
params: profileParams(call.params, input),
|
|
2238
|
+
body: call.body,
|
|
2239
|
+
options: call.options
|
|
2240
|
+
};
|
|
2241
|
+
if (call.endpoint === "scheduleContentEntry") return {
|
|
2242
|
+
endpoint: "scheduleTeamMemberProfile",
|
|
2243
|
+
params: profileParams(call.params, input),
|
|
2244
|
+
body: call.body,
|
|
2245
|
+
options: call.options
|
|
2246
|
+
};
|
|
2247
|
+
if (call.endpoint === "cancelScheduledContentEntry") return {
|
|
2248
|
+
endpoint: "cancelScheduledTeamMemberProfile",
|
|
2249
|
+
params: profileParams(call.params, input),
|
|
2250
|
+
options: call.options
|
|
2251
|
+
};
|
|
2252
|
+
return null;
|
|
2253
|
+
}
|
|
2254
|
+
function profileMetadataCall(call, input) {
|
|
2255
|
+
if (call.endpoint !== "updateRouteMetadata") return null;
|
|
2256
|
+
return {
|
|
2257
|
+
endpoint: "updateTeamMemberProfileRouteMetadata",
|
|
2258
|
+
params: {
|
|
2259
|
+
...assertRouteMetadataParams(call.params, input.siteId),
|
|
2260
|
+
resourceId: input.staffMemberId
|
|
2261
|
+
},
|
|
2262
|
+
body: call.body,
|
|
2263
|
+
options: call.options
|
|
2264
|
+
};
|
|
2265
|
+
}
|
|
2266
|
+
const profileEndpoints = /* @__PURE__ */ new Set([
|
|
2267
|
+
"getContentEntry",
|
|
2268
|
+
"listEntryPageContentSlots",
|
|
2269
|
+
"updateContentEntryContent",
|
|
2270
|
+
"discardContentEntry",
|
|
2271
|
+
"publishContentEntry",
|
|
2272
|
+
"scheduleContentEntry",
|
|
2273
|
+
"cancelScheduledContentEntry",
|
|
2274
|
+
"updateRouteMetadata",
|
|
2275
|
+
"deleteContentEntry"
|
|
2276
|
+
]);
|
|
2277
|
+
/** Resolve ownership at the editor boundary; lease, block and linked-entry calls keep their owners. */
|
|
2278
|
+
function createContentEntryEditorApiClient(input, apiClient) {
|
|
2279
|
+
if (input.type !== "team-member") return apiClient;
|
|
2280
|
+
const resolved = {};
|
|
2281
|
+
const resolveClient = async () => {
|
|
2282
|
+
const owner = unwrapResponse(await apiClient({
|
|
2283
|
+
endpoint: "resolveTeamMemberProfileEditorOwner",
|
|
2284
|
+
params: {
|
|
2285
|
+
siteId: input.siteId,
|
|
2286
|
+
entryId: input.entryId
|
|
2287
|
+
},
|
|
2288
|
+
options: { cache: "no-store" }
|
|
2289
|
+
}));
|
|
2290
|
+
return owner.kind === "generic" ? apiClient : createTeamMemberProfileApiClient({
|
|
2291
|
+
siteId: input.siteId,
|
|
2292
|
+
contentEntryId: input.entryId,
|
|
2293
|
+
staffMemberId: owner.staffMemberId
|
|
2294
|
+
}, { apiClient });
|
|
2295
|
+
};
|
|
2296
|
+
return async (call) => {
|
|
2297
|
+
if (!isRootProfileCall(call, input)) return apiClient(call);
|
|
2298
|
+
resolved.client ?? (resolved.client = resolveClient().catch((error) => {
|
|
2299
|
+
resolved.client = void 0;
|
|
2300
|
+
throw error;
|
|
2301
|
+
}));
|
|
2302
|
+
return (await resolved.client)(call);
|
|
2303
|
+
};
|
|
2304
|
+
}
|
|
2305
|
+
function isRootProfileCall(call, input) {
|
|
2306
|
+
if (!profileEndpoints.has(call.endpoint) || !("params" in call)) return false;
|
|
2307
|
+
const params = call.params;
|
|
2308
|
+
if (isContentEntryParams(params)) return params.siteId === input.siteId && params.entryId === input.entryId && params.type === "team-member";
|
|
2309
|
+
return call.endpoint === "updateRouteMetadata" && isRouteMetadataParams(params) && params.siteId === input.siteId && params.routeId === input.routeId;
|
|
2310
|
+
}
|
|
2311
|
+
function assertTeamMemberContentParams(params, expected) {
|
|
2312
|
+
if (!isContentEntryParams(params)) throw new Error("Team member profile editor received invalid content params");
|
|
2313
|
+
if (params.siteId !== expected.siteId || params.entryId !== expected.contentEntryId || params.type !== "team-member") throw new Error("Team member profile editor attempted to edit a different content entry");
|
|
2314
|
+
return params;
|
|
2315
|
+
}
|
|
2316
|
+
function assertRouteMetadataParams(params, expectedSiteId) {
|
|
2317
|
+
if (!isRouteMetadataParams(params)) throw new Error("Team member profile editor received invalid route params");
|
|
2318
|
+
if (params.siteId !== expectedSiteId) throw new Error("Team member profile editor received invalid route params");
|
|
2319
|
+
return params;
|
|
2320
|
+
}
|
|
2321
|
+
function isContentEntryParams(value) {
|
|
2322
|
+
return typeof value === "object" && value !== null && "siteId" in value && "type" in value && "entryId" in value && typeof value.siteId === "string" && typeof value.type === "string" && typeof value.entryId === "string";
|
|
2323
|
+
}
|
|
2324
|
+
function isRouteMetadataParams(value) {
|
|
2325
|
+
return typeof value === "object" && value !== null && "siteId" in value && "routeId" in value && typeof value.siteId === "string" && typeof value.routeId === "string";
|
|
2326
|
+
}
|
|
2177
2327
|
const PREVIEW_EDITABLE_OUTLINE = `1px dashed rgba(156, 163, 175, 0.75)`;
|
|
2178
2328
|
//#endregion
|
|
2179
2329
|
//#region ../content-editor/src/session-journal/SiteAdmissionObserver.tsx
|
|
@@ -2906,6 +3056,22 @@ function planPreviewDocumentFrame(input) {
|
|
|
2906
3056
|
default: return assertNever(input.viewportMode);
|
|
2907
3057
|
}
|
|
2908
3058
|
}
|
|
3059
|
+
/**
|
|
3060
|
+
* A fixed size previews a device. The site's fixed chrome (the mobile menu
|
|
3061
|
+
* overlay, a booking bar) has to cover that device's screen, not the editor's
|
|
3062
|
+
* window, and stay in view while the page scrolls. So the device viewport is a
|
|
3063
|
+
* non-scrolling containing block the height of the canvas, and the page scrolls
|
|
3064
|
+
* in a box inside it. The scrollbar is hidden because a phone's overlays the page
|
|
3065
|
+
* rather than taking width from it; the shell forwards wheel scrolling from the
|
|
3066
|
+
* margins beside the device.
|
|
3067
|
+
*/
|
|
3068
|
+
const DEVICE_SCROLLER_STYLE = {
|
|
3069
|
+
height: "100%",
|
|
3070
|
+
overflowX: "hidden",
|
|
3071
|
+
overflowY: "auto",
|
|
3072
|
+
overscrollBehavior: "contain",
|
|
3073
|
+
scrollbarWidth: "none"
|
|
3074
|
+
};
|
|
2909
3075
|
function planFixedPreviewDocumentFrame(input) {
|
|
2910
3076
|
const scale = normalizePreviewScale(input.scale);
|
|
2911
3077
|
const targetWidthPx = input.viewportWidth === "full" ? 1440 : input.viewportWidth;
|
|
@@ -2920,6 +3086,15 @@ function planFixedPreviewDocumentFrame(input) {
|
|
|
2920
3086
|
return {
|
|
2921
3087
|
kind: "fixed",
|
|
2922
3088
|
targetWidthPx,
|
|
3089
|
+
deviceViewportStyle: {
|
|
3090
|
+
position: "relative",
|
|
3091
|
+
boxSizing: "content-box",
|
|
3092
|
+
width: `${scaledWidth}px`,
|
|
3093
|
+
height: "100%",
|
|
3094
|
+
margin: "0 auto",
|
|
3095
|
+
contain: "layout"
|
|
3096
|
+
},
|
|
3097
|
+
deviceScrollerStyle: DEVICE_SCROLLER_STYLE,
|
|
2923
3098
|
wrapperStyle,
|
|
2924
3099
|
contentStyle: {
|
|
2925
3100
|
minHeight: "100%",
|
|
@@ -4087,19 +4262,85 @@ function renderPreviewDocument(input) {
|
|
|
4087
4262
|
if (frame.kind === "squeeze") return document;
|
|
4088
4263
|
return /* @__PURE__ */ jsx("div", {
|
|
4089
4264
|
ref: input.scaleContainerRef,
|
|
4090
|
-
className: "h-full overflow-auto",
|
|
4265
|
+
className: "h-full overflow-x-auto overflow-y-hidden",
|
|
4266
|
+
onWheel: forwardMarginWheelToDevice,
|
|
4091
4267
|
children: /* @__PURE__ */ jsx("div", {
|
|
4092
|
-
|
|
4268
|
+
"data-builder-preview-device-viewport": "",
|
|
4269
|
+
className: "border-x shadow-sm",
|
|
4270
|
+
style: frame.deviceViewportStyle,
|
|
4093
4271
|
children: /* @__PURE__ */ jsx("div", {
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4272
|
+
[DEVICE_SCROLLER_ATTRIBUTE]: "",
|
|
4273
|
+
style: frame.deviceScrollerStyle,
|
|
4274
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4275
|
+
style: frame.wrapperStyle,
|
|
4276
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4277
|
+
ref: input.contentRef,
|
|
4278
|
+
className: frame.frameClassName,
|
|
4279
|
+
style: frame.contentStyle,
|
|
4280
|
+
...frame.frameDataProps,
|
|
4281
|
+
children: document
|
|
4282
|
+
})
|
|
4283
|
+
})
|
|
4099
4284
|
})
|
|
4100
4285
|
})
|
|
4101
4286
|
});
|
|
4102
4287
|
}
|
|
4288
|
+
const DEVICE_SCROLLER_ATTRIBUTE = "data-builder-preview-device-scroller";
|
|
4289
|
+
/**
|
|
4290
|
+
* The page scrolls inside the device, so wheel scrolling over the canvas beside
|
|
4291
|
+
* it is passed on. Events that bubble here through a portal (editor popovers)
|
|
4292
|
+
* aren't over the canvas and keep their own scrolling.
|
|
4293
|
+
*/
|
|
4294
|
+
function forwardMarginWheelToDevice(event) {
|
|
4295
|
+
const target = event.target;
|
|
4296
|
+
const scroller = event.currentTarget.querySelector(`[${DEVICE_SCROLLER_ATTRIBUTE}]`);
|
|
4297
|
+
if (!scroller || !(target instanceof Node) || !event.currentTarget.contains(target) || scroller.contains(target)) return;
|
|
4298
|
+
const unit = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? scroller.clientHeight : 1;
|
|
4299
|
+
scroller.scrollBy({
|
|
4300
|
+
left: event.deltaX * unit,
|
|
4301
|
+
top: event.deltaY * unit
|
|
4302
|
+
});
|
|
4303
|
+
}
|
|
4304
|
+
//#endregion
|
|
4305
|
+
//#region ../preview-next/src/client/preview/previewViewportPreferences.ts
|
|
4306
|
+
const STORAGE_KEYS = {
|
|
4307
|
+
mode: "preview-viewport-mode",
|
|
4308
|
+
width: "preview-viewport-width",
|
|
4309
|
+
sidebarWidth: "preview-sidebar-width",
|
|
4310
|
+
zoom: "preview-zoom-level"
|
|
4311
|
+
};
|
|
4312
|
+
const PREFERENCE_NAMES = Object.keys(STORAGE_KEYS);
|
|
4313
|
+
function readStoredViewportPreferences(storage) {
|
|
4314
|
+
return {
|
|
4315
|
+
mode: parseStoredViewportMode(storage.getItem(STORAGE_KEYS.mode)),
|
|
4316
|
+
width: parseStoredViewportWidth(storage.getItem(STORAGE_KEYS.width)),
|
|
4317
|
+
sidebarWidth: parseStoredSidebarWidth(storage.getItem(STORAGE_KEYS.sidebarWidth)),
|
|
4318
|
+
zoom: parseStoredZoom(storage.getItem(STORAGE_KEYS.zoom))
|
|
4319
|
+
};
|
|
4320
|
+
}
|
|
4321
|
+
/**
|
|
4322
|
+
* The storage writes for a change the person made. Only changed values are
|
|
4323
|
+
* written, so a fresh store's defaults never overwrite a saved size before it
|
|
4324
|
+
* has been restored (which is how the size used to reset on each new page).
|
|
4325
|
+
*/
|
|
4326
|
+
function viewportPreferenceWrites(previous, next) {
|
|
4327
|
+
return PREFERENCE_NAMES.filter((name) => previous[name] !== next[name]).map((name) => [STORAGE_KEYS[name], String(next[name])]);
|
|
4328
|
+
}
|
|
4329
|
+
function parseStoredViewportMode(stored) {
|
|
4330
|
+
return stored === "squeeze" || stored === "fixed" ? stored : null;
|
|
4331
|
+
}
|
|
4332
|
+
function parseStoredViewportWidth(stored) {
|
|
4333
|
+
if (!stored) return null;
|
|
4334
|
+
if (stored === "full") return "full";
|
|
4335
|
+
const width = parseInt(stored, 10);
|
|
4336
|
+
return Number.isFinite(width) && width > 0 ? width : null;
|
|
4337
|
+
}
|
|
4338
|
+
function parseStoredZoom(stored) {
|
|
4339
|
+
if (!stored) return null;
|
|
4340
|
+
if (stored === "fit") return "fit";
|
|
4341
|
+
const zoom = parseInt(stored, 10);
|
|
4342
|
+
return zoom === 33 || zoom === 50 || zoom === 75 || zoom === 100 ? zoom : null;
|
|
4343
|
+
}
|
|
4103
4344
|
//#endregion
|
|
4104
4345
|
//#region ../preview-next/src/client/preview/linkedEntryEditEvents.ts
|
|
4105
4346
|
const LINKED_ENTRY_EDIT_EVENT = "riverbank:preview:linked-entry-edit";
|
|
@@ -4189,10 +4430,10 @@ function resolveShellThemeRoles(props, journalSource) {
|
|
|
4189
4430
|
}
|
|
4190
4431
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
4191
4432
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
4192
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
4433
|
+
return { default: (await import("./PreviewEditorSidebar-CjOIZlUk.mjs")).PreviewEditorSidebar };
|
|
4193
4434
|
});
|
|
4194
4435
|
const PreviewEditorUI = React.lazy(async () => {
|
|
4195
|
-
return { default: (await import("./PreviewEditorUI
|
|
4436
|
+
return { default: (await import("./PreviewEditorUI--kS9Cwsc.mjs")).PreviewEditorUI };
|
|
4196
4437
|
});
|
|
4197
4438
|
function renderShellProviders(input) {
|
|
4198
4439
|
if (!input.themeRoles) return input.content;
|
|
@@ -4385,40 +4626,33 @@ function usePreviewLayoutNodes() {
|
|
|
4385
4626
|
siteChromeRenderModel: layout?.siteChromeRenderModel ?? null
|
|
4386
4627
|
};
|
|
4387
4628
|
}
|
|
4388
|
-
/**
|
|
4629
|
+
/**
|
|
4630
|
+
* Viewport preferences live in the editor store, loaded from and saved to
|
|
4631
|
+
* localStorage. Each page mounts a fresh store with default values, so the
|
|
4632
|
+
* saved values are applied first and only later changes are written back.
|
|
4633
|
+
*/
|
|
4389
4634
|
function useStoredViewportPreferences() {
|
|
4635
|
+
const store = useEditorUiStoreInstance();
|
|
4390
4636
|
const mode = useEditorUiStore((s) => s.viewport.mode);
|
|
4391
4637
|
const width = useEditorUiStore((s) => s.viewport.width);
|
|
4392
4638
|
const sidebarWidth = useEditorUiStore((s) => s.viewport.sidebarWidth);
|
|
4393
4639
|
const zoom = useEditorUiStore((s) => s.viewport.zoom);
|
|
4394
|
-
const setMode = useEditorUiStore((s) => s.viewport.setMode);
|
|
4395
|
-
const setWidth = useEditorUiStore((s) => s.viewport.setWidth);
|
|
4396
4640
|
const setSidebarWidth = useEditorUiStore((s) => s.viewport.setSidebarWidth);
|
|
4397
|
-
const setZoom = useEditorUiStore((s) => s.viewport.setZoom);
|
|
4398
|
-
useEffect(() => {
|
|
4399
|
-
const stored = readStoredViewportPreferences();
|
|
4400
|
-
if (stored.mode) setMode(stored.mode);
|
|
4401
|
-
if (stored.width !== null) setWidth(stored.width);
|
|
4402
|
-
if (stored.sidebarWidth !== null) setSidebarWidth(stored.sidebarWidth);
|
|
4403
|
-
if (stored.zoom !== null) setZoom(stored.zoom);
|
|
4404
|
-
}, [
|
|
4405
|
-
setMode,
|
|
4406
|
-
setWidth,
|
|
4407
|
-
setSidebarWidth,
|
|
4408
|
-
setZoom
|
|
4409
|
-
]);
|
|
4410
|
-
useEffect(() => {
|
|
4411
|
-
localStorage.setItem("preview-viewport-mode", mode);
|
|
4412
|
-
}, [mode]);
|
|
4413
|
-
useEffect(() => {
|
|
4414
|
-
localStorage.setItem("preview-viewport-width", String(width));
|
|
4415
|
-
}, [width]);
|
|
4416
|
-
useEffect(() => {
|
|
4417
|
-
localStorage.setItem("preview-sidebar-width", String(sidebarWidth));
|
|
4418
|
-
}, [sidebarWidth]);
|
|
4419
4641
|
useEffect(() => {
|
|
4420
|
-
|
|
4421
|
-
|
|
4642
|
+
const storage = browserPreferenceStorage();
|
|
4643
|
+
const viewport = store.getState().viewport;
|
|
4644
|
+
const stored = readStoredViewportPreferences(storage);
|
|
4645
|
+
if (stored.mode !== null) viewport.setMode(stored.mode);
|
|
4646
|
+
if (stored.width !== null) viewport.setWidth(stored.width);
|
|
4647
|
+
if (stored.sidebarWidth !== null) viewport.setSidebarWidth(stored.sidebarWidth);
|
|
4648
|
+
if (stored.zoom !== null) viewport.setZoom(stored.zoom);
|
|
4649
|
+
const saved = { current: viewportPreferencesOf(store.getState().viewport) };
|
|
4650
|
+
return store.subscribe((state) => {
|
|
4651
|
+
const next = viewportPreferencesOf(state.viewport);
|
|
4652
|
+
for (const [key, value] of viewportPreferenceWrites(saved.current, next)) storage.setItem(key, value);
|
|
4653
|
+
saved.current = next;
|
|
4654
|
+
});
|
|
4655
|
+
}, [store]);
|
|
4422
4656
|
return {
|
|
4423
4657
|
mode,
|
|
4424
4658
|
width,
|
|
@@ -4427,28 +4661,30 @@ function useStoredViewportPreferences() {
|
|
|
4427
4661
|
setSidebarWidth
|
|
4428
4662
|
};
|
|
4429
4663
|
}
|
|
4430
|
-
function
|
|
4664
|
+
function viewportPreferencesOf(viewport) {
|
|
4431
4665
|
return {
|
|
4432
|
-
mode:
|
|
4433
|
-
width:
|
|
4434
|
-
sidebarWidth:
|
|
4435
|
-
zoom:
|
|
4666
|
+
mode: viewport.mode,
|
|
4667
|
+
width: viewport.width,
|
|
4668
|
+
sidebarWidth: viewport.sidebarWidth,
|
|
4669
|
+
zoom: viewport.zoom
|
|
4436
4670
|
};
|
|
4437
4671
|
}
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
}
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4672
|
+
/** Storage can be unavailable (private windows, blocked site data); preferences then last for the page only. */
|
|
4673
|
+
function browserPreferenceStorage() {
|
|
4674
|
+
return {
|
|
4675
|
+
getItem: (key) => {
|
|
4676
|
+
try {
|
|
4677
|
+
return localStorage.getItem(key);
|
|
4678
|
+
} catch {
|
|
4679
|
+
return null;
|
|
4680
|
+
}
|
|
4681
|
+
},
|
|
4682
|
+
setItem: (key, value) => {
|
|
4683
|
+
try {
|
|
4684
|
+
localStorage.setItem(key, value);
|
|
4685
|
+
} catch {}
|
|
4686
|
+
}
|
|
4687
|
+
};
|
|
4452
4688
|
}
|
|
4453
4689
|
/** The canvas container's width and the document's height, kept current by resize observers. */
|
|
4454
4690
|
function usePreviewDocumentMeasurements(viewportMode, viewportWidth) {
|
|
@@ -4667,7 +4903,20 @@ function PreviewBlockApiProvider({ config, children }) {
|
|
|
4667
4903
|
});
|
|
4668
4904
|
}
|
|
4669
4905
|
function PreviewShell(props) {
|
|
4670
|
-
const
|
|
4906
|
+
const transport = useMemo(() => createGuardedPreviewApiClient(props.apiBaseUrl), [props.apiBaseUrl]);
|
|
4907
|
+
const apiClient = useMemo(() => props.entryData && props.pageNodeType !== "page_surface" ? createContentEntryEditorApiClient({
|
|
4908
|
+
siteId: props.siteId,
|
|
4909
|
+
type: props.entryData.type ?? "",
|
|
4910
|
+
entryId: props.entryData.id,
|
|
4911
|
+
routeId: props.routeId
|
|
4912
|
+
}, transport) : transport, [
|
|
4913
|
+
transport,
|
|
4914
|
+
props.siteId,
|
|
4915
|
+
props.entryData?.type,
|
|
4916
|
+
props.entryData?.id,
|
|
4917
|
+
props.pageNodeType,
|
|
4918
|
+
props.routeId
|
|
4919
|
+
]);
|
|
4671
4920
|
const access = resolveShellAccess({
|
|
4672
4921
|
...props,
|
|
4673
4922
|
hideSiteStyleConfigurator: props.hideSiteStyleConfigurator ?? false
|