@riverbankcms/sdk 0.182.0 → 0.183.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 +49 -3
- package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-X1_G96iN.d.ts} +1 -1
- package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-CEqZJZEE.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-DQejfbXL.d.ts} +2 -2
- package/dist/_dts/{client-D6T430bk.d.ts → client-B_B_amKD.d.ts} +2 -1
- package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-Dhx5Ocvx.d.ts} +9 -16
- package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-FeOnfoa1.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-m70J6tit.d.ts} +2 -2
- package/dist/_dts/{index-CEyYMhLJ.d.ts → index-BOpUh8kO.d.ts} +1 -1
- package/dist/_dts/{index-DIU-wL1M.d.ts → index-Bizdaxji.d.ts} +2 -2
- package/dist/_dts/{index-Cqxis-nv.d.ts → index-BxCmCit0.d.ts} +1 -1
- package/dist/_dts/{index-CQrb3Ccc.d.ts → index-CjAkEWAp.d.ts} +4 -4
- package/dist/_dts/{index-DqPKdeTk.d.ts → index-iuFrbIjt.d.ts} +1 -1
- package/dist/_dts/{index-CciRW_w1.d.ts → index-liuhlOX7.d.ts} +2 -2
- package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-D4wrTIIw.d.ts} +7 -7
- package/dist/_dts/{request-DEwxUSw8.d.ts → request-Gn0O1blj.d.ts} +24912 -23733
- package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D5duwuqS.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-xzJ3c9Na.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 +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 +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 +91 -2
- package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-B1gyJon_.d.ts} +7 -7
- package/dist/_dts/{types-B3RjeBLV.d.ts → types-BoITy0rA.d.ts} +41 -4
- package/dist/_dts/{types-BvUSGQrw.d.ts → types-DBNuMtSk.d.ts} +16 -5
- package/dist/_dts/{types-CkRFtBqd.d.ts → types-DHMcuoeQ.d.ts} +7 -7
- package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-BIPO-XlE.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-Ct8slgRk.mjs} +22 -18
- package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-qqTxGGS4.mjs} +7 -7
- package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DCh9MUIF.mjs} +2 -2
- package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-RcdaStG7.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-D7Wt-Oaa.mjs} +25 -8
- package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-BdGxZWeg.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-HFVkoOac.mjs} +5 -5
- package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-BtkJW8bA.mjs} +10 -10
- package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DxaGjFFS.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-B2c5dR49.mjs} +1 -1
- package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-Fr2qi2C2.mjs} +29 -14
- package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-BRMaq0ky.mjs} +1 -1
- package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-BhGxfbjt.mjs} +3 -3
- package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-COuEJzbO.mjs} +6 -6
- package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-BTLYhVxD.mjs} +21 -42
- package/dist/client/{Page-sV6BJkXX.mjs → Page-CgbQZP5g.mjs} +2786 -927
- package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-DQNkfNLA.mjs} +3 -3
- package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-DvPekKeM.mjs} +1 -1
- package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DyXoI3ob.mjs} +7 -7
- package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-Bc9DBbVp.mjs} +42 -9
- package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-wj4Rloo5.mjs} +336 -119
- package/dist/client/{accordion-6cuswD_s.mjs → accordion-BVXfjnh-.mjs} +1 -1
- package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-DycPGtke.mjs} +191 -71
- package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-DrWSUqL3.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CduDRcIk.mjs} +2 -2
- package/dist/client/buttonParts-CJEtVOUy.mjs +1511 -0
- package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DyCLMP8s.mjs} +2 -2
- package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DffP_Nv0.mjs} +1 -1
- package/dist/client/{cart-BYOe7MCh.mjs → cart-BuEp_cj4.mjs} +3 -3
- package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-CAO39uDG.mjs} +1 -1
- package/dist/client/{checkout-Dwd7Di77.mjs → checkout-BoxzT64s.mjs} +3 -3
- package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-IGUy7XOx.mjs} +1 -1
- package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-D0UsiFmm.mjs} +1 -1
- package/dist/client/client.mjs +446 -93
- package/dist/client/{constants-DdxFG3Ic.mjs → constants-C_8AxMdm.mjs} +1 -1
- package/dist/client/{context-Hi1RuYEM.mjs → context-D1L0pe__.mjs} +2 -2
- package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-BunFTnIq.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CtLAG651.mjs} +4 -4
- package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DiSxkBUP.mjs} +15 -15
- package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-DUnhwZ1o.mjs} +4 -4
- package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-BvBQo0nF.mjs} +4 -4
- package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-aTLifOX7.mjs} +4 -4
- package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-DFd7pr09.mjs} +4 -4
- package/dist/client/{form-DWnlEVSK.mjs → form-Dikmc2AO.mjs} +3 -3
- package/dist/client/{form.client-D7zmeqNI.mjs → form.client-zHaQK5I9.mjs} +5 -5
- package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-BLl9n8TH.mjs} +3 -3
- package/dist/client/gifting/client.mjs +16 -9
- package/dist/client/{gifting-Cn0jidP5.mjs → gifting-CufPM38H.mjs} +4 -4
- package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--N1GaSY8.mjs} +155 -84
- package/dist/client/gifting.interactive-D9MK4HkV.mjs +157 -0
- package/dist/client/gifting.parts-CRtiRzo-.mjs +119 -0
- package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-BIaBpmk3.mjs} +2 -2
- package/dist/client/{noop-jesvJXEE.mjs → islands-DJDLGQEm.mjs} +14007 -6685
- package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-wg_JHTxm.mjs} +6 -6
- package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-hzpkW9NQ.mjs} +226 -195
- package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-CgzpSv9p.mjs} +2 -2
- package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CvxLiEBT.mjs} +3 -3
- package/dist/client/portal/client.mjs +31 -27
- package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
- package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DTHlWg_F.mjs} +22 -7
- package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-22Q7zgjN.mjs} +1 -1
- package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-DFWYvK8z.mjs} +1 -1
- package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-DhZAwo60.mjs} +3 -3
- package/dist/client/{productList-BuLemmod.mjs → productList-BiVpbZK2.mjs} +3 -3
- package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-DFYqKnLy.mjs} +4 -2
- package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-C3OBRg7x.mjs} +2027 -781
- package/dist/client/rendering/client.mjs +29 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-ms477Z08.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-B6nQeqvH.mjs} +1 -1
- package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-BYqsV1Kb.mjs} +1 -1
- package/dist/client/runtimeResponse-CUX_lldL.mjs +3 -0
- package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-DVsIcPaI.mjs} +16 -15
- package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-7mO6KY7_.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-L1Vge8tG.mjs} +2 -2
- package/dist/client/{shop-GuMqnDL-.mjs → shop-xt4dQ3HH.mjs} +3 -3
- package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-DNJfD3VQ.mjs} +28 -17
- package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-DS8t6749.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-Dy3nNfTG.mjs} +11 -8
- package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-DcjtDpUu.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-DvdFFWOT.mjs} +1 -1
- package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Cq-7sU5_.mjs} +8 -8
- package/dist/client/{view-DOyZc-DF.mjs → view-4gnPcpWJ.mjs} +24 -9
- package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-DDvL3iza.mjs} +76 -159
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CLqSRUpt.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-CIdAg-Tm.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-Bm85jX35.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-D8srnz9R.mjs} +445 -18
- package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-DVpk5cqp.mjs} +3864 -1943
- package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-XoTtHSFH.mjs} +11 -36
- package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-VQHsRg2u.mjs} +40 -35
- package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CLdF9f6o.mjs} +12 -8
- package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-ORNN4x-3.mjs} +782 -16
- package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-eAi3tDAr.mjs} +11 -1
- package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-CqH91EwA.mjs} +17988 -6757
- package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-B3ySEu6p.mjs} +3 -90
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-CdpSupcr.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-C6eOP6QW.mjs} +35 -6
- package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-BhPg4e-r.mjs} +49 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-BaWUF9D7.mjs} +2007 -448
- package/dist/preview-next/container-responsive.css +320 -0
- 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-Ch0X99vE.mjs} +163 -17
- package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-B2FmczLO.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DtAyv9qA.mjs} +17 -7
- package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-BtPqb76u.mjs} +418 -31
- package/dist/server/{accordions-By_0Ykks.mjs → accordions-vzdZ2Wt1.mjs} +1 -1
- package/dist/server/{bindings-DMJH4bvo.mjs → bindings-B_9JuU66.mjs} +7 -7
- package/dist/server/{client-DrwlRNAH.mjs → client-DC7cjiSw.mjs} +469 -92
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-CeMywaiD.mjs → constants-d6nPNJpe.mjs} +22 -6
- package/dist/server/{customCss-C9kgPHvr.mjs → customCss-rtIfEYwQ.mjs} +1 -18
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{expandPalette-ehuW8r2g.mjs → expandPalette-DxPrNOAB.mjs} +182 -90
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-D0prFflT.mjs → loadContent-hb27HYic.mjs} +11 -10
- package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-JToD8wDD.mjs} +3 -3
- package/dist/server/{lookMediaFrame-H0fi4bJk.mjs → lookMediaFrame-CTsycLLK.mjs} +94 -39
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-wrcuWmgp.mjs → navigation-B2WhGofA.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +8 -8
- package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-vD5KTClL.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-CdqJ1NQZ.mjs} +86 -97
- package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-CAhr4oOf.mjs} +3 -3
- package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-m80Xu2pd.mjs} +429 -247
- package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CRwOZfpa.mjs} +3 -3
- package/dist/server/{portal-pG_uhsI2.mjs → portal-B2wCQno_.mjs} +1 -1
- package/dist/server/portal.mjs +2 -2
- package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-BWIkFaXq.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-D1PHU-K9.mjs} +3 -3
- package/dist/server/{registry-Cc88-23f.mjs → registry-KtsOsAzY.mjs} +20113 -9774
- 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 +9 -9
- package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-sjIDJYl7.mjs} +1 -1
- package/dist/server/{schema-CwfxQjc4.mjs → schema-BBEqquBM.mjs} +44 -28
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-ChEZDRwU.mjs} +37 -14
- package/dist/server/theme-bridge.mjs +3 -3
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-DKCIBeb1.mjs} +2 -2
- package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-DybHErxH.mjs} +4 -4
- package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
- package/dist/server/{types-BKaBZFjD.mjs → types-vyz09w64.mjs} +479 -8
- package/dist/server/{validation-BovmbS8N.mjs → validation-Cvi-1TZZ.mjs} +13 -9
- package/dist/server/{version-hws4hgyX.mjs → version-B-icAIV1.mjs} +1 -1
- package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
- package/dist/styles/index.css +2482 -108
- 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/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-D8srnz9R.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE6sIgz8.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { A as List, F as Info, G as FileSpreadsheet, I as Image, J as FileArchive, K as FilePlay,
|
|
5
|
-
import {
|
|
6
|
-
import { A as
|
|
3
|
+
import { Ai as resolveMediaStorageUrl, Ao as replaceInlineTextRange, Bc as __awaiter, Bo as decideSectionPhoto, C as selectedImageFromMediaValue, Cd as unsafeAsEditorBlockId, Co as inlineTextToPlainText, Dc as DialogOverlay, Di as computeMediaTransformStyle, Ec as DialogDescription, Ei as getRichTextImageSize, El as cn$2, Eo as normalizeInlineTextMarks, Eu as mediaIdentifierSchema, F as nextLookTilePin, Fi as resolveArrangementKnobs, Fu as generateUuidV4, Gc as __spreadArray, Go as sectionPhotoPresence, Hc as __generator, Id as unsafeAsMediaAssetId, Jo as resolveEditorArrangementLook, Kc as __spreadArrays, Lc as usePortalContainer, Ld as unsafeAsPositiveByteCount, Li as isSystemCustomizeFacetId, M as lookPositionLabel, Mu as asLayoutVariantKey, N as lookTilePosition, Oc as DialogPortal, Oo as plainTextToInlineText, Os as lookModes, P as lookTilesFor, Pd as assertNever, Pi as arrangementKnobChoices, Pu as authoredValuesEqual, Sc as overlayScrimClass, So as inlineTextHighlightTones, Tc as DialogContent, Tl as useComposedRefs, To as normalizeInlineText, Uc as __read, Vc as __extends, Vi as systemCustomizeFacetStoredValue, Wc as __rest, _c as DialogDescription$1, _o as applyInlineTextMarkToRange, _u as getDirectImageUrlForMediaAsset, ai as getBlockDefinition, ar as parseBackgroundColorToken, b as pageDesignLookPosition, bc as DialogTitle$1, bl as useControlReadiness, bn as useEditorUiStore, bo as inlineTextAccentTones, bs as getGradientPreset, co as RichTextDocSchema, er as backgroundColorTokens, fl as useControllableState, fu as isRotationDimensionSwap, gc as DialogContent$1, gl as Primitive, gu as resolveMediaTransformForAspect, hl as composeEventHandlers, hu as parseAspectRatioValue, i as usePreviewSidebarNavigation, ic as isAddingBlockView, il as useSize, ji as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, jo as truncateInlineText, k as usePreviewRenderBackgrounds, kc as DialogTitle, ki as resolveImageUrlWithContext, ko as removeInlineTextMarkFromRange, kr as EDITOR_PART_ATTRIBUTE, ks as assertNever$1, lr as rankBackgroundImagePoolItems, mc as Dialog, ml as createContextScope, mu as formatAspectRatioToken, nr as defaultBackgroundOverrideForMode, o as usePreviewPageDesignEditorState, oc as selectedCanvasBlockId, os as getCuratedSiteStyle, pc as Spinner, pu as normalizeRightAngle, ra as readThemeScopeContext, rc as unwrapResponse, rn as getDashboardBaseUrl, ru as surfaceForegroundValue, sr as parseCanonicalSectionBackground, ts as lookDefinitionForId, uc as Callout, uo as richTextVariantCapabilities, vl as Button, vs as gradientToCss, vu as getImageUrl, w as selectedImageFromRenderableAsset, wc as DialogClose, wu as resolveManagedMediaReference, xl as cva, xn as useEditorUiStoreInstance, xo as inlineTextEqual, y as cyclePageDesignBlockLook, yc as DialogHeader, zc as __assign, zi as systemCustomizeFacetDefinitionForBlock } from "./previewAssistantSlot-CqH91EwA.mjs";
|
|
4
|
+
import { A as List, Ct as Archive, F as Info, G as FileSpreadsheet, I as Image, J as FileArchive, K as FilePlay, L as ImageUp, M as Link$1, P as Italic$1, S as Palette, U as File, V as Highlighter, W as FileText, X as EyeOff, Xt as ok, Yt as err, _t as Bold$1, a as Upload, c as Trash2, et as Crop, j as ListOrdered, n as X, pt as Check, q as FileHeadphone, s as TriangleAlert, y as Pencil } from "./lucide-react-eAi3tDAr.mjs";
|
|
5
|
+
import { Bt as classifyKnownMimeType, Ct as usePrevious, E as usePreviewCompiledThemeOptional, G as TransferError, H as useMediaEditor, L as siteColourCss, Ot as Input, S as planBlockToolbarPlacement, St as SelectValue, U as useMediaEditorOptional, W as useApiMediaUploader, _ as PreviewChromeFloatingControl, b as measureSiteTopChromeClearance, bt as SelectItem, ct as EditorCanvasChoiceChip, dt as EditorInsertionMarker, ft as EditorPartFrame, h as CustomizeBackgroundColorPicker, jt as useFieldDescribedBy, lt as EditorCanvasCycleChip, mt as CHOSEN_OPTION_CLASS, pt as EditorSelectionFrame, st as EditorCanvasChipRow, ut as EditorCanvasNameChip, vt as Select, xt as SelectTrigger, y as readThemeCustomProperties, yt as SelectContent } from "./siteStyleAccess-C6eOP6QW.mjs";
|
|
6
|
+
import { A as arrangementBlockMode, J as resolvePromotedFields, P as placedFields, _t as DropdownMenuTrigger, a as blockNoticeAction, at as Tooltip, ct as TooltipTrigger, dt as DropdownMenuContent, ft as DropdownMenuItem, lt as Badge, o as blockNoticeLabel, ot as TooltipContent, r as useBlockCustomizeControls, s as blockNoticeMessage, st as TooltipProvider, t as useOpenBlockForSetup, u as useBlockNotice, ut as DropdownMenu } from "./useOpenBlockForSetup-BaWUF9D7.mjs";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import React, { Component, createContext, createRef, forwardRef, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -22172,6 +22172,25 @@ function RichTextEditorSurface({ editor, config, isEmpty, className, contentClas
|
|
|
22172
22172
|
});
|
|
22173
22173
|
}
|
|
22174
22174
|
//#endregion
|
|
22175
|
+
//#region ../block-form/src/editing/canvasPart.ts
|
|
22176
|
+
/**
|
|
22177
|
+
* Whether a part of the block on the canvas leads anywhere, and what its
|
|
22178
|
+
* setting is called. The plan decides where the field is; a part whose field
|
|
22179
|
+
* the form doesn't offer (hidden by a condition, owned by the Look, or not
|
|
22180
|
+
* the block's own) leads nowhere, and the canvas treats a click on it as a
|
|
22181
|
+
* click on the block. A field the form places itself is named as the form
|
|
22182
|
+
* names it (the hero's section photo is "Photo" there, not "Background
|
|
22183
|
+
* image"); a part nested inside one (a card's image) is named by its own field.
|
|
22184
|
+
*/
|
|
22185
|
+
function canvasPartOf(plan, fieldPath) {
|
|
22186
|
+
if (plan.destinationOf(fieldPath).kind === "unavailable") return null;
|
|
22187
|
+
const field = placedFields(plan.layout).find((item) => item.path === fieldPath)?.field ?? resolvePromotedFields([...plan.fields], [fieldPath], () => void 0)[0]?.field;
|
|
22188
|
+
return field ? {
|
|
22189
|
+
path: fieldPath,
|
|
22190
|
+
label: field.label
|
|
22191
|
+
} : null;
|
|
22192
|
+
}
|
|
22193
|
+
//#endregion
|
|
22175
22194
|
//#region ../media-react/src/hooks/useMediaSearch.ts
|
|
22176
22195
|
const DEFAULT_PAGE_SIZE = 30;
|
|
22177
22196
|
const useMediaSearch = ({ repo, siteId, initialQuery = "", pageSize = DEFAULT_PAGE_SIZE, filters, filtersKey }) => {
|
|
@@ -30009,7 +30028,7 @@ const MediaEditor = ({ editingSlot, value, onChange, allowedKinds, previewAspect
|
|
|
30009
30028
|
});
|
|
30010
30029
|
const uploader = uploadIntent === void 0 && videoPrepIntent === void 0 ? context.uploader : scopedUploader;
|
|
30011
30030
|
const resolvedAllowedKinds = useMemo(() => resolveAllowedMediaKinds({ allowedKinds }), [allowedKinds]);
|
|
30012
|
-
const [pickerOpen, setPickerOpen] = useState(
|
|
30031
|
+
const [pickerOpen, setPickerOpen] = useState(mediaPickerAutoOpen);
|
|
30013
30032
|
const [cropOpen, setCropOpen] = useState(false);
|
|
30014
30033
|
const videoSlotPolicy = useMemo(() => deriveVideoSlotPolicy(videoSelectionIntent), [videoSelectionIntent]);
|
|
30015
30034
|
const PickerMiniComponent = components?.MediaPickerMini ?? MediaPickerMini;
|
|
@@ -30032,7 +30051,7 @@ const MediaEditor = ({ editingSlot, value, onChange, allowedKinds, previewAspect
|
|
|
30032
30051
|
onMediaPickerOpenChange?.(true);
|
|
30033
30052
|
}, [mediaPickerAutoOpen, onMediaPickerOpenChange]);
|
|
30034
30053
|
useEffect(() => {
|
|
30035
|
-
if (
|
|
30054
|
+
if (pickerOpen) {
|
|
30036
30055
|
setCropOpen(false);
|
|
30037
30056
|
return;
|
|
30038
30057
|
}
|
|
@@ -30044,7 +30063,7 @@ const MediaEditor = ({ editingSlot, value, onChange, allowedKinds, previewAspect
|
|
|
30044
30063
|
}, [
|
|
30045
30064
|
cropEditorAutoOpen,
|
|
30046
30065
|
cropEditorMode,
|
|
30047
|
-
|
|
30066
|
+
pickerOpen,
|
|
30048
30067
|
mediaState.crop.kind,
|
|
30049
30068
|
value
|
|
30050
30069
|
]);
|
|
@@ -30319,6 +30338,252 @@ function useRichTextImageProjection(fallbackSiteId) {
|
|
|
30319
30338
|
}), [imageResolveContext, fallbackSiteId]);
|
|
30320
30339
|
}
|
|
30321
30340
|
//#endregion
|
|
30341
|
+
//#region ../preview-next/src/client/blocks/arrangementControlsModel.ts
|
|
30342
|
+
/**
|
|
30343
|
+
* Decides the arrangement-Look controls for one block from the editor read
|
|
30344
|
+
* model and the content the editor holds. Null means the block's style uses
|
|
30345
|
+
* the legacy catalogue, so the legacy controls apply unchanged.
|
|
30346
|
+
*/
|
|
30347
|
+
function arrangementBlockControlsFor(input) {
|
|
30348
|
+
const selection = input.block.arrangementLookSelection;
|
|
30349
|
+
if (!selection) return null;
|
|
30350
|
+
const mode = arrangementBlockMode(input.block);
|
|
30351
|
+
const pin = pinnedLookId(input.block);
|
|
30352
|
+
const offered = offeredLooksForMode(selection, mode);
|
|
30353
|
+
const resolved = resolveEditorArrangementLook(selection, mode, pin);
|
|
30354
|
+
const effective = resolved.kind === "none" || resolved.kind === "recipe" ? null : resolved.look;
|
|
30355
|
+
const knobState = effective ? resolveArrangementKnobs({
|
|
30356
|
+
blockKind: input.block.blockKind,
|
|
30357
|
+
look: compiledKnobLook(selection.style.offers, effective),
|
|
30358
|
+
content: input.content
|
|
30359
|
+
}) : null;
|
|
30360
|
+
return {
|
|
30361
|
+
look: lookPosition(resolved, input.block),
|
|
30362
|
+
tiles: lookTilesFor({
|
|
30363
|
+
looks: offered,
|
|
30364
|
+
defaultLookId: resolvedLookId(resolveEditorArrangementLook(selection, mode, null)),
|
|
30365
|
+
shownLookId: effective?.id ?? null
|
|
30366
|
+
}),
|
|
30367
|
+
mode: modeSwitch(input.block, selection.available, mode),
|
|
30368
|
+
knobs: knobState ? knobControls(input.block.blockKind, knobState.exposure, knobState.knobs, input.content, effective?.structure.knobDescriptions) : [],
|
|
30369
|
+
headlineHint: knobState ? headlineHint(knobState.knobs, knobState.length) : null
|
|
30370
|
+
};
|
|
30371
|
+
}
|
|
30372
|
+
/** The name of the Look a block shows, for the page outline. Null on a legacy style. */
|
|
30373
|
+
function arrangementLookNameFor(block) {
|
|
30374
|
+
const selection = block.arrangementLookSelection;
|
|
30375
|
+
if (!selection) return null;
|
|
30376
|
+
return lookPosition(resolveEditorArrangementLook(selection, arrangementBlockMode(block), pinnedLookId(block)), block)?.lookName ?? null;
|
|
30377
|
+
}
|
|
30378
|
+
/** The Look a resolution renders; unpinned, that's the style's own pick. */
|
|
30379
|
+
function resolvedLookId(resolved) {
|
|
30380
|
+
return resolved.kind === "none" || resolved.kind === "recipe" ? null : resolved.look.id;
|
|
30381
|
+
}
|
|
30382
|
+
function pinnedLookId(block) {
|
|
30383
|
+
return block.look.kind === "user-pinned" ? block.look.value : null;
|
|
30384
|
+
}
|
|
30385
|
+
/** Offer order, as the resolver uses it, for the Looks that support the mode. */
|
|
30386
|
+
function offeredLooksForMode(selection, mode) {
|
|
30387
|
+
return selection.style.offers.flatMap((offer) => {
|
|
30388
|
+
const look = selection.available.find((candidate) => candidate.id === offer.id);
|
|
30389
|
+
return look && lookModes(look).includes(mode) ? [look] : [];
|
|
30390
|
+
});
|
|
30391
|
+
}
|
|
30392
|
+
function compiledKnobLook(offers, look) {
|
|
30393
|
+
const offer = offers.find((candidate) => candidate.id === look.id);
|
|
30394
|
+
return {
|
|
30395
|
+
look,
|
|
30396
|
+
addKnobs: offer?.addKnobs ?? [],
|
|
30397
|
+
removeKnobs: offer?.removeKnobs ?? [],
|
|
30398
|
+
knobValues: offer?.knobValues ?? {}
|
|
30399
|
+
};
|
|
30400
|
+
}
|
|
30401
|
+
function lookPosition(resolved, block) {
|
|
30402
|
+
switch (resolved.kind) {
|
|
30403
|
+
case "offered": return resolved.source === "auto" ? {
|
|
30404
|
+
kind: "automatic",
|
|
30405
|
+
lookName: resolved.look.label
|
|
30406
|
+
} : {
|
|
30407
|
+
kind: "pinned",
|
|
30408
|
+
lookName: resolved.look.label
|
|
30409
|
+
};
|
|
30410
|
+
case "style-fallback": return {
|
|
30411
|
+
kind: "style-fallback",
|
|
30412
|
+
requestedName: lookName(resolved.requested),
|
|
30413
|
+
lookName: resolved.look.label
|
|
30414
|
+
};
|
|
30415
|
+
case "mode-mismatch": return {
|
|
30416
|
+
kind: "mode-mismatch",
|
|
30417
|
+
requestedName: lookName(resolved.requested),
|
|
30418
|
+
requestedModeLabel: requestedModeLabel(block, resolved.requested),
|
|
30419
|
+
lookName: resolved.look.label
|
|
30420
|
+
};
|
|
30421
|
+
case "recipe":
|
|
30422
|
+
case "none": return null;
|
|
30423
|
+
}
|
|
30424
|
+
}
|
|
30425
|
+
/** The requested Look may be one this style doesn't offer, so read the shared catalogue. */
|
|
30426
|
+
function lookName(id) {
|
|
30427
|
+
return lookDefinitionForId(id)?.label ?? "your chosen Look";
|
|
30428
|
+
}
|
|
30429
|
+
function requestedModeLabel(block, id) {
|
|
30430
|
+
const look = lookDefinitionForId(id);
|
|
30431
|
+
const mode = look ? lookModes(look).find((candidate) => candidate !== null) : void 0;
|
|
30432
|
+
return mode ? modeLabel(block, mode) : "another";
|
|
30433
|
+
}
|
|
30434
|
+
function modeSwitch(block, available, current) {
|
|
30435
|
+
if (current === null) return null;
|
|
30436
|
+
const modesWithLooks = available.flatMap((look) => lookModes(look)).filter((mode) => mode !== null);
|
|
30437
|
+
const modes = [...new Set(modesWithLooks)];
|
|
30438
|
+
return modes.length > 1 ? {
|
|
30439
|
+
current,
|
|
30440
|
+
options: modes.map((mode) => ({
|
|
30441
|
+
mode,
|
|
30442
|
+
label: modeLabel(block, mode)
|
|
30443
|
+
}))
|
|
30444
|
+
} : null;
|
|
30445
|
+
}
|
|
30446
|
+
function modeLabel(block, mode) {
|
|
30447
|
+
const meaning = getBlockDefinition(block.blockKind)?.manifest.variantMeaning;
|
|
30448
|
+
return (meaning?.kind === "mode" ? meaning.modeLabels?.[mode] : void 0) ?? block.availableLayouts.find((layout) => layout.id === mode)?.label ?? mode.charAt(0).toUpperCase() + mode.slice(1);
|
|
30449
|
+
}
|
|
30450
|
+
function knobControls(blockKind, exposure, knobs, content, descriptions = {}) {
|
|
30451
|
+
return exposure.flatMap((entry) => {
|
|
30452
|
+
const knob = knobs[entry.definition.id];
|
|
30453
|
+
const facet = shownKnobFacet(blockKind, entry, knob);
|
|
30454
|
+
if (!facet || !knob || knob.kind === "kept") return [];
|
|
30455
|
+
const control = knobControl(entry, knob, facet, systemCustomizeFacetStoredValue(facet, { ...content }));
|
|
30456
|
+
const description = descriptions[entry.definition.id] ?? facet.description;
|
|
30457
|
+
return [control.kind === "choice" && description !== void 0 ? {
|
|
30458
|
+
...control,
|
|
30459
|
+
description
|
|
30460
|
+
} : control];
|
|
30461
|
+
});
|
|
30462
|
+
}
|
|
30463
|
+
/** Only knobs the current Look exposes and doesn't force get a control. */
|
|
30464
|
+
function shownKnobFacet(blockKind, entry, knob) {
|
|
30465
|
+
const id = entry.definition.id;
|
|
30466
|
+
if (entry.definition.textMaxLength === void 0 && arrangementKnobChoices(entry).length <= 1 || !entry.exposed || entry.forced !== void 0 || !knob || knob.kind === "kept" || !isSystemCustomizeFacetId(id)) return null;
|
|
30467
|
+
return systemCustomizeFacetDefinitionForBlock(blockKind, id);
|
|
30468
|
+
}
|
|
30469
|
+
function knobControl(entry, knob, facet, stored) {
|
|
30470
|
+
if (entry.definition.textMaxLength !== void 0) return {
|
|
30471
|
+
kind: "text",
|
|
30472
|
+
facetId: facet.id,
|
|
30473
|
+
label: facet.label,
|
|
30474
|
+
value: knob.value,
|
|
30475
|
+
stored,
|
|
30476
|
+
maxLength: entry.definition.textMaxLength
|
|
30477
|
+
};
|
|
30478
|
+
const choices = arrangementKnobChoices(entry);
|
|
30479
|
+
const preference = knob.kind === "clamped" && knob.reason === "length" && choices.includes(knob.stored) ? knob.stored : knob.value;
|
|
30480
|
+
const labelOf = (value) => facet.values.find((option) => option.value === value)?.label ?? value;
|
|
30481
|
+
return {
|
|
30482
|
+
kind: "choice",
|
|
30483
|
+
presentation: knobPresentation(facet, choices),
|
|
30484
|
+
facetId: facet.id,
|
|
30485
|
+
label: facet.label,
|
|
30486
|
+
value: preference,
|
|
30487
|
+
stored,
|
|
30488
|
+
notOffered: knob.kind === "clamped" && knob.reason !== "length" ? {
|
|
30489
|
+
by: knob.reason,
|
|
30490
|
+
choice: labelOf(knob.stored),
|
|
30491
|
+
shows: labelOf(knob.value)
|
|
30492
|
+
} : null,
|
|
30493
|
+
options: choices.map((value) => ({
|
|
30494
|
+
value,
|
|
30495
|
+
label: labelOf(value)
|
|
30496
|
+
}))
|
|
30497
|
+
};
|
|
30498
|
+
}
|
|
30499
|
+
/** On/off knobs store `'true'` and `'false'`; the switch is on for `'true'`. */
|
|
30500
|
+
function knobPresentation(facet, choices) {
|
|
30501
|
+
if (facet.target.kind === "content-field" && facet.target.boolean === true && choices.length === 2 && choices.includes("true") && choices.includes("false")) return "switch";
|
|
30502
|
+
return choices.length <= 3 ? "segments" : "menu";
|
|
30503
|
+
}
|
|
30504
|
+
function headlineHint(knobs, length) {
|
|
30505
|
+
const headline = knobs.titleSize;
|
|
30506
|
+
return headline?.kind === "clamped" && headline.reason === "length" && length !== null && length !== "short" ? { length } : null;
|
|
30507
|
+
}
|
|
30508
|
+
/**
|
|
30509
|
+
* Section backgrounds for an arrangement-Look style: the style's own surfaces
|
|
30510
|
+
* by plain name, plus the page rhythm. A background is never a Look. A Look
|
|
30511
|
+
* that paints its photo behind the text has no Background row, because the
|
|
30512
|
+
* photo is the background. Any other Look offers the surfaces until the
|
|
30513
|
+
* section has a photo, which replaces the colour choice.
|
|
30514
|
+
*/
|
|
30515
|
+
function arrangementBackgroundControlFor(input) {
|
|
30516
|
+
const selection = input.block.arrangementLookSelection;
|
|
30517
|
+
if (!selection || input.block.backgroundSupport.kind === "unsupported") return null;
|
|
30518
|
+
const photo = decideSectionPhoto({
|
|
30519
|
+
block: input.block,
|
|
30520
|
+
sectionPhoto: getBlockDefinition(input.block.blockKind)?.manifest.sectionPhoto,
|
|
30521
|
+
draftPhoto: sectionPhotoPresence(input.content)
|
|
30522
|
+
});
|
|
30523
|
+
if (photo.kind === "arrangement" && photo.use === "behind") return null;
|
|
30524
|
+
if (photo.kind === "arrangement" && photo.photo === "present") return {
|
|
30525
|
+
kind: "held-by-photo",
|
|
30526
|
+
photo: "section-photo"
|
|
30527
|
+
};
|
|
30528
|
+
const options = arrangementSurfaceOptions(selection.style);
|
|
30529
|
+
const stored = storedSurfaceChoice(parseCanonicalSectionBackground({ ...input.content }), options);
|
|
30530
|
+
return stored.kind === "held-by-photo" ? stored : {
|
|
30531
|
+
kind: "surfaces",
|
|
30532
|
+
selected: stored.selected,
|
|
30533
|
+
options,
|
|
30534
|
+
rhythm: options.find((option) => option.token === input.decidedBackground) ?? null
|
|
30535
|
+
};
|
|
30536
|
+
}
|
|
30537
|
+
function arrangementSurfaceOptions(style) {
|
|
30538
|
+
return Object.entries(style.surfaces).flatMap(([name, spec]) => {
|
|
30539
|
+
const token = spec.kind === "token" && !spec.roleOnly ? parseBackgroundColorToken(spec.token) : null;
|
|
30540
|
+
return token ? [{
|
|
30541
|
+
name,
|
|
30542
|
+
label: arrangementSurfaceLabel(name),
|
|
30543
|
+
token
|
|
30544
|
+
}] : [];
|
|
30545
|
+
});
|
|
30546
|
+
}
|
|
30547
|
+
/** Which surface the stored background shows as chosen, once the section has no photo of its own. */
|
|
30548
|
+
function storedSurfaceChoice(stored, options) {
|
|
30549
|
+
switch (stored.kind) {
|
|
30550
|
+
case "none": return {
|
|
30551
|
+
kind: "surface",
|
|
30552
|
+
selected: null
|
|
30553
|
+
};
|
|
30554
|
+
case "block-authored":
|
|
30555
|
+
if (stored.background.type === "image" || stored.background.type === "video") return {
|
|
30556
|
+
kind: "held-by-photo",
|
|
30557
|
+
photo: "older-style-photo"
|
|
30558
|
+
};
|
|
30559
|
+
return {
|
|
30560
|
+
kind: "surface",
|
|
30561
|
+
selected: stored.background.type === "color" ? surfaceForToken(options, stored.background.color) : null
|
|
30562
|
+
};
|
|
30563
|
+
case "page-design-override": {
|
|
30564
|
+
const override = stored.parsed.kind === "supported" ? stored.parsed.override : null;
|
|
30565
|
+
return {
|
|
30566
|
+
kind: "surface",
|
|
30567
|
+
selected: override?.kind === "color" ? surfaceForToken(options, override.token) : null
|
|
30568
|
+
};
|
|
30569
|
+
}
|
|
30570
|
+
}
|
|
30571
|
+
}
|
|
30572
|
+
const arrangementSurfaceLabels = {
|
|
30573
|
+
base: "Page ground",
|
|
30574
|
+
band: "Quiet band",
|
|
30575
|
+
brand: "Brand colour",
|
|
30576
|
+
deep: "Deepest tone",
|
|
30577
|
+
inverse: "Opposite ground",
|
|
30578
|
+
pop: "Pop colour"
|
|
30579
|
+
};
|
|
30580
|
+
function arrangementSurfaceLabel(name) {
|
|
30581
|
+
return arrangementSurfaceLabels[name] ?? name.charAt(0).toUpperCase() + name.slice(1).replace(/[-_]+/g, " ");
|
|
30582
|
+
}
|
|
30583
|
+
function surfaceForToken(options, token) {
|
|
30584
|
+
return options.find((option) => option.token === token)?.name ?? null;
|
|
30585
|
+
}
|
|
30586
|
+
//#endregion
|
|
30322
30587
|
//#region ../preview-next/src/client/preview/siteColourVariables.ts
|
|
30323
30588
|
/**
|
|
30324
30589
|
* The colour variables the site canvas paints with, for preview controls that
|
|
@@ -31071,12 +31336,160 @@ function arrangementLookNote(look, styleName) {
|
|
|
31071
31336
|
}
|
|
31072
31337
|
}
|
|
31073
31338
|
//#endregion
|
|
31339
|
+
//#region ../preview-next/src/client/blocks/blockParts.tsx
|
|
31340
|
+
/**
|
|
31341
|
+
* The marked part an event landed on, inside this block. Text the editor
|
|
31342
|
+
* edits in place is never a part, even inside a marked element: a click
|
|
31343
|
+
* there keeps editing it where it is.
|
|
31344
|
+
*/
|
|
31345
|
+
function partAt(target, block) {
|
|
31346
|
+
if (!(target instanceof Element) || target.closest("[contenteditable=\"true\"]")) return null;
|
|
31347
|
+
const element = target.closest(`[${EDITOR_PART_ATTRIBUTE}]`);
|
|
31348
|
+
const fieldPath = element?.getAttribute(EDITOR_PART_ATTRIBUTE);
|
|
31349
|
+
return element && fieldPath && block.contains(element) ? {
|
|
31350
|
+
element,
|
|
31351
|
+
fieldPath
|
|
31352
|
+
} : null;
|
|
31353
|
+
}
|
|
31354
|
+
/**
|
|
31355
|
+
* The parts of a selected block on the canvas. The block's editing plan
|
|
31356
|
+
* decides which parts lead anywhere and what they're called; a part that
|
|
31357
|
+
* leads nowhere gets no frame, and a click on it is a click on the block.
|
|
31358
|
+
*/
|
|
31359
|
+
function useBlockParts(input) {
|
|
31360
|
+
const { plan, blockElement, selected, openField } = input;
|
|
31361
|
+
const [chosen, setChosen] = useState(null);
|
|
31362
|
+
const hovered = useHoveredPart(plan, selected ? blockElement : null);
|
|
31363
|
+
const shownPart = useCallback((hit) => {
|
|
31364
|
+
const part = hit && plan ? canvasPartOf(plan, hit.fieldPath) : null;
|
|
31365
|
+
return hit && part ? {
|
|
31366
|
+
element: hit.element,
|
|
31367
|
+
part
|
|
31368
|
+
} : null;
|
|
31369
|
+
}, [plan]);
|
|
31370
|
+
const click = useCallback((hit) => {
|
|
31371
|
+
const shown = shownPart(hit);
|
|
31372
|
+
setChosen(shown);
|
|
31373
|
+
if (shown) openField(shown.part.path);
|
|
31374
|
+
return shown !== null;
|
|
31375
|
+
}, [openField, shownPart]);
|
|
31376
|
+
useEffect(() => {
|
|
31377
|
+
if (!selected) setChosen(null);
|
|
31378
|
+
}, [selected]);
|
|
31379
|
+
return {
|
|
31380
|
+
click,
|
|
31381
|
+
frames: selected && blockElement ? createPortal(/* @__PURE__ */ jsxs(Fragment$1, { children: [hovered && hovered.element !== chosen?.element ? /* @__PURE__ */ jsx(PartFrame, {
|
|
31382
|
+
block: blockElement,
|
|
31383
|
+
shown: hovered,
|
|
31384
|
+
state: "hover"
|
|
31385
|
+
}) : null, chosen ? /* @__PURE__ */ jsx(PartFrame, {
|
|
31386
|
+
block: blockElement,
|
|
31387
|
+
shown: chosen,
|
|
31388
|
+
state: "chosen"
|
|
31389
|
+
}) : null] }), blockElement) : null
|
|
31390
|
+
};
|
|
31391
|
+
}
|
|
31392
|
+
/** The part under the pointer while the block is selected, if it leads to a setting. */
|
|
31393
|
+
function useHoveredPart(plan, block) {
|
|
31394
|
+
const [hovered, setHovered] = useState(null);
|
|
31395
|
+
useEffect(() => {
|
|
31396
|
+
setHovered(null);
|
|
31397
|
+
if (!block || !plan) return;
|
|
31398
|
+
const over = (event) => {
|
|
31399
|
+
const hit = partAt(event.target, block);
|
|
31400
|
+
const part = hit ? canvasPartOf(plan, hit.fieldPath) : null;
|
|
31401
|
+
setHovered((current) => hit && part ? sameShownPart(current, hit.element, part) ?? {
|
|
31402
|
+
element: hit.element,
|
|
31403
|
+
part
|
|
31404
|
+
} : null);
|
|
31405
|
+
};
|
|
31406
|
+
const leave = () => setHovered(null);
|
|
31407
|
+
block.addEventListener("pointerover", over);
|
|
31408
|
+
block.addEventListener("pointerleave", leave);
|
|
31409
|
+
return () => {
|
|
31410
|
+
block.removeEventListener("pointerover", over);
|
|
31411
|
+
block.removeEventListener("pointerleave", leave);
|
|
31412
|
+
};
|
|
31413
|
+
}, [block, plan]);
|
|
31414
|
+
return hovered;
|
|
31415
|
+
}
|
|
31416
|
+
/** Keeps the same state while the pointer moves within one part, so nothing re-renders. */
|
|
31417
|
+
function sameShownPart(current, element, part) {
|
|
31418
|
+
return current && current.element === element && current.part.label === part.label ? current : null;
|
|
31419
|
+
}
|
|
31420
|
+
/**
|
|
31421
|
+
* The frame sits in a box over the part, placed inside the block (which the
|
|
31422
|
+
* selection frame already relies on being positioned). The box follows the
|
|
31423
|
+
* part as the page reflows, a carousel scrolls or slides by transform, or an
|
|
31424
|
+
* animation moves it.
|
|
31425
|
+
*/
|
|
31426
|
+
function PartFrame({ block, shown, state }) {
|
|
31427
|
+
const box = usePartBox(block, shown.element);
|
|
31428
|
+
if (!box) return null;
|
|
31429
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31430
|
+
style: {
|
|
31431
|
+
position: "absolute",
|
|
31432
|
+
pointerEvents: "none",
|
|
31433
|
+
zIndex: 10,
|
|
31434
|
+
...box
|
|
31435
|
+
},
|
|
31436
|
+
"data-editor-part-box": shown.part.path,
|
|
31437
|
+
children: /* @__PURE__ */ jsx(EditorPartFrame, {
|
|
31438
|
+
label: shown.part.label,
|
|
31439
|
+
state
|
|
31440
|
+
})
|
|
31441
|
+
});
|
|
31442
|
+
}
|
|
31443
|
+
/**
|
|
31444
|
+
* Measured every frame while the frame is shown. Carousels and moving rows
|
|
31445
|
+
* move parts with transforms, which neither resize nor scroll anything, so
|
|
31446
|
+
* only watching for movement keeps the frame on its part. One frame is shown
|
|
31447
|
+
* at a time, and nothing re-renders unless the box changed.
|
|
31448
|
+
*/
|
|
31449
|
+
function usePartBox(block, part) {
|
|
31450
|
+
const [box, setBox] = useState(null);
|
|
31451
|
+
useLayoutEffect(() => {
|
|
31452
|
+
let frame = 0;
|
|
31453
|
+
const measure = () => {
|
|
31454
|
+
const next = part.isConnected ? partBoxWithin(block, part) : null;
|
|
31455
|
+
setBox((current) => sameBox(current, next) ? current : next);
|
|
31456
|
+
frame = requestAnimationFrame(measure);
|
|
31457
|
+
};
|
|
31458
|
+
measure();
|
|
31459
|
+
return () => cancelAnimationFrame(frame);
|
|
31460
|
+
}, [block, part]);
|
|
31461
|
+
return box;
|
|
31462
|
+
}
|
|
31463
|
+
function sameBox(a, b) {
|
|
31464
|
+
if (a === null || b === null) return a === b;
|
|
31465
|
+
return a.top === b.top && a.left === b.left && a.width === b.width && a.height === b.height;
|
|
31466
|
+
}
|
|
31467
|
+
/**
|
|
31468
|
+
* Where the part is, measured from the block's padding edge, which its
|
|
31469
|
+
* absolutely placed children start from, in the block's own CSS pixels. The
|
|
31470
|
+
* preview zooms the page (CSS `zoom`), and screen measurements are after the
|
|
31471
|
+
* zoom, so they're scaled back before they become offsets inside the block.
|
|
31472
|
+
*/
|
|
31473
|
+
function partBoxWithin(block, part) {
|
|
31474
|
+
const outer = block.getBoundingClientRect();
|
|
31475
|
+
const inner = part.getBoundingClientRect();
|
|
31476
|
+
const scale = block.offsetWidth > 0 && outer.width > 0 ? outer.width / block.offsetWidth : 1;
|
|
31477
|
+
return {
|
|
31478
|
+
top: (inner.top - outer.top) / scale - block.clientTop,
|
|
31479
|
+
left: (inner.left - outer.left) / scale - block.clientLeft,
|
|
31480
|
+
width: inner.width / scale,
|
|
31481
|
+
height: inner.height / scale
|
|
31482
|
+
};
|
|
31483
|
+
}
|
|
31484
|
+
//#endregion
|
|
31074
31485
|
//#region ../preview-next/src/client/blocks/useBlockSelection.ts
|
|
31075
31486
|
const PHONE_VIEWPORT_QUERY = "(max-width: 639px)";
|
|
31076
31487
|
/**
|
|
31077
31488
|
* Click to select: a click anywhere in the block selects it, so its controls
|
|
31078
|
-
* stay put instead of only showing on hover.
|
|
31079
|
-
*
|
|
31489
|
+
* stay put instead of only showing on hover. The click also goes to
|
|
31490
|
+
* `onPart`, with the marked part it landed on (a heading, a button, a photo,
|
|
31491
|
+
* an empty placeholder), so the block can open that part's setting. When it
|
|
31492
|
+
* does, the click is the editor's and the site's own action doesn't run.
|
|
31080
31493
|
*
|
|
31081
31494
|
* A page section on a full event page is selected the same way, but its
|
|
31082
31495
|
* template places it, so it's selected as a page section rather than as one
|
|
@@ -31086,8 +31499,8 @@ function useBlockSelection(input) {
|
|
|
31086
31499
|
const probeRef = useRef(null);
|
|
31087
31500
|
const selection = usePreviewSidebarNavigation();
|
|
31088
31501
|
const selectBlock = input.kind === "pageSection" ? selection.selectPageSection : selection.selectBlock;
|
|
31089
|
-
const
|
|
31090
|
-
|
|
31502
|
+
const onPartRef = useRef(input.onPart);
|
|
31503
|
+
onPartRef.current = input.onPart;
|
|
31091
31504
|
const phone = useMediaQuery(PHONE_VIEWPORT_QUERY);
|
|
31092
31505
|
const [blockElement, setBlockElement] = useState(null);
|
|
31093
31506
|
useEffect(() => {
|
|
@@ -31096,8 +31509,9 @@ function useBlockSelection(input) {
|
|
|
31096
31509
|
if (!block || !selectBlock) return;
|
|
31097
31510
|
const handleClick = (event) => {
|
|
31098
31511
|
selectBlock(input.blockId);
|
|
31099
|
-
|
|
31100
|
-
|
|
31512
|
+
if (!onPartRef.current(partAt(event.target, block))) return;
|
|
31513
|
+
event.preventDefault();
|
|
31514
|
+
event.stopPropagation();
|
|
31101
31515
|
};
|
|
31102
31516
|
block.addEventListener("click", handleClick);
|
|
31103
31517
|
return () => block.removeEventListener("click", handleClick);
|
|
@@ -31136,6 +31550,7 @@ function BlockReadinessNote({ notice, element, blockName, onOpen }) {
|
|
|
31136
31550
|
const Icon = warning ? TriangleAlert : EyeOff;
|
|
31137
31551
|
const label = blockNoticeLabel(notice);
|
|
31138
31552
|
return createPortal(/* @__PURE__ */ jsx("div", {
|
|
31553
|
+
"data-preview-readiness-note-host": "",
|
|
31139
31554
|
className: "builder-dashboard-chrome-theme absolute left-4 top-4 z-20 max-w-[22rem] overflow-hidden rounded-md bg-background text-left font-sans shadow-md",
|
|
31140
31555
|
children: /* @__PURE__ */ jsxs(Callout, {
|
|
31141
31556
|
tone: warning ? "warning" : "default",
|
|
@@ -31199,7 +31614,7 @@ function insertionEdgeFor(input) {
|
|
|
31199
31614
|
function useInsertionEdge(blockId) {
|
|
31200
31615
|
return useEditorUiStore((state) => {
|
|
31201
31616
|
const view = state.sidebarNavigation.view;
|
|
31202
|
-
if (view
|
|
31617
|
+
if (!isAddingBlockView(view)) return null;
|
|
31203
31618
|
if (!authoredValuesEqual(view.anchor.owner, state.structure.getOwner())) return null;
|
|
31204
31619
|
const blocks = state.structure.getList();
|
|
31205
31620
|
return insertionEdgeFor({
|
|
@@ -31250,7 +31665,7 @@ function revealWhenShown(marker) {
|
|
|
31250
31665
|
//#endregion
|
|
31251
31666
|
//#region ../preview-next/src/client/blocks/BlockToolbar.tsx
|
|
31252
31667
|
function BlockToolbar(input) {
|
|
31253
|
-
const { selection, controls, toolbar, open, openField, cycleSdk, cycleRecipe } = useBlockToolbar(input);
|
|
31668
|
+
const { selection, controls, toolbar, parts, open, openField, cycleSdk, cycleRecipe } = useBlockToolbar(input);
|
|
31254
31669
|
const notice = useBlockNotice(input.blockId);
|
|
31255
31670
|
const name = controls.manifest?.title ?? getBlockDefinition(input.blockKind)?.manifest.title ?? input.blockKind;
|
|
31256
31671
|
const row = /* @__PURE__ */ jsxs(EditorCanvasChipRow, {
|
|
@@ -31282,6 +31697,7 @@ function BlockToolbar(input) {
|
|
|
31282
31697
|
selected: selection.selected,
|
|
31283
31698
|
element: selection.blockElement
|
|
31284
31699
|
}),
|
|
31700
|
+
parts.frames,
|
|
31285
31701
|
/* @__PURE__ */ jsx(BlockReadinessNote, {
|
|
31286
31702
|
notice,
|
|
31287
31703
|
element: selection.blockElement,
|
|
@@ -31312,9 +31728,10 @@ function useBlockToolbar(input) {
|
|
|
31312
31728
|
const opener = useOpenBlockForSetup();
|
|
31313
31729
|
const open = () => opener.open(editorBlockId);
|
|
31314
31730
|
const openField = (fieldPath) => opener.openField(editorBlockId, fieldPath);
|
|
31731
|
+
const partClick = useRef(() => false);
|
|
31315
31732
|
const selection = useBlockSelection({
|
|
31316
31733
|
blockId: editorBlockId,
|
|
31317
|
-
|
|
31734
|
+
onPart: (hit) => partClick.current(hit)
|
|
31318
31735
|
});
|
|
31319
31736
|
const controls = useBlockCustomizeControls({
|
|
31320
31737
|
blockId: editorBlockId,
|
|
@@ -31323,6 +31740,13 @@ function useBlockToolbar(input) {
|
|
|
31323
31740
|
uiStore,
|
|
31324
31741
|
theme: input.theme
|
|
31325
31742
|
});
|
|
31743
|
+
const parts = useBlockParts({
|
|
31744
|
+
plan: controls.plan,
|
|
31745
|
+
blockElement: selection.blockElement,
|
|
31746
|
+
selected: selection.selected,
|
|
31747
|
+
openField
|
|
31748
|
+
});
|
|
31749
|
+
partClick.current = parts.click;
|
|
31326
31750
|
const { state, applyAction } = usePreviewPageDesignEditorState();
|
|
31327
31751
|
const toolbar = useArrangementToolbar({
|
|
31328
31752
|
designBlock: controls.designBlock,
|
|
@@ -31345,6 +31769,7 @@ function useBlockToolbar(input) {
|
|
|
31345
31769
|
selection,
|
|
31346
31770
|
controls,
|
|
31347
31771
|
toolbar,
|
|
31772
|
+
parts,
|
|
31348
31773
|
open,
|
|
31349
31774
|
openField,
|
|
31350
31775
|
cycleSdk,
|
|
@@ -31427,6 +31852,8 @@ function pageSectionIdFromBlockId(blockId) {
|
|
|
31427
31852
|
function sectionName(content) {
|
|
31428
31853
|
return (typeof content.title === "string" ? content.title : typeof content.heading === "string" ? content.heading : "").trim() || "Page section";
|
|
31429
31854
|
}
|
|
31855
|
+
/** A page section's parts are filled in from the dashboard, so none of them opens anything here. */
|
|
31856
|
+
const leadsNowhere = () => false;
|
|
31430
31857
|
/**
|
|
31431
31858
|
* A page section on a full event page (#1703 B4b). It can be selected, and
|
|
31432
31859
|
* its chip opens the section's look in the sidebar. Nothing else here: the
|
|
@@ -31437,7 +31864,7 @@ function PageSectionToolbar({ blockId, content }) {
|
|
|
31437
31864
|
const { openPageSection } = usePreviewSidebarNavigation();
|
|
31438
31865
|
const selection = useBlockSelection({
|
|
31439
31866
|
blockId: editorBlockId,
|
|
31440
|
-
|
|
31867
|
+
onPart: leadsNowhere,
|
|
31441
31868
|
kind: "pageSection"
|
|
31442
31869
|
});
|
|
31443
31870
|
const name = sectionName(content);
|
|
@@ -31466,4 +31893,4 @@ function PageSectionToolbar({ blockId, content }) {
|
|
|
31466
31893
|
] });
|
|
31467
31894
|
}
|
|
31468
31895
|
//#endregion
|
|
31469
|
-
export {
|
|
31896
|
+
export { Switch as A, insertOrReplaceRichTextImage as C, InlineTextEditor as D, parseRichTextDoc as E, Surface as F, surfaceVariants as I, emitMediaCropDebug as L, SegmentedControl as M, ScrollableDialogContent as N, decideDocumentReplacement as O, ScrollableDialogShell as P, resolveVideoSelectionIntentForMediaField as R, getRichTextImagePositionFromTarget as S, EMPTY_DOC as T, getUnresolvedRichTextImageWarnings as _, ArrangementOptionsBody as a, MediaPickerMini as b, BackgroundChooser as c, gradientLabel as d, readBackgroundColorPaletteSnapshot as f, useRichTextImageProjection as g, arrangementLookNameFor as h, ArrangementLookNote as i, ContentSpinner as j, resolveSdkFooterMode as k, BackgroundPreviewSwatch as l, arrangementBlockControlsFor as m, pageSectionIdFromBlockId as n, lookIsAutomatic as o, useSiteColourVariables as p, BlockToolbar as r, useArrangementToolbar as s, PageSectionToolbar as t, formatTokenLabel as u, MediaEditor as v, useRichTextEditor as w, RichTextEditorSurface as x, MediaPickerMiniDialog as y, isSvgMimeType as z };
|