@riverbankcms/sdk 0.153.0 → 0.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{EventEmbeddedCheckoutStep-veN-QiAE.mjs → EventEmbeddedCheckoutStep-DALtAjqG.mjs} +1 -1
- package/dist/{PreviewEditorSidebar-jI_4DTZY.mjs → PreviewEditorSidebar-CbSbqmz3.mjs} +219 -38
- package/dist/{PreviewEditorUI-ORkVZhfu.mjs → PreviewEditorUI-CKKnAw11.mjs} +26 -58
- package/dist/{SdkPreviewModeRuntime-DaNqevI1.mjs → SdkPreviewModeRuntime-wLkXrWy9.mjs} +177 -84
- package/dist/{SiteChromeCustomizeContext-CgNuBHC0.mjs → SiteChromeCustomizeContext-BQ8vvKb-.mjs} +9824 -5829
- package/dist/{ThemedButton-X2UxhW6F.mjs → ThemedButton-Bi0rgijy.mjs} +482 -85
- package/dist/_dts/ai/src/contracts/proposals.d.ts +42873 -16847
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +5432 -1810
- package/dist/_dts/api/src/billing.d.ts +2 -0
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +78 -0
- package/dist/_dts/api/src/bookingAdjustments.d.ts +3 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +4 -12
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +2 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +11 -2
- package/dist/_dts/api/src/bookingPeople.d.ts +20 -1
- package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +5 -106
- package/dist/_dts/api/src/bookings.d.ts +10 -4
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/common/envelope.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +5 -3
- package/dist/_dts/api/src/endpoints.d.ts +89 -44
- package/dist/_dts/api/src/eventManagementContracts.d.ts +20 -11
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/index.d.ts +9 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
- package/dist/_dts/api/src/moneyPayments.d.ts +116 -0
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +2 -0
- package/dist/_dts/api/src/privacyPolicy.d.ts +20 -2
- package/dist/_dts/api/src/public/types.d.ts +1 -0
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +1 -0
- package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/sdk-event-management.d.ts +1 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +24 -9
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +5 -3
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +15 -4
- package/dist/_dts/api/src/sdkThemeWire.d.ts +172 -103
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +18 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +17 -16
- package/dist/_dts/api/src/siteSettings.d.ts +1 -0
- package/dist/_dts/api/src/siteTerms.d.ts +100 -0
- package/dist/_dts/api/src/stripeConnectSetup.d.ts +90 -0
- package/dist/_dts/api/src/types.d.ts +13 -32
- package/dist/_dts/api/src/webhooks.d.ts +9 -9
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -4
- package/dist/_dts/block-form/src/client/index.d.ts +2 -1
- package/dist/_dts/block-form/src/widgets/DateField/DateField.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/DateField/datePickerPopover.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/DateTimeField/DateTimeField.d.ts +3 -1
- package/dist/_dts/blocks/src/client/carousel.d.ts +1 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +12 -33
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +30 -118
- package/dist/_dts/blocks/src/index.d.ts +2 -2
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +1 -0
- package/dist/_dts/blocks/src/pageRenderPlan.d.ts +8 -1
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +1 -0
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -1
- package/dist/_dts/blocks/src/primitives/layout/Section.d.ts +1 -0
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/fields.d.ts +0 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +0 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +13 -9
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/form.d.ts +10 -0
- package/dist/_dts/blocks/src/system/blocks/image-gallery/fields.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +6 -1
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -45
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +12 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/catalogue.d.ts +7 -1
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +14 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/itemData.d.ts +12 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +56 -6
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/photoCount.d.ts +3 -12
- package/dist/_dts/blocks/src/system/blocks/shared/siteTerms.d.ts +17 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime-layout.d.ts +23 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime-profile.d.ts +20 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +17 -16
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +119 -9
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +24 -24
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +3 -1
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +6 -0
- package/dist/_dts/blocks/src/system/node/fragments/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/node/fragments/lookSlot.d.ts +22 -3
- package/dist/_dts/blocks/src/system/node/fragments/responsiveTwoColumn.d.ts +3 -1
- package/dist/_dts/blocks/src/system/node/fragments/sectionHead.d.ts +15 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -198
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -99
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFlowController.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSubmission.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useSiteTermsAgreement.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useSiteTermsAgreement.state.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/lookSurfaces.d.ts +22 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +6 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.client.d.ts +5 -30
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.server.d.ts +3 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.shared.d.ts +71 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/lookPresentation.d.ts +16 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +1 -1
- 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/CalendarAction.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingCalendar.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/finishedBooking.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CardListItem.d.ts +26 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventItem.d.ts +17 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardListContent.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +49 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/form.interactive.d.ts +11 -79
- package/dist/_dts/blocks/src/system/runtime/nodes/form.parts.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/form.server.d.ts +2 -13
- package/dist/_dts/blocks/src/system/runtime/nodes/gifting.interactive.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +8 -72
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-catalogue.d.ts +5 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-content.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/SiteTermsAgreementField.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/shared/siteTermsAgreement.d.ts +81 -0
- package/dist/_dts/blocks/src/system/runtime/shared/siteTermsCheckoutApi.d.ts +14 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/footerArrangement.d.ts +6 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -11
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +3 -10
- package/dist/_dts/blocks/src/system/types/link.d.ts +2 -0
- package/dist/_dts/calendar/src/icsRenderer.d.ts +23 -0
- package/dist/_dts/calendar/src/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +5 -0
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +5 -2
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +1 -1
- package/dist/_dts/content-editor/src/FooterNavigationLayoutControl.d.ts +6 -3
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +3 -1
- package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +1 -1
- package/dist/_dts/content-editor/src/controller/publicationDate.d.ts +5 -0
- package/dist/_dts/content-editor/src/footerComposer.d.ts +2 -1
- package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +3 -1
- package/dist/_dts/content-editor/src/footerNavigationLayoutState.d.ts +56 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +2 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -4
- package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +11 -8
- package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +6 -5
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -0
- package/dist/_dts/content-model/src/contentManifest.d.ts +10 -2
- package/dist/_dts/content-model/src/definitions/shared.d.ts +2 -0
- package/dist/_dts/core/src/booking-date-time.d.ts +5 -0
- package/dist/_dts/core/src/booking-refunds.d.ts +43 -0
- package/dist/_dts/core/src/branded.d.ts +6 -0
- package/dist/_dts/core/src/date-display.d.ts +90 -0
- package/dist/_dts/core/src/date-time-formatter.d.ts +2 -0
- package/dist/_dts/core/src/footer-arrangement.d.ts +8 -1
- package/dist/_dts/core/src/footer-composition-types.d.ts +6 -1
- package/dist/_dts/core/src/footer-composition.d.ts +1 -1
- package/dist/_dts/core/src/footer-navigation-layout.d.ts +3 -0
- package/dist/_dts/core/src/index.d.ts +4 -1
- package/dist/_dts/core/src/mailing-list-setup.d.ts +3 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -1
- package/dist/_dts/core/src/public-profile.d.ts +3 -1
- package/dist/_dts/core/src/scheduled-date-time.d.ts +69 -0
- package/dist/_dts/core/src/site-terms.d.ts +94 -0
- package/dist/_dts/core/src/whole-series-run-schedule.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +356 -9
- package/dist/_dts/db/src/schemas/forms.d.ts +32 -32
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +2 -2
- package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +3 -2
- package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/link/LinkContentList.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPickerDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/link/draft.d.ts +6 -1
- package/dist/_dts/editor-blocks/src/widgets/link/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/ArrangementBlockToolbar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/arrangementControlsModel.d.ts +8 -1
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeControlPlan.d.ts +4 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +27 -5
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/useConfirmedPreferenceRecord.d.ts +12 -0
- package/dist/_dts/preview-next/src/client/preview/usePersistedFooterPreferences.d.ts +26 -0
- package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +40 -2
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -0
- package/dist/_dts/sdk/src/config/typed-entry-links.test-d.d.ts +1 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -46
- package/dist/_dts/sdk/src/date-time/index.d.ts +2 -68
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -2
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -4
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +2 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +2 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/lanternRecipes.d.ts +60 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/quietArrow.d.ts +12 -8
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +69 -8
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +22 -1
- package/dist/_dts/theme-core/src/buttons/types.d.ts +358 -46
- package/dist/_dts/theme-core/src/buttons/typography.d.ts +24 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +1 -1
- package/dist/_dts/theme-core/src/footer/generateFooterCss.d.ts +4 -1
- package/dist/_dts/theme-core/src/footer/mode.d.ts +2 -11
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/containerSchema.d.ts +1 -0
- package/dist/_dts/theme-core/src/header/generateHeaderCss.d.ts +3 -0
- package/dist/_dts/theme-core/src/inputs/checkable.d.ts +6 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +249 -147
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/schema.d.ts +321 -192
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +24 -7
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +4 -6
- package/dist/_dts/theme-core/src/site-styles/compileFooterAgainstRow.d.ts +121 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +81 -1
- package/dist/_dts/theme-core/src/site-styles/footerLookDefaults.d.ts +45 -0
- package/dist/_dts/theme-core/src/site-styles/footerLookRecipe.d.ts +50 -0
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +9 -35
- package/dist/_dts/theme-core/src/site-styles/footerPreferences.d.ts +29 -0
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +2 -3
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +13 -1
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/runtimeBackgroundResolution.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +8 -0
- package/dist/_dts/theme-core/src/site-styles/siteStyleTypography.d.ts +46 -0
- package/dist/_dts/theme-core/src/site-styles/themeParity.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/status/generateStatusCss.d.ts +4 -1
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +2 -0
- package/dist/_dts/theme-core/src/typography/schema.d.ts +9 -0
- package/dist/_dts/ui/src/calendar.d.ts +6 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/index.d.ts +1 -1
- package/dist/client/{BookingMailingListNote-DrchYW1m.mjs → BookingMailingListNote-CiW1dsz7.mjs} +3 -3
- package/dist/client/{CardListItem-CC_GVmF6.mjs → CardListItem-DVYTlYpS.mjs} +70 -13
- package/dist/client/CheckboxChoice-CUnPrBlC.mjs +44 -0
- package/dist/client/DemoBookingPortalAccess-DEsn5F2C.mjs +770 -0
- package/dist/client/{EventCombined.client-DyN0v0Xk.mjs → EventCombined.client-BdctbwnV.mjs} +5 -5
- package/dist/client/{EventEmbeddedCheckoutStep-CgfpKc3n.mjs → EventEmbeddedCheckoutStep-DAhQs6Jb.mjs} +2 -5
- package/dist/client/{EventListing.client-CuOuvYMz.mjs → EventListing.client-BviZXfAE.mjs} +2 -2
- package/dist/client/{mailingListSignupCopy-DZSHZrm6.mjs → FieldValidationMessage-AYanWFb-.mjs} +1 -14
- package/dist/client/{LeafletStaticMap-B0WhRr3j.mjs → LeafletStaticMap-BLTECfjU.mjs} +1 -1
- package/dist/client/{RichText-C1fIXBzA.mjs → RichText-D3oE1_pw.mjs} +77 -44
- package/dist/client/ThemedButton-Ckj0Rfr_.mjs +1256 -0
- package/dist/client/{accordion-DCDVWSye.mjs → accordion-yBx6d4O2.mjs} +1 -1
- package/dist/client/{bookingForm-BJ3C4GlM.mjs → bookingForm-CPDEsQci.mjs} +64 -35
- package/dist/client/bookings.mjs +19252 -15228
- package/dist/client/carousel-DCqjwd2s.mjs +71 -0
- package/dist/client/{carousel.client-GEtOGsxo.mjs → carousel.client-Bx7XMF8-.mjs} +114 -39
- package/dist/client/{cart-Yv-aAtck.mjs → cart-DWJXrQxs.mjs} +3 -3
- package/dist/client/{checkout-B9xDkl30.mjs → checkout-CH4ypSLS.mjs} +3 -3
- package/dist/client/client.mjs +13559 -7353
- package/dist/client/{context-BOGe3rIA.mjs → context-BOs0m_iw.mjs} +16 -12
- package/dist/client/{eventCalendar-D6M0T9hs.mjs → eventCalendar-CRylMllc.mjs} +8 -319
- package/dist/client/{eventCombined-NM4UFBq8.mjs → eventCombined-DohTS3kp.mjs} +4 -4
- package/dist/client/{eventDetails-f_FhV4O8.mjs → eventDetails-qf-u9zcF.mjs} +108 -36
- package/dist/client/{eventListing-WLkfAROh.mjs → eventListing-Cg__X2vy.mjs} +4 -4
- package/dist/client/{eventRegistration-D3ejfLvW.mjs → eventRegistration-CybWxswy.mjs} +215 -237
- package/dist/client/{form-D5Or2Jyu.mjs → form-C-SGk6nq.mjs} +115 -51
- package/dist/client/{headerSection-hWgnv27V.mjs → headerSection-BdzPaHqo.mjs} +3 -3
- package/dist/client/hooks.mjs +3280 -1362
- package/dist/client/{locationMap-Di1K0O2S.mjs → locationMap-CEwIKmMb.mjs} +3 -3
- package/dist/client/mailingListSignupCopy-DS-_ePzG.mjs +14 -0
- package/dist/client/{media-D29-F1u_.mjs → media-V_ShXXru.mjs} +3 -3
- package/dist/client/{mediaContext-CwbbimYB.mjs → mediaContext-D-0tNVxE.mjs} +1 -1
- package/dist/client/{newsletterForm-CwxcwTNO.mjs → newsletterForm-CmwTltoS.mjs} +52 -15
- package/dist/client/{productDetail-BLSnhPdA.mjs → productDetail-DjIzUwg3.mjs} +3 -3
- package/dist/client/{productList-oGytONOX.mjs → productList-D6JGFnMF.mjs} +3 -3
- package/dist/client/{propsDecoder-lf_dTeZS.mjs → propsDecoder-BRKz13eg.mjs} +17944 -14861
- package/dist/client/{renderableMediaAssetAdmission-CHkXYDC_.mjs → renderableMediaAssetAdmission-Cd3JSw2H.mjs} +3 -1
- package/dist/client/rendering/client.mjs +15893 -11685
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +14451 -8139
- package/dist/client/{routeIslandApiConfig-Bc_WVPS8.mjs → routeIslandApiConfig-slAAILQ5.mjs} +1 -1
- package/dist/client/{shop-BQ3bR7fA.mjs → shop-C45K96_0.mjs} +178 -157
- package/dist/client/{shop-commerce-DDPll6ZC.mjs → shop-commerce-oGBiKT5d.mjs} +23 -10
- package/dist/client/{shop-commerce-store-DO-e1pTe.mjs → shop-commerce-store-H_HFPFZ8.mjs} +1 -1
- package/dist/client/{shopShared-BylM9jh1.mjs → shopShared-D54T_LAV.mjs} +5 -5
- package/dist/client/{useDiscountCodeUi-B1Puub2v.mjs → useDiscountCodeUi-Dm2EUa03.mjs} +1 -1
- package/dist/client/{useEventPagination-BBhkmQaT.mjs → useEventPagination-0l_A8CxG.mjs} +62 -24
- package/dist/preview-next/before-render.mjs +134 -51
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +5 -2
- package/dist/preview-next/keepAlive.mjs +134 -51
- package/dist/preview-next/middleware.mjs +134 -51
- package/dist/{sdk-runtime-DWCvhJGu.mjs → sdk-runtime-CjTM32Ah.mjs} +1 -1
- package/dist/server/components.mjs +15231 -10855
- package/dist/server/config-validation.mjs +3153 -1323
- package/dist/server/config.mjs +3119 -1321
- package/dist/server/data.mjs +3201 -1329
- package/dist/server/date-time.mjs +270 -117
- package/dist/server/index.mjs +137 -52
- package/dist/server/next.mjs +14713 -10388
- package/dist/server/page-converter.mjs +2642 -1073
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +14674 -10630
- package/dist/server/rendering.mjs +15055 -10670
- package/dist/server/routing.mjs +3483 -1488
- package/dist/server/server.mjs +3620 -1740
- package/dist/server/theme-bridge.mjs +2694 -189
- package/dist/server/theme.mjs +422 -67
- package/dist/{spinner-BYM-Y81w.mjs → spinner-KVVZh8jd.mjs} +1 -1
- package/dist/src-BgmWy3P1.mjs +1667 -0
- package/dist/styles/index.css +1196 -2
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +0 -12
- package/dist/client/CheckboxChoice-Dq30m3DO.mjs +0 -24
- package/dist/client/DemoBookingPortalAccess-ojwbVUmx.mjs +0 -344
- package/dist/client/ThemedButton-B7HFqFBg.mjs +0 -411
- package/dist/client/carousel-BSCBhfHY.mjs +0 -38
package/README.md
CHANGED
|
@@ -3736,3 +3736,5 @@ import {
|
|
|
3736
3736
|
- `@riverbankcms/sdk/next/middleware` - Next.js middleware/proxy-safe helpers (`handleRouteOutcomeRedirect`)
|
|
3737
3737
|
- `@riverbankcms/sdk/prebuild` - Prebuild cache generation (`generatePrebuildCache`, `PrebuildLoader`)
|
|
3738
3738
|
- `@riverbankcms/sdk/spam-protection` - ALTCHA spam protection (`useSpamProtection`, `getChallengeUrl`, `AltchaWidget`)
|
|
3739
|
+
|
|
3740
|
+
Resolve entry link fields with `resolveLinkHref(link, context)` from `@riverbankcms/sdk/rendering`, using the same route/stage context as block links.
|
package/dist/{EventEmbeddedCheckoutStep-veN-QiAE.mjs → EventEmbeddedCheckoutStep-DALtAjqG.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Hi as __commonJSMin, Qr as SpinnerNode, ei as checkBrowserStripeKey, n as ThemedButton } from "./ThemedButton-Bi0rgijy.mjs";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@stripe+stripe-js@9.17.0/node_modules/@stripe/stripe-js/dist/pure.js
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as
|
|
3
|
-
import { $a as
|
|
4
|
-
import { n as Separator, t as Spinner } from "./spinner-
|
|
5
|
-
import { _ as usePreviewBlockCustomizeSelectionOptional, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as useBlockCustomizeControls, h as usePreviewSiteFontStorageUrl, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, u as canInspectSiteStyle, v as PreviewFormProvider, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-
|
|
2
|
+
import { A as resolveButtonStyleSelection, D as buttonStyleSelectionParameterValue, E as buttonStyleHoverPreferenceValue, F as buttonStyleSelectionsEqual, Gr as getSiteFontsStorageUrl, Jn as paletteColorsSchema, Kn as paletteColorEntries, Kr as VARIANT_ROLES, M as updateButtonStyleSelectionChoice, N as buttonStyleSelectionKey, Ur as buildFontPreviewUrl, Wr as generateFontFaceCss, i as ThemedButtonSpecimen, j as updateButtonStyleHoverPreference, k as findButtonStyleRecipe } from "./ThemedButton-Bi0rgijy.mjs";
|
|
3
|
+
import { $a as Popover, $o as isEdited, A as previewHeaderStyle, Aa as defaultFooterPreferences, Ao as Smartphone, C as openRow, Ca as getHeaderLayout, Ct as useUISelector, D as previewCuratedPalette, E as previewButtonStyle, Et as useEntryController, F as syncStyleConfiguratorState, Ga as Select, Go as ChevronRight, Hn as listEntryPageContentSlots, I as toggleRow, Ja as SelectTrigger, Jo as Check, Ka as SelectContent, Ko as ChevronLeft, L as createOptimisticActionRunner, Lo as Monitor, M as restageSelectionChanges, N as setPaletteColors, O as previewFooterLook, Oo as Tablet, P as styleConfiguratorHistoryEntryForPersistedSelection, Pt as LinkedEntryLeaseBanner, Qa as SearchInput, R as resolveStyleConfiguratorInitialSnapshot, Ro as Maximize2, S as markApplySaving, Sa as findFooterLook, So as DropdownMenuTrigger, Sr as ThemeScope, St as ContentFieldsForm, T as planStyleSwitch, Ta as defaultHeaderLogoContext, Un as listPageSurfaceContentSlots, Vn as createManifestValidation, Wn as blocksKeys, X as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, Xa as Callout, Ya as SelectValue, Yo as Button, Z as reportPreviewDesignError, Za as CalloutDescription, Zo as cn, _ as deriveStyleConfiguratorCapabilities, _o as DropdownMenu, _t as resolveFooterLayoutHints, a as selectionSnapshotFromApplySiteStyleSelectionResponse, aa as compileReplacementSiteThemeFromSelections, ao as TabsList, ar as deriveRouteMetadataPresentation, b as markApplyFailed, bo as DropdownMenuLabel, cr as unwrapResponse, ct as resolvePreviewSidebarTab, d as cycleSiteChromeSelectionId, ds as syncStateOf, eo as PopoverContent, es as canWriteLinkedEntry, f as planSiteChromeSelection, fs as valueStatus, g as createStyleConfiguratorState, ga as palettesForSiteStyle, go as Surface, h as cancelPreview, ha as offeredSiteStyles, hn as createStoreBackend, ho as CollapsibleTrigger, ht as FooterComposerPanel, i as buildApplySiteStyleSelectionBody, io as TabsContent, j as resetTypographyToSaved, jo as SlidersHorizontal, k as previewHeaderLayout, ka as replaceSiteStyleCompilationPlan, kt as useAutosaveStatus, lr as useEditorUiStore, m as applyTypographyDraftPatch, ma as getCuratedSiteStyle, mn as FormRenderer, mo as CollapsibleContent, ms as assertNever$1, n as useSiteChromeCustomizeOptional, no as Input, oa as compileUpdatedSiteThemeFromSelections, oo as TabsTrigger, or as resolvePageRouteSlug, p as applyResolvedSelections, pn as ManifestForm, po as Collapsible, pt as usePreviewAuth, qa as SelectItem, qn as getDashboardUrl, qo as ChevronDown, r as StyleSwitchSummary, ro as Tabs, rr as isAdapterReferenceKind, s as usePreviewDesignCoordinator, sr as resolveContentTitle, to as PopoverTrigger, tr as routeLifecycleContext, u as buildSiteChromeSelectionModels, un as BlockEditor, ur as useEditorUiStoreInstance, us as displayedValues, v as dismissWarnings, vo as DropdownMenuContent, w as palettePreviewProjection, wa as getHeaderStyle, wo as X$1, wr as resolveSdkFooterMode, x as markApplySaved, xo as DropdownMenuSeparator, y as isPreviewingChange, yo as DropdownMenuItem, yr as toEditorBlockItem } from "./SiteChromeCustomizeContext-BQ8vvKb-.mjs";
|
|
4
|
+
import { n as Separator, t as Spinner } from "./spinner-KVVZh8jd.mjs";
|
|
5
|
+
import { _ as usePreviewBlockCustomizeSelectionOptional, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as useBlockCustomizeControls, h as usePreviewSiteFontStorageUrl, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, u as canInspectSiteStyle, v as PreviewFormProvider, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-wLkXrWy9.mjs";
|
|
6
6
|
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
@@ -585,6 +585,11 @@ const SUBROUTE_KINDS = {
|
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
587
|
//#endregion
|
|
588
|
+
//#region ../content-model/src/content-types/entryValidation.ts
|
|
589
|
+
function hasRepeaterVariants(field) {
|
|
590
|
+
return field.itemTypes !== void 0;
|
|
591
|
+
}
|
|
592
|
+
//#endregion
|
|
588
593
|
//#region ../content-model/src/contentManifest.ts
|
|
589
594
|
function assertNever(value) {
|
|
590
595
|
throw new Error(`Unhandled content field mapping decision: ${JSON.stringify(value)}`);
|
|
@@ -627,6 +632,9 @@ const DISPLAY_MEDIA_KINDS = [
|
|
|
627
632
|
"video",
|
|
628
633
|
"audio"
|
|
629
634
|
];
|
|
635
|
+
function mapContentFields(fields, context) {
|
|
636
|
+
return fields.map((field) => toFieldDefinition(field, context)).filter((field) => field !== null);
|
|
637
|
+
}
|
|
630
638
|
function toFieldDefinition(field, context = {}) {
|
|
631
639
|
const label = field.label ?? startCase(field.id);
|
|
632
640
|
const base = {
|
|
@@ -749,18 +757,24 @@ function toFieldDefinition(field, context = {}) {
|
|
|
749
757
|
};
|
|
750
758
|
}
|
|
751
759
|
case "repeater": {
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
return {
|
|
755
|
-
id: field.id,
|
|
756
|
-
label,
|
|
757
|
-
description: field.description ?? void 0,
|
|
758
|
-
required: field.required ?? false,
|
|
760
|
+
const repeater = {
|
|
761
|
+
...base,
|
|
759
762
|
type: "repeater",
|
|
760
|
-
|
|
761
|
-
itemLabel: field.itemLabel ?? "Item",
|
|
762
|
-
schema: { fields: nestedFields }
|
|
763
|
+
itemLabel: field.itemLabel ?? "Item"
|
|
763
764
|
};
|
|
765
|
+
if (hasRepeaterVariants(field)) return {
|
|
766
|
+
...repeater,
|
|
767
|
+
polymorphic: true,
|
|
768
|
+
itemTypes: Object.fromEntries(Object.entries(field.itemTypes).map(([typeId, variant]) => [typeId, {
|
|
769
|
+
label: typeof variant.label === "string" ? variant.label : startCase(typeId),
|
|
770
|
+
fields: mapContentFields(variant.fields ?? [], context)
|
|
771
|
+
}]))
|
|
772
|
+
};
|
|
773
|
+
const fields = mapContentFields(field.fields ?? field.schema?.fields ?? [], context);
|
|
774
|
+
return fields.length ? {
|
|
775
|
+
...repeater,
|
|
776
|
+
schema: { fields }
|
|
777
|
+
} : null;
|
|
764
778
|
}
|
|
765
779
|
default: return null;
|
|
766
780
|
}
|
|
@@ -783,12 +797,7 @@ function startCase(value) {
|
|
|
783
797
|
* @returns Array of field definitions for form rendering
|
|
784
798
|
*/
|
|
785
799
|
function mapContentSchemaToFormFields(schema, context = {}) {
|
|
786
|
-
|
|
787
|
-
for (const field of schema.fields ?? []) {
|
|
788
|
-
const definition = toFieldDefinition(field, context);
|
|
789
|
-
if (definition) fields.push(definition);
|
|
790
|
-
}
|
|
791
|
-
return fields;
|
|
800
|
+
return mapContentFields(schema.fields ?? [], context);
|
|
792
801
|
}
|
|
793
802
|
function expandButtonFieldGroup(fieldId, fieldLabel, context = {}) {
|
|
794
803
|
return {
|
|
@@ -1949,20 +1958,22 @@ function DesignSection({ panel, takeover, controls }) {
|
|
|
1949
1958
|
//#endregion
|
|
1950
1959
|
//#region ../preview-next/src/client/preview/PreviewFooterEditorPanel.tsx
|
|
1951
1960
|
function PreviewFooterEditorPanel({ sdkConfig, apiClient, siteId, dashboardBaseUrl, theme, selectionId, selectionVersion, siteStyleAccess, inspection, canEdit, onSaved }) {
|
|
1961
|
+
const footerPreferences = useSiteChromeCustomizeOptional()?.getFooterPreferences();
|
|
1952
1962
|
const dashboardSiteUrl = `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}`;
|
|
1953
|
-
const navigationLayoutAccess =
|
|
1954
|
-
kind: "editable",
|
|
1963
|
+
const navigationLayoutAccess = footerNavigationAccess({
|
|
1955
1964
|
theme,
|
|
1956
1965
|
selectionId,
|
|
1957
|
-
selectionVersion
|
|
1958
|
-
|
|
1966
|
+
selectionVersion,
|
|
1967
|
+
siteStyleAccess,
|
|
1968
|
+
footerPreferences
|
|
1969
|
+
});
|
|
1959
1970
|
return /* @__PURE__ */ jsx(FooterComposerPanel, {
|
|
1960
1971
|
apiClient,
|
|
1961
1972
|
siteId,
|
|
1962
1973
|
customFooterMode: resolveSdkFooterMode(sdkConfig),
|
|
1963
1974
|
manageLinksHref: `${dashboardSiteUrl}/navigation`,
|
|
1964
1975
|
manageSettingsHref: `${dashboardSiteUrl}/settings`,
|
|
1965
|
-
|
|
1976
|
+
...footerComposerLayoutProps(theme),
|
|
1966
1977
|
navigationLayoutAccess,
|
|
1967
1978
|
loadingFallback: /* @__PURE__ */ jsx(ContentSpinner, { className: "py-8" }),
|
|
1968
1979
|
...footerComposerInspectionProps(inspection),
|
|
@@ -1971,6 +1982,22 @@ function PreviewFooterEditorPanel({ sdkConfig, apiClient, siteId, dashboardBaseU
|
|
|
1971
1982
|
onSaved
|
|
1972
1983
|
});
|
|
1973
1984
|
}
|
|
1985
|
+
function footerComposerLayoutProps(theme) {
|
|
1986
|
+
const hints = resolveFooterLayoutHints(theme);
|
|
1987
|
+
return {
|
|
1988
|
+
arrangement: hints.layoutVariant,
|
|
1989
|
+
legalRegion: hints.legalRegion
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1992
|
+
function footerNavigationAccess(input) {
|
|
1993
|
+
return input.siteStyleAccess.kind === "apply-allowed" && input.theme && input.footerPreferences && input.selectionVersion !== null ? {
|
|
1994
|
+
kind: "editable",
|
|
1995
|
+
theme: input.theme,
|
|
1996
|
+
selectionId: input.selectionId,
|
|
1997
|
+
selectionVersion: input.selectionVersion,
|
|
1998
|
+
preferences: input.footerPreferences
|
|
1999
|
+
} : { kind: "hidden" };
|
|
2000
|
+
}
|
|
1974
2001
|
//#endregion
|
|
1975
2002
|
//#region ../preview-next/src/client/preview/PreviewEditorGuidanceCard.tsx
|
|
1976
2003
|
function PreviewEditorGuidanceCard({ guidance, completeSetupDisabled, onCompleteSetup }) {
|
|
@@ -2737,6 +2764,147 @@ function HeaderMenuControls({ state, disabled, onMenuFontChange, onMenuFontSizeC
|
|
|
2737
2764
|
});
|
|
2738
2765
|
}
|
|
2739
2766
|
//#endregion
|
|
2767
|
+
//#region ../preview-next/src/client/preview/siteStylePreviewPlanner.ts
|
|
2768
|
+
function deriveSiteStylePreviewUpdate(baseTheme, baseSelection) {
|
|
2769
|
+
return {
|
|
2770
|
+
kind: "derive-update",
|
|
2771
|
+
baseTheme,
|
|
2772
|
+
baseSelection
|
|
2773
|
+
};
|
|
2774
|
+
}
|
|
2775
|
+
function planSiteStylePreviewChange(input) {
|
|
2776
|
+
const compilationPlan = compilationPlanForPreview(input);
|
|
2777
|
+
const common = {
|
|
2778
|
+
siteStyle: input.siteStyle,
|
|
2779
|
+
palette: input.selection.palette,
|
|
2780
|
+
typography: input.selection.typography
|
|
2781
|
+
};
|
|
2782
|
+
const currentHeaderSelection = {
|
|
2783
|
+
layoutId: input.selection.headerLayoutId,
|
|
2784
|
+
styleId: input.selection.headerStyleId
|
|
2785
|
+
};
|
|
2786
|
+
const compiled = compilationPlan.kind === "replace-site-style" ? compileReplacementSiteThemeFromSelections({
|
|
2787
|
+
...common,
|
|
2788
|
+
compilationPlan
|
|
2789
|
+
}) : compileUpdatedSiteThemeFromSelections({
|
|
2790
|
+
...common,
|
|
2791
|
+
compilationPlan,
|
|
2792
|
+
currentHeaderSelection
|
|
2793
|
+
});
|
|
2794
|
+
return {
|
|
2795
|
+
themeOverlay: compiled.theme,
|
|
2796
|
+
resolvedSelections: compiled.resolvedSelections,
|
|
2797
|
+
warnings: compiled.warnings
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
/**
|
|
2801
|
+
* The configurator's previews, with the one assumption they make written down
|
|
2802
|
+
* once instead of four times.
|
|
2803
|
+
*
|
|
2804
|
+
* `planSiteStylePreviewChange` requires the brand-presentation mode (#1318 D24)
|
|
2805
|
+
* so that no caller inherits it invisibly. Nothing hands the site-style
|
|
2806
|
+
* configurator the row's persisted record yet, so it states `'recommended'` —
|
|
2807
|
+
* correct for every row except a `'plain'` one, where the preview is a round
|
|
2808
|
+
* trip behind until the first save teaches it otherwise. The plan's closing
|
|
2809
|
+
* checklist has what closing that costs.
|
|
2810
|
+
*/
|
|
2811
|
+
function planConfiguratorPreview(input) {
|
|
2812
|
+
return planSiteStylePreviewChange({
|
|
2813
|
+
...input,
|
|
2814
|
+
headerBrandPresentation: "recommended"
|
|
2815
|
+
});
|
|
2816
|
+
}
|
|
2817
|
+
function compilationPlanForPreview(input) {
|
|
2818
|
+
if (input.compilation.kind === "replace-site-style") return replacementCompilationPlan(input);
|
|
2819
|
+
const baseTheme = input.compilation.baseTheme;
|
|
2820
|
+
if (!baseTheme) return replacementCompilationPlan(input);
|
|
2821
|
+
if (input.compilation.kind === "edit-chrome") return updateCompilationPlan({
|
|
2822
|
+
baseTheme,
|
|
2823
|
+
selection: input.selection,
|
|
2824
|
+
footerPreferences: input.footerPreferences,
|
|
2825
|
+
headerLogoContext: input.headerLogoContext,
|
|
2826
|
+
headerBrandPresentation: input.headerBrandPresentation,
|
|
2827
|
+
recompileButtons: false,
|
|
2828
|
+
recompileHeader: input.compilation.surface === "header"
|
|
2829
|
+
});
|
|
2830
|
+
if (input.compilation.baseSelection.siteStyleId !== input.selection.siteStyleId) return replacementCompilationPlan(input);
|
|
2831
|
+
return updateCompilationPlan({
|
|
2832
|
+
baseTheme,
|
|
2833
|
+
selection: input.selection,
|
|
2834
|
+
footerPreferences: input.footerPreferences,
|
|
2835
|
+
headerLogoContext: input.headerLogoContext,
|
|
2836
|
+
headerBrandPresentation: input.headerBrandPresentation,
|
|
2837
|
+
recompileButtons: !buttonStyleSelectionsEqual(input.compilation.baseSelection.buttonStyleSelection, input.selection.buttonStyleSelection),
|
|
2838
|
+
recompileHeader: headerSelectionChanged(input.compilation.baseSelection, input.selection)
|
|
2839
|
+
});
|
|
2840
|
+
}
|
|
2841
|
+
function updateCompilationPlan(input) {
|
|
2842
|
+
const selection = {
|
|
2843
|
+
layoutId: input.selection.headerLayoutId,
|
|
2844
|
+
styleId: input.selection.headerStyleId
|
|
2845
|
+
};
|
|
2846
|
+
return {
|
|
2847
|
+
kind: "update-selection",
|
|
2848
|
+
buttons: input.recompileButtons ? {
|
|
2849
|
+
kind: "recompile",
|
|
2850
|
+
selection: input.selection.buttonStyleSelection,
|
|
2851
|
+
reason: "selection-change"
|
|
2852
|
+
} : input.baseTheme.buttons ? {
|
|
2853
|
+
kind: "preserve",
|
|
2854
|
+
buttons: input.baseTheme.buttons,
|
|
2855
|
+
selection: input.selection.buttonStyleSelection
|
|
2856
|
+
} : {
|
|
2857
|
+
kind: "recompile",
|
|
2858
|
+
selection: input.selection.buttonStyleSelection,
|
|
2859
|
+
reason: "missing-applied-buttons"
|
|
2860
|
+
},
|
|
2861
|
+
header: input.recompileHeader ? {
|
|
2862
|
+
kind: "recompile",
|
|
2863
|
+
selection,
|
|
2864
|
+
brandPresentation: brandPresentationDirective(input)
|
|
2865
|
+
} : {
|
|
2866
|
+
kind: "preserve",
|
|
2867
|
+
persistedTheme: input.baseTheme,
|
|
2868
|
+
preferences: null,
|
|
2869
|
+
brandPresentation: {
|
|
2870
|
+
kind: "apply-logo-context",
|
|
2871
|
+
logo: input.headerLogoContext ?? defaultHeaderLogoContext
|
|
2872
|
+
}
|
|
2873
|
+
},
|
|
2874
|
+
footer: {
|
|
2875
|
+
preferences: input.footerPreferences ?? defaultFooterPreferences,
|
|
2876
|
+
footerLookId: input.selection.footerLookId
|
|
2877
|
+
}
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2880
|
+
/**
|
|
2881
|
+
* A `'plain'` row wears no presentation, so the preview must not apply one
|
|
2882
|
+
* either: previewing a badge the save will not persist makes every save on such
|
|
2883
|
+
* a row report a header mismatch, which is the divergence signal talking about
|
|
2884
|
+
* the preview rather than about the compilers (#1318 Phase 4c).
|
|
2885
|
+
*/
|
|
2886
|
+
function brandPresentationDirective(input) {
|
|
2887
|
+
return input.headerBrandPresentation === "plain" ? { kind: "use-compiled-defaults" } : {
|
|
2888
|
+
kind: "apply-logo-context",
|
|
2889
|
+
logo: input.headerLogoContext ?? defaultHeaderLogoContext
|
|
2890
|
+
};
|
|
2891
|
+
}
|
|
2892
|
+
function headerSelectionChanged(base, previewed) {
|
|
2893
|
+
return base.headerLayoutId !== previewed.headerLayoutId || base.headerStyleId !== previewed.headerStyleId;
|
|
2894
|
+
}
|
|
2895
|
+
function replacementCompilationPlan(input) {
|
|
2896
|
+
return replaceSiteStyleCompilationPlan({
|
|
2897
|
+
headerSelection: {
|
|
2898
|
+
layoutId: input.selection.headerLayoutId,
|
|
2899
|
+
styleId: input.selection.headerStyleId
|
|
2900
|
+
},
|
|
2901
|
+
footerLookId: input.selection.footerLookId,
|
|
2902
|
+
footerPreferences: input.footerPreferences ?? defaultFooterPreferences,
|
|
2903
|
+
buttonStyleSelection: input.selection.buttonStyleSelection,
|
|
2904
|
+
headerLogo: input.headerLogoContext ?? defaultHeaderLogoContext
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
//#endregion
|
|
2740
2908
|
//#region ../preview-next/src/client/preview/typographyFontCatalog.ts
|
|
2741
2909
|
const typographyFontCategories = [
|
|
2742
2910
|
{
|
|
@@ -3759,6 +3927,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3759
3927
|
const router = useRouter();
|
|
3760
3928
|
const previewDesign = usePreviewDesignCoordinator();
|
|
3761
3929
|
const siteChromeCustomize = useSiteChromeCustomizeOptional();
|
|
3930
|
+
const footerPreferences = siteChromeCustomize ? siteChromeCustomize.getFooterPreferences() : defaultFooterPreferences;
|
|
3762
3931
|
const siteStyleHistory = siteChromeCustomize?.siteStyleHistory;
|
|
3763
3932
|
const setSiteStyleStagedPreviewActive = siteStyleHistory?.setStagedPreviewActive;
|
|
3764
3933
|
const { applyFailed, applyStarted, applySucceeded, clearPreview, previewTheme } = previewDesign;
|
|
@@ -3815,7 +3984,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3815
3984
|
setState((current) => current ? syncStyleConfiguratorState(current, baseSnapshot) : createStyleConfiguratorState(baseSnapshot));
|
|
3816
3985
|
}, [baseSnapshot]);
|
|
3817
3986
|
useEffect(() => {
|
|
3818
|
-
if (!state || !baseSnapshot) {
|
|
3987
|
+
if (!state || !baseSnapshot || footerPreferences === null) {
|
|
3819
3988
|
clearPreview("style-configurator");
|
|
3820
3989
|
return;
|
|
3821
3990
|
}
|
|
@@ -3829,6 +3998,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3829
3998
|
return;
|
|
3830
3999
|
}
|
|
3831
4000
|
previewTheme("style-configurator", planConfiguratorPreview({
|
|
4001
|
+
footerPreferences,
|
|
3832
4002
|
siteStyle,
|
|
3833
4003
|
selection: state.previewed,
|
|
3834
4004
|
headerLogoContext,
|
|
@@ -3839,6 +4009,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3839
4009
|
baseSnapshot,
|
|
3840
4010
|
clearPreview,
|
|
3841
4011
|
previewTheme,
|
|
4012
|
+
footerPreferences,
|
|
3842
4013
|
headerLogoContext,
|
|
3843
4014
|
theme
|
|
3844
4015
|
]);
|
|
@@ -3886,17 +4057,22 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3886
4057
|
}, []);
|
|
3887
4058
|
const patchTypography = useCallback((patch) => {
|
|
3888
4059
|
setState((current) => {
|
|
3889
|
-
if (!current) return current;
|
|
4060
|
+
if (!current || footerPreferences === null) return current;
|
|
3890
4061
|
const siteStyle = getCuratedSiteStyle(current.previewed.siteStyleId);
|
|
3891
4062
|
if (!siteStyle) return current;
|
|
3892
4063
|
return applyTypographyDraftPatch(current, planConfiguratorPreview({
|
|
4064
|
+
footerPreferences,
|
|
3893
4065
|
siteStyle,
|
|
3894
4066
|
selection: current.previewed,
|
|
3895
4067
|
headerLogoContext,
|
|
3896
4068
|
compilation: deriveSiteStylePreviewUpdate(theme, current.base)
|
|
3897
4069
|
}).themeOverlay.typography, patch);
|
|
3898
4070
|
});
|
|
3899
|
-
}, [
|
|
4071
|
+
}, [
|
|
4072
|
+
footerPreferences,
|
|
4073
|
+
headerLogoContext,
|
|
4074
|
+
theme
|
|
4075
|
+
]);
|
|
3900
4076
|
const handleHeadingTypographyChange = useCallback((patch) => {
|
|
3901
4077
|
patchTypography({
|
|
3902
4078
|
kind: "heading",
|
|
@@ -3942,7 +4118,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3942
4118
|
setState((current) => current ? dismissWarnings(current) : current);
|
|
3943
4119
|
}, []);
|
|
3944
4120
|
const applySelection = useCallback(async (live, restage) => {
|
|
3945
|
-
if (!live || !isPreviewingChange(live)) return;
|
|
4121
|
+
if (footerPreferences === null || !live || !isPreviewingChange(live)) return;
|
|
3946
4122
|
if (!deriveStyleConfiguratorCapabilities(live).canApplyStaged) return;
|
|
3947
4123
|
const previewed = live.previewed;
|
|
3948
4124
|
if (!getCuratedSiteStyle(previewed.siteStyleId)) return;
|
|
@@ -3985,6 +4161,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3985
4161
|
}
|
|
3986
4162
|
});
|
|
3987
4163
|
}, [
|
|
4164
|
+
footerPreferences,
|
|
3988
4165
|
apiClient,
|
|
3989
4166
|
applyFailed,
|
|
3990
4167
|
applyStarted,
|
|
@@ -3997,8 +4174,9 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3997
4174
|
]);
|
|
3998
4175
|
const handleApply = useCallback(() => applySelection(stateRef.current), [applySelection]);
|
|
3999
4176
|
const handleChooseSiteStyle = useCallback((siteStyleId) => {
|
|
4000
|
-
if (!stateRef.current) return;
|
|
4177
|
+
if (!stateRef.current || footerPreferences === null) return;
|
|
4001
4178
|
const plan = planStyleSwitch(stateRef.current, siteStyleId, (state) => withResolvedSiteStyleSelections({
|
|
4179
|
+
footerPreferences,
|
|
4002
4180
|
state,
|
|
4003
4181
|
headerLogoContext,
|
|
4004
4182
|
theme
|
|
@@ -4011,10 +4189,11 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
4011
4189
|
});
|
|
4012
4190
|
}, [
|
|
4013
4191
|
applySelection,
|
|
4192
|
+
footerPreferences,
|
|
4014
4193
|
headerLogoContext,
|
|
4015
4194
|
theme
|
|
4016
4195
|
]);
|
|
4017
|
-
if (!state || !baseSnapshot) return /* @__PURE__ */ jsx("p", {
|
|
4196
|
+
if (!state || !baseSnapshot || footerPreferences === null) return /* @__PURE__ */ jsx("p", {
|
|
4018
4197
|
className: "text-sm text-muted-foreground",
|
|
4019
4198
|
children: "Loading design controls..."
|
|
4020
4199
|
});
|
|
@@ -4030,6 +4209,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
4030
4209
|
const currentPalette = palettePreviewProjection(state.previewed.palette);
|
|
4031
4210
|
const paletteControlsDisabled = saving || !stagedCapabilities.canPreviewStaged;
|
|
4032
4211
|
const currentPreviewPlan = planConfiguratorPreview({
|
|
4212
|
+
footerPreferences,
|
|
4033
4213
|
siteStyle: currentSiteStyle,
|
|
4034
4214
|
selection: state.previewed,
|
|
4035
4215
|
headerLogoContext,
|
|
@@ -4135,18 +4315,18 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
4135
4315
|
}) : null
|
|
4136
4316
|
}),
|
|
4137
4317
|
/* @__PURE__ */ jsx(SiteChromeSelectionRow, {
|
|
4138
|
-
label: "Footer
|
|
4139
|
-
ariaLabel: "Footer
|
|
4140
|
-
defaultDescription: "Use the footer
|
|
4318
|
+
label: "Footer",
|
|
4319
|
+
ariaLabel: "Footer layout",
|
|
4320
|
+
defaultDescription: "Use the footer layout chosen for this site style.",
|
|
4141
4321
|
expanded: state.expandedRow === "footer",
|
|
4142
4322
|
onToggle: () => handleToggleRow("footer"),
|
|
4143
|
-
currentId:
|
|
4144
|
-
currentLabel:
|
|
4145
|
-
scopeDescription: "Changes footer
|
|
4323
|
+
currentId: chromeSelectionModels.footer.renderedLookId,
|
|
4324
|
+
currentLabel: currentFooterLook?.label ?? "Unknown footer layout",
|
|
4325
|
+
scopeDescription: "Changes the footer layout on every page.",
|
|
4146
4326
|
options: chromeSelectionModels.footer.options,
|
|
4147
4327
|
diagnostics: chromeSelectionModels.footer.diagnostics,
|
|
4148
4328
|
onCycle: (direction) => {
|
|
4149
|
-
const next = cycleSiteChromeSelectionId(chromeSelectionModels.footer.options,
|
|
4329
|
+
const next = cycleSiteChromeSelectionId(chromeSelectionModels.footer.options, chromeSelectionModels.footer.renderedLookId, direction);
|
|
4150
4330
|
if (next !== void 0) handlePreviewFooterLook(next);
|
|
4151
4331
|
},
|
|
4152
4332
|
onPreview: handlePreviewFooterLook,
|
|
@@ -4509,6 +4689,7 @@ function withResolvedSiteStyleSelections(input) {
|
|
|
4509
4689
|
const siteStyle = getCuratedSiteStyle(input.state.previewed.siteStyleId);
|
|
4510
4690
|
if (!siteStyle) return input.state;
|
|
4511
4691
|
const result = planConfiguratorPreview({
|
|
4692
|
+
footerPreferences: input.footerPreferences,
|
|
4512
4693
|
siteStyle,
|
|
4513
4694
|
selection: input.state.previewed,
|
|
4514
4695
|
headerLogoContext: input.headerLogoContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { t as Spinner } from "./spinner-
|
|
4
|
-
import { a as PREVIEW_CHROME_PORTAL_CLASS_NAME, b as PREVIEW_CHROME_Z_INDEX, c as resolvePreviewChromeSurface, l as PREVIEW_THEME_COOKIE_NAME, o as PREVIEW_CHROME_THEME_CLASS_NAME, s as applyPreviewChromeSurfaceToElement, x as FixedBottomSurface } from "./SdkPreviewModeRuntime-
|
|
2
|
+
import { Do as TriangleAlert, Dt as useEntryEditorController, Eo as Undo2, Fo as PenLine, G as usePreviewPageDesignEditorState, Ha as Tooltip, Io as Palette, J as previewDesignHistoryDomainForCommand, Lt as EditorWriteSurface, No as Redo2, Ot as classifyHistoryShortcut, Po as Pencil, So as DropdownMenuTrigger, Ua as TooltipContent, Uo as Eye, Wa as TooltipTrigger, Wo as EllipsisVertical, Xo as cva, Y as selectPreviewDesignHistoryDomain, Yo as Button, Zo as cn, _o as DropdownMenu, co as DialogContent, cr as unwrapResponse, do as DialogHeader, fo as DialogTitle, fr as canDiscardDraft, ko as Sparkles, kt as useAutosaveStatus, lo as DialogDescription, lr as useEditorUiStore, n as useSiteChromeCustomizeOptional, pt as usePreviewAuth, q as usePreviewDesignHistoryOrder, qo as ChevronDown, sn as useEditor, so as Dialog, ur as useEditorUiStoreInstance, vo as DropdownMenuContent, yo as DropdownMenuItem, zo as LoaderCircle } from "./SiteChromeCustomizeContext-BQ8vvKb-.mjs";
|
|
3
|
+
import { t as Spinner } from "./spinner-KVVZh8jd.mjs";
|
|
4
|
+
import { a as PREVIEW_CHROME_PORTAL_CLASS_NAME, b as PREVIEW_CHROME_Z_INDEX, c as resolvePreviewChromeSurface, l as PREVIEW_THEME_COOKIE_NAME, o as PREVIEW_CHROME_THEME_CLASS_NAME, s as applyPreviewChromeSurfaceToElement, x as FixedBottomSurface } from "./SdkPreviewModeRuntime-wLkXrWy9.mjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState, useTransition } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -99,20 +99,10 @@ function getLifecycleLabel(currentLifecycle) {
|
|
|
99
99
|
if (currentLifecycle === "scheduled") return "Scheduled";
|
|
100
100
|
return "Draft";
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
if (!value) return null;
|
|
104
|
-
const date = new Date(value);
|
|
105
|
-
if (Number.isNaN(date.getTime())) return null;
|
|
106
|
-
return date.toLocaleTimeString(void 0, {
|
|
107
|
-
hour: "2-digit",
|
|
108
|
-
minute: "2-digit"
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function EditorStatusBar({ status, lastSavedAt, toolbar, draftSyncState = "baseline", onPublish, publishMenuItems, actionsSlot, toggleSlot, messageOverride, messageVariant = "default", actionButtonSize = "default", hasFailedSaves = false, onRetryFailedSaves, historyControls, secondaryMessage, menuItems, mobileMenuItems }) {
|
|
102
|
+
function EditorStatusBar({ status, lastSavedLabel, toolbar, draftSyncState = "baseline", onPublish, publishMenuItems, actionsSlot, toggleSlot, messageOverride, messageVariant = "default", actionButtonSize = "default", hasFailedSaves = false, onRetryFailedSaves, historyControls, secondaryMessage, menuItems, mobileMenuItems }) {
|
|
112
103
|
const isSaving = status === "saving";
|
|
113
104
|
const unsavedError = draftSyncState === "failed" || hasFailedSaves || false;
|
|
114
105
|
const generalError = status === "error" && !unsavedError;
|
|
115
|
-
const lastSavedLabel = formatTimestamp(lastSavedAt);
|
|
116
106
|
const hasChanges = !!toolbar?.hasUnpublishedChanges;
|
|
117
107
|
const currentLifecycle = toolbar?.currentStatus ?? null;
|
|
118
108
|
const publishLabel = toolbar?.publishLabel ?? "Publish changes";
|
|
@@ -146,6 +136,8 @@ function EditorStatusBar({ status, lastSavedAt, toolbar, draftSyncState = "basel
|
|
|
146
136
|
unsavedError,
|
|
147
137
|
generalError,
|
|
148
138
|
isSaving,
|
|
139
|
+
messageVariant,
|
|
140
|
+
draftSyncState,
|
|
149
141
|
toolbar?.publishedMessage,
|
|
150
142
|
currentLifecycle,
|
|
151
143
|
hasChanges,
|
|
@@ -372,7 +364,7 @@ function buildChromeMenuItems(input) {
|
|
|
372
364
|
onClick: input.leaveEditMode
|
|
373
365
|
}];
|
|
374
366
|
}
|
|
375
|
-
function EditorChrome({ toolbarOverrides, onPublish, onDiscard, publishMenuItems, actionsSlot, messageOverride, messageVariant = "default", actionButtonSize = "default", showStatusBar = true, showToggle = true, menuItems: menuItemsOverride, mobileMenuItems, status = "idle",
|
|
367
|
+
function EditorChrome({ toolbarOverrides, onPublish, onDiscard, publishMenuItems, actionsSlot, messageOverride, messageVariant = "default", actionButtonSize = "default", showStatusBar = true, showToggle = true, menuItems: menuItemsOverride, mobileMenuItems, status = "idle", lastSavedLabel = null, draftSyncState = "baseline", hasFailedSaves = false, onRetryFailedSaves, historyControls }) {
|
|
376
368
|
const { isEditingMode, toggleEditingMode } = useEditor();
|
|
377
369
|
const toolbar = useMemo(() => resolveChromeToolbar(toolbarOverrides, draftSyncState), [draftSyncState, toolbarOverrides]);
|
|
378
370
|
const menuItems = useMemo(() => menuItemsOverride ?? buildChromeMenuItems({
|
|
@@ -387,7 +379,7 @@ function EditorChrome({ toolbarOverrides, onPublish, onDiscard, publishMenuItems
|
|
|
387
379
|
]);
|
|
388
380
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [showStatusBar && isEditingMode ? /* @__PURE__ */ jsx(EditorStatusBar, {
|
|
389
381
|
status,
|
|
390
|
-
|
|
382
|
+
lastSavedLabel,
|
|
391
383
|
draftSyncState,
|
|
392
384
|
toolbar,
|
|
393
385
|
onPublish,
|
|
@@ -440,47 +432,23 @@ function PreviewOpenEditorButton() {
|
|
|
440
432
|
const { assistantActive, editorActive, toggleSidebar } = usePreviewSidebarControls();
|
|
441
433
|
return /* @__PURE__ */ jsxs("div", {
|
|
442
434
|
className: "flex items-center gap-2",
|
|
443
|
-
children: [
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
"aria-pressed": assistantActive,
|
|
461
|
-
title: assistantActive ? "Close AI assistant" : "Open AI assistant",
|
|
462
|
-
children: /* @__PURE__ */ jsx(Sparkles, { className: "size-4" })
|
|
463
|
-
})
|
|
464
|
-
]
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
/** Site design, one click from the toolbar. */
|
|
468
|
-
function PreviewSiteDesignButton() {
|
|
469
|
-
const uiStore = useEditorUiStoreInstance();
|
|
470
|
-
if (!(useSiteChromeCustomizeOptional()?.canOpenDesignEditor === true)) return null;
|
|
471
|
-
return /* @__PURE__ */ jsxs(Button, {
|
|
472
|
-
variant: "outline",
|
|
473
|
-
size: "sm",
|
|
474
|
-
className: "gap-1.5",
|
|
475
|
-
onClick: () => uiStore.getState().openPreviewEditor({
|
|
476
|
-
kind: "design",
|
|
477
|
-
row: "site-style"
|
|
478
|
-
}),
|
|
479
|
-
"aria-label": "Site design",
|
|
480
|
-
title: "Style, colours and fonts for the whole site",
|
|
481
|
-
children: [/* @__PURE__ */ jsx(Palette, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
482
|
-
className: "hidden lg:inline",
|
|
483
|
-
children: "Site design"
|
|
435
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
436
|
+
variant: editorActive ? "default" : "outline",
|
|
437
|
+
size: "icon",
|
|
438
|
+
onClick: () => toggleSidebar("editor"),
|
|
439
|
+
"aria-label": editorActive ? "Close editor" : "Open editor",
|
|
440
|
+
"aria-pressed": editorActive,
|
|
441
|
+
title: editorActive ? "Close editor" : "Open editor",
|
|
442
|
+
children: /* @__PURE__ */ jsx(Pencil, { className: "size-4" })
|
|
443
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
444
|
+
variant: assistantActive ? "default" : "outline",
|
|
445
|
+
size: "icon",
|
|
446
|
+
className: "hidden sm:inline-flex",
|
|
447
|
+
onClick: () => toggleSidebar("assistant"),
|
|
448
|
+
"aria-label": assistantActive ? "Close AI assistant" : "Open AI assistant",
|
|
449
|
+
"aria-pressed": assistantActive,
|
|
450
|
+
title: assistantActive ? "Close AI assistant" : "Open AI assistant",
|
|
451
|
+
children: /* @__PURE__ */ jsx(Sparkles, { className: "size-4" })
|
|
484
452
|
})]
|
|
485
453
|
});
|
|
486
454
|
}
|
|
@@ -885,7 +853,7 @@ function PreviewEditorUI({ dashboardBaseUrl = null, inMaintenanceMode = false, s
|
|
|
885
853
|
] }),
|
|
886
854
|
mobileMenuItems: previewOpenEditorMobileMenuItems,
|
|
887
855
|
status: combinedAutosave.status,
|
|
888
|
-
lastSavedAt,
|
|
856
|
+
lastSavedLabel: controller.formatSavedTime(lastSavedAt),
|
|
889
857
|
draftSyncState,
|
|
890
858
|
hasFailedSaves: combinedAutosave.hasFailedSaves,
|
|
891
859
|
historyControls: {
|