@riverbankcms/sdk 0.162.0 → 0.164.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +12 -1
- package/dist/_dts/{BlocksIslandsHydrator-PZUoA872.d.ts → BlocksIslandsHydrator-CubPwupc.d.ts} +1 -1
- package/dist/_dts/{Page-CdQS6C7i.d.ts → Page-CDzsagB2.d.ts} +15 -12
- package/dist/_dts/{SdkPreviewMode-CNGO-5f1.d.ts → SdkPreviewMode-CPRQbRCI.d.ts} +2 -3
- package/dist/_dts/{client-DGa53rjL.d.ts → client-CbeYTSry.d.ts} +13 -41
- package/dist/_dts/{content-types-K9R7P-KF.d.ts → content-types--uYRIcIF.d.ts} +2 -2
- package/dist/_dts/{contracts-CyBaPaIq.d.ts → contracts-DJQYAOsv.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-B6jmKmon.d.ts → footerPageOutline-CKkhBwgJ.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-iemoR3AN.d.ts → generatePageMetadata--qd7NCIA.d.ts} +2 -2
- package/dist/_dts/{index-DEu85xBt.d.ts → index-BZE-1azr.d.ts} +1 -1
- package/dist/_dts/{index-Wm62sXf2.d.ts → index-BpEbwDM7.d.ts} +4 -4
- package/dist/_dts/index-CXsnaCGe.d.ts +10 -0
- package/dist/_dts/{index-8CN0Nd-Z.d.ts → index-CjdIn9-_.d.ts} +2 -2
- package/dist/_dts/{index-BtnsA14K.d.ts → index-DYQFmf--.d.ts} +4 -3
- package/dist/_dts/{index-Dbd0Sn0G.d.ts → index-D_pQO-AS.d.ts} +21723 -21361
- package/dist/_dts/{index-Du1IRglc.d.ts → index-DriYVLfT.d.ts} +2 -2
- package/dist/_dts/{index-DI2yaSPY.d.ts → index-JS8WYgD3.d.ts} +31248 -30975
- package/dist/_dts/{index-Jlcq6w69.d.ts → index-wegfy7lf.d.ts} +3 -3
- package/dist/_dts/{loadContent-BPfAAZDW.d.ts → loadContent-DUi94Qfk.d.ts} +15 -30
- package/dist/_dts/{resolvePageContent-DWbrtKf8.d.ts → resolvePageContent-JDE0ry6T.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +3 -4
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +6 -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/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +13 -7
- 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/spam-protection/index.d.ts +32 -52
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-ClZ-BQL_.d.ts → types-DiciZDrk.d.ts} +3 -3
- package/dist/_dts/{types-CVv2H4AT.d.ts → types-DubJnBnI.d.ts} +7 -7
- package/dist/_dts/{types-CfNG5koF.d.ts → types-W40f2olO.d.ts} +3 -2
- package/dist/_dts/{validation-BJ6Lf_Dr.d.ts → validation-BF4_zNkR.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-COqlgWYU.mjs → BlocksIslandsHydrator-64hFxF02.mjs} +20 -20
- package/dist/client/{BookingMailingListNote-CFYPDEHH.mjs → BookingMailingListNote-CSQyFm9J.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-COBVxgHb.mjs → CalendarNavigationChevron-Bvkx8Z7Y.mjs} +6 -6
- package/dist/client/{CheckboxChoice-C7X9dJ8A.mjs → CheckboxChoice-3PhxDxgR.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CvT0E9AR.mjs → DemoBookingPortalAccess-pt2xXBQp.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-EBOBN5dT.mjs → DemoPortalSignInLink-Qw780EfW.mjs} +1 -1
- package/dist/client/{EventCalendar.client-U6pKcntV.mjs → EventCalendar.client-DWoboRW5.mjs} +9 -9
- package/dist/client/{EventCombined.client-CNzwEHws.mjs → EventCombined.client-C98ucpcP.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B9yAWV_k.mjs → EventEmbeddedCheckoutStep-DHRlFfkp.mjs} +2 -1
- package/dist/client/{EventItem-M5rpaHxi.mjs → EventItem-hrSyTApW.mjs} +102 -22
- package/dist/client/{EventListWeekNavigation-D4ieBLDY.mjs → EventListWeekNavigation-C3t7H13W.mjs} +1 -1
- package/dist/client/{EventListing.client-B8F40Rmn.mjs → EventListing.client-Cp11sBX_.mjs} +3 -3
- package/dist/client/{EventListing.view-k4lhuCn5.mjs → EventListing.view-Dd5QHIAf.mjs} +7 -56
- package/dist/client/{EventRegistrationPayment-C3g8_Hqb.mjs → EventRegistrationPayment-ByT88VHR.mjs} +18 -22
- package/dist/client/{LocationMapActions-CAjt7qVo.mjs → LocationMapActions-BsepG5Vv.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-_aIK2ojv.mjs → MapDrawingSvg-R4JMT4yd.mjs} +1 -1
- package/dist/client/{Page-DJBIQBOw.mjs → Page-Dub71o3c.mjs} +956 -378
- package/dist/client/ProtectedSubmitButton-DGbgGvdh.mjs +14 -0
- package/dist/client/SpamProtectionWidget-CRsKTQV-.mjs +139 -0
- package/dist/client/{StepIndicator-CFacB1z6.mjs → StepIndicator-Bp7MyutT.mjs} +2 -2
- package/dist/client/{TabBarFragment-BLsfQskO.mjs → TabBarFragment-C4WJyybx.mjs} +1 -1
- package/dist/client/{ThemedButton-BWsDgjMC.mjs → ThemedButton-BGVwNwE-.mjs} +2 -898
- package/dist/client/{accordion-CtO2XF7M.mjs → accordion-vCG_JC5t.mjs} +1 -1
- package/dist/client/altchaProtection-BWchRM3v.mjs +12 -0
- package/dist/client/{booking-form.client-RICCQ0h2.mjs → booking-form.client-CHTbcZJM.mjs} +23 -56
- package/dist/client/{bookingForm-SvjLPx8i.mjs → bookingForm-BxbUbzUr.mjs} +4 -4
- package/dist/client/bookings.mjs +23 -32
- package/dist/client/{carousel-BR-zCD3O.mjs → carousel-FM1mkkL0.mjs} +2 -2
- package/dist/client/{carousel.client-CEWtoZd3.mjs → carousel.client-ChoLiWwD.mjs} +1 -1
- package/dist/client/{cart-C6YpKbZZ.mjs → cart-BDFhbh9j.mjs} +3 -3
- package/dist/client/{cart.client-dC938WrX.mjs → cart.client-x3HOke6T.mjs} +1 -1
- package/dist/client/{checkout-Dy9RlREI.mjs → checkout-BibhwnTd.mjs} +3 -3
- package/dist/client/{checkout.client-CefG0d2F.mjs → checkout.client-CE4jUi0G.mjs} +1 -1
- package/dist/client/client.mjs +216 -109
- package/dist/client/{context-BFwxgZpB.mjs → context-BNAM7NsW.mjs} +17 -3
- package/dist/client/{cta-DtA42Xio.mjs → cta-ChiN1Vgg.mjs} +1 -1
- package/dist/client/{dateFormatting-yP1B7F0O.mjs → dateFormatting-QwBSo0hK.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-WOiT5Ryi.mjs → demoPortalMagicLink-NwKJk6gn.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dh8c_Lq-.mjs → enhanceHeaderSection-D4zqEBDl.mjs} +3 -3
- package/dist/client/{event-details.client-BFgsLqTj.mjs → event-details.client-jFyFjOIC.mjs} +1 -1
- package/dist/client/{event-registration.client-BaXZ1-Ky.mjs → event-registration.client-BK_jVv3R.mjs} +37 -55
- package/dist/client/{eventCalendar-COLwF80U.mjs → eventCalendar-DSkzejQh.mjs} +4 -4
- package/dist/client/{eventCombined-D3Ltwu03.mjs → eventCombined-BG-BEaYh.mjs} +4 -4
- package/dist/client/{eventDetails-CBrkimXu.mjs → eventDetails-BhIwXAKe.mjs} +2 -2
- package/dist/client/{eventListing-CedKVA1S.mjs → eventListing-DQtyO1Xj.mjs} +4 -4
- package/dist/client/{eventRegistration-DkQQfR1b.mjs → eventRegistration-DRTz8X0M.mjs} +4 -4
- package/dist/client/{form-XFy9uXSJ.mjs → form-GXqjObPC.mjs} +3 -3
- package/dist/client/{form.client-B0iancFK.mjs → form.client-CoKNba2e.mjs} +33 -24
- package/dist/client/{form.parts-DMbolu9Y.mjs → form.parts-magB_epJ.mjs} +6 -5
- package/dist/client/{formatDate-Jm5MQOCA.mjs → formatDate-BiloOyjS.mjs} +1 -1
- package/dist/client/gifting/client.mjs +4 -3
- package/dist/client/{headerSection-WjlECjtV.mjs → headerSection-BMQCPHT3.mjs} +2 -2
- package/dist/client/mediaAssets-BX-vWwQc.mjs +43 -0
- package/dist/client/{mediaContext-CNzWmoA4.mjs → mediaContext-CdqGYlWl.mjs} +1 -1
- package/dist/client/{newsletter-form.client-D-XwJTjN.mjs → newsletter-form.client-8orCez1z.mjs} +99 -84
- package/dist/client/{newsletter-form.parts-H92f30y0.mjs → newsletter-form.parts-D8NgHY_F.mjs} +11 -7
- package/dist/client/{newsletterForm-DMuxzu6I.mjs → newsletterForm-BhBNsS3n.mjs} +3 -3
- package/dist/client/{noop-B3RNPVrt.mjs → noop-C2vZse15.mjs} +3 -3
- package/dist/client/portal/client.mjs +13 -12
- package/dist/client/{product-detail.client-B3HuuykE.mjs → product-detail.client-CQ0k0fbH.mjs} +1 -1
- package/dist/client/{product-list.client-CzsDrHQO.mjs → product-list.client-Xlr1P0x9.mjs} +1 -1
- package/dist/client/{productDetail-CbBUVWgd.mjs → productDetail-BsCao6X4.mjs} +3 -3
- package/dist/client/{productList-vqOKH2mh.mjs → productList-Cc-PmbEe.mjs} +3 -3
- package/dist/client/{propsDecoder-CkSUep5a.mjs → propsDecoder-DikkDJ9x.mjs} +3 -3
- package/dist/client/protection-C0PoH1lT.mjs +104 -0
- package/dist/client/purchase-BMsWpx8y.mjs +894 -0
- package/dist/client/{registry.server-cZ24QwtW.mjs → registry.server-BpLZo3bC.mjs} +27 -24
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -19
- package/dist/client/{richText-coerce-DDcCKvBJ.mjs → richText-coerce-WuMYrBm3.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DYBioANh.mjs → routeIslandApiConfig-DNx6b07x.mjs} +1 -1
- package/dist/client/{schema-DNHLlze-.mjs → schema-DMUkBtIO.mjs} +3517 -3147
- package/dist/client/{shop-CF0dhnfH.mjs → shop-DyXtB5TD.mjs} +3 -3
- package/dist/client/{shop-commerce-store-Ba8zPlIg.mjs → shop-commerce-store-CbBsS1kD.mjs} +1 -1
- package/dist/client/{shop-commerce-DQznNBEo.mjs → shop-commerce-xjWH7-Ym.mjs} +11 -11
- package/dist/client/{shop.client-DqfYoqWH.mjs → shop.client-QOKqQPgK.mjs} +12 -12
- package/dist/client/{shop.interactive-CreQ0I7i.mjs → shop.interactive-BQdm441g.mjs} +62 -34
- package/dist/client/{shopShared-D-yh-P7g.mjs → shopShared-CyW6MU48.mjs} +2 -2
- package/dist/client/{site-styles-B9HgmY07.mjs → site-styles-BLHYJ8S7.mjs} +755 -35
- package/dist/client/spam-protection.mjs +4 -69
- package/dist/client/{timetableModel-DCdVErTJ.mjs → timetableModel-BgdkhRuA.mjs} +10 -10
- package/dist/client/{useAvailableSlots-Cvgdp2DH.mjs → useAvailableSlots-wmdo6uZ8.mjs} +3 -3
- package/dist/client/{useBookingNowIso-DrTnGNzD.mjs → useBookingNowIso-CUExAee1.mjs} +1 -1
- package/dist/client/{useDiscountApply-CULjnXGl.mjs → useDiscountApply-BRM-OoTN.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Gn_m7e0o.mjs → useDiscountCodeUi-BEIvL31G.mjs} +1 -1
- package/dist/client/{useEventPagination-CsysCF22.mjs → useEventPagination-Dk3g64we.mjs} +6 -6
- package/dist/client/{view-DMyTchi7.mjs → view-BnaOmrap.mjs} +4 -4
- package/dist/client/{view-BpBjo9Te.mjs → view-vhKGFfC3.mjs} +7 -7
- package/dist/client/{wizardSteps-BO2OmMO9.mjs → wizardSteps-xqU4q63H.mjs} +14 -14
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/chrome.css +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-DLsSmZbO.mjs → EventEmbeddedCheckoutStep-43wIAWr4.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-ChrW9VEo.mjs → PreviewEditorSidebar-C3AQVxQt.mjs} +74 -72
- package/dist/preview-next/client/{PreviewEditorUI-VaHvYtrA.mjs → PreviewEditorUI-C-1zDCR_.mjs} +151 -126
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DWwktlWs.mjs → SdkPreviewModeRuntime-B47yHFL0.mjs} +371 -1433
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bz7jR6nl.mjs → SdkPreviewModeRuntime-C6Rhm2NQ.mjs} +1 -1
- package/dist/preview-next/client/{ThemedButton-CHKOWXxl.mjs → ThemedButton-g7NPrsGp.mjs} +462 -110
- package/dist/preview-next/client/{previewAuthStore-C0VUwEHz.mjs → previewAuthStore-By_zfrS5.mjs} +164988 -163471
- package/dist/preview-next/client/{previewChromeSurface-Dhyx2YrS.mjs → previewChromeSurface-Cjwxv90x.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-C2GWOCyj.mjs → sdk-runtime-BG2HYvQj.mjs} +1 -1
- package/dist/preview-next/client/{siteStyleAccess-DHyzUpv4.mjs → siteStyleAccess-BiSyYyyr.mjs} +10854 -9509
- package/dist/preview-next/client/{spinner-BeR2S8oG.mjs → spinner-DnWpeDp2.mjs} +1 -1
- package/dist/preview-next/edit-map.css +37 -0
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/maplibre-gl.css +1 -0
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CkrFDMrl.mjs → route-contract-D5tHZEz5.mjs} +40 -42
- package/dist/preview-next/upload-structure.css +18 -0
- package/dist/server/{Block.shared-DxvNGDig.mjs → Block.shared-Iy7g11iP.mjs} +17 -16
- package/dist/server/{bindings-BuhKvYkE.mjs → bindings-BVJGgUT0.mjs} +2 -2
- package/dist/server/{client-BobW6DOz.mjs → client-CiKaE8ms.mjs} +215 -109
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{effectiveNavLinkStyle-B-MKSt0p.mjs → effectiveNavLinkStyle-EDSdd_oK.mjs} +725 -18
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-CCG_3mbY.mjs → loadContent-BuintpdO.mjs} +6 -4
- package/dist/server/loadPage-BwjncpJf.mjs +2 -0
- package/dist/server/{loadPage-jntGoMrf.mjs → loadPage-Dk4wea8M.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-BBOlgn4Z.mjs → overrideResolution-BDiQWM7D.mjs} +1 -1
- package/dist/server/{overrides-DByQwIyW.mjs → overrides-DVemf-GV.mjs} +231 -114
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-DrwcTk2t.mjs → prebuild-DubLNgRH.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-LfgxSJYE.mjs → prefetchBlockData-Bnbwoe5n.mjs} +53 -28
- package/dist/server/{publicProducts-8A3T5v4M.mjs → publicProducts-D3Fc5TKk.mjs} +85 -70
- package/dist/server/{registry-Digv02oV.mjs → registry-zjd1P2Dl.mjs} +127 -59
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-C23t8-77.mjs → resolveBlockData-CZJ--nH6.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-BiqpDRwB.mjs → schema-BlTWmTSl.mjs} +4163 -3793
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-DrkprQPL.mjs → site-styles-yHytcXIB.mjs} +33 -20
- package/dist/server/{siteChromeOverlayClearance-BmKKkkbh.mjs → siteChromeOverlayClearance-D0uCNZ7E.mjs} +159 -107
- package/dist/server/{src-08GY1njw.mjs → src-cbbK3Bho.mjs} +547 -147
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-CSd_Vusz.mjs → themeAdmission-BdY8lP-K.mjs} +3 -2
- package/dist/server/{validation-DdUTkBOZ.mjs → validation-CGH-Xs4E.mjs} +2 -2
- package/dist/server/{version-DdIOqIDe.mjs → version-DoOG6F13.mjs} +1 -1
- package/dist/styles/index.css +399 -112
- package/package.json +2 -3
- package/dist/_dts/AltchaWidget-COIYJ7DF.d.ts +0 -33
- package/dist/_dts/index-C39F9KaB.d.ts +0 -77
- package/dist/client/mediaAssets-BkoW_PEn.mjs +0 -16
- package/dist/client/src-BNZzXgWu.mjs +0 -102
- package/dist/server/loadPage-Bk9HDh9K.mjs +0 -2
|
@@ -1,162 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-BC0V7iAR.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { $i as bookingConsentCarrierSchema, $s as unsafeAsEditorBlockId, Ai as buildThemeRuntime, At as EditorProvider, B as useRetentionTicks, Ba as admitReadinessFacts, Bi as resolveLocationMapLocation, Bn as clientComponentRegistry, Bs as buildMailingListSignupBlockSourceRef, Ca as testimonialsHeadingFragment, Cn as decodePublicProductCategorySelectorQuery, Cr as Dialog, Da as heroCopyFragment, Dn as MediaEditorContextProvider, Dr as DialogHeader, Ea as ctaRowFragment, Er as DialogFooter, Fa as arrangementHooksFromContent, Fi as chosenString, Fn as ApiRequestError, Fs as siblingPath, G as EditorWriteSurface, Ga as isObjectRecord, Gs as readEditorBlockVersionsFromPlacement, Ha as pageTemplateFromEntry, Hi as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, Hn as BlockApiProvider, Hs as parseMailingListPlacementTargeting, Ht as useEditorUiStoreInstance, I as createEditorApiClientFactory, Ia as blockLookFromContent, Ii as buildThemeDataAttrs, Ja as parseGeneratedIconAssetId, Ji as Text$1, Js as parseEditLeaseScope, Jt as planLinkedSaveHandoverRetention, Ka as isRecord$5, Ki as renderInlineText, Ks as readPublishedBlockPlacement, La as readBlockComposition, Li as themeRuntimeScopeProps, Ln as API_ENDPOINTS, Ls as cn, Ma as bodyCopyFragment, Mi as mergeContentWithBlockStyleOverrides, Mt as createRoutingHelpers, Na as runTransforms, Ni as getDefaultComponentRegistry, Nt as createSnapshotFromPageRecord, Or as DialogTitle, Pa as defineFragment, Pi as projectRecurringSchedule, Ps as getAtPath, Qa as isInlineTextEmpty, Qi as publicEventsArraySchema, Qt as resolveRenderedValues, Ra as readRuntimeNow, Ri as buildLoadedOfferingsPreviewListing, Sa as testimonialsCarouselFragment, Sn as blocksKeys, Sr as TabsTrigger, Ss as sectionTransitionVariantForBoundaryOptionId, Ta as heroCtaRowFragment, Tn as deriveLaunchReadiness, Tr as DialogDescription, U as EditLeaseDiscardedNotice, Ua as unavailableReadinessFact, Ui as offeringsListingFor, Us as sameMailingListPlacementTargeting, Ut as useOptionalEditorUiStoreInstance, V as VIEWING_PARTICIPATION, Va as loadedReadinessFact, Vi as buildAppointmentServicesView, Vn as ImageResolveContextProvider, Vs as parseFooterModuleId, Vt as useEditorUiStore, W as EditLeaseModal, Ws as NO_BLOCK_VERSIONS, Xa as coerceInlineTextWithFallback, Xi as defaultTransforms, Xt as renderSourceFor, Ya as parseGeneratedIconSetId, Yi as RichText$1, Yt as remoteDraftValues, Za as inlineTextToPlainText, Zi as calendarWindowQuerySchema, Zt as renderedFieldChanges, _a as faqHeadingFragment, a as usePreviewAuth, aa as LINKED_CONTENT_ENTRY_META_KEY, ac as toUtcIsoDateTimeString, ba as formEmbedFragment, bi as compileManifestContentContract, br as TabsContent, bs as sectionTransitionFamilies, c as SessionJournalHost, ci as resolveSdkFooterMode, da as getCurrentResolveImageUrlContext, ds as formatSiteChromeBackgroundTokenLabel, ea as resolveEntryRouteTarget, en as unsafeAsLinkedContentEntryId, eo as bindingSchema, f as PreviewRichTextEditor, fa as setContextResolveImageUrlContext, fi as getBlockDefinition, ga as faqAccordionFragment, gi as SITE_CHROME_VISIBLE_HEADER_SELECTOR, h as PREVIEW_EDITABLE_OUTLINE, ha as cardFragment, hi as publicRouteCandidatesSchema, i as renewPreviewSession, ii as isSupportedLoaderEndpoint, in as isEdited, ja as ctaButton, jt as useEditor, kn as useApiMediaUploader, kt as revealEditorElement, lr as Callout, m as PreviewTextEditor, ma as headingFragment, mi as offeringsPreviewBlockDefinition, n as initPreviewAuth, na as resolveRouteTarget, nn as editorAdmissionNotice, o as usePreviewToken, oa as coerceLinkedContentEntriesPayload, oc as assertNever$1, oi as ThemeScopeCore, p as PreviewInlineTextEditor, pa as richTextFragment, pi as normalizeBlockContent, qa as parseBlockIconValue, qi as logger, qs as selectedContentVersionId, qt as activeLinkedSaveHandover, r as registerPreviewRenewalFetcher, rn as baselineRevisionOf, s as SiteAdmissionObserver, sa as getLinkedContentEntryMeta, sn as canEditorWrite, t as createGuardedPreviewApiClient, ta as resolvePageRouteTarget, ti as Button, u as renderSiteChromeBlock, ua as buildResolveImageUrlContext, ui as makeDefaultBlockComponent, ur as CalloutDescription, v as EditableBlockProvider, va as blogFeaturedPostFragment, wa as ctaCopyFragment, wn as DEFAULT_LAUNCH_READINESS_INPUT, wr as DialogContent, x as useEntryEditorController, xa as formCopyFragment, xi as validateManifestDraft, xr as TabsList, xs as sectionTransitionFamilyForBoundaryOptionId, y as EntryControllerProvider, ya as singleButtonFragment, yr as Tabs, ys as defaultSectionTransitionVariantForFamily, z as createPageSurfaceEditorServices, za as resolveDateRuntimeContext, zi as normalizeLocationMapSource, zn as unwrapResponse } from "./previewAuthStore-By_zfrS5.mjs";
|
|
4
|
+
import { Hn as defaultThemeTokens, Mr as asDesignBlockId, Sr as indexRenderableMediaAssets, U as parseThemeForPersistence, br as buildRenderableMediaAssetIndex, rn as textColorStyle, un as parseSurfaceTree, xr as renderableMediaAssetSchema$1, zr as assertNever$2 } from "./ThemedButton-g7NPrsGp.mjs";
|
|
5
5
|
import { Ft as parseLocationValue, H as GripVertical, It as projectPublicLocation, Lt as publicLocationSchema, _ as RotateCcw, kt as decideLocationSourcePermission, lt as ChevronRight, n as X, ut as ChevronLeft } from "./lucide-react-CA9cpo0P.mjs";
|
|
6
|
-
import { $ as
|
|
6
|
+
import { $t as SITE_CHROME_CLASS_NAMES, A as resolveRuntimePreviewSourceForTheme, B as SiteChromeCustomizeProvider, Bt as CustomizeBackgroundColorPicker, D as PreviewThemeOverlayProvider, Dt as cyclePageDesignBlockLook, E as PreviewCompiledThemeProvider, Et as CustomizeBackgroundControlRows, F as entryFieldRebindingProjection, Gt as Toaster, Ht as PreviewRenderPlanProjection, I as previewProjectionsFromAiOverlays, L as mergeResolvedDataContext, M as applyPreviewRuntimeContentProjections, Mt as lookPositionLabel, N as applyPreviewStructureProjections, Nt as lookTilePosition, O as usePreviewCompiledTheme, Ot as pageDesignLookPosition, P as blockHasPreviewContentFieldProjection, R as renderedBlockContent, S as LookCyclePill, U as PreviewDesignCoordinatorProvider, Ut as usePreviewBlockCustomizeSelectionOptional, V as useSiteChromeCustomizeOptional, Vt as PreviewBlockCustomizeSelectionProvider, _ as useBlockCustomizeControls, a as sanitizeDashboardPath, an as selectBlockContent, b as ArrangementModeSwitchPill, bt as PreviewPageDesignEditorStateProvider, cn as joinSlotKey, en as SiteDocumentLayout, h as SiteFontStorageProvider, i as resolvePreviewDashboardSetupHandoff, in as planArrangementContent, j as applyPreviewContentFieldProjections, k as pageDesignRuntimeProjectionFromSource, ln as renderedJoinLayout, n as resolveSiteStyleAccess, nn as ResponsiveScope, on as toEditorPresentationPage, r as buildPreviewDashboardSetupUrl, rn as buildPageRenderPlan, s as resolvePreviewSetupBannerModel, sn as composePageJoins, t as canInspectSiteStyle, tn as planSiteDocument, un as retargetJoinsAcrossOmissions, w as useArrangementToolbar, xt as usePreviewPageDesignEditorState, y as ArrangementLookPill, z as withRenderedContentEntry } from "./siteStyleAccess-BiSyYyyr.mjs";
|
|
7
7
|
import { n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-QtSG2Bl-.mjs";
|
|
8
|
-
import { a as resolvePreviewChromeSurface, i as getPreviewChromeSurfaceDataProps, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as PREVIEW_KEEP_ALIVE_INTERVAL_MS, s as PREVIEW_KEEP_ALIVE_JITTER_RATIO, u as FixedBottomSurface } from "./previewChromeSurface-
|
|
8
|
+
import { a as resolvePreviewChromeSurface, i as getPreviewChromeSurfaceDataProps, n as PREVIEW_CHROME_THEME_CLASS_NAME, o as PREVIEW_KEEP_ALIVE_INTERVAL_MS, s as PREVIEW_KEEP_ALIVE_JITTER_RATIO, u as FixedBottomSurface } from "./previewChromeSurface-Cjwxv90x.mjs";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
|
-
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState
|
|
10
|
+
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
11
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { useQueryClient } from "@tanstack/react-query";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
import { createPortal } from "react-dom";
|
|
15
15
|
import { useRouter } from "next/navigation.js";
|
|
16
|
-
//#region ../ui/src/resizable-split-pane.tsx
|
|
17
|
-
/**
|
|
18
|
-
* Resizable split pane component
|
|
19
|
-
*
|
|
20
|
-
* Two-panel layout with draggable resize handle.
|
|
21
|
-
* On mobile (<1024px), switches to tabs.
|
|
22
|
-
*/
|
|
23
|
-
function ResizableSplitPane({ left, right, defaultSplit = 40, minLeftWidth = 300, minRightWidth = 400, leftLabel = "Editor", rightLabel = "Preview", defaultTab = "left", className, leftPaneClassName, rightPaneClassName, onSplitChange, splitPercent: controlledSplitPercent }) {
|
|
24
|
-
const [internalSplitPercent, setInternalSplitPercent] = useState(defaultSplit);
|
|
25
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
26
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
27
|
-
const containerRef = useRef(null);
|
|
28
|
-
const splitPercent = controlledSplitPercent ?? internalSplitPercent;
|
|
29
|
-
const setSplitPercent = useCallback((value) => {
|
|
30
|
-
setInternalSplitPercent(value);
|
|
31
|
-
onSplitChange?.(value);
|
|
32
|
-
}, [onSplitChange]);
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
const checkMobile = () => {
|
|
35
|
-
setIsMobile(window.innerWidth < 1024);
|
|
36
|
-
};
|
|
37
|
-
checkMobile();
|
|
38
|
-
window.addEventListener("resize", checkMobile);
|
|
39
|
-
return () => window.removeEventListener("resize", checkMobile);
|
|
40
|
-
}, []);
|
|
41
|
-
const handleMouseDown = useCallback((e) => {
|
|
42
|
-
e.preventDefault();
|
|
43
|
-
setIsDragging(true);
|
|
44
|
-
}, []);
|
|
45
|
-
const handleMouseMove = useCallback((e) => {
|
|
46
|
-
if (!isDragging || !containerRef.current) return;
|
|
47
|
-
const containerRect = containerRef.current.getBoundingClientRect();
|
|
48
|
-
const containerWidth = containerRect.width;
|
|
49
|
-
let newSplitPercent = (e.clientX - containerRect.left) / containerWidth * 100;
|
|
50
|
-
const minLeftPercent = minLeftWidth / containerWidth * 100;
|
|
51
|
-
const minRightPercent = minRightWidth / containerWidth * 100;
|
|
52
|
-
newSplitPercent = Math.max(minLeftPercent, newSplitPercent);
|
|
53
|
-
newSplitPercent = Math.min(100 - minRightPercent, newSplitPercent);
|
|
54
|
-
setSplitPercent(newSplitPercent);
|
|
55
|
-
}, [
|
|
56
|
-
isDragging,
|
|
57
|
-
minLeftWidth,
|
|
58
|
-
minRightWidth,
|
|
59
|
-
setSplitPercent
|
|
60
|
-
]);
|
|
61
|
-
const handleMouseUp = useCallback(() => {
|
|
62
|
-
setIsDragging(false);
|
|
63
|
-
}, []);
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
if (isDragging) {
|
|
66
|
-
document.addEventListener("mousemove", handleMouseMove);
|
|
67
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
68
|
-
return () => {
|
|
69
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
70
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}, [
|
|
74
|
-
isDragging,
|
|
75
|
-
handleMouseMove,
|
|
76
|
-
handleMouseUp
|
|
77
|
-
]);
|
|
78
|
-
if (isMobile) return /* @__PURE__ */ jsx("div", {
|
|
79
|
-
className: cn("h-full min-h-0 overflow-hidden", className),
|
|
80
|
-
children: /* @__PURE__ */ jsxs(Tabs, {
|
|
81
|
-
defaultValue: defaultTab,
|
|
82
|
-
className: "flex h-full flex-col",
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ jsxs(TabsList, {
|
|
85
|
-
className: "w-full justify-start rounded-none border-b",
|
|
86
|
-
children: [/* @__PURE__ */ jsx(TabsTrigger, {
|
|
87
|
-
value: "left",
|
|
88
|
-
className: "flex-1",
|
|
89
|
-
children: leftLabel
|
|
90
|
-
}), /* @__PURE__ */ jsx(TabsTrigger, {
|
|
91
|
-
value: "right",
|
|
92
|
-
className: "flex-1",
|
|
93
|
-
children: rightLabel
|
|
94
|
-
})]
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ jsx(TabsContent, {
|
|
97
|
-
value: "left",
|
|
98
|
-
className: "flex-1 overflow-auto min-h-0",
|
|
99
|
-
children: left
|
|
100
|
-
}),
|
|
101
|
-
/* @__PURE__ */ jsx(TabsContent, {
|
|
102
|
-
value: "right",
|
|
103
|
-
className: "flex-1 overflow-auto min-h-0",
|
|
104
|
-
children: right
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
})
|
|
108
|
-
});
|
|
109
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
110
|
-
ref: containerRef,
|
|
111
|
-
"data-testid": "resizable-split-pane",
|
|
112
|
-
className: cn("relative flex h-full min-h-0 overflow-hidden", className),
|
|
113
|
-
style: { cursor: isDragging ? "col-resize" : void 0 },
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ jsx("div", {
|
|
116
|
-
className: cn("h-full min-h-0 overflow-auto", leftPaneClassName),
|
|
117
|
-
style: { width: `${splitPercent}%` },
|
|
118
|
-
children: left
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ jsx("div", {
|
|
121
|
-
"data-testid": "resizable-split-pane-handle",
|
|
122
|
-
role: "separator",
|
|
123
|
-
"aria-orientation": "vertical",
|
|
124
|
-
className: cn("group relative flex w-1.5 flex-shrink-0 cursor-col-resize items-center justify-center border-x bg-border/30 transition-colors hover:bg-border", isDragging && "bg-primary"),
|
|
125
|
-
onMouseDown: handleMouseDown,
|
|
126
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
127
|
-
className: "absolute inset-y-0 flex items-center",
|
|
128
|
-
children: /* @__PURE__ */ jsx(GripVertical, { className: cn("h-3 w-3 text-muted-foreground transition-colors group-hover:text-foreground", isDragging && "text-primary-foreground") })
|
|
129
|
-
})
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ jsx("div", {
|
|
132
|
-
className: cn("relative z-10 h-full min-h-0 overflow-auto", rightPaneClassName),
|
|
133
|
-
style: { width: `${100 - splitPercent}%` },
|
|
134
|
-
children: right
|
|
135
|
-
}),
|
|
136
|
-
isDragging && /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-0 z-50 cursor-col-resize" })
|
|
137
|
-
]
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region ../ui/src/toast.tsx
|
|
142
|
-
function ToastProvider() {
|
|
143
|
-
return /* @__PURE__ */ jsx(Toaster, {
|
|
144
|
-
position: "bottom-right",
|
|
145
|
-
offset: {
|
|
146
|
-
right: "calc(var(--assistant-dock-inset, 0px) + 24px)",
|
|
147
|
-
bottom: "24px"
|
|
148
|
-
},
|
|
149
|
-
richColors: false,
|
|
150
|
-
className: "rb-sonner-toaster",
|
|
151
|
-
toastOptions: { classNames: {
|
|
152
|
-
toast: "rb-sonner-toast",
|
|
153
|
-
success: "rb-sonner-toast-success",
|
|
154
|
-
info: "rb-sonner-toast-info",
|
|
155
|
-
error: "rb-sonner-toast-error"
|
|
156
|
-
} }
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
16
|
//#region ../blocks/src/pageRenderAudience.tsx
|
|
161
17
|
/**
|
|
162
18
|
* The single policy for what a non-renderable block looks like.
|
|
@@ -316,7 +172,7 @@ function getFragmentRegistry() {
|
|
|
316
172
|
}
|
|
317
173
|
//#endregion
|
|
318
174
|
//#region ../blocks/src/system/icons/generatedAssets.ts
|
|
319
|
-
function isRecord$
|
|
175
|
+
function isRecord$4(value) {
|
|
320
176
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
321
177
|
}
|
|
322
178
|
function generatedIconAssetRefKey(ref) {
|
|
@@ -326,11 +182,11 @@ function collectGeneratedIconAssetRefs(page) {
|
|
|
326
182
|
const blocks = [];
|
|
327
183
|
for (const block of page.blocks) {
|
|
328
184
|
if (block.kind !== "block.feature-cards" || typeof block.id !== "string") continue;
|
|
329
|
-
const content = isRecord$
|
|
185
|
+
const content = isRecord$4(block.draftContent) ? block.draftContent : isRecord$4(block.content) ? block.content : null;
|
|
330
186
|
const cards = Array.isArray(content?.cards) ? content.cards : [];
|
|
331
187
|
const refs = /* @__PURE__ */ new Map();
|
|
332
188
|
for (const card of cards) {
|
|
333
|
-
if (!isRecord$
|
|
189
|
+
if (!isRecord$4(card)) continue;
|
|
334
190
|
const icon = parseBlockIconValue(card.icon);
|
|
335
191
|
if (icon.kind !== "generated") continue;
|
|
336
192
|
const ref = {
|
|
@@ -420,98 +276,6 @@ function requireThemeResources(resources, blockKind) {
|
|
|
420
276
|
return resources;
|
|
421
277
|
}
|
|
422
278
|
//#endregion
|
|
423
|
-
//#region ../blocks/src/pageRenderJoins.ts
|
|
424
|
-
/**
|
|
425
|
-
* Re-points joins across omitted blocks. Pure over joins.
|
|
426
|
-
*
|
|
427
|
-
* Joins are keyed by adjacent block-id pairs, so dropping B from [A, B, C]
|
|
428
|
-
* removes the A→C join as well as B's own, because no A→C join was ever
|
|
429
|
-
* resolved. For each surviving pair the original join is kept when the pair
|
|
430
|
-
* was already adjacent. Across a gap, the treatment comes from the join
|
|
431
|
-
* entering the omitted run (A→first omitted), falling back to the one leaving
|
|
432
|
-
* it (last omitted→C). Nothing visual is carried: the survivors are composed
|
|
433
|
-
* from their own content afterwards.
|
|
434
|
-
*
|
|
435
|
-
* `survivors` are compared by identity against `originalBlocks`.
|
|
436
|
-
*/
|
|
437
|
-
function retargetJoinsAcrossOmissions(input) {
|
|
438
|
-
const { joins, originalBlocks, survivingBlocks } = input;
|
|
439
|
-
if (joins.length === 0) return joins;
|
|
440
|
-
if (originalBlocks.every((block) => survivingBlocks.has(block))) return joins;
|
|
441
|
-
const byPair = joinsByPair(joins);
|
|
442
|
-
const retargeted = [];
|
|
443
|
-
let previousSurvivor = null;
|
|
444
|
-
let run = [];
|
|
445
|
-
for (const block of originalBlocks) {
|
|
446
|
-
if (!survivingBlocks.has(block)) {
|
|
447
|
-
run.push(block);
|
|
448
|
-
continue;
|
|
449
|
-
}
|
|
450
|
-
if (previousSurvivor?.id && block.id) {
|
|
451
|
-
const join = run.length === 0 ? byPair.get(pairKey(previousSurvivor.id, block.id)) : joinAcrossRun(byPair, previousSurvivor.id, block.id, run);
|
|
452
|
-
if (join) retargeted.push(join);
|
|
453
|
-
}
|
|
454
|
-
previousSurvivor = block;
|
|
455
|
-
run = [];
|
|
456
|
-
}
|
|
457
|
-
return retargeted;
|
|
458
|
-
}
|
|
459
|
-
function joinAcrossRun(byPair, previousBlockId, nextBlockId, run) {
|
|
460
|
-
const firstOmittedId = run[0]?.id;
|
|
461
|
-
const lastOmittedId = run[run.length - 1]?.id;
|
|
462
|
-
const entering = firstOmittedId ? byPair.get(pairKey(previousBlockId, firstOmittedId)) : void 0;
|
|
463
|
-
const exiting = lastOmittedId ? byPair.get(pairKey(lastOmittedId, nextBlockId)) : void 0;
|
|
464
|
-
const donor = entering ?? exiting;
|
|
465
|
-
return donor ? {
|
|
466
|
-
previousBlockId,
|
|
467
|
-
nextBlockId,
|
|
468
|
-
treatment: donor.treatment
|
|
469
|
-
} : void 0;
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* The single composition site. For every adjacent pair of survivors with ids,
|
|
473
|
-
* finds its join and composes it from both survivors' final content: what
|
|
474
|
-
* each paints with and the frame each draws.
|
|
475
|
-
*/
|
|
476
|
-
function composePageJoins(input) {
|
|
477
|
-
const byPair = joinsByPair(input.joins);
|
|
478
|
-
return input.survivors.flatMap((previous, index) => {
|
|
479
|
-
const next = input.survivors[index + 1];
|
|
480
|
-
if (!next || !previous.id || !next.id) return [];
|
|
481
|
-
const join = byPair.get(pairKey(previous.id, next.id));
|
|
482
|
-
return [{
|
|
483
|
-
previousBlockId: previous.id,
|
|
484
|
-
nextBlockId: next.id,
|
|
485
|
-
join: join ? composeJoin(join, previous, next) : null
|
|
486
|
-
}];
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
function composeJoin(join, previous, next) {
|
|
490
|
-
return {
|
|
491
|
-
boundaryId: pairKey(join.previousBlockId, join.nextBlockId),
|
|
492
|
-
previousBlockId: join.previousBlockId,
|
|
493
|
-
nextBlockId: join.nextBlockId,
|
|
494
|
-
treatment: join.treatment,
|
|
495
|
-
outcome: composeBoundary(sectionFactsForContent(previous.content), sectionFactsForContent(next.content))
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
/** Placement, reserves and paint for a join that draws; null otherwise. */
|
|
499
|
-
function renderedJoinLayout(join) {
|
|
500
|
-
if (!join || join.outcome.kind !== "shown") return null;
|
|
501
|
-
return boundaryLayout(join.treatment, join.outcome.composition);
|
|
502
|
-
}
|
|
503
|
-
/** Joins with a missing id on either side cannot sit between two blocks. */
|
|
504
|
-
function joinsByPair(joins) {
|
|
505
|
-
return new Map(joins.flatMap((join) => join.previousBlockId && join.nextBlockId ? [[pairKey(join.previousBlockId, join.nextBlockId), join]] : []));
|
|
506
|
-
}
|
|
507
|
-
/** Slot lookup key for an adjacent pair, in the one boundary-id scheme. */
|
|
508
|
-
function joinSlotKey(previousBlockId, nextBlockId) {
|
|
509
|
-
return pairKey(previousBlockId, nextBlockId);
|
|
510
|
-
}
|
|
511
|
-
function pairKey(previousBlockId, nextBlockId) {
|
|
512
|
-
return makeBoundaryId(asDesignBlockId(previousBlockId), asDesignBlockId(nextBlockId));
|
|
513
|
-
}
|
|
514
|
-
//#endregion
|
|
515
279
|
//#region ../blocks/src/pageRendererBoundaries.tsx
|
|
516
280
|
function joinSlotsByPair(slots) {
|
|
517
281
|
return new Map(slots.map((slot) => [joinSlotKey(slot.previousBlockId, slot.nextBlockId), slot]));
|
|
@@ -627,6 +391,7 @@ function resolveDemoEmailSuppression(dataContext) {
|
|
|
627
391
|
}
|
|
628
392
|
function pageRuntimeContext(dataContext) {
|
|
629
393
|
return {
|
|
394
|
+
interactionContext: dataContext?.interactionContext,
|
|
630
395
|
dateContext: pageDateRuntimeContext(dataContext),
|
|
631
396
|
now: dataContext?.now,
|
|
632
397
|
template: dataContext?.template ?? { kind: "page" }
|
|
@@ -738,473 +503,6 @@ function shouldDebugCustomBlocks() {
|
|
|
738
503
|
}
|
|
739
504
|
}
|
|
740
505
|
//#endregion
|
|
741
|
-
//#region ../blocks/src/pageRenderAdmission.ts
|
|
742
|
-
function toEditorPresentationPage(page) {
|
|
743
|
-
if (!page) return null;
|
|
744
|
-
return {
|
|
745
|
-
...page,
|
|
746
|
-
blocks: page.blocks.map((block) => ({
|
|
747
|
-
...block,
|
|
748
|
-
publishedPlacement: block.publishedPlacement,
|
|
749
|
-
presentationAdmission: { kind: "editor" }
|
|
750
|
-
}))
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
//#endregion
|
|
754
|
-
//#region ../blocks/src/system/data/selectBlockContent.ts
|
|
755
|
-
/** Canonical admitted content: legacy publishedContent never selects a version. */
|
|
756
|
-
function selectBlockContent(block, stage = "published") {
|
|
757
|
-
const source = stage === "preview" && block.draftContent ? block.draftContent : block.content;
|
|
758
|
-
return isObjectRecord(source) ? stripStaleTransitionStyleGroup(source) : {};
|
|
759
|
-
}
|
|
760
|
-
//#endregion
|
|
761
|
-
//#region ../blocks/src/pageRenderPlan.ts
|
|
762
|
-
/**
|
|
763
|
-
* Decides, once per page render, which blocks can render and what happens to
|
|
764
|
-
* the ones that cannot.
|
|
765
|
-
*
|
|
766
|
-
* Pure. Effects — logging in particular — belong at the call site, because this
|
|
767
|
-
* runs inside a `useMemo` whose recomputation React makes no promises about.
|
|
768
|
-
*/
|
|
769
|
-
function buildPageRenderPlan(input) {
|
|
770
|
-
const resolveTarget = createRenderTargetResolver(input);
|
|
771
|
-
const outcomes = input.page.blocks.map((block) => planPageBlock(block, input, resolveTarget));
|
|
772
|
-
const entries = outcomes.flatMap((outcome) => outcome.kind === "admitted" ? [outcome.entry] : []);
|
|
773
|
-
return {
|
|
774
|
-
entries: entries.map(applyArrangementRhythm),
|
|
775
|
-
omitted: outcomes.flatMap((outcome) => outcome.kind === "omitted" ? [outcome.omission] : []),
|
|
776
|
-
runtimeJoins: retargetJoinsAcrossOmissions({
|
|
777
|
-
joins: input.runtimeJoins ?? [],
|
|
778
|
-
originalBlocks: input.page.blocks,
|
|
779
|
-
survivingBlocks: new Set(entries.map((entry) => entry.block))
|
|
780
|
-
})
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
/**
|
|
784
|
-
* Mirrors the order of the checks `MemoBlockSection` used to make inline, so no
|
|
785
|
-
* case changes meaning: admission first, then definition/override resolution,
|
|
786
|
-
* then the layout requirement.
|
|
787
|
-
*/
|
|
788
|
-
function planBlock(block, renderableContent, resolveTarget, audience, siteStyleId) {
|
|
789
|
-
const common = {
|
|
790
|
-
block,
|
|
791
|
-
renderableContent
|
|
792
|
-
};
|
|
793
|
-
if (block.presentationAdmission.kind === "invalid") return {
|
|
794
|
-
...common,
|
|
795
|
-
kind: "diagnostic",
|
|
796
|
-
reason: {
|
|
797
|
-
kind: "invalid-admission",
|
|
798
|
-
blockKind: block.kind,
|
|
799
|
-
error: block.presentationAdmission.error
|
|
800
|
-
}
|
|
801
|
-
};
|
|
802
|
-
const { definition, systemDefinition, override } = resolveTarget(block.kind);
|
|
803
|
-
const isCustom = block.kind.startsWith("custom.");
|
|
804
|
-
if (!definition) return override ? {
|
|
805
|
-
...common,
|
|
806
|
-
kind: "override-only",
|
|
807
|
-
override
|
|
808
|
-
} : {
|
|
809
|
-
...common,
|
|
810
|
-
kind: "diagnostic",
|
|
811
|
-
reason: {
|
|
812
|
-
kind: "missing-definition",
|
|
813
|
-
blockKind: block.kind,
|
|
814
|
-
isCustom
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
const manifestHasLayout = Boolean(definition.manifest.layout) || Object.keys(definition.manifest.variants ?? {}).length > 0;
|
|
818
|
-
if (!override && !manifestHasLayout) return {
|
|
819
|
-
...common,
|
|
820
|
-
kind: "diagnostic",
|
|
821
|
-
reason: {
|
|
822
|
-
kind: "missing-layout",
|
|
823
|
-
blockKind: block.kind,
|
|
824
|
-
isCustom
|
|
825
|
-
}
|
|
826
|
-
};
|
|
827
|
-
return renderableBlockPlan(common, {
|
|
828
|
-
definition,
|
|
829
|
-
systemDefinition,
|
|
830
|
-
override
|
|
831
|
-
}, audience, siteStyleId);
|
|
832
|
-
}
|
|
833
|
-
function renderableBlockPlan(common, target, audience, siteStyleId) {
|
|
834
|
-
const { definition, systemDefinition, override } = target;
|
|
835
|
-
const renderableContent = planArrangementContent(common.block.kind, definition.manifest, common.renderableContent, audience);
|
|
836
|
-
const effectiveArrangementKey = resolveEffectiveArrangement({
|
|
837
|
-
manifest: arrangementManifestFromVariants(definition.manifest),
|
|
838
|
-
...definition.manifest.variantMeaning.kind !== "mode" ? { look: effectiveLookFromContent(renderableContent)?.look } : {},
|
|
839
|
-
storedVariant: parseStoredVariant(definition.manifest, renderableContent),
|
|
840
|
-
policy: siteStyleId === null ? void 0 : deriveSiteStyleBlockPolicy({
|
|
841
|
-
siteStyleId: asSiteStyleId(siteStyleId),
|
|
842
|
-
blockKind: common.block.kind
|
|
843
|
-
})
|
|
844
|
-
}).key;
|
|
845
|
-
return {
|
|
846
|
-
...common,
|
|
847
|
-
renderableContent,
|
|
848
|
-
kind: "renderable",
|
|
849
|
-
definition,
|
|
850
|
-
override,
|
|
851
|
-
effectiveArrangementKey,
|
|
852
|
-
effectiveListArrangementKey: definition.manifest.variantMeaning.kind === "mode" && renderableContent._lookMonthArrangement === void 0 ? resolveModeArrangement({
|
|
853
|
-
declaration: definition.manifest.variantMeaning,
|
|
854
|
-
content: renderableContent,
|
|
855
|
-
look: effectiveLookFromContent(renderableContent)?.look,
|
|
856
|
-
mode: readStoredMode({
|
|
857
|
-
...arrangementManifestFromVariants(definition.manifest),
|
|
858
|
-
variantMeaning: definition.manifest.variantMeaning
|
|
859
|
-
}, renderableContent)
|
|
860
|
-
}).key : null,
|
|
861
|
-
variantKey: systemDefinition ? effectiveArrangementKey : null,
|
|
862
|
-
managesOwnWrapper: Boolean(systemDefinition?.manifest.behaviours?.managesOwnWrapper)
|
|
863
|
-
};
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* Resolves definition + override once per block kind, and builds the
|
|
867
|
-
* custom-block registry at most once per plan rather than once per custom
|
|
868
|
-
* block, which is what the previous inline path did.
|
|
869
|
-
*/
|
|
870
|
-
function createRenderTargetResolver(input) {
|
|
871
|
-
const cache = /* @__PURE__ */ new Map();
|
|
872
|
-
let customRegistry = null;
|
|
873
|
-
const customRegistryOnce = () => {
|
|
874
|
-
customRegistry ?? (customRegistry = createCustomBlockRegistry({
|
|
875
|
-
sdkConfig: input.sdkConfig,
|
|
876
|
-
customBlocks: (input.customBlocks ?? []).map((manifest) => ({
|
|
877
|
-
manifest,
|
|
878
|
-
source: { kind: "managed-database" }
|
|
879
|
-
}))
|
|
880
|
-
}));
|
|
881
|
-
return customRegistry;
|
|
882
|
-
};
|
|
883
|
-
return (blockKind) => {
|
|
884
|
-
const cached = cache.get(blockKind);
|
|
885
|
-
if (cached) return cached;
|
|
886
|
-
const systemDefinition = getBlockDefinition(blockKind);
|
|
887
|
-
const resolved = {
|
|
888
|
-
definition: systemDefinition ?? (blockKind.startsWith("custom.") ? customRegistryOnce().findManifest(blockKind)?.descriptor.definition : void 0),
|
|
889
|
-
systemDefinition,
|
|
890
|
-
override: getBlockOverride(blockKind, input.blockOverrides)
|
|
891
|
-
};
|
|
892
|
-
cache.set(blockKind, resolved);
|
|
893
|
-
return resolved;
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* Look up a block override component by block kind.
|
|
898
|
-
* Supports both full ("block.hero") and short ("hero") keys.
|
|
899
|
-
*/
|
|
900
|
-
function getBlockOverride(blockKind, overrides) {
|
|
901
|
-
if (!overrides) return void 0;
|
|
902
|
-
if (overrides[blockKind]) return overrides[blockKind];
|
|
903
|
-
return overrides[blockKind.replace(/^block\./, "")];
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* Resolves block content based on stage priority.
|
|
907
|
-
* For draft/preview: draftContent takes priority over content.
|
|
908
|
-
* For published: content is the source of truth.
|
|
909
|
-
*/
|
|
910
|
-
/**
|
|
911
|
-
* The content a block renders with. Every render path (public, preview,
|
|
912
|
-
* templates, SDK) chooses content here, so this is also where a stale
|
|
913
|
-
* `site-style-transition-*` styleGroup is dropped; authored values survive.
|
|
914
|
-
*/
|
|
915
|
-
function getRenderableContent(block, previewStage = "published") {
|
|
916
|
-
return selectBlockContent(block, previewStage);
|
|
917
|
-
}
|
|
918
|
-
function arrangementRuntime(content) {
|
|
919
|
-
const value = parseSurfaceTree(content._arrangementLooks);
|
|
920
|
-
return isObjectRecord(value) && isObjectRecord(value.byMode) && Array.isArray(value.available) && Array.isArray(value.rhythm) ? restoreArrangementRuntime(value) : null;
|
|
921
|
-
}
|
|
922
|
-
/** JSON transports carry resolver inputs; rebuild every surface at this boundary. */
|
|
923
|
-
function restoreCompiledLook(look) {
|
|
924
|
-
return {
|
|
925
|
-
...look,
|
|
926
|
-
itemSurfaces: Object.fromEntries(Object.entries(look.itemSurfaces).map(([slot, surface]) => [slot, parseResolvedSurface(surface)])),
|
|
927
|
-
...look.roleSurfaces ? { roleSurfaces: {
|
|
928
|
-
card: parseResolvedSurface(look.roleSurfaces.card),
|
|
929
|
-
statement: parseResolvedSurface(look.roleSurfaces.statement),
|
|
930
|
-
highlight: parseResolvedSurface(look.roleSurfaces.highlight)
|
|
931
|
-
} } : {}
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
|
-
function restoreArrangementRuntime(runtime) {
|
|
935
|
-
return {
|
|
936
|
-
...runtime,
|
|
937
|
-
available: runtime.available.map(restoreCompiledLook),
|
|
938
|
-
byMode: Object.fromEntries(Object.entries(runtime.byMode).map(([mode, look]) => [mode, restoreCompiledLook(look)]))
|
|
939
|
-
};
|
|
940
|
-
}
|
|
941
|
-
function effectiveLookFromContent(content) {
|
|
942
|
-
const value = content._effectiveLook;
|
|
943
|
-
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
944
|
-
}
|
|
945
|
-
function planArrangementContent(blockKind, manifest, content, audience) {
|
|
946
|
-
const runtime = arrangementRuntime(content);
|
|
947
|
-
if (!runtime) return content;
|
|
948
|
-
const mode = readStoredMode({
|
|
949
|
-
...arrangementManifestFromVariants(manifest),
|
|
950
|
-
variantMeaning: manifest.variantMeaning
|
|
951
|
-
}, content);
|
|
952
|
-
const selected = runtime.byMode[mode ?? "default"];
|
|
953
|
-
if (!selected) return content;
|
|
954
|
-
const { facts } = arrangementContentFacts(content);
|
|
955
|
-
const published = resolvePublishedLook({
|
|
956
|
-
look: selected.look,
|
|
957
|
-
contentFacts: facts,
|
|
958
|
-
audience,
|
|
959
|
-
catalogue: runtime.available.map((entry) => entry.look)
|
|
960
|
-
});
|
|
961
|
-
const effective = runtime.available.find((entry) => entry.look.id === published.id) ?? selected;
|
|
962
|
-
const { length, knobs } = resolveArrangementKnobs({
|
|
963
|
-
blockKind,
|
|
964
|
-
look: effective,
|
|
965
|
-
content
|
|
966
|
-
});
|
|
967
|
-
const values = Object.fromEntries(Object.entries(knobs).flatMap(([key, knob]) => knob.kind === "kept" ? [] : [[key, knob.value]]));
|
|
968
|
-
const effectiveContent = Object.fromEntries(Object.entries(values).map(([key, value]) => [key, effectiveContentKnobValue(blockKind, key, value)]));
|
|
969
|
-
const activeContent = Object.fromEntries(Object.entries(content).filter(([key]) => knobs[key]?.kind !== "kept"));
|
|
970
|
-
const photoContent = arrangementPhotoContent(activeContent, effectiveContent);
|
|
971
|
-
const visiblePhotos = arrangementContentFacts({
|
|
972
|
-
...activeContent,
|
|
973
|
-
...effectiveContent,
|
|
974
|
-
...photoContent
|
|
975
|
-
});
|
|
976
|
-
return {
|
|
977
|
-
...activeContent,
|
|
978
|
-
...mode !== null ? { variant: mode } : {},
|
|
979
|
-
...effectiveContent,
|
|
980
|
-
...photoContent,
|
|
981
|
-
...arrangementShapeContent(effective.look.id, {
|
|
982
|
-
...activeContent,
|
|
983
|
-
...effectiveContent
|
|
984
|
-
}),
|
|
985
|
-
...arrangementPanelContent(activeContent, effective, mode),
|
|
986
|
-
...arrangementQuoteContent(blockKind, effective, values),
|
|
987
|
-
_arrangementLooks: runtime,
|
|
988
|
-
_effectiveLook: effective,
|
|
989
|
-
_lookHooks: arrangementContentHooks(effective, mode, length, {
|
|
990
|
-
...facts,
|
|
991
|
-
photo: visiblePhotos.facts.photo
|
|
992
|
-
}, values, visiblePhotos.photoCount),
|
|
993
|
-
_effectiveKnobs: knobs,
|
|
994
|
-
_lookAudience: audience,
|
|
995
|
-
_lookSlots: arrangementContentSlots(blockKind),
|
|
996
|
-
blockLook: effective.look.id
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
|
-
/** Widget section hooks use the theme; hero background geometry never travels to list islands. */
|
|
1000
|
-
function arrangementContentSlots(blockKind) {
|
|
1001
|
-
return Object.fromEntries(arrangementSlotNames.filter((slot) => (!slot.startsWith("price-") || blockKind === "block.shop") && slot !== "schedule-section" && slot !== "shop-section" && (slot !== "background" || blockKind === "block.hero")).map((slot) => [slot, slot]));
|
|
1002
|
-
}
|
|
1003
|
-
/** C photo Looks render shape-specific crops without rewriting authored preferences. */
|
|
1004
|
-
function arrangementShapeContent(lookId, content) {
|
|
1005
|
-
if (lookId !== "intro-photo-beside-text" && lookId !== "media-text-photo-beside-text") return {};
|
|
1006
|
-
return content.imageShape === "circle" ? { aspectRatio: "1/1" } : content.imageShape === "arch" ? { aspectRatio: "4/5" } : {};
|
|
1007
|
-
}
|
|
1008
|
-
function arrangementQuoteContent(blockKind, effective, values) {
|
|
1009
|
-
if (blockKind !== "block.testimonials") return {};
|
|
1010
|
-
const single = effective.look.structure.byMode.default === "single";
|
|
1011
|
-
return {
|
|
1012
|
-
_quoteCount: single ? 1 : values.quoteCount === "all" ? null : Number(values.quoteCount),
|
|
1013
|
-
_quoteLoaderLimit: values.quoteCount === "all" && !single ? "all" : "50"
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
|
-
function arrangementPanelContent(content, effective, mode) {
|
|
1017
|
-
if (mode === "calendar") return {
|
|
1018
|
-
_lookMonthArrangement: effective.look.structure.byMode.calendar,
|
|
1019
|
-
defaultCalendarView: "month"
|
|
1020
|
-
};
|
|
1021
|
-
const arrangement = effective.look.structure.byMode[mode ?? "default"];
|
|
1022
|
-
if (arrangement === "event-header") return { heading: void 0 };
|
|
1023
|
-
if (arrangement !== "compact" && arrangement !== "details-panel") return {};
|
|
1024
|
-
return {
|
|
1025
|
-
heading: void 0,
|
|
1026
|
-
_lookPanelHeading: content.heading
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
function arrangementPhotoContent(content, knobs) {
|
|
1030
|
-
if (knobs.showPhotos !== false || !Array.isArray(content.cards)) return {};
|
|
1031
|
-
return { cards: content.cards.map((card) => {
|
|
1032
|
-
if (!isObjectRecord(card)) return card;
|
|
1033
|
-
const { media: _hiddenMedia, ...copy } = card;
|
|
1034
|
-
return copy;
|
|
1035
|
-
}) };
|
|
1036
|
-
}
|
|
1037
|
-
function arrangementContentFacts(content) {
|
|
1038
|
-
const photoCount = arrangementPhotoCount(content);
|
|
1039
|
-
const featured = typeof content.featured === "string" ? content.featured.trim().length > 0 : content.featured !== void 0 && content.featured !== null;
|
|
1040
|
-
return {
|
|
1041
|
-
photoCount,
|
|
1042
|
-
facts: {
|
|
1043
|
-
photo: photoCount > 0,
|
|
1044
|
-
facts: Array.isArray(content.facts) && content.facts.length > 0,
|
|
1045
|
-
featured,
|
|
1046
|
-
outcome: typeof content.outcome === "string" && content.outcome.length > 0,
|
|
1047
|
-
figure: typeof content.figure === "string" && content.figure.trim().length > 0,
|
|
1048
|
-
entrance: isObjectRecord(content.entrancePhoto)
|
|
1049
|
-
}
|
|
1050
|
-
};
|
|
1051
|
-
}
|
|
1052
|
-
/** The content stage owns media presence for every arrangement consumer. */
|
|
1053
|
-
function arrangementPhotoCount(content) {
|
|
1054
|
-
if (Array.isArray(content.cards)) return content.cards.filter((card) => isObjectRecord(card) && isObjectRecord(card.media)).length;
|
|
1055
|
-
if (Array.isArray(content.members)) return content.members.filter((member) => isObjectRecord(member) && isObjectRecord(member.photo)).length;
|
|
1056
|
-
if (Array.isArray(content.images)) return content.images.filter((item) => isObjectRecord(item) && isObjectRecord(item.image)).length;
|
|
1057
|
-
if (isObjectRecord(content.media) || isObjectRecord(content.entrancePhoto)) return 1;
|
|
1058
|
-
const section = isObjectRecord(content._sectionStyles) ? content._sectionStyles : {};
|
|
1059
|
-
return isObjectRecord((isObjectRecord(section.background) ? section.background : {}).image) ? 1 : 0;
|
|
1060
|
-
}
|
|
1061
|
-
function effectiveContentKnobValue(blockKind, key, value) {
|
|
1062
|
-
const facet = systemCustomizeFacetDefinitionsForBlock(blockKind).find((entry) => entry.target.kind === "content-field" && entry.target.field === key);
|
|
1063
|
-
return facet?.target.kind === "content-field" && facet.target.boolean ? value === "true" : value;
|
|
1064
|
-
}
|
|
1065
|
-
function arrangementContentHooks(effective, mode, length, facts, values, photoCount) {
|
|
1066
|
-
return {
|
|
1067
|
-
"data-look": effective.look.id,
|
|
1068
|
-
"data-treat": effective.treatment,
|
|
1069
|
-
"data-arrangement": effective.look.structure.byMode[mode ?? "default"],
|
|
1070
|
-
...mode !== null ? { "data-mode": mode } : {},
|
|
1071
|
-
...length !== null ? { "data-length": length } : {},
|
|
1072
|
-
...Object.fromEntries(Object.entries(facts).map(([key, value]) => [`data-has-${key}`, String(value)])),
|
|
1073
|
-
"data-photo-count": String(photoCount),
|
|
1074
|
-
...Object.fromEntries(Object.entries(values).map(([key, value]) => [`data-knob-${key === "titleSize" ? "headline" : key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}`, value]))
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
function applyArrangementRhythm(entry, position) {
|
|
1078
|
-
const runtime = arrangementRuntime(entry.renderableContent);
|
|
1079
|
-
const look = effectiveLookFromContent(entry.renderableContent);
|
|
1080
|
-
if (!runtime || !look) return entry;
|
|
1081
|
-
const rhythm = runtime.rhythm.length === 0 ? null : runtime.rhythm[position % runtime.rhythm.length];
|
|
1082
|
-
const content = entry.renderableContent;
|
|
1083
|
-
const resolved = resolveSectionBackground(parseCanonicalRuntimeBackground(content), null, rhythm, heroPhotoGround(entry));
|
|
1084
|
-
const updated = applyResolvedArrangementBackground(content, resolved);
|
|
1085
|
-
const surface = arrangementGroundToken(resolved);
|
|
1086
|
-
const grounded = resolveArrangementRoleSurfaces(look, runtime, resolved);
|
|
1087
|
-
const tinted = resolveArrangementTints(updated, grounded, runtime, surface) ?? grounded;
|
|
1088
|
-
return {
|
|
1089
|
-
...entry,
|
|
1090
|
-
renderableContent: {
|
|
1091
|
-
...updated,
|
|
1092
|
-
_effectiveLook: tinted,
|
|
1093
|
-
_lookHooks: {
|
|
1094
|
-
...isObjectRecord(updated._lookHooks) ? updated._lookHooks : {},
|
|
1095
|
-
"data-surface": surface
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
};
|
|
1099
|
-
}
|
|
1100
|
-
function arrangementGroundToken(resolved) {
|
|
1101
|
-
if (resolved.kind === "base") return "background";
|
|
1102
|
-
switch (resolved.background.type) {
|
|
1103
|
-
case "image":
|
|
1104
|
-
case "video": return "media";
|
|
1105
|
-
case "color": return resolved.background.color ?? "background";
|
|
1106
|
-
case "gradient": return "gradient";
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
function applyResolvedArrangementBackground(content, resolved) {
|
|
1110
|
-
const section = isObjectRecord(content._sectionStyles) ? content._sectionStyles : {};
|
|
1111
|
-
const photo = isObjectRecord(section.background) ? section.background.image : void 0;
|
|
1112
|
-
const ground = resolved.kind === "base" ? void 0 : resolved.background;
|
|
1113
|
-
const background = photo !== void 0 ? {
|
|
1114
|
-
...ground ?? {
|
|
1115
|
-
type: "color",
|
|
1116
|
-
color: "background"
|
|
1117
|
-
},
|
|
1118
|
-
image: photo
|
|
1119
|
-
} : ground;
|
|
1120
|
-
return {
|
|
1121
|
-
...content,
|
|
1122
|
-
_sectionStyles: {
|
|
1123
|
-
...section,
|
|
1124
|
-
background
|
|
1125
|
-
}
|
|
1126
|
-
};
|
|
1127
|
-
}
|
|
1128
|
-
function planPageBlock(block, input, resolveTarget) {
|
|
1129
|
-
const outcome = planBlock(block, getRenderableContent(block, input.previewStage), resolveTarget, input.audience, input.siteStyleId ?? null);
|
|
1130
|
-
if (outcome.kind !== "diagnostic") return {
|
|
1131
|
-
kind: "admitted",
|
|
1132
|
-
entry: outcome
|
|
1133
|
-
};
|
|
1134
|
-
const resolved = resolveTarget(block.kind);
|
|
1135
|
-
const debug = blockDiagnosticContext(resolved, input);
|
|
1136
|
-
return input.audience === "public" ? {
|
|
1137
|
-
kind: "omitted",
|
|
1138
|
-
omission: {
|
|
1139
|
-
blockId: block.id ?? null,
|
|
1140
|
-
blockKind: block.kind,
|
|
1141
|
-
reason: outcome.reason,
|
|
1142
|
-
override: resolved.override,
|
|
1143
|
-
debug
|
|
1144
|
-
}
|
|
1145
|
-
} : {
|
|
1146
|
-
kind: "admitted",
|
|
1147
|
-
entry: {
|
|
1148
|
-
...outcome,
|
|
1149
|
-
debug
|
|
1150
|
-
}
|
|
1151
|
-
};
|
|
1152
|
-
}
|
|
1153
|
-
function blockDiagnosticContext(resolved, input) {
|
|
1154
|
-
return {
|
|
1155
|
-
hasOverride: Boolean(resolved.override),
|
|
1156
|
-
sdkCustomBlocksCount: input.sdkConfig?.customBlocks?.length ?? 0,
|
|
1157
|
-
dbCustomBlocksCount: input.customBlocks?.length ?? 0,
|
|
1158
|
-
manifestKeys: resolved.definition ? Object.keys(resolved.definition.manifest).sort() : null
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
function resolveArrangementTints(content, look, runtime, ground) {
|
|
1162
|
-
if (!look.surfaceTints) return null;
|
|
1163
|
-
const context = runtime.surfaceContext;
|
|
1164
|
-
const surfaces = arrangementSlotNames.flatMap((slot) => {
|
|
1165
|
-
const tint = look.surfaceTints?.[slot];
|
|
1166
|
-
if (!tint || tint.knob && content[tint.knob] !== true) return [];
|
|
1167
|
-
const owned = look.itemSurfaces[slot];
|
|
1168
|
-
return [[slot, resolveSurface({
|
|
1169
|
-
kind: "tint",
|
|
1170
|
-
base: owned?.kind === "owned" && owned.paint.kind === "solid" ? owned.paint.token : ground,
|
|
1171
|
-
source: tint.source,
|
|
1172
|
-
opacity: tint.opacity,
|
|
1173
|
-
gradient: tint.gradient
|
|
1174
|
-
}, context)]];
|
|
1175
|
-
});
|
|
1176
|
-
return {
|
|
1177
|
-
...look,
|
|
1178
|
-
itemSurfaces: {
|
|
1179
|
-
...look.itemSurfaces,
|
|
1180
|
-
...Object.fromEntries(surfaces)
|
|
1181
|
-
}
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
function resolveArrangementRoleSurfaces(look, runtime, background) {
|
|
1185
|
-
const ground = deriveSectionGround(background, runtime.surfaceContext.palette);
|
|
1186
|
-
const style = {
|
|
1187
|
-
roleMap: look.roleMap,
|
|
1188
|
-
surfaces: runtime.surfaces,
|
|
1189
|
-
context: runtime.surfaceContext
|
|
1190
|
-
};
|
|
1191
|
-
const roleSurfaces = {
|
|
1192
|
-
card: resolveItemSurface("card", ground, style),
|
|
1193
|
-
statement: resolveItemSurface("statement", ground, style),
|
|
1194
|
-
highlight: resolveItemSurface("highlight", ground, style)
|
|
1195
|
-
};
|
|
1196
|
-
return {
|
|
1197
|
-
...look,
|
|
1198
|
-
ground,
|
|
1199
|
-
roleSurfaces,
|
|
1200
|
-
itemSurfaces: resolveLookSlotSurfaces(look.look, look.itemRoles, roleSurfaces)
|
|
1201
|
-
};
|
|
1202
|
-
}
|
|
1203
|
-
/** The arrangement key is resolved once by planBlock, including pinned Looks. */
|
|
1204
|
-
function heroPhotoGround(entry) {
|
|
1205
|
-
return entry.kind === "renderable" && entry.block.kind === "block.hero" ? { paintsGround: heroPhotoPaintsGround(entry.effectiveArrangementKey ?? void 0) } : void 0;
|
|
1206
|
-
}
|
|
1207
|
-
//#endregion
|
|
1208
506
|
//#region ../blocks/src/system/data/readinessFacts.ts
|
|
1209
507
|
const countSchema = z.array(z.unknown()).transform((entries) => entries.length);
|
|
1210
508
|
const formSchema = z.union([z.null(), z.object({
|
|
@@ -1273,7 +571,7 @@ function offeringsPreviewPhotoCount(listing) {
|
|
|
1273
571
|
case "nothing-to-show": return 0;
|
|
1274
572
|
case "by-date": return listing.items.filter(({ item }) => hasPhoto(item)).length;
|
|
1275
573
|
case "by-type": return listing.groups.reduce((count, load) => count + groupPhotoCount(load), 0);
|
|
1276
|
-
default: return assertNever$
|
|
574
|
+
default: return assertNever$1(listing);
|
|
1277
575
|
}
|
|
1278
576
|
}
|
|
1279
577
|
function groupPhotoCount(load) {
|
|
@@ -1281,14 +579,14 @@ function groupPhotoCount(load) {
|
|
|
1281
579
|
case "empty":
|
|
1282
580
|
case "failed": return 0;
|
|
1283
581
|
case "items": return load.items.filter(hasPhoto).length;
|
|
1284
|
-
default: return assertNever$
|
|
582
|
+
default: return assertNever$1(load);
|
|
1285
583
|
}
|
|
1286
584
|
}
|
|
1287
585
|
function hasPhoto(item) {
|
|
1288
586
|
switch (item.kind) {
|
|
1289
587
|
case "event": return Boolean(item.event.presentation?.image);
|
|
1290
588
|
case "run": return Boolean(item.run.representative.presentation?.image);
|
|
1291
|
-
default: return assertNever$
|
|
589
|
+
default: return assertNever$1(item);
|
|
1292
590
|
}
|
|
1293
591
|
}
|
|
1294
592
|
//#endregion
|
|
@@ -1325,7 +623,7 @@ function hydrateResolvedBookingConsentValue(value, context) {
|
|
|
1325
623
|
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
1326
624
|
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
1327
625
|
}
|
|
1328
|
-
if (!isRecord$
|
|
626
|
+
if (!isRecord$5(value)) return value;
|
|
1329
627
|
if (isBookingConsentCarrier(value)) {
|
|
1330
628
|
const agreement = hydrateValue(value.agreement, context);
|
|
1331
629
|
return agreement === value.agreement ? value : {
|
|
@@ -1345,7 +643,7 @@ function hydrateValue(value, context) {
|
|
|
1345
643
|
const resolvedItems = value.map((item) => hydrateValue(item, context));
|
|
1346
644
|
return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
|
|
1347
645
|
}
|
|
1348
|
-
if (isRecord$
|
|
646
|
+
if (isRecord$5(value)) {
|
|
1349
647
|
if (isInternalLink(value)) return hydrateInternalLink(value, context.routes);
|
|
1350
648
|
if (isPageLink(value)) return hydratePageLink(value, context);
|
|
1351
649
|
if (isEntryLink(value)) return hydrateEntryLink(value, context);
|
|
@@ -1410,7 +708,7 @@ function hydrateEntryLink(link, context) {
|
|
|
1410
708
|
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
1411
709
|
function resolveBlockData(blockId, dataLoaders, dataContext, routes) {
|
|
1412
710
|
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
1413
|
-
if (isRecord$
|
|
711
|
+
if (isRecord$5(raw)) return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
1414
712
|
return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
|
|
1415
713
|
}
|
|
1416
714
|
//#endregion
|
|
@@ -1478,7 +776,7 @@ function preparePageRender(input) {
|
|
|
1478
776
|
template: input.dataContext?.template ?? pageTemplateFromEntry(input.dataContext?.contentEntry)
|
|
1479
777
|
});
|
|
1480
778
|
const permission = input.dataContext?.businessLocationPermission ?? decideLocationSourcePermission("business_address", input.dataContext?.businessAddressVisibility);
|
|
1481
|
-
const entries = input.plan.entries.filter((entry) => input.audience === "authoring" || !entryNeedsSetup(entry, facts)).filter((entry) => isPublicSourcePermitted(entry, permission) || input.audience === "authoring" && permission.kind === "hidden").map((entry) => preparedPlanEntry(entry, prepareSourceEntry(entry, input, permission)));
|
|
779
|
+
const entries = input.plan.entries.filter((entry) => input.audience === "authoring" || !entryNeedsSetup(entry, facts, input.dataContext?.interactionContext)).filter((entry) => isPublicSourcePermitted(entry, permission) || input.audience === "authoring" && permission.kind === "hidden").map((entry) => preparedPlanEntry(entry, prepareSourceEntry(entry, input, permission)));
|
|
1482
780
|
const constructionFailures = entries.filter((candidate) => candidate.prepared.kind === "render-threw").map((candidate) => candidate.entry);
|
|
1483
781
|
const survivors = input.audience === "authoring" ? entries : entries.filter((candidate) => candidate.prepared.kind !== "render-threw" && candidate.prepared.kind !== "unresolved-location");
|
|
1484
782
|
return {
|
|
@@ -1515,15 +813,15 @@ function isPublicSourcePermitted(entry, permission) {
|
|
|
1515
813
|
const rawSource = entry.renderableContent.locationSource;
|
|
1516
814
|
return normalizeLocationMapSource(typeof rawSource === "string" ? rawSource : null) !== "business_address" || permission.kind === "permitted";
|
|
1517
815
|
}
|
|
816
|
+
function entryNeedsSetup(entry, facts, interaction) {
|
|
817
|
+
return entry.kind === "renderable" && entry.definition.readiness?.assess(entry.renderableContent, facts, interaction).kind === "NeedsSetup";
|
|
818
|
+
}
|
|
1518
819
|
/**
|
|
1519
820
|
* The only place joins are composed. Plan-time omissions were already
|
|
1520
821
|
* re-pointed by the plan; construction failures are re-pointed here by the
|
|
1521
822
|
* same primitive, so `[A, B, C]` losing B still gets an A→C join. Each
|
|
1522
823
|
* survivor is then classified from its final content.
|
|
1523
824
|
*/
|
|
1524
|
-
function entryNeedsSetup(entry, facts) {
|
|
1525
|
-
return entry.kind === "renderable" && entry.definition.readiness?.assess(entry.renderableContent, facts).kind === "NeedsSetup";
|
|
1526
|
-
}
|
|
1527
825
|
function composeSurvivorJoins(plan, survivors, themeResources) {
|
|
1528
826
|
return composePageJoins({
|
|
1529
827
|
joins: retargetJoinsAcrossOmissions({
|
|
@@ -1605,7 +903,7 @@ function preparedBlockProps(entry, content, data, input) {
|
|
|
1605
903
|
function buildBlockOverrideProps(input) {
|
|
1606
904
|
const { block, dataContext } = input;
|
|
1607
905
|
return {
|
|
1608
|
-
content: input.content,
|
|
906
|
+
content: bindArrangementInkPolicy(input.content, input.themeResources),
|
|
1609
907
|
dateContext: pageDateRuntimeContext(dataContext),
|
|
1610
908
|
now: dataContext?.now,
|
|
1611
909
|
...overrideThemeProps(input.themeResources),
|
|
@@ -1637,14 +935,16 @@ function newsletterBlockProps(block, renderedContent, stage) {
|
|
|
1637
935
|
}
|
|
1638
936
|
/** Site, transport and session context a block needs to call back to the API. */
|
|
1639
937
|
function blockSessionProps(dataContext) {
|
|
938
|
+
const context = dataContext ?? {};
|
|
1640
939
|
return {
|
|
1641
|
-
siteId:
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
940
|
+
siteId: context.siteId,
|
|
941
|
+
interactionContext: context.interactionContext,
|
|
942
|
+
apiBaseUrl: context.apiBaseUrl,
|
|
943
|
+
supabaseUrl: context.supabaseUrl,
|
|
944
|
+
portalToken: context.portalToken ?? null,
|
|
945
|
+
previewToken: context.previewToken ?? null,
|
|
946
|
+
readAuthority: context.readAuthority,
|
|
947
|
+
stage: context.previewStage
|
|
1648
948
|
};
|
|
1649
949
|
}
|
|
1650
950
|
/** What this render is *about* — the entry, occurrence or surface in scope. */
|
|
@@ -1750,6 +1050,11 @@ function preparedPlanEntry(entry, prepared) {
|
|
|
1750
1050
|
prepared
|
|
1751
1051
|
};
|
|
1752
1052
|
}
|
|
1053
|
+
/** Compiled Looks share the render's authority, including transported item contexts. */
|
|
1054
|
+
function bindArrangementInkPolicy(content, theme) {
|
|
1055
|
+
const policy = theme.kind === "available" ? theme.tokens.solvedInks ?? "withhold" : "withhold";
|
|
1056
|
+
return Object.fromEntries(Object.entries(content).map(([key, value]) => [key, key === "_effectiveLook" || key === "_arrangementLooks" ? parseSurfaceTree(value, policy) : value]));
|
|
1057
|
+
}
|
|
1753
1058
|
//#endregion
|
|
1754
1059
|
//#region ../blocks/src/BlockErrorBoundary.tsx
|
|
1755
1060
|
/**
|
|
@@ -1819,7 +1124,7 @@ function EditorPageRenderer(props) {
|
|
|
1819
1124
|
}) });
|
|
1820
1125
|
}
|
|
1821
1126
|
function PageRendererCore(props) {
|
|
1822
|
-
const { page, audience, dataContext, routeMap
|
|
1127
|
+
const { page, audience, dataContext, routeMap } = props;
|
|
1823
1128
|
const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
|
|
1824
1129
|
dataContext?.imageResolveContext,
|
|
1825
1130
|
dataContext?.mediaAssets,
|
|
@@ -1847,16 +1152,20 @@ function PageRendererCore(props) {
|
|
|
1847
1152
|
themeResources,
|
|
1848
1153
|
imageResolveContext
|
|
1849
1154
|
]);
|
|
1850
|
-
const joinSlots = React$1.useMemo(() => joinSlotsByPair(preparation.joins), [preparation.joins]);
|
|
1851
1155
|
reportAndReplayOmissions({
|
|
1852
1156
|
plan,
|
|
1853
1157
|
preparation,
|
|
1854
1158
|
dataContext,
|
|
1855
1159
|
themeResources
|
|
1856
1160
|
});
|
|
1857
|
-
if (!page || preparation.entries.length === 0) return presentEmptyPage(audience);
|
|
1858
|
-
const resolvedRegistry = registry ?? getDefaultComponentRegistry();
|
|
1161
|
+
if (!page || preparation.entries.length === 0) return props.wrapPage ? props.wrapPage(plan, presentEmptyPage(audience)) : presentEmptyPage(audience);
|
|
1859
1162
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
1163
|
+
const rendered = renderPreparedPage(props, preparation, themeResources, imageResolveContext);
|
|
1164
|
+
return props.wrapPage ? props.wrapPage(plan, rendered) : rendered;
|
|
1165
|
+
}
|
|
1166
|
+
function renderPreparedPage(props, preparation, themeResources, imageResolveContext) {
|
|
1167
|
+
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
1168
|
+
const joinSlots = joinSlotsByPair(preparation.joins);
|
|
1860
1169
|
return /* @__PURE__ */ jsx("div", { children: preparation.entries.map((entry, index) => renderGuardedPlanEntry({
|
|
1861
1170
|
entry,
|
|
1862
1171
|
index,
|
|
@@ -2395,7 +1704,7 @@ async function fetchAllPages(apiClient, endpoint, params, offset, seenPages) {
|
|
|
2395
1704
|
case "invalid": throw new Error(page.message);
|
|
2396
1705
|
case "complete": return page.entries;
|
|
2397
1706
|
case "continue": return [...page.entries, ...await fetchAllPages(apiClient, endpoint, params, page.offset, page.seenPages)];
|
|
2398
|
-
default: return assertNever$
|
|
1707
|
+
default: return assertNever$1(page);
|
|
2399
1708
|
}
|
|
2400
1709
|
}
|
|
2401
1710
|
function isUnknownArray(value) {
|
|
@@ -2849,22 +2158,148 @@ function normalizePublicApiLoaderParams(endpoint, params, context) {
|
|
|
2849
2158
|
const Text = Text$1;
|
|
2850
2159
|
const RichText = RichText$1;
|
|
2851
2160
|
//#endregion
|
|
2852
|
-
//#region ../
|
|
2853
|
-
/**
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
function
|
|
2860
|
-
|
|
2861
|
-
const
|
|
2862
|
-
|
|
2863
|
-
const
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2161
|
+
//#region ../ui/src/resizable-split-pane.tsx
|
|
2162
|
+
/**
|
|
2163
|
+
* Resizable split pane component
|
|
2164
|
+
*
|
|
2165
|
+
* Two-panel layout with draggable resize handle.
|
|
2166
|
+
* On mobile (<1024px), switches to tabs.
|
|
2167
|
+
*/
|
|
2168
|
+
function ResizableSplitPane({ left, right, defaultSplit = 40, minLeftWidth = 300, minRightWidth = 400, leftLabel = "Editor", rightLabel = "Preview", defaultTab = "left", className, leftPaneClassName, rightPaneClassName, onSplitChange, splitPercent: controlledSplitPercent }) {
|
|
2169
|
+
const [internalSplitPercent, setInternalSplitPercent] = useState(defaultSplit);
|
|
2170
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
2171
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
2172
|
+
const containerRef = useRef(null);
|
|
2173
|
+
const splitPercent = controlledSplitPercent ?? internalSplitPercent;
|
|
2174
|
+
const setSplitPercent = useCallback((value) => {
|
|
2175
|
+
setInternalSplitPercent(value);
|
|
2176
|
+
onSplitChange?.(value);
|
|
2177
|
+
}, [onSplitChange]);
|
|
2178
|
+
useEffect(() => {
|
|
2179
|
+
const checkMobile = () => {
|
|
2180
|
+
setIsMobile(window.innerWidth < 1024);
|
|
2181
|
+
};
|
|
2182
|
+
checkMobile();
|
|
2183
|
+
window.addEventListener("resize", checkMobile);
|
|
2184
|
+
return () => window.removeEventListener("resize", checkMobile);
|
|
2185
|
+
}, []);
|
|
2186
|
+
const handleMouseDown = useCallback((e) => {
|
|
2187
|
+
e.preventDefault();
|
|
2188
|
+
setIsDragging(true);
|
|
2189
|
+
}, []);
|
|
2190
|
+
const handleMouseMove = useCallback((e) => {
|
|
2191
|
+
if (!isDragging || !containerRef.current) return;
|
|
2192
|
+
const containerRect = containerRef.current.getBoundingClientRect();
|
|
2193
|
+
const containerWidth = containerRect.width;
|
|
2194
|
+
let newSplitPercent = (e.clientX - containerRect.left) / containerWidth * 100;
|
|
2195
|
+
const minLeftPercent = minLeftWidth / containerWidth * 100;
|
|
2196
|
+
const minRightPercent = minRightWidth / containerWidth * 100;
|
|
2197
|
+
newSplitPercent = Math.max(minLeftPercent, newSplitPercent);
|
|
2198
|
+
newSplitPercent = Math.min(100 - minRightPercent, newSplitPercent);
|
|
2199
|
+
setSplitPercent(newSplitPercent);
|
|
2200
|
+
}, [
|
|
2201
|
+
isDragging,
|
|
2202
|
+
minLeftWidth,
|
|
2203
|
+
minRightWidth,
|
|
2204
|
+
setSplitPercent
|
|
2205
|
+
]);
|
|
2206
|
+
const handleMouseUp = useCallback(() => {
|
|
2207
|
+
setIsDragging(false);
|
|
2208
|
+
}, []);
|
|
2209
|
+
useEffect(() => {
|
|
2210
|
+
if (isDragging) {
|
|
2211
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
2212
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
2213
|
+
return () => {
|
|
2214
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
2215
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
2216
|
+
};
|
|
2217
|
+
}
|
|
2218
|
+
}, [
|
|
2219
|
+
isDragging,
|
|
2220
|
+
handleMouseMove,
|
|
2221
|
+
handleMouseUp
|
|
2222
|
+
]);
|
|
2223
|
+
if (isMobile) return /* @__PURE__ */ jsx("div", {
|
|
2224
|
+
className: cn("h-full min-h-0 overflow-hidden", className),
|
|
2225
|
+
children: /* @__PURE__ */ jsxs(Tabs, {
|
|
2226
|
+
defaultValue: defaultTab,
|
|
2227
|
+
className: "flex h-full flex-col",
|
|
2228
|
+
children: [
|
|
2229
|
+
/* @__PURE__ */ jsxs(TabsList, {
|
|
2230
|
+
className: "w-full justify-start rounded-none border-b",
|
|
2231
|
+
children: [/* @__PURE__ */ jsx(TabsTrigger, {
|
|
2232
|
+
value: "left",
|
|
2233
|
+
className: "flex-1",
|
|
2234
|
+
children: leftLabel
|
|
2235
|
+
}), /* @__PURE__ */ jsx(TabsTrigger, {
|
|
2236
|
+
value: "right",
|
|
2237
|
+
className: "flex-1",
|
|
2238
|
+
children: rightLabel
|
|
2239
|
+
})]
|
|
2240
|
+
}),
|
|
2241
|
+
/* @__PURE__ */ jsx(TabsContent, {
|
|
2242
|
+
value: "left",
|
|
2243
|
+
className: "flex-1 overflow-auto min-h-0",
|
|
2244
|
+
children: left
|
|
2245
|
+
}),
|
|
2246
|
+
/* @__PURE__ */ jsx(TabsContent, {
|
|
2247
|
+
value: "right",
|
|
2248
|
+
className: "flex-1 overflow-auto min-h-0",
|
|
2249
|
+
children: right
|
|
2250
|
+
})
|
|
2251
|
+
]
|
|
2252
|
+
})
|
|
2253
|
+
});
|
|
2254
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2255
|
+
ref: containerRef,
|
|
2256
|
+
"data-testid": "resizable-split-pane",
|
|
2257
|
+
className: cn("relative flex h-full min-h-0 overflow-hidden", className),
|
|
2258
|
+
style: { cursor: isDragging ? "col-resize" : void 0 },
|
|
2259
|
+
children: [
|
|
2260
|
+
/* @__PURE__ */ jsx("div", {
|
|
2261
|
+
className: cn("h-full min-h-0 overflow-auto", leftPaneClassName),
|
|
2262
|
+
style: { width: `${splitPercent}%` },
|
|
2263
|
+
children: left
|
|
2264
|
+
}),
|
|
2265
|
+
/* @__PURE__ */ jsx("div", {
|
|
2266
|
+
"data-testid": "resizable-split-pane-handle",
|
|
2267
|
+
role: "separator",
|
|
2268
|
+
"aria-orientation": "vertical",
|
|
2269
|
+
className: cn("group relative flex w-1.5 flex-shrink-0 cursor-col-resize items-center justify-center border-x bg-border/30 transition-colors hover:bg-border", isDragging && "bg-primary"),
|
|
2270
|
+
onMouseDown: handleMouseDown,
|
|
2271
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2272
|
+
className: "absolute inset-y-0 flex items-center",
|
|
2273
|
+
children: /* @__PURE__ */ jsx(GripVertical, { className: cn("h-3 w-3 text-muted-foreground transition-colors group-hover:text-foreground", isDragging && "text-primary-foreground") })
|
|
2274
|
+
})
|
|
2275
|
+
}),
|
|
2276
|
+
/* @__PURE__ */ jsx("div", {
|
|
2277
|
+
className: cn("relative z-10 h-full min-h-0 overflow-auto", rightPaneClassName),
|
|
2278
|
+
style: { width: `${100 - splitPercent}%` },
|
|
2279
|
+
children: right
|
|
2280
|
+
}),
|
|
2281
|
+
isDragging && /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-0 z-50 cursor-col-resize" })
|
|
2282
|
+
]
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
//#endregion
|
|
2286
|
+
//#region ../ui/src/toast.tsx
|
|
2287
|
+
function ToastProvider() {
|
|
2288
|
+
return /* @__PURE__ */ jsx(Toaster, {
|
|
2289
|
+
position: "bottom-right",
|
|
2290
|
+
offset: {
|
|
2291
|
+
right: "calc(var(--assistant-dock-inset, 0px) + 24px)",
|
|
2292
|
+
bottom: "24px"
|
|
2293
|
+
},
|
|
2294
|
+
richColors: false,
|
|
2295
|
+
className: "rb-sonner-toaster",
|
|
2296
|
+
toastOptions: { classNames: {
|
|
2297
|
+
toast: "rb-sonner-toast",
|
|
2298
|
+
success: "rb-sonner-toast-success",
|
|
2299
|
+
info: "rb-sonner-toast-info",
|
|
2300
|
+
error: "rb-sonner-toast-error"
|
|
2301
|
+
} }
|
|
2302
|
+
});
|
|
2868
2303
|
}
|
|
2869
2304
|
//#endregion
|
|
2870
2305
|
//#region ../db/src/schemas/forms.ts
|
|
@@ -3396,7 +2831,7 @@ function parseRelativeStoragePath(value) {
|
|
|
3396
2831
|
if (!validated.ok) return validated;
|
|
3397
2832
|
return ok$1(brandRelativeStoragePath(validated.value));
|
|
3398
2833
|
}
|
|
3399
|
-
function isRecord$
|
|
2834
|
+
function isRecord$3(value) {
|
|
3400
2835
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
3401
2836
|
}
|
|
3402
2837
|
function parseFileKindJson(value) {
|
|
@@ -3617,7 +3052,7 @@ function parseEntitledCustomerAccessScopeJson(value) {
|
|
|
3617
3052
|
}
|
|
3618
3053
|
}
|
|
3619
3054
|
function requireRecord(value) {
|
|
3620
|
-
if (!isRecord$
|
|
3055
|
+
if (!isRecord$3(value)) return err("expected-object");
|
|
3621
3056
|
return ok(value);
|
|
3622
3057
|
}
|
|
3623
3058
|
function requireString(value) {
|
|
@@ -3666,6 +3101,37 @@ function isOneOf(value, allowed) {
|
|
|
3666
3101
|
return allowed.includes(value);
|
|
3667
3102
|
}
|
|
3668
3103
|
new TextDecoder("latin1");
|
|
3104
|
+
const ImageKindSchema = z.enum([
|
|
3105
|
+
"photo",
|
|
3106
|
+
"logo",
|
|
3107
|
+
"icon",
|
|
3108
|
+
"illustration",
|
|
3109
|
+
"graphic-with-text",
|
|
3110
|
+
"screenshot",
|
|
3111
|
+
"document",
|
|
3112
|
+
"other"
|
|
3113
|
+
]);
|
|
3114
|
+
z.enum(["original", "light-dark-composite"]);
|
|
3115
|
+
const ImageFactsSchema = z.strictObject({
|
|
3116
|
+
kind: ImageKindSchema,
|
|
3117
|
+
description: z.string().trim().min(1).max(600),
|
|
3118
|
+
readableText: z.string().trim().max(2e3)
|
|
3119
|
+
});
|
|
3120
|
+
/** Canonical English search slugs; unusable output cannot become an empty label. */
|
|
3121
|
+
function normalizeImageLabels(labels) {
|
|
3122
|
+
return [...new Set(labels.map((label) => label.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "")).filter((label) => /[a-z]/.test(label)))];
|
|
3123
|
+
}
|
|
3124
|
+
const ImageLabelsSchema = z.array(z.string().trim().min(1).max(64)).min(1).max(10).transform(normalizeImageLabels).pipe(z.array(z.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)).min(1).max(10));
|
|
3125
|
+
ImageFactsSchema.extend({ labels: ImageLabelsSchema });
|
|
3126
|
+
z.strictObject({
|
|
3127
|
+
version: z.literal(1),
|
|
3128
|
+
facts: ImageFactsSchema,
|
|
3129
|
+
modelId: z.string().trim().min(1),
|
|
3130
|
+
promptVersion: z.string().trim().min(1),
|
|
3131
|
+
sourceChecksum: z.string().regex(/^[a-f0-9]{64}$/),
|
|
3132
|
+
analyzedAt: z.iso.datetime({ offset: true }),
|
|
3133
|
+
embeddingModelId: z.string().trim().min(1)
|
|
3134
|
+
});
|
|
3669
3135
|
function slugifyMediaIdentifier(value) {
|
|
3670
3136
|
return value.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-");
|
|
3671
3137
|
}
|
|
@@ -3845,6 +3311,11 @@ var MediaStorageError = class extends Error {
|
|
|
3845
3311
|
this.cause = options.cause;
|
|
3846
3312
|
}
|
|
3847
3313
|
};
|
|
3314
|
+
z.enum([
|
|
3315
|
+
"active",
|
|
3316
|
+
"pending-delete",
|
|
3317
|
+
"deleted"
|
|
3318
|
+
]).optional();
|
|
3848
3319
|
const pad = (value) => value.toString().padStart(2, "0");
|
|
3849
3320
|
const extractExtension = (filename) => {
|
|
3850
3321
|
if (!hasText(filename)) return "";
|
|
@@ -3951,6 +3422,8 @@ z.object({
|
|
|
3951
3422
|
caption: z.string().optional().nullable(),
|
|
3952
3423
|
exif: z.record(z.string(), z.any()).optional().nullable(),
|
|
3953
3424
|
createdBy: z.string().min(1).optional().nullable(),
|
|
3425
|
+
durationSeconds: z.number().positive().nullable().optional(),
|
|
3426
|
+
thumbnailAssetId: z.string().uuid().nullable().optional(),
|
|
3954
3427
|
isThumbnail: z.boolean().optional()
|
|
3955
3428
|
});
|
|
3956
3429
|
z.object({
|
|
@@ -3986,17 +3459,39 @@ z.object({
|
|
|
3986
3459
|
});
|
|
3987
3460
|
const searchMatchRowSchema = z.object({
|
|
3988
3461
|
id: z.string(),
|
|
3989
|
-
score: z.number()
|
|
3462
|
+
score: z.number().nullable(),
|
|
3463
|
+
tier: z.enum([
|
|
3464
|
+
"exact",
|
|
3465
|
+
"partial",
|
|
3466
|
+
"semantic"
|
|
3467
|
+
]),
|
|
3468
|
+
reasons: z.array(z.enum([
|
|
3469
|
+
"label",
|
|
3470
|
+
"exact_text",
|
|
3471
|
+
"text",
|
|
3472
|
+
"semantic"
|
|
3473
|
+
]))
|
|
3990
3474
|
});
|
|
3991
3475
|
z.array(searchMatchRowSchema);
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3476
|
+
z.object({
|
|
3477
|
+
siteId: z.string().uuid(),
|
|
3478
|
+
vector: z.array(z.number().finite()).length(1536).nullable(),
|
|
3479
|
+
query: z.string().trim().nullable().default(null),
|
|
3480
|
+
labels: z.array(z.string()).default([]),
|
|
3481
|
+
fileFilter: z.enum(MEDIA_ASSET_FILE_FILTERS).default("all"),
|
|
3482
|
+
offset: z.number().int().nonnegative().default(0),
|
|
3483
|
+
preferredKind: z.literal("logo").nullable().default(null),
|
|
3484
|
+
limit: z.number().int().min(1).max(200).default(20),
|
|
3485
|
+
threshold: z.number().positive().default(1.5),
|
|
3486
|
+
libraryScope: z.enum(MEDIA_ASSET_LIBRARY_SCOPES).default("files-and-media")
|
|
3998
3487
|
});
|
|
3999
|
-
z.array(
|
|
3488
|
+
z.array(z.number().finite()).length(1536);
|
|
3489
|
+
z.enum([
|
|
3490
|
+
"committed",
|
|
3491
|
+
"conflict",
|
|
3492
|
+
"superseded",
|
|
3493
|
+
"claim-lost"
|
|
3494
|
+
]);
|
|
4000
3495
|
//#endregion
|
|
4001
3496
|
//#region ../media-storage-api/dist/index.mjs
|
|
4002
3497
|
const DEFAULT_MESSAGES = {
|
|
@@ -4007,7 +3502,7 @@ const DEFAULT_MESSAGES = {
|
|
|
4007
3502
|
update: "Failed to update media asset",
|
|
4008
3503
|
delete: "Failed to delete media asset"
|
|
4009
3504
|
};
|
|
4010
|
-
function isRecord$
|
|
3505
|
+
function isRecord$2(value) {
|
|
4011
3506
|
return typeof value === "object" && value !== null;
|
|
4012
3507
|
}
|
|
4013
3508
|
const normalizeLabels = (labels) => labels !== void 0 && labels.length > 0 ? labels.map((label) => label.trim()).filter((label) => label.length > 0).join(",") : void 0;
|
|
@@ -4041,7 +3536,7 @@ const filterUpdatePayload = (input) => {
|
|
|
4041
3536
|
return payload;
|
|
4042
3537
|
};
|
|
4043
3538
|
const extractErrorMessage = (body) => {
|
|
4044
|
-
if (!isRecord$
|
|
3539
|
+
if (!isRecord$2(body)) return typeof body === "string" && body.trim().length > 0 ? body : null;
|
|
4045
3540
|
for (const key of [
|
|
4046
3541
|
"error",
|
|
4047
3542
|
"message",
|
|
@@ -4054,11 +3549,11 @@ const extractErrorMessage = (body) => {
|
|
|
4054
3549
|
const details = body.details;
|
|
4055
3550
|
if (Array.isArray(details)) for (const entry of details) {
|
|
4056
3551
|
if (typeof entry === "string" && entry.trim().length > 0) return entry;
|
|
4057
|
-
if (isRecord$
|
|
3552
|
+
if (isRecord$2(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
4058
3553
|
}
|
|
4059
3554
|
const errors = body.errors;
|
|
4060
3555
|
if (Array.isArray(errors)) {
|
|
4061
|
-
for (const entry of errors) if (isRecord$
|
|
3556
|
+
for (const entry of errors) if (isRecord$2(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
4062
3557
|
}
|
|
4063
3558
|
return null;
|
|
4064
3559
|
};
|
|
@@ -4399,15 +3894,6 @@ function MediaEditorProvider({ siteId, apiClient, children, bucket = DEFAULT_MED
|
|
|
4399
3894
|
});
|
|
4400
3895
|
}
|
|
4401
3896
|
//#endregion
|
|
4402
|
-
//#region ../field-primitives/src/bindings/index.ts
|
|
4403
|
-
const BINDING_TRANSFORMS = {
|
|
4404
|
-
RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph",
|
|
4405
|
-
DATE_FORMAT_SHORT: "date.formatShort",
|
|
4406
|
-
DATE_FORMAT_LONG: "date.formatLong",
|
|
4407
|
-
TEXT_INLINE_TEXT: "text.inlineText"
|
|
4408
|
-
};
|
|
4409
|
-
Object.values(BINDING_TRANSFORMS);
|
|
4410
|
-
//#endregion
|
|
4411
3897
|
//#region ../preview-next/src/client/preview/PreviewAuthInit.tsx
|
|
4412
3898
|
function PreviewAuthInit({ children, session, siteId, siteSlug, pageId, token }) {
|
|
4413
3899
|
const lastInitRef = useRef(null);
|
|
@@ -4522,7 +4008,7 @@ function overlayValue(value, overlays) {
|
|
|
4522
4008
|
});
|
|
4523
4009
|
return changed ? next : value;
|
|
4524
4010
|
}
|
|
4525
|
-
if (!isRecord$
|
|
4011
|
+
if (!isRecord$1(value)) return value;
|
|
4526
4012
|
const match = matchingOverlay(value, overlays);
|
|
4527
4013
|
if (match) return overlaidEntry(value, match.meta, match.overlay);
|
|
4528
4014
|
let changed = false;
|
|
@@ -4581,7 +4067,7 @@ function renderedLinkedRevisions(dataContext) {
|
|
|
4581
4067
|
}
|
|
4582
4068
|
function linkedEntryOccurrences(value) {
|
|
4583
4069
|
if (Array.isArray(value)) return value.flatMap(linkedEntryOccurrences);
|
|
4584
|
-
if (!isRecord$
|
|
4070
|
+
if (!isRecord$1(value)) return [];
|
|
4585
4071
|
const meta = parseLinkedEntryMeta(value[LINKED_CONTENT_ENTRY_META_KEY]);
|
|
4586
4072
|
const nested = Object.entries(value).filter(([key]) => key !== LINKED_CONTENT_ENTRY_META_KEY).flatMap(([, child]) => linkedEntryOccurrences(child));
|
|
4587
4073
|
return meta ? [meta, ...nested] : nested;
|
|
@@ -4617,49 +4103,13 @@ function resolveOverlayTitle(content, meta) {
|
|
|
4617
4103
|
function parseLinkedEntryMeta(value) {
|
|
4618
4104
|
return getLinkedContentEntryMeta({ [LINKED_CONTENT_ENTRY_META_KEY]: value });
|
|
4619
4105
|
}
|
|
4620
|
-
function isRecord$
|
|
4106
|
+
function isRecord$1(value) {
|
|
4621
4107
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4622
4108
|
}
|
|
4623
4109
|
function overlayRevision(overlay, meta) {
|
|
4624
4110
|
return overlay.optimisticHash === void 0 ? meta.optimisticHash : overlay.optimisticHash;
|
|
4625
4111
|
}
|
|
4626
4112
|
//#endregion
|
|
4627
|
-
//#region ../preview-next/src/client/blocks/renderPrecedence.ts
|
|
4628
|
-
/** A block's content as the preview renders it, from the tab's render source. */
|
|
4629
|
-
function renderedBlockContent(uiStore, blockId) {
|
|
4630
|
-
const state = uiStore.getState();
|
|
4631
|
-
return resolveRenderedValues(renderSourceFor(state.editability), state.drafts.getBlockSnapshot(blockId), remoteDraftValues(state.remoteDrafts, {
|
|
4632
|
-
kind: "block",
|
|
4633
|
-
id: blockId
|
|
4634
|
-
}));
|
|
4635
|
-
}
|
|
4636
|
-
/**
|
|
4637
|
-
* An entry template page renders the entry's own fields from `contentEntry`. The
|
|
4638
|
-
* server sent them as they were on load; the editor's rendered values (local
|
|
4639
|
-
* edits, then another tab's live draft) take over from there.
|
|
4640
|
-
*/
|
|
4641
|
-
function withRenderedContentEntry(dataContext, content) {
|
|
4642
|
-
if (!dataContext?.contentEntry || !content) return dataContext;
|
|
4643
|
-
return {
|
|
4644
|
-
...dataContext,
|
|
4645
|
-
contentEntry: {
|
|
4646
|
-
...dataContext.contentEntry,
|
|
4647
|
-
...content
|
|
4648
|
-
}
|
|
4649
|
-
};
|
|
4650
|
-
}
|
|
4651
|
-
/** Loader data fetched in the browser replaces the server's, block by block. */
|
|
4652
|
-
function mergeResolvedDataContext(dataContext, liveResolvedData) {
|
|
4653
|
-
if (!dataContext || !liveResolvedData) return dataContext;
|
|
4654
|
-
return {
|
|
4655
|
-
...dataContext,
|
|
4656
|
-
resolvedData: {
|
|
4657
|
-
...dataContext.resolvedData ?? {},
|
|
4658
|
-
...liveResolvedData
|
|
4659
|
-
}
|
|
4660
|
-
};
|
|
4661
|
-
}
|
|
4662
|
-
//#endregion
|
|
4663
4113
|
//#region ../preview-next/src/client/blocks/useLinkedSaveHandoverRetention.ts
|
|
4664
4114
|
/**
|
|
4665
4115
|
* The host's refresh of its server data: the same callback live drafts give a viewer
|
|
@@ -5083,6 +4533,57 @@ function PreviewEditingModePersistence({ siteId }) {
|
|
|
5083
4533
|
return null;
|
|
5084
4534
|
}
|
|
5085
4535
|
//#endregion
|
|
4536
|
+
//#region ../preview-next/src/client/preview/PreviewScrollViewport.tsx
|
|
4537
|
+
/** The canvas can remount when the split pane opens or a phone tab changes. */
|
|
4538
|
+
function PreviewScrollViewport({ children }) {
|
|
4539
|
+
const viewportRef = useRef(null);
|
|
4540
|
+
const selection = usePreviewBlockCustomizeSelectionOptional();
|
|
4541
|
+
const blockId = selection?.selectedBlockId;
|
|
4542
|
+
useEffect(() => {
|
|
4543
|
+
const viewport = viewportRef.current;
|
|
4544
|
+
if (!blockId || !viewport) return;
|
|
4545
|
+
const frames = { pending: 0 };
|
|
4546
|
+
const reveal = () => {
|
|
4547
|
+
if (document.documentElement.getAttribute("data-rb-preview-mode") !== "edit") return;
|
|
4548
|
+
const block = viewport.querySelector(`[data-block-id="${CSS.escape(blockId)}"]`);
|
|
4549
|
+
if (!block) return;
|
|
4550
|
+
observer.disconnect();
|
|
4551
|
+
revealEditorElement(block);
|
|
4552
|
+
};
|
|
4553
|
+
const observer = new MutationObserver(() => {
|
|
4554
|
+
cancelAnimationFrame(frames.pending);
|
|
4555
|
+
frames.pending = requestAnimationFrame(reveal);
|
|
4556
|
+
});
|
|
4557
|
+
observer.observe(document.documentElement, {
|
|
4558
|
+
attributes: true,
|
|
4559
|
+
attributeFilter: ["data-rb-preview-mode"]
|
|
4560
|
+
});
|
|
4561
|
+
observer.observe(viewport, {
|
|
4562
|
+
childList: true,
|
|
4563
|
+
subtree: true
|
|
4564
|
+
});
|
|
4565
|
+
frames.pending = requestAnimationFrame(reveal);
|
|
4566
|
+
return () => {
|
|
4567
|
+
cancelAnimationFrame(frames.pending);
|
|
4568
|
+
observer.disconnect();
|
|
4569
|
+
};
|
|
4570
|
+
}, [blockId, selection?.selection.kind === "selected" ? selection.selection.requestId : 0]);
|
|
4571
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4572
|
+
className: "relative h-full min-h-0 overflow-hidden bg-muted/30",
|
|
4573
|
+
style: {
|
|
4574
|
+
contain: "layout paint",
|
|
4575
|
+
isolation: "isolate",
|
|
4576
|
+
transform: "translateZ(0)"
|
|
4577
|
+
},
|
|
4578
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4579
|
+
ref: viewportRef,
|
|
4580
|
+
"data-preview-scroll-viewport": "",
|
|
4581
|
+
className: "relative flex h-full min-h-0 flex-col overflow-auto",
|
|
4582
|
+
children
|
|
4583
|
+
})
|
|
4584
|
+
});
|
|
4585
|
+
}
|
|
4586
|
+
//#endregion
|
|
5086
4587
|
//#region ../preview-next/src/client/preview/previewSetupGuidance.ts
|
|
5087
4588
|
function resolvePreviewSetupBannerState(input) {
|
|
5088
4589
|
if (input.authMode === "onboardingGrant") return input.dashboardUnlocked ? "dashboard_ready" : "awaiting_confirmation";
|
|
@@ -5161,7 +4662,7 @@ function applyOnboardingConfirmationUpdate(state, update) {
|
|
|
5161
4662
|
...state,
|
|
5162
4663
|
statusLoadFailed: update.statusLoadFailed
|
|
5163
4664
|
};
|
|
5164
|
-
default: return assertNever$
|
|
4665
|
+
default: return assertNever$1(update);
|
|
5165
4666
|
}
|
|
5166
4667
|
}
|
|
5167
4668
|
function applyOnboardingConfirmationUpdates(state, updates) {
|
|
@@ -5437,29 +4938,29 @@ const INITIAL_ONBOARDING_CONFIRMATION_STATE = {
|
|
|
5437
4938
|
resendFeedback: null,
|
|
5438
4939
|
statusLoadFailed: false
|
|
5439
4940
|
};
|
|
5440
|
-
function isRecord
|
|
4941
|
+
function isRecord(value) {
|
|
5441
4942
|
return value !== null && typeof value === "object";
|
|
5442
4943
|
}
|
|
5443
4944
|
function getErrorMessageFromEnvelope(payload, fallback) {
|
|
5444
|
-
const error = isRecord
|
|
5445
|
-
const message = isRecord
|
|
4945
|
+
const error = isRecord(payload) ? payload.error : null;
|
|
4946
|
+
const message = isRecord(error) ? error.message : null;
|
|
5446
4947
|
return typeof message === "string" && message.trim().length > 0 ? message : fallback;
|
|
5447
4948
|
}
|
|
5448
4949
|
function isLaunchReadiness(value) {
|
|
5449
|
-
return isRecord
|
|
4950
|
+
return isRecord(value) && Array.isArray(value.requirements) && typeof value.pendingRequiredCount === "number" && typeof value.pendingRecommendedCount === "number" && typeof value.pendingOptionalCount === "number" && isRecord(value.goLiveDecision) && (value.goLiveDecision.kind === "allowed" || value.goLiveDecision.kind === "blocked");
|
|
5450
4951
|
}
|
|
5451
4952
|
function isOnboardingPreviewStatusResponse(value) {
|
|
5452
|
-
return isRecord
|
|
4953
|
+
return isRecord(value) && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
5453
4954
|
}
|
|
5454
4955
|
function isResendResult(value) {
|
|
5455
4956
|
if (value.result === "already_confirmed" || value.result === "limit_reached") return true;
|
|
5456
4957
|
return value.result === "resent" && typeof value.retryAfterSeconds === "number" && Number.isFinite(value.retryAfterSeconds) && value.retryAfterSeconds >= 0 && typeof value.limitReached === "boolean";
|
|
5457
4958
|
}
|
|
5458
4959
|
function isResendOnboardingPreviewConfirmationResponse(value) {
|
|
5459
|
-
return isRecord
|
|
4960
|
+
return isRecord(value) && isResendResult(value) && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
5460
4961
|
}
|
|
5461
4962
|
function getSuccessData(payload, isData) {
|
|
5462
|
-
if (!isRecord
|
|
4963
|
+
if (!isRecord(payload) || payload.success !== true || !isData(payload.data)) return null;
|
|
5463
4964
|
return payload.data;
|
|
5464
4965
|
}
|
|
5465
4966
|
function useOnboardingConfirmationCheck(input) {
|
|
@@ -7177,581 +6678,6 @@ function joinClassNames(...values) {
|
|
|
7177
6678
|
return className.length > 0 ? className : void 0;
|
|
7178
6679
|
}
|
|
7179
6680
|
//#endregion
|
|
7180
|
-
//#region ../preview-next/src/client/utils/path.ts
|
|
7181
|
-
const PATH_SEPARATOR_REGEX = /\./g;
|
|
7182
|
-
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
7183
|
-
function isRecord$1(value) {
|
|
7184
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7185
|
-
}
|
|
7186
|
-
function isPathContainer(value) {
|
|
7187
|
-
return Array.isArray(value) || isRecord$1(value);
|
|
7188
|
-
}
|
|
7189
|
-
function createPathContainer(nextIsIndex) {
|
|
7190
|
-
return nextIsIndex ? [] : {};
|
|
7191
|
-
}
|
|
7192
|
-
function ensureContainerProperty(container, key, nextIsIndex) {
|
|
7193
|
-
const existing = Reflect.get(container, key);
|
|
7194
|
-
if (isPathContainer(existing)) return existing;
|
|
7195
|
-
const nextContainer = createPathContainer(nextIsIndex);
|
|
7196
|
-
Reflect.set(container, key, nextContainer);
|
|
7197
|
-
return nextContainer;
|
|
7198
|
-
}
|
|
7199
|
-
function parsePath(path) {
|
|
7200
|
-
if (Array.isArray(path)) return path;
|
|
7201
|
-
const segments = [];
|
|
7202
|
-
const parts = path.split(PATH_SEPARATOR_REGEX);
|
|
7203
|
-
for (const raw of parts) {
|
|
7204
|
-
if (!raw) continue;
|
|
7205
|
-
const baseMatch = raw.match(/^[^\[]+/);
|
|
7206
|
-
if (baseMatch) {
|
|
7207
|
-
const base = baseMatch[1] ?? baseMatch[0];
|
|
7208
|
-
if (/^\d+$/.test(base)) segments.push(Number(base));
|
|
7209
|
-
else segments.push(base);
|
|
7210
|
-
}
|
|
7211
|
-
const bracketMatches = raw.matchAll(BRACKET_ACCESS_REGEX);
|
|
7212
|
-
for (const match of bracketMatches) {
|
|
7213
|
-
const token = match[1] ?? "";
|
|
7214
|
-
if (token.startsWith("\"") || token.startsWith("'")) segments.push(token.slice(1, -1));
|
|
7215
|
-
else if (/^\d+$/.test(token)) segments.push(Number(token));
|
|
7216
|
-
else segments.push(token);
|
|
7217
|
-
}
|
|
7218
|
-
if (!baseMatch && !raw.includes("[")) segments.push(raw);
|
|
7219
|
-
}
|
|
7220
|
-
return segments;
|
|
7221
|
-
}
|
|
7222
|
-
function setAtPath(target, path, value) {
|
|
7223
|
-
const segments = parsePath(path);
|
|
7224
|
-
let current = target;
|
|
7225
|
-
for (let index = 0; index < segments.length; index += 1) {
|
|
7226
|
-
const segment = segments[index];
|
|
7227
|
-
if (segment === void 0) continue;
|
|
7228
|
-
const isLast = index === segments.length - 1;
|
|
7229
|
-
const nextIsIndex = typeof segments[index + 1] === "number";
|
|
7230
|
-
if (isLast) {
|
|
7231
|
-
if (typeof segment === "number") {
|
|
7232
|
-
if (Array.isArray(current)) current[segment] = value;
|
|
7233
|
-
} else Reflect.set(current, segment, value);
|
|
7234
|
-
return;
|
|
7235
|
-
}
|
|
7236
|
-
if (typeof segment === "number") {
|
|
7237
|
-
if (Array.isArray(current)) {
|
|
7238
|
-
const existing = current[segment];
|
|
7239
|
-
if (isPathContainer(existing)) current = existing;
|
|
7240
|
-
else {
|
|
7241
|
-
const nextContainer = createPathContainer(nextIsIndex);
|
|
7242
|
-
current[segment] = nextContainer;
|
|
7243
|
-
current = nextContainer;
|
|
7244
|
-
}
|
|
7245
|
-
continue;
|
|
7246
|
-
}
|
|
7247
|
-
current = ensureContainerProperty(current, String(segment), nextIsIndex);
|
|
7248
|
-
continue;
|
|
7249
|
-
}
|
|
7250
|
-
current = ensureContainerProperty(current, segment, nextIsIndex);
|
|
7251
|
-
}
|
|
7252
|
-
}
|
|
7253
|
-
//#endregion
|
|
7254
|
-
//#region ../preview-next/src/client/blocks/previewProjection/aiProposalProjection.ts
|
|
7255
|
-
function previewProjectionsFromAiOverlays(overlays) {
|
|
7256
|
-
if (!overlays) return [];
|
|
7257
|
-
const overrides = overlays.overrides ?? /* @__PURE__ */ new Map();
|
|
7258
|
-
const projections = [];
|
|
7259
|
-
if (overlays.structure) projections.push({
|
|
7260
|
-
kind: "structure-overlay",
|
|
7261
|
-
source: "ai-proposal",
|
|
7262
|
-
viewMode: overlays.viewMode,
|
|
7263
|
-
proposalId: overlays.structure.proposalId,
|
|
7264
|
-
includeUnspecified: overlays.structure.includeUnspecified,
|
|
7265
|
-
before: overlays.structure.before,
|
|
7266
|
-
after: overlays.structure.after
|
|
7267
|
-
});
|
|
7268
|
-
if (overrides.size > 0) projections.push({
|
|
7269
|
-
kind: "content-field-overrides",
|
|
7270
|
-
source: "ai-proposal",
|
|
7271
|
-
viewMode: overlays.viewMode,
|
|
7272
|
-
overrides
|
|
7273
|
-
});
|
|
7274
|
-
return projections;
|
|
7275
|
-
}
|
|
7276
|
-
function toStringArray(value) {
|
|
7277
|
-
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
7278
|
-
}
|
|
7279
|
-
function applyStructureProjection(blockItems, projection) {
|
|
7280
|
-
const order = projection.viewMode === "before" ? toStringArray(projection.before.blockIds) : toStringArray(projection.after.blockIds);
|
|
7281
|
-
if (order.length === 0) return blockItems.slice();
|
|
7282
|
-
const itemsById = /* @__PURE__ */ new Map();
|
|
7283
|
-
const unknownIdItems = [];
|
|
7284
|
-
for (const item of blockItems) if (typeof item.id === "string") itemsById.set(item.id, item);
|
|
7285
|
-
else unknownIdItems.push(item);
|
|
7286
|
-
const next = [];
|
|
7287
|
-
const orderedSet = new Set(order);
|
|
7288
|
-
const addedBlocksById = /* @__PURE__ */ new Map();
|
|
7289
|
-
for (const added of projection.after.addedBlocks ?? []) {
|
|
7290
|
-
if (!added || typeof added !== "object") continue;
|
|
7291
|
-
if (typeof added.id !== "string") continue;
|
|
7292
|
-
if (typeof added.kind !== "string") continue;
|
|
7293
|
-
addedBlocksById.set(added.id, {
|
|
7294
|
-
id: added.id,
|
|
7295
|
-
kind: added.kind,
|
|
7296
|
-
content: added.content ?? null
|
|
7297
|
-
});
|
|
7298
|
-
}
|
|
7299
|
-
for (const id of order) {
|
|
7300
|
-
const item = itemsById.get(id);
|
|
7301
|
-
if (item) {
|
|
7302
|
-
next.push(item);
|
|
7303
|
-
continue;
|
|
7304
|
-
}
|
|
7305
|
-
const added = addedBlocksById.get(id);
|
|
7306
|
-
if (added) next.push(added);
|
|
7307
|
-
}
|
|
7308
|
-
if (projection.includeUnspecified !== false) {
|
|
7309
|
-
for (const item of blockItems) if (typeof item.id === "string" && !orderedSet.has(item.id)) next.push(item);
|
|
7310
|
-
}
|
|
7311
|
-
if (unknownIdItems.length > 0) next.push(...unknownIdItems);
|
|
7312
|
-
return next;
|
|
7313
|
-
}
|
|
7314
|
-
function applyContentFieldOverrideProjection(blockId, content, projection) {
|
|
7315
|
-
if (projection.overrides.size === 0) return content;
|
|
7316
|
-
const prefix = `blocks.${blockId}.`;
|
|
7317
|
-
let next = null;
|
|
7318
|
-
for (const [editorPath, override] of projection.overrides.entries()) {
|
|
7319
|
-
if (!editorPath.startsWith(prefix)) continue;
|
|
7320
|
-
const fieldPath = editorPath.slice(prefix.length);
|
|
7321
|
-
if (!next) next = cloneRecord(content);
|
|
7322
|
-
const value = projection.viewMode === "after" ? override.after : override.before;
|
|
7323
|
-
setAtPath(next, parsePath(fieldPath), value);
|
|
7324
|
-
}
|
|
7325
|
-
return next ?? content;
|
|
7326
|
-
}
|
|
7327
|
-
function blockHasContentFieldOverrideProjection(blockId, projection) {
|
|
7328
|
-
if (projection.overrides.size === 0) return false;
|
|
7329
|
-
const prefix = `blocks.${blockId}.`;
|
|
7330
|
-
for (const editorPath of projection.overrides.keys()) if (editorPath.startsWith(prefix)) return true;
|
|
7331
|
-
return false;
|
|
7332
|
-
}
|
|
7333
|
-
function cloneRecord(value) {
|
|
7334
|
-
if (!value) return {};
|
|
7335
|
-
return JSON.parse(JSON.stringify(value));
|
|
7336
|
-
}
|
|
7337
|
-
//#endregion
|
|
7338
|
-
//#region ../preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.ts
|
|
7339
|
-
function runtimeContentDecorationProjectionFromEditorModel(editorModel, surfaceResolutionContext, designRules, componentRules) {
|
|
7340
|
-
const compiled = compileEditorModelRuntime({
|
|
7341
|
-
editorModel,
|
|
7342
|
-
surfaceResolutionContext,
|
|
7343
|
-
designRules,
|
|
7344
|
-
componentRules
|
|
7345
|
-
});
|
|
7346
|
-
return {
|
|
7347
|
-
kind: "runtime-content-decoration",
|
|
7348
|
-
source: "page-design",
|
|
7349
|
-
fieldsByBlockId: runtimeFieldsByBlockId(compiled.blocks),
|
|
7350
|
-
joins: compiled.joins
|
|
7351
|
-
};
|
|
7352
|
-
}
|
|
7353
|
-
function runtimeFieldsByBlockId(blocks) {
|
|
7354
|
-
return new Map(blocks.map((block) => [block.blockId, block.fields]));
|
|
7355
|
-
}
|
|
7356
|
-
function applyRuntimeContentDecorationProjection(block, content, projection) {
|
|
7357
|
-
const blockId = designBlockIdFromBlockItem(block);
|
|
7358
|
-
const fields = blockId ? projection.fieldsByBlockId.get(blockId) : void 0;
|
|
7359
|
-
return applyCompiledRuntimeFieldsToContent(isRecord(content) ? content : {}, fields);
|
|
7360
|
-
}
|
|
7361
|
-
function designBlockIdFromBlockItem(block) {
|
|
7362
|
-
return typeof block.id === "string" && block.id.length > 0 ? asDesignBlockId(block.id) : null;
|
|
7363
|
-
}
|
|
7364
|
-
function isRecord(value) {
|
|
7365
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7366
|
-
}
|
|
7367
|
-
//#endregion
|
|
7368
|
-
//#region ../blocks/src/bindings/types.ts
|
|
7369
|
-
/**
|
|
7370
|
-
* Available transform function names.
|
|
7371
|
-
*/
|
|
7372
|
-
const TRANSFORMS = BINDING_TRANSFORMS;
|
|
7373
|
-
const BINDING_SOURCES = [
|
|
7374
|
-
"field",
|
|
7375
|
-
"meta",
|
|
7376
|
-
"literal",
|
|
7377
|
-
"transform",
|
|
7378
|
-
"fallback"
|
|
7379
|
-
];
|
|
7380
|
-
//#endregion
|
|
7381
|
-
//#region ../blocks/src/bindings/index.ts
|
|
7382
|
-
/**
|
|
7383
|
-
* Resolves a binding map to actual content values.
|
|
7384
|
-
*
|
|
7385
|
-
* Returns only keys whose binding resolved to a non-null, non-undefined value.
|
|
7386
|
-
* To merge resolved bindings over a base content object (the dashboard
|
|
7387
|
-
* template preview's use case), see {@link applyBindingsToContent}.
|
|
7388
|
-
*
|
|
7389
|
-
* @param bindings - Map of field keys to binding descriptors
|
|
7390
|
-
* @param context - Entry data context (fields and meta)
|
|
7391
|
-
* @returns Resolved content object with actual values
|
|
7392
|
-
*
|
|
7393
|
-
* @example
|
|
7394
|
-
* ```typescript
|
|
7395
|
-
* const content = applyBindings(
|
|
7396
|
-
* {
|
|
7397
|
-
* headline: { source: 'meta', path: 'title' },
|
|
7398
|
-
* body: { source: 'field', path: 'content' },
|
|
7399
|
-
* },
|
|
7400
|
-
* {
|
|
7401
|
-
* fields: { content: 'Hello world' },
|
|
7402
|
-
* meta: { title: 'My Post', slug: 'my-post' },
|
|
7403
|
-
* }
|
|
7404
|
-
* );
|
|
7405
|
-
* // Result: { headline: 'My Post', body: 'Hello world' }
|
|
7406
|
-
* ```
|
|
7407
|
-
*/
|
|
7408
|
-
function applyBindings(bindings, context) {
|
|
7409
|
-
const result = {};
|
|
7410
|
-
for (const [key, bindingSpec] of Object.entries(bindings)) {
|
|
7411
|
-
if (isBindingDescriptor(bindingSpec)) {
|
|
7412
|
-
const value = resolveBindingValue(bindingSpec, context);
|
|
7413
|
-
if (value !== void 0 && value !== null) setBindingValue(result, key, value);
|
|
7414
|
-
continue;
|
|
7415
|
-
}
|
|
7416
|
-
if (typeof bindingSpec === "string") {
|
|
7417
|
-
const value = resolveBindingValue({
|
|
7418
|
-
source: "field",
|
|
7419
|
-
path: bindingSpec
|
|
7420
|
-
}, context);
|
|
7421
|
-
if (value !== void 0 && value !== null) setBindingValue(result, key, value);
|
|
7422
|
-
continue;
|
|
7423
|
-
}
|
|
7424
|
-
if (isRecord$7(bindingSpec)) {
|
|
7425
|
-
const nested = applyBindings(bindingSpec, context);
|
|
7426
|
-
if (Object.keys(nested).length > 0) setBindingValue(result, key, nested);
|
|
7427
|
-
}
|
|
7428
|
-
}
|
|
7429
|
-
return result;
|
|
7430
|
-
}
|
|
7431
|
-
/**
|
|
7432
|
-
* Resolve a binding map and merge the result over a base content object.
|
|
7433
|
-
*
|
|
7434
|
-
* Use this when a block has *some* hard-coded content (from a template's
|
|
7435
|
-
* `block.content`) and *some* values driven by template bindings against
|
|
7436
|
-
* an entry. The base provides defaults; resolved bindings override them.
|
|
7437
|
-
*
|
|
7438
|
-
* Same null-handling as {@link applyBindings}: keys whose binding resolves
|
|
7439
|
-
* to `null`/`undefined` do NOT overwrite the base. This means "no resolved
|
|
7440
|
-
* value" leaves the base value (or absence) intact, which is the correct
|
|
7441
|
-
* semantic for both the SDK/frontend render paths and the dashboard preview.
|
|
7442
|
-
*
|
|
7443
|
-
* Replaces the dashboard's bespoke `applyBindings` that lived in
|
|
7444
|
-
* `apps/dashboard/src/lib/templates/applyBindings.ts` — its divergent
|
|
7445
|
-
* "always-set-null" behaviour produced the `subheadline: null` regression
|
|
7446
|
-
* documented in Phase 1.
|
|
7447
|
-
*
|
|
7448
|
-
* @example
|
|
7449
|
-
* ```typescript
|
|
7450
|
-
* const content = applyBindingsToContent(
|
|
7451
|
-
* { eyebrow: 'Default eyebrow', headline: 'Default headline' },
|
|
7452
|
-
* { headline: { source: 'meta', path: 'title' } },
|
|
7453
|
-
* { fields: {}, meta: { title: 'Entry title' } },
|
|
7454
|
-
* );
|
|
7455
|
-
* // Result: { eyebrow: 'Default eyebrow', headline: 'Entry title' }
|
|
7456
|
-
* ```
|
|
7457
|
-
*/
|
|
7458
|
-
function applyBindingsToContent(baseContent, bindings, context) {
|
|
7459
|
-
return mergeResolvedBindings(baseContent, applyBindings(bindings, context));
|
|
7460
|
-
}
|
|
7461
|
-
function mergeResolvedBindings(base, resolved) {
|
|
7462
|
-
const merged = { ...base };
|
|
7463
|
-
for (const [key, resolvedValue] of Object.entries(resolved)) {
|
|
7464
|
-
const baseValue = merged[key];
|
|
7465
|
-
merged[key] = isRecord$7(baseValue) && isRecord$7(resolvedValue) ? mergeResolvedBindings(baseValue, resolvedValue) : resolvedValue;
|
|
7466
|
-
}
|
|
7467
|
-
return merged;
|
|
7468
|
-
}
|
|
7469
|
-
function setBindingValue(target, path, value) {
|
|
7470
|
-
const segments = path.split(".").map((segment) => segment.trim()).filter(Boolean);
|
|
7471
|
-
if (segments.length === 0) return;
|
|
7472
|
-
const firstSegment = segments[0];
|
|
7473
|
-
if (!firstSegment) return;
|
|
7474
|
-
if (segments.length === 1) {
|
|
7475
|
-
target[firstSegment] = value;
|
|
7476
|
-
return;
|
|
7477
|
-
}
|
|
7478
|
-
const isIndex = (segment) => /^\d+$/.test(segment);
|
|
7479
|
-
let current = target;
|
|
7480
|
-
for (let i = 0; i < segments.length; i++) {
|
|
7481
|
-
const segment = segments[i];
|
|
7482
|
-
if (!segment) return;
|
|
7483
|
-
const last = i === segments.length - 1;
|
|
7484
|
-
const nextSegment = segments[i + 1];
|
|
7485
|
-
if (last) {
|
|
7486
|
-
if (Array.isArray(current) && isIndex(segment)) {
|
|
7487
|
-
current[Number(segment)] = value;
|
|
7488
|
-
return;
|
|
7489
|
-
}
|
|
7490
|
-
if (isRecord$7(current)) current[segment] = value;
|
|
7491
|
-
return;
|
|
7492
|
-
}
|
|
7493
|
-
const nextWantsArray = typeof nextSegment === "string" && isIndex(nextSegment);
|
|
7494
|
-
if (Array.isArray(current) && isIndex(segment)) {
|
|
7495
|
-
const index = Number(segment);
|
|
7496
|
-
const existing = current[index];
|
|
7497
|
-
if (nextWantsArray) {
|
|
7498
|
-
if (!Array.isArray(existing)) current[index] = [];
|
|
7499
|
-
} else if (!isRecord$7(existing)) current[index] = {};
|
|
7500
|
-
current = current[index];
|
|
7501
|
-
continue;
|
|
7502
|
-
}
|
|
7503
|
-
if (isRecord$7(current)) {
|
|
7504
|
-
const existing = current[segment];
|
|
7505
|
-
if (nextWantsArray) {
|
|
7506
|
-
if (!Array.isArray(existing)) current[segment] = [];
|
|
7507
|
-
} else if (!isRecord$7(existing)) current[segment] = {};
|
|
7508
|
-
current = current[segment];
|
|
7509
|
-
continue;
|
|
7510
|
-
}
|
|
7511
|
-
return;
|
|
7512
|
-
}
|
|
7513
|
-
}
|
|
7514
|
-
/**
|
|
7515
|
-
* Resolves a single binding descriptor to its value.
|
|
7516
|
-
*/
|
|
7517
|
-
function resolveBindingValue(descriptor, context) {
|
|
7518
|
-
switch (descriptor.source) {
|
|
7519
|
-
case "field": return descriptor.path ? getPath(context.fields, descriptor.path) : void 0;
|
|
7520
|
-
case "meta": return descriptor.path ? getPath(context.meta, descriptor.path) : void 0;
|
|
7521
|
-
case "literal": return descriptor.value;
|
|
7522
|
-
case "transform": {
|
|
7523
|
-
const inputDescriptor = descriptor.input && isBindingDescriptorLike(descriptor.input) ? normalizeBindingInput(descriptor.input) : descriptor.path ? normalizeBindingInput(descriptor.path) : null;
|
|
7524
|
-
const inputValue = inputDescriptor ? resolveBindingValue(inputDescriptor, context) : void 0;
|
|
7525
|
-
return applyTransform(descriptor.transform, inputValue, context.dateContext);
|
|
7526
|
-
}
|
|
7527
|
-
case "fallback":
|
|
7528
|
-
for (const option of descriptor.options ?? []) {
|
|
7529
|
-
const normalized = normalizeBindingInput(option);
|
|
7530
|
-
if (!normalized) continue;
|
|
7531
|
-
const value = resolveBindingValue(normalized, context);
|
|
7532
|
-
if (value !== void 0 && value !== null && value !== "") return value;
|
|
7533
|
-
}
|
|
7534
|
-
return null;
|
|
7535
|
-
default: return null;
|
|
7536
|
-
}
|
|
7537
|
-
}
|
|
7538
|
-
/**
|
|
7539
|
-
* Gets a nested path from an object.
|
|
7540
|
-
*/
|
|
7541
|
-
function getPath(source, path) {
|
|
7542
|
-
const segments = path.split(".").map((segment) => segment.trim()).filter(Boolean);
|
|
7543
|
-
let current = source;
|
|
7544
|
-
for (const segment of segments) {
|
|
7545
|
-
if (!isRecord$7(current)) return void 0;
|
|
7546
|
-
current = current[segment];
|
|
7547
|
-
}
|
|
7548
|
-
return current;
|
|
7549
|
-
}
|
|
7550
|
-
/**
|
|
7551
|
-
* Applies a transform function to a value.
|
|
7552
|
-
*/
|
|
7553
|
-
function applyTransform(name, value, dateContext) {
|
|
7554
|
-
if (!name) return value;
|
|
7555
|
-
switch (name) {
|
|
7556
|
-
case TRANSFORMS.RICHTEXT_FIRST_PARAGRAPH: return extractFirstParagraph(value);
|
|
7557
|
-
case TRANSFORMS.DATE_FORMAT_SHORT: return formatDate(value, dateContext, { date: "short" });
|
|
7558
|
-
case TRANSFORMS.DATE_FORMAT_LONG: return formatDate(value, dateContext, {
|
|
7559
|
-
date: "long",
|
|
7560
|
-
includeTime: true
|
|
7561
|
-
});
|
|
7562
|
-
case TRANSFORMS.TEXT_INLINE_TEXT: return textToInlineText(value);
|
|
7563
|
-
default: return value;
|
|
7564
|
-
}
|
|
7565
|
-
}
|
|
7566
|
-
function textToInlineText(value) {
|
|
7567
|
-
if (typeof value !== "string") return null;
|
|
7568
|
-
return plainTextToInlineText(value);
|
|
7569
|
-
}
|
|
7570
|
-
/**
|
|
7571
|
-
* Extracts the first paragraph text from a TipTap/ProseMirror document.
|
|
7572
|
-
*
|
|
7573
|
-
* Accepts the canonical unwrapped form (`{ type: 'doc', content: [...] }`).
|
|
7574
|
-
*/
|
|
7575
|
-
function extractFirstParagraph(value) {
|
|
7576
|
-
if (!isRichTextDoc(value)) return null;
|
|
7577
|
-
for (const node of value.content) {
|
|
7578
|
-
if (!isRecord$7(node)) continue;
|
|
7579
|
-
if (node.type !== "paragraph" || !Array.isArray(node.content)) continue;
|
|
7580
|
-
const text = node.content.filter((item) => item.type === "text").map((item) => typeof item.text === "string" ? item.text : "").join("").trim();
|
|
7581
|
-
if (text.length > 0) return text;
|
|
7582
|
-
}
|
|
7583
|
-
return null;
|
|
7584
|
-
}
|
|
7585
|
-
/**
|
|
7586
|
-
* Type guard to check if a value is a valid binding descriptor.
|
|
7587
|
-
*/
|
|
7588
|
-
function isBindingDescriptor(value) {
|
|
7589
|
-
if (!isRecord$7(value) || typeof value.source !== "string") return false;
|
|
7590
|
-
if (!BINDING_SOURCES.includes(value.source)) return false;
|
|
7591
|
-
switch (value.source) {
|
|
7592
|
-
case "field":
|
|
7593
|
-
case "meta": return typeof value.path === "string";
|
|
7594
|
-
case "literal": return "value" in value;
|
|
7595
|
-
case "transform": return typeof value.transform === "string" && (value.input === void 0 || isBindingDescriptorLike(value.input)) && (value.path === void 0 || typeof value.path === "string");
|
|
7596
|
-
case "fallback": return Array.isArray(value.options);
|
|
7597
|
-
default: return false;
|
|
7598
|
-
}
|
|
7599
|
-
}
|
|
7600
|
-
/**
|
|
7601
|
-
* Type guard to check if a value is binding-descriptor-like (can be normalized).
|
|
7602
|
-
*/
|
|
7603
|
-
function isBindingDescriptorLike(value) {
|
|
7604
|
-
return isBindingDescriptor(value) || typeof value === "string" || isRecord$7(value) && typeof value.source === "string" && typeof value.path === "string";
|
|
7605
|
-
}
|
|
7606
|
-
/**
|
|
7607
|
-
* Normalizes a binding input to a binding descriptor.
|
|
7608
|
-
*
|
|
7609
|
-
* Converts string shorthand to field descriptors and validates
|
|
7610
|
-
* that objects have valid binding source values.
|
|
7611
|
-
*/
|
|
7612
|
-
function normalizeBindingInput(value) {
|
|
7613
|
-
if (isBindingDescriptor(value)) return value;
|
|
7614
|
-
if (typeof value === "string") return {
|
|
7615
|
-
source: "field",
|
|
7616
|
-
path: value
|
|
7617
|
-
};
|
|
7618
|
-
return null;
|
|
7619
|
-
}
|
|
7620
|
-
//#endregion
|
|
7621
|
-
//#region ../preview-next/src/client/blocks/previewProjection/entryFieldRebinding.ts
|
|
7622
|
-
/**
|
|
7623
|
-
* Only the entry fields that changed are bound in again: unchanged fields keep
|
|
7624
|
-
* the server's materialised value, which may be richer than the stored one
|
|
7625
|
-
* (media the loaders have hydrated, for instance).
|
|
7626
|
-
*/
|
|
7627
|
-
function entryFieldRebindingProjection(changedFields, dateContext) {
|
|
7628
|
-
return Object.keys(changedFields).length === 0 ? null : {
|
|
7629
|
-
kind: "entry-field-rebinding",
|
|
7630
|
-
source: "entry-draft",
|
|
7631
|
-
changedFields,
|
|
7632
|
-
dateContext
|
|
7633
|
-
};
|
|
7634
|
-
}
|
|
7635
|
-
/**
|
|
7636
|
-
* Binds the changed entry fields into a block with template bindings. A binding
|
|
7637
|
-
* whose source did not change resolves to nothing and leaves the content as it is.
|
|
7638
|
-
*/
|
|
7639
|
-
function applyEntryFieldRebindingProjection(block, content, projection) {
|
|
7640
|
-
if (!isRecord$7(block.bindings)) return content;
|
|
7641
|
-
return applyBindingsToContent(content ?? {}, block.bindings, {
|
|
7642
|
-
fields: { ...projection.changedFields },
|
|
7643
|
-
meta: {},
|
|
7644
|
-
dateContext: projection.dateContext
|
|
7645
|
-
});
|
|
7646
|
-
}
|
|
7647
|
-
//#endregion
|
|
7648
|
-
//#region ../preview-next/src/client/blocks/previewProjection/applyPreviewProjections.ts
|
|
7649
|
-
function applyPreviewStructureProjections(blockItems, projections) {
|
|
7650
|
-
return projections.reduce((current, projection) => {
|
|
7651
|
-
if (projection.kind !== "structure-overlay") return current;
|
|
7652
|
-
return applyStructureProjection(current, projection);
|
|
7653
|
-
}, blockItems.slice());
|
|
7654
|
-
}
|
|
7655
|
-
function applyPreviewContentFieldProjections(blockId, content, projections) {
|
|
7656
|
-
return projections.reduce((current, projection) => {
|
|
7657
|
-
if (projection.kind !== "content-field-overrides") return current;
|
|
7658
|
-
return applyContentFieldOverrideProjection(blockId, current, projection);
|
|
7659
|
-
}, content);
|
|
7660
|
-
}
|
|
7661
|
-
function applyPreviewRuntimeContentProjections(block, content, projections) {
|
|
7662
|
-
return projections.reduce((current, projection) => {
|
|
7663
|
-
if (projection.kind === "entry-field-rebinding") return applyEntryFieldRebindingProjection(block, current, projection);
|
|
7664
|
-
if (projection.kind !== "runtime-content-decoration") return current;
|
|
7665
|
-
return applyRuntimeContentDecorationProjection(block, current, projection);
|
|
7666
|
-
}, content);
|
|
7667
|
-
}
|
|
7668
|
-
function blockHasPreviewContentFieldProjection(blockId, projections) {
|
|
7669
|
-
return projections.some((projection) => projection.kind === "content-field-overrides" && blockHasContentFieldOverrideProjection(blockId, projection));
|
|
7670
|
-
}
|
|
7671
|
-
//#endregion
|
|
7672
|
-
//#region ../preview-next/src/client/blocks/pageDesignRuntimePreview.ts
|
|
7673
|
-
function resolveRuntimePreviewSourceForTheme(pageDesignState, theme) {
|
|
7674
|
-
if (!theme?.palette) return resolveRuntimePreviewSource({
|
|
7675
|
-
pageDesignState,
|
|
7676
|
-
surfaceResolutionContext: null
|
|
7677
|
-
});
|
|
7678
|
-
return resolveRuntimePreviewSource({
|
|
7679
|
-
pageDesignState,
|
|
7680
|
-
surfaceResolutionContext: surfaceResolutionContextFromTheme(theme),
|
|
7681
|
-
designRules: designRuntimeRulesForTheme(theme),
|
|
7682
|
-
componentRules: componentRuntimeRulesForTheme(theme)
|
|
7683
|
-
});
|
|
7684
|
-
}
|
|
7685
|
-
function applyPageDesignRuntimeFieldsToBlockContent(block, content, source) {
|
|
7686
|
-
if (source.kind === "preserve-server-runtime") return content;
|
|
7687
|
-
return applyPreviewRuntimeContentProjections(block, content, [runtimeContentDecorationProjectionFromEditorModel(source.editorModel, source.surfaceResolutionContext, source.designRules, source.componentRules)]);
|
|
7688
|
-
}
|
|
7689
|
-
function pageDesignRuntimeProjectionFromSource(source) {
|
|
7690
|
-
if (source.kind === "preserve-server-runtime") return null;
|
|
7691
|
-
return runtimeContentDecorationProjectionFromEditorModel(source.editorModel, source.surfaceResolutionContext, source.designRules, source.componentRules);
|
|
7692
|
-
}
|
|
7693
|
-
function resolveRuntimePreviewSource(input) {
|
|
7694
|
-
if (input.pageDesignState.kind === "loaded" && input.surfaceResolutionContext) return {
|
|
7695
|
-
kind: "apply-editor-model",
|
|
7696
|
-
editorModel: input.pageDesignState.editorModel,
|
|
7697
|
-
surfaceResolutionContext: input.surfaceResolutionContext,
|
|
7698
|
-
designRules: input.designRules,
|
|
7699
|
-
componentRules: input.componentRules
|
|
7700
|
-
};
|
|
7701
|
-
return { kind: "preserve-server-runtime" };
|
|
7702
|
-
}
|
|
7703
|
-
//#endregion
|
|
7704
|
-
//#region ../preview-next/src/client/preview/usePreviewOpeningTheme.ts
|
|
7705
|
-
const noSubscription = () => () => {};
|
|
7706
|
-
const noSnapshot = () => null;
|
|
7707
|
-
/** Select opening inputs; project canonical theme once, and retain it while ink is unchanged. */
|
|
7708
|
-
function usePreviewOpeningTheme(documentTheme) {
|
|
7709
|
-
const store = useOptionalEditorUiStoreInstance();
|
|
7710
|
-
const { state } = usePreviewPageDesignEditorState();
|
|
7711
|
-
const chrome = useSiteChromeCustomizeOptional();
|
|
7712
|
-
const { persistenceOverlayTheme: theme } = usePreviewThemeOverlay();
|
|
7713
|
-
const opening = state.kind === "loaded" ? state.editorModel.blocks[0] : null;
|
|
7714
|
-
const blockId = opening ? unsafeAsEditorBlockId(opening.blockId) : null;
|
|
7715
|
-
const selectContent = useCallback(() => store && blockId ? renderedBlockContent(store, blockId) : null, [store, blockId]);
|
|
7716
|
-
const content = useSyncExternalStore(store?.subscribe ?? noSubscription, selectContent, noSnapshot);
|
|
7717
|
-
const selectOverlays = useCallback(() => store?.getState().aiOverlays ?? null, [store]);
|
|
7718
|
-
const overlays = useSyncExternalStore(store?.subscribe ?? noSubscription, selectOverlays, noSnapshot);
|
|
7719
|
-
const recipe = previewOpeningHeaderRecipe(theme, chrome);
|
|
7720
|
-
const foreground = useMemo(() => {
|
|
7721
|
-
if (!opening || !blockId || !content || state.kind !== "loaded") return null;
|
|
7722
|
-
const projected = applyPreviewContentFieldProjections(blockId, content, overlays ? previewProjectionsFromAiOverlays(overlays) : []);
|
|
7723
|
-
const finalContent = applyPageDesignRuntimeFieldsToBlockContent({
|
|
7724
|
-
id: blockId,
|
|
7725
|
-
kind: opening.blockKind,
|
|
7726
|
-
content
|
|
7727
|
-
}, projected, resolveRuntimePreviewSourceForTheme(state, theme));
|
|
7728
|
-
return resolveBlockSectionForeground({
|
|
7729
|
-
kind: opening.blockKind,
|
|
7730
|
-
content: finalContent
|
|
7731
|
-
}, theme, "authoring");
|
|
7732
|
-
}, [
|
|
7733
|
-
opening,
|
|
7734
|
-
blockId,
|
|
7735
|
-
content,
|
|
7736
|
-
overlays,
|
|
7737
|
-
state,
|
|
7738
|
-
theme
|
|
7739
|
-
]);
|
|
7740
|
-
return useMemo(() => foreground && recipe ? applyPageOpeningForegroundToTheme(theme, recipe, { openingForeground: foreground }) : documentTheme, [
|
|
7741
|
-
theme,
|
|
7742
|
-
recipe,
|
|
7743
|
-
JSON.stringify(foreground),
|
|
7744
|
-
documentTheme
|
|
7745
|
-
]);
|
|
7746
|
-
}
|
|
7747
|
-
function previewOpeningHeaderRecipe(theme, chrome) {
|
|
7748
|
-
const header = chrome?.getSurfaceState("header");
|
|
7749
|
-
if (header?.kind !== "available" || header.surface !== "header") return null;
|
|
7750
|
-
const background = theme.header.background;
|
|
7751
|
-
if (background?.type === "color" && background.color !== "transparent") return null;
|
|
7752
|
-
return headerStyleRecipeForTheme(theme, header.currentId);
|
|
7753
|
-
}
|
|
7754
|
-
//#endregion
|
|
7755
6681
|
//#region ../preview-next/src/client/preview/previewDocumentFrame.ts
|
|
7756
6682
|
const PREVIEW_DOCUMENT_FRAME_CLASS_NAME = "builder-preview-document-frame";
|
|
7757
6683
|
function planPreviewDocumentFrame(input) {
|
|
@@ -7828,8 +6754,8 @@ function renderPreviewHeader(model, theme, fallback) {
|
|
|
7828
6754
|
});
|
|
7829
6755
|
}
|
|
7830
6756
|
function PreviewThemedSiteDocument({ children, themeRuntime = defaultPreviewThemeRuntime, useContainerResponsiveMode, viewportMode, viewportWidth, scale, contentHeight, scaleContainerRef, contentRef, staticHeaderNode, bannerNode, staticFooterNode, siteChromeRenderModel }) {
|
|
7831
|
-
const
|
|
7832
|
-
const effectiveTheme =
|
|
6757
|
+
const compiled = usePreviewCompiledTheme();
|
|
6758
|
+
const effectiveTheme = compiled.theme;
|
|
7833
6759
|
const headerNode = renderPreviewHeader(siteChromeRenderModel, effectiveTheme, staticHeaderNode);
|
|
7834
6760
|
const siteDocumentPlan = planPreviewSiteDocument(effectiveTheme, bannerNode, headerNode);
|
|
7835
6761
|
const footerNode = renderPreviewFooter(siteChromeRenderModel, effectiveTheme, staticFooterNode);
|
|
@@ -7846,7 +6772,7 @@ function PreviewThemedSiteDocument({ children, themeRuntime = defaultPreviewThem
|
|
|
7846
6772
|
footerNode,
|
|
7847
6773
|
children
|
|
7848
6774
|
});
|
|
7849
|
-
return renderThemedDocument(themeRuntime,
|
|
6775
|
+
return renderThemedDocument(themeRuntime, compiled, resolveDocumentResponsiveMode(themeRuntime, useContainerResponsiveMode), documentNode);
|
|
7850
6776
|
}
|
|
7851
6777
|
/**
|
|
7852
6778
|
* The shell marks whatever banner it's given, so preview chrome can stay clear
|
|
@@ -7868,10 +6794,12 @@ function renderPreviewFooter(model, theme, fallback) {
|
|
|
7868
6794
|
children: renderSiteChromeBlock(model, "footer", theme, { themeConfigOverrideMode: "ignore" })
|
|
7869
6795
|
});
|
|
7870
6796
|
}
|
|
7871
|
-
function renderThemedDocument(runtime,
|
|
6797
|
+
function renderThemedDocument(runtime, compiled, responsiveMode, documentNode) {
|
|
7872
6798
|
switch (runtime.kind) {
|
|
7873
|
-
case "cms-theme": return /* @__PURE__ */ jsx(
|
|
7874
|
-
|
|
6799
|
+
case "cms-theme": return /* @__PURE__ */ jsx(ThemeScopeCore, {
|
|
6800
|
+
...themeRuntimeScopeProps(compiled.runtime),
|
|
6801
|
+
dataAttrs: buildThemeDataAttrs(compiled.theme.axes, "theme-default", compiled.theme.skin),
|
|
6802
|
+
suppressHydrationWarning: true,
|
|
7875
6803
|
responsiveMode,
|
|
7876
6804
|
className: "rb-flex rb-flex-1 rb-flex-col",
|
|
7877
6805
|
children: documentNode
|
|
@@ -7882,7 +6810,7 @@ function renderThemedDocument(runtime, effectiveTheme, responsiveMode, documentN
|
|
|
7882
6810
|
children: documentNode
|
|
7883
6811
|
});
|
|
7884
6812
|
case "none": return documentNode;
|
|
7885
|
-
default: return assertNever$
|
|
6813
|
+
default: return assertNever$1(runtime);
|
|
7886
6814
|
}
|
|
7887
6815
|
}
|
|
7888
6816
|
function PreviewOverrideOnlySiteDocument({ children, runtime, useContainerResponsiveMode, viewportMode, viewportWidth, scale, contentHeight, scaleContainerRef, contentRef }) {
|
|
@@ -8046,26 +6974,11 @@ function resolveShellThemeRoles(props) {
|
|
|
8046
6974
|
}
|
|
8047
6975
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
8048
6976
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
8049
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
6977
|
+
return { default: (await import("./PreviewEditorSidebar-C3AQVxQt.mjs")).PreviewEditorSidebar };
|
|
8050
6978
|
});
|
|
8051
6979
|
const PreviewEditorUI = React.lazy(async () => {
|
|
8052
|
-
return { default: (await import("./PreviewEditorUI-
|
|
6980
|
+
return { default: (await import("./PreviewEditorUI-C-1zDCR_.mjs")).PreviewEditorUI };
|
|
8053
6981
|
});
|
|
8054
|
-
const previewPaneContainmentStyle = {
|
|
8055
|
-
contain: "layout paint",
|
|
8056
|
-
isolation: "isolate",
|
|
8057
|
-
transform: "translateZ(0)"
|
|
8058
|
-
};
|
|
8059
|
-
function PreviewScrollViewport({ children }) {
|
|
8060
|
-
return /* @__PURE__ */ jsx("div", {
|
|
8061
|
-
className: "relative h-full min-h-0 overflow-hidden bg-muted/30",
|
|
8062
|
-
style: previewPaneContainmentStyle,
|
|
8063
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
8064
|
-
className: "relative flex h-full min-h-0 flex-col overflow-auto",
|
|
8065
|
-
children
|
|
8066
|
-
})
|
|
8067
|
-
});
|
|
8068
|
-
}
|
|
8069
6982
|
function renderShellProviders(input) {
|
|
8070
6983
|
if (!input.themeRoles) return input.content;
|
|
8071
6984
|
const { props, themeRoles } = input;
|
|
@@ -8091,7 +7004,10 @@ function renderShellProviders(input) {
|
|
|
8091
7004
|
headerLogoContext: props.themeSelectionHeaderLogo,
|
|
8092
7005
|
siteStyleAccess: input.siteStyleAccess,
|
|
8093
7006
|
canOpenDesignEditor: props.entryData == null && props.pageId !== null && canInspectSiteStyle(input.siteStyleAccess),
|
|
8094
|
-
children:
|
|
7007
|
+
children: /* @__PURE__ */ jsx(PreviewCompiledThemeProvider, {
|
|
7008
|
+
responsiveMode: previewCompiledResponsiveMode(props),
|
|
7009
|
+
children: input.content
|
|
7010
|
+
})
|
|
8095
7011
|
}) })
|
|
8096
7012
|
});
|
|
8097
7013
|
}
|
|
@@ -8362,6 +7278,10 @@ function usePreviewDrawerOpen() {
|
|
|
8362
7278
|
const drawerOpen = useEditorUiStore((s) => s.drawerOpen);
|
|
8363
7279
|
return requestedEditingMode && drawerOpen;
|
|
8364
7280
|
}
|
|
7281
|
+
function previewCompiledResponsiveMode(props) {
|
|
7282
|
+
const runtime = props.themeRuntime;
|
|
7283
|
+
return runtime && runtime.kind !== "none" && runtime.responsiveMode ? runtime.responsiveMode : previewContainerResponsiveEnabled ? "container" : "viewport";
|
|
7284
|
+
}
|
|
8365
7285
|
//#endregion
|
|
8366
7286
|
//#region ../preview-next/src/client/preview/PreviewSessionJournalHost.tsx
|
|
8367
7287
|
/** Preview supplies its existing server refresh to the shared document-session host. */
|
|
@@ -8975,16 +7895,31 @@ function BlockToolbar({ placement = DEFAULT_PREVIEW_CHROME_FLOATING_PLACEMENT, .
|
|
|
8975
7895
|
})
|
|
8976
7896
|
]
|
|
8977
7897
|
});
|
|
8978
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
7898
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
7899
|
+
/* @__PURE__ */ jsx("span", {
|
|
7900
|
+
ref: selection.probeRef,
|
|
7901
|
+
"aria-hidden": "true"
|
|
7902
|
+
}),
|
|
7903
|
+
/* @__PURE__ */ jsx(BlockSelectionFrame, {
|
|
7904
|
+
selected: selection.selected,
|
|
7905
|
+
element: selection.blockElement
|
|
7906
|
+
}),
|
|
7907
|
+
/* @__PURE__ */ jsx(ToolbarPlacement, {
|
|
7908
|
+
blockId: input.blockId,
|
|
7909
|
+
placement,
|
|
7910
|
+
selected: selection.selected,
|
|
7911
|
+
phone: selection.phone,
|
|
7912
|
+
children: row
|
|
7913
|
+
})
|
|
7914
|
+
] });
|
|
7915
|
+
}
|
|
7916
|
+
/** A separate frame preserves the site's own borders, shadows and outlines. */
|
|
7917
|
+
function BlockSelectionFrame({ selected, element }) {
|
|
7918
|
+
return selected && element ? createPortal(/* @__PURE__ */ jsx("div", {
|
|
7919
|
+
"aria-hidden": "true",
|
|
7920
|
+
"data-preview-block-selection-frame": "",
|
|
7921
|
+
className: "pointer-events-none absolute inset-0 z-10 border-2 border-sky-500"
|
|
7922
|
+
}), element) : null;
|
|
8988
7923
|
}
|
|
8989
7924
|
function useBlockToolbar(input) {
|
|
8990
7925
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -9032,7 +7967,6 @@ function useBlockToolbar(input) {
|
|
|
9032
7967
|
function useOpenBlockSidebar(blockId, uiStore) {
|
|
9033
7968
|
const selection = usePreviewBlockCustomizeSelectionOptional();
|
|
9034
7969
|
const open = () => {
|
|
9035
|
-
selection?.selectBlock(blockId);
|
|
9036
7970
|
selection?.inspectBlock(blockId);
|
|
9037
7971
|
uiStore.getState().setDrawerOpen(true);
|
|
9038
7972
|
};
|
|
@@ -9412,7 +8346,7 @@ function boundaryBreakDisplay(boundary) {
|
|
|
9412
8346
|
canReset: true,
|
|
9413
8347
|
resetLabel: "Use default break"
|
|
9414
8348
|
};
|
|
9415
|
-
default: return assertNever$
|
|
8349
|
+
default: return assertNever$2(boundary.breakChoice, "Unhandled boundary break choice");
|
|
9416
8350
|
}
|
|
9417
8351
|
}
|
|
9418
8352
|
/**
|
|
@@ -9437,7 +8371,7 @@ function autoBoundaryBreakDisplay(source, label) {
|
|
|
9437
8371
|
canReset: false,
|
|
9438
8372
|
resetLabel: "Default"
|
|
9439
8373
|
};
|
|
9440
|
-
default: return assertNever$
|
|
8374
|
+
default: return assertNever$2(source, "Unhandled boundary default source");
|
|
9441
8375
|
}
|
|
9442
8376
|
}
|
|
9443
8377
|
function formatBlockKindLabel(blockKind) {
|
|
@@ -9775,6 +8709,10 @@ function EditableDraftPageRenderer(props) {
|
|
|
9775
8709
|
return /* @__PURE__ */ jsx(EditorPageRenderer, {
|
|
9776
8710
|
...pageRendererProps,
|
|
9777
8711
|
page: renderPage,
|
|
8712
|
+
wrapPage: (plan, rendered) => /* @__PURE__ */ jsx(PreviewRenderPlanProjection, {
|
|
8713
|
+
plan,
|
|
8714
|
+
children: rendered
|
|
8715
|
+
}),
|
|
9778
8716
|
runtimeJoins,
|
|
9779
8717
|
registry: allowInlineEditing ? editorRegistry : pageRendererProps.registry ?? clientComponentRegistry,
|
|
9780
8718
|
wrapBlock: allowInlineEditing ? wrapBlockWithProvider : pageRendererProps.wrapBlock,
|