@riverbankcms/sdk 0.145.0 → 0.147.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 +29 -0
- package/dist/{PreviewEditorSidebar-O-V6Pl5a.mjs → PreviewEditorSidebar-DtpB3_sS.mjs} +51 -33
- package/dist/{PreviewEditorUI-1UlX_9cw.mjs → PreviewEditorUI-DxTLgaHo.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BxGwdOCV.mjs → PreviewQueryProvider-Dd4dxOiU.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DYbA_4iv.mjs → SdkPreviewModeRuntime-DMMNCngt.mjs} +311 -186
- package/dist/{SiteChromeCustomizeContext-CNTKQ9nx.mjs → SiteChromeCustomizeContext-DQXZXiqS.mjs} +3808 -2395
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1122 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +102 -0
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/bookingConfig.d.ts +24 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +11 -26
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -44
- package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
- package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +11 -49
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
- package/dist/_dts/api/src/bookings.d.ts +1 -0
- package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
- package/dist/_dts/api/src/communications.d.ts +20 -4
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -7
- package/dist/_dts/api/src/endpoints.d.ts +816 -655
- package/dist/_dts/api/src/event-visibility.d.ts +20 -0
- package/dist/_dts/api/src/eventManagementContracts.d.ts +72 -4
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
- package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
- package/dist/_dts/api/src/index.d.ts +9 -2
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +19 -6
- package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
- package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
- package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +57 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +29 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +48 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +55 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
- package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
- package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
- package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
- package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
- package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +6 -49
- package/dist/_dts/api/src/siteOnboarding.d.ts +72 -18
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/types.d.ts +7 -1
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +29 -1
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +34 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
- package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -5
- package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
- package/dist/_dts/core/src/editor-state.d.ts +2 -7
- package/dist/_dts/core/src/index.d.ts +2 -1
- package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
- package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +9 -1
- package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
- package/dist/_dts/core/src/participants.d.ts +0 -38
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
- package/dist/_dts/core/src/public-profile.d.ts +3 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +151 -24
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -8
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +5 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -2
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +5 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +9 -0
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
- package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
- package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
- package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
- package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
- package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
- package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
- package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
- package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
- package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
- package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
- package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
- package/dist/_dts/ui/src/badge.d.ts +2 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
- package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
- package/dist/_dts/ui/src/combobox.d.ts +26 -1
- package/dist/_dts/ui/src/date-picker.d.ts +5 -8
- package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
- package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
- package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
- package/dist/_dts/ui/src/index.d.ts +4 -1
- package/dist/_dts/ui/src/native-select.d.ts +8 -0
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -1
- package/dist/_dts/ui/src/popover.d.ts +7 -1
- package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
- package/dist/_dts/ui/src/surface.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-DlVOmpW4.mjs → BookingMailingListNote-1n4Ch_u_.mjs} +15 -4
- package/dist/client/CheckboxChoice-B33MqoUo.mjs +24 -0
- package/dist/client/{DiscountCodeDisclosure-T9q623PQ.mjs → DiscountCodeDisclosure-CKJtz0mY.mjs} +1 -1
- package/dist/client/{EventCombined.client-DnsUeONl.mjs → EventCombined.client-C0pgma9y.mjs} +7 -7
- package/dist/client/{EventListing.client-CNBFqJS4.mjs → EventListing.client-4fhLOvHP.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-C7higg52.mjs → LeafletStaticMap-DScC4F3w.mjs} +1 -1
- package/dist/client/{scrollToBlock-CWs8EIdo.mjs → TerminalPanel-B5ZUsYhe.mjs} +77 -77
- package/dist/client/{ThemedButton-LAJTNrS8.mjs → ThemedButton-DoVIV1Ao.mjs} +2 -2
- package/dist/client/{accordion-BcNF9TjX.mjs → accordion-CoT5g7zo.mjs} +1 -1
- package/dist/client/{bookingForm-BUaQ3S03.mjs → bookingForm-BWxB46xD.mjs} +251 -150
- package/dist/client/bookings.mjs +415 -234
- package/dist/client/{carousel-CTdF6e0V.mjs → carousel-DtNYWFd3.mjs} +2 -2
- package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
- package/dist/client/{cart-pGtyf_XU.mjs → cart-z4qZih1Y.mjs} +3 -3
- package/dist/client/{checkout-Da9WSn7Y.mjs → checkout-DpL7euFH.mjs} +3 -3
- package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-BEfR7kVu.mjs} +1 -1
- package/dist/client/client.mjs +3721 -2220
- package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
- package/dist/client/{context-BFeY_Wbm.mjs → context-C8TinPJc.mjs} +1 -1
- package/dist/client/{dates-BhwVSxDg.mjs → dates-vwwxTeB0.mjs} +2 -3
- package/dist/client/{eventCalendar-BAtdnR4s.mjs → eventCalendar-DIbHfJXO.mjs} +10 -10
- package/dist/client/{eventCombined-RksA3tRC.mjs → eventCombined-DoGMJ6cg.mjs} +4 -4
- package/dist/client/{eventDetails-BB9hB4wR.mjs → eventDetails-BjN9v6a1.mjs} +4 -4
- package/dist/client/{eventListing-BpJBkviM.mjs → eventListing-DajjWgOv.mjs} +4 -4
- package/dist/client/{eventRegistration-B18jFq_o.mjs → eventRegistration-DMq9gMA-.mjs} +121 -54
- package/dist/client/{form-Dodt8Y8t.mjs → form-Qf6qTbos.mjs} +136 -105
- package/dist/client/{headerSection-B0qj9ttg.mjs → headerSection-D7qJrqFX.mjs} +3 -3
- package/dist/client/hooks.mjs +1148 -179
- package/dist/client/{locationMap-gn-iMk7a.mjs → locationMap-CCF9-t_0.mjs} +4 -4
- package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
- package/dist/client/{media-BtJ37tzS.mjs → media-CwBGetqC.mjs} +1 -1
- package/dist/client/{newsletterForm-oByLdFkr.mjs → newsletterForm-DzCLSP4S.mjs} +206 -104
- package/dist/client/{pricing-BOU0_Hai.mjs → pricing-Cgxv2KLC.mjs} +1 -1
- package/dist/client/{productDetail-D9v1zH2j.mjs → productDetail-ru9w5GHx.mjs} +3 -3
- package/dist/client/{productList-D-mItx1n.mjs → productList-zaapKSl-.mjs} +3 -3
- package/dist/client/{propsDecoder-C3TP_z4x.mjs → propsDecoder-CwvvNOHx.mjs} +91 -28
- package/dist/client/rendering/client.mjs +1441 -826
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3652 -2005
- package/dist/client/{routeIslandApiConfig-DzN1W0sq.mjs → routeIslandApiConfig-BwVFo0Y4.mjs} +1 -1
- package/dist/client/{shop-commerce-gklw_hLF.mjs → shop-commerce-De7gEnkA.mjs} +8 -8
- package/dist/client/{shop-commerce-store-Sf1eyTaZ.mjs → shop-commerce-store-B3MCxIBW.mjs} +1 -1
- package/dist/client/{shop-Dufw7N7o.mjs → shop-mktkXvbV.mjs} +7 -7
- package/dist/client/{shopShared-B5nyA41S.mjs → shopShared-TqExh235.mjs} +5 -5
- package/dist/client/{useEventFilters-CLL829vy.mjs → useEventFilters-n_OjkIjX.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +490 -153
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +64 -2
- package/dist/preview-next/editor-chrome.css +7 -4
- package/dist/preview-next/keepAlive.mjs +450 -153
- package/dist/preview-next/middleware.mjs +451 -153
- package/dist/{previewAuthStore-BxAFlu-j.mjs → previewAuthStore-C_EHQ5XA.mjs} +475 -153
- package/dist/{sdk-runtime-D0uZFev7.mjs → sdk-runtime-BIkJg5y1.mjs} +2 -2
- package/dist/{separator-EvdCAn4V.mjs → separator-C9qDP95Z.mjs} +1 -1
- package/dist/server/components.mjs +4957 -3509
- package/dist/server/config-validation.mjs +1115 -189
- package/dist/server/config.mjs +1115 -189
- package/dist/server/data.mjs +1113 -188
- package/dist/server/index.mjs +492 -154
- package/dist/server/navigation.mjs +13 -2
- package/dist/server/next.mjs +4798 -3462
- package/dist/server/page-converter.mjs +143 -89
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3862 -2414
- package/dist/server/rendering.mjs +5648 -4154
- package/dist/server/routing.mjs +1223 -329
- package/dist/server/server.mjs +1172 -314
- package/dist/server/theme-bridge.mjs +533 -128
- package/dist/server/theme.mjs +5 -1
- package/dist/styles/index.css +218 -69
- package/package.json +1 -1
- package/dist/_dts/core/src/participant-identity.d.ts +0 -135
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $i as
|
|
3
|
-
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-
|
|
4
|
-
import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth } from "./previewAuthStore-
|
|
2
|
+
import { $i as resolveSdkFooterMode, $n as resolveRouteTarget, $r as parseBackgroundAppearanceColorToken, $t as recordsEqual, Aa as Dialog, Ai as isRecord$11, An as ThemeScope, Ao as __exportAll, At as useRichTextImagePicker, Bn as resolveVariantKey, Bt as stripTopLevelRoutingUi, Ci as siblingPath, Cn as DEFAULT_LAUNCH_READINESS_INPUT, Co as parseMailingListPlacementTargeting, Cr as compileEditorModelRuntime, Ct as EntryPickerWidgetProvider, Da as TabsContent, Di as eventCalendarListLayoutOptions, Dn as useMediaEditorOptional, Do as expectParsedBrandedId, Dr as componentRuntimeRulesForTheme, Dt as MediaField, Ea as Tabs, Ei as eventCalendarListLayoutCompatibleDisplayModeValues, En as MediaEditorContextProvider, Eo as assertNever$2, Er as resolvePageDesignEditorBoundaryForChoice, Et as FileField, Fa as DialogTitle, Fi as asDesignBlockId, Fn as projectRecurringSchedule, Fr as gradientToCss, Ft as LinkField, G as confirmAutosaveBatch, Gi as textColorStyle, Gn as getResponsiveScopeSpec, Gr as sectionFactsForContent, Gt as useOptionalEditorUiStoreInstance, Hn as validateManifestDraft, Hr as userPinnedDesignChoice, Ii as assertNever$1, In as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Ir as GRADIENT_PRESETS, It as LinkWidgetProvider, J as idleEditorTransactionQueueState, Ji as ORDINARY_TEXT_MIN_CONTRAST_RATIO, Jn as readBlockComposition, Jr as sectionTransitionFamilies, Jt as createHistoryState, K as deriveTransactionCapabilities, Ki as defaultThemeTokens, Kn as escapeStyleContent, Kr as boundaryTreatmentForBoundaryOptionId, Kt as canRedoHistory, Li as makeBoundaryId, Ln as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, Lr as GRADIENT_PRESET_IDS, Ma as DialogDescription, Mi as isThemeV2NormalEditorRawStyleFieldName, Mn as createCustomBlockRegistry, Mt as RichTextWidgetProvider, Na as DialogFooter, Ni as pageDesignEditorBackgroundOverrideOwner, Nn as makeDefaultBlockComponent, Nt as EditorProvider, Oa as TabsList, Oi as bookingConsentCarrierSchema, On as useApiMediaUploader, Oo as parseMediaAssetId, Ot as ReferenceField, Pa as DialogHeader, Pi as stripStaleTransitionStyleGroup, Pn as getBlockDefinition, Pt as useEditor, Q as resolvePreviewSidebarTab, Qi as paletteModeSchema, Qn as resolvePageRouteTarget, Qr as backgroundAppearanceQuickColorTokenNames, Qt as unsafeAsLinkedContentEntryId, Rn as planSiteOverlayHeaderClearance, Rr as getGradientPreset, Rt as hideThemeV2RawStyleFields, Si as getAtPath, Sn as decodePublicProductCategorySelectorQuery, So as parseFooterModuleId, Sr as applyCompiledRuntimeFieldsToContent, St as EntryPickerField, Ti as calendarWindowQuerySchema, Tn as AMBIENT_BACKGROUND_ROLES, To as unsafeAsEditorBlockValues, Tr as planPageDesignLayoutLookCompatibility, Tt as ButtonWidgetProvider, Un as buildThemeRuntime, Ur as boundaryLayout, Ut as useEditorUiStore, Vn as compileManifestContentContract, Vr as autoDesignChoice, Vt as getBlockManifestFromSdkConfig, W as beginAutosaveBatch, Wn as DEFAULT_THEME_RESPONSIVE_MODE, Wr as composeBoundary, Wt as useEditorUiStoreInstance, Xa as X, Xn as defaultTransforms, Xr as sectionTransitionVariantForBoundaryOptionId, Xt as redoHistory, Y as rejectAutosaveBatch, Ya as cn, Yn as getDefaultComponentRegistry, Yr as sectionTransitionFamilyForBoundaryOptionId, Yt as pushHistoryEntry, Za as Upload, Zi as paletteColorsSchema, Zn as resolveEntryRouteTarget, Zr as backgroundAppearanceColorTokenNames, Zt as undoHistory, _ as reportPreviewDesignError, _a as SelectTrigger, _i as buildResolveImageUrlContext, _n as createStoreBackend, _o as ChevronLeft, _r as heroCtaRowFragment, _t as MailingListTargetingField, aa as hasEmptyOption, ai as runTransforms, ar as richTextFragment, bi as setContextResolveImageUrlContext, bn as getPageDesignEditorState, bo as buildMailingListSignupBlockSourceRef, br as bodyCopyFragment, bt as InlineTextField, ca as unmapValueFromSelect, ci as parseGeneratedIconSetId, cr as faqAccordionFragment, ct as EntryControllerProvider, d as PreviewDesignCoordinatorProvider, di as logger, dn as usePalette, dr as singleButtonFragment, dt as createSiteOptionApiLoader, ea as attachRenderableMediaAssetFields, ei as ctaButton, er as LINKED_CONTENT_ENTRY_META_KEY, et as renderSiteChromeBlock, fi as coerceInlineTextWithFallback, fo as Image, fr as formEmbedFragment, ft as createSiteOptionWidgetAdapters, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, ga as SelectItem, gi as RichText$1, gn as evaluateVisibility, go as ChevronRight, gr as ctaCopyFragment, gt as OfferingsPreviewWidgetProvider, h as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, ha as SelectContent, hi as Text$1, hn as FormRenderer, hr as testimonialsHeadingFragment, ht as OfferingsPreviewGroupOrderField, i as usePreviewDesignHistoryOrder, ia as useSdkConfig, ii as parseBackgroundContent, in as BUILT_IN_REFERENCE_KINDS, io as RotateCcw, ir as ImageResolveContextProvider, it as PREVIEW_EDITABLE_OUTLINE, ja as DialogContent, ji as corners, jn as containerResponsiveThemeCss, jr as surfaceResolutionContextFromTheme, jt as RichTextField, ka as TabsTrigger, ki as isObjectRecord, kn as isSupportedLoaderEndpoint, ko as parseSiteId, kr as designRuntimeRulesForTheme, kt as ReferenceWidgetProvider, la as FieldFrame, lr as faqHeadingFragment, m as usePreviewThemeOverlay, ma as Select, mi as isInlineTextEmpty, mr as testimonialsCarouselFragment, mt as SiteOptionWidgetProvider, n as useSiteChromeCustomizeOptional, na as isHeaderField, nn as createRoutingHelpers, nr as getLinkedContentEntryMeta, nt as PreviewInlineTextEditor, oa as mapCurrentValueForSelect, oi as parseBlockIconValue, on as parseReferenceKind, or as headingFragment, ot as useUISelector, p as PreviewThemeOverlayProvider, pi as inlineTextToPlainText, pn as createManifestFormAdapter, po as GripVertical, pr as formCopyFragment, pt as SiteOptionPickerField, q as enqueueTransaction, qa as Button, qi as parseThemeForPersistence, qn as mergeContentWithBlockStyleOverrides, qr as defaultSectionTransitionVariantForFamily, qt as canUndoHistory, r as PreviewDesignHistoryOrderProvider, ra as SdkConfigProvider, ri as planSiteChromePlacement, rn as createSnapshotFromPageRecord, rr as clientComponentRegistry, rt as PreviewTextEditor, sa as mapOptionValueForSelect, si as parseGeneratedIconAssetId, sr as cardFragment, st as EditableBlockProvider, t as SiteChromeCustomizeProvider, ta as getFieldIntent, ti as bindingSchema, tn as useDebouncedLatestSave, tr as coerceLinkedContentEntriesPayload, tt as PreviewRichTextEditor, ua as useField, ui as renderInlineText, un as PaletteProvider, ur as blogFeaturedPostFragment, ut as useEntryEditorController, va as SelectValue, vi as getCurrentResolveImageUrlContext, vn as MediaEditor, vr as ctaRowFragment, vt as loadMailingListAuthoringContext, wi as BlockApiProvider, wn as deriveLaunchReadiness, wo as unsafeAsEditorBlockId, wr as formatSiteChromeBackgroundTokenLabel, wt as ButtonVariantField, xi as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, xo as sameMailingListPlacementTargeting, xr as defineFragment, xt as IconPickerField, yi as resolveImageUrlWithContext, yn as applyPageDesignEditorAction, yr as heroCopyFragment, yt as MailingListTargetingProvider, zn as visibleHeaderClearancePx, zr as parseGradientPresetId, zt as prepareBlockEditorManifest } from "./SiteChromeCustomizeContext-DQXZXiqS.mjs";
|
|
3
|
+
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-Dd4dxOiU.mjs";
|
|
4
|
+
import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth } from "./previewAuthStore-C_EHQ5XA.mjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { createPortal } from "react-dom";
|
|
9
8
|
import { z } from "zod";
|
|
9
|
+
import { createPortal } from "react-dom";
|
|
10
10
|
//#region ../ui/src/fixed-bottom-surface.tsx
|
|
11
11
|
const SURFACE_CLASS_BY_VARIANT = {
|
|
12
12
|
light: "z-40 border-t border-border bg-editor-chrome-surface text-foreground",
|
|
@@ -561,9 +561,10 @@ function pageBlockPosition(index, blockCount) {
|
|
|
561
561
|
//#endregion
|
|
562
562
|
//#region ../blocks/src/pageRendererContracts.ts
|
|
563
563
|
function buildPageRendererRootRuntime(dataContext) {
|
|
564
|
-
const { siteId = null, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, bookingOfferingPresets = [], appointmentServicePathPrefix = null, mailingList = { tag: "not_configured" }, eventRegistrationOverlayEnabled = false, loaderFailures = {} } = dataContext ?? {};
|
|
564
|
+
const { siteId = null, siteName, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, bookingOfferingPresets = [], appointmentServicePathPrefix = null, mailingList = { tag: "not_configured" }, eventRegistrationOverlayEnabled = false, loaderFailures = {} } = dataContext ?? {};
|
|
565
565
|
return {
|
|
566
566
|
siteId,
|
|
567
|
+
siteName,
|
|
567
568
|
pageId,
|
|
568
569
|
pathname,
|
|
569
570
|
bookingTimeZone,
|
|
@@ -990,6 +991,40 @@ function resolveBlockData(blockId, dataLoaders, dataContext, routes) {
|
|
|
990
991
|
return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
|
|
991
992
|
}
|
|
992
993
|
//#endregion
|
|
994
|
+
//#region ../blocks/src/system/runtime/nodes/newsletter-form.block-submission.ts
|
|
995
|
+
/** Authorise one block source for both public and preview rendering. */
|
|
996
|
+
function planNewsletterBlockSubmission(placement) {
|
|
997
|
+
if (placement.stage === "published") {
|
|
998
|
+
const sourceRef = buildMailingListSignupBlockSourceRef(placement.blockId, placement.selectedContentVersionId);
|
|
999
|
+
return sourceRef ? {
|
|
1000
|
+
tag: "ready",
|
|
1001
|
+
sourceRef
|
|
1002
|
+
} : { tag: "unavailable" };
|
|
1003
|
+
}
|
|
1004
|
+
if (placement.publishedPlacement && "kind" in placement.publishedPlacement) return { tag: "unpublished-settings" };
|
|
1005
|
+
if (placement.publishedPlacement) return planNewsletterPreviewSubmission({
|
|
1006
|
+
blockId: placement.blockId,
|
|
1007
|
+
publishedContentId: placement.publishedPlacement.id,
|
|
1008
|
+
renderedContent: placement.renderedContent,
|
|
1009
|
+
publishedContent: placement.publishedPlacement.content
|
|
1010
|
+
});
|
|
1011
|
+
if (placement.stage === "preview") return { tag: "unpublished-form" };
|
|
1012
|
+
return { tag: "unavailable" };
|
|
1013
|
+
}
|
|
1014
|
+
/** Decide whether the visible draft can safely cite the published placement. */
|
|
1015
|
+
function planNewsletterPreviewSubmission(placement) {
|
|
1016
|
+
if (!placement.publishedContentId) return { tag: "unpublished-form" };
|
|
1017
|
+
if (!placement.publishedContent) return { tag: "unpublished-settings" };
|
|
1018
|
+
const draft = parseMailingListPlacementTargeting(placement.renderedContent.targeting ?? { mode: "default" });
|
|
1019
|
+
const published = parseMailingListPlacementTargeting(placement.publishedContent.targeting);
|
|
1020
|
+
if (!draft.ok || !published.ok || !sameMailingListPlacementTargeting(draft.value, published.value)) return { tag: "unpublished-settings" };
|
|
1021
|
+
const sourceRef = buildMailingListSignupBlockSourceRef(placement.blockId, placement.publishedContentId);
|
|
1022
|
+
return sourceRef ? {
|
|
1023
|
+
tag: "ready",
|
|
1024
|
+
sourceRef
|
|
1025
|
+
} : { tag: "unpublished-settings" };
|
|
1026
|
+
}
|
|
1027
|
+
//#endregion
|
|
993
1028
|
//#region ../blocks/src/pageRenderPreparation.ts
|
|
994
1029
|
/**
|
|
995
1030
|
* Stage two of the render plan.
|
|
@@ -1118,9 +1153,20 @@ function buildBlockOverrideProps(input) {
|
|
|
1118
1153
|
imageResolveContext: input.imageResolveContext,
|
|
1119
1154
|
blockId: block.id ?? null,
|
|
1120
1155
|
contentVersionId: block.contentVersionId ?? null,
|
|
1156
|
+
...newsletterBlockProps(block, input.content, dataContext?.previewStage),
|
|
1121
1157
|
blockKind: block.kind
|
|
1122
1158
|
};
|
|
1123
1159
|
}
|
|
1160
|
+
function newsletterBlockProps(block, renderedContent, stage) {
|
|
1161
|
+
if (block.kind !== "block.newsletter-signup") return {};
|
|
1162
|
+
return { newsletterBlockSubmission: planNewsletterBlockSubmission({
|
|
1163
|
+
blockId: block.id,
|
|
1164
|
+
selectedContentVersionId: block.contentVersionId ?? null,
|
|
1165
|
+
publishedPlacement: block.publishedPlacement,
|
|
1166
|
+
renderedContent,
|
|
1167
|
+
stage
|
|
1168
|
+
}) };
|
|
1169
|
+
}
|
|
1124
1170
|
/** Site, transport and session context a block needs to call back to the API. */
|
|
1125
1171
|
function blockSessionProps(dataContext) {
|
|
1126
1172
|
return {
|
|
@@ -1210,12 +1256,26 @@ function createBlockErrorBoundary() {
|
|
|
1210
1256
|
const BlockErrorBoundary = createBlockErrorBoundary();
|
|
1211
1257
|
//#endregion
|
|
1212
1258
|
//#region ../blocks/src/pageRenderAdmission.ts
|
|
1259
|
+
/** Pair a published version with the content it authorises at the render boundary. */
|
|
1260
|
+
function readPublishedBlockPlacement(id, content) {
|
|
1261
|
+
if (id == null && content == null) return null;
|
|
1262
|
+
if (id == null || content == null) return {
|
|
1263
|
+
kind: "incomplete",
|
|
1264
|
+
id: id ?? null,
|
|
1265
|
+
content: content ?? null
|
|
1266
|
+
};
|
|
1267
|
+
return {
|
|
1268
|
+
id,
|
|
1269
|
+
content
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1213
1272
|
function toEditorPresentationPage(page) {
|
|
1214
1273
|
if (!page) return null;
|
|
1215
1274
|
return {
|
|
1216
1275
|
...page,
|
|
1217
1276
|
blocks: page.blocks.map((block) => ({
|
|
1218
1277
|
...block,
|
|
1278
|
+
publishedPlacement: block.publishedPlacement,
|
|
1219
1279
|
presentationAdmission: { kind: "editor" }
|
|
1220
1280
|
}))
|
|
1221
1281
|
};
|
|
@@ -7016,6 +7076,20 @@ const PAGE_CONTENT_TYPE_SCHEMA = {
|
|
|
7016
7076
|
};
|
|
7017
7077
|
//#endregion
|
|
7018
7078
|
//#region ../preview-next/src/client/preview/PreviewEntryControllerProvider.tsx
|
|
7079
|
+
function toEditorInitialBlock(block, index) {
|
|
7080
|
+
return {
|
|
7081
|
+
id: block.id,
|
|
7082
|
+
draftContentId: block.draftContentId ?? null,
|
|
7083
|
+
publishedContentId: block.publishedContentId ?? null,
|
|
7084
|
+
kind: block.kind,
|
|
7085
|
+
orderIndex: typeof block.orderIndex === "number" ? block.orderIndex : index,
|
|
7086
|
+
content: block.content ?? null,
|
|
7087
|
+
draftContent: block.draftContent ?? null,
|
|
7088
|
+
publishedContent: block.publishedContent ?? null,
|
|
7089
|
+
bindings: block.bindings ?? null,
|
|
7090
|
+
optimisticHash: block.optimisticHash ?? null
|
|
7091
|
+
};
|
|
7092
|
+
}
|
|
7019
7093
|
function PreviewEntryControllerProvider({ children, siteId, pageId, routeId: providedRouteId, entryData, contentTypeSchema, draftContent, initialStatus = "draft", initialBlocks, pageMetadata, apiClient }) {
|
|
7020
7094
|
const { isEditingMode } = useEditor();
|
|
7021
7095
|
const schema = contentTypeSchema ?? PAGE_CONTENT_TYPE_SCHEMA;
|
|
@@ -7076,17 +7150,7 @@ function PreviewEntryControllerProvider({ children, siteId, pageId, routeId: pro
|
|
|
7076
7150
|
schema
|
|
7077
7151
|
]);
|
|
7078
7152
|
const normalizedInitialBlocks = useMemo(() => {
|
|
7079
|
-
return (initialBlocks ?? []).map(
|
|
7080
|
-
id: b.id ?? null,
|
|
7081
|
-
contentVersionId: b.contentVersionId ?? null,
|
|
7082
|
-
kind: b.kind,
|
|
7083
|
-
orderIndex: typeof b.orderIndex === "number" ? b.orderIndex : index,
|
|
7084
|
-
content: b.content ?? null,
|
|
7085
|
-
draftContent: b.draftContent ?? null,
|
|
7086
|
-
publishedContent: b.publishedContent ?? null,
|
|
7087
|
-
bindings: b.bindings ?? null,
|
|
7088
|
-
optimisticHash: b.optimisticHash ?? null
|
|
7089
|
-
}));
|
|
7153
|
+
return (initialBlocks ?? []).map(toEditorInitialBlock);
|
|
7090
7154
|
}, [initialBlocks]);
|
|
7091
7155
|
const entityId = pageId || entryData?.id || "";
|
|
7092
7156
|
const entityType = entryData ? entryData.type : "page";
|
|
@@ -8603,7 +8667,7 @@ function CustomizeBackgroundControlRows({ modeLabel, valueLabel, valueAriaLabel,
|
|
|
8603
8667
|
}
|
|
8604
8668
|
//#endregion
|
|
8605
8669
|
//#region ../preview-next/src/client/preview/SiteChromeCustomizeButton.tsx
|
|
8606
|
-
function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-events-auto absolute right-2 top-2 z-50 opacity-0 transition group-focus-within/site-chrome:opacity-100 group-hover/site-chrome:opacity-100" }) {
|
|
8670
|
+
function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-events-auto absolute right-2 top-2 z-50 flex gap-1 opacity-0 transition group-focus-within/site-chrome:opacity-100 group-hover/site-chrome:opacity-100" }) {
|
|
8607
8671
|
const customize = useSiteChromeCustomizeOptional();
|
|
8608
8672
|
const editorUiStore = useOptionalEditorUiStoreInstance();
|
|
8609
8673
|
const popover = useCustomizePopoverController();
|
|
@@ -8669,121 +8733,136 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
8669
8733
|
}),
|
|
8670
8734
|
fallbackClassName: containerClassName,
|
|
8671
8735
|
forceVisible: popover.open,
|
|
8672
|
-
children: [
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
},
|
|
8701
|
-
onCycleMode: (direction, event) => {
|
|
8702
|
-
event.preventDefault();
|
|
8703
|
-
event.stopPropagation();
|
|
8704
|
-
chooseSiteChromeBackgroundMode({
|
|
8705
|
-
background,
|
|
8706
|
-
direction,
|
|
8707
|
-
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
8708
|
-
});
|
|
8709
|
-
},
|
|
8710
|
-
onCycleValue: (direction, event) => {
|
|
8711
|
-
event.preventDefault();
|
|
8712
|
-
event.stopPropagation();
|
|
8713
|
-
customize?.cycleSurfaceBackground(surfaceState.surface, direction);
|
|
8714
|
-
},
|
|
8715
|
-
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
8716
|
-
}) : null,
|
|
8717
|
-
surfaceState.surface === "header" ? /* @__PURE__ */ jsxs("div", {
|
|
8718
|
-
className: "grid grid-cols-2 gap-2 border-t pt-3",
|
|
8719
|
-
children: [/* @__PURE__ */ jsxs("label", {
|
|
8720
|
-
className: "block text-xs font-medium text-muted-foreground",
|
|
8721
|
-
children: [/* @__PURE__ */ jsx("span", { children: "Display" }), /* @__PURE__ */ jsx("select", {
|
|
8722
|
-
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
8723
|
-
value: surfaceState.brandDisplay,
|
|
8724
|
-
onChange: (event) => {
|
|
8725
|
-
event.stopPropagation();
|
|
8726
|
-
customize?.setHeaderBrandDisplay(event.currentTarget.value);
|
|
8727
|
-
},
|
|
8728
|
-
disabled: !surfaceState.applyAllowed,
|
|
8729
|
-
children: surfaceState.brandDisplayOptions.map((option) => /* @__PURE__ */ jsx("option", {
|
|
8730
|
-
value: option.value,
|
|
8731
|
-
disabled: option.disabled,
|
|
8732
|
-
children: option.label
|
|
8733
|
-
}, option.value))
|
|
8734
|
-
})]
|
|
8735
|
-
}), /* @__PURE__ */ jsxs("label", {
|
|
8736
|
-
className: "block text-xs font-medium text-muted-foreground",
|
|
8737
|
-
children: [/* @__PURE__ */ jsx("span", { children: surfaceState.brandSizeLabel }), /* @__PURE__ */ jsx("select", {
|
|
8738
|
-
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
8739
|
-
value: surfaceState.logoSize,
|
|
8740
|
-
onChange: (event) => {
|
|
8741
|
-
event.stopPropagation();
|
|
8742
|
-
customize?.setHeaderLogoSize(event.currentTarget.value);
|
|
8743
|
-
},
|
|
8744
|
-
disabled: !surfaceState.applyAllowed,
|
|
8745
|
-
children: surfaceState.logoSizeOptions.map((option) => /* @__PURE__ */ jsx("option", {
|
|
8746
|
-
value: option.value,
|
|
8747
|
-
children: option.label
|
|
8748
|
-
}, option.value))
|
|
8749
|
-
})]
|
|
8750
|
-
})]
|
|
8751
|
-
}) : null,
|
|
8752
|
-
editorUiStore && (surfaceState.surface === "footer" || customize?.canOpenDesignEditor === true) ? /* @__PURE__ */ jsx("div", {
|
|
8753
|
-
className: "border-t pt-2",
|
|
8754
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
8755
|
-
type: "button",
|
|
8756
|
-
className: "w-full rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted",
|
|
8757
|
-
onClick: (event) => {
|
|
8736
|
+
children: [
|
|
8737
|
+
/* @__PURE__ */ jsx(CustomizePillButton, {
|
|
8738
|
+
buttonRef: popover.buttonRef,
|
|
8739
|
+
ariaLabel: `Customize ${surface}`,
|
|
8740
|
+
open: popover.open,
|
|
8741
|
+
controlsId: popover.panelId,
|
|
8742
|
+
onClick: popover.toggle,
|
|
8743
|
+
disabled: !hasCustomizeControls
|
|
8744
|
+
}),
|
|
8745
|
+
surface === "footer" ? /* @__PURE__ */ jsx(FooterEditPill, {}) : null,
|
|
8746
|
+
popover.open && surfaceState.kind === "available" ? /* @__PURE__ */ jsxs(CustomizePopoverShell, {
|
|
8747
|
+
panelId: popover.panelId,
|
|
8748
|
+
descriptionId: popover.descriptionId,
|
|
8749
|
+
dialogLabel: `Customize ${surface}`,
|
|
8750
|
+
eyebrow: "Site",
|
|
8751
|
+
title: surfaceState.label,
|
|
8752
|
+
dialogRef: popover.dialogRef,
|
|
8753
|
+
closeButtonRef: popover.registerInitialFocus,
|
|
8754
|
+
onClose: popover.close,
|
|
8755
|
+
onKeyDown: popover.handleDialogKeyDown,
|
|
8756
|
+
side: popoverSide,
|
|
8757
|
+
children: [
|
|
8758
|
+
controlPlan.cycleRows.map((row) => /* @__PURE__ */ jsx(CustomizeCycleRow, { ...row }, row.label)),
|
|
8759
|
+
background?.available ? /* @__PURE__ */ jsx(SiteChromeBackgroundControl, {
|
|
8760
|
+
background,
|
|
8761
|
+
applyAllowed: surfaceState.applyAllowed,
|
|
8762
|
+
chooserOpen: backgroundChooserOpen,
|
|
8763
|
+
onToggleChooser: (event) => {
|
|
8758
8764
|
event.preventDefault();
|
|
8759
8765
|
event.stopPropagation();
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8766
|
+
setBackgroundChooserOpen((open) => !open);
|
|
8767
|
+
},
|
|
8768
|
+
onCycleMode: (direction, event) => {
|
|
8769
|
+
event.preventDefault();
|
|
8770
|
+
event.stopPropagation();
|
|
8771
|
+
chooseSiteChromeBackgroundMode({
|
|
8772
|
+
background,
|
|
8773
|
+
direction,
|
|
8774
|
+
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
8767
8775
|
});
|
|
8768
|
-
popover.close();
|
|
8769
8776
|
},
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8777
|
+
onCycleValue: (direction, event) => {
|
|
8778
|
+
event.preventDefault();
|
|
8779
|
+
event.stopPropagation();
|
|
8780
|
+
customize?.cycleSurfaceBackground(surfaceState.surface, direction);
|
|
8781
|
+
},
|
|
8782
|
+
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
8783
|
+
}) : null,
|
|
8784
|
+
surfaceState.surface === "header" ? /* @__PURE__ */ jsxs("div", {
|
|
8785
|
+
className: "grid grid-cols-2 gap-2 border-t pt-3",
|
|
8786
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
8787
|
+
className: "block text-xs font-medium text-muted-foreground",
|
|
8788
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Display" }), /* @__PURE__ */ jsx("select", {
|
|
8789
|
+
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
8790
|
+
value: surfaceState.brandDisplay,
|
|
8791
|
+
onChange: (event) => {
|
|
8792
|
+
event.stopPropagation();
|
|
8793
|
+
customize?.setHeaderBrandDisplay(event.currentTarget.value);
|
|
8794
|
+
},
|
|
8795
|
+
disabled: !surfaceState.applyAllowed,
|
|
8796
|
+
children: surfaceState.brandDisplayOptions.map((option) => /* @__PURE__ */ jsx("option", {
|
|
8797
|
+
value: option.value,
|
|
8798
|
+
disabled: option.disabled,
|
|
8799
|
+
children: option.label
|
|
8800
|
+
}, option.value))
|
|
8801
|
+
})]
|
|
8802
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
8803
|
+
className: "block text-xs font-medium text-muted-foreground",
|
|
8804
|
+
children: [/* @__PURE__ */ jsx("span", { children: surfaceState.brandSizeLabel }), /* @__PURE__ */ jsx("select", {
|
|
8805
|
+
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
8806
|
+
value: surfaceState.logoSize,
|
|
8807
|
+
onChange: (event) => {
|
|
8808
|
+
event.stopPropagation();
|
|
8809
|
+
customize?.setHeaderLogoSize(event.currentTarget.value);
|
|
8810
|
+
},
|
|
8811
|
+
disabled: !surfaceState.applyAllowed,
|
|
8812
|
+
children: surfaceState.logoSizeOptions.map((option) => /* @__PURE__ */ jsx("option", {
|
|
8813
|
+
value: option.value,
|
|
8814
|
+
children: option.label
|
|
8815
|
+
}, option.value))
|
|
8816
|
+
})]
|
|
8817
|
+
})]
|
|
8818
|
+
}) : null,
|
|
8819
|
+
editorUiStore && surfaceState.surface === "header" && customize?.canOpenDesignEditor === true ? /* @__PURE__ */ jsx("div", {
|
|
8820
|
+
className: "border-t pt-2",
|
|
8821
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
8822
|
+
type: "button",
|
|
8823
|
+
className: "w-full rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted",
|
|
8824
|
+
onClick: (event) => {
|
|
8825
|
+
event.preventDefault();
|
|
8826
|
+
event.stopPropagation();
|
|
8827
|
+
editorUiStore.getState().openPreviewEditor({
|
|
8828
|
+
kind: "design",
|
|
8829
|
+
row: "header-style"
|
|
8830
|
+
});
|
|
8831
|
+
popover.close();
|
|
8832
|
+
},
|
|
8833
|
+
children: "More options"
|
|
8834
|
+
})
|
|
8835
|
+
}) : null,
|
|
8836
|
+
surfaceState.diagnostics.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
8837
|
+
className: "space-y-1 text-xs text-amber-700",
|
|
8838
|
+
children: surfaceState.diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic))
|
|
8839
|
+
}) : null,
|
|
8840
|
+
surfaceState.failure ? /* @__PURE__ */ jsx("p", {
|
|
8841
|
+
className: "text-xs text-red-700",
|
|
8842
|
+
children: surfaceState.failure
|
|
8843
|
+
}) : null,
|
|
8844
|
+
!surfaceState.applyAllowed ? /* @__PURE__ */ jsx("p", {
|
|
8845
|
+
className: "text-xs text-muted-foreground",
|
|
8846
|
+
children: "Preview only - ask an admin to apply."
|
|
8847
|
+
}) : null
|
|
8848
|
+
]
|
|
8849
|
+
}) : null
|
|
8850
|
+
]
|
|
8851
|
+
});
|
|
8852
|
+
}
|
|
8853
|
+
/** Opens the footer composer, matching the block toolbar's Edit pill. */
|
|
8854
|
+
function FooterEditPill() {
|
|
8855
|
+
const editorUiStore = useOptionalEditorUiStoreInstance();
|
|
8856
|
+
if (!editorUiStore) return null;
|
|
8857
|
+
return /* @__PURE__ */ jsx("button", {
|
|
8858
|
+
type: "button",
|
|
8859
|
+
className: previewCustomizePillButtonClassName,
|
|
8860
|
+
"aria-label": "Edit footer",
|
|
8861
|
+
onClick: () => editorUiStore.getState().openPreviewEditor({
|
|
8862
|
+
kind: "footer",
|
|
8863
|
+
target: "overview"
|
|
8864
|
+
}),
|
|
8865
|
+
children: "Edit"
|
|
8787
8866
|
});
|
|
8788
8867
|
}
|
|
8789
8868
|
const POPOVER_VIEWPORT_GUTTER_PX = 16;
|
|
@@ -8957,36 +9036,52 @@ function FooterModuleInspectionSurface({ children }) {
|
|
|
8957
9036
|
children
|
|
8958
9037
|
}) : /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
8959
9038
|
}
|
|
9039
|
+
const FOOTER_MODULE_SELECTOR = "[data-preview-footer-module-id]";
|
|
9040
|
+
/**
|
|
9041
|
+
* Footer sections are edited like in-place text: hovering one, or keyboard
|
|
9042
|
+
* focus anywhere inside it, draws the preview's standard dashed outline.
|
|
9043
|
+
*
|
|
9044
|
+
* - A section with nothing interactive inside (logo, text) is itself a
|
|
9045
|
+
* button: click, Enter or Space opens the footer composer on it.
|
|
9046
|
+
* - A section holding links or form controls is a labelled group, never a
|
|
9047
|
+
* button (no nested interactive content, no extra tab stop). Activating one
|
|
9048
|
+
* of its links, by click or Enter, opens the section; form controls (the
|
|
9049
|
+
* footer signup form) keep working.
|
|
9050
|
+
*
|
|
9051
|
+
* The footer-wide Edit and Customize pills live in SiteChromeCustomizeButton.
|
|
9052
|
+
*/
|
|
9053
|
+
const footerModuleAffordanceCss = `
|
|
9054
|
+
${FOOTER_MODULE_SELECTOR} {
|
|
9055
|
+
cursor: pointer;
|
|
9056
|
+
border-radius: 2px;
|
|
9057
|
+
}
|
|
9058
|
+
${FOOTER_MODULE_SELECTOR}:hover,
|
|
9059
|
+
${FOOTER_MODULE_SELECTOR}:focus-visible,
|
|
9060
|
+
${FOOTER_MODULE_SELECTOR}:has(:focus-visible) {
|
|
9061
|
+
outline: ${PREVIEW_EDITABLE_OUTLINE};
|
|
9062
|
+
outline-offset: 2px;
|
|
9063
|
+
}
|
|
9064
|
+
`;
|
|
8960
9065
|
function EnabledFooterModuleInspectionSurface({ children, editorUiStore }) {
|
|
8961
9066
|
const rootRef = useRef(null);
|
|
8962
|
-
const [active, setActive] = useState(null);
|
|
8963
|
-
const [position, setPosition] = useState(null);
|
|
8964
9067
|
useEffect(() => {
|
|
8965
9068
|
const root = rootRef.current;
|
|
8966
9069
|
if (!root) return;
|
|
8967
|
-
const modules = root.querySelectorAll(
|
|
9070
|
+
const modules = root.querySelectorAll(FOOTER_MODULE_SELECTOR);
|
|
8968
9071
|
for (const module of modules) {
|
|
8969
|
-
module.
|
|
9072
|
+
if (module.querySelector(INTERACTIVE_CONTENT_SELECTOR)) {
|
|
9073
|
+
module.setAttribute("role", "group");
|
|
9074
|
+
module.removeAttribute("tabindex");
|
|
9075
|
+
} else {
|
|
9076
|
+
module.setAttribute("role", "button");
|
|
9077
|
+
module.tabIndex = 0;
|
|
9078
|
+
}
|
|
8970
9079
|
const label = module.dataset.previewFooterModuleId?.replace(/-/gu, " ") ?? "footer section";
|
|
8971
9080
|
module.setAttribute("aria-label", `Edit ${label}`);
|
|
8972
9081
|
}
|
|
8973
9082
|
}, [children]);
|
|
8974
|
-
const
|
|
8975
|
-
|
|
8976
|
-
const parsed = parseFooterModuleId(element.dataset.previewFooterModuleId);
|
|
8977
|
-
if (!parsed.ok) return;
|
|
8978
|
-
const label = element.dataset.previewFooterModuleId?.replace(/-/gu, " ") ?? "footer section";
|
|
8979
|
-
const rect = element.getBoundingClientRect();
|
|
8980
|
-
setActive({
|
|
8981
|
-
moduleId: parsed.value,
|
|
8982
|
-
label
|
|
8983
|
-
});
|
|
8984
|
-
setPosition({
|
|
8985
|
-
top: Math.max(8, rect.top + 8),
|
|
8986
|
-
left: Math.max(8, rect.right - 64)
|
|
8987
|
-
});
|
|
8988
|
-
};
|
|
8989
|
-
const inspect = (moduleId) => {
|
|
9083
|
+
const inspect = (moduleId, event) => {
|
|
9084
|
+
event.preventDefault();
|
|
8990
9085
|
editorUiStore.getState().openPreviewEditor({
|
|
8991
9086
|
kind: "footer",
|
|
8992
9087
|
target: { moduleId }
|
|
@@ -8995,27 +9090,34 @@ function EnabledFooterModuleInspectionSurface({ children, editorUiStore }) {
|
|
|
8995
9090
|
return /* @__PURE__ */ jsxs("div", {
|
|
8996
9091
|
ref: rootRef,
|
|
8997
9092
|
style: { display: "contents" },
|
|
8998
|
-
|
|
8999
|
-
|
|
9093
|
+
onClick: (event) => {
|
|
9094
|
+
const moduleId = footerModuleIdForClick(event.target);
|
|
9095
|
+
if (moduleId) inspect(moduleId, event);
|
|
9096
|
+
},
|
|
9000
9097
|
onKeyDown: (event) => {
|
|
9001
9098
|
if (event.key !== "Enter" && event.key !== " ") return;
|
|
9002
|
-
const
|
|
9003
|
-
if (
|
|
9004
|
-
const parsed = parseFooterModuleId(element.dataset.previewFooterModuleId);
|
|
9005
|
-
if (!parsed.ok) return;
|
|
9006
|
-
event.preventDefault();
|
|
9007
|
-
inspect(parsed.value);
|
|
9099
|
+
const moduleId = footerModuleIdForKey(event.target);
|
|
9100
|
+
if (moduleId) inspect(moduleId, event);
|
|
9008
9101
|
},
|
|
9009
|
-
children: [
|
|
9010
|
-
type: "button",
|
|
9011
|
-
className: "pointer-events-auto fixed z-[75] rounded-full border bg-background px-3 py-1.5 text-xs font-medium text-foreground shadow-md",
|
|
9012
|
-
style: position,
|
|
9013
|
-
"aria-label": `Edit ${active.label}`,
|
|
9014
|
-
onClick: () => inspect(active.moduleId),
|
|
9015
|
-
children: "Edit"
|
|
9016
|
-
}) : null]
|
|
9102
|
+
children: [/* @__PURE__ */ jsx("style", { children: footerModuleAffordanceCss }), children]
|
|
9017
9103
|
});
|
|
9018
9104
|
}
|
|
9105
|
+
const FORM_CONTROL_SELECTOR = "input, select, textarea, button, label";
|
|
9106
|
+
const INTERACTIVE_CONTENT_SELECTOR = `a[href], ${FORM_CONTROL_SELECTOR}`;
|
|
9107
|
+
function footerModuleIdOf(element) {
|
|
9108
|
+
if (!(element instanceof HTMLElement)) return null;
|
|
9109
|
+
const parsed = parseFooterModuleId(element.dataset.previewFooterModuleId);
|
|
9110
|
+
return parsed.ok ? parsed.value : null;
|
|
9111
|
+
}
|
|
9112
|
+
/** The footer section a click should open, or null to let the click through. */
|
|
9113
|
+
function footerModuleIdForClick(target) {
|
|
9114
|
+
if (!(target instanceof Element) || target.closest(FORM_CONTROL_SELECTOR)) return null;
|
|
9115
|
+
return footerModuleIdOf(target.closest(FOOTER_MODULE_SELECTOR));
|
|
9116
|
+
}
|
|
9117
|
+
/** Enter/Space only opens a section when the section itself has focus. */
|
|
9118
|
+
function footerModuleIdForKey(target) {
|
|
9119
|
+
return target instanceof Element && target.matches(FOOTER_MODULE_SELECTOR) ? footerModuleIdOf(target) : null;
|
|
9120
|
+
}
|
|
9019
9121
|
function isHostElement(child) {
|
|
9020
9122
|
return typeof child.type === "string";
|
|
9021
9123
|
}
|
|
@@ -9300,10 +9402,10 @@ function resolveShellThemeRoles(props) {
|
|
|
9300
9402
|
}
|
|
9301
9403
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
9302
9404
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
9303
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
9405
|
+
return { default: (await import("./PreviewEditorSidebar-DtpB3_sS.mjs")).PreviewEditorSidebar };
|
|
9304
9406
|
});
|
|
9305
9407
|
const PreviewEditorUI = React.lazy(async () => {
|
|
9306
|
-
return { default: (await import("./PreviewEditorUI-
|
|
9408
|
+
return { default: (await import("./PreviewEditorUI-DxTLgaHo.mjs")).PreviewEditorUI };
|
|
9307
9409
|
});
|
|
9308
9410
|
const previewPaneContainmentStyle = {
|
|
9309
9411
|
contain: "layout paint",
|
|
@@ -10059,25 +10161,30 @@ function getDraftSnapshots(uiStore) {
|
|
|
10059
10161
|
return new Map(snapshots.map((snap) => [snap.id, snap]));
|
|
10060
10162
|
}
|
|
10061
10163
|
function mergeBlockWithDraft(block, draftMap, index, projections = [], linkedEntryOverlays = EMPTY_LINKED_ENTRY_OVERLAY) {
|
|
10164
|
+
const { draftContentId = null, publishedContentId = null } = block;
|
|
10062
10165
|
const id = block.id ?? null;
|
|
10063
10166
|
const editorBlockId = id ? unsafeAsEditorBlockId(id) : null;
|
|
10064
10167
|
const snap = editorBlockId ? draftMap.get(editorBlockId) ?? null : null;
|
|
10065
10168
|
const draftContent = editorBlockId ? readProjectedDraftRenderContent(block, editorBlockId, snap, projections) : null;
|
|
10066
|
-
const baseline =
|
|
10169
|
+
const baseline = blockBaseline(block, snap);
|
|
10067
10170
|
return {
|
|
10068
10171
|
id,
|
|
10069
|
-
|
|
10172
|
+
draftContentId,
|
|
10173
|
+
publishedContentId,
|
|
10070
10174
|
kind: block.kind,
|
|
10071
10175
|
purpose: "content",
|
|
10072
10176
|
orderIndex: block.orderIndex ?? index,
|
|
10073
10177
|
content: renderContent(block, baseline, projections, linkedEntryOverlays),
|
|
10074
10178
|
draftContent: renderContent(block, draftContent, projections, linkedEntryOverlays),
|
|
10075
|
-
publishedContent:
|
|
10179
|
+
publishedContent: block.publishedContent ?? null,
|
|
10076
10180
|
bindings: block.bindings ?? null
|
|
10077
10181
|
};
|
|
10078
10182
|
}
|
|
10079
10183
|
function readProjectedDraftRenderContent(block, editorBlockId, snap, projections) {
|
|
10080
|
-
return applyPreviewContentFieldProjections(editorBlockId, snap?.current ??
|
|
10184
|
+
return applyPreviewContentFieldProjections(editorBlockId, snap?.current ?? blockBaseline(block, snap), projections);
|
|
10185
|
+
}
|
|
10186
|
+
function blockBaseline(block, snapshot) {
|
|
10187
|
+
return snapshot?.baseline ?? block.content ?? block.publishedContent ?? null;
|
|
10081
10188
|
}
|
|
10082
10189
|
function renderContent(block, content, projections, linkedEntryOverlays) {
|
|
10083
10190
|
return applyPreviewRuntimeContentProjections(block, applyLinkedEntryRenderOverlay(content, linkedEntryOverlays), projections);
|
|
@@ -10085,14 +10192,15 @@ function renderContent(block, content, projections, linkedEntryOverlays) {
|
|
|
10085
10192
|
//#endregion
|
|
10086
10193
|
//#region ../preview-next/src/client/blocks/composer/transformBlock.ts
|
|
10087
10194
|
function transformToPageBlock(enriched) {
|
|
10195
|
+
const publishedPlacement = readPublishedBlockPlacement(enriched.publishedContentId, enriched.publishedContent);
|
|
10088
10196
|
return {
|
|
10089
10197
|
id: enriched.id,
|
|
10090
|
-
|
|
10198
|
+
publishedPlacement,
|
|
10199
|
+
contentVersionId: enriched.draftContentId ?? enriched.publishedContentId,
|
|
10091
10200
|
kind: enriched.kind,
|
|
10092
10201
|
purpose: enriched.purpose,
|
|
10093
10202
|
content: enriched.content ?? {},
|
|
10094
10203
|
draftContent: enriched.draftContent ?? void 0,
|
|
10095
|
-
publishedContent: enriched.publishedContent,
|
|
10096
10204
|
bindings: enriched.bindings ?? void 0
|
|
10097
10205
|
};
|
|
10098
10206
|
}
|
|
@@ -10137,7 +10245,14 @@ function composePageFromBlocks(args, cacheRef) {
|
|
|
10137
10245
|
function composePreviewRenderPage(args, cacheRef) {
|
|
10138
10246
|
const { page, blockItems, draftSnapshots, projections, linkedEntryOverlays } = args;
|
|
10139
10247
|
if (!page) return page;
|
|
10140
|
-
if (!blockItems.length) return
|
|
10248
|
+
if (!blockItems.length) return {
|
|
10249
|
+
...page,
|
|
10250
|
+
blocks: page.blocks.map((block) => ({
|
|
10251
|
+
...block,
|
|
10252
|
+
publishedPlacement: null,
|
|
10253
|
+
contentVersionId: null
|
|
10254
|
+
}))
|
|
10255
|
+
};
|
|
10141
10256
|
const draftMap = draftSnapshotMap(draftSnapshots);
|
|
10142
10257
|
const renderedBlocks = applyCacheOptimization([...applyPreviewStructureProjections(blockItems, projections).map((block, index) => mergeBlockWithDraft(block, draftMap, index, projections, linkedEntryOverlays))].sort((a, b) => (a.orderIndex ?? 0) - (b.orderIndex ?? 0)), cacheRef);
|
|
10143
10258
|
return {
|
|
@@ -11308,7 +11423,7 @@ function BoundaryControl({ previousBlockId, nextBlockId, previousBlockKind, next
|
|
|
11308
11423
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-sky-500/10 opacity-0 transition-opacity duration-150 group-hover/boundary:opacity-100 group-focus-within/boundary:opacity-100" }),
|
|
11309
11424
|
/* @__PURE__ */ jsx("button", {
|
|
11310
11425
|
type: "button",
|
|
11311
|
-
className: "pointer-events-auto
|
|
11426
|
+
className: "pointer-events-auto relative z-10 flex h-11 min-w-11 items-center justify-center rounded-full opacity-0 transition hover:opacity-100 focus:opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-sky-300 group-hover/boundary:opacity-100 group-focus-within/boundary:opacity-100",
|
|
11312
11427
|
"aria-controls": open ? panelId : void 0,
|
|
11313
11428
|
"aria-expanded": open,
|
|
11314
11429
|
"aria-haspopup": "dialog",
|
|
@@ -11764,7 +11879,12 @@ function EditablePageRenderer(props) {
|
|
|
11764
11879
|
renderProjections,
|
|
11765
11880
|
uiStore,
|
|
11766
11881
|
renderStateVersion
|
|
11767
|
-
]) ??
|
|
11882
|
+
]) ?? {
|
|
11883
|
+
name: "",
|
|
11884
|
+
path: "",
|
|
11885
|
+
purpose: "",
|
|
11886
|
+
blocks: []
|
|
11887
|
+
};
|
|
11768
11888
|
const runtimeJoins = editorRuntimeJoins(runtimeProjection, pageRendererProps.runtimeJoins);
|
|
11769
11889
|
const renderedBlockById = useMemo(() => {
|
|
11770
11890
|
return new Map((renderPage?.blocks ?? []).filter((block) => Boolean(block.id)).map((block) => [block.id, block]));
|
|
@@ -12109,6 +12229,21 @@ var SdkPreviewModeRuntime_exports = /* @__PURE__ */ __exportAll({ SdkPreviewMode
|
|
|
12109
12229
|
function isSdkCustomBlockArray(value) {
|
|
12110
12230
|
return Array.isArray(value);
|
|
12111
12231
|
}
|
|
12232
|
+
function toPreviewBlock(block, index) {
|
|
12233
|
+
const publishedContent = block.publishedContent;
|
|
12234
|
+
return {
|
|
12235
|
+
id: block.id,
|
|
12236
|
+
draftContentId: typeof block.draftContentId === "string" ? block.draftContentId : null,
|
|
12237
|
+
publishedContentId: typeof block.publishedContentId === "string" ? block.publishedContentId : null,
|
|
12238
|
+
kind: block.kind,
|
|
12239
|
+
purpose: block.purpose,
|
|
12240
|
+
orderIndex: index,
|
|
12241
|
+
content: block.content ?? null,
|
|
12242
|
+
draftContent: block.draftContent ?? null,
|
|
12243
|
+
publishedContent: publishedContent && typeof publishedContent === "object" && !Array.isArray(publishedContent) ? publishedContent : null,
|
|
12244
|
+
bindings: block.bindings ?? null
|
|
12245
|
+
};
|
|
12246
|
+
}
|
|
12112
12247
|
function getSdkConfigForPreview(value) {
|
|
12113
12248
|
if (!value || typeof value !== "object") return null;
|
|
12114
12249
|
if (!("customBlocks" in value)) return { layout: { footerMode: resolveSdkFooterMode(value) } };
|
|
@@ -12212,17 +12347,7 @@ function resolveSdkPreviewRuntimeModel(props) {
|
|
|
12212
12347
|
const routeMap = content.routeMap ?? void 0;
|
|
12213
12348
|
const sdkConfig = getSdkConfigForPreview(content.sdkConfig);
|
|
12214
12349
|
const customBlocks = isSdkCustomBlockArray(content.customBlocks) ? content.customBlocks : null;
|
|
12215
|
-
const initialBlocks = (page.blocks ?? []).map(
|
|
12216
|
-
id: block.id ?? null,
|
|
12217
|
-
contentVersionId: typeof block.contentVersionId === "string" ? block.contentVersionId : null,
|
|
12218
|
-
kind: block.kind,
|
|
12219
|
-
purpose: block.purpose ?? null,
|
|
12220
|
-
orderIndex: index,
|
|
12221
|
-
content: block.content ?? null,
|
|
12222
|
-
draftContent: block.draftContent ?? null,
|
|
12223
|
-
publishedContent: null,
|
|
12224
|
-
bindings: block.bindings ?? null
|
|
12225
|
-
}));
|
|
12350
|
+
const initialBlocks = (page.blocks ?? []).map(toPreviewBlock);
|
|
12226
12351
|
const commonModel = {
|
|
12227
12352
|
content,
|
|
12228
12353
|
customBlocks,
|