@riverbankcms/sdk 0.102.0 → 0.104.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 +10 -2
- package/dist/{PreviewEditorSidebar-BKkhhkJk.mjs → PreviewEditorSidebar-ywqcYjTB.mjs} +217 -131
- package/dist/{PreviewEditorUI-DIvTqcqI.mjs → PreviewEditorUI-DApUNF6g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-ZF6TXq5Q.mjs → PreviewQueryProvider-CStABBUh.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CA2k7Z_T.mjs → SdkPreviewModeRuntime-DmHCcIMO.mjs} +1738 -815
- package/dist/{SiteChromeCustomizeContext-Bh9-DtMQ.mjs → SiteChromeCustomizeContext-BV9GU-3C.mjs} +3517 -2524
- package/dist/_dts/ai/src/contracts/proposals.d.ts +298 -298
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -3
- package/dist/_dts/api/src/endpoints.d.ts +10 -3
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/navigation/contracts.d.ts +6 -6
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteIcons.d.ts +39 -43
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +36 -7
- package/dist/_dts/block-form/src/widgets/SliderField/SliderField.d.ts +3 -3
- package/dist/_dts/block-form/src/widgets/SliderField/sliderValue.d.ts +36 -0
- package/dist/_dts/block-form/src/widgets/utils/readNumericUiConfig.d.ts +3 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +2 -2
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +14 -14
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +29 -29
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +8 -5
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +362 -227
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/generatedAssets.d.ts +28 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +3 -6
- package/dist/_dts/blocks/src/system/inlineText.d.ts +2 -2
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +417 -177
- package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/stores/generatedIconAssetsStore.d.ts +9 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +344 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +15 -15
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +1 -5
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +25 -19
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +32 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/GeneratedIconLibraryContext.d.ts +28 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/index.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/loaders.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/CustomizeBackgroundControlRows.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/CustomizeColorTokenPicker.d.ts +27 -0
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +13 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +5 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +44 -18
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +16 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +4 -5
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +22 -1
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +12 -4
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +0 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +10 -10
- package/dist/_dts/sdk/src/next/revalidate.d.ts +14 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +9 -6
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -4
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +19 -19
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/cards/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +156 -150
- package/dist/_dts/theme-core/src/navigation/types.d.ts +8 -6
- package/dist/_dts/theme-core/src/palette/colors.d.ts +84 -0
- package/dist/_dts/theme-core/src/palette/{variants → curated}/brand-led.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/high-contrast.d.ts +9 -18
- package/dist/_dts/theme-core/src/palette/{variants → curated}/index.d.ts +67 -119
- package/dist/_dts/theme-core/src/palette/{variants → curated}/soft-natural.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/types.d.ts +52 -62
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-dark.d.ts +6 -12
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-neutral.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +45 -0
- package/dist/_dts/theme-core/src/palette/index.d.ts +25 -14
- package/dist/_dts/theme-core/src/palette/legacyRuntimeProjection.d.ts +38 -0
- package/dist/_dts/theme-core/src/palette/legacySelection.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +58 -0
- package/dist/_dts/theme-core/src/palette/paletteCompatibilityTransition.d.ts +241 -0
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +118 -0
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +50 -0
- package/dist/_dts/theme-core/src/palette/selection.d.ts +72 -0
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +58 -0
- package/dist/_dts/theme-core/src/schema.d.ts +208 -169
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +22 -22
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +24 -24
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +35 -11
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +48 -17
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +77 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +45 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/themeParity.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +2 -1
- package/dist/_dts/ui/src/toggle.d.ts +2 -2
- package/dist/cli/index.mjs +7815 -7445
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +9 -1
- package/dist/client/{DiscountCodeDisclosure-ChVZwVtS.mjs → DiscountCodeDisclosure-Dit2aItR.mjs} +1 -1
- package/dist/client/{EventCombined.client-PZtXbH6R.mjs → EventCombined.client-BnREyCjf.mjs} +3 -3
- package/dist/client/{EventListing.client-C4AMTXec.mjs → EventListing.client-0uHld51x.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-B0w8_i0u.mjs → LeafletStaticMap-DJcvSfmj.mjs} +1 -1
- package/dist/client/{MagicLinkForm-DF0ZGhIu.mjs → MagicLinkForm-EAsIktfw.mjs} +2 -2
- package/dist/client/{StepIndicator-PccQ89Ct.mjs → StepIndicator-CRR17tYI.mjs} +2 -2
- package/dist/client/{accordion-CTNWT1lk.mjs → accordion-B47HIuuH.mjs} +1 -1
- package/dist/client/{bookingForm-DYixwPqP.mjs → bookingForm-I1E-8F9P.mjs} +6 -6
- package/dist/client/{buttons-CySQwlFs.mjs → buttons-BbPn8OKA.mjs} +1 -1
- package/dist/client/{carousel-W75iYR0M.mjs → carousel-OlM7SyBs.mjs} +1 -1
- package/dist/client/{cart-Ca_DGWQq.mjs → cart-BKpG5jz6.mjs} +3 -3
- package/dist/client/{checkout-STgKTsNh.mjs → checkout-Dmmr6qoU.mjs} +3 -3
- package/dist/client/client.mjs +9000 -8353
- package/dist/client/{courseRegistration-DQI1cu1u.mjs → courseRegistration-CflZiqGk.mjs} +7 -7
- package/dist/client/{eventCalendar-BJrHpofg.mjs → eventCalendar-BvoLWcp-.mjs} +5 -5
- package/dist/client/{eventCombined-DPtqBHaH.mjs → eventCombined-DsrO8t_t.mjs} +2 -2
- package/dist/client/{eventDetails-Brt31CDo.mjs → eventDetails-C3hxgcJm.mjs} +3 -3
- package/dist/client/{eventListing-BrClHJOq.mjs → eventListing-C-hb237X.mjs} +2 -2
- package/dist/client/{eventRegistration-DxlNlVUC.mjs → eventRegistration-B0gyzDGi.mjs} +7 -7
- package/dist/client/{form-Vp5cGzDF.mjs → form-C_RUi6oJ.mjs} +2 -2
- package/dist/client/{headerSection-DL2xjRgW.mjs → headerSection-IKQiD2U0.mjs} +3 -3
- package/dist/client/hooks.mjs +4792 -4606
- package/dist/client/{locationMap-B0EjoXQS.mjs → locationMap-8ZBrMzRJ.mjs} +2 -2
- package/dist/client/{newsletterForm-BlV9VRlq.mjs → newsletterForm-CYk3ucwj.mjs} +2 -2
- package/dist/client/{pricing-DmRD7Tjx.mjs → pricing-B5GmvfIH.mjs} +1 -1
- package/dist/client/{productDetail-BLTQsY2f.mjs → productDetail-BjS2Dqzo.mjs} +3 -3
- package/dist/client/{productList-R8lsMpRs.mjs → productList-BOHvC8My.mjs} +3 -3
- package/dist/client/{propsDecoder-DgAshF92.mjs → propsDecoder-WS6UEJwZ.mjs} +7 -0
- package/dist/client/rendering/client.mjs +3565 -3218
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +8919 -8279
- package/dist/client/{shop-DWjyje1s.mjs → shop-CON03-wN.mjs} +6 -6
- package/dist/client/{shop-commerce-CSKCR87d.mjs → shop-commerce-DlqrFgH8.mjs} +5 -5
- package/dist/client/{shop-commerce-store-DxPnE-iN.mjs → shop-commerce-store-l74-Kne6.mjs} +1 -1
- package/dist/client/{shopShared-OOeAkFq7.mjs → shopShared-CQheEXSg.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Bp6X7XgG.mjs → useDiscountCodeUi-v6OluyWl.mjs} +1 -1
- package/dist/client/{useEventFilters-B489x9TO.mjs → useEventFilters-BqSTcNOf.mjs} +3 -3
- package/dist/client/{usePolling-BKP66stL.mjs → usePolling-DMfADjIF.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +10 -3
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +10 -3
- package/dist/{previewAuthStore-ByPPZqmp.mjs → previewAuthStore-CfquDtTh.mjs} +10 -3
- package/dist/{sdk-runtime-K8Oqj97H.mjs → sdk-runtime-DWb08Xaz.mjs} +2 -2
- package/dist/{separator-CRoP34pT.mjs → separator--6yjc914.mjs} +1 -1
- package/dist/server/components.mjs +10183 -9621
- package/dist/server/config-validation.mjs +4871 -4686
- package/dist/server/config.mjs +4871 -4686
- package/dist/server/data.mjs +4848 -4663
- package/dist/server/index.mjs +11 -4
- package/dist/server/next/revalidate.mjs +31 -1
- package/dist/server/next.mjs +9894 -9322
- package/dist/server/page-converter.mjs +4758 -4573
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +10099 -9619
- package/dist/server/rendering.mjs +10195 -9631
- package/dist/server/routing.mjs +4985 -4701
- package/dist/server/server.mjs +4823 -4629
- package/dist/server/theme-bridge.mjs +360 -146
- package/dist/server/theme.mjs +94 -91
- package/dist/styles/index.css +143 -30
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $
|
|
3
|
-
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import { S as isAdapterReferenceKind, T as CalloutDescription, _ as usePreviewBlockCustomizeSelectionOptional, b as previewWidgetOverrides, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as canInspectSiteStyle, h as canApplySiteStyle, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, v as useBlockCustomizeControls, w as Callout, x as BlockEditor, y as PreviewFormProvider } from "./SdkPreviewModeRuntime-
|
|
5
|
-
import { t as Separator } from "./separator
|
|
2
|
+
import { $i as getFooterLayout, A as openRow, Ai as getCuratedSiteStyle, Al as Input, B as setPaletteColors, Bc as buttonPersonalities, Bt as ManifestForm, C as createStyleConfiguratorState, Cl as SelectTrigger, D as markApplyFailed, Dl as Popover, E as isPreviewingChange, Eu as Button, F as previewHeaderLayout, Fd as Maximize2, Gt as createStoreBackend, H as syncStyleConfiguratorState, Ht as createManifestValidation, I as previewHeaderStyle, Id as LoaderCircle, Ji as evaluateTypographyFontSlot, Jl as CollapsibleContent, L as previewSiteStyle, M as previewButtonPersonality, Ml as TabsContent, Mt as deriveRouteMetadataPresentation, N as previewCuratedPalette, Nd as Monitor, Nl as TabsList, Nt as resolvePageRouteSlug, O as markApplySaved, Oi as curatedSiteStyles, Ol as PopoverContent, P as previewFooterLook, Pl as TabsTrigger, Pt as resolveContentTitle, Pu as unsafeAsEditorBlockId, Q as resolvePreviewSidebarTab, Qi as findFooterLook, R as previewTypographyPreset, S as cancelPreview, Sl as SelectItem, T as dismissWarnings, U as toggleRow, Ut as FormRenderer, V as styleConfiguratorHistoryEntryForPersistedSelection, Vc as findButtonPersonality, W as typographySelectionSnapshotFromFlat, Xi as typographyPresets, Yi as findTypographyPreset, Yl as CollapsibleTrigger, Z as createOptimisticActionRunner, Zi as requireEntriesForCuratedChoices, _ as usePreviewDesignCoordinator, _a as paletteColorsSchema, _t as useEditorUiStore, au as DropdownMenu, b as applyResolvedSelections, bl as Select, c as selectionSnapshotFromApplySiteStyleSelectionResponse, cf as ChevronLeft, cu as DropdownMenuLabel, d as buildSiteChromeLookModels, dt as useUISelector, ea as getHeaderLayout, ed as assertNever$1, en as listEntryPageContentSlots, f as cycleSiteChromeLookId, ga as paletteColorsEqual, h as planSiteChromeLookSelection, ha as paletteColorEntries, hd as X$1, iu as Surface, j as paletteMutationCapability, jl as Tabs, k as markApplySaving, kl as PopoverTrigger, ku as cn, l as planSiteStylePreviewChange, lu as DropdownMenuSeparator, m as planSiteChromeFooterLayoutSelection, ma as findCuratedPalette, mt as useEntryController, n as useSiteChromeCustomizeOptional, ou as DropdownMenuContent, p as cycleableSiteChromeOptions, pa as curatedPalettes, ql as Collapsible, s as buildApplySiteStyleSelectionBody, sf as ChevronRight, su as DropdownMenuItem, ta as getHeaderStyle, u as resolveStyleConfiguratorInitialSnapshot, ut as ContentFieldsForm, uu as DropdownMenuTrigger, vt as useEditorUiStoreInstance, w as deriveStyleConfiguratorCapabilities, wd as Smartphone, wl as SelectValue, x as applyTypographyDraftPatch, xd as Tablet, xl as SelectContent, z as resetTypographyToSaved } from "./SiteChromeCustomizeContext-BV9GU-3C.mjs";
|
|
3
|
+
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-CfquDtTh.mjs";
|
|
4
|
+
import { S as isAdapterReferenceKind, T as CalloutDescription, _ as usePreviewBlockCustomizeSelectionOptional, b as previewWidgetOverrides, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as canInspectSiteStyle, h as canApplySiteStyle, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, v as useBlockCustomizeControls, w as Callout, x as BlockEditor, y as PreviewFormProvider } from "./SdkPreviewModeRuntime-DmHCcIMO.mjs";
|
|
5
|
+
import { t as Separator } from "./separator--6yjc914.mjs";
|
|
6
6
|
import React, { forwardRef, useCallback, 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";
|
|
@@ -1112,7 +1112,7 @@ function updateBlocksWithSavedContent(blocks, blockId, content) {
|
|
|
1112
1112
|
function getErrorMessage(error) {
|
|
1113
1113
|
return error instanceof Error ? error.message : "Unable to load Page Content.";
|
|
1114
1114
|
}
|
|
1115
|
-
function EntrySlotBlockEditorPanel({ siteId, typeKey, entryId, theme = null, apiClient, bearerToken, supabaseUrl, sdkConfig = null, mediaAssets, widgets }) {
|
|
1115
|
+
function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId, theme = null, apiClient, bearerToken, supabaseUrl, sdkConfig = null, mediaAssets, widgets }) {
|
|
1116
1116
|
const router = useRouter();
|
|
1117
1117
|
const queryClient = useQueryClient();
|
|
1118
1118
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -1218,6 +1218,7 @@ function EntrySlotBlockEditorPanel({ siteId, typeKey, entryId, theme = null, api
|
|
|
1218
1218
|
children: /* @__PURE__ */ jsx(BlockEditor, {
|
|
1219
1219
|
ref: handleBlockEditorRef,
|
|
1220
1220
|
siteId,
|
|
1221
|
+
dashboardBaseUrl,
|
|
1221
1222
|
owner: {
|
|
1222
1223
|
kind: "entry-slot",
|
|
1223
1224
|
type: typeKey,
|
|
@@ -1276,7 +1277,7 @@ function EntrySlotBlockEditorPanel({ siteId, typeKey, entryId, theme = null, api
|
|
|
1276
1277
|
}
|
|
1277
1278
|
//#endregion
|
|
1278
1279
|
//#region ../preview-next/src/client/preview/EntryEditorPanel.tsx
|
|
1279
|
-
function EntryEditorPanel({ siteId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, metadataPanel, linkedEntrySection, mediaAssets, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1280
|
+
function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, metadataPanel, linkedEntrySection, mediaAssets, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1280
1281
|
const [contentOpen, setContentOpen] = useState(true);
|
|
1281
1282
|
const [pageContentOpen, setPageContentOpen] = useState(false);
|
|
1282
1283
|
const [templateOpen, setTemplateOpen] = useState(false);
|
|
@@ -1378,6 +1379,7 @@ function EntryEditorPanel({ siteId, entryData, contentTypeSchema, referenceConte
|
|
|
1378
1379
|
"data-testid": "entry-page-content-editor",
|
|
1379
1380
|
children: /* @__PURE__ */ jsx(EntrySlotBlockEditorPanel, {
|
|
1380
1381
|
siteId,
|
|
1382
|
+
dashboardBaseUrl,
|
|
1381
1383
|
typeKey: entryData.type,
|
|
1382
1384
|
entryId: entryData.id,
|
|
1383
1385
|
theme,
|
|
@@ -1562,12 +1564,13 @@ function formatBlockKindLabel(blockKind) {
|
|
|
1562
1564
|
}
|
|
1563
1565
|
//#endregion
|
|
1564
1566
|
//#region ../preview-next/src/client/preview/PageBlockEditorPanel.tsx
|
|
1565
|
-
function PageBlockEditorPanel({ siteId, pageId, theme, apiClient, bearerToken, supabaseUrl, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel, sdkConfig, mediaAssets, bookingOfferingPresets, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1567
|
+
function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClient, bearerToken, supabaseUrl, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel, designOpenRequestId = null, sdkConfig, mediaAssets, bookingOfferingPresets, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1566
1568
|
const customizeSelection = usePreviewBlockCustomizeSelectionOptional();
|
|
1567
1569
|
const [designOpen, setDesignOpen] = useState(false);
|
|
1568
1570
|
const [customizeOpen, setCustomizeOpen] = useState(false);
|
|
1569
1571
|
const [contentOpen, setContentOpen] = useState(true);
|
|
1570
1572
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
1573
|
+
const designSectionRef = useRef(null);
|
|
1571
1574
|
const customizeSectionRef = useRef(null);
|
|
1572
1575
|
const selectionKind = customizeSelection?.selection.kind;
|
|
1573
1576
|
const selectionRequestId = customizeSelection?.selection.kind === "selected" ? customizeSelection.selection.requestId : 0;
|
|
@@ -1594,6 +1597,14 @@ function PageBlockEditorPanel({ siteId, pageId, theme, apiClient, bearerToken, s
|
|
|
1594
1597
|
});
|
|
1595
1598
|
}
|
|
1596
1599
|
}, [selectionKind, selectionRequestId]);
|
|
1600
|
+
useEffect(() => {
|
|
1601
|
+
if (designOpenRequestId === null) return;
|
|
1602
|
+
setDesignOpen(true);
|
|
1603
|
+
designSectionRef.current?.scrollIntoView({
|
|
1604
|
+
block: "start",
|
|
1605
|
+
behavior: "smooth"
|
|
1606
|
+
});
|
|
1607
|
+
}, [designOpenRequestId]);
|
|
1597
1608
|
return /* @__PURE__ */ jsxs("div", {
|
|
1598
1609
|
className: "flex h-full min-h-0 flex-col overflow-hidden",
|
|
1599
1610
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -1627,6 +1638,7 @@ function PageBlockEditorPanel({ siteId, pageId, theme, apiClient, bearerToken, s
|
|
|
1627
1638
|
open: designOpen,
|
|
1628
1639
|
onOpenChange: setDesignOpen,
|
|
1629
1640
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1641
|
+
ref: designSectionRef,
|
|
1630
1642
|
className: "border-b",
|
|
1631
1643
|
children: [/* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
1632
1644
|
asChild: true,
|
|
@@ -1688,6 +1700,7 @@ function PageBlockEditorPanel({ siteId, pageId, theme, apiClient, bearerToken, s
|
|
|
1688
1700
|
children: /* @__PURE__ */ jsx(BlockEditor, {
|
|
1689
1701
|
ref: blockEditorRef,
|
|
1690
1702
|
siteId,
|
|
1703
|
+
dashboardBaseUrl,
|
|
1691
1704
|
owner: {
|
|
1692
1705
|
kind: "page",
|
|
1693
1706
|
pageId
|
|
@@ -1867,7 +1880,7 @@ const DEFAULT_SURFACE_ROLES = [
|
|
|
1867
1880
|
* - LiveThemeEditor's palette tab (via a thin context wrapper)
|
|
1868
1881
|
* - Style configurator's brand-colours row
|
|
1869
1882
|
*/
|
|
1870
|
-
function PaletteTokenEditor({ palette, onChange, hasInvalidValues = false, brandRoles = DEFAULT_BRAND_ROLES, feedbackRoles = DEFAULT_FEEDBACK_ROLES, surfaceRoles = DEFAULT_SURFACE_ROLES, showContrastChecks = true, className }) {
|
|
1883
|
+
function PaletteTokenEditor({ palette, onChange, hasInvalidValues = false, brandRoles = DEFAULT_BRAND_ROLES, feedbackRoles = DEFAULT_FEEDBACK_ROLES, surfaceRoles = DEFAULT_SURFACE_ROLES, showContrastChecks = true, disabled = false, className }) {
|
|
1871
1884
|
const paletteValues = useMemo(() => {
|
|
1872
1885
|
const map = /* @__PURE__ */ new Map();
|
|
1873
1886
|
for (const entry of palette) if (entry?.name) map.set(entry.name, normalizeHex(entry.hex));
|
|
@@ -1899,19 +1912,22 @@ function PaletteTokenEditor({ palette, onChange, hasInvalidValues = false, brand
|
|
|
1899
1912
|
title: "Brand & accents",
|
|
1900
1913
|
roles: brandRoles,
|
|
1901
1914
|
getColor,
|
|
1902
|
-
onChange: handleRoleChange
|
|
1915
|
+
onChange: handleRoleChange,
|
|
1916
|
+
disabled
|
|
1903
1917
|
}),
|
|
1904
1918
|
/* @__PURE__ */ jsx(ColorRoleGroup, {
|
|
1905
1919
|
title: "Feedback",
|
|
1906
1920
|
roles: feedbackRoles,
|
|
1907
1921
|
getColor,
|
|
1908
|
-
onChange: handleRoleChange
|
|
1922
|
+
onChange: handleRoleChange,
|
|
1923
|
+
disabled
|
|
1909
1924
|
}),
|
|
1910
1925
|
/* @__PURE__ */ jsx(ColorRoleGroup, {
|
|
1911
1926
|
title: "Surfaces & text",
|
|
1912
1927
|
roles: surfaceRoles,
|
|
1913
1928
|
getColor,
|
|
1914
|
-
onChange: handleRoleChange
|
|
1929
|
+
onChange: handleRoleChange,
|
|
1930
|
+
disabled
|
|
1915
1931
|
}),
|
|
1916
1932
|
showContrastChecks ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Separator, {}), /* @__PURE__ */ jsxs("div", {
|
|
1917
1933
|
className: "grid gap-4 md:grid-cols-2",
|
|
@@ -1941,7 +1957,7 @@ function isPlausibleHexInput(value) {
|
|
|
1941
1957
|
const trimmed = value.trim();
|
|
1942
1958
|
return /^#?[0-9a-fA-F]{3}$/.test(trimmed) || /^#?[0-9a-fA-F]{6}$/.test(trimmed);
|
|
1943
1959
|
}
|
|
1944
|
-
function ColorRoleGroup({ title, roles, getColor, onChange }) {
|
|
1960
|
+
function ColorRoleGroup({ title, roles, getColor, onChange, disabled }) {
|
|
1945
1961
|
if (roles.length === 0) return null;
|
|
1946
1962
|
return /* @__PURE__ */ jsxs("div", {
|
|
1947
1963
|
className: "space-y-3",
|
|
@@ -1956,12 +1972,13 @@ function ColorRoleGroup({ title, roles, getColor, onChange }) {
|
|
|
1956
1972
|
children: roles.map((role) => /* @__PURE__ */ jsx(ColorRoleField, {
|
|
1957
1973
|
role,
|
|
1958
1974
|
value: getColor(role.key),
|
|
1959
|
-
onChange
|
|
1975
|
+
onChange,
|
|
1976
|
+
disabled
|
|
1960
1977
|
}, role.key))
|
|
1961
1978
|
})]
|
|
1962
1979
|
});
|
|
1963
1980
|
}
|
|
1964
|
-
function ColorRoleField({ role, value, onChange }) {
|
|
1981
|
+
function ColorRoleField({ role, value, onChange, disabled }) {
|
|
1965
1982
|
const inputId = useId();
|
|
1966
1983
|
const colorPickerLabel = `${role.label} colour picker`;
|
|
1967
1984
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -1974,18 +1991,20 @@ function ColorRoleField({ role, value, onChange }) {
|
|
|
1974
1991
|
}),
|
|
1975
1992
|
/* @__PURE__ */ jsx(ColorPicker, {
|
|
1976
1993
|
value,
|
|
1977
|
-
onChange: (
|
|
1994
|
+
onChange: (next) => {
|
|
1978
1995
|
if (typeof next === "string") onChange(role.key, next);
|
|
1979
|
-
}
|
|
1996
|
+
},
|
|
1980
1997
|
className: "w-full",
|
|
1981
|
-
"aria-label": colorPickerLabel
|
|
1998
|
+
"aria-label": colorPickerLabel,
|
|
1999
|
+
disabled
|
|
1982
2000
|
}),
|
|
1983
2001
|
/* @__PURE__ */ jsx(Input, {
|
|
1984
2002
|
id: inputId,
|
|
1985
2003
|
value,
|
|
1986
2004
|
onChange: (event) => onChange(role.key, event.target.value),
|
|
1987
2005
|
className: "font-mono text-xs uppercase",
|
|
1988
|
-
placeholder: "#000000"
|
|
2006
|
+
placeholder: "#000000",
|
|
2007
|
+
disabled
|
|
1989
2008
|
})
|
|
1990
2009
|
]
|
|
1991
2010
|
});
|
|
@@ -2107,7 +2126,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2107
2126
|
const router = useRouter();
|
|
2108
2127
|
const previewDesign = usePreviewDesignCoordinator();
|
|
2109
2128
|
const siteChromeCustomize = useSiteChromeCustomizeOptional();
|
|
2110
|
-
const setSiteStyleStagedPreviewActive = siteChromeCustomize?.siteStyleHistory
|
|
2129
|
+
const setSiteStyleStagedPreviewActive = siteChromeCustomize?.siteStyleHistory?.setStagedPreviewActive;
|
|
2111
2130
|
const { applyFailed, applyStarted, applySucceeded, clearPreview, previewTheme } = previewDesign;
|
|
2112
2131
|
const [isRefreshPending, startRefreshTransition] = useTransition();
|
|
2113
2132
|
const baseSnapshot = useMemo(() => resolveStyleConfiguratorInitialSnapshot({
|
|
@@ -2194,7 +2213,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2194
2213
|
setState((current) => {
|
|
2195
2214
|
if (!current) return current;
|
|
2196
2215
|
appliedExpandedRowRequestIdRef.current = expandedRowRequest.id;
|
|
2197
|
-
return openRow(current, expandedRowRequest.row
|
|
2216
|
+
return openRow(current, expandedRowForPreviewDesignRow(expandedRowRequest.row));
|
|
2198
2217
|
});
|
|
2199
2218
|
}, [expandedRowRequest, hasLoadedState]);
|
|
2200
2219
|
const handlePreviewSiteStyle = useCallback((siteStyleId) => {
|
|
@@ -2263,7 +2282,13 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2263
2282
|
});
|
|
2264
2283
|
}, [footerSelectionContext, headerSelectionContext]);
|
|
2265
2284
|
const handlePreviewPalette = useCallback((id) => {
|
|
2266
|
-
|
|
2285
|
+
const curated = findCuratedPalette(id);
|
|
2286
|
+
if (!curated) return;
|
|
2287
|
+
setState((current) => current ? previewCuratedPalette(current, {
|
|
2288
|
+
paletteId: curated.id,
|
|
2289
|
+
colors: curated.colors,
|
|
2290
|
+
mode: curated.mode
|
|
2291
|
+
}) : current);
|
|
2267
2292
|
}, []);
|
|
2268
2293
|
const handlePreviewTypographyPreset = useCallback((id) => {
|
|
2269
2294
|
setState((current) => current ? previewTypographyPreset(current, id) : current);
|
|
@@ -2310,17 +2335,22 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2310
2335
|
const handleTokenOverride = useCallback((role, hex) => {
|
|
2311
2336
|
setState((current) => {
|
|
2312
2337
|
if (!current) return current;
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2338
|
+
const palette = current.previewed.palette;
|
|
2339
|
+
if (palette.kind === "invalid") return current;
|
|
2340
|
+
if (!(role in palette.colors)) return current;
|
|
2341
|
+
const nextColors = paletteColorsSchema.safeParse({
|
|
2342
|
+
...palette.colors,
|
|
2315
2343
|
[role]: hex
|
|
2316
|
-
};
|
|
2317
|
-
|
|
2318
|
-
if (!parsed.success) return current;
|
|
2319
|
-
return setPaletteOverrides(current, parsed.data);
|
|
2344
|
+
});
|
|
2345
|
+
return nextColors.success ? setPaletteColors(current, nextColors.data) : current;
|
|
2320
2346
|
});
|
|
2321
2347
|
}, []);
|
|
2322
2348
|
const handleResetOverrides = useCallback(() => {
|
|
2323
|
-
setState((current) =>
|
|
2349
|
+
setState((current) => {
|
|
2350
|
+
if (!current || current.previewed.palette.kind !== "migrated-curated") return current;
|
|
2351
|
+
const curated = findCuratedPalette(current.previewed.palette.paletteId);
|
|
2352
|
+
return curated ? setPaletteColors(current, curated.colors) : current;
|
|
2353
|
+
});
|
|
2324
2354
|
}, []);
|
|
2325
2355
|
const handleToggleRow = useCallback((row) => {
|
|
2326
2356
|
setState((current) => current ? toggleRow(current, row) : current);
|
|
@@ -2331,9 +2361,6 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2331
2361
|
const handleDismissWarnings = useCallback(() => {
|
|
2332
2362
|
setState((current) => current ? dismissWarnings(current) : current);
|
|
2333
2363
|
}, []);
|
|
2334
|
-
const handleDismissNotices = useCallback(() => {
|
|
2335
|
-
setState((current) => current ? dismissNotices(current) : current);
|
|
2336
|
-
}, []);
|
|
2337
2364
|
const handleApply = useCallback(async () => {
|
|
2338
2365
|
const live = stateRef.current;
|
|
2339
2366
|
if (!live || !isPreviewingChange(live)) return;
|
|
@@ -2348,39 +2375,39 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2348
2375
|
headerSelectionContext,
|
|
2349
2376
|
footerSelectionContext
|
|
2350
2377
|
});
|
|
2351
|
-
const body = buildApplySiteStyleSelectionBody({
|
|
2352
|
-
base: live.base,
|
|
2353
|
-
previewed: {
|
|
2354
|
-
...previewed,
|
|
2355
|
-
buttonPersonalityId: compiled.resolvedSelections.buttonPersonalityId,
|
|
2356
|
-
paletteVariantId: compiled.resolvedSelections.paletteVariantId,
|
|
2357
|
-
headerLayoutId: compiled.resolvedSelections.headerLayoutId,
|
|
2358
|
-
headerStyleId: compiled.resolvedSelections.headerStyleId,
|
|
2359
|
-
headerLookId: compiled.resolvedSelections.headerLookId,
|
|
2360
|
-
typographySelection: compiled.resolvedSelections.typographySelection.kind === "custom" ? {
|
|
2361
|
-
kind: "custom",
|
|
2362
|
-
typography: compiled.themeOverlay.typography
|
|
2363
|
-
} : typographySelectionSnapshotFromFlat(compiled.resolvedSelections)
|
|
2364
|
-
},
|
|
2365
|
-
selectionId
|
|
2366
|
-
});
|
|
2367
2378
|
await runnerRef.current.run({
|
|
2368
2379
|
optimistic: () => {
|
|
2369
2380
|
applyStarted("style-configurator");
|
|
2370
2381
|
setState((current) => current ? markApplySaving(current) : current);
|
|
2371
2382
|
},
|
|
2372
2383
|
network: async () => {
|
|
2384
|
+
const body = buildApplySiteStyleSelectionBody({
|
|
2385
|
+
base: live.base,
|
|
2386
|
+
previewed: {
|
|
2387
|
+
...previewed,
|
|
2388
|
+
buttonPersonalityId: compiled.resolvedSelections.buttonPersonalityId,
|
|
2389
|
+
headerLayoutId: compiled.resolvedSelections.headerLayoutId,
|
|
2390
|
+
headerStyleId: compiled.resolvedSelections.headerStyleId,
|
|
2391
|
+
headerLookId: compiled.resolvedSelections.headerLookId,
|
|
2392
|
+
typographySelection: compiled.resolvedSelections.typographySelection.kind === "custom" ? {
|
|
2393
|
+
kind: "custom",
|
|
2394
|
+
typography: compiled.themeOverlay.typography
|
|
2395
|
+
} : typographySelectionSnapshotFromFlat(compiled.resolvedSelections)
|
|
2396
|
+
},
|
|
2397
|
+
selectionId
|
|
2398
|
+
});
|
|
2399
|
+
if (!body.ok) throw new Error(paletteApplyPlanErrorMessage(body.error));
|
|
2373
2400
|
return unwrapResponse(await apiClient({
|
|
2374
2401
|
endpoint: "applySiteStyleSelection",
|
|
2375
2402
|
params: { siteId },
|
|
2376
|
-
body
|
|
2403
|
+
body: body.body
|
|
2377
2404
|
}));
|
|
2378
2405
|
},
|
|
2379
2406
|
onSuccess: (saved) => {
|
|
2380
2407
|
const persisted = selectionSnapshotFromApplySiteStyleSelectionResponse(saved, previewed);
|
|
2381
2408
|
const historyEntry = styleConfiguratorHistoryEntryForPersistedSelection(live, persisted);
|
|
2382
2409
|
setState((current) => current ? markApplySaved(current, persisted) : current);
|
|
2383
|
-
if (historyEntry) siteChromeCustomize?.siteStyleHistory
|
|
2410
|
+
if (historyEntry) siteChromeCustomize?.siteStyleHistory?.recordAppliedSelection(historyEntry);
|
|
2384
2411
|
applySucceeded("style-configurator");
|
|
2385
2412
|
startRefreshTransition(() => {
|
|
2386
2413
|
router.refresh();
|
|
@@ -2418,13 +2445,17 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2418
2445
|
const stagedCapabilities = deriveStyleConfiguratorCapabilities(state);
|
|
2419
2446
|
const previewingChange = isPreviewingChange(state);
|
|
2420
2447
|
const saving = stagedCapabilities.isApplyingStaged || isRefreshPending;
|
|
2448
|
+
const aggregateMutationControlsDisabled = saving || !stagedCapabilities.canPreviewStaged;
|
|
2421
2449
|
const currentSiteStyle = getCuratedSiteStyle(state.previewed.siteStyleId);
|
|
2422
2450
|
if (!currentSiteStyle) return /* @__PURE__ */ jsx("p", {
|
|
2423
2451
|
className: "text-sm text-muted-foreground",
|
|
2424
2452
|
children: "This site uses a Site Style that cannot be configured here."
|
|
2425
2453
|
});
|
|
2426
2454
|
const currentPersonality = findButtonPersonality(state.previewed.buttonPersonalityId);
|
|
2427
|
-
const
|
|
2455
|
+
const currentPalette = state.previewed.palette;
|
|
2456
|
+
const paletteMutation = paletteMutationCapability(state);
|
|
2457
|
+
const paletteControlsDisabled = saving || paletteMutation.kind !== "editable";
|
|
2458
|
+
const currentCuratedPalette = currentPalette.kind === "migrated-curated" ? findCuratedPalette(currentPalette.paletteId) : null;
|
|
2428
2459
|
const currentTypographyPreset = state.previewed.typographySelection.kind === "preset" && state.previewed.typographySelection.presetId ? findTypographyPreset(state.previewed.typographySelection.presetId) : null;
|
|
2429
2460
|
const currentTypography = planSiteStylePreviewChange({
|
|
2430
2461
|
siteStyle: currentSiteStyle,
|
|
@@ -2443,6 +2474,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2443
2474
|
const currentHeaderStyle = getHeaderStyle(state.previewed.headerStyleId);
|
|
2444
2475
|
const currentFooterLayout = getFooterLayout(chromeLookModels.footerLayout.renderedLayoutId);
|
|
2445
2476
|
const currentFooterLook = state.previewed.footerLookId ? findFooterLook(state.previewed.footerLookId) : findFooterLook(chromeLookModels.footer.renderedLookId);
|
|
2477
|
+
const headerSurfaceState = siteChromeCustomize?.getSurfaceState("header") ?? { kind: "unavailable" };
|
|
2446
2478
|
return /* @__PURE__ */ jsxs("div", {
|
|
2447
2479
|
className: "space-y-3",
|
|
2448
2480
|
children: [
|
|
@@ -2450,16 +2482,12 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2450
2482
|
warnings: state.warnings,
|
|
2451
2483
|
onDismiss: handleDismissWarnings
|
|
2452
2484
|
}) : null,
|
|
2453
|
-
state.notices.length > 0 ? /* @__PURE__ */ jsx(NoticeBanner, {
|
|
2454
|
-
notices: state.notices,
|
|
2455
|
-
onDismiss: handleDismissNotices
|
|
2456
|
-
}) : null,
|
|
2457
2485
|
/* @__PURE__ */ jsx(SiteStyleRow, {
|
|
2458
2486
|
expanded: state.expandedRow === "style",
|
|
2459
2487
|
onToggle: () => handleToggleRow("style"),
|
|
2460
2488
|
current: currentSiteStyle,
|
|
2461
2489
|
onPreview: handlePreviewSiteStyle,
|
|
2462
|
-
disabled:
|
|
2490
|
+
disabled: aggregateMutationControlsDisabled
|
|
2463
2491
|
}),
|
|
2464
2492
|
/* @__PURE__ */ jsx(SiteChromeLookRow, {
|
|
2465
2493
|
label: "Header layout",
|
|
@@ -2477,7 +2505,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2477
2505
|
if (next !== void 0) handlePreviewHeaderLayout(next);
|
|
2478
2506
|
},
|
|
2479
2507
|
onPreview: handlePreviewHeaderLayout,
|
|
2480
|
-
disabled:
|
|
2508
|
+
disabled: aggregateMutationControlsDisabled
|
|
2481
2509
|
}),
|
|
2482
2510
|
/* @__PURE__ */ jsx(SiteChromeLookRow, {
|
|
2483
2511
|
label: "Header look",
|
|
@@ -2495,7 +2523,13 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2495
2523
|
if (next !== void 0) handlePreviewHeaderStyle(next);
|
|
2496
2524
|
},
|
|
2497
2525
|
onPreview: handlePreviewHeaderStyle,
|
|
2498
|
-
disabled:
|
|
2526
|
+
disabled: aggregateMutationControlsDisabled,
|
|
2527
|
+
extraControls: isHeaderMenuSurfaceState(headerSurfaceState) ? /* @__PURE__ */ jsx(HeaderMenuControls, {
|
|
2528
|
+
state: headerSurfaceState,
|
|
2529
|
+
disabled: saving,
|
|
2530
|
+
onMenuFontChange: siteChromeCustomize?.setHeaderMenuFont,
|
|
2531
|
+
onMenuFontSizeChange: siteChromeCustomize?.setHeaderMenuFontSize
|
|
2532
|
+
}) : null
|
|
2499
2533
|
}),
|
|
2500
2534
|
/* @__PURE__ */ jsx(SiteChromeLookRow, {
|
|
2501
2535
|
label: "Footer layout",
|
|
@@ -2513,7 +2547,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2513
2547
|
if (next !== void 0) handlePreviewFooterLayout(next);
|
|
2514
2548
|
},
|
|
2515
2549
|
onPreview: handlePreviewFooterLayout,
|
|
2516
|
-
disabled:
|
|
2550
|
+
disabled: aggregateMutationControlsDisabled
|
|
2517
2551
|
}),
|
|
2518
2552
|
/* @__PURE__ */ jsx(SiteChromeLookRow, {
|
|
2519
2553
|
label: "Footer look",
|
|
@@ -2531,7 +2565,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2531
2565
|
if (next !== void 0) handlePreviewFooterLook(next);
|
|
2532
2566
|
},
|
|
2533
2567
|
onPreview: handlePreviewFooterLook,
|
|
2534
|
-
disabled:
|
|
2568
|
+
disabled: aggregateMutationControlsDisabled
|
|
2535
2569
|
}),
|
|
2536
2570
|
/* @__PURE__ */ jsx(PersonalityRow, {
|
|
2537
2571
|
expanded: state.expandedRow === "buttons",
|
|
@@ -2540,7 +2574,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2540
2574
|
currentId: state.previewed.buttonPersonalityId,
|
|
2541
2575
|
currentLabel: currentPersonality?.name ?? state.previewed.buttonPersonalityId,
|
|
2542
2576
|
onPreview: handlePreviewPersonality,
|
|
2543
|
-
disabled:
|
|
2577
|
+
disabled: aggregateMutationControlsDisabled
|
|
2544
2578
|
}),
|
|
2545
2579
|
/* @__PURE__ */ jsx(TypographyRow, {
|
|
2546
2580
|
expanded: state.expandedRow === "typography",
|
|
@@ -2555,26 +2589,28 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
2555
2589
|
onBodyChange: handleBodyTypographyChange,
|
|
2556
2590
|
onScaleChange: handleTypographyScaleChange,
|
|
2557
2591
|
onReset: handleResetTypography,
|
|
2558
|
-
disabled:
|
|
2592
|
+
disabled: aggregateMutationControlsDisabled
|
|
2559
2593
|
}),
|
|
2560
2594
|
/* @__PURE__ */ jsx(PaletteRow, {
|
|
2561
2595
|
expanded: state.expandedRow === "palette",
|
|
2562
2596
|
onToggle: () => handleToggleRow("palette"),
|
|
2563
2597
|
siteStyle: currentSiteStyle,
|
|
2564
|
-
currentId:
|
|
2565
|
-
currentLabel:
|
|
2566
|
-
currentSwatch:
|
|
2598
|
+
currentId: currentCuratedPalette?.id ?? null,
|
|
2599
|
+
currentLabel: currentCuratedPalette?.name ?? (currentPalette.kind === "migrated-site" ? "Site palette" : "Custom palette"),
|
|
2600
|
+
currentSwatch: currentCuratedPalette?.colors.primary ?? null,
|
|
2567
2601
|
onPreview: handlePreviewPalette,
|
|
2568
|
-
|
|
2602
|
+
mutationCapability: paletteMutation,
|
|
2603
|
+
disabled: paletteControlsDisabled
|
|
2569
2604
|
}),
|
|
2570
|
-
|
|
2605
|
+
currentPalette.kind !== "invalid" ? /* @__PURE__ */ jsx(ColoursRow, {
|
|
2571
2606
|
expanded: state.expandedRow === "colours",
|
|
2572
2607
|
onToggle: () => handleToggleRow("colours"),
|
|
2573
|
-
|
|
2574
|
-
|
|
2608
|
+
palette: currentPalette.colors,
|
|
2609
|
+
isCustom: !currentCuratedPalette || currentPalette.mode !== currentCuratedPalette.mode || !paletteColorsEqual(currentPalette.colors, currentCuratedPalette.colors),
|
|
2575
2610
|
onTokenChange: handleTokenOverride,
|
|
2576
2611
|
onReset: handleResetOverrides,
|
|
2577
|
-
disabled:
|
|
2612
|
+
disabled: paletteControlsDisabled,
|
|
2613
|
+
mutationCapability: paletteMutation
|
|
2578
2614
|
}) : null,
|
|
2579
2615
|
previewingChange ? /* @__PURE__ */ jsxs("div", {
|
|
2580
2616
|
className: "flex items-center gap-2 pt-2",
|
|
@@ -3293,7 +3329,7 @@ function SiteChromeLookRow({ label, ariaLabel, defaultDescription, catalog, opti
|
|
|
3293
3329
|
}, ...(catalog ?? []).map((look) => ({
|
|
3294
3330
|
...look,
|
|
3295
3331
|
available: true
|
|
3296
|
-
}))], diagnostics, scopeDescription, expanded, onToggle, currentId, currentLabel, onCycle, onPreview, disabled }) {
|
|
3332
|
+
}))], diagnostics, scopeDescription, expanded, onToggle, currentId, currentLabel, onCycle, onPreview, disabled, extraControls }) {
|
|
3297
3333
|
return /* @__PURE__ */ jsxs(StyleRowFrame, {
|
|
3298
3334
|
label,
|
|
3299
3335
|
currentLabel,
|
|
@@ -3328,6 +3364,10 @@ function SiteChromeLookRow({ label, ariaLabel, defaultDescription, catalog, opti
|
|
|
3328
3364
|
className: "mb-3 list-none space-y-1 p-0 text-xs text-amber-700",
|
|
3329
3365
|
children: diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic))
|
|
3330
3366
|
}) : null,
|
|
3367
|
+
extraControls ? /* @__PURE__ */ jsx("div", {
|
|
3368
|
+
className: "mb-3",
|
|
3369
|
+
children: extraControls
|
|
3370
|
+
}) : null,
|
|
3331
3371
|
/* @__PURE__ */ jsx("ul", {
|
|
3332
3372
|
role: "radiogroup",
|
|
3333
3373
|
"aria-label": ariaLabel,
|
|
@@ -3343,51 +3383,87 @@ function SiteChromeLookRow({ label, ariaLabel, defaultDescription, catalog, opti
|
|
|
3343
3383
|
]
|
|
3344
3384
|
});
|
|
3345
3385
|
}
|
|
3346
|
-
function
|
|
3386
|
+
function isHeaderMenuSurfaceState(state) {
|
|
3387
|
+
return state.kind === "available" && state.surface === "header" && Array.isArray(state.menuFontOptions) && Array.isArray(state.menuFontSizeOptions);
|
|
3388
|
+
}
|
|
3389
|
+
function HeaderMenuControls({ state, disabled, onMenuFontChange, onMenuFontSizeChange }) {
|
|
3390
|
+
const controlDisabled = disabled || !state.applyAllowed;
|
|
3391
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
3392
|
+
className: "grid grid-cols-2 gap-2 rounded-md border bg-muted/20 p-2",
|
|
3393
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
3394
|
+
className: "block text-xs font-medium text-muted-foreground",
|
|
3395
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Menu font" }), /* @__PURE__ */ jsx("select", {
|
|
3396
|
+
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
3397
|
+
value: state.menuFont,
|
|
3398
|
+
onChange: (event) => onMenuFontChange?.(event.currentTarget.value),
|
|
3399
|
+
disabled: controlDisabled,
|
|
3400
|
+
children: state.menuFontOptions.map((option) => /* @__PURE__ */ jsx("option", {
|
|
3401
|
+
value: option.value,
|
|
3402
|
+
children: option.label
|
|
3403
|
+
}, option.value))
|
|
3404
|
+
})]
|
|
3405
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
3406
|
+
className: "block text-xs font-medium text-muted-foreground",
|
|
3407
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Menu font size" }), /* @__PURE__ */ jsx("select", {
|
|
3408
|
+
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
3409
|
+
value: state.menuFontSize,
|
|
3410
|
+
onChange: (event) => onMenuFontSizeChange?.(event.currentTarget.value),
|
|
3411
|
+
disabled: controlDisabled,
|
|
3412
|
+
children: state.menuFontSizeOptions.map((option) => /* @__PURE__ */ jsx("option", {
|
|
3413
|
+
value: option.value,
|
|
3414
|
+
children: option.label
|
|
3415
|
+
}, option.value))
|
|
3416
|
+
})]
|
|
3417
|
+
})]
|
|
3418
|
+
});
|
|
3419
|
+
}
|
|
3420
|
+
function PaletteRow({ expanded, onToggle, siteStyle, currentId, currentLabel, currentSwatch, onPreview, mutationCapability, disabled }) {
|
|
3347
3421
|
const options = useMemo(() => {
|
|
3348
|
-
const recommended = requireEntriesForCuratedChoices(
|
|
3422
|
+
const recommended = requireEntriesForCuratedChoices(curatedPalettes, siteStyle.paletteRecommendations);
|
|
3349
3423
|
if (recommended.some((variant) => variant.id === currentId)) return recommended;
|
|
3350
|
-
const current =
|
|
3424
|
+
const current = currentId ? findCuratedPalette(currentId) : null;
|
|
3351
3425
|
return current ? [current, ...recommended] : recommended;
|
|
3352
|
-
}, [currentId, siteStyle.
|
|
3426
|
+
}, [currentId, siteStyle.paletteRecommendations]);
|
|
3353
3427
|
return /* @__PURE__ */ jsxs(StyleRowFrame, {
|
|
3354
3428
|
label: "Palette",
|
|
3355
3429
|
currentLabel,
|
|
3356
3430
|
swatch: currentSwatch,
|
|
3357
3431
|
expanded,
|
|
3358
3432
|
onToggle,
|
|
3359
|
-
children: [
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
"
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3433
|
+
children: [
|
|
3434
|
+
/* @__PURE__ */ jsx("p", {
|
|
3435
|
+
className: "mb-3 text-xs text-muted-foreground",
|
|
3436
|
+
children: "These palette bases are recommended for the current Site Style. Choose a base here, then edit exact colours in Palette colours."
|
|
3437
|
+
}),
|
|
3438
|
+
mutationCapability.kind === "blocked" && mutationCapability.reason === "invalid-palette" ? /* @__PURE__ */ jsx("div", {
|
|
3439
|
+
role: "status",
|
|
3440
|
+
className: "mb-3 flex items-center justify-between gap-3 rounded-md border border-muted px-3 py-2 text-xs text-muted-foreground",
|
|
3441
|
+
children: /* @__PURE__ */ jsx("span", { children: mutationCapability.message })
|
|
3442
|
+
}) : null,
|
|
3443
|
+
/* @__PURE__ */ jsx("ul", {
|
|
3444
|
+
role: "radiogroup",
|
|
3445
|
+
"aria-label": "Palette",
|
|
3446
|
+
className: "list-none space-y-1 p-0",
|
|
3447
|
+
children: options.map((variant) => {
|
|
3448
|
+
const primaryHex = variant.colors.primary;
|
|
3449
|
+
return /* @__PURE__ */ jsx(PickerOption, {
|
|
3450
|
+
selected: variant.id === currentId,
|
|
3451
|
+
label: variant.name,
|
|
3452
|
+
description: variant.description,
|
|
3453
|
+
swatch: primaryHex,
|
|
3454
|
+
onSelect: () => onPreview(variant.id),
|
|
3455
|
+
disabled
|
|
3456
|
+
}, variant.id);
|
|
3457
|
+
})
|
|
3376
3458
|
})
|
|
3377
|
-
|
|
3459
|
+
]
|
|
3378
3460
|
});
|
|
3379
3461
|
}
|
|
3380
|
-
function ColoursRow({ expanded, onToggle,
|
|
3381
|
-
const mergedPalette = useMemo(() =>
|
|
3382
|
-
return variant.colors.map((color) => ({
|
|
3383
|
-
name: color.name,
|
|
3384
|
-
hex: overrides?.[color.name] ?? color.hex
|
|
3385
|
-
}));
|
|
3386
|
-
}, [variant, overrides]);
|
|
3387
|
-
const overrideCount = overrides ? Object.keys(overrides).length : 0;
|
|
3462
|
+
function ColoursRow({ expanded, onToggle, palette, isCustom, onTokenChange, onReset, mutationCapability, disabled }) {
|
|
3463
|
+
const mergedPalette = useMemo(() => paletteColorEntries(palette), [palette]);
|
|
3388
3464
|
return /* @__PURE__ */ jsx(StyleRowFrame, {
|
|
3389
3465
|
label: "Palette colours",
|
|
3390
|
-
currentLabel:
|
|
3466
|
+
currentLabel: isCustom ? "Custom palette colours" : "Using selected palette",
|
|
3391
3467
|
expanded,
|
|
3392
3468
|
onToggle,
|
|
3393
3469
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -3397,15 +3473,25 @@ function ColoursRow({ expanded, onToggle, variant, overrides, onTokenChange, onR
|
|
|
3397
3473
|
className: "text-xs text-muted-foreground",
|
|
3398
3474
|
children: "Customise the palette tokens used across the site, including backgrounds, surfaces, text and borders."
|
|
3399
3475
|
}),
|
|
3400
|
-
/* @__PURE__ */ jsx(
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3476
|
+
mutationCapability.kind === "blocked" ? /* @__PURE__ */ jsx("div", {
|
|
3477
|
+
role: "status",
|
|
3478
|
+
className: "flex items-center justify-between gap-3 rounded-md border border-muted px-3 py-2 text-xs text-muted-foreground",
|
|
3479
|
+
children: /* @__PURE__ */ jsx("span", { children: mutationCapability.message })
|
|
3480
|
+
}) : null,
|
|
3481
|
+
/* @__PURE__ */ jsx("fieldset", {
|
|
3482
|
+
disabled,
|
|
3483
|
+
className: "min-w-0 border-0 p-0",
|
|
3484
|
+
children: /* @__PURE__ */ jsx(PaletteTokenEditor, {
|
|
3485
|
+
palette: mergedPalette,
|
|
3486
|
+
onChange: onTokenChange,
|
|
3487
|
+
brandRoles: PALETTE_BRAND_ROLES,
|
|
3488
|
+
feedbackRoles: PALETTE_FEEDBACK_ROLES,
|
|
3489
|
+
surfaceRoles: PALETTE_SURFACE_ROLES,
|
|
3490
|
+
showContrastChecks: false,
|
|
3491
|
+
disabled
|
|
3492
|
+
})
|
|
3407
3493
|
}),
|
|
3408
|
-
|
|
3494
|
+
isCustom ? /* @__PURE__ */ jsx("div", {
|
|
3409
3495
|
className: "flex justify-end",
|
|
3410
3496
|
children: /* @__PURE__ */ jsx(Button, {
|
|
3411
3497
|
type: "button",
|
|
@@ -3447,6 +3533,13 @@ function PickerOption({ selected, label, description, swatch, onSelect, disabled
|
|
|
3447
3533
|
})
|
|
3448
3534
|
});
|
|
3449
3535
|
}
|
|
3536
|
+
function paletteApplyPlanErrorMessage(error) {
|
|
3537
|
+
switch (error) {
|
|
3538
|
+
case "invalid-palette-state": return "Palette details are unavailable. Refresh and try again.";
|
|
3539
|
+
case "curated-palette-missing": return "This curated palette is no longer available. Refresh and try again.";
|
|
3540
|
+
default: return assertNever$1(error);
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3450
3543
|
function classifyStyleApplyError(error) {
|
|
3451
3544
|
if (isRecord(error)) {
|
|
3452
3545
|
const status = error.status;
|
|
@@ -3461,6 +3554,16 @@ function classifyStyleApplyError(error) {
|
|
|
3461
3554
|
message: error instanceof Error ? error.message : "Unable to apply your selection."
|
|
3462
3555
|
};
|
|
3463
3556
|
}
|
|
3557
|
+
function expandedRowForPreviewDesignRow(row) {
|
|
3558
|
+
switch (row) {
|
|
3559
|
+
case "header": return "header-layout";
|
|
3560
|
+
case "header-layout":
|
|
3561
|
+
case "header-style":
|
|
3562
|
+
case "footer-layout":
|
|
3563
|
+
case "footer": return row;
|
|
3564
|
+
default: return assertNever$1(row, "Unhandled preview design row");
|
|
3565
|
+
}
|
|
3566
|
+
}
|
|
3464
3567
|
function isRecord(value) {
|
|
3465
3568
|
return typeof value === "object" && value !== null;
|
|
3466
3569
|
}
|
|
@@ -3479,27 +3582,6 @@ function WarningNotice({ warnings, onDismiss }) {
|
|
|
3479
3582
|
})]
|
|
3480
3583
|
});
|
|
3481
3584
|
}
|
|
3482
|
-
function NoticeBanner({ notices, onDismiss }) {
|
|
3483
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
3484
|
-
role: "status",
|
|
3485
|
-
className: "rounded-md border border-muted-foreground/20 bg-muted/40 px-3 py-2 text-xs",
|
|
3486
|
-
children: [/* @__PURE__ */ jsx("ul", {
|
|
3487
|
-
className: "space-y-1",
|
|
3488
|
-
children: notices.map((notice, index) => /* @__PURE__ */ jsx("li", { children: describeNotice(notice) }, `${notice.kind}-${index}`))
|
|
3489
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
3490
|
-
type: "button",
|
|
3491
|
-
onClick: onDismiss,
|
|
3492
|
-
className: "mt-2 underline",
|
|
3493
|
-
children: "Dismiss"
|
|
3494
|
-
})]
|
|
3495
|
-
});
|
|
3496
|
-
}
|
|
3497
|
-
function describeNotice(notice) {
|
|
3498
|
-
switch (notice.kind) {
|
|
3499
|
-
case "palette-overrides-hidden": return "Custom colours are saved for the previous palette.";
|
|
3500
|
-
case "palette-overrides-restored": return "Custom colours restored for this palette.";
|
|
3501
|
-
}
|
|
3502
|
-
}
|
|
3503
3585
|
function describeWarning(warning) {
|
|
3504
3586
|
switch (warning.kind) {
|
|
3505
3587
|
case "rejected-personality": return `Button style changed to ${warning.fellBackTo} because ${warning.requested} is not offered for this site style.`;
|
|
@@ -3510,7 +3592,7 @@ function describeWarning(warning) {
|
|
|
3510
3592
|
}
|
|
3511
3593
|
//#endregion
|
|
3512
3594
|
//#region ../preview-next/src/client/preview/PreviewEditorSidebar.tsx
|
|
3513
|
-
function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, themeSelectionPaletteVariantId = null, themeSelectionPaletteOverrides = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionTypographyPresetId = null, themeSelectionTypographyBodyFontOverride = null, themeSelectionTypographyHeadingFontOverride = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest = null, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
3595
|
+
function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, runtimePaletteState = null, themeSelectionPaletteVariantId = null, themeSelectionPaletteOverrides = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionTypographyPresetId = null, themeSelectionTypographyBodyFontOverride = null, themeSelectionTypographyHeadingFontOverride = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest = null, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
3514
3596
|
const controller = useEntryController();
|
|
3515
3597
|
const controllerBlocks = controller.blocks;
|
|
3516
3598
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -3601,6 +3683,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
3601
3683
|
});
|
|
3602
3684
|
const editorPanel = entryData ? /* @__PURE__ */ jsx(EntryEditorPanel, {
|
|
3603
3685
|
siteId,
|
|
3686
|
+
dashboardBaseUrl,
|
|
3604
3687
|
entryData,
|
|
3605
3688
|
contentTypeSchema,
|
|
3606
3689
|
referenceContentTypeKeys,
|
|
@@ -3625,6 +3708,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
3625
3708
|
}) : pageId ? /* @__PURE__ */ jsx(PageBlockEditorPanel, {
|
|
3626
3709
|
siteId,
|
|
3627
3710
|
pageId,
|
|
3711
|
+
dashboardBaseUrl,
|
|
3628
3712
|
theme,
|
|
3629
3713
|
apiClient,
|
|
3630
3714
|
bearerToken,
|
|
@@ -3634,6 +3718,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
3634
3718
|
blockEditorRef,
|
|
3635
3719
|
onBlocksChange: handleBlocksChange,
|
|
3636
3720
|
metadataPanel: metadataSectionContent,
|
|
3721
|
+
designOpenRequestId: designRowRequest?.id ?? null,
|
|
3637
3722
|
designPanel: canInspectSiteStyle(siteStyleAccess) ? /* @__PURE__ */ jsx(StyleConfigurator, {
|
|
3638
3723
|
siteId,
|
|
3639
3724
|
apiClient,
|
|
@@ -3646,6 +3731,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
3646
3731
|
selectionVersion: themeSelectionVersion,
|
|
3647
3732
|
selectionUpdatedAt: themeSelectionUpdatedAt,
|
|
3648
3733
|
buttonPersonalityId: themeSelectionButtonPersonalityId,
|
|
3734
|
+
runtimePaletteState,
|
|
3649
3735
|
paletteVariantId: themeSelectionPaletteVariantId,
|
|
3650
3736
|
paletteOverrides: themeSelectionPaletteOverrides,
|
|
3651
3737
|
headerLayoutId: themeSelectionHeaderLayoutId,
|