@riverbankcms/sdk 0.78.2 → 0.80.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 +80 -0
- package/dist/PreviewEditorSidebar-QZG37QIF.mjs +2655 -0
- package/dist/{PreviewEditorUI-CS5P4N3P.mjs → PreviewEditorUI-AXIKSMZA.mjs} +27 -4
- package/dist/SdkPreviewModeRuntime-XE5M4UKM.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +56 -0
- package/dist/_dts/api/src/endpoints.d.ts +79 -0
- package/dist/_dts/api/src/index.d.ts +6 -4
- package/dist/_dts/api/src/media.d.ts +8 -1
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +8 -8
- package/dist/_dts/api/src/navigation/identity.d.ts +59 -0
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -0
- package/dist/_dts/api/src/siteIcons.d.ts +128 -0
- package/dist/_dts/api/src/siteInfrastructure.d.ts +124 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +16 -0
- package/dist/_dts/api/src/siteOnboarding.d.ts +13 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +17 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/webhooks.d.ts +239 -0
- package/dist/_dts/block-form/src/client/index.d.ts +2 -0
- package/dist/_dts/block-form/src/index.d.ts +2 -0
- package/dist/_dts/block-form/src/utils/evaluateVisibility.d.ts +2 -1
- package/dist/_dts/blocks/src/client/header.d.ts +1 -1
- package/dist/_dts/blocks/src/client.d.ts +12 -12
- package/dist/_dts/blocks/src/index.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -1
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +57 -0
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +22 -22
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +13 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +179 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +4 -2
- package/dist/_dts/blocks/src/system/fragments/library/faqHeading.d.ts +1 -0
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +10 -0
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +3 -1
- package/dist/_dts/blocks/src/system/icons/ids.d.ts +13 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +6 -0
- package/dist/_dts/blocks/src/system/icons/presets.d.ts +4 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +18 -0
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +239 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +94 -0
- package/dist/_dts/blocks/src/system/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -0
- package/dist/_dts/blocks/src/system/node/fragments/headingDecoration.d.ts +1 -4
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -7
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/header/enhanceHeaderSection.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +3 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +9 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +14 -1
- package/dist/_dts/content-model/src/contentManifest.d.ts +3 -1
- package/dist/_dts/core/src/branded.d.ts +6 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +200 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +8 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +8 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +8 -2
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +17 -0
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +42 -0
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +7 -1
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +82 -0
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +8 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -2
- package/dist/_dts/media-react/src/components/MediaLibrary.d.ts +2 -1
- package/dist/_dts/media-react/src/components/MediaPickerMini.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +5 -1
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeControlPlan.d.ts +24 -0
- package/dist/_dts/preview-next/src/client/blocks/useBlockCustomizeControls.d.ts +34 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +8 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewBlockCustomizeSelectionContext.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewOpenEditorButton.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/SelectedBlockCustomizePanel.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeEditorDraftPatch.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/storeTypes.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/webhooks.d.ts +44 -0
- package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +11 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +9 -0
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +58 -0
- package/dist/_dts/sdk/src/client/management/webhooks.d.ts +3 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +24 -4
- package/dist/_dts/sdk/src/next/index.d.ts +1 -1
- package/dist/_dts/sdk/src/next/revalidate.d.ts +26 -5
- package/dist/_dts/sdk/src/next/static-params.d.ts +28 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/index.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/verify.d.ts +6 -102
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/_dts/theme-core/src/accordions/siteStyleDefaults.d.ts +220 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +45 -2
- package/dist/_dts/theme-core/src/blockOverrides.d.ts +8 -0
- package/dist/_dts/theme-core/src/blocks/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/vars/testimonials.d.ts +4 -1
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/core.d.ts +20 -0
- package/dist/_dts/theme-core/src/cards/generateDefaultCardSystem.d.ts +6 -3
- package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +105 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +177 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +159 -21
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +16 -0
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +451 -57
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +86 -17
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +2 -3
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +86 -17
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +135 -3
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +5 -5
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +20 -1
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +286 -6
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +193 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +6 -12
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +10 -7
- package/dist/_dts/theme-core/src/site-styles/siteStyleThemeCompiler.d.ts +11 -0
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/testimonialQuotePresets.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +7 -29
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -0
- package/dist/_dts/ui/src/combobox.d.ts +1 -0
- package/dist/{PreviewEditorSidebar-4DXLYX2V.mjs → chunk-5NZGBSJF.mjs} +2215 -2566
- package/dist/{chunk-RGTOD4AJ.mjs → chunk-7PCYG6YV.mjs} +621 -108
- package/dist/{chunk-CR5HKAGU.mjs → chunk-BBLZSQEY.mjs} +79 -0
- package/dist/{chunk-MCRQMPET.mjs → chunk-GYXKAUFV.mjs} +4500 -912
- package/dist/{chunk-6HYXHRAI.mjs → chunk-HTB4BMKD.mjs} +267 -49
- package/dist/{chunk-OKMBEAXY.mjs → chunk-MPBNEVPB.mjs} +1 -1
- package/dist/cli/index.mjs +3255 -702
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -0
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +150 -0
- package/dist/client/{accordion-PLYNJIIM.mjs → accordion-QFZMNB7O.mjs} +1 -1
- package/dist/client/{bookingForm-BXAP6AO7.mjs → bookingForm-NCIXFWIG.mjs} +3 -3
- package/dist/client/bookings.mjs +1246 -323
- package/dist/client/{carousel-TRBXDHGF.mjs → carousel-EO4BJMWD.mjs} +2 -2
- package/dist/client/{cart-Z7H3HJRS.mjs → cart-FTYCLYUW.mjs} +5 -5
- package/dist/client/{checkout-WAFCUBIX.mjs → checkout-NFGLVCOX.mjs} +5 -5
- package/dist/client/{chunk-CWGTG37I.mjs → chunk-4W66ALYT.mjs} +1 -1
- package/dist/client/{chunk-JRDUHZCT.mjs → chunk-6GVVWSPU.mjs} +4 -4
- package/dist/client/{chunk-75OUS5MT.mjs → chunk-IWFZSQNZ.mjs} +1 -1
- package/dist/client/{chunk-JGXPTEI2.mjs → chunk-PUOELU4O.mjs} +95 -8
- package/dist/client/{chunk-FUXW6VW2.mjs → chunk-PYRBIURC.mjs} +4 -4
- package/dist/client/{chunk-ZI3LLBPZ.mjs → chunk-T6UIP6UZ.mjs} +1 -1
- package/dist/client/{chunk-DNRGY432.mjs → chunk-VDS5YFLX.mjs} +1 -1
- package/dist/client/{chunk-UVQEJJTN.mjs → chunk-Y37KDO7P.mjs} +1 -1
- package/dist/client/client.mjs +24277 -20796
- package/dist/client/{courseRegistration-AHFQHWIJ.mjs → courseRegistration-2EORROPS.mjs} +3 -3
- package/dist/client/{eventCalendar-LDXTV5R7.mjs → eventCalendar-WZI4VL6N.mjs} +5 -5
- package/dist/client/{eventCombined-A4JGTNJO.mjs → eventCombined-QCB2TCNL.mjs} +5 -5
- package/dist/client/{eventDetails-4YXTZ7EG.mjs → eventDetails-TFTATAPH.mjs} +5 -5
- package/dist/client/{eventListing-P72TPFFM.mjs → eventListing-A2CQEHEQ.mjs} +5 -5
- package/dist/client/{eventRegistration-LSYJHGMT.mjs → eventRegistration-OELPVLUY.mjs} +5 -5
- package/dist/client/{form-AOPYOKOW.mjs → form-NTIFD6WQ.mjs} +1 -1
- package/dist/client/{headerSection-5TFYDFVQ.mjs → headerSection-7TBNKCLA.mjs} +65 -24
- package/dist/client/hooks.mjs +3687 -2024
- package/dist/client/{locationMap-QSZ3ZVAZ.mjs → locationMap-LRLB5A3H.mjs} +1 -1
- package/dist/client/{newsletterForm-KTRHZY52.mjs → newsletterForm-XI52RZSN.mjs} +1 -1
- package/dist/client/{productDetail-N4E775RG.mjs → productDetail-GSNKBFLY.mjs} +5 -5
- package/dist/client/{productList-UGUQ2S45.mjs → productList-BGCGT4KZ.mjs} +5 -5
- package/dist/client/rendering/client.mjs +5274 -3030
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +6271 -2790
- package/dist/client/{shop-VHSZEEQ2.mjs → shop-RQHUCLNY.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +79 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +79 -0
- package/dist/{sdk-runtime-WHPJEF5G.mjs → sdk-runtime-A4LHT2RS.mjs} +6 -6
- package/dist/server/components.mjs +6215 -3057
- package/dist/server/config-validation.mjs +3858 -2194
- package/dist/server/config.mjs +3858 -2194
- package/dist/server/data.mjs +3687 -2024
- package/dist/server/index.mjs +88 -1
- package/dist/server/next/revalidate.mjs +229 -34
- package/dist/server/next.mjs +6295 -3036
- package/dist/server/page-converter.mjs +3055 -1883
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6220 -3062
- package/dist/server/rendering.mjs +6233 -3075
- package/dist/server/routing.mjs +4251 -2137
- package/dist/server/server.mjs +3705 -2042
- package/dist/server/theme-bridge.mjs +1617 -329
- package/dist/server/theme.mjs +411 -221
- package/dist/server/webhooks.mjs +129 -25
- package/dist/styles/index.css +355 -33
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +0 -8
- package/dist/chunk-4QEGTLK6.mjs +0 -1175
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-
|
|
3
|
-
import { PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, resolveSiteStyleAccess, usePreviewDesignCoordinator, createOptimisticActionRunner, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, syncStyleConfiguratorState, buildSiteChromeLookModels, planSiteStylePreviewChange, markApplyFailed, markApplySaved, markApplySaving, previewHeaderStyle, previewHeaderLayout, previewFooterLook, cycleSiteChromeLookId, usePreviewThemeOverlay, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, planSiteChromeLookSelection, sanitizeDashboardPath } from './chunk-
|
|
4
|
-
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState, PREVIEW_SURFACE_PARAM } from './chunk-
|
|
5
|
-
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, ResizableSplitPane, BlockApiProvider, EditorProvider, getCuratedSiteStyle, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, useEditorUiStoreInstance, surfaceResolutionContextFromTheme, unsafeAsEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, planSiteDocument, ThemeScope, FixedBottomSurface, Button, unwrapResponse, X, ChevronLeft, ChevronRight, RotateCcw, PreviewRichTextEditor, RichText, PreviewTextEditor, Text, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, visibleHeaderClearancePx, systemCustomizeFacetNextValue, EDITABLE_SURFACE_FORWARDING_PROP, assertNever, SITE_CHROME_VISIBLE_HEADER_SELECTOR } from './chunk-
|
|
6
|
-
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, parseSurfaceId } from './chunk-
|
|
2
|
+
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-MPBNEVPB.mjs';
|
|
3
|
+
import { PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, PreviewBlockCustomizeSelectionProvider, resolveSiteStyleAccess, usePreviewDesignCoordinator, createOptimisticActionRunner, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, syncStyleConfiguratorState, buildSiteChromeLookModels, planSiteStylePreviewChange, markApplyFailed, markApplySaved, markApplySaving, previewHeaderStyle, previewHeaderLayout, previewFooterLook, cycleSiteChromeLookId, usePreviewThemeOverlay, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, planSiteChromeLookSelection, usePreviewBlockCustomizeSelectionOptional, useBlockCustomizeControls, MAX_CUSTOMIZE_POPOVER_ROWS, MAX_QUICK_MANIFEST_FIELDS, sanitizeDashboardPath } from './chunk-5NZGBSJF.mjs';
|
|
4
|
+
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState, PREVIEW_SURFACE_PARAM } from './chunk-HTB4BMKD.mjs';
|
|
5
|
+
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, ResizableSplitPane, BlockApiProvider, EditorProvider, MediaEditorProvider, getCuratedSiteStyle, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, useEditorUiStoreInstance, surfaceResolutionContextFromTheme, unsafeAsEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, planSiteDocument, ThemeScope, FixedBottomSurface, Button, unwrapResponse, X, ChevronLeft, ChevronRight, RotateCcw, parseBackgroundOverrideFromContent, rankBackgroundImagePoolItems, imagePoolForOverride, resolveBackgroundCapability, enabledBackgroundModes, FormRenderer, PreviewRichTextEditor, RichText, PreviewTextEditor, Text, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, backgroundColorTokens, Image, useMediaEditorOptional, defaultBackgroundOverrideForMode, Upload, MediaEditor, visibleHeaderClearancePx, systemCustomizeFacetNextValue, planBackgroundTransition, GRADIENT_PRESETS, gradientToCss, parseMediaAssetId, planBackgroundOverride, EDITABLE_SURFACE_FORWARDING_PROP, assertNever, SITE_CHROME_VISIBLE_HEADER_SELECTOR } from './chunk-GYXKAUFV.mjs';
|
|
6
|
+
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, parseSurfaceId } from './chunk-BBLZSQEY.mjs';
|
|
7
7
|
import React9, { createContext, useMemo, useState, useEffect, useRef, useCallback, useId, useReducer, Children, isValidElement, Fragment as Fragment$1, cloneElement, useContext } from 'react';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
|
|
@@ -473,6 +473,25 @@ function cyclePageDesignBlockFacet(input) {
|
|
|
473
473
|
baseContentId: input.block.contentRevision?.contentId ?? null
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
+
function setPageDesignBlockBackground(input) {
|
|
477
|
+
const current = input.currentContent ? parseBackgroundOverrideFromContent(input.currentContent) : {
|
|
478
|
+
kind: "supported",
|
|
479
|
+
override: input.fromOverride ?? { kind: "default" }
|
|
480
|
+
};
|
|
481
|
+
const capability = resolveBackgroundCapability({
|
|
482
|
+
block: input.block,
|
|
483
|
+
imagePool: input.imagePool ?? imagePoolForOverride(input.override)
|
|
484
|
+
});
|
|
485
|
+
const plan = planBackgroundOverride(current, capability, input.override);
|
|
486
|
+
if (plan.kind !== "apply") return null;
|
|
487
|
+
return {
|
|
488
|
+
kind: "set-background",
|
|
489
|
+
blockId: input.block.blockId,
|
|
490
|
+
override: plan.override,
|
|
491
|
+
fromOverride: plan.fromOverride,
|
|
492
|
+
baseContentId: input.block.contentRevision?.contentId ?? null
|
|
493
|
+
};
|
|
494
|
+
}
|
|
476
495
|
function cyclePageDesignBoundaryBreak(boundary, direction) {
|
|
477
496
|
if (boundary.availableBreaks.length === 0) return null;
|
|
478
497
|
const breakIds = boundary.availableBreaks.map((option) => option.id);
|
|
@@ -594,22 +613,37 @@ function BlockToolbar({
|
|
|
594
613
|
blockId,
|
|
595
614
|
blockKind,
|
|
596
615
|
content,
|
|
616
|
+
theme = null,
|
|
597
617
|
headerClearancePx = 0
|
|
598
618
|
}) {
|
|
599
619
|
const uiStore = useEditorUiStoreInstance();
|
|
620
|
+
const editorBlockId = useMemo(() => unsafeAsEditorBlockId(blockId), [blockId]);
|
|
621
|
+
const draftContent = useEditorUiStore(
|
|
622
|
+
(state) => state.drafts.getCurrentValues(editorBlockId)
|
|
623
|
+
);
|
|
624
|
+
const customizeContent = useMemo(
|
|
625
|
+
() => isRecord3(draftContent) ? draftContent : content,
|
|
626
|
+
[content, draftContent]
|
|
627
|
+
);
|
|
628
|
+
const customizeSelection = usePreviewBlockCustomizeSelectionOptional();
|
|
600
629
|
const customizePanelId = useId();
|
|
601
630
|
const customizeDescriptionId = `${customizePanelId}-description`;
|
|
602
631
|
const focusTarget = useMemo(
|
|
603
|
-
() => computeDefaultFocus(blockKind,
|
|
604
|
-
[blockKind,
|
|
632
|
+
() => computeDefaultFocus(blockKind, customizeContent),
|
|
633
|
+
[blockKind, customizeContent]
|
|
605
634
|
);
|
|
606
635
|
const [customizeOpen, setCustomizeOpen] = useState(false);
|
|
636
|
+
const [backgroundChooserOpen, setBackgroundChooserOpen] = useState(false);
|
|
637
|
+
const [backgroundColorPalette, setBackgroundColorPalette] = useState(null);
|
|
607
638
|
const customizeButtonRef = useRef(null);
|
|
608
639
|
const {
|
|
609
640
|
state: pageDesignState,
|
|
610
641
|
applyAction: applyPageDesignAction,
|
|
611
642
|
isHistoryPending,
|
|
612
|
-
historyFailure
|
|
643
|
+
historyFailure,
|
|
644
|
+
backgroundImagePool = [],
|
|
645
|
+
backgroundImagePoolStatus = "idle",
|
|
646
|
+
loadBackgroundImagePool = async () => []
|
|
613
647
|
} = usePreviewPageDesignEditorState();
|
|
614
648
|
const closeCustomize = useCallback(() => {
|
|
615
649
|
setCustomizeOpen(false);
|
|
@@ -639,17 +673,80 @@ function BlockToolbar({
|
|
|
639
673
|
designBlock && designBlock.availableLooks.length > 1
|
|
640
674
|
);
|
|
641
675
|
const facetControls = useMemo(
|
|
642
|
-
() => previewCustomizeFacetControlsFor(blockKind,
|
|
643
|
-
[blockKind,
|
|
676
|
+
() => previewCustomizeFacetControlsFor(blockKind, customizeContent, designBlock),
|
|
677
|
+
[blockKind, customizeContent, designBlock]
|
|
644
678
|
);
|
|
645
679
|
const hasFacetControls = facetControls.length > 0;
|
|
646
|
-
const
|
|
680
|
+
const currentBackground = useMemo(
|
|
681
|
+
() => parseBackgroundOverrideFromContent(customizeContent),
|
|
682
|
+
[customizeContent]
|
|
683
|
+
);
|
|
684
|
+
const mergedBackgroundImagePool = useMemo(
|
|
685
|
+
() => rankBackgroundImagePoolItems(
|
|
686
|
+
dedupeBackgroundImagePool([
|
|
687
|
+
...currentBackground.kind === "supported" ? imagePoolForOverride(currentBackground.override) : [],
|
|
688
|
+
...backgroundImagePool
|
|
689
|
+
])
|
|
690
|
+
),
|
|
691
|
+
[backgroundImagePool, currentBackground]
|
|
692
|
+
);
|
|
693
|
+
const backgroundCapability = useMemo(
|
|
694
|
+
() => designBlock ? resolveBackgroundCapability({
|
|
695
|
+
block: designBlock,
|
|
696
|
+
imagePool: mergedBackgroundImagePool,
|
|
697
|
+
palette: backgroundColorPalette
|
|
698
|
+
}) : null,
|
|
699
|
+
[backgroundColorPalette, designBlock, mergedBackgroundImagePool]
|
|
700
|
+
);
|
|
701
|
+
const enabledBackgroundModeList = useMemo(
|
|
702
|
+
() => backgroundCapability ? enabledBackgroundModes(backgroundCapability) : [],
|
|
703
|
+
[backgroundCapability]
|
|
704
|
+
);
|
|
705
|
+
const hasBackgroundControls = currentBackground.kind === "supported" && enabledBackgroundModeList.length > 1;
|
|
706
|
+
const builtInCustomizeRowCount = (hasLayoutControls ? 1 : 0) + facetControls.length + (hasBackgroundControls ? 1 : 0) + (hasLookControls ? 1 : 0);
|
|
707
|
+
const manifestCustomize = useBlockCustomizeControls({
|
|
708
|
+
blockId,
|
|
709
|
+
blockKind,
|
|
710
|
+
content: customizeContent,
|
|
711
|
+
uiStore,
|
|
712
|
+
theme,
|
|
713
|
+
maxQuickFields: MAX_QUICK_MANIFEST_FIELDS,
|
|
714
|
+
maxPopoverRows: MAX_CUSTOMIZE_POPOVER_ROWS,
|
|
715
|
+
builtInPopoverRows: builtInCustomizeRowCount
|
|
716
|
+
});
|
|
717
|
+
const quickManifestFields = manifestCustomize.quickFields;
|
|
718
|
+
const hasSidebarCustomizeControls = manifestCustomize.hasControls;
|
|
719
|
+
const hasOverflowCustomizeControls = manifestCustomize.hasOverflowControls;
|
|
720
|
+
const quickManifestBackend = manifestCustomize.backend;
|
|
721
|
+
const canCycleBackgroundMode = enabledBackgroundModeList.length > 1;
|
|
722
|
+
const canCycleBackgroundValue = currentBackground.kind === "supported" && backgroundCapability ? canCycleBackgroundOverrideValue(
|
|
723
|
+
currentBackground.override,
|
|
724
|
+
backgroundCapability
|
|
725
|
+
) : false;
|
|
726
|
+
const hasCustomizeControls = hasLayoutControls || hasLookControls || hasFacetControls || hasBackgroundControls || quickManifestFields.length > 0 || hasSidebarCustomizeControls;
|
|
647
727
|
const isSavingCustomize = isHistoryPending;
|
|
648
728
|
useEffect(() => {
|
|
649
729
|
if (!hasCustomizeControls) {
|
|
650
730
|
setCustomizeOpen(false);
|
|
731
|
+
setBackgroundChooserOpen(false);
|
|
651
732
|
}
|
|
652
733
|
}, [hasCustomizeControls]);
|
|
734
|
+
useEffect(() => {
|
|
735
|
+
if (!customizeOpen) return;
|
|
736
|
+
setBackgroundColorPalette(readBackgroundColorPaletteSnapshot());
|
|
737
|
+
}, [customizeOpen, pageDesignState]);
|
|
738
|
+
useEffect(() => {
|
|
739
|
+
if (!customizeOpen || !backgroundCapability?.modes.includes("image")) {
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
if (backgroundImagePoolStatus !== "idle") return;
|
|
743
|
+
void loadBackgroundImagePool();
|
|
744
|
+
}, [
|
|
745
|
+
backgroundCapability,
|
|
746
|
+
backgroundImagePoolStatus,
|
|
747
|
+
customizeOpen,
|
|
748
|
+
loadBackgroundImagePool
|
|
749
|
+
]);
|
|
653
750
|
const handleEdit = (e) => {
|
|
654
751
|
e.preventDefault();
|
|
655
752
|
e.stopPropagation();
|
|
@@ -658,11 +755,23 @@ function BlockToolbar({
|
|
|
658
755
|
state.setPreviewSidebarTab("editor");
|
|
659
756
|
state.setDrawerOpen(true);
|
|
660
757
|
state.requestFocus({
|
|
661
|
-
blockId:
|
|
758
|
+
blockId: editorBlockId,
|
|
662
759
|
fieldPath: focusTarget.fieldPath,
|
|
663
760
|
itemIndex: focusTarget.itemIndex
|
|
664
761
|
});
|
|
665
762
|
};
|
|
763
|
+
const inspectBlock = useCallback(() => {
|
|
764
|
+
customizeSelection?.inspectBlock(unsafeAsEditorBlockId(blockId));
|
|
765
|
+
}, [blockId, customizeSelection]);
|
|
766
|
+
const openCustomizeSettings = useCallback((e) => {
|
|
767
|
+
e.preventDefault();
|
|
768
|
+
e.stopPropagation();
|
|
769
|
+
inspectBlock();
|
|
770
|
+
const state = uiStore.getState();
|
|
771
|
+
setPreviewSidebarTab("editor");
|
|
772
|
+
state.setPreviewSidebarTab("editor");
|
|
773
|
+
state.setDrawerOpen(true);
|
|
774
|
+
}, [inspectBlock, uiStore]);
|
|
666
775
|
const cycleLayout = (direction) => (e) => {
|
|
667
776
|
e.preventDefault();
|
|
668
777
|
e.stopPropagation();
|
|
@@ -697,13 +806,50 @@ function BlockToolbar({
|
|
|
697
806
|
if (!action) return;
|
|
698
807
|
saveBlockCustomizeAction(action);
|
|
699
808
|
};
|
|
809
|
+
const handleBackgroundCycle = (action) => (e) => {
|
|
810
|
+
e.preventDefault();
|
|
811
|
+
e.stopPropagation();
|
|
812
|
+
saveBackgroundTransition(action);
|
|
813
|
+
};
|
|
814
|
+
const chooseBackgroundOverride = (override) => {
|
|
815
|
+
if (!designBlock) return;
|
|
816
|
+
const action = setPageDesignBlockBackground({
|
|
817
|
+
block: designBlock,
|
|
818
|
+
override,
|
|
819
|
+
currentContent: customizeContent,
|
|
820
|
+
imagePool: mergedBackgroundImagePool
|
|
821
|
+
});
|
|
822
|
+
if (!action) return;
|
|
823
|
+
saveBlockCustomizeAction(action);
|
|
824
|
+
setBackgroundChooserOpen(false);
|
|
825
|
+
};
|
|
826
|
+
const saveBackgroundTransition = (transition) => {
|
|
827
|
+
if (!designBlock || !backgroundCapability || currentBackground.kind !== "supported") {
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
const plan = planBackgroundTransition(
|
|
831
|
+
currentBackground.override,
|
|
832
|
+
backgroundCapability,
|
|
833
|
+
transition
|
|
834
|
+
);
|
|
835
|
+
if (plan.kind !== "apply") return;
|
|
836
|
+
const action = setPageDesignBlockBackground({
|
|
837
|
+
block: designBlock,
|
|
838
|
+
override: plan.override,
|
|
839
|
+
currentContent: customizeContent,
|
|
840
|
+
imagePool: mergedBackgroundImagePool
|
|
841
|
+
});
|
|
842
|
+
if (!action) return;
|
|
843
|
+
saveBlockCustomizeAction(action);
|
|
844
|
+
};
|
|
700
845
|
const saveBlockCustomizeAction = (action) => {
|
|
701
|
-
void applyPageDesignAction(action);
|
|
846
|
+
void applyPageDesignAction(action, { runtimeContent: customizeContent });
|
|
702
847
|
};
|
|
703
848
|
const toggleCustomize = (e) => {
|
|
704
849
|
e.preventDefault();
|
|
705
850
|
e.stopPropagation();
|
|
706
851
|
if (!customizeOpen) {
|
|
852
|
+
inspectBlock();
|
|
707
853
|
setCustomizeReturnFocusTarget(
|
|
708
854
|
e.currentTarget instanceof HTMLElement ? e.currentTarget : customizeButtonRef.current
|
|
709
855
|
);
|
|
@@ -739,7 +885,7 @@ function BlockToolbar({
|
|
|
739
885
|
children: "Edit"
|
|
740
886
|
}
|
|
741
887
|
),
|
|
742
|
-
customizeOpen && designBlock ? /* @__PURE__ */ jsxs(
|
|
888
|
+
customizeOpen && (designBlock || hasSidebarCustomizeControls) ? /* @__PURE__ */ jsxs(
|
|
743
889
|
"div",
|
|
744
890
|
{
|
|
745
891
|
id: customizePanelId,
|
|
@@ -780,7 +926,7 @@ function BlockToolbar({
|
|
|
780
926
|
)
|
|
781
927
|
] }),
|
|
782
928
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
783
|
-
designBlock
|
|
929
|
+
designBlock?.layout && hasLayoutControls ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
784
930
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
785
931
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: "Layout" }),
|
|
786
932
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: layoutLabel(
|
|
@@ -811,7 +957,7 @@ function BlockToolbar({
|
|
|
811
957
|
)
|
|
812
958
|
] })
|
|
813
959
|
] }) : null,
|
|
814
|
-
designBlock
|
|
960
|
+
designBlock?.layout?.status === "unsupported" ? /* @__PURE__ */ jsx("p", { className: "text-xs text-amber-700", children: "This layout is no longer available. The preview is using the closest safe option." }) : null,
|
|
815
961
|
facetControls.map((control) => /* @__PURE__ */ jsxs(
|
|
816
962
|
"div",
|
|
817
963
|
{
|
|
@@ -851,7 +997,114 @@ function BlockToolbar({
|
|
|
851
997
|
},
|
|
852
998
|
control.facetId
|
|
853
999
|
)),
|
|
854
|
-
|
|
1000
|
+
hasBackgroundControls && currentBackground.kind === "supported" && backgroundCapability ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
1001
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-stretch overflow-hidden rounded-full border bg-background", children: [
|
|
1002
|
+
/* @__PURE__ */ jsx(
|
|
1003
|
+
"button",
|
|
1004
|
+
{
|
|
1005
|
+
type: "button",
|
|
1006
|
+
onClick: handleBackgroundCycle({
|
|
1007
|
+
kind: "cycle-mode",
|
|
1008
|
+
direction: "prev"
|
|
1009
|
+
}),
|
|
1010
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
1011
|
+
"aria-label": "Previous background mode",
|
|
1012
|
+
disabled: !canCycleBackgroundMode,
|
|
1013
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
1014
|
+
}
|
|
1015
|
+
),
|
|
1016
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 border-x px-2 py-1 text-center", children: [
|
|
1017
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium leading-3 text-muted-foreground", children: "Background:" }),
|
|
1018
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-xs font-semibold leading-4", children: backgroundModeLabel(currentBackground.override.kind) })
|
|
1019
|
+
] }),
|
|
1020
|
+
/* @__PURE__ */ jsx(
|
|
1021
|
+
"button",
|
|
1022
|
+
{
|
|
1023
|
+
type: "button",
|
|
1024
|
+
onClick: handleBackgroundCycle({
|
|
1025
|
+
kind: "cycle-mode",
|
|
1026
|
+
direction: "next"
|
|
1027
|
+
}),
|
|
1028
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
1029
|
+
"aria-label": "Next background mode",
|
|
1030
|
+
disabled: !canCycleBackgroundMode,
|
|
1031
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
1032
|
+
}
|
|
1033
|
+
)
|
|
1034
|
+
] }),
|
|
1035
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-stretch overflow-hidden rounded-full border bg-background", children: [
|
|
1036
|
+
/* @__PURE__ */ jsx(
|
|
1037
|
+
"button",
|
|
1038
|
+
{
|
|
1039
|
+
type: "button",
|
|
1040
|
+
onClick: handleBackgroundCycle({
|
|
1041
|
+
kind: "cycle-value",
|
|
1042
|
+
direction: "prev"
|
|
1043
|
+
}),
|
|
1044
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
1045
|
+
"aria-label": "Previous background value",
|
|
1046
|
+
disabled: !canCycleBackgroundValue,
|
|
1047
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
1048
|
+
}
|
|
1049
|
+
),
|
|
1050
|
+
/* @__PURE__ */ jsxs(
|
|
1051
|
+
"button",
|
|
1052
|
+
{
|
|
1053
|
+
type: "button",
|
|
1054
|
+
className: "flex min-w-0 flex-1 items-center justify-center gap-2 border-x px-2 py-1 text-center hover:bg-muted",
|
|
1055
|
+
"aria-expanded": backgroundChooserOpen,
|
|
1056
|
+
"aria-label": `Choose background ${backgroundOverrideLabel(currentBackground.override).toLowerCase()}`,
|
|
1057
|
+
onClick: (event) => {
|
|
1058
|
+
event.preventDefault();
|
|
1059
|
+
event.stopPropagation();
|
|
1060
|
+
setBackgroundChooserOpen((open) => !open);
|
|
1061
|
+
},
|
|
1062
|
+
children: [
|
|
1063
|
+
/* @__PURE__ */ jsx(BackgroundPreviewSwatch, { override: currentBackground.override }),
|
|
1064
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium", children: backgroundOverrideValueLabel(
|
|
1065
|
+
currentBackground.override,
|
|
1066
|
+
mergedBackgroundImagePool
|
|
1067
|
+
) })
|
|
1068
|
+
]
|
|
1069
|
+
}
|
|
1070
|
+
),
|
|
1071
|
+
/* @__PURE__ */ jsx(
|
|
1072
|
+
"button",
|
|
1073
|
+
{
|
|
1074
|
+
type: "button",
|
|
1075
|
+
onClick: handleBackgroundCycle({
|
|
1076
|
+
kind: "cycle-value",
|
|
1077
|
+
direction: "next"
|
|
1078
|
+
}),
|
|
1079
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
1080
|
+
"aria-label": "Next background value",
|
|
1081
|
+
disabled: !canCycleBackgroundValue,
|
|
1082
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
] }),
|
|
1086
|
+
backgroundChooserOpen ? /* @__PURE__ */ jsx(
|
|
1087
|
+
BackgroundChooser,
|
|
1088
|
+
{
|
|
1089
|
+
capability: backgroundCapability,
|
|
1090
|
+
current: currentBackground.override,
|
|
1091
|
+
enabledModes: enabledBackgroundModeList,
|
|
1092
|
+
imagePoolStatus: backgroundImagePoolStatus,
|
|
1093
|
+
onChoose: chooseBackgroundOverride
|
|
1094
|
+
}
|
|
1095
|
+
) : null
|
|
1096
|
+
] }) : null,
|
|
1097
|
+
quickManifestFields.length > 0 && quickManifestBackend ? /* @__PURE__ */ jsx("div", { className: "border-t pt-3", children: /* @__PURE__ */ jsx(
|
|
1098
|
+
FormRenderer,
|
|
1099
|
+
{
|
|
1100
|
+
fields: quickManifestFields,
|
|
1101
|
+
backend: quickManifestBackend,
|
|
1102
|
+
showSettingsTrigger: false,
|
|
1103
|
+
blockKind,
|
|
1104
|
+
className: "space-y-3"
|
|
1105
|
+
}
|
|
1106
|
+
) }) : null,
|
|
1107
|
+
hasLookControls && designBlock ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
855
1108
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
856
1109
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: "Look" }),
|
|
857
1110
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: lookLabel(designBlock) })
|
|
@@ -881,7 +1134,16 @@ function BlockToolbar({
|
|
|
881
1134
|
)
|
|
882
1135
|
] })
|
|
883
1136
|
] }) : null,
|
|
884
|
-
historyFailure ? /* @__PURE__ */ jsx("p", { className: "text-xs text-red-700", children: historyFailure }) : null
|
|
1137
|
+
historyFailure ? /* @__PURE__ */ jsx("p", { className: "text-xs text-red-700", children: historyFailure }) : null,
|
|
1138
|
+
hasOverflowCustomizeControls ? /* @__PURE__ */ jsx("div", { className: "border-t pt-2", children: /* @__PURE__ */ jsx(
|
|
1139
|
+
"button",
|
|
1140
|
+
{
|
|
1141
|
+
type: "button",
|
|
1142
|
+
className: "w-full rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted",
|
|
1143
|
+
onClick: openCustomizeSettings,
|
|
1144
|
+
children: "Settings"
|
|
1145
|
+
}
|
|
1146
|
+
) }) : null
|
|
885
1147
|
] })
|
|
886
1148
|
]
|
|
887
1149
|
}
|
|
@@ -890,6 +1152,163 @@ function BlockToolbar({
|
|
|
890
1152
|
}
|
|
891
1153
|
);
|
|
892
1154
|
}
|
|
1155
|
+
function BackgroundChooser({
|
|
1156
|
+
capability,
|
|
1157
|
+
current,
|
|
1158
|
+
enabledModes,
|
|
1159
|
+
imagePoolStatus,
|
|
1160
|
+
onChoose
|
|
1161
|
+
}) {
|
|
1162
|
+
const mediaEditorContext = useMediaEditorOptional();
|
|
1163
|
+
const [mediaPickerOpenKey, setMediaPickerOpenKey] = useState(0);
|
|
1164
|
+
const enabledModeSet = new Set(enabledModes);
|
|
1165
|
+
const images = rankBackgroundImagePoolItems(capability.imagePool ?? []);
|
|
1166
|
+
const recommendedTokens = capability.recommendedColorTokens ?? capability.colorTokens ?? [];
|
|
1167
|
+
const advancedTokens = capability.advancedColorTokens ?? [];
|
|
1168
|
+
const chooseFromClick = (override) => (event) => {
|
|
1169
|
+
event.preventDefault();
|
|
1170
|
+
event.stopPropagation();
|
|
1171
|
+
onChoose(override);
|
|
1172
|
+
};
|
|
1173
|
+
const chooseMediaValue = (value) => {
|
|
1174
|
+
if (value?.type !== "image" || !value.assetId) return;
|
|
1175
|
+
const parsed = parseMediaAssetId(value.assetId);
|
|
1176
|
+
if (!parsed.ok) return;
|
|
1177
|
+
onChoose({ kind: "image", mediaId: parsed.value });
|
|
1178
|
+
setMediaPickerOpenKey(0);
|
|
1179
|
+
};
|
|
1180
|
+
return /* @__PURE__ */ jsxs("div", { className: "mt-2 max-h-80 overflow-y-auto rounded-md border bg-muted/20 p-2", children: [
|
|
1181
|
+
/* @__PURE__ */ jsx("div", { className: "mb-2 grid grid-cols-4 gap-1", children: ["default", "color", "gradient", "image"].map((mode) => /* @__PURE__ */ jsx(
|
|
1182
|
+
"button",
|
|
1183
|
+
{
|
|
1184
|
+
type: "button",
|
|
1185
|
+
className: `rounded-md border px-2 py-1 text-xs ${current.kind === mode ? "border-foreground bg-foreground text-background" : "bg-background hover:bg-muted"} disabled:cursor-not-allowed disabled:opacity-50`,
|
|
1186
|
+
disabled: !enabledModeSet.has(mode),
|
|
1187
|
+
onClick: chooseFromClick(defaultBackgroundOverrideForMode(mode, capability)),
|
|
1188
|
+
children: backgroundModeLabel(mode)
|
|
1189
|
+
},
|
|
1190
|
+
mode
|
|
1191
|
+
)) }),
|
|
1192
|
+
recommendedTokens.length || advancedTokens.length ? /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
1193
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: "Colors" }),
|
|
1194
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1", children: recommendedTokens.map((token) => /* @__PURE__ */ jsxs(
|
|
1195
|
+
"button",
|
|
1196
|
+
{
|
|
1197
|
+
type: "button",
|
|
1198
|
+
className: `flex min-w-0 items-center gap-2 rounded-md border px-2 py-1 text-left text-xs hover:bg-muted ${current.kind === "color" && current.token === token ? "border-foreground" : "bg-background"}`,
|
|
1199
|
+
onClick: chooseFromClick({ kind: "color", token }),
|
|
1200
|
+
children: [
|
|
1201
|
+
/* @__PURE__ */ jsx(
|
|
1202
|
+
"span",
|
|
1203
|
+
{
|
|
1204
|
+
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
1205
|
+
style: { backgroundColor: tokenSwatchCss(token) }
|
|
1206
|
+
}
|
|
1207
|
+
),
|
|
1208
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: formatTokenLabel(token) })
|
|
1209
|
+
]
|
|
1210
|
+
},
|
|
1211
|
+
token
|
|
1212
|
+
)) }),
|
|
1213
|
+
advancedTokens.length ? /* @__PURE__ */ jsxs("details", { className: "mt-1", children: [
|
|
1214
|
+
/* @__PURE__ */ jsx("summary", { className: "cursor-pointer text-xs text-muted-foreground", children: "More colors" }),
|
|
1215
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 grid grid-cols-2 gap-1", children: advancedTokens.map((token) => /* @__PURE__ */ jsxs(
|
|
1216
|
+
"button",
|
|
1217
|
+
{
|
|
1218
|
+
type: "button",
|
|
1219
|
+
className: `flex min-w-0 items-center gap-2 rounded-md border px-2 py-1 text-left text-xs hover:bg-muted ${current.kind === "color" && current.token === token ? "border-foreground" : "bg-background"}`,
|
|
1220
|
+
onClick: chooseFromClick({ kind: "color", token }),
|
|
1221
|
+
children: [
|
|
1222
|
+
/* @__PURE__ */ jsx(
|
|
1223
|
+
"span",
|
|
1224
|
+
{
|
|
1225
|
+
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
1226
|
+
style: { backgroundColor: tokenSwatchCss(token) }
|
|
1227
|
+
}
|
|
1228
|
+
),
|
|
1229
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: formatTokenLabel(token) })
|
|
1230
|
+
]
|
|
1231
|
+
},
|
|
1232
|
+
token
|
|
1233
|
+
)) })
|
|
1234
|
+
] }) : null
|
|
1235
|
+
] }) : null,
|
|
1236
|
+
capability.gradientIds?.length ? /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
1237
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: "Gradients" }),
|
|
1238
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: capability.gradientIds.map((gradientId) => /* @__PURE__ */ jsx(
|
|
1239
|
+
"button",
|
|
1240
|
+
{
|
|
1241
|
+
type: "button",
|
|
1242
|
+
className: `w-full rounded-md border px-2 py-1 text-left text-xs hover:bg-muted ${current.kind === "gradient" && current.gradientId === gradientId ? "border-foreground" : "bg-background"}`,
|
|
1243
|
+
onClick: chooseFromClick({ kind: "gradient", gradientId }),
|
|
1244
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
1245
|
+
/* @__PURE__ */ jsx(
|
|
1246
|
+
"span",
|
|
1247
|
+
{
|
|
1248
|
+
className: "h-4 w-8 shrink-0 rounded border",
|
|
1249
|
+
style: { backgroundImage: gradientPreviewCss(gradientId) }
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: gradientLabel(gradientId) })
|
|
1253
|
+
] })
|
|
1254
|
+
},
|
|
1255
|
+
gradientId
|
|
1256
|
+
)) })
|
|
1257
|
+
] }) : null,
|
|
1258
|
+
capability.modes.includes("image") ? /* @__PURE__ */ jsxs("div", { children: [
|
|
1259
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: "Images" }),
|
|
1260
|
+
mediaEditorContext ? /* @__PURE__ */ jsxs(
|
|
1261
|
+
"button",
|
|
1262
|
+
{
|
|
1263
|
+
type: "button",
|
|
1264
|
+
className: "mb-2 inline-flex w-full items-center justify-center gap-2 rounded-md border bg-background px-2 py-1.5 text-xs font-medium hover:bg-muted",
|
|
1265
|
+
onClick: (event) => {
|
|
1266
|
+
event.preventDefault();
|
|
1267
|
+
event.stopPropagation();
|
|
1268
|
+
setMediaPickerOpenKey((key) => key + 1);
|
|
1269
|
+
},
|
|
1270
|
+
children: [
|
|
1271
|
+
/* @__PURE__ */ jsx(Upload, { size: 13 }),
|
|
1272
|
+
"Media library"
|
|
1273
|
+
]
|
|
1274
|
+
}
|
|
1275
|
+
) : null,
|
|
1276
|
+
images.length ? /* @__PURE__ */ jsx("div", { className: "space-y-1", children: images.map((item) => /* @__PURE__ */ jsx(
|
|
1277
|
+
"button",
|
|
1278
|
+
{
|
|
1279
|
+
type: "button",
|
|
1280
|
+
className: `w-full rounded-md border px-2 py-1 text-left text-xs hover:bg-muted ${current.kind === "image" && current.mediaId === item.mediaId ? "border-foreground" : "bg-background"}`,
|
|
1281
|
+
onClick: chooseFromClick({ kind: "image", mediaId: item.mediaId }),
|
|
1282
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1283
|
+
/* @__PURE__ */ jsx("span", { className: "grid h-7 w-9 shrink-0 place-items-center rounded border bg-muted", children: /* @__PURE__ */ jsx(Image, { size: 14 }) }),
|
|
1284
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
1285
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate", children: item.label ?? "Image" }),
|
|
1286
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground", children: imageSourceLabel(item.source) })
|
|
1287
|
+
] })
|
|
1288
|
+
] })
|
|
1289
|
+
},
|
|
1290
|
+
`${item.source}:${item.mediaId}`
|
|
1291
|
+
)) }) : /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: imagePoolStatus === "loading" ? "Loading images..." : "No images available yet." }),
|
|
1292
|
+
mediaPickerOpenKey > 0 && mediaEditorContext ? /* @__PURE__ */ jsx("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx(
|
|
1293
|
+
MediaEditor,
|
|
1294
|
+
{
|
|
1295
|
+
value: void 0,
|
|
1296
|
+
onChange: chooseMediaValue,
|
|
1297
|
+
allowedKinds: ["image"],
|
|
1298
|
+
mediaPickerAutoOpen: true,
|
|
1299
|
+
showPreview: false,
|
|
1300
|
+
showAltInput: false,
|
|
1301
|
+
uploadIntent: { tag: "media-library", allowedRenderUses: ["image"] },
|
|
1302
|
+
onUploadComplete: (asset) => {
|
|
1303
|
+
onChoose({ kind: "image", mediaId: asset.id });
|
|
1304
|
+
setMediaPickerOpenKey(0);
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
mediaPickerOpenKey
|
|
1308
|
+
) }) : null
|
|
1309
|
+
] }) : null
|
|
1310
|
+
] });
|
|
1311
|
+
}
|
|
893
1312
|
function computeDefaultFocus(blockKind, content) {
|
|
894
1313
|
const definition = getBlockDefinition(blockKind);
|
|
895
1314
|
if (!definition?.manifest) {
|
|
@@ -959,6 +1378,125 @@ function lookLabel(block) {
|
|
|
959
1378
|
}
|
|
960
1379
|
return option?.label ?? "Selected look";
|
|
961
1380
|
}
|
|
1381
|
+
function backgroundOverrideLabel(override) {
|
|
1382
|
+
switch (override.kind) {
|
|
1383
|
+
case "default":
|
|
1384
|
+
return "Default";
|
|
1385
|
+
case "color":
|
|
1386
|
+
return `Color: ${formatTokenLabel(override.token)}`;
|
|
1387
|
+
case "gradient":
|
|
1388
|
+
return `Gradient: ${gradientLabel(override.gradientId)}`;
|
|
1389
|
+
case "image":
|
|
1390
|
+
return "Image";
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
function backgroundOverrideValueLabel(override, imagePool) {
|
|
1394
|
+
switch (override.kind) {
|
|
1395
|
+
case "default":
|
|
1396
|
+
return "Default";
|
|
1397
|
+
case "color":
|
|
1398
|
+
return formatTokenLabel(override.token);
|
|
1399
|
+
case "gradient":
|
|
1400
|
+
return gradientLabel(override.gradientId);
|
|
1401
|
+
case "image":
|
|
1402
|
+
return imagePool.find((item) => item.mediaId === override.mediaId)?.label ?? "Image";
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
function canCycleBackgroundOverrideValue(override, capability) {
|
|
1406
|
+
switch (override.kind) {
|
|
1407
|
+
case "default":
|
|
1408
|
+
return false;
|
|
1409
|
+
case "color":
|
|
1410
|
+
return (capability.colorTokens?.length ?? 0) > 1;
|
|
1411
|
+
case "gradient":
|
|
1412
|
+
return (capability.gradientIds?.length ?? 0) > 1;
|
|
1413
|
+
case "image":
|
|
1414
|
+
return rankBackgroundImagePoolItems(capability.imagePool ?? []).length > 1;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
function BackgroundPreviewSwatch({ override }) {
|
|
1418
|
+
const baseClassName = "grid h-6 w-9 shrink-0 place-items-center overflow-hidden rounded-md border";
|
|
1419
|
+
switch (override.kind) {
|
|
1420
|
+
case "default":
|
|
1421
|
+
return /* @__PURE__ */ jsx("span", { className: `${baseClassName} bg-background`, children: /* @__PURE__ */ jsx("span", { className: "h-3 w-3 rounded-full border bg-muted" }) });
|
|
1422
|
+
case "color":
|
|
1423
|
+
return /* @__PURE__ */ jsx(
|
|
1424
|
+
"span",
|
|
1425
|
+
{
|
|
1426
|
+
className: baseClassName,
|
|
1427
|
+
style: { backgroundColor: tokenSwatchCss(override.token) }
|
|
1428
|
+
}
|
|
1429
|
+
);
|
|
1430
|
+
case "gradient":
|
|
1431
|
+
return /* @__PURE__ */ jsx(
|
|
1432
|
+
"span",
|
|
1433
|
+
{
|
|
1434
|
+
className: baseClassName,
|
|
1435
|
+
style: { backgroundImage: gradientPreviewCss(override.gradientId) }
|
|
1436
|
+
}
|
|
1437
|
+
);
|
|
1438
|
+
case "image":
|
|
1439
|
+
return /* @__PURE__ */ jsx("span", { className: `${baseClassName} bg-muted`, children: /* @__PURE__ */ jsx(Image, { size: 15 }) });
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
function backgroundModeLabel(mode) {
|
|
1443
|
+
return mode === "default" ? "Default" : formatVariantLabel(mode);
|
|
1444
|
+
}
|
|
1445
|
+
function gradientLabel(gradientId) {
|
|
1446
|
+
return GRADIENT_PRESETS.find((preset) => preset.id === gradientId)?.name ?? formatVariantLabel(gradientId);
|
|
1447
|
+
}
|
|
1448
|
+
function imageSourceLabel(source) {
|
|
1449
|
+
switch (source) {
|
|
1450
|
+
case "current":
|
|
1451
|
+
return "Current";
|
|
1452
|
+
case "generated-ambient":
|
|
1453
|
+
return "Generated";
|
|
1454
|
+
case "previous-background":
|
|
1455
|
+
return "Previous";
|
|
1456
|
+
case "general-media":
|
|
1457
|
+
return "Media library";
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
function tokenSwatchCss(token) {
|
|
1461
|
+
return `rgb(var(--tb-${token}))`;
|
|
1462
|
+
}
|
|
1463
|
+
function gradientPreviewCss(gradientId) {
|
|
1464
|
+
const preset = GRADIENT_PRESETS.find((candidate) => candidate.id === gradientId);
|
|
1465
|
+
if (!preset) {
|
|
1466
|
+
return "linear-gradient(135deg, rgb(var(--tb-primary)), rgb(var(--tb-secondary)))";
|
|
1467
|
+
}
|
|
1468
|
+
return gradientToCss(
|
|
1469
|
+
preset,
|
|
1470
|
+
Object.fromEntries(
|
|
1471
|
+
preset.stops.map((stop) => [stop.color, tokenSwatchCss(stop.color)])
|
|
1472
|
+
)
|
|
1473
|
+
);
|
|
1474
|
+
}
|
|
1475
|
+
function readBackgroundColorPaletteSnapshot() {
|
|
1476
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
1477
|
+
return null;
|
|
1478
|
+
}
|
|
1479
|
+
const rootStyle = window.getComputedStyle(document.documentElement);
|
|
1480
|
+
const bodyStyle = document.body ? window.getComputedStyle(document.body) : null;
|
|
1481
|
+
const entries = backgroundColorTokens.flatMap((token) => {
|
|
1482
|
+
const value = rootStyle.getPropertyValue(`--tb-${token}`).trim() || bodyStyle?.getPropertyValue(`--tb-${token}`).trim() || "";
|
|
1483
|
+
return value ? [[token, value]] : [];
|
|
1484
|
+
});
|
|
1485
|
+
return entries.length > 0 ? Object.fromEntries(entries) : null;
|
|
1486
|
+
}
|
|
1487
|
+
function formatTokenLabel(token) {
|
|
1488
|
+
return formatVariantLabel(token.replace(/\//g, " "));
|
|
1489
|
+
}
|
|
1490
|
+
function dedupeBackgroundImagePool(items) {
|
|
1491
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1492
|
+
const deduped = [];
|
|
1493
|
+
for (const item of items) {
|
|
1494
|
+
if (seen.has(item.mediaId)) continue;
|
|
1495
|
+
seen.add(item.mediaId);
|
|
1496
|
+
deduped.push(item);
|
|
1497
|
+
}
|
|
1498
|
+
return deduped;
|
|
1499
|
+
}
|
|
962
1500
|
function BoundaryControl({
|
|
963
1501
|
previousBlockId,
|
|
964
1502
|
nextBlockId,
|
|
@@ -1301,6 +1839,7 @@ function EditablePageRenderer(props) {
|
|
|
1301
1839
|
blockId,
|
|
1302
1840
|
blockKind: block.kind,
|
|
1303
1841
|
content,
|
|
1842
|
+
theme: props.theme,
|
|
1304
1843
|
headerClearancePx: shouldClearHeaderForBlock(blockItemsForRender, blockIndex) ? headerClearancePx : 0
|
|
1305
1844
|
}
|
|
1306
1845
|
)
|
|
@@ -3094,11 +3633,11 @@ function renderPreviewDocument({
|
|
|
3094
3633
|
}
|
|
3095
3634
|
var previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
3096
3635
|
var PreviewEditorSidebar = React9.lazy(async () => {
|
|
3097
|
-
const mod = await import('./PreviewEditorSidebar-
|
|
3636
|
+
const mod = await import('./PreviewEditorSidebar-QZG37QIF.mjs');
|
|
3098
3637
|
return { default: mod.PreviewEditorSidebar };
|
|
3099
3638
|
});
|
|
3100
3639
|
var PreviewEditorUI = React9.lazy(async () => {
|
|
3101
|
-
const mod = await import('./PreviewEditorUI-
|
|
3640
|
+
const mod = await import('./PreviewEditorUI-AXIKSMZA.mjs');
|
|
3102
3641
|
return { default: mod.PreviewEditorUI };
|
|
3103
3642
|
});
|
|
3104
3643
|
var previewPaneContainmentStyle = {
|
|
@@ -3411,43 +3950,7 @@ function PreviewShellLayout({
|
|
|
3411
3950
|
surfaceId
|
|
3412
3951
|
}
|
|
3413
3952
|
);
|
|
3414
|
-
|
|
3415
|
-
return /* @__PURE__ */ jsx(PreviewThemeOverlayProvider, { baseTheme: theme, children: /* @__PURE__ */ jsx(PreviewDesignCoordinatorProvider, { children: /* @__PURE__ */ jsxs(
|
|
3416
|
-
SiteChromeCustomizeProvider,
|
|
3417
|
-
{
|
|
3418
|
-
siteId,
|
|
3419
|
-
apiClient,
|
|
3420
|
-
theme,
|
|
3421
|
-
themeId,
|
|
3422
|
-
selectionId: themeSelectionId,
|
|
3423
|
-
selectionVersion: themeSelectionVersion,
|
|
3424
|
-
selectionUpdatedAt: themeSelectionUpdatedAt,
|
|
3425
|
-
initialSelections: {
|
|
3426
|
-
selectionVersion: themeSelectionVersion,
|
|
3427
|
-
selectionUpdatedAt: themeSelectionUpdatedAt,
|
|
3428
|
-
buttonPersonalityId: themeSelectionButtonPersonalityId,
|
|
3429
|
-
paletteVariantId: themeSelectionPaletteVariantId,
|
|
3430
|
-
paletteOverrides: themeSelectionPaletteOverrides,
|
|
3431
|
-
headerLayoutId: themeSelectionHeaderLayoutId,
|
|
3432
|
-
headerStyleId: themeSelectionHeaderStyleId,
|
|
3433
|
-
typographyPresetId: themeSelectionTypographyPresetId,
|
|
3434
|
-
typographyBodyFontOverride: themeSelectionTypographyBodyFontOverride,
|
|
3435
|
-
typographyHeadingFontOverride: themeSelectionTypographyHeadingFontOverride,
|
|
3436
|
-
headerLookId: themeSelectionHeaderLookId,
|
|
3437
|
-
footerLookId: themeSelectionFooterLookId
|
|
3438
|
-
},
|
|
3439
|
-
headerSelectionContext: themeSelectionHeaderContext,
|
|
3440
|
-
footerSelectionContext: themeSelectionFooterContext,
|
|
3441
|
-
siteStyleAccess,
|
|
3442
|
-
children: [
|
|
3443
|
-
editorUI,
|
|
3444
|
-
previewBanner,
|
|
3445
|
-
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-hidden bg-background", children: leftPane })
|
|
3446
|
-
]
|
|
3447
|
-
}
|
|
3448
|
-
) }) });
|
|
3449
|
-
}
|
|
3450
|
-
return /* @__PURE__ */ jsx(PreviewThemeOverlayProvider, { baseTheme: theme, children: /* @__PURE__ */ jsx(PreviewDesignCoordinatorProvider, { children: /* @__PURE__ */ jsxs(
|
|
3953
|
+
return /* @__PURE__ */ jsx(PreviewThemeOverlayProvider, { baseTheme: theme, children: /* @__PURE__ */ jsx(PreviewDesignCoordinatorProvider, { children: /* @__PURE__ */ jsx(
|
|
3451
3954
|
SiteChromeCustomizeProvider,
|
|
3452
3955
|
{
|
|
3453
3956
|
siteId,
|
|
@@ -3474,10 +3977,10 @@ function PreviewShellLayout({
|
|
|
3474
3977
|
headerSelectionContext: themeSelectionHeaderContext,
|
|
3475
3978
|
footerSelectionContext: themeSelectionFooterContext,
|
|
3476
3979
|
siteStyleAccess,
|
|
3477
|
-
children: [
|
|
3980
|
+
children: /* @__PURE__ */ jsxs(PreviewBlockCustomizeSelectionProvider, { children: [
|
|
3478
3981
|
editorUI,
|
|
3479
3982
|
previewBanner,
|
|
3480
|
-
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-hidden bg-background", children: /* @__PURE__ */ jsx(
|
|
3983
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-hidden bg-background", children: isOpen ? /* @__PURE__ */ jsx(
|
|
3481
3984
|
ResizableSplitPane,
|
|
3482
3985
|
{
|
|
3483
3986
|
left: leftPane,
|
|
@@ -3492,8 +3995,8 @@ function PreviewShellLayout({
|
|
|
3492
3995
|
onSplitChange: (split) => handleSidebarWidthChange(100 - split),
|
|
3493
3996
|
splitPercent: 100 - sidebarWidth
|
|
3494
3997
|
}
|
|
3495
|
-
) })
|
|
3496
|
-
]
|
|
3998
|
+
) : leftPane })
|
|
3999
|
+
] })
|
|
3497
4000
|
}
|
|
3498
4001
|
) }) });
|
|
3499
4002
|
}
|
|
@@ -3574,59 +4077,69 @@ function PreviewShell({
|
|
|
3574
4077
|
initialBlocks,
|
|
3575
4078
|
pageMetadata,
|
|
3576
4079
|
apiClient,
|
|
3577
|
-
children: /* @__PURE__ */
|
|
4080
|
+
children: /* @__PURE__ */ jsx(
|
|
3578
4081
|
PreviewPageDesignEditorStateProvider,
|
|
3579
4082
|
{
|
|
3580
4083
|
apiClient,
|
|
3581
4084
|
siteId,
|
|
3582
4085
|
pageId,
|
|
3583
4086
|
enabled: designEditorEnabled,
|
|
3584
|
-
children:
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
4087
|
+
children: /* @__PURE__ */ jsxs(
|
|
4088
|
+
MediaEditorProvider,
|
|
4089
|
+
{
|
|
4090
|
+
siteId,
|
|
4091
|
+
apiClient,
|
|
4092
|
+
bearerToken: previewToken,
|
|
4093
|
+
supabaseUrl,
|
|
4094
|
+
mediaAssets,
|
|
4095
|
+
children: [
|
|
4096
|
+
/* @__PURE__ */ jsx(PreviewKeepAliveClient, { baseFetch }),
|
|
4097
|
+
/* @__PURE__ */ jsx(
|
|
4098
|
+
PreviewShellLayout,
|
|
4099
|
+
{
|
|
4100
|
+
theme,
|
|
4101
|
+
surfaceId,
|
|
4102
|
+
siteId,
|
|
4103
|
+
dashboardBaseUrl,
|
|
4104
|
+
pageId,
|
|
4105
|
+
entryData: entryData ?? null,
|
|
4106
|
+
contentTypeSchema,
|
|
4107
|
+
referenceContentTypeKeys,
|
|
4108
|
+
draftContent,
|
|
4109
|
+
currentTemplate,
|
|
4110
|
+
apiClient,
|
|
4111
|
+
bearerToken: previewToken,
|
|
4112
|
+
themeId,
|
|
4113
|
+
themeSelectionId,
|
|
4114
|
+
themeSelectionVersion,
|
|
4115
|
+
themeSelectionUpdatedAt,
|
|
4116
|
+
themeSelectionButtonPersonalityId,
|
|
4117
|
+
themeSelectionPaletteVariantId,
|
|
4118
|
+
themeSelectionPaletteOverrides,
|
|
4119
|
+
themeSelectionHeaderLayoutId,
|
|
4120
|
+
themeSelectionHeaderStyleId,
|
|
4121
|
+
themeSelectionTypographyPresetId,
|
|
4122
|
+
themeSelectionTypographyBodyFontOverride,
|
|
4123
|
+
themeSelectionTypographyHeadingFontOverride,
|
|
4124
|
+
themeSelectionHeaderLookId,
|
|
4125
|
+
themeSelectionFooterLookId,
|
|
4126
|
+
themeSelectionHeaderContext,
|
|
4127
|
+
themeSelectionFooterContext,
|
|
4128
|
+
supabaseUrl,
|
|
4129
|
+
isSiteLaunched,
|
|
4130
|
+
maintenanceModeEnabled,
|
|
4131
|
+
entrySubrouteContext,
|
|
4132
|
+
assistantPanel,
|
|
4133
|
+
sdkConfig: sdkConfig ?? null,
|
|
4134
|
+
mediaAssets,
|
|
4135
|
+
useThemeScope,
|
|
4136
|
+
siteStyleAccess,
|
|
4137
|
+
children
|
|
4138
|
+
}
|
|
4139
|
+
)
|
|
4140
|
+
]
|
|
4141
|
+
}
|
|
4142
|
+
)
|
|
3630
4143
|
}
|
|
3631
4144
|
)
|
|
3632
4145
|
}
|