@riverbankcms/sdk 0.159.0 → 0.161.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/README.md +4 -4
- package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
- package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
- package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
- package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
- package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
- package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
- package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
- package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
- package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
- package/dist/_dts/index-BVkP8f70.d.ts +66 -0
- package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
- package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
- package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
- package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
- package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
- package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
- package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
- package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
- package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
- package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
- 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 +13 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
- 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/preview-next/keep-alive.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- 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/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
- package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
- package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
- package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
- package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
- package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
- package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
- package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
- package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
- package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
- package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
- package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
- package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
- package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
- package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
- package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
- package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
- package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
- package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
- package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
- package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
- package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
- package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
- package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
- package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
- package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
- package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
- package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
- package/dist/client/client.mjs +28 -15
- package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
- package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
- package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
- package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
- package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
- package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
- package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
- package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
- package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
- package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
- package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
- package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
- package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
- package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
- package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
- package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
- package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
- package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
- package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
- package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
- package/dist/client/portal/client.mjs +4560 -115
- package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
- package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
- package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
- package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
- package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
- package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
- package/dist/client/rendering/client.mjs +28 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +57 -32
- package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
- package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
- package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
- package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
- package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
- package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
- package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
- package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
- package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
- package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
- package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
- package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
- package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
- package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
- package/dist/client/uuid-BETKW8rS.mjs +12 -0
- package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
- package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
- package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
- package/dist/preview-next/before-render.mjs +5 -4
- package/dist/preview-next/chrome.css +2 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
- package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
- package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
- package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
- package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
- package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
- package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
- package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
- package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
- package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
- package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
- package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
- package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
- package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
- package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
- package/dist/preview-next/editor-base.css +64 -2
- package/dist/preview-next/editor-chrome.css +85 -0
- package/dist/preview-next/keepAlive.mjs +2 -2
- package/dist/preview-next/middleware.mjs +7 -3
- package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
- package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
- package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
- package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
- package/dist/server/config-template-validation.mjs +50 -10
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
- package/dist/server/loadPage--DXBwI8V.mjs +2 -0
- package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
- package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
- package/dist/server/page-converter.mjs +8 -10
- package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
- package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
- package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
- package/dist/server/server.mjs +3 -3
- package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
- package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
- package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
- package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
- package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
- package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
- package/dist/styles/index.css +235 -0
- package/package.json +8 -3
- package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
- package/dist/_dts/index-cnymEAZY.d.ts +0 -1
- package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
- package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
- package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
- package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
- package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
- package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
- package/dist/client/timetableModel-D09jPdue.mjs +0 -480
- package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
- package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
- package/dist/server/loadPage-jade28Xh.mjs +0 -2
- package/dist/server/media-CcHwZkdJ.mjs +0 -243
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ThemeScopeCore, t as buildThemeBridgeRuntime } from "./src-
|
|
1
|
+
import { i as ThemeScopeCore, t as buildThemeBridgeRuntime } from "./src-ILxc6pid.mjs";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/theme-bridge/generateCssVars.ts
|
package/dist/server/theme.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as parseThemeForPersistence, r as themeSchema$1 } from "./schema-
|
|
1
|
+
import { R as parseThemeForPersistence, r as themeSchema$1 } from "./schema-CD4peO7m.mjs";
|
|
2
2
|
import * as fs from "fs/promises";
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
//#region src/theme/loader.ts
|
|
@@ -1,8 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { at as boxBackgroundSchema, ot as runtimeBoxBackgroundSchema } from "./schema-Bs735S27.mjs";
|
|
1
|
+
import { at as boxBackgroundSchema, dt as mediaSchema, hr as parseContentVersionId, ot as runtimeBoxBackgroundSchema, pt as runtimeMediaSchema, vt as mediaIdentifierSchema } from "./schema-CD4peO7m.mjs";
|
|
2
|
+
import { Bi as resolveRepeaterGridColumnsForBreakpoint, Ei as parseFieldDefinitions, Hi as resolveRepeaterGridSpanFieldId, Ii as projectRepeaterGridLayoutForRendering, Li as buildRepeaterGridLayout, Ni as linkSchema, Ri as parseRepeaterGridInteger, Vi as resolveRepeaterGridRowFieldId, Wi as isRecord$1, _i as plainTextToInlineText, c as sanitizeNewsletterSignupPublicContent, ca as projectPublicLocation, gi as parseInlineTextFromUnknown, la as publicLocationSchema, mi as inlineTextToPlainText, oa as locationValueSchema, t as getBlockDefinition, ti as parseBlockIconValue, vi as DEFAULT_MEDIA_FIELD_KINDS, wa as toUtcIsoDateTimeString, wi as normalizeSelectSource, xa as resolveBookingBusinessTimeZone, yi as PUBLIC_FILE_FIELD_KINDS, zi as resolveRepeaterGridColumnFieldId } from "./registry-BVfCqaCq.mjs";
|
|
4
3
|
import { r as isRichTextDoc } from "./richTextSchema-YYc85FX4.mjs";
|
|
5
4
|
import { z } from "zod";
|
|
5
|
+
//#region ../core/src/location-relationship.ts
|
|
6
|
+
/** Initial bounded policy; Opus can tune these values without changing callers. */
|
|
7
|
+
const LOCATION_MATCH_THRESHOLDS_METRES = {
|
|
8
|
+
building: 100,
|
|
9
|
+
street: 300,
|
|
10
|
+
area: 1e3
|
|
11
|
+
};
|
|
12
|
+
function locationDistanceMetres(a, b) {
|
|
13
|
+
const radians = Math.PI / 180;
|
|
14
|
+
const haversine = Math.sin((b.lat - a.lat) * radians / 2) ** 2 + Math.cos(a.lat * radians) * Math.cos(b.lat * radians) * Math.sin((b.lng - a.lng) * radians / 2) ** 2;
|
|
15
|
+
return 6371e3 * 2 * Math.asin(Math.sqrt(Math.min(1, Math.max(0, haversine))));
|
|
16
|
+
}
|
|
17
|
+
/** Arrival pins are never substituted for missing provider address points. */
|
|
18
|
+
function decideLocationRelationship(location) {
|
|
19
|
+
if (location === null) return { kind: "empty" };
|
|
20
|
+
if (location.pin === null) return { kind: "address_only" };
|
|
21
|
+
if (location.address === null) return { kind: "pin_only" };
|
|
22
|
+
if (location.addressMatch === null) return { kind: "unchecked" };
|
|
23
|
+
const { point, precision } = location.addressMatch;
|
|
24
|
+
const distanceMetres = locationDistanceMetres(point, location.pin);
|
|
25
|
+
const thresholdMetres = LOCATION_MATCH_THRESHOLDS_METRES[precision === "unknown" ? "building" : precision];
|
|
26
|
+
return {
|
|
27
|
+
kind: distanceMetres > thresholdMetres * (1 + 8 * Number.EPSILON) ? "far" : precision === "building" || precision === "unknown" ? "near" : "approximate",
|
|
28
|
+
distanceMetres,
|
|
29
|
+
thresholdMetres,
|
|
30
|
+
precision
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** Forms receive the decided save value, rather than a collection of flags. */
|
|
34
|
+
function decideLocationSave(location, activity) {
|
|
35
|
+
if (activity === "address-check") return {
|
|
36
|
+
kind: "blocked",
|
|
37
|
+
reason: "pending_address_check"
|
|
38
|
+
};
|
|
39
|
+
if (activity === "reverse") return {
|
|
40
|
+
kind: "blocked",
|
|
41
|
+
reason: "pending_reverse"
|
|
42
|
+
};
|
|
43
|
+
return decideLocationRelationship(location).kind === "far" && location?.ownerConfirmedPinAndAddress !== true ? {
|
|
44
|
+
kind: "blocked",
|
|
45
|
+
reason: "unconfirmed_mismatch"
|
|
46
|
+
} : {
|
|
47
|
+
kind: "ready",
|
|
48
|
+
location
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
6
52
|
//#region ../core/src/block-content-identity.ts
|
|
7
53
|
function readContentVersionId(value) {
|
|
8
54
|
const parsed = parseContentVersionId(value);
|
|
@@ -76,7 +122,9 @@ function canonicalizeObjectForWrite(plans, value) {
|
|
|
76
122
|
function canonicalizeFieldValue(plan, value) {
|
|
77
123
|
switch (plan.kind) {
|
|
78
124
|
case "media": return canonicalizeMedia(value);
|
|
79
|
-
case "group":
|
|
125
|
+
case "group":
|
|
126
|
+
if (plan.valueContract === "location") return value;
|
|
127
|
+
return plan.childSelection.kind === "discriminatedTabs" ? canonicalizeDiscriminatedGroup(plan, value) : canonicalizeObjectForWrite(plan.childSelection.fields, value);
|
|
80
128
|
case "repeater": return canonicalizeRepeater(plan, value);
|
|
81
129
|
case "string":
|
|
82
130
|
case "number":
|
|
@@ -282,7 +330,7 @@ function pluralize(label, count) {
|
|
|
282
330
|
return label.endsWith("s") ? label : `${label}s`;
|
|
283
331
|
}
|
|
284
332
|
function valueContractForField(field) {
|
|
285
|
-
return field.ui?.valueContract
|
|
333
|
+
return field.ui?.valueContract !== void 0 ? { valueContract: field.ui.valueContract } : {};
|
|
286
334
|
}
|
|
287
335
|
function deriveTabGroupValidationPlan(field, path, required) {
|
|
288
336
|
return {
|
|
@@ -391,7 +439,8 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
|
|
|
391
439
|
kind: "all",
|
|
392
440
|
fields: deriveNestedFieldPlans(field.schema?.fields ?? [], path)
|
|
393
441
|
},
|
|
394
|
-
allowNullChildren: field.type === "group" && field.ui?.widget === "locationPicker"
|
|
442
|
+
allowNullChildren: field.type === "group" && field.ui?.widget === "locationPicker",
|
|
443
|
+
...valueContractForField(field)
|
|
395
444
|
};
|
|
396
445
|
case "tabGroup": return deriveTabGroupValidationPlan(field, path, required);
|
|
397
446
|
case "presetOrCustom":
|
|
@@ -526,7 +575,9 @@ function normalizeManifestContentForWrite(plans, content, options = {}) {
|
|
|
526
575
|
function normalizeStoredFieldValueWithContext(plan, value, ctx) {
|
|
527
576
|
if (value === null && !plan.required) return;
|
|
528
577
|
switch (plan.kind) {
|
|
529
|
-
case "group":
|
|
578
|
+
case "group":
|
|
579
|
+
if (plan.valueContract === "location") return normalizeLocationContract(value, ctx.mode);
|
|
580
|
+
return normalizeStoredObjectChildren(selectedGroupChildPlans(plan, value), value, childValidationContext(plan, ctx));
|
|
530
581
|
case "repeater": return normalizeStoredRepeaterItems(plan, value, ctx);
|
|
531
582
|
case "string":
|
|
532
583
|
case "number":
|
|
@@ -562,7 +613,9 @@ function normalizeFieldValue(plan, value, ctx) {
|
|
|
562
613
|
switch (plan.kind) {
|
|
563
614
|
case "number": return normalizeNumberInput(value, ctx.allowNull);
|
|
564
615
|
case "string": return acceptsOptionalBlankAsMissing(plan, value) ? void 0 : value;
|
|
565
|
-
case "group":
|
|
616
|
+
case "group":
|
|
617
|
+
if (plan.valueContract === "location") return normalizeLocationContract(value, ctx.mode);
|
|
618
|
+
return normalizeObjectChildren(selectedGroupChildPlans(plan, value), value, childValidationContext(plan, ctx));
|
|
566
619
|
case "repeater": return normalizeRepeaterItems(plan, value, ctx);
|
|
567
620
|
case "link":
|
|
568
621
|
case "boolean":
|
|
@@ -652,7 +705,7 @@ function acceptsNullValue(plan, ctx) {
|
|
|
652
705
|
return ctx.mode === "storable" ? !plan.required : ctx.allowNull || acceptsOptionalNullValue(plan);
|
|
653
706
|
}
|
|
654
707
|
function acceptsOptionalNullValue(plan) {
|
|
655
|
-
return !plan.required && (plan.kind === "media" || plan.kind === "number");
|
|
708
|
+
return !plan.required && (plan.kind === "media" || plan.kind === "number" || plan.kind === "group" && plan.valueContract === "location");
|
|
656
709
|
}
|
|
657
710
|
function isMissingForPlan(plan, value, mode) {
|
|
658
711
|
if (value === void 0) return true;
|
|
@@ -812,6 +865,7 @@ function validateFlattenedGroupContainers(groupIds, item, plan, index, ctx) {
|
|
|
812
865
|
}] : []);
|
|
813
866
|
}
|
|
814
867
|
function validateGroupPlan(plan, value, ctx) {
|
|
868
|
+
if (plan.valueContract === "location") return validateLocationGroupContract(plan, value, ctx);
|
|
815
869
|
if (!isPlainObject(value)) return [issue(plan, "wrongType", { expected: "an object" })];
|
|
816
870
|
if (plan.childSelection.kind === "discriminatedTabs") {
|
|
817
871
|
const selectedType = value[plan.childSelection.activeTabField];
|
|
@@ -825,8 +879,7 @@ function validateGroupPlan(plan, value, ctx) {
|
|
|
825
879
|
const childCtx = childValidationContext(plan, ctx);
|
|
826
880
|
const childIssues = selectedGroupChildPlans(plan, value).flatMap((childPlan) => validateNormalizedFieldValue(childPlan, value[childPlan.fieldId], childCtx));
|
|
827
881
|
if (childIssues.length > 0) return childIssues;
|
|
828
|
-
|
|
829
|
-
return [];
|
|
882
|
+
return validateGroupBackgroundContract(plan, value, ctx);
|
|
830
883
|
}
|
|
831
884
|
function childValidationContext(plan, ctx) {
|
|
832
885
|
return plan.allowNullChildren ? {
|
|
@@ -936,12 +989,12 @@ function fieldPlanToStrictObjectPropertyZod(plan, mode = "strict", layoutGridCoo
|
|
|
936
989
|
}),
|
|
937
990
|
layoutGridCoordinates
|
|
938
991
|
};
|
|
939
|
-
const
|
|
992
|
+
const projected = z.any().superRefine((value, zodCtx) => {
|
|
940
993
|
validateNormalizedFieldValue(plan, value, ctx).forEach((validationIssue) => {
|
|
941
994
|
addFieldIssueToZodContext(zodCtx, validationIssue, plan.path);
|
|
942
995
|
});
|
|
943
|
-
});
|
|
944
|
-
return plan.required ?
|
|
996
|
+
}).transform((value) => mode === "render" && plan.kind === "group" && plan.valueContract === "location" ? normalizeLocationContract(value, "render") : value);
|
|
997
|
+
return plan.required ? projected : projected.optional();
|
|
945
998
|
}
|
|
946
999
|
function fieldIssueToZodDetail(issue) {
|
|
947
1000
|
if (issue.kind === "required") return issue.emptyOrigin ? {
|
|
@@ -1071,6 +1124,28 @@ function isEmptyRichTextDoc(value) {
|
|
|
1071
1124
|
const first = content[0];
|
|
1072
1125
|
return first?.type === "paragraph" && (!Array.isArray(first.content) || first.content.length === 0);
|
|
1073
1126
|
}
|
|
1127
|
+
function normalizeLocationContract(value, mode) {
|
|
1128
|
+
const canonical = locationValueSchema.safeParse(value);
|
|
1129
|
+
if (canonical.success) return mode === "render" ? projectPublicLocation(canonical.data) : canonical.data;
|
|
1130
|
+
const publicValue = mode === "render" ? publicLocationSchema.safeParse(value) : null;
|
|
1131
|
+
return publicValue?.success ? publicValue.data : value;
|
|
1132
|
+
}
|
|
1133
|
+
function validateLocationGroupContract(plan, value, ctx) {
|
|
1134
|
+
if (isRenderLocationRecovery(value, ctx.mode)) return [];
|
|
1135
|
+
if (!(ctx.mode === "render" || ctx.mode === "render-source" ? z.union([locationValueSchema, publicLocationSchema]) : locationValueSchema).safeParse(value).success) return [issue(plan, "wrongType", { expected: "a valid location" })];
|
|
1136
|
+
if (ctx.mode === "storable" || ctx.mode === "strict") {
|
|
1137
|
+
const canonical = locationValueSchema.safeParse(value);
|
|
1138
|
+
if (canonical.success && decideLocationSave(canonical.data, "idle").kind === "blocked") return [issue(plan, "wrongType", { expected: "a confirmed address and pin" })];
|
|
1139
|
+
}
|
|
1140
|
+
return [];
|
|
1141
|
+
}
|
|
1142
|
+
function validateGroupBackgroundContract(plan, value, ctx) {
|
|
1143
|
+
if (plan.valueContract === "boxBackground" && !(ctx.mode === "render" ? runtimeBoxBackgroundSchema : boxBackgroundSchema).safeParse(value).success) return [issue(plan, "invalidBoxBackground")];
|
|
1144
|
+
return [];
|
|
1145
|
+
}
|
|
1146
|
+
function isRenderLocationRecovery(value, mode) {
|
|
1147
|
+
return (mode === "render" || mode === "render-source") && z.strictObject({ kind: z.literal("needs_place") }).safeParse(value).success;
|
|
1148
|
+
}
|
|
1074
1149
|
//#endregion
|
|
1075
1150
|
//#region ../blocks/src/system/manifest/fieldValidation/layoutGridRendering.ts
|
|
1076
1151
|
function invalidCoordinateIds(plan, items, itemIds) {
|
|
@@ -1116,7 +1191,7 @@ function projectLayoutGridPlansForRendering(plans, value, rootValues = layoutGri
|
|
|
1116
1191
|
if (!values) return value;
|
|
1117
1192
|
return plans.reduce((projected, plan) => {
|
|
1118
1193
|
const fieldValue = projected[plan.fieldId];
|
|
1119
|
-
const next = plan.kind === "group" ? projectLayoutGridPlansForRendering(allGroupChildPlans(plan), fieldValue, rootValues) : plan.kind === "repeater" && Array.isArray(fieldValue) ? projectGrid(plan, fieldValue, rootValues).map((item) => {
|
|
1194
|
+
const next = plan.kind === "group" && plan.valueContract === "location" ? recoverUnreadableLocation(fieldValue) : plan.kind === "group" ? projectLayoutGridPlansForRendering(allGroupChildPlans(plan), fieldValue, rootValues) : plan.kind === "repeater" && Array.isArray(fieldValue) ? projectGrid(plan, fieldValue, rootValues).map((item) => {
|
|
1120
1195
|
const row = layoutGridRecord(item);
|
|
1121
1196
|
return row ? projectLayoutGridPlansForRendering(resolveLayoutGridItemPlans(plan, row), row, rootValues) : item;
|
|
1122
1197
|
}) : fieldValue;
|
|
@@ -1126,6 +1201,11 @@ function projectLayoutGridPlansForRendering(plans, value, rootValues = layoutGri
|
|
|
1126
1201
|
};
|
|
1127
1202
|
}, values);
|
|
1128
1203
|
}
|
|
1204
|
+
/** Render recovery drops unreadable meaning rather than interpreting obsolete coordinates. */
|
|
1205
|
+
function recoverUnreadableLocation(value) {
|
|
1206
|
+
if (value == null || locationValueSchema.safeParse(value).success || publicLocationSchema.safeParse(value).success) return value;
|
|
1207
|
+
return { kind: "needs_place" };
|
|
1208
|
+
}
|
|
1129
1209
|
//#endregion
|
|
1130
1210
|
//#region ../blocks/src/system/manifest/validation.ts
|
|
1131
1211
|
const compiledManifestContentContract = Symbol("compiledManifestContentContract");
|
|
@@ -1182,7 +1262,7 @@ function unknownManifestFieldPaths(plans, value, parent = [], discriminator) {
|
|
|
1182
1262
|
}
|
|
1183
1263
|
function nestedUnknownManifestFieldPaths(plan, value, path) {
|
|
1184
1264
|
if (plan.kind === "group") {
|
|
1185
|
-
if (plan.valueContract
|
|
1265
|
+
if (plan.valueContract !== void 0) return [];
|
|
1186
1266
|
const selection = plan.childSelection;
|
|
1187
1267
|
return unknownManifestFieldPaths(allGroupChildPlans(plan), value, path, selection.kind === "discriminatedTabs" ? selection.activeTabField : void 0);
|
|
1188
1268
|
}
|
|
@@ -1218,7 +1298,7 @@ function admitTransportedRenderableManifestContent(contract, content) {
|
|
|
1218
1298
|
const parsed = state.renderSchema.safeParse(projected);
|
|
1219
1299
|
return parsed.success ? {
|
|
1220
1300
|
ok: true,
|
|
1221
|
-
value:
|
|
1301
|
+
value: parsed.data
|
|
1222
1302
|
} : {
|
|
1223
1303
|
ok: false,
|
|
1224
1304
|
error: zodAdmissionError(parsed.error)
|
|
@@ -1244,7 +1324,7 @@ function deriveContentZodFromPlans(plans, options, validateLayoutGrids = true) {
|
|
|
1244
1324
|
});
|
|
1245
1325
|
}
|
|
1246
1326
|
function deriveStrictContentZodFromPlans(plans, mode = "strict") {
|
|
1247
|
-
const shape = Object.fromEntries(plans.map((plan) => [plan.fieldId, fieldPlanToStrictObjectPropertyZod(plan, mode
|
|
1327
|
+
const shape = Object.fromEntries(plans.map((plan) => [plan.fieldId, fieldPlanToStrictObjectPropertyZod(plan, mode, mode === "strict" ? "validate" : "projected")]));
|
|
1248
1328
|
return z.object(shape).catchall(z.unknown()).passthrough().superRefine((values, ctx) => {
|
|
1249
1329
|
if (mode !== "strict") return;
|
|
1250
1330
|
validateLayoutGridPlans(plans, values).forEach((issue) => {
|
|
@@ -1321,7 +1401,7 @@ function visitRepeatedMedia(plan, value, path, visit) {
|
|
|
1321
1401
|
function collectNonPortablePlannedMedia(plans, content, parentPath, paths) {
|
|
1322
1402
|
visitPlannedMedia(plans, content, parentPath, (value, path, kind) => {
|
|
1323
1403
|
if (kind === "richText") collectNonPortableRichTextImages(value, path, paths);
|
|
1324
|
-
else if (
|
|
1404
|
+
else if (value !== null && value !== void 0 && !mediaSchema.safeParse(value).success) paths.add(formatFieldPath(path));
|
|
1325
1405
|
});
|
|
1326
1406
|
}
|
|
1327
1407
|
function collectNonPortableRichTextImages(value, path, paths) {
|
|
@@ -1336,10 +1416,6 @@ function isPlainRecord(value) {
|
|
|
1336
1416
|
function hasEnvironmentSpecificMediaField(value) {
|
|
1337
1417
|
return "assetId" in value || "storageBucket" in value || "storagePath" in value || "src" in value || "mimeType" in value || looksLikeUuid(value.id);
|
|
1338
1418
|
}
|
|
1339
|
-
function hasNonPortablePoster(value) {
|
|
1340
|
-
if (value.poster === void 0) return false;
|
|
1341
|
-
return !mediaPosterSchema.safeParse(value.poster).success;
|
|
1342
|
-
}
|
|
1343
1419
|
//#endregion
|
|
1344
1420
|
//#region src/rendering/helpers/siteCustomBlocks.ts
|
|
1345
1421
|
/**
|
|
@@ -1357,16 +1433,21 @@ function resolveSiteCustomBlocks(site) {
|
|
|
1357
1433
|
}
|
|
1358
1434
|
//#endregion
|
|
1359
1435
|
//#region src/rendering/helpers/pageRuntimeSupport.ts
|
|
1360
|
-
function buildSiteRenderSupport(site, mediaAssets) {
|
|
1436
|
+
function buildSiteRenderSupport(site, mediaAssets, locationMapSupport) {
|
|
1361
1437
|
const customBlocks = resolveSiteCustomBlocks(site);
|
|
1362
1438
|
return {
|
|
1363
1439
|
theme: site.theme,
|
|
1364
|
-
site:
|
|
1440
|
+
site: locationMapSupport ? {
|
|
1441
|
+
...site.site,
|
|
1442
|
+
venuesById: locationMapSupport.venuesById
|
|
1443
|
+
} : site.site,
|
|
1365
1444
|
sdkConfig: site.sdkConfig ?? null,
|
|
1366
1445
|
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
1367
1446
|
openingHours: site.businessDetails?.openingHours ?? null,
|
|
1368
1447
|
siteTerms: site.siteTerms,
|
|
1369
1448
|
mailingList: site.mailingList,
|
|
1449
|
+
businessLocationPermission: site.site.businessLocationPermission,
|
|
1450
|
+
businessAddressVisibility: site.businessDetails?.addressVisibility ?? "hidden",
|
|
1370
1451
|
bookingTimeZone: resolveBookingBusinessTimeZone(site.bookingTimeZone),
|
|
1371
1452
|
now: toUtcIsoDateTimeString((/* @__PURE__ */ new Date()).toISOString()),
|
|
1372
1453
|
...customBlocks ? { customBlocks } : {},
|
|
@@ -1377,6 +1458,16 @@ function buildSiteRenderSupport(site, mediaAssets) {
|
|
|
1377
1458
|
...mediaAssets ? { mediaAssets } : {}
|
|
1378
1459
|
};
|
|
1379
1460
|
}
|
|
1461
|
+
/** Only already-permitted projections reach the block runtime. */
|
|
1462
|
+
function siteLocationRenderContext(support) {
|
|
1463
|
+
return {
|
|
1464
|
+
businessLocationPermission: support.site.businessLocationPermission,
|
|
1465
|
+
businessAddressVisibility: support.businessAddressVisibility ?? "hidden",
|
|
1466
|
+
businessLocation: support.site.businessLocation ?? null,
|
|
1467
|
+
venuesById: support.site.venuesById ?? {},
|
|
1468
|
+
siteCountry: support.site.siteCountry ?? null
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1380
1471
|
function collectMediaAssetSidecar(mediaAssets) {
|
|
1381
1472
|
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
1382
1473
|
}
|
|
@@ -1539,4 +1630,4 @@ function requireSdkTheme(theme, siteId, reason = "cms_theme_absent") {
|
|
|
1539
1630
|
return theme;
|
|
1540
1631
|
}
|
|
1541
1632
|
//#endregion
|
|
1542
|
-
export {
|
|
1633
|
+
export { validateManifestDraft as _, buildSiteRenderSupport as a, readPublishedBlockPlacement as b, projectRenderablePageOutline as c, resolveSdkBlockManifest as d, sanitizeSdkRuntimeBlockContent as f, compileManifestContentContract as g, admitTransportedRenderableManifestContent as h, buildRenderablePageOutline as i, readInvalidBlockAdmission as l, resolveSiteCustomBlocks as m, MissingSdkThemeError as n, collectMediaAssetSidecar as o, siteLocationRenderContext as p, requireSdkTheme as r, invalidRenderableBlock as s, MISSING_SDK_THEME_ERROR_CODE as t, readSdkPreviewPublishedPlacement as u, admitLayoutGridForPlan as v, deriveFieldValidationPlan as y };
|
|
@@ -2146,62 +2146,6 @@ Do NOT include [data-block=...] in selectors - we add that automatically.
|
|
|
2146
2146
|
`;
|
|
2147
2147
|
}
|
|
2148
2148
|
//#endregion
|
|
2149
|
-
//#region src/manifest/constants.ts
|
|
2150
|
-
/**
|
|
2151
|
-
* Manifest Generator Constants
|
|
2152
|
-
*
|
|
2153
|
-
* Configuration constants for the HTML-to-manifest converter.
|
|
2154
|
-
*/
|
|
2155
|
-
/**
|
|
2156
|
-
* Default model for manifest generation.
|
|
2157
|
-
* Can be overridden via the RIVERBANK_MANIFEST_MODEL environment variable.
|
|
2158
|
-
*/
|
|
2159
|
-
const DEFAULT_MANIFEST_MODEL = process.env.RIVERBANK_MANIFEST_MODEL || "gpt-5-mini";
|
|
2160
|
-
/**
|
|
2161
|
-
* Model tiers for different complexity levels of tasks.
|
|
2162
|
-
* - fast: Simple tasks like segmentation, basic classification
|
|
2163
|
-
* - balanced: Medium tasks like block matching, content detection
|
|
2164
|
-
* - quality: Complex tasks like layout generation, CSS styling
|
|
2165
|
-
*/
|
|
2166
|
-
const MODEL_TIERS = {
|
|
2167
|
-
fast: "gpt-5-nano",
|
|
2168
|
-
balanced: "gpt-5-mini",
|
|
2169
|
-
quality: "gpt-5.2"
|
|
2170
|
-
};
|
|
2171
|
-
/**
|
|
2172
|
-
* Default model tier assignments for page converter passes.
|
|
2173
|
-
*/
|
|
2174
|
-
const PAGE_CONVERTER_PASS_DEFAULTS = {
|
|
2175
|
-
"page-pass1-segmentation-matching": "quality",
|
|
2176
|
-
"page-pass2-population": "balanced"
|
|
2177
|
-
};
|
|
2178
|
-
/**
|
|
2179
|
-
* Default model tier assignments for manifest converter passes.
|
|
2180
|
-
*/
|
|
2181
|
-
const MANIFEST_CONVERTER_PASS_DEFAULTS = {
|
|
2182
|
-
"manifest-pass1-fields": "balanced",
|
|
2183
|
-
"manifest-pass2-layout": "quality",
|
|
2184
|
-
"manifest-pass3a-classes": "quality",
|
|
2185
|
-
"manifest-pass3b-css": "quality"
|
|
2186
|
-
};
|
|
2187
|
-
/**
|
|
2188
|
-
* Resolve a model for a given pass using tier configuration.
|
|
2189
|
-
*
|
|
2190
|
-
* @param passId - The pass identifier (e.g., 'page-pass0-segmentation')
|
|
2191
|
-
* @param tierOverrides - Optional overrides for tier-to-model mapping
|
|
2192
|
-
* @param passOverrides - Optional per-pass tier overrides
|
|
2193
|
-
* @param globalModel - Optional global model override (bypasses tiers)
|
|
2194
|
-
* @returns The resolved model string
|
|
2195
|
-
*/
|
|
2196
|
-
function resolveModelForPass(passId, tierOverrides, passOverrides, globalModel) {
|
|
2197
|
-
if (globalModel) return globalModel;
|
|
2198
|
-
const tier = passOverrides?.[passId] ?? PAGE_CONVERTER_PASS_DEFAULTS[passId] ?? MANIFEST_CONVERTER_PASS_DEFAULTS[passId] ?? "balanced";
|
|
2199
|
-
return {
|
|
2200
|
-
...MODEL_TIERS,
|
|
2201
|
-
...tierOverrides
|
|
2202
|
-
}[tier];
|
|
2203
|
-
}
|
|
2204
|
-
//#endregion
|
|
2205
2149
|
//#region src/manifest/three-pass-converter.ts
|
|
2206
2150
|
/**
|
|
2207
2151
|
* Three-Pass HTML-to-Manifest Converter
|
|
@@ -3081,7 +3025,7 @@ function normalizeLlmLayoutToRuntimeNode(raw) {
|
|
|
3081
3025
|
return normalized;
|
|
3082
3026
|
}
|
|
3083
3027
|
async function convertHtmlToManifest(input, options) {
|
|
3084
|
-
const { ai, maxRetries = 3, model
|
|
3028
|
+
const { ai, maxRetries = 3, model, temperature = .2, onProgress, debugDir } = options;
|
|
3085
3029
|
const { html, css, theme, availableContentTypes } = input;
|
|
3086
3030
|
const debug = createDebugWriter(debugDir);
|
|
3087
3031
|
const ctx = {
|
|
@@ -3192,4 +3136,4 @@ function validateManifestOutput(data) {
|
|
|
3192
3136
|
};
|
|
3193
3137
|
}
|
|
3194
3138
|
//#endregion
|
|
3195
|
-
export {
|
|
3139
|
+
export { formatThemeSummaryForPrompt as _, collectValidationErrors as a, llmAtRuleSchema as c, llmMediaAtRuleSchema as d, llmNestedRuleSchema as f, normalizeLlmMediaAtRule as g, normalizeLlmCssRule as h, getJsonFromAiText as i, llmCustomBlockSchema as l, normalizeDeclarationsArrayToRecord as m, validateManifestOutput as n, formatValidationFeedback as o, llmThemePatchOpSchema as p, getJsonFromAi as r, htmlToManifestOutputSchema as s, convertHtmlToManifest as t, llmCustomCssRuleSchema as u, summarizeThemeForLLM as v };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as SDK_WORKFLOW_ENDPOINT_PATTERN, c as navigationLinkInputSchemaOptions, i as collectPortalLinkStats, l as footerModeSchema, o as SDK_WORKFLOW_ID_PATTERN, r as collectCartLinkStats, s as loaderFallbackScalarSchema, t as SUPPORTED_LOADER_ENDPOINTS, y as builtinTransformDefinitions } from "./prefetchBlockData-
|
|
1
|
+
import { Ai as NodeSchema, Ci as fieldSchema, Di as validateManifestLookField, Oi as sdkBlockPresentationShape, Si as builtInBlockKindsSchema, bi as blockCategoryEnum, ki as validateSdkBlockDeclaration, t as getBlockDefinition, xi as blockSectionDeclarationShape } from "./registry-BVfCqaCq.mjs";
|
|
2
|
+
import { a as SDK_WORKFLOW_ENDPOINT_PATTERN, c as navigationLinkInputSchemaOptions, i as collectPortalLinkStats, l as footerModeSchema, o as SDK_WORKFLOW_ID_PATTERN, r as collectCartLinkStats, s as loaderFallbackScalarSchema, t as SUPPORTED_LOADER_ENDPOINTS, y as builtinTransformDefinitions } from "./prefetchBlockData-CqJnokWJ.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
5
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-CdI7NvAW.mjs";
|
|
@@ -634,7 +634,10 @@ const blockFieldOptionsSchema = z.record(z.string().regex(/^(block\.|custom\.)[a
|
|
|
634
634
|
*
|
|
635
635
|
* Note: Explicit type annotation required due to recursive fieldSchema complexity.
|
|
636
636
|
*/
|
|
637
|
-
const blockFieldExtensionSchema = z.object({
|
|
637
|
+
const blockFieldExtensionSchema = z.object({
|
|
638
|
+
fields: fieldSchema.array().min(1, "At least one field is required"),
|
|
639
|
+
...blockSectionDeclarationShape
|
|
640
|
+
}).superRefine(validateManifestLookField).refine((data) => {
|
|
638
641
|
return data.fields.every((field) => {
|
|
639
642
|
if (!field.required) return true;
|
|
640
643
|
return field.defaultValue !== void 0;
|
|
@@ -748,66 +751,9 @@ const sdkCustomBlockSchema = z.object({
|
|
|
748
751
|
fields: fieldSchema.array().min(1, "Custom blocks must have at least one field"),
|
|
749
752
|
dataLoaders: sdkDataLoadersSchema,
|
|
750
753
|
layout: NodeSchema.optional(),
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
label: z.string().min(1).optional(),
|
|
755
|
-
description: z.string().min(1).optional(),
|
|
756
|
-
icon: z.string().min(1).optional()
|
|
757
|
-
})).optional(),
|
|
758
|
-
previewCustomize: previewCustomizeManifestCurationSchema.optional()
|
|
759
|
-
}).superRefine((data, ctx) => {
|
|
760
|
-
if (data.titleSource) {
|
|
761
|
-
const fields = data.fields;
|
|
762
|
-
(Array.isArray(data.titleSource) ? data.titleSource : [data.titleSource]).forEach((source, index) => {
|
|
763
|
-
if (!fields.some((field) => field.id === source)) ctx.addIssue({
|
|
764
|
-
code: z.ZodIssueCode.custom,
|
|
765
|
-
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
766
|
-
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
767
|
-
});
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
if (data.layout && data.variants) ctx.addIssue({
|
|
771
|
-
code: z.ZodIssueCode.custom,
|
|
772
|
-
message: "Custom block must define either `layout` or `variants`, not both",
|
|
773
|
-
path: ["variants"]
|
|
774
|
-
});
|
|
775
|
-
if (data.layout) {
|
|
776
|
-
const result = validateLayout(data.layout);
|
|
777
|
-
if (!result.valid) for (const error of result.errors) ctx.addIssue({
|
|
778
|
-
code: z.ZodIssueCode.custom,
|
|
779
|
-
message: error.message,
|
|
780
|
-
path: ["layout"]
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
if (data.variants) {
|
|
784
|
-
if (Object.keys(data.variants).length === 0) ctx.addIssue({
|
|
785
|
-
code: z.ZodIssueCode.custom,
|
|
786
|
-
message: "`variants` must contain at least one variant key",
|
|
787
|
-
path: ["variants"]
|
|
788
|
-
});
|
|
789
|
-
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(data.variants, data.defaultVariant)) ctx.addIssue({
|
|
790
|
-
code: z.ZodIssueCode.custom,
|
|
791
|
-
message: "`defaultVariant` must be a key present in `variants`",
|
|
792
|
-
path: ["defaultVariant"]
|
|
793
|
-
});
|
|
794
|
-
for (const [key, node] of Object.entries(data.variants)) {
|
|
795
|
-
const result = validateLayout(node);
|
|
796
|
-
if (!result.valid) for (const error of result.errors) ctx.addIssue({
|
|
797
|
-
code: z.ZodIssueCode.custom,
|
|
798
|
-
message: `${key}: ${error.message}`,
|
|
799
|
-
path: ["variants", key]
|
|
800
|
-
});
|
|
801
|
-
}
|
|
802
|
-
if (data.variantOptions) {
|
|
803
|
-
for (const key of Object.keys(data.variantOptions)) if (!Object.prototype.hasOwnProperty.call(data.variants, key)) ctx.addIssue({
|
|
804
|
-
code: z.ZodIssueCode.custom,
|
|
805
|
-
message: "`variantOptions` key must exist in `variants`",
|
|
806
|
-
path: ["variantOptions", key]
|
|
807
|
-
});
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
});
|
|
754
|
+
...sdkBlockPresentationShape,
|
|
755
|
+
...blockSectionDeclarationShape
|
|
756
|
+
}).superRefine(validateManifestLookField).superRefine(validateSdkBlockDeclaration).superRefine(validateCustomBlockPresentation);
|
|
811
757
|
/**
|
|
812
758
|
* Schema for the complete SDK site configuration.
|
|
813
759
|
*
|
|
@@ -868,6 +814,7 @@ const sdkWorkflowsSchema = z.array(sdkWorkflowConfigSchema).max(50, "Maximum 50
|
|
|
868
814
|
}, { message: "Workflow IDs must be unique" }).optional();
|
|
869
815
|
const riverbankSiteConfigSchema = z.object({
|
|
870
816
|
siteId: z.string().uuid(),
|
|
817
|
+
builtInBlocks: builtInBlockKindsSchema.optional(),
|
|
871
818
|
previewUrl: sdkSiteUrlSchema.optional(),
|
|
872
819
|
liveUrl: sdkSiteUrlSchema.optional(),
|
|
873
820
|
theme: sdkThemeConfigSchema.optional(),
|
|
@@ -888,5 +835,17 @@ const riverbankSiteConfigSchema = z.object({
|
|
|
888
835
|
activeTheme: activeThemeSchema,
|
|
889
836
|
dashboard: dashboardConfigSchema.optional()
|
|
890
837
|
}).strict();
|
|
838
|
+
function validateCustomBlockPresentation(data, ctx) {
|
|
839
|
+
if (data.layout) addLayoutIssues(data.layout, ["layout"], "", ctx);
|
|
840
|
+
if (!data.variants) return;
|
|
841
|
+
Object.entries(data.variants).forEach(([key, node]) => addLayoutIssues(node, ["variants", key], `${key}: `, ctx));
|
|
842
|
+
}
|
|
843
|
+
function addLayoutIssues(node, path, prefix, ctx) {
|
|
844
|
+
validateLayout(node).errors.forEach((error) => ctx.addIssue({
|
|
845
|
+
code: z.ZodIssueCode.custom,
|
|
846
|
+
message: `${prefix}${error.message}`,
|
|
847
|
+
path
|
|
848
|
+
}));
|
|
849
|
+
}
|
|
891
850
|
//#endregion
|
|
892
851
|
export { templateBlockConfigSchema as $, sectionOptionsSchema as A, dashboardNavigationConfigSchema as B, sdkWorkflowConfigSchema as C, sdkWorkflowTriggerSchema as D, sdkWorkflowIdSchema as E, validateFieldIdConflicts as F, blockConfigSchema as G, validateLayoutNodeTypes as H, dashboardConfigSchema as I, entryConfigSchema as J, contentConfigSchema as K, dashboardNavVisibilityBaseSchema as L, siteStyleConfigSchema as M, syncConfigSchema as N, sdkWorkflowsSchema as O, themeSourceSchema as P, siteSettingsConfigSchema as Q, dashboardNavVisibilityRolesSchema as R, sdkThemePaletteSchema as S, sdkWorkflowEndpointSchema as T, validateTransformIds as U, validateLayout as V, bindingSourceSchema as W, navigationMenuConfigSchema as X, navigationItemConfigSchema as Y, pageConfigSchema as Z, sdkCustomBlockSchema as _, blockFieldOptionsSchema as a, sdkSiteUrlSchema as b, containerOptionsSchema as c, layoutConfigSchema as d, templateConfigSchema as et, loaderParamBindingSchema as f, sdkConfigLoaderSchema as g, riverbankSiteConfigSchema as h, blockFieldExtensionsSchema as i, sectionSpacingSchema as j, sectionBackgroundSchema as k, deployConfigSchema as l, loaderWhenValueSchema as m, blockFieldConfigSchema as n, describeInvalidTemplateBindingMetaPath as nt, containerAlignmentSchema as o, loaderParamValueSchema as p, contentTypeConfigSchema as q, blockFieldExtensionSchema as r, containerMaxWidthSchema as s, activeThemeSchema as t, TEMPLATE_BINDING_META_PATHS as tt, fieldSelectOptionSchema as u, sdkDataLoadersSchema as v, sdkWorkflowConfirmationSchema as w, sdkThemeConfigSchema as x, sdkLoaderEndpointSchema as y, dashboardNavVisibilitySchema as z };
|