@riverbankcms/sdk 0.182.0 → 0.184.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 +79 -0
- package/README.md +83 -4
- package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
- package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
- package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
- package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
- package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
- package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
- package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
- package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
- package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
- package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
- package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
- package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
- package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
- package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +7 -7
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +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 +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/portal/index.d.ts +10 -2
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +126 -2
- package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
- package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
- package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
- package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
- package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
- package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
- package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
- package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
- package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
- package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
- package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
- package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
- package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
- package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
- package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
- package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
- package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
- package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
- package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
- package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
- package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
- package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
- package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
- package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
- package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
- package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
- package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
- package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
- package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
- package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
- package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
- package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
- package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
- package/dist/client/client.mjs +460 -119
- package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
- package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
- package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
- package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
- package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
- package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
- package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
- package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
- package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
- package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
- package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
- package/dist/client/gifting/client.mjs +16 -9
- package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
- package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
- package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
- package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
- package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
- package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
- package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
- package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
- package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
- package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
- package/dist/client/portal/client.mjs +51 -35
- package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
- package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
- package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
- package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
- package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
- package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
- package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
- package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
- package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
- package/dist/client/rendering/client.mjs +32 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
- package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
- package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
- package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
- package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
- package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
- package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
- package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
- package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
- package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
- package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
- package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
- package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
- package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
- package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
- package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
- package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
- package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
- package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
- package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
- package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
- package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
- package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
- package/dist/preview-next/container-responsive.css +469 -2
- package/dist/preview-next/editor-chrome.css +23 -2
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
- package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
- package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
- package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
- package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
- package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +4 -4
- package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
- package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
- package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
- package/dist/server/page-converter.mjs +18 -5
- package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
- package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
- package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
- package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
- package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
- package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +10 -10
- package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
- package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
- package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
- package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
- package/dist/server/theme-bridge.mjs +5 -4
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
- package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
- package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
- package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
- package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
- package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
- package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
- package/dist/styles/index.css +2987 -168
- package/package.json +1 -1
- package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
- package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
- package/dist/client/types-BEaKfam_.mjs +0 -778
- package/dist/server/customCss-C9kgPHvr.mjs +0 -247
- package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
- package/dist/server/media-gvfIw3z8.mjs +0 -216
package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $
|
|
3
|
-
import {
|
|
4
|
-
import { i as formatEditorStatus, n as useEditorWriteState, r as decideEditorStatus } from "./useAutosaveStatus-
|
|
5
|
-
import {
|
|
6
|
-
import { c as writePreviewThemeCookie,
|
|
2
|
+
import { $ as useFooterPanelOwnsNotice, $d as unsafeAsEditorBlockId, $r as readinessFactsFromPayload, Ct as EditorWriteSurface, Gn as editorAuthoredBlockDocument, H as usePreviewAuth, Jc as DialogFooter, Jl as Button, Kc as DialogContent, Ma as pageTemplateFromEntry, Nn as canDiscardDraft, Qr as publishReadinessWarning, Sn as useEditorUiStoreInstance, Uc as Spinner, Ud as displayedValues, Wc as Dialog, Xc as DialogTitle, Yc as DialogHeader, Zl as cva, Zr as PUBLISH_READINESS_COPY, bc as editorAdmissionIsOpen, fn as useEditor, ft as useServerRefresh, gc as resolveBlockTitle, ht as useSessionJournalHistory, jc as unwrapResponse, lt as useEntryEditorController, n as usePreviewAssistantSlot, nu as cn, pt as useSessionJournal, qc as DialogDescription, ud as authoredValuesEqual, un as PREVIEW_CHROME_Z_INDEX, wn as useSidebarView, xn as useEditorUiStore } from "./previewAssistantSlot-DrUoRNu9.mjs";
|
|
3
|
+
import { C as Palette, Z as Eye, b as Pencil, c as TriangleAlert, et as EllipsisVertical, mt as ChevronDown, s as Undo2, v as Redo2 } from "./lucide-react-B4c6U3ZU.mjs";
|
|
4
|
+
import { i as formatEditorStatus, n as useEditorWriteState, o as EditorHistoryButtons, r as decideEditorStatus } from "./useAutosaveStatus-DrdQ4ier.mjs";
|
|
5
|
+
import { _t as DropdownMenuTrigger, at as Tooltip, c as needsSetupAsk, ct as TooltipTrigger, dt as DropdownMenuContent, ft as DropdownMenuItem, gt as DropdownMenuSeparator, ht as DropdownMenuRadioItem, lt as Badge, mt as DropdownMenuRadioGroup, n as resolveBlockManifest, ot as TooltipContent, pt as DropdownMenuLabel, t as useOpenBlockForSetup, ut as DropdownMenu } from "./useOpenBlockForSetup-kuGRKaRL.mjs";
|
|
6
|
+
import { c as writePreviewThemeCookie, d as FixedBottomSurface, n as usePreviewChromeRoot, o as readPreviewThemeCookie } from "./previewChromeRoot-CEYp90mM.mjs";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState, useTransition } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -64,6 +64,35 @@ const SplitButton = React$1.forwardRef(({ children, menuItems, menuAriaLabel, gr
|
|
|
64
64
|
});
|
|
65
65
|
SplitButton.displayName = "SplitButton";
|
|
66
66
|
//#endregion
|
|
67
|
+
//#region ../ui/src/lib/use-delayed-flag.ts
|
|
68
|
+
/**
|
|
69
|
+
* True once `active` has held for `delay` milliseconds.
|
|
70
|
+
*
|
|
71
|
+
* This is what keeps a spinner from flashing on an action that finishes
|
|
72
|
+
* quickly. It lives on its own so that anything drawing its own pending
|
|
73
|
+
* indicator gets the same timing rather than reimplementing it, and so the two
|
|
74
|
+
* cannot drift apart.
|
|
75
|
+
*/
|
|
76
|
+
function useDelayedFlag(active, delay) {
|
|
77
|
+
const [visible, setVisible] = useState(active && delay <= 0);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (!active) {
|
|
80
|
+
setVisible(false);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (delay <= 0) {
|
|
84
|
+
setVisible(true);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const timer = setTimeout(() => {
|
|
88
|
+
if (typeof window === "undefined") return;
|
|
89
|
+
setVisible(true);
|
|
90
|
+
}, delay);
|
|
91
|
+
return () => clearTimeout(timer);
|
|
92
|
+
}, [active, delay]);
|
|
93
|
+
return visible;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
67
96
|
//#region ../editor/src/components/EditingToggle.tsx
|
|
68
97
|
const FLOATING_STYLE = { zIndex: PREVIEW_CHROME_Z_INDEX };
|
|
69
98
|
/**
|
|
@@ -73,14 +102,26 @@ const EditingToggle = ({ placement = "floating" }) => {
|
|
|
73
102
|
const { isEditingMode } = useEditor();
|
|
74
103
|
return isEditingMode ? /* @__PURE__ */ jsx(ViewAsVisitorButton, { placement }) : /* @__PURE__ */ jsx(EditPageButton, { placement });
|
|
75
104
|
};
|
|
76
|
-
|
|
105
|
+
const OPENING_LABEL = "Getting ready…";
|
|
106
|
+
/** Long enough that an ordinary open never shows it. */
|
|
107
|
+
const SLOW_OPEN_MS = 8e3;
|
|
108
|
+
/**
|
|
109
|
+
* Viewing: a labelled way back into editing, since there's no bar to hold it.
|
|
110
|
+
* Pressed before the editor is ready, it waits here and editing opens by itself.
|
|
111
|
+
*/
|
|
77
112
|
function EditPageButton({ placement }) {
|
|
78
|
-
const { isEditingPending,
|
|
113
|
+
const { isEditingPending, setEditingMode } = useEditor();
|
|
79
114
|
const floating = placement === "floating";
|
|
80
|
-
|
|
115
|
+
const slow = useDelayedFlag(isEditingPending, SLOW_OPEN_MS);
|
|
116
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [floating && slow ? /* @__PURE__ */ jsx("p", {
|
|
117
|
+
role: "status",
|
|
118
|
+
className: "fixed bottom-20 right-6 max-w-64 rounded-2xl border border-foreground/15 bg-background px-4 py-3 text-sm shadow-lg",
|
|
119
|
+
style: FLOATING_STYLE,
|
|
120
|
+
children: "This is taking longer than usual. The editor will open by itself when it’s ready."
|
|
121
|
+
}) : null, /* @__PURE__ */ jsxs(Button, {
|
|
81
122
|
type: "button",
|
|
82
123
|
variant: "outline",
|
|
83
|
-
onClick:
|
|
124
|
+
onClick: () => setEditingMode(true),
|
|
84
125
|
disabled: isEditingPending,
|
|
85
126
|
"aria-busy": isEditingPending,
|
|
86
127
|
className: `${floating ? "fixed bottom-6 right-6" : ""} h-10 cursor-pointer gap-2 rounded-full border-foreground/80 bg-background px-4 font-semibold shadow-lg`,
|
|
@@ -88,15 +129,15 @@ function EditPageButton({ placement }) {
|
|
|
88
129
|
children: [isEditingPending ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsx(Pencil, {
|
|
89
130
|
className: "h-4 w-4",
|
|
90
131
|
"aria-hidden": true
|
|
91
|
-
}), isEditingPending ?
|
|
92
|
-
});
|
|
132
|
+
}), isEditingPending ? OPENING_LABEL : "Edit page"]
|
|
133
|
+
})] });
|
|
93
134
|
}
|
|
94
135
|
/** Editing: an icon that leaves edit mode, named in its tooltip. */
|
|
95
136
|
function ViewAsVisitorButton({ placement }) {
|
|
96
137
|
const { isEditingPending, toggleEditingMode } = useEditor();
|
|
97
138
|
const [tooltipOpen, setTooltipOpen] = useState(false);
|
|
98
139
|
const floating = placement === "floating";
|
|
99
|
-
const label = isEditingPending ?
|
|
140
|
+
const label = isEditingPending ? OPENING_LABEL : "View as a visitor";
|
|
100
141
|
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
101
142
|
open: isEditingPending || tooltipOpen,
|
|
102
143
|
onOpenChange: setTooltipOpen,
|
|
@@ -200,22 +241,9 @@ function PhoneProblemLine({ status }) {
|
|
|
200
241
|
})]
|
|
201
242
|
});
|
|
202
243
|
}
|
|
203
|
-
|
|
204
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
205
|
-
asChild: true,
|
|
206
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
207
|
-
type: "button",
|
|
208
|
-
variant: "ghost",
|
|
209
|
-
size: "icon",
|
|
210
|
-
onClick,
|
|
211
|
-
disabled,
|
|
212
|
-
"aria-label": label,
|
|
213
|
-
children: icon
|
|
214
|
-
})
|
|
215
|
-
}), /* @__PURE__ */ jsx(TooltipContent, { children: label })] });
|
|
216
|
-
}
|
|
244
|
+
/** A phone has room for the state alone ("Published", "Draft"), so the saved time shows from `sm` up. */
|
|
217
245
|
function StatusCopy({ decision, size }) {
|
|
218
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [formatEditorStatus(decision, size), decision.primary.kind === "publication" && decision.savedAt ? /* @__PURE__ */ jsxs("span", {
|
|
246
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [formatEditorStatus(decision, size), size === "desktop" && decision.primary.kind === "publication" && decision.savedAt ? /* @__PURE__ */ jsxs("span", {
|
|
219
247
|
className: "text-xs text-muted-foreground",
|
|
220
248
|
children: [" · saved ", decision.savedAt]
|
|
221
249
|
}) : null] });
|
|
@@ -256,21 +284,9 @@ function EditorStatusBar({ status, lastSavedLabel, toolbar, draftSyncState = "ba
|
|
|
256
284
|
/* @__PURE__ */ jsxs("div", {
|
|
257
285
|
className: "flex min-w-0 flex-1 flex-nowrap items-center gap-2 sm:gap-3",
|
|
258
286
|
children: [
|
|
259
|
-
historyControls ? /* @__PURE__ */
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
"aria-label": "History controls",
|
|
263
|
-
children: [/* @__PURE__ */ jsx(HistoryButton, {
|
|
264
|
-
label: "Undo",
|
|
265
|
-
icon: /* @__PURE__ */ jsx(Undo2, {}),
|
|
266
|
-
onClick: historyControls.onUndo,
|
|
267
|
-
disabled: !historyControls.canUndo
|
|
268
|
-
}), /* @__PURE__ */ jsx(HistoryButton, {
|
|
269
|
-
label: "Redo",
|
|
270
|
-
icon: /* @__PURE__ */ jsx(Redo2, {}),
|
|
271
|
-
onClick: historyControls.onRedo,
|
|
272
|
-
disabled: !historyControls.canRedo
|
|
273
|
-
})]
|
|
287
|
+
historyControls ? /* @__PURE__ */ jsx(EditorHistoryButtons, {
|
|
288
|
+
controls: historyControls,
|
|
289
|
+
className: "hidden sm:inline-flex"
|
|
274
290
|
}) : null,
|
|
275
291
|
/* @__PURE__ */ jsx(StatusBarNote, { message: statusDecision.note }),
|
|
276
292
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -310,7 +326,7 @@ function EditorStatusBar({ status, lastSavedLabel, toolbar, draftSyncState = "ba
|
|
|
310
326
|
size: "desktop"
|
|
311
327
|
})
|
|
312
328
|
}), /* @__PURE__ */ jsx("span", {
|
|
313
|
-
className: "
|
|
329
|
+
className: "line-clamp-2 min-w-0 leading-tight sm:hidden",
|
|
314
330
|
children: /* @__PURE__ */ jsx(StatusCopy, {
|
|
315
331
|
decision: statusDecision,
|
|
316
332
|
size: "mobile"
|
|
@@ -1034,8 +1050,9 @@ function PreviewEditorChrome({ dashboardBaseUrl = null, inMaintenanceMode = fals
|
|
|
1034
1050
|
publish: controller.actions.publish
|
|
1035
1051
|
});
|
|
1036
1052
|
const portalTarget = usePreviewChromeRoot();
|
|
1053
|
+
const { isEditingMode } = useEditor();
|
|
1037
1054
|
if (!portalTarget || !canEdit) return null;
|
|
1038
|
-
return createGatedPortal(/* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(EditorChrome, {
|
|
1055
|
+
return createGatedPortal(isEditingMode, /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(EditorChrome, {
|
|
1039
1056
|
toolbarOverrides: computedToolbar,
|
|
1040
1057
|
onPublish: publishGate.requestPublish,
|
|
1041
1058
|
onDiscard: handleDiscard,
|
|
@@ -1071,9 +1088,16 @@ function PublishReadinessPrompt({ gate }) {
|
|
|
1071
1088
|
onSetUp: (block) => setUp(unsafeAsEditorBlockId(block.blockId), block.repair)
|
|
1072
1089
|
});
|
|
1073
1090
|
}
|
|
1074
|
-
/**
|
|
1075
|
-
|
|
1076
|
-
|
|
1091
|
+
/**
|
|
1092
|
+
* Editor chrome is portalled out of the sidebar's gate, so it carries its own write surface.
|
|
1093
|
+
* Outside editing the chrome is only the Edit page button, which has to work while the
|
|
1094
|
+
* editor is still opening: pressing it early waits on the button until editing is ready.
|
|
1095
|
+
*/
|
|
1096
|
+
function createGatedPortal(editing, chrome, target) {
|
|
1097
|
+
return createPortal(/* @__PURE__ */ jsx(EditorWriteSurface, {
|
|
1098
|
+
gated: editing,
|
|
1099
|
+
children: chrome
|
|
1100
|
+
}), target);
|
|
1077
1101
|
}
|
|
1078
1102
|
/** The lifecycle owns failure presentation; only a completed discard refreshes the page. */
|
|
1079
1103
|
function previewLifecycleHandlers(actions, refresh) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as useOptionalPreviewLayout } from "./PreviewLayoutContext-Dy0LwcHc.mjs";
|
|
3
3
|
import { t as PreviewQueryProvider } from "./PreviewQueryProvider-BgIucg_5.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { C as PreviewCompiledThemeProvider, F as mergeResolvedDataContext,
|
|
7
|
-
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-
|
|
8
|
-
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, d as
|
|
4
|
+
import { $d as unsafeAsEditorBlockId, $u as indexRenderableMediaAssets, At as EditorPageTemplateProvider, B as registerPreviewRenewalFetcher, Bc as Callout, Bo as getResponsiveScopeSpec, Br as LINKED_CONTENT_ENTRY_META_KEY, Ca as planSiteChromePlacement, Cc as editorAdmissionSession, Cn as useOptionalEditorUiStoreInstance, Ct as EditorWriteSurface, Dt as getEditorClientId, E as PreviewRenderObservationsProvider, Ec as API_ENDPOINTS, Fc as selectedCanvasBlockId, Fn as planLinkedSaveHandoverRetention, H as usePreviewAuth, Hd as parseEditLeaseScope, Hi as buildResolveImageUrlContext, Hr as getLinkedContentEntryMeta, In as remoteDraftValues, Jc as DialogFooter, Jl as Button, Kc as DialogContent, Ln as renderSourceFor, Ma as pageTemplateFromEntry, On as SIDEBAR_WIDTH, Pn as activeLinkedSaveHandover, Qu as renderableMediaAssetSchema$1, R as createGuardedPreviewApiClient, Sc as editorAdmissionNotice, Sn as useEditorUiStoreInstance, St as EditLeaseModal, Tc as OPERATION_ID_HEADER, U as usePreviewToken, V as renewPreviewSession, Vc as CalloutDescription, W as renderSiteChromeBlock, Wc as Dialog, Wn as unsafeAsLinkedContentEntryId, Wt as blocksKeys, Xc as DialogTitle, Xt as ImageResolveContextProvider, Yc as DialogHeader, Zu as buildRenderableMediaAssetIndex, _ as PreviewFooterProvider, _t as savedContentReceipt, a as PreviewPageDesignEditorStateProvider, au as isEdited, bd as parseFooterModuleId, bt as VIEWING_PARTICIPATION, cu as canEditorWrite, dn as EditorProvider, en as BlockApiProvider, et as SessionJournalHost, f as PreviewThemeJournalProvider, fn as useEditor, ft as useServerRefresh, g as previewThemeBase, ga as measureSiteStickyChromeHeightPx, gt as createEditorApiClientFactory, ha as SITE_STICKY_CHROME_HEIGHT_FALLBACK, hn as createSnapshotFromPageRecord, i as usePreviewSidebarNavigation, ia as themeRuntimeScopeProps, iu as baselineRevisionOf, jc as unwrapResponse, kn as parseStoredSidebarWidth, l as SiteChromeCustomizeProvider, ln as ApiRequestError, lt as useEntryEditorController, m as usePreviewThemeSourceOptional, ma as SITE_STICKY_CHROME_HEIGHT_CSS_VAR, mn as createRoutingHelpers, na as buildThemeDataAttrs, nc as assertNever$1, nu as cn, p as usePreviewThemeSource, pa as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, pn as useIsEditingMode, qc as DialogDescription, r as PreviewSidebarBootstrap, st as EntryControllerProvider, t as PreviewAssistantSlotProvider, ud as authoredValuesEqual, uf as assertNever$2, v as useLiveFooterRuntime, va as planSiteOverlayHeaderClearance, vt as savedPageSurfaceMetadataReceipt, wc as observeEditorAdmission, xc as editorAdmissionLoadFailure, xn as useEditorUiStore, xt as EditLeaseDiscardedNotice, ya as siteTopChromeMeasurementTargets, yt as useRetentionTicks, z as initPreviewAuth, zn as resolveRenderedValues, zo as DEFAULT_THEME_RESPONSIVE_MODE } from "./previewAssistantSlot-DrUoRNu9.mjs";
|
|
5
|
+
import { W as GripVertical } from "./lucide-react-B4c6U3ZU.mjs";
|
|
6
|
+
import { C as PreviewCompiledThemeProvider, F as mergeResolvedDataContext, Ft as TabsContent, It as TabsList, Lt as TabsTrigger, O as SiteFontStorageProvider, Pt as Tabs, T as usePreviewCompiledTheme, V as MediaEditorContextProvider, W as useApiMediaUploader, a as sanitizeDashboardPath, at as ThemeScopeCore, i as resolvePreviewDashboardSetupHandoff, it as revealEditorElement, l as SiteChromeCustomizeButton, n as resolveSiteStyleAccess, r as buildPreviewDashboardSetupUrl, s as resolvePreviewSetupBannerModel, t as canInspectSiteStyle, v as PreviewChromeLayerProvider, vt as Toaster, w as PreviewThemeRenderingProvider, x as PREVIEW_SITE_BANNER_ATTRIBUTE } from "./siteStyleAccess-B3PwHw2z.mjs";
|
|
7
|
+
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-DuRUwUrK.mjs";
|
|
8
|
+
import { a as resolvePreviewChromeSurface, c as writePreviewThemeCookie, d as FixedBottomSurface, i as getPreviewChromeSurfaceDataProps, l as PREVIEW_KEEP_ALIVE_INTERVAL_MS, o as readPreviewThemeCookie, r as PREVIEW_CHROME_THEME_CLASS_NAME, s as subscribePreviewThemeCookie, t as PreviewChromeRootProvider, u as PREVIEW_KEEP_ALIVE_JITTER_RATIO } from "./previewChromeRoot-CEYp90mM.mjs";
|
|
9
9
|
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useQueryClient } from "@tanstack/react-query";
|
|
@@ -2930,23 +2930,28 @@ function PreviewKeepAliveClient({ baseFetch }) {
|
|
|
2930
2930
|
}
|
|
2931
2931
|
//#endregion
|
|
2932
2932
|
//#region ../preview-next/src/client/preview/PreviewLeaseEditingMode.tsx
|
|
2933
|
-
function projectEditingAvailability({ canEdit, requestedEditingMode, editability }) {
|
|
2934
|
-
if (!canEdit || !requestedEditingMode) return "blocked";
|
|
2933
|
+
function projectEditingAvailability({ canEdit, requestedEditingMode, editability, admissionRefused }) {
|
|
2934
|
+
if (!canEdit || !requestedEditingMode || admissionRefused) return "blocked";
|
|
2935
2935
|
if (canEditorWrite(editability)) return "ready";
|
|
2936
2936
|
if (editability.kind === "acquiring" || editability.kind === "viewing") return "pending";
|
|
2937
2937
|
return "blocked";
|
|
2938
2938
|
}
|
|
2939
|
+
function editorAdmissionRefused(admission) {
|
|
2940
|
+
return admission.kind === "bootstrap" ? admission.failure !== null : admission.refusal !== null;
|
|
2941
|
+
}
|
|
2939
2942
|
/** Derives preview editing permission from the live auth and lease authorities. */
|
|
2940
2943
|
function PreviewLeaseEditingMode() {
|
|
2941
2944
|
const { canEdit } = usePreviewAuth();
|
|
2942
2945
|
const editability = useEditorUiStore((state) => state.editability);
|
|
2946
|
+
const admissionRefused = useEditorUiStore((state) => editorAdmissionRefused(state.getAdmission()));
|
|
2943
2947
|
const drawerOpen = useEditorUiStore((state) => state.drawerOpen);
|
|
2944
2948
|
const setDrawerOpen = useEditorUiStore((state) => state.setDrawerOpen);
|
|
2945
2949
|
const { requestedEditingMode, setEditingAvailability } = useEditor();
|
|
2946
2950
|
const availability = projectEditingAvailability({
|
|
2947
2951
|
canEdit,
|
|
2948
2952
|
requestedEditingMode,
|
|
2949
|
-
editability
|
|
2953
|
+
editability,
|
|
2954
|
+
admissionRefused
|
|
2950
2955
|
});
|
|
2951
2956
|
useEffect(() => setEditingAvailability(availability), [availability, setEditingAvailability]);
|
|
2952
2957
|
useEffect(() => {
|
|
@@ -3974,19 +3979,23 @@ function previewLeaseThing(isEntry, pageNodeType) {
|
|
|
3974
3979
|
if (pageNodeType === "page_surface") return "this event page";
|
|
3975
3980
|
return isEntry ? "this entry" : "this page";
|
|
3976
3981
|
}
|
|
3982
|
+
/** Why editing can't start: a failed load or a refusal, never the ordinary wait while it opens. */
|
|
3983
|
+
function editorAdmissionProblem(admission) {
|
|
3984
|
+
return admission.kind === "bootstrap" ? editorAdmissionLoadFailure(admission) : editorAdmissionNotice(admission);
|
|
3985
|
+
}
|
|
3977
3986
|
function PreviewAccessBanners({ dashboardBaseUrl, surfaceId, isEntry, pageNodeType }) {
|
|
3978
3987
|
const { state } = usePreviewAuth();
|
|
3979
3988
|
const { requestedEditingMode, setEditingMode } = useEditor();
|
|
3980
3989
|
const showDiscardedNotice = useEditorUiStore((editor) => canEditorWrite(editor.editability) && editor.leaseDiscardedChanges);
|
|
3981
3990
|
const thing = previewLeaseThing(isEntry, pageNodeType);
|
|
3982
|
-
const admissionNotice = useEditorUiStore((editor) =>
|
|
3991
|
+
const admissionNotice = useEditorUiStore((editor) => editorAdmissionProblem(editor.getAdmission()));
|
|
3983
3992
|
const active = state === "ok";
|
|
3984
3993
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3985
3994
|
/* @__PURE__ */ jsx(PreviewAuthBanner, {
|
|
3986
3995
|
dashboardBaseUrl,
|
|
3987
3996
|
surfaceId
|
|
3988
3997
|
}),
|
|
3989
|
-
active && admissionNotice ? /* @__PURE__ */ jsx(FixedBottomSurface, {
|
|
3998
|
+
active && requestedEditingMode && admissionNotice ? /* @__PURE__ */ jsx(FixedBottomSurface, {
|
|
3990
3999
|
variant: "light",
|
|
3991
4000
|
width: "centered",
|
|
3992
4001
|
offsetCssVar: "--builder-editor-chrome-offset",
|
|
@@ -4040,7 +4049,8 @@ function renderEditableSurface(children, surface, options) {
|
|
|
4040
4049
|
}
|
|
4041
4050
|
function FooterModuleInspectionSurface({ children }) {
|
|
4042
4051
|
const editorUiStore = useOptionalEditorUiStoreInstance();
|
|
4043
|
-
|
|
4052
|
+
const isEditing = useIsEditingMode();
|
|
4053
|
+
return editorUiStore && isEditing ? /* @__PURE__ */ jsx(EnabledFooterModuleInspectionSurface, {
|
|
4044
4054
|
editorUiStore,
|
|
4045
4055
|
children
|
|
4046
4056
|
}) : /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
@@ -4446,11 +4456,12 @@ function resolveShellThemeRoles(props, journalSource) {
|
|
|
4446
4456
|
} : null;
|
|
4447
4457
|
}
|
|
4448
4458
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
4459
|
+
const loadPreviewEditorSidebar = () => import("./PreviewEditorSidebar-B7WW58uE.mjs");
|
|
4449
4460
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
4450
|
-
return { default: (await
|
|
4461
|
+
return { default: (await loadPreviewEditorSidebar()).PreviewEditorSidebar };
|
|
4451
4462
|
});
|
|
4452
4463
|
const PreviewEditorUI = React.lazy(async () => {
|
|
4453
|
-
return { default: (await import("./PreviewEditorUI-
|
|
4464
|
+
return { default: (await import("./PreviewEditorUI-BnJ1ughv.mjs")).PreviewEditorUI };
|
|
4454
4465
|
});
|
|
4455
4466
|
function renderShellProviders(input) {
|
|
4456
4467
|
if (!input.themeRoles) return input.content;
|
|
@@ -4493,7 +4504,24 @@ function PreviewDocumentContent(input) {
|
|
|
4493
4504
|
children: input.children
|
|
4494
4505
|
}) });
|
|
4495
4506
|
}
|
|
4507
|
+
/** Warm code only. Sidebar reads and effects still start when React mounts it. */
|
|
4508
|
+
function usePreloadPreviewSidebar() {
|
|
4509
|
+
const { canEdit } = usePreviewAuth();
|
|
4510
|
+
useEffect(() => {
|
|
4511
|
+
if (!canEdit) return;
|
|
4512
|
+
const preload = () => {
|
|
4513
|
+
loadPreviewEditorSidebar().catch(() => {});
|
|
4514
|
+
};
|
|
4515
|
+
if (typeof window.requestIdleCallback === "function") {
|
|
4516
|
+
const task = window.requestIdleCallback(preload);
|
|
4517
|
+
return () => window.cancelIdleCallback(task);
|
|
4518
|
+
}
|
|
4519
|
+
const task = window.setTimeout(preload, 1e3);
|
|
4520
|
+
return () => window.clearTimeout(task);
|
|
4521
|
+
}, [canEdit]);
|
|
4522
|
+
}
|
|
4496
4523
|
function PreviewShellLayout(props) {
|
|
4524
|
+
usePreloadPreviewSidebar();
|
|
4497
4525
|
const themeRoles = resolveShellThemeRoles(props, usePreviewThemeSourceOptional());
|
|
4498
4526
|
if (!isOverrideOnlyPreviewShellLayout(props) && !themeRoles) return /* @__PURE__ */ jsx(PreviewThemeUnavailable, {});
|
|
4499
4527
|
return isOverrideOnlyPreviewShellLayout(props) || themeRoles ? /* @__PURE__ */ jsx(AvailablePreviewShellLayout, {
|
|
@@ -4533,38 +4561,42 @@ function AvailablePreviewShellLayout({ props, themeRoles }) {
|
|
|
4533
4561
|
siteStyleAccess
|
|
4534
4562
|
}, editorScopeKey)
|
|
4535
4563
|
});
|
|
4564
|
+
const editorChrome = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
4565
|
+
/* @__PURE__ */ jsx(LinkedEntryEditEventBridge, {}),
|
|
4566
|
+
/* @__PURE__ */ jsx(React.Suspense, {
|
|
4567
|
+
fallback: null,
|
|
4568
|
+
children: /* @__PURE__ */ jsx(PreviewEditorUI, {
|
|
4569
|
+
entryData,
|
|
4570
|
+
dashboardBaseUrl,
|
|
4571
|
+
inMaintenanceMode: maintenanceModeEnabled,
|
|
4572
|
+
siteId,
|
|
4573
|
+
surfaceId,
|
|
4574
|
+
isSiteLaunched,
|
|
4575
|
+
apiClient
|
|
4576
|
+
})
|
|
4577
|
+
}),
|
|
4578
|
+
/* @__PURE__ */ jsx(PreviewAccessBanners, {
|
|
4579
|
+
dashboardBaseUrl,
|
|
4580
|
+
surfaceId,
|
|
4581
|
+
isEntry: Boolean(entryData),
|
|
4582
|
+
pageNodeType: props.pageNodeType
|
|
4583
|
+
})
|
|
4584
|
+
] });
|
|
4536
4585
|
return renderShellProviders({
|
|
4537
4586
|
props,
|
|
4538
4587
|
themeRoles,
|
|
4539
4588
|
content: /* @__PURE__ */ jsx(PreviewChromeRootProvider, {
|
|
4540
4589
|
surfaceId,
|
|
4541
|
-
children: /* @__PURE__ */ jsx(
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
dashboardBaseUrl,
|
|
4552
|
-
inMaintenanceMode: maintenanceModeEnabled,
|
|
4553
|
-
siteId,
|
|
4554
|
-
surfaceId,
|
|
4555
|
-
isSiteLaunched,
|
|
4556
|
-
apiClient
|
|
4557
|
-
})
|
|
4558
|
-
}),
|
|
4559
|
-
/* @__PURE__ */ jsx(PreviewAccessBanners, {
|
|
4560
|
-
dashboardBaseUrl,
|
|
4561
|
-
surfaceId,
|
|
4562
|
-
isEntry: Boolean(entryData),
|
|
4563
|
-
pageNodeType: props.pageNodeType
|
|
4564
|
-
})
|
|
4565
|
-
] }),
|
|
4566
|
-
sidebar,
|
|
4567
|
-
children
|
|
4590
|
+
children: /* @__PURE__ */ jsx(EditorPageTemplateProvider, {
|
|
4591
|
+
template: pageTemplateFromEntry({ _contentTypeSlug: entryData?.type }),
|
|
4592
|
+
children: /* @__PURE__ */ jsx(PreviewShellPanes, {
|
|
4593
|
+
rendering,
|
|
4594
|
+
themeRuntime,
|
|
4595
|
+
surfaceId,
|
|
4596
|
+
editorChrome,
|
|
4597
|
+
sidebar,
|
|
4598
|
+
children
|
|
4599
|
+
})
|
|
4568
4600
|
})
|
|
4569
4601
|
})
|
|
4570
4602
|
});
|