@riverbankcms/sdk 0.164.0 → 0.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-CubPwupc.d.ts → BlocksIslandsHydrator-CPvN6RBW.d.ts} +1 -1
- package/dist/_dts/{Page-CDzsagB2.d.ts → Page-rW0xgQCA.d.ts} +18 -256
- package/dist/_dts/{SdkPreviewMode-CPRQbRCI.d.ts → SdkPreviewMode-BWZh2WCk.d.ts} +107 -72
- package/dist/_dts/{client-CbeYTSry.d.ts → client-D4BXQEZc.d.ts} +5 -1
- package/dist/_dts/{content-types--uYRIcIF.d.ts → content-types-MUzta0l9.d.ts} +3 -3
- package/dist/_dts/{contracts-DJQYAOsv.d.ts → contracts-Cl9Xh1DO.d.ts} +4 -4
- package/dist/_dts/{footerPageOutline-CKkhBwgJ.d.ts → footerPageOutline-4BgLKehl.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata--qd7NCIA.d.ts → generatePageMetadata-BsmJ0qKh.d.ts} +2 -2
- package/dist/_dts/{index-wegfy7lf.d.ts → index--qflsCiy.d.ts} +4 -3
- package/dist/_dts/{index-CjdIn9-_.d.ts → index-BgJ2aU5c.d.ts} +2 -2
- package/dist/_dts/{index-BZE-1azr.d.ts → index-Bmboeb49.d.ts} +2 -2
- package/dist/_dts/{index-BpEbwDM7.d.ts → index-DdcwPqQN.d.ts} +4 -4
- package/dist/_dts/{index-DriYVLfT.d.ts → index-ahxQCUc7.d.ts} +2 -2
- package/dist/_dts/{index-DYQFmf--.d.ts → index-kQ5xkM6X.d.ts} +1 -1
- package/dist/_dts/{index-JS8WYgD3.d.ts → index-mMMvLLAJ.d.ts} +2996 -3079
- package/dist/_dts/{index-D_pQO-AS.d.ts → index-wbBZ0awa.d.ts} +49398 -48202
- package/dist/_dts/{loadContent-DUi94Qfk.d.ts → loadContent-BG5IAV-V.d.ts} +9 -6
- package/dist/_dts/resolveBlockData-Cmcle_zV.d.ts +136 -0
- package/dist/_dts/{resolvePageContent-JDE0ry6T.d.ts → resolvePageContent-BRJUTFoH.d.ts} +3 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +9 -6
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +20 -0
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +2 -0
- package/dist/_dts/sdk/src/data/types.d.ts +54 -0
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +9 -8
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +36 -48
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +257 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +8 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/{themeAdmission-D_qtGYAT.d.ts → sdk/src/rendering/themeAdmission.d.ts} +3 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +7 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-DiciZDrk.d.ts → types-BX3Y-EW3.d.ts} +3 -3
- package/dist/_dts/{types-DubJnBnI.d.ts → types-DF54stxv.d.ts} +8 -7
- package/dist/_dts/{types-W40f2olO.d.ts → types-DuiHLiPo.d.ts} +2 -2
- package/dist/_dts/{validation-BF4_zNkR.d.ts → validation-Bxi0f81D.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-64hFxF02.mjs → BlocksIslandsHydrator-DwiRGtgh.mjs} +31 -24
- package/dist/client/{BookingMailingListNote-CSQyFm9J.mjs → BookingMailingListNote-DOWOZYlK.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-Bvkx8Z7Y.mjs → CalendarNavigationChevron-5a0x0vcC.mjs} +7 -7
- package/dist/client/{CheckboxChoice-3PhxDxgR.mjs → CheckboxChoice-CZ-anOqV.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-pt2xXBQp.mjs → DemoBookingPortalAccess-B2qLkPRB.mjs} +6 -6
- package/dist/client/{DemoPortalSignInLink-Qw780EfW.mjs → DemoPortalSignInLink-B9YrzZt2.mjs} +1 -1
- package/dist/client/{EventCalendar.client-DWoboRW5.mjs → EventCalendar.client-BhADnDCg.mjs} +17 -10
- package/dist/client/{EventCombined.client-C98ucpcP.mjs → EventCombined.client-jik34zTb.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DHRlFfkp.mjs → EventEmbeddedCheckoutStep-D_14yqAU.mjs} +27 -2
- package/dist/client/{EventItem-hrSyTApW.mjs → EventItem-CMKrtkT7.mjs} +33 -12
- package/dist/client/{EventListWeekNavigation-C3t7H13W.mjs → EventListWeekNavigation-AGHjxy6C.mjs} +1 -1
- package/dist/client/{EventListing.client-Cp11sBX_.mjs → EventListing.client-DZeDM0Qt.mjs} +3 -3
- package/dist/client/{EventListing.view-Dd5QHIAf.mjs → EventListing.view-3BBRdNVa.mjs} +70 -15
- package/dist/client/{EventRegistrationPayment-ByT88VHR.mjs → EventRegistrationPayment-CpNcpga4.mjs} +108 -11
- package/dist/client/{LocationMapActions-BsepG5Vv.mjs → LocationMapActions-D5-H9ooQ.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-R4JMT4yd.mjs → MapDrawingSvg-C30geMl-.mjs} +1 -1
- package/dist/client/{Page-Dub71o3c.mjs → Page-DNDZLRlB.mjs} +3388 -11530
- package/dist/client/{ProtectedSubmitButton-DGbgGvdh.mjs → ProtectedSubmitButton-8DuDw2ag.mjs} +1 -1
- package/dist/client/{SpamProtectionWidget-CRsKTQV-.mjs → SpamProtectionWidget-CCF6YLUX.mjs} +5 -3
- package/dist/client/{StepIndicator-Bp7MyutT.mjs → StepIndicator-Bin7YR0A.mjs} +3 -3
- package/dist/client/{TabBarFragment-C4WJyybx.mjs → TabBarFragment-_IAthZVM.mjs} +1 -1
- package/dist/client/{ThemedButton-BGVwNwE-.mjs → ThemedButton-8jUc02mZ.mjs} +64 -2
- package/dist/client/{accordion-vCG_JC5t.mjs → accordion-uVqNowRX.mjs} +1 -1
- package/dist/client/{altchaProtection-BWchRM3v.mjs → altchaProtection-DjIV9A5n.mjs} +1 -1
- package/dist/client/{booking-form.client-CHTbcZJM.mjs → booking-form.client-w-PvyWBv.mjs} +19 -14
- package/dist/client/{bookingForm-BxbUbzUr.mjs → bookingForm-DNMojb6A.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{carousel-FM1mkkL0.mjs → carousel-C8kxI3Dm.mjs} +2 -2
- package/dist/client/{carousel.client-ChoLiWwD.mjs → carousel.client-BO7sCEpH.mjs} +1 -1
- package/dist/client/{cart-BDFhbh9j.mjs → cart-DCxjE3Is.mjs} +3 -3
- package/dist/client/{cart.client-x3HOke6T.mjs → cart.client-Ceeng8fB.mjs} +1 -1
- package/dist/client/{checkout-BibhwnTd.mjs → checkout-B0EKbeVv.mjs} +3 -3
- package/dist/client/{checkout.client-CE4jUi0G.mjs → checkout.client-DtPj3fYk.mjs} +1 -1
- package/dist/client/client.mjs +9465 -15
- package/dist/client/{context-BNAM7NsW.mjs → context-n6IZigd3.mjs} +8 -6
- package/dist/client/cta-CDeAwYoN.mjs +121 -0
- package/dist/client/{dateFormatting-QwBSo0hK.mjs → dateFormatting-BWPzdeZE.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-NwKJk6gn.mjs → demoPortalMagicLink-BdXu0fj-.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-D4zqEBDl.mjs → enhanceHeaderSection-VHfv8M6-.mjs} +3 -3
- package/dist/client/{event-details.client-jFyFjOIC.mjs → event-details.client-Cfr1_Cj4.mjs} +2 -2
- package/dist/client/{event-registration.client-BK_jVv3R.mjs → event-registration.client-BhygihpQ.mjs} +43 -17
- package/dist/client/{eventCalendar-DSkzejQh.mjs → eventCalendar-B4XCL9u6.mjs} +4 -4
- package/dist/client/{eventCombined-BG-BEaYh.mjs → eventCombined-DVjz4wdf.mjs} +4 -4
- package/dist/client/{eventDetails-BhIwXAKe.mjs → eventDetails-B0DA1Nw1.mjs} +2 -2
- package/dist/client/{eventListing-DQtyO1Xj.mjs → eventListing-2-xjn2nz.mjs} +4 -4
- package/dist/client/{eventRegistration-DRTz8X0M.mjs → eventRegistration-ng4iGo9O.mjs} +4 -4
- package/dist/client/{form-GXqjObPC.mjs → form-BeNQiZ2V.mjs} +3 -3
- package/dist/client/{form.client-CoKNba2e.mjs → form.client-BFdCKlp7.mjs} +7 -7
- package/dist/client/{form.parts-magB_epJ.mjs → form.parts-C7gLK3jh.mjs} +3 -3
- package/dist/client/{formatDate-BiloOyjS.mjs → formatDate-CWfelfMt.mjs} +1 -1
- package/dist/client/gifting/client.mjs +4 -5
- package/dist/client/{headerSection-BMQCPHT3.mjs → headerSection-CalNAShx.mjs} +2 -2
- package/dist/client/{mediaAssets-BX-vWwQc.mjs → mediaAssets-DpPauppt.mjs} +1 -1
- package/dist/client/{mediaContext-CdqGYlWl.mjs → mediaContext-BLo4NtjP.mjs} +25 -19
- package/dist/client/{newsletter-form.client-8orCez1z.mjs → newsletter-form.client-Dq7GHGXU.mjs} +9 -9
- package/dist/client/{newsletter-form.parts-D8NgHY_F.mjs → newsletter-form.parts-BSMDYQiS.mjs} +2 -2
- package/dist/client/{newsletterForm-BhBNsS3n.mjs → newsletterForm-snzZ4L6i.mjs} +3 -3
- package/dist/client/{noop-C2vZse15.mjs → noop-D-RG9eR3.mjs} +399 -169
- package/dist/client/portal/client.mjs +13 -14
- package/dist/client/{product-detail.client-CQ0k0fbH.mjs → product-detail.client-Gu0INDb7.mjs} +1 -1
- package/dist/client/{product-list.client-Xlr1P0x9.mjs → product-list.client-BmH40fNf.mjs} +1 -1
- package/dist/client/{productDetail-BsCao6X4.mjs → productDetail-DsPUmJ0z.mjs} +3 -3
- package/dist/client/{productList-Cc-PmbEe.mjs → productList-DjGrjOwD.mjs} +3 -3
- package/dist/client/{propsDecoder-DikkDJ9x.mjs → propsDecoder-kTVPMnfD.mjs} +4 -4
- package/dist/client/{registry.server-BpLZo3bC.mjs → registry.server-CKK_RXZo.mjs} +350 -424
- package/dist/client/rendering/client.mjs +29 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +70 -8
- package/dist/client/{richText-coerce-WuMYrBm3.mjs → richText-coerce-BcjTX-7h.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DNx6b07x.mjs → routeIslandApiConfig-CaXesATK.mjs} +1 -1
- package/dist/client/{shop-DyXtB5TD.mjs → shop-DLufMauE.mjs} +3 -3
- package/dist/client/{shop-commerce-xjWH7-Ym.mjs → shop-commerce-BxYYXLNK.mjs} +12 -12
- package/dist/client/{shop-commerce-store-CbBsS1kD.mjs → shop-commerce-store-Dp3Nl5YK.mjs} +1 -1
- package/dist/client/{shop.client-QOKqQPgK.mjs → shop.client-CBy9_alG.mjs} +13 -13
- package/dist/client/{shop.interactive-BQdm441g.mjs → shop.interactive-BM0NRsFQ.mjs} +265 -24
- package/dist/client/{shopShared-CyW6MU48.mjs → shopShared-lS23OQE-.mjs} +2 -2
- package/dist/client/site-styles-D8jEPGxA.mjs +3 -0
- package/dist/{preview-next/client/ThemedButton-g7NPrsGp.mjs → client/site-styles-DELkUk9s.mjs} +25654 -17259
- package/dist/client/spam-protection.mjs +2 -2
- package/dist/client/src-DjnxOjXG.mjs +217 -0
- package/dist/client/surfaceTransportMarker-BXepAVF6.mjs +152 -0
- package/dist/client/{timetableModel-BgdkhRuA.mjs → timetableModel-DzRWikCU.mjs} +157 -139
- package/dist/client/types-sF-IrGQr.mjs +633 -0
- package/dist/client/{useAvailableSlots-wmdo6uZ8.mjs → useAvailableSlots-C3LphWDX.mjs} +8 -5
- package/dist/client/{useBookingNowIso-CUExAee1.mjs → useBookingNowIso-Da-f9iHw.mjs} +1 -1
- package/dist/client/{useDiscountApply-BRM-OoTN.mjs → useDiscountApply-SLoWhcen.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-BEIvL31G.mjs → useDiscountCodeUi-D6a2BJij.mjs} +1 -1
- package/dist/client/{useEventPagination-Dk3g64we.mjs → useEventPagination-Ccr4TZlm.mjs} +12 -159
- package/dist/client/{view-BnaOmrap.mjs → view-8w4GA8rf.mjs} +4 -4
- package/dist/client/{view-vhKGFfC3.mjs → view-DAVEoe8A.mjs} +310 -247
- package/dist/client/{wizardSteps-xqU4q63H.mjs → wizardSteps-DNpajrAH.mjs} +495 -173
- package/dist/preview-next/before-render.mjs +4 -141
- package/dist/preview-next/client/ArrangementLookControls-DY5TzhEa.mjs +31197 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-43wIAWr4.mjs → EventEmbeddedCheckoutStep-C_h1cMYm.mjs} +33 -4
- package/dist/preview-next/client/{LocationPickerEnvironment-QtSG2Bl-.mjs → LocationPickerEnvironment-D56RD3e_.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B-rohNcG.mjs → MapLibreEditMap-DFnyCckr.mjs} +2 -2
- package/dist/preview-next/client/PreviewEditorSidebar-DdnhmdFO.mjs +37049 -0
- package/dist/preview-next/client/PreviewEditorUI-C7ZmYE33.mjs +1189 -0
- package/dist/preview-next/client/PreviewShell-DnO38NaL.mjs +4707 -0
- package/dist/preview-next/client/SdkPreviewModeRuntime-D2OtoRMB.mjs +4258 -0
- package/dist/preview-next/client/SiteChromeCustomizeButton-eIu2RejJ.mjs +71144 -0
- package/dist/preview-next/client/ThemedButton-C0dgGJ5k.mjs +2006 -0
- package/dist/preview-next/client/{lucide-react-CA9cpo0P.mjs → lucide-react-CPBCf6QT.mjs} +15 -2
- package/dist/preview-next/client/previewAssistantSlot-Bp1AlAxx.mjs +110560 -0
- package/dist/preview-next/client/previewChromeSurface-D2cREDJ5.mjs +190 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/sdk-runtime-DK0PUhLL.mjs +5 -0
- package/dist/preview-next/client/useAutosaveStatus--Pw8vnef.mjs +138 -0
- package/dist/preview-next/client/useBlockCustomizeControls-C1Rl73N4.mjs +2724 -0
- package/dist/preview-next/client/useOpenBlockForSetup-CL3842FM.mjs +28 -0
- package/dist/preview-next/keepAlive.mjs +27 -4
- package/dist/preview-next/middleware.mjs +2 -2
- package/dist/preview-next/{route-contract-D5tHZEz5.mjs → route-contract-Bq7SUX3K.mjs} +143 -126
- package/dist/preview-next/{session-P1R_ajT7.mjs → session-DU6zpYUQ.mjs} +1 -1
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-Iy7g11iP.mjs → Block.shared-wXr7Iwhs.mjs} +7 -4
- package/dist/server/{src-cbbK3Bho.mjs → ThemeScopeCore-BI2mld9R.mjs} +1153 -2523
- package/dist/server/accessibleSurfaces-CuN8U_iU.mjs +2102 -0
- package/dist/server/{bindings-BVJGgUT0.mjs → bindings-DjdUq9FR.mjs} +2 -3
- package/dist/server/{publicProducts-D3Fc5TKk.mjs → client-07UeMDzA.mjs} +2492 -357
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +33 -2
- package/dist/server/data/dataLoaderContext.mjs +2 -0
- package/dist/server/data/resolveBlockData.mjs +2 -0
- package/dist/server/data/types.mjs +1 -0
- package/dist/server/dataLoaderContext-B3fXA54R.mjs +47 -0
- package/dist/server/identity-Bn9OQiT1.mjs +6 -0
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BuintpdO.mjs → loadContent-ClpaSlBb.mjs} +6 -5
- package/dist/server/{loadPage-Dk4wea8M.mjs → loadPage-BwtVqpaA.mjs} +4 -2
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/media-DnlczCMA.mjs +231 -0
- package/dist/server/mode-Cv_TG9gP.mjs +63 -0
- package/dist/server/next/middleware.mjs +1 -1
- package/dist/server/next/revalidate.mjs +1 -1
- package/dist/server/next.mjs +13 -13
- package/dist/server/opaqueSurface-3YSDPtDe.mjs +54 -0
- package/dist/server/{overrideResolution-BDiQWM7D.mjs → overrideResolution-Du_w3LY4.mjs} +2 -1
- package/dist/server/overrides-CD4d-1w7.mjs +177 -0
- package/dist/server/page-converter.mjs +243 -91
- package/dist/server/pageRenderPlan-BShULdc2.mjs +4055 -0
- package/dist/server/{themeAdmission-BdY8lP-K.mjs → pageRuntimeSupport-C4Dh5-mB.mjs} +13 -28
- package/dist/server/{overrides-DVemf-GV.mjs → pageShared-HdKFBpaX.mjs} +3594 -1726
- package/dist/server/parseThemeForPersistence-CJMrEkze.mjs +52 -0
- package/dist/server/{prebuild-DubLNgRH.mjs → prebuild-Cl-bkaMA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/prefetchBlockData-C4yUmz-r.mjs +786 -0
- package/dist/server/publicProducts-W9hDRwjz.mjs +64 -0
- package/dist/server/{registry-zjd1P2Dl.mjs → registry-TFPJdGQi.mjs} +20901 -792
- package/dist/server/rendering/components/pageShared.mjs +2 -0
- package/dist/server/rendering/helpers/loadPage.mjs +2 -0
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +2 -0
- package/dist/server/rendering/server.mjs +5 -4
- package/dist/server/rendering/themeAdmission.mjs +2 -0
- package/dist/server/rendering.mjs +11 -10
- package/dist/server/repeaterFields-MIz7r1ez.mjs +9 -0
- package/dist/server/{resolveBlockData-CZJ--nH6.mjs → resolveBlockData-OHlOXlOE.mjs} +6 -48
- package/dist/server/resolveButtonColourStates-lry2ORwX.mjs +2672 -0
- package/dist/server/{richTextSchema-YYc85FX4.mjs → richTextSchema-Euhuj-7V.mjs} +26 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/schema-C2PqHrMo.mjs +2523 -0
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +1031 -1
- package/dist/server/theme.mjs +2 -1
- package/dist/server/themeAdmission-DGSAlFUK.mjs +18 -0
- package/dist/server/{three-pass-converter-Chnb1XD-.mjs → three-pass-converter-_j2UE2tR.mjs} +1 -1
- package/dist/server/validation-CDd6m8Ry.mjs +140 -0
- package/dist/server/{validation-CGH-Xs4E.mjs → validation-DIBFZeMB.mjs} +419 -3
- package/dist/server/{version-DoOG6F13.mjs → version-DZWZM1H6.mjs} +1 -1
- package/dist/styles/index.css +924 -10
- package/package.json +39 -1
- package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +0 -1
- package/dist/client/cta-ChiN1Vgg.mjs +0 -80
- package/dist/client/purchase-BMsWpx8y.mjs +0 -894
- package/dist/client/schema-DMUkBtIO.mjs +0 -15915
- package/dist/client/site-styles-BLHYJ8S7.mjs +0 -12339
- package/dist/client/src-VIsPY-kw.mjs +0 -62
- package/dist/preview-next/client/PreviewEditorSidebar-C3AQVxQt.mjs +0 -5441
- package/dist/preview-next/client/PreviewEditorUI-C-1zDCR_.mjs +0 -756
- package/dist/preview-next/client/SdkPreviewModeRuntime-B47yHFL0.mjs +0 -9130
- package/dist/preview-next/client/SdkPreviewModeRuntime-C6Rhm2NQ.mjs +0 -3
- package/dist/preview-next/client/previewAuthStore-By_zfrS5.mjs +0 -212195
- package/dist/preview-next/client/previewChromeSurface-Cjwxv90x.mjs +0 -85
- package/dist/preview-next/client/result-BjJUoxUF.mjs +0 -16
- package/dist/preview-next/client/sdk-runtime-BG2HYvQj.mjs +0 -4
- package/dist/preview-next/client/siteStyleAccess-BiSyYyyr.mjs +0 -14178
- package/dist/preview-next/client/spinner-DnWpeDp2.mjs +0 -67
- package/dist/preview-next/refresh-contract-uQ6BXgLJ.mjs +0 -25
- package/dist/server/bindings-Dgt_0goJ.mjs +0 -17
- package/dist/server/client-CiKaE8ms.mjs +0 -2330
- package/dist/server/effectiveNavLinkStyle-EDSdd_oK.mjs +0 -11574
- package/dist/server/loadPage-BwjncpJf.mjs +0 -2
- package/dist/server/prefetchBlockData-Bnbwoe5n.mjs +0 -4156
- package/dist/server/schema-BlTWmTSl.mjs +0 -16142
- package/dist/server/site-styles-yHytcXIB.mjs +0 -768
- package/dist/server/siteChromeOverlayClearance-D0uCNZ7E.mjs +0 -802
package/dist/server/theme.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as themeSchema$1 } from "./schema-C2PqHrMo.mjs";
|
|
2
|
+
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CJMrEkze.mjs";
|
|
2
3
|
import * as fs from "fs/promises";
|
|
3
4
|
import * as path from "path";
|
|
4
5
|
//#region src/theme/loader.ts
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/rendering/themeAdmission.ts
|
|
2
|
+
const MISSING_SDK_THEME_ERROR_CODE = "missing_sdk_theme";
|
|
3
|
+
var MissingSdkThemeError = class extends Error {
|
|
4
|
+
constructor(siteId, reason = "cms_theme_absent", themeKey) {
|
|
5
|
+
super(`[Riverbank SDK] Site "${siteId}" has no resolvable theme. ` + (themeKey ? `Theme key "${themeKey}" is not present. ` : "") + "Select a CMS theme, provide { theme }, { themes }, or { getTheme }, or use rendering: { kind: 'overrides-only' } with complete block overrides.");
|
|
6
|
+
this.siteId = siteId;
|
|
7
|
+
this.reason = reason;
|
|
8
|
+
this.themeKey = themeKey;
|
|
9
|
+
this.code = MISSING_SDK_THEME_ERROR_CODE;
|
|
10
|
+
this.name = "MissingSdkThemeError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function requireSdkTheme(theme, siteId, reason = "cms_theme_absent") {
|
|
14
|
+
if (theme === null || theme === void 0) throw new MissingSdkThemeError(siteId, reason);
|
|
15
|
+
return theme;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { MissingSdkThemeError as n, requireSdkTheme as r, MISSING_SDK_THEME_ERROR_CODE as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as createRichTextDocFromMarkdown, t as RichTextDocSchema } from "./richTextSchema-Euhuj-7V.mjs";
|
|
2
2
|
import { i as ALLOWED_TRANSFORM_IDS, n as ALLOWED_NODE_TYPES, t as titleSourceValueSchema } from "./titleSourceSchema-DwKJfMYb.mjs";
|
|
3
3
|
import { r as createDebugWriter } from "./debug-DXUyrE0T.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region ../theme-core/src/customCss/validation.ts
|
|
3
|
+
/**
|
|
4
|
+
* Custom CSS Validation Schemas
|
|
5
|
+
*
|
|
6
|
+
* Zod schemas for validating custom CSS rules.
|
|
7
|
+
* Enforces security constraints by construction.
|
|
8
|
+
*/
|
|
9
|
+
/** Global selectors that could affect elements outside theme scope */
|
|
10
|
+
const FORBIDDEN_SELECTORS = [
|
|
11
|
+
":root",
|
|
12
|
+
"html",
|
|
13
|
+
"body"
|
|
14
|
+
];
|
|
15
|
+
/** Universal selector - forbidden because it affects everything */
|
|
16
|
+
const UNIVERSAL_SELECTOR = "*";
|
|
17
|
+
/** Pattern to detect remote URL references (http://, https://, //) */
|
|
18
|
+
const REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
|
|
19
|
+
/** Pattern to detect javascript: URLs */
|
|
20
|
+
const JAVASCRIPT_URL_PATTERN = /javascript\s*:/i;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a single selector part (no commas) is forbidden.
|
|
23
|
+
*/
|
|
24
|
+
function isForbiddenSelectorPart(part) {
|
|
25
|
+
const normalized = part.toLowerCase().trim();
|
|
26
|
+
if (!normalized) return true;
|
|
27
|
+
if (normalized === UNIVERSAL_SELECTOR || normalized.startsWith("* ") || normalized.endsWith(" *") || normalized.includes(" * ")) return true;
|
|
28
|
+
for (const forbidden of FORBIDDEN_SELECTORS) {
|
|
29
|
+
if (normalized === forbidden) return true;
|
|
30
|
+
if (normalized.startsWith(forbidden + " ")) return true;
|
|
31
|
+
if (normalized.startsWith(forbidden + ">")) return true;
|
|
32
|
+
if (normalized.startsWith(forbidden + "+")) return true;
|
|
33
|
+
if (normalized.startsWith(forbidden + "~")) return true;
|
|
34
|
+
if (normalized.startsWith(forbidden + ".")) return true;
|
|
35
|
+
if (normalized.startsWith(forbidden + "#")) return true;
|
|
36
|
+
if (normalized.startsWith(forbidden + "[")) return true;
|
|
37
|
+
if (normalized.startsWith(forbidden + ":") && !normalized.startsWith(forbidden + "::")) return true;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Check if a selector uses sibling combinators with & that could escape scope.
|
|
43
|
+
* Patterns like "& ~ .outside" or "& + .sibling" can select elements outside the scope.
|
|
44
|
+
*/
|
|
45
|
+
function hasScopeEscapingSiblingCombinator(selector) {
|
|
46
|
+
const normalized = selector.trim();
|
|
47
|
+
return /&\s*[+~]/.test(normalized);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a selector contains forbidden global selectors.
|
|
51
|
+
* Handles selectors like ":root", "html body", "body.class", "body, .x", etc.
|
|
52
|
+
*/
|
|
53
|
+
function containsForbiddenSelector(selector) {
|
|
54
|
+
const normalized = selector.toLowerCase().trim();
|
|
55
|
+
if (!normalized) return true;
|
|
56
|
+
if (hasScopeEscapingSiblingCombinator(selector)) return true;
|
|
57
|
+
const parts = normalized.split(",");
|
|
58
|
+
for (const part of parts) if (isForbiddenSelectorPart(part)) return true;
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Validates a CSS selector for safety.
|
|
63
|
+
*/
|
|
64
|
+
const selectorSchema = z.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine((s) => !containsForbiddenSelector(s), { message: "Global selectors (:root, html, body, *) are not allowed" });
|
|
65
|
+
/**
|
|
66
|
+
* Check if a CSS value contains a remote URL.
|
|
67
|
+
*/
|
|
68
|
+
function containsRemoteUrl(value) {
|
|
69
|
+
return REMOTE_URL_PATTERN.test(value);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Check if a CSS value contains a javascript: URL.
|
|
73
|
+
*/
|
|
74
|
+
function containsJavascriptUrl(value) {
|
|
75
|
+
return JAVASCRIPT_URL_PATTERN.test(value);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Validates a CSS declaration value for safety.
|
|
79
|
+
* Allows: url(#id), url(data:...), url(/path), var(--)
|
|
80
|
+
* Forbids: url(http...), url(//...), javascript:
|
|
81
|
+
*/
|
|
82
|
+
const declarationValueSchema = z.string().max(500, "Declaration value too long (max 500 characters)").refine((v) => !containsRemoteUrl(v), { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }).refine((v) => !containsJavascriptUrl(v), { message: "javascript: URLs are not allowed" });
|
|
83
|
+
/**
|
|
84
|
+
* Schema for CSS declarations object (property -> value map).
|
|
85
|
+
*/
|
|
86
|
+
const declarationsSchema = z.record(z.string().min(1).max(100), declarationValueSchema);
|
|
87
|
+
/**
|
|
88
|
+
* Schema for a single custom CSS rule.
|
|
89
|
+
*/
|
|
90
|
+
const customCssRuleSchema = z.object({
|
|
91
|
+
id: z.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
|
|
92
|
+
selector: selectorSchema,
|
|
93
|
+
declarations: declarationsSchema
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* Schema for block-specific CSS rule.
|
|
97
|
+
*/
|
|
98
|
+
const blockCustomCssRuleSchema = customCssRuleSchema.extend({ blockKind: z.string().min(1, "Block kind is required").max(50, "Block kind too long") });
|
|
99
|
+
/**
|
|
100
|
+
* Array of custom CSS rules for theme-level styling.
|
|
101
|
+
*/
|
|
102
|
+
const customCssRulesSchema = z.array(customCssRuleSchema).optional();
|
|
103
|
+
/**
|
|
104
|
+
* Array of block-specific CSS rules.
|
|
105
|
+
*/
|
|
106
|
+
const blockCustomCssRulesSchema = z.array(blockCustomCssRuleSchema).optional();
|
|
107
|
+
function toValidatedCssSelector(value) {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
function toValidatedCssDeclarationValue(value) {
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
function toValidatedCssDeclarations(declarations) {
|
|
114
|
+
return Object.fromEntries(Object.entries(declarations).map(([property, value]) => [property, toValidatedCssDeclarationValue(value)]));
|
|
115
|
+
}
|
|
116
|
+
function parseCustomCssRule(rule) {
|
|
117
|
+
const parsed = customCssRuleSchema.parse(rule);
|
|
118
|
+
return {
|
|
119
|
+
id: parsed.id,
|
|
120
|
+
selector: toValidatedCssSelector(parsed.selector),
|
|
121
|
+
declarations: toValidatedCssDeclarations(parsed.declarations)
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function parseCustomCssRules(rules) {
|
|
125
|
+
return rules?.map((rule) => parseCustomCssRule(rule));
|
|
126
|
+
}
|
|
127
|
+
function parseBlockCustomCssRule(rule) {
|
|
128
|
+
const parsed = blockCustomCssRuleSchema.parse(rule);
|
|
129
|
+
return {
|
|
130
|
+
id: parsed.id,
|
|
131
|
+
selector: toValidatedCssSelector(parsed.selector),
|
|
132
|
+
declarations: toValidatedCssDeclarations(parsed.declarations),
|
|
133
|
+
blockKind: parsed.blockKind
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function parseBlockCustomCssRules(rules) {
|
|
137
|
+
return rules?.map((rule) => parseBlockCustomCssRule(rule));
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
export { parseBlockCustomCssRules as a, declarationsSchema as i, customCssRulesSchema as n, parseCustomCssRules as o, declarationValueSchema as r, selectorSchema as s, blockCustomCssRulesSchema as t };
|
|
@@ -1,11 +1,427 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { u as builtinTransformDefinitions } from "./pageRenderPlan-BShULdc2.mjs";
|
|
2
|
+
import { Di as blockSectionDeclarationShape, Ei as blockCategoryEnum, Fi as validateSdkBlockDeclaration, Ii as NodeSchema, Ja as parseMailingListProviderScope, Ni as validateManifestLookField, Oi as builtInBlockKindsSchema, Pi as sdkBlockPresentationShape, Ri as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, ki as fieldSchema, t as getBlockDefinition } from "./registry-TFPJdGQi.mjs";
|
|
3
3
|
import { a as ALLOWED_TRANSFORM_IDS_SET, r as ALLOWED_NODE_TYPES_SET, t as titleSourceValueSchema } from "./titleSourceSchema-DwKJfMYb.mjs";
|
|
4
4
|
import { n as collectBookingReservedFieldCollisions, t as APPOINTMENT_BOOKING_BLOCK_ID } from "./booking-form.reserved-fields-BWRF7509.mjs";
|
|
5
|
+
import { t as SUPPORTED_LOADER_ENDPOINTS } from "./prefetchBlockData-C4yUmz-r.mjs";
|
|
6
|
+
import { r as SUPPORTED_LOADER_ENDPOINTS$1 } from "./publicProducts-W9hDRwjz.mjs";
|
|
7
|
+
import { n as BINDING_TRANSFORM_VALUES$1 } from "./bindings-DhmIW3Er.mjs";
|
|
8
|
+
import { t as footerModeSchema } from "./mode-Cv_TG9gP.mjs";
|
|
5
9
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-CdI7NvAW.mjs";
|
|
6
10
|
import { i as safeParseRouteTemplate, t as describeRouteTemplateParseError } from "./routeTemplate-AsKQwa47.mjs";
|
|
7
|
-
import { n as describeInvalidBindingTransform, t as BINDING_TRANSFORM_VALUES } from "./bindings-Dgt_0goJ.mjs";
|
|
8
11
|
import { z } from "zod";
|
|
12
|
+
//#region ../api/src/utils/isRecord.ts
|
|
13
|
+
function isRecord(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../api/src/navigation/contracts.ts
|
|
18
|
+
/**
|
|
19
|
+
* Canonical navigation/link Zod contracts.
|
|
20
|
+
*
|
|
21
|
+
* Goal: a single source-of-truth for link shapes used across dashboard + SDK.
|
|
22
|
+
* - Types live in `packages/api/src/navigation/types.ts`
|
|
23
|
+
* - Schemas live here and are tied to types via `satisfies z.ZodType<...>`
|
|
24
|
+
*/
|
|
25
|
+
const portalLinkPayloadSchema = z.object({
|
|
26
|
+
kind: z.literal("portal"),
|
|
27
|
+
path: z.string().trim().startsWith("/").optional(),
|
|
28
|
+
labels: z.object({
|
|
29
|
+
loggedOut: z.string().trim().min(1).optional(),
|
|
30
|
+
loggedIn: z.string().trim().min(1).optional()
|
|
31
|
+
}).optional()
|
|
32
|
+
});
|
|
33
|
+
const cartLinkLabelConfigSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("icon-only") }), z.object({
|
|
34
|
+
kind: z.literal("icon-with-label"),
|
|
35
|
+
label: z.string().trim().min(1)
|
|
36
|
+
})]);
|
|
37
|
+
const cartLinkPayloadSchema = z.object({
|
|
38
|
+
kind: z.literal("cart"),
|
|
39
|
+
badge: z.enum(["show-count", "hidden"]),
|
|
40
|
+
label: cartLinkLabelConfigSchema
|
|
41
|
+
});
|
|
42
|
+
const internalLinkPayloadSchema = z.object({
|
|
43
|
+
kind: z.literal("internal"),
|
|
44
|
+
routeId: z.string().uuid(),
|
|
45
|
+
entityId: z.string().uuid(),
|
|
46
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
47
|
+
href: z.string().min(1),
|
|
48
|
+
title: z.string().min(1),
|
|
49
|
+
typeLabel: z.string().min(1),
|
|
50
|
+
contentTypeKey: z.string().nullable().optional(),
|
|
51
|
+
contentTypeName: z.string().nullable().optional(),
|
|
52
|
+
updatedAt: z.string().nullable().optional()
|
|
53
|
+
}).passthrough();
|
|
54
|
+
const externalLinkSchema = z.object({
|
|
55
|
+
kind: z.literal("external"),
|
|
56
|
+
href: z.string().url()
|
|
57
|
+
});
|
|
58
|
+
const customLinkSchema = z.object({
|
|
59
|
+
kind: z.literal("url"),
|
|
60
|
+
href: z.string().min(1)
|
|
61
|
+
});
|
|
62
|
+
const pageLinkSchema = z.object({
|
|
63
|
+
kind: z.literal("page"),
|
|
64
|
+
identifier: z.string().min(1)
|
|
65
|
+
});
|
|
66
|
+
const entryLinkSchema = z.object({
|
|
67
|
+
kind: z.literal("entry"),
|
|
68
|
+
contentType: z.string().min(1),
|
|
69
|
+
identifier: z.string().min(1)
|
|
70
|
+
});
|
|
71
|
+
z.discriminatedUnion("kind", [
|
|
72
|
+
internalLinkPayloadSchema,
|
|
73
|
+
pageLinkSchema,
|
|
74
|
+
entryLinkSchema,
|
|
75
|
+
externalLinkSchema,
|
|
76
|
+
customLinkSchema,
|
|
77
|
+
portalLinkPayloadSchema,
|
|
78
|
+
cartLinkPayloadSchema
|
|
79
|
+
]);
|
|
80
|
+
const navigationLinkInputSchemaOptions = [
|
|
81
|
+
pageLinkSchema,
|
|
82
|
+
entryLinkSchema,
|
|
83
|
+
externalLinkSchema,
|
|
84
|
+
customLinkSchema,
|
|
85
|
+
portalLinkPayloadSchema,
|
|
86
|
+
cartLinkPayloadSchema
|
|
87
|
+
];
|
|
88
|
+
z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region ../api/src/sdkConfig/contracts.ts
|
|
91
|
+
/**
|
|
92
|
+
* Canonical SDK config Zod contracts.
|
|
93
|
+
*
|
|
94
|
+
* Goal: a single source-of-truth for request payload shapes used across dashboard + SDK.
|
|
95
|
+
* - Endpoint request/response types live in `packages/api/src/types.ts`
|
|
96
|
+
* - Schemas live here and are tied to those types via `satisfies z.ZodType<...>`
|
|
97
|
+
*
|
|
98
|
+
* NOTE: These schemas represent the *wire/input* shape for API requests.
|
|
99
|
+
* Service-layer code should parse/normalize again (defaults/refinements) into domain types.
|
|
100
|
+
*/
|
|
101
|
+
/**
|
|
102
|
+
* UNSAFE: Retype an existing Zod schema to a different (compile-time) output type.
|
|
103
|
+
*
|
|
104
|
+
* Use only for cases where:
|
|
105
|
+
* - the runtime schema is known to accept the desired *input/wire* shape, but
|
|
106
|
+
* - Zod's inferred output type doesn't match the desired TS type due to transforms/defaults.
|
|
107
|
+
*
|
|
108
|
+
* If used incorrectly, this can lie to TypeScript and cause drift.
|
|
109
|
+
*
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
function unsafeRetypeZodSchema(schema) {
|
|
113
|
+
return schema;
|
|
114
|
+
}
|
|
115
|
+
const navIdListSchema$1 = z.preprocess((value) => {
|
|
116
|
+
if (!Array.isArray(value)) return void 0;
|
|
117
|
+
const filtered = value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
118
|
+
return filtered.length > 0 ? filtered : void 0;
|
|
119
|
+
}, z.array(z.string()).max(200).optional());
|
|
120
|
+
const dashboardNavVisibilityBaseSchema$1 = z.object({
|
|
121
|
+
mode: z.enum(["augment", "restrict"]).optional(),
|
|
122
|
+
allowIds: navIdListSchema$1,
|
|
123
|
+
denyIds: navIdListSchema$1
|
|
124
|
+
}).strip();
|
|
125
|
+
const dashboardNavVisibilityRolesSchema$1 = z.object({
|
|
126
|
+
administrator: dashboardNavVisibilityBaseSchema$1.optional(),
|
|
127
|
+
editor: dashboardNavVisibilityBaseSchema$1.optional(),
|
|
128
|
+
team_member: dashboardNavVisibilityBaseSchema$1.optional()
|
|
129
|
+
}).strip().optional();
|
|
130
|
+
const dashboardNavVisibilitySchema$1 = dashboardNavVisibilityBaseSchema$1.extend({ roles: dashboardNavVisibilityRolesSchema$1 }).strip();
|
|
131
|
+
const dashboardNavigationConfigSchema$1 = z.object({
|
|
132
|
+
siteNav: dashboardNavVisibilitySchema$1.optional(),
|
|
133
|
+
settingsNav: dashboardNavVisibilitySchema$1.optional()
|
|
134
|
+
}).strip();
|
|
135
|
+
const dashboardConfigSchema$1 = z.object({
|
|
136
|
+
previewEditingEnabled: z.boolean().optional(),
|
|
137
|
+
navigation: dashboardNavigationConfigSchema$1.optional()
|
|
138
|
+
}).strip();
|
|
139
|
+
/**
|
|
140
|
+
* Canonical field schema comes from @riverbankcms/blocks.
|
|
141
|
+
*
|
|
142
|
+
* It accepts FieldDefinitionInput (pre-defaults) and outputs FieldDefinition (post-defaults).
|
|
143
|
+
* This `satisfies` assertion prevents drift in the *accepted wire shape* without forcing
|
|
144
|
+
* the schema output type to match the input type.
|
|
145
|
+
*/
|
|
146
|
+
const fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
147
|
+
const sdkLoaderEndpointSchema$1 = z.enum(SUPPORTED_LOADER_ENDPOINTS$1);
|
|
148
|
+
const loaderFallbackScalarSchema = z.union([
|
|
149
|
+
z.string(),
|
|
150
|
+
z.number(),
|
|
151
|
+
z.boolean(),
|
|
152
|
+
z.null()
|
|
153
|
+
]);
|
|
154
|
+
const loaderParamBindingSchema$1 = z.object({ $bind: z.object({
|
|
155
|
+
from: z.string().min(1, "Binding path is required"),
|
|
156
|
+
fallback: loaderFallbackScalarSchema.optional()
|
|
157
|
+
}) });
|
|
158
|
+
const loaderParamValueSchema$1 = z.union([
|
|
159
|
+
z.string(),
|
|
160
|
+
z.number(),
|
|
161
|
+
z.boolean(),
|
|
162
|
+
loaderParamBindingSchema$1
|
|
163
|
+
]);
|
|
164
|
+
const sdkConfigLoaderSchema$1 = z.object({
|
|
165
|
+
endpoint: sdkLoaderEndpointSchema$1,
|
|
166
|
+
params: z.record(z.string(), loaderParamValueSchema$1),
|
|
167
|
+
requiredParams: z.array(z.string().min(1)).optional(),
|
|
168
|
+
mode: z.enum(["server", "client"]).default("server")
|
|
169
|
+
});
|
|
170
|
+
const sdkDataLoadersSchema$1 = z.record(z.string(), sdkConfigLoaderSchema$1).refine((loaders) => Object.keys(loaders).length <= 5, { message: "Maximum 5 data loaders per block" }).optional();
|
|
171
|
+
const sdkCustomBlockIdSchema = z.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, { message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens" }).transform((value) => value);
|
|
172
|
+
const sdkCustomBlockInputSchema = z.object({
|
|
173
|
+
id: sdkCustomBlockIdSchema,
|
|
174
|
+
title: z.string().min(1),
|
|
175
|
+
titleSource: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]).optional(),
|
|
176
|
+
description: z.string().optional(),
|
|
177
|
+
category: blockCategoryEnum,
|
|
178
|
+
icon: z.string().optional(),
|
|
179
|
+
tags: z.array(z.string()).optional(),
|
|
180
|
+
fields: fieldDefinitionInputSchema.array().min(1),
|
|
181
|
+
dataLoaders: sdkDataLoadersSchema$1,
|
|
182
|
+
layout: NodeSchema.optional(),
|
|
183
|
+
...sdkBlockPresentationShape,
|
|
184
|
+
...blockSectionDeclarationShape
|
|
185
|
+
}).superRefine(validateManifestLookField).superRefine(validateSdkBlockDeclaration);
|
|
186
|
+
const sdkBlockFieldExtensionInputSchema = z.object({
|
|
187
|
+
fields: fieldDefinitionInputSchema.array().min(1),
|
|
188
|
+
...blockSectionDeclarationShape
|
|
189
|
+
}).superRefine(validateManifestLookField);
|
|
190
|
+
const sdkBlockFieldExtensionsInputSchema = z.record(z.string().min(1), sdkBlockFieldExtensionInputSchema);
|
|
191
|
+
const sdkThemePaletteSchema$1 = z.record(z.string(), z.string());
|
|
192
|
+
const sdkThemeConfigSchema$1 = z.object({ palette: sdkThemePaletteSchema$1 });
|
|
193
|
+
const sdkSectionBackgroundSchema = z.object({
|
|
194
|
+
id: z.string().min(1),
|
|
195
|
+
label: z.string().min(1),
|
|
196
|
+
token: z.string().min(1)
|
|
197
|
+
});
|
|
198
|
+
const sdkSectionOptionsConfigSchema = z.object({
|
|
199
|
+
backgroundColor: z.boolean().optional(),
|
|
200
|
+
backgroundImage: z.boolean().optional(),
|
|
201
|
+
backgroundGradient: z.boolean().optional(),
|
|
202
|
+
spacing: z.union([z.array(z.enum([
|
|
203
|
+
"compact",
|
|
204
|
+
"default",
|
|
205
|
+
"spacious"
|
|
206
|
+
])), z.boolean()]).optional(),
|
|
207
|
+
textColor: z.boolean().optional()
|
|
208
|
+
});
|
|
209
|
+
const sdkContainerOptionsConfigSchema = z.object({
|
|
210
|
+
maxWidth: z.union([z.array(z.enum([
|
|
211
|
+
"narrow",
|
|
212
|
+
"default",
|
|
213
|
+
"wide",
|
|
214
|
+
"full"
|
|
215
|
+
])), z.boolean()]).optional(),
|
|
216
|
+
alignment: z.union([z.array(z.enum([
|
|
217
|
+
"left",
|
|
218
|
+
"center",
|
|
219
|
+
"right"
|
|
220
|
+
])), z.boolean()]).optional()
|
|
221
|
+
});
|
|
222
|
+
const sdkSiteStyleConfigSchema = z.object({
|
|
223
|
+
sectionBackgrounds: z.array(sdkSectionBackgroundSchema).optional(),
|
|
224
|
+
sectionOptions: sdkSectionOptionsConfigSchema.optional(),
|
|
225
|
+
containerOptions: sdkContainerOptionsConfigSchema.optional()
|
|
226
|
+
});
|
|
227
|
+
const sdkSiteLayoutConfigSchema = z.object({
|
|
228
|
+
footerMode: footerModeSchema.optional(),
|
|
229
|
+
footerBlocks: z.array(z.object({
|
|
230
|
+
id: z.string().min(1).optional(),
|
|
231
|
+
kind: z.string().min(1),
|
|
232
|
+
content: z.record(z.string(), z.unknown()).optional()
|
|
233
|
+
})).optional()
|
|
234
|
+
});
|
|
235
|
+
const sdkFieldSelectOptionSchema = z.object({
|
|
236
|
+
value: z.string(),
|
|
237
|
+
label: z.string()
|
|
238
|
+
});
|
|
239
|
+
const sdkBlockFieldConfigSchema = z.object({ options: z.array(sdkFieldSelectOptionSchema).optional() });
|
|
240
|
+
const sdkBlockFieldOptionsMapSchema = z.record(z.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, { message: "Block ID must be 'block.*' or 'custom.*' format" }), z.record(z.string().min(1), sdkBlockFieldConfigSchema)).optional();
|
|
241
|
+
const sdkContentTypeTemplateConfigSchema = z.object({ blocks: z.array(z.unknown()) }).passthrough();
|
|
242
|
+
const sdkContentTypeOrderingConfigSchema = z.object({ mode: z.enum(["default", "manual"]).optional() }).optional();
|
|
243
|
+
const sdkContentTypeConfigSchema = z.object({
|
|
244
|
+
key: z.string().min(1),
|
|
245
|
+
fields: z.array(z.unknown()),
|
|
246
|
+
ordering: sdkContentTypeOrderingConfigSchema,
|
|
247
|
+
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
248
|
+
}).passthrough();
|
|
249
|
+
const sdkContentConfigSchema = z.object({
|
|
250
|
+
contentTypes: z.array(sdkContentTypeConfigSchema).optional(),
|
|
251
|
+
pages: z.array(z.unknown()).optional(),
|
|
252
|
+
entries: z.array(z.unknown()).optional(),
|
|
253
|
+
navigationMenus: z.array(z.unknown()).optional(),
|
|
254
|
+
settings: z.unknown().optional()
|
|
255
|
+
}).passthrough();
|
|
256
|
+
const SDK_WORKFLOW_ID_PATTERN = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
257
|
+
const SDK_WORKFLOW_ENDPOINT_PATTERN = /^\//;
|
|
258
|
+
const sdkWorkflowIdSchema$1 = z.string().min(1).max(120).regex(SDK_WORKFLOW_ID_PATTERN, { message: "Workflow ID must start with a lowercase letter and use lowercase letters, numbers, dots, underscores, or hyphens" });
|
|
259
|
+
const sdkWorkflowEndpointSchema$1 = z.string().min(1).max(500).regex(SDK_WORKFLOW_ENDPOINT_PATTERN, { message: "Workflow endpoint must be a site-relative path starting with \"/\"" });
|
|
260
|
+
const sdkWorkflowManualTriggerSchema = z.object({ type: z.literal("manual") }).strict();
|
|
261
|
+
const sdkWorkflowTriggerFieldSchema = z.string().trim().min(1).max(120).refine((field) => !field.includes("."), { message: "Workflow trigger fields must be top-level content field IDs, not paths" });
|
|
262
|
+
const sdkWorkflowFieldChangedConditionSchema = z.object({
|
|
263
|
+
field: sdkWorkflowTriggerFieldSchema,
|
|
264
|
+
changed: z.literal(true)
|
|
265
|
+
}).strict();
|
|
266
|
+
const sdkWorkflowFieldEmptyConditionSchema = z.object({
|
|
267
|
+
field: sdkWorkflowTriggerFieldSchema,
|
|
268
|
+
isEmpty: z.boolean()
|
|
269
|
+
}).strict();
|
|
270
|
+
const sdkWorkflowEntryDraftUpdatedTriggerSchema = z.object({
|
|
271
|
+
type: z.literal("entry.draft.updated"),
|
|
272
|
+
when: z.array(z.union([sdkWorkflowFieldChangedConditionSchema, sdkWorkflowFieldEmptyConditionSchema])).min(1).max(10)
|
|
273
|
+
}).strict();
|
|
274
|
+
const sdkWorkflowTriggerSchema$1 = z.discriminatedUnion("type", [sdkWorkflowManualTriggerSchema, sdkWorkflowEntryDraftUpdatedTriggerSchema]);
|
|
275
|
+
const sdkWorkflowConfirmationSchema$1 = z.object({
|
|
276
|
+
title: z.string().trim().min(1).max(120),
|
|
277
|
+
body: z.string().trim().min(1).max(500).optional()
|
|
278
|
+
}).strict();
|
|
279
|
+
const sdkWorkflowConfigSchema$1 = z.object({
|
|
280
|
+
id: sdkWorkflowIdSchema$1,
|
|
281
|
+
title: z.string().trim().min(1).max(120),
|
|
282
|
+
description: z.string().trim().min(1).max(500).optional(),
|
|
283
|
+
contentType: z.string().trim().min(1).max(120),
|
|
284
|
+
endpoint: sdkWorkflowEndpointSchema$1,
|
|
285
|
+
triggers: z.array(sdkWorkflowTriggerSchema$1).min(1).max(5),
|
|
286
|
+
confirmation: sdkWorkflowConfirmationSchema$1.optional()
|
|
287
|
+
}).strict();
|
|
288
|
+
const sdkWorkflowsSchema$1 = z.array(sdkWorkflowConfigSchema$1).max(50, "Maximum 50 workflows per site").refine((workflows) => {
|
|
289
|
+
const ids = workflows.map((workflow) => workflow.id);
|
|
290
|
+
return ids.length === new Set(ids).size;
|
|
291
|
+
}, { message: "Workflow IDs must be unique" }).optional();
|
|
292
|
+
const riverbankSiteConfigInputSchema = z.object({
|
|
293
|
+
siteId: z.string().uuid(),
|
|
294
|
+
builtInBlocks: builtInBlockKindsSchema.optional(),
|
|
295
|
+
previewUrl: z.string().url().optional(),
|
|
296
|
+
liveUrl: z.string().url().optional(),
|
|
297
|
+
theme: sdkThemeConfigSchema$1.optional(),
|
|
298
|
+
styles: sdkSiteStyleConfigSchema.optional(),
|
|
299
|
+
layout: sdkSiteLayoutConfigSchema.optional(),
|
|
300
|
+
customBlocks: z.array(sdkCustomBlockInputSchema).max(100, "Maximum 100 custom blocks per site").refine((blocks) => {
|
|
301
|
+
const ids = blocks.map((b) => b.id);
|
|
302
|
+
return ids.length === new Set(ids).size;
|
|
303
|
+
}, { message: "Block IDs must be unique" }).optional(),
|
|
304
|
+
blockFieldOptions: sdkBlockFieldOptionsMapSchema,
|
|
305
|
+
blockFieldExtensions: sdkBlockFieldExtensionsInputSchema.optional(),
|
|
306
|
+
workflows: sdkWorkflowsSchema$1,
|
|
307
|
+
content: sdkContentConfigSchema.optional(),
|
|
308
|
+
contentDir: z.string().optional(),
|
|
309
|
+
sync: z.object({ existingEntries: z.enum(["skip", "update"]).optional() }).optional(),
|
|
310
|
+
deploy: z.object({
|
|
311
|
+
verifyCommand: z.string().optional(),
|
|
312
|
+
prebuildOutput: z.string().optional()
|
|
313
|
+
}).optional(),
|
|
314
|
+
themeSource: z.enum(["local", "cms"]).optional(),
|
|
315
|
+
activeTheme: z.string().optional(),
|
|
316
|
+
enablePortal: z.boolean().optional(),
|
|
317
|
+
dashboard: dashboardConfigSchema$1.optional()
|
|
318
|
+
}).strict();
|
|
319
|
+
z.object({
|
|
320
|
+
config: riverbankSiteConfigInputSchema,
|
|
321
|
+
forceContentTypes: z.boolean().optional(),
|
|
322
|
+
mode: z.enum(["apply", "preview"]).optional(),
|
|
323
|
+
expectedMailingListProviderScope: z.unknown().transform((value, ctx) => {
|
|
324
|
+
if (value === void 0) return void 0;
|
|
325
|
+
const parsed = parseMailingListProviderScope(value);
|
|
326
|
+
if (parsed.ok) return parsed.value;
|
|
327
|
+
ctx.addIssue({
|
|
328
|
+
code: "custom",
|
|
329
|
+
message: "Invalid mailing-list provider scope"
|
|
330
|
+
});
|
|
331
|
+
return z.NEVER;
|
|
332
|
+
}).optional()
|
|
333
|
+
}).strict();
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region ../api/src/navigationMenuValidation.ts
|
|
336
|
+
function hasChildren(item) {
|
|
337
|
+
return Array.isArray(item.children) && item.children.length > 0;
|
|
338
|
+
}
|
|
339
|
+
function isCartLinkMissingVisibleLabel(link) {
|
|
340
|
+
return link?.kind === "cart" && link.label?.kind === "icon-with-label" && (typeof link.label.label !== "string" || link.label.label.trim().length === 0);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Recursively collects portal-link constraints for a single menu tree.
|
|
344
|
+
* Rules:
|
|
345
|
+
* - At most one portal link per menu.
|
|
346
|
+
* - Portal links must be root-level.
|
|
347
|
+
* - Portal links cannot have children.
|
|
348
|
+
*/
|
|
349
|
+
function collectPortalLinkStats(items, depth = 0) {
|
|
350
|
+
const result = {
|
|
351
|
+
count: 0,
|
|
352
|
+
nestedLabels: [],
|
|
353
|
+
withChildrenLabels: []
|
|
354
|
+
};
|
|
355
|
+
for (const item of items) {
|
|
356
|
+
if (item.link?.kind === "portal") {
|
|
357
|
+
result.count += 1;
|
|
358
|
+
if (depth > 0) result.nestedLabels.push(item.label);
|
|
359
|
+
if (hasChildren(item)) result.withChildrenLabels.push(item.label);
|
|
360
|
+
}
|
|
361
|
+
if (hasChildren(item)) {
|
|
362
|
+
const child = collectPortalLinkStats((item.children ?? []).filter(isNavigationMenuValidationItem), depth + 1);
|
|
363
|
+
result.count += child.count;
|
|
364
|
+
result.nestedLabels.push(...child.nestedLabels);
|
|
365
|
+
result.withChildrenLabels.push(...child.withChildrenLabels);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return result;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Recursively collects cart-link constraints for a single menu tree.
|
|
372
|
+
* Rules:
|
|
373
|
+
* - Cart links must be root-level.
|
|
374
|
+
* - Cart links cannot have children.
|
|
375
|
+
* - Cart links cannot be CTA items.
|
|
376
|
+
* - Cart links using `icon-with-label` must provide visible text.
|
|
377
|
+
*/
|
|
378
|
+
function collectCartLinkStats(items, depth = 0) {
|
|
379
|
+
const result = {
|
|
380
|
+
count: 0,
|
|
381
|
+
nestedLabels: [],
|
|
382
|
+
withChildrenLabels: [],
|
|
383
|
+
ctaLabels: [],
|
|
384
|
+
missingVisibleTextLabels: []
|
|
385
|
+
};
|
|
386
|
+
for (const item of items) {
|
|
387
|
+
if (item.link?.kind === "cart") {
|
|
388
|
+
result.count += 1;
|
|
389
|
+
if (depth > 0) result.nestedLabels.push(item.label);
|
|
390
|
+
if (hasChildren(item)) result.withChildrenLabels.push(item.label);
|
|
391
|
+
if (item.isCta === true) result.ctaLabels.push(item.label);
|
|
392
|
+
if (isCartLinkMissingVisibleLabel(item.link ?? null)) result.missingVisibleTextLabels.push(item.label);
|
|
393
|
+
}
|
|
394
|
+
if (hasChildren(item)) {
|
|
395
|
+
const child = collectCartLinkStats((item.children ?? []).filter(isNavigationMenuValidationItem), depth + 1);
|
|
396
|
+
result.count += child.count;
|
|
397
|
+
result.nestedLabels.push(...child.nestedLabels);
|
|
398
|
+
result.withChildrenLabels.push(...child.withChildrenLabels);
|
|
399
|
+
result.ctaLabels.push(...child.ctaLabels);
|
|
400
|
+
result.missingVisibleTextLabels.push(...child.missingVisibleTextLabels);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return result;
|
|
404
|
+
}
|
|
405
|
+
function isNavigationMenuValidationItem(value) {
|
|
406
|
+
if (!isRecord(value)) return false;
|
|
407
|
+
return typeof value.label === "string";
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region src/contracts/bindings.ts
|
|
411
|
+
/**
|
|
412
|
+
* Public SDK contracts for template bindings.
|
|
413
|
+
*
|
|
414
|
+
* These are SDK-owned copies of the shape used by the blocks runtime so that
|
|
415
|
+
* SDK consumers don't need to install `@riverbankcms/blocks` for typings.
|
|
416
|
+
*
|
|
417
|
+
* Runtime implementations are delegated to `@riverbankcms/blocks/bindings`.
|
|
418
|
+
*/
|
|
419
|
+
const BINDING_TRANSFORM_VALUES = BINDING_TRANSFORM_VALUES$1;
|
|
420
|
+
const BINDING_TRANSFORM_LIST = BINDING_TRANSFORM_VALUES.join(", ");
|
|
421
|
+
function describeInvalidBindingTransform(transform) {
|
|
422
|
+
return `Transform "${transform}" is not valid. Allowed: ${BINDING_TRANSFORM_LIST}`;
|
|
423
|
+
}
|
|
424
|
+
//#endregion
|
|
9
425
|
//#region src/config/content-types.ts
|
|
10
426
|
const TEMPLATE_BINDING_META_PATHS = [
|
|
11
427
|
"title",
|