@riverbankcms/sdk 0.109.0 → 0.111.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/dist/{PreviewEditorSidebar-DWqwfy3_.mjs → PreviewEditorSidebar-CTR6LUhN.mjs} +178 -117
- package/dist/{PreviewEditorUI-B7OL4sfR.mjs → PreviewEditorUI-DZg15Zip.mjs} +3 -4
- package/dist/{PreviewQueryProvider-D0y2l8JN.mjs → PreviewQueryProvider-kkmjklLG.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-D8Gt9Gbe.mjs → SdkPreviewModeRuntime-DeOTAFvR.mjs} +229 -219
- package/dist/{SiteChromeCustomizeContext-DUpalEdL.mjs → SiteChromeCustomizeContext-DOSDLCiJ.mjs} +1695 -2169
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1716 -76
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -5
- package/dist/_dts/api/src/contentRuntime.d.ts +4 -1
- package/dist/_dts/api/src/courses.d.ts +30 -15
- package/dist/_dts/api/src/endpoints.d.ts +14 -4
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/sdkContracts.d.ts +23 -11
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteOperations.d.ts +11 -19
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -6
- package/dist/_dts/api/src/webhooks.d.ts +98 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +3 -0
- package/dist/_dts/blocks/src/client/course-registration.d.ts +4 -1
- package/dist/_dts/blocks/src/client.d.ts +4 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -4
- package/dist/_dts/blocks/src/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +2 -4
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/single-button.d.ts +2 -1
- package/dist/_dts/blocks/src/system/constants/buttonRoles.d.ts +35 -0
- package/dist/_dts/blocks/src/system/fields/button.d.ts +10 -21
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +2 -1
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +9 -5
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +18 -18
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +9 -9
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/buttonAffordance.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/ErrorStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/PaymentFailedStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/types.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.contract.d.ts +326 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.planning.d.ts +27 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/file-download.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +6 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +7 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +2 -1
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +4 -2
- package/dist/_dts/content-editor/src/index.d.ts +12 -12
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +17 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +221 -53
- package/dist/_dts/editor-blocks/src/widgets/button/context.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/index.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +16 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignOpenRequestContext.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +5 -11
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +5 -6
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -7
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +7 -9
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +4 -11
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +7 -7
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +0 -8
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +1 -11
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +1 -5
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +3 -5
- package/dist/_dts/sdk/src/bookings/index.d.ts +5 -4
- package/dist/_dts/sdk/src/bookings/types.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +3 -2
- package/dist/_dts/sdk/src/client/management/types.d.ts +2 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -15
- package/dist/_dts/sdk/src/public-api/contracts.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 +3 -3
- package/dist/_dts/site-commands/src/commands.d.ts +129 -6
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +80 -0
- package/dist/_dts/theme-core/src/buttons/styles/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.d.ts +49 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/quietArrow.d.ts +67 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +649 -0
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +753 -0
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +69 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +26 -24
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +19 -153
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -1
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +8 -9
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +4 -4
- package/dist/_dts/ui/src/palette/hex.d.ts +3 -3
- package/dist/cli/index.mjs +1760 -1914
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +1 -1
- package/dist/client/{DiscountCodeDisclosure-DU1ygxU2.mjs → DiscountCodeDisclosure-C4xvTBux.mjs} +1 -1
- package/dist/client/{EventCombined.client-DB5zagCo.mjs → EventCombined.client-Cr7G131j.mjs} +2 -3
- package/dist/client/{EventListing.client-CTX9JHBL.mjs → EventListing.client-CAjbseNy.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BYImhgiB.mjs → LeafletStaticMap-BMlWfwz3.mjs} +1 -1
- package/dist/client/{MagicLinkForm-CRkw_M3l.mjs → MagicLinkForm-ChdFz96y.mjs} +1 -2
- package/dist/client/{StepIndicator-BnmVBJJh.mjs → StepIndicator-7D3GaBeM.mjs} +2 -2
- package/dist/client/{accordion-CeGreumd.mjs → accordion-D8JTs2Si.mjs} +1 -1
- package/dist/client/{bookingForm-CSzFNrpN.mjs → bookingForm-H3DCRBHs.mjs} +6 -7
- package/dist/client/bookings.mjs +3069 -1447
- package/dist/client/{carousel-B2jDtogf.mjs → carousel-DMr_QWlz.mjs} +1 -1
- package/dist/client/{cart-D-jZ-vaY.mjs → cart-DWMbfBdR.mjs} +3 -3
- package/dist/client/{checkout-Dza-LA7N.mjs → checkout-zmfdkXLx.mjs} +3 -3
- package/dist/client/client.mjs +1732 -1913
- package/dist/client/{colorStyles-CrgzoXsm.mjs → colorStyles-gcTh5yZT.mjs} +2 -12
- package/dist/client/{colorTokenParts-CMugwvX_.mjs → colorTokenParts-FSS3al6l.mjs} +31 -1
- package/dist/client/{courseRegistration-TYkNychb.mjs → courseRegistration-Z_mn18jy.mjs} +100 -37
- package/dist/client/{eventCalendar-BI_90SsT.mjs → eventCalendar-CYp0YJGF.mjs} +4 -5
- package/dist/client/{eventCombined-mNrpryE9.mjs → eventCombined-rKyYZUa9.mjs} +2 -2
- package/dist/client/{eventDetails-D4GVlCIY.mjs → eventDetails-X0ZaUuMj.mjs} +3 -3
- package/dist/client/{eventListing-YhKN018y.mjs → eventListing-W1SuL7EP.mjs} +2 -2
- package/dist/client/{eventRegistration-CdHGtilr.mjs → eventRegistration-ClWricui.mjs} +6 -7
- package/dist/client/{form-AcAL45rA.mjs → form--eKPwAAD.mjs} +1 -2
- package/dist/client/{headerSection-uEC52ueD.mjs → headerSection-BSeGr-FS.mjs} +2 -3
- package/dist/client/hooks.mjs +1554 -1871
- package/dist/client/{locationMap-_wJDSUYe.mjs → locationMap-BpOrtNYn.mjs} +8 -5
- package/dist/client/{media-BK0O3b-U.mjs → media-DoF0dcVx.mjs} +2 -2
- package/dist/client/{newsletterForm-DrArsb2B.mjs → newsletterForm-Bt7it7Dy.mjs} +1 -2
- package/dist/client/{pricing-BSYVghwo.mjs → pricing-BTjSDDr4.mjs} +1 -1
- package/dist/client/{productDetail-Dyk90sMs.mjs → productDetail-ICnVTcCg.mjs} +3 -3
- package/dist/client/{productList-BCKThwAI.mjs → productList-ZHr6D604.mjs} +3 -3
- package/dist/client/{propsDecoder-CkXxkdSR.mjs → propsDecoder-wWN0tBDF.mjs} +2351 -129
- package/dist/client/rendering/client.mjs +1664 -1824
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +1697 -1909
- package/dist/client/{shop-DeltVH10.mjs → shop-C1u_BUn0.mjs} +5 -6
- package/dist/client/{shop-commerce-BD9Jsm2Z.mjs → shop-commerce-CleZdRha.mjs} +5 -6
- package/dist/client/{shop-commerce-store-CmXD6FDS.mjs → shop-commerce-store-ycnoB2Ce.mjs} +1 -1
- package/dist/client/{shopShared-B8v-lH_F.mjs → shopShared-CPhByt2a.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-DbWJN8ld.mjs → useDiscountCodeUi-cStSQI6C.mjs} +1 -1
- package/dist/client/{useEventFilters-EJIMUnqT.mjs → useEventFilters-DKPN7hSY.mjs} +26 -27
- package/dist/client/{usePolling-Cmh14fc7.mjs → usePolling-BKAd6pkZ.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +37 -6
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +37 -6
- package/dist/{previewAuthStore-CTO7CRPk.mjs → previewAuthStore-BkT1D06A.mjs} +37 -6
- package/dist/{sdk-runtime-Dou0GAav.mjs → sdk-runtime-hu3wr3ng.mjs} +2 -2
- package/dist/{separator-CI5wZNXT.mjs → separator-Bln8izQ9.mjs} +1 -1
- package/dist/server/components.mjs +1472 -1788
- package/dist/server/config-validation.mjs +1559 -1876
- package/dist/server/config.mjs +1559 -1876
- package/dist/server/data.mjs +1554 -1871
- package/dist/server/index.mjs +38 -7
- package/dist/server/next/revalidate.mjs +53 -1
- package/dist/server/next.mjs +1584 -1869
- package/dist/server/page-converter.mjs +1543 -1860
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1472 -1788
- package/dist/server/rendering.mjs +1472 -1788
- package/dist/server/routing.mjs +1600 -1891
- package/dist/server/server.mjs +1574 -1860
- package/dist/server/theme-bridge.mjs +1436 -1619
- package/dist/server/theme.mjs +1345 -1241
- package/dist/server/webhooks.mjs +54 -2
- package/package.json +1 -1
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/earth-pill.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/flat-ink.d.ts +0 -20
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +0 -172
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/joy-stamp.d.ts +0 -22
- package/dist/_dts/theme-core/src/buttons/personalities/ornate-ritual.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/quiet-arrow.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/showtime-pill.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +0 -285
- package/dist/client/buttons-DoFV7KDL.mjs +0 -2115
- package/dist/client/foregroundContract-xICPq59x.mjs +0 -31
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $
|
|
3
|
-
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import { C as
|
|
5
|
-
import { t as Separator } from "./separator-
|
|
6
|
-
import React, { forwardRef, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
2
|
+
import { $t as createStoreBackend, A as dismissWarnings, Ad as assertNever$1, B as previewCuratedPalette, Bf as Check, Bi as getCuratedSiteStyle, Bt as deriveRouteMetadataPresentation, C as applyResolvedSelections, Ca as curatedPalettes, Cu as CollapsibleTrigger, D as createPalette, Da as paletteColorsEqual, E as committedPaletteForSnapshot, Ea as paletteColorEntries, Et as useEditorUiStoreInstance, F as openRow, Fu as DropdownMenuItem, G as previewSiteStyle, Gd as X$1, H as previewHeaderLayout, Ht as resolveContentTitle, I as paletteMutationCapability, Iu as DropdownMenuLabel, J as setPaletteColors, Jl as SelectContent, Jt as ManifestForm, K as reconcilePaletteLibraryActive, L as palettePreviewProjection, Lf as ChevronRight, Lu as DropdownMenuSeparator, M as markApplyFailed, Mu as Surface, N as markApplySaved, Nu as DropdownMenu, O as createStyleConfiguratorState, Oa as paletteColorsSchema, P as markApplySaving, Pu as DropdownMenuContent, R as prepareStalePaletteRetry, Rf as ChevronLeft, Ri as curatedSiteStyles, Ru as DropdownMenuTrigger, St as useEntryController, Su as CollapsibleContent, T as cancelPreview, Ta as buildPaletteLibraryReadModel, Tt as useEditorUiStore, U as previewHeaderStyle, V as previewFooterLook, Vt as resolvePageRouteSlug, W as previewSitePalette, X as syncStyleConfiguratorState, Xl as SelectTrigger, Xt as createManifestValidation, Y as styleConfiguratorHistoryEntryForPersistedSelection, Yl as SelectItem, Z as toggleRow, Zd as Tablet, Zl as SelectValue, Zt as FormRenderer, _ as planSiteChromeLookSelection, aa as getHeaderLayout, al as updateButtonStyleSelectionChoice, at as resolvePreviewSidebarTab, au as Tabs, b as usePreviewDesignCoordinator, c as selectionSnapshotFromApplySiteStyleSelectionResponse, cu as TabsTrigger, d as PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE, ed as Button, ef as Smartphone, eu as SearchInput, f as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, ff as Maximize2, g as cycleableSiteChromeOptions, h as cycleSiteChromeLookId, ia as findFooterLook, il as resolveButtonStyleSelection, it as createOptimisticActionRunner, iu as Input, j as isPreviewingChange, k as deriveStyleConfiguratorCapabilities, l as resolveStyleConfiguratorInitialSnapshot, ld as unsafeAsEditorBlockId, m as buildSiteChromeLookModels, n as useSiteChromeCustomizeOptional, nl as buttonStyleSelectionParameterValue, nu as PopoverContent, oa as getHeaderStyle, of as Plus, ol as buttonStyleSelectionKey, ot as FooterComposerPanel, ou as TabsContent, p as reportPreviewDesignError, pf as LoaderCircle, q as resetTypographyToSaved, ql as Select, rd as cn, rl as findButtonStyleRecipe, ru as PopoverTrigger, s as buildApplySiteStyleSelectionBody, su as TabsList, tf as SlidersHorizontal, tu as Popover, u as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, uf as Monitor, un as listEntryPageContentSlots, v as planSiteStylePreviewChange, vl as themeButtonClassName, vt as ContentFieldsForm, w as applyTypographyDraftPatch, wa as findCuratedPalette, xu as Collapsible, yt as useUISelector, z as previewButtonStyle } from "./SiteChromeCustomizeContext-DOSDLCiJ.mjs";
|
|
3
|
+
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-BkT1D06A.mjs";
|
|
4
|
+
import { C as generateFontFaceCss, D as Callout, O as CalloutDescription, S as buildFontPreviewUrl, T as ThemeScope, _ as useBlockCustomizeControls, b as BlockEditor, d as resolvePreviewDashboardSetupHandoff, f as resolvePreviewEditorGuidanceModel, g as usePreviewBlockCustomizeSelectionOptional, h as canInspectSiteStyle, m as canApplySiteStyle, p as resolvePreviewSidebarChromeModel, u as buildPreviewDashboardSetupUrl, v as PreviewFormProvider, w as getSiteFontsStorageUrl, x as isAdapterReferenceKind, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-DeOTAFvR.mjs";
|
|
5
|
+
import { t as Separator } from "./separator-Bln8izQ9.mjs";
|
|
6
|
+
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
9
9
|
import { useRouter } from "next/navigation.js";
|
|
@@ -1563,13 +1563,27 @@ function formatBlockKindLabel(blockKind) {
|
|
|
1563
1563
|
return blockKind.replace(/^block\./, "").replace(/^custom\./, "").replace(/[-_]+/g, " ");
|
|
1564
1564
|
}
|
|
1565
1565
|
//#endregion
|
|
1566
|
+
//#region ../preview-next/src/client/preview/PreviewDesignOpenRequestContext.tsx
|
|
1567
|
+
const PreviewDesignOpenRequestContext = createContext(null);
|
|
1568
|
+
function PreviewDesignOpenRequestProvider({ request, children }) {
|
|
1569
|
+
return /* @__PURE__ */ jsx(PreviewDesignOpenRequestContext.Provider, {
|
|
1570
|
+
value: request,
|
|
1571
|
+
children
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
function usePreviewDesignOpenRequest() {
|
|
1575
|
+
return useContext(PreviewDesignOpenRequestContext);
|
|
1576
|
+
}
|
|
1577
|
+
//#endregion
|
|
1566
1578
|
//#region ../preview-next/src/client/preview/PageBlockEditorPanel.tsx
|
|
1567
|
-
function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClient, bearerToken, supabaseUrl, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel,
|
|
1579
|
+
function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClient, bearerToken, supabaseUrl, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel, designTakeoverActive = false, sdkConfig, mediaAssets, bookingOfferingPresets, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1568
1580
|
const customizeSelection = usePreviewBlockCustomizeSelectionOptional();
|
|
1569
1581
|
const [designOpen, setDesignOpen] = useState(false);
|
|
1570
1582
|
const [customizeOpen, setCustomizeOpen] = useState(false);
|
|
1571
1583
|
const [contentOpen, setContentOpen] = useState(true);
|
|
1572
1584
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
1585
|
+
const pendingDesignOpenRequest = useUISelector(uiStoreForBlockEditor, (state) => state.previewDesignOpenRequest);
|
|
1586
|
+
const [designOpenRequest, setDesignOpenRequest] = useState(null);
|
|
1573
1587
|
const designSectionRef = useRef(null);
|
|
1574
1588
|
const customizeSectionRef = useRef(null);
|
|
1575
1589
|
const selectionKind = customizeSelection?.selection.kind;
|
|
@@ -1598,13 +1612,15 @@ function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClie
|
|
|
1598
1612
|
}
|
|
1599
1613
|
}, [selectionKind, selectionRequestId]);
|
|
1600
1614
|
useEffect(() => {
|
|
1601
|
-
if (
|
|
1615
|
+
if (!pendingDesignOpenRequest) return;
|
|
1616
|
+
setDesignOpenRequest(pendingDesignOpenRequest);
|
|
1602
1617
|
setDesignOpen(true);
|
|
1603
1618
|
designSectionRef.current?.scrollIntoView({
|
|
1604
1619
|
block: "start",
|
|
1605
1620
|
behavior: "smooth"
|
|
1606
1621
|
});
|
|
1607
|
-
|
|
1622
|
+
uiStoreForBlockEditor.getState().consumePreviewDesignOpenRequest(pendingDesignOpenRequest.requestId);
|
|
1623
|
+
}, [pendingDesignOpenRequest, uiStoreForBlockEditor]);
|
|
1608
1624
|
return /* @__PURE__ */ jsxs("div", {
|
|
1609
1625
|
className: "flex h-full min-h-0 flex-col overflow-hidden",
|
|
1610
1626
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -1661,7 +1677,10 @@ function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClie
|
|
|
1661
1677
|
className: designTakeoverActive ? "min-h-0 flex-1 data-[state=open]:h-full data-[state=open]:overflow-hidden" : void 0,
|
|
1662
1678
|
children: /* @__PURE__ */ jsx("div", {
|
|
1663
1679
|
className: designTakeoverActive ? "h-full min-h-0" : "px-4 pb-4",
|
|
1664
|
-
children:
|
|
1680
|
+
children: /* @__PURE__ */ jsx(PreviewDesignOpenRequestProvider, {
|
|
1681
|
+
request: designOpenRequest,
|
|
1682
|
+
children: designPanel
|
|
1683
|
+
})
|
|
1665
1684
|
})
|
|
1666
1685
|
})]
|
|
1667
1686
|
})
|
|
@@ -1794,8 +1813,8 @@ function PreviewEditorGuidanceCard({ guidance, completeSetupDisabled, onComplete
|
|
|
1794
1813
|
* Hex colour helpers shared by every palette-editing surface (Macadamia
|
|
1795
1814
|
* onboarding swatches, the LiveThemeEditor, the Style configurator advanced
|
|
1796
1815
|
* row). Consolidates three prior duplicates: `normalizeColorPickerValue` in
|
|
1797
|
-
* Macadamia, `normalizeHex` + `contrastRatio` in
|
|
1798
|
-
* the inline regex in `updateColorRole`.
|
|
1816
|
+
* Macadamia, `normalizeHex` + `contrastRatio` formerly in
|
|
1817
|
+
* `theme-editor/utils.ts`, and the inline regex in `updateColorRole`.
|
|
1799
1818
|
*
|
|
1800
1819
|
* Pure functions; no DOM, no React.
|
|
1801
1820
|
*/
|
|
@@ -1805,7 +1824,7 @@ function PreviewEditorGuidanceCard({ guidance, completeSetupDisabled, onComplete
|
|
|
1805
1824
|
* without a leading `#`; returns `fallback` for any other shape (empty
|
|
1806
1825
|
* string, garbage, characters outside `[0-9a-f]`, wrong length, etc.). Pass
|
|
1807
1826
|
* a `fallback` to make the fallback explicit at the call site — defaulting
|
|
1808
|
-
* to `'#000000'`
|
|
1827
|
+
* to `'#000000'` preserves the former theme-editor helper semantics.
|
|
1809
1828
|
*/
|
|
1810
1829
|
function normalizeHex(input, fallback = "#000000") {
|
|
1811
1830
|
if (!input) return fallback;
|
|
@@ -2078,6 +2097,102 @@ function ContrastSwatch({ hex, label }) {
|
|
|
2078
2097
|
});
|
|
2079
2098
|
}
|
|
2080
2099
|
//#endregion
|
|
2100
|
+
//#region ../preview-next/src/client/preview/ButtonStylePicker.tsx
|
|
2101
|
+
function ButtonStylePicker({ selections, current, previewTheme, onPreview, disabled }) {
|
|
2102
|
+
const recipe = findButtonStyleRecipe(current.styleId);
|
|
2103
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2104
|
+
className: "space-y-3",
|
|
2105
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
2106
|
+
role: "radiogroup",
|
|
2107
|
+
"aria-label": "Button style",
|
|
2108
|
+
className: "grid grid-cols-1 gap-2",
|
|
2109
|
+
children: selections.map((selection) => {
|
|
2110
|
+
const optionRecipe = findButtonStyleRecipe(selection.styleId);
|
|
2111
|
+
const selected = selection.styleId === current.styleId;
|
|
2112
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
2113
|
+
className: cn("relative block cursor-pointer rounded-md border p-2 transition has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2", selected ? "border-foreground bg-accent/40 shadow-sm" : "border-border bg-background hover:border-foreground/40 hover:bg-accent/20", disabled && "cursor-not-allowed opacity-60"),
|
|
2114
|
+
children: [
|
|
2115
|
+
/* @__PURE__ */ jsx("input", {
|
|
2116
|
+
type: "radio",
|
|
2117
|
+
name: "button-style",
|
|
2118
|
+
value: selection.styleId,
|
|
2119
|
+
checked: selected,
|
|
2120
|
+
onChange: () => onPreview(selection),
|
|
2121
|
+
disabled,
|
|
2122
|
+
className: "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed"
|
|
2123
|
+
}),
|
|
2124
|
+
/* @__PURE__ */ jsx("span", {
|
|
2125
|
+
className: "sr-only",
|
|
2126
|
+
children: optionRecipe.accessibilityLabel
|
|
2127
|
+
}),
|
|
2128
|
+
/* @__PURE__ */ jsx(ButtonStylePreviewPair, {
|
|
2129
|
+
selection: selected ? current : selection,
|
|
2130
|
+
previewTheme
|
|
2131
|
+
})
|
|
2132
|
+
]
|
|
2133
|
+
}, buttonStyleSelectionKey(selection));
|
|
2134
|
+
})
|
|
2135
|
+
}), recipe.controls.map((control) => {
|
|
2136
|
+
const currentValue = buttonStyleSelectionParameterValue(current, control.parameter);
|
|
2137
|
+
return /* @__PURE__ */ jsxs("fieldset", {
|
|
2138
|
+
className: "space-y-2 rounded-md border border-border p-3",
|
|
2139
|
+
disabled,
|
|
2140
|
+
children: [/* @__PURE__ */ jsx("legend", {
|
|
2141
|
+
className: "px-1 text-xs font-medium",
|
|
2142
|
+
children: control.label
|
|
2143
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
2144
|
+
className: "grid grid-cols-2 gap-2",
|
|
2145
|
+
children: control.options.map((option) => /* @__PURE__ */ jsxs("label", {
|
|
2146
|
+
className: cn("relative cursor-pointer rounded-md border px-2 py-1.5 text-center text-xs has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2", currentValue === option.value ? "border-foreground bg-accent/40" : "border-border hover:border-foreground/40"),
|
|
2147
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
2148
|
+
type: "radio",
|
|
2149
|
+
name: `button-style-${current.styleId}-${control.parameter}`,
|
|
2150
|
+
value: option.value,
|
|
2151
|
+
checked: currentValue === option.value,
|
|
2152
|
+
onChange: () => {
|
|
2153
|
+
const updated = updateButtonStyleSelectionChoice(current, control.parameter, option.value);
|
|
2154
|
+
if (updated.kind === "updated") onPreview(updated.selection);
|
|
2155
|
+
},
|
|
2156
|
+
className: "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed"
|
|
2157
|
+
}), option.label]
|
|
2158
|
+
}, option.value))
|
|
2159
|
+
})]
|
|
2160
|
+
}, control.parameter);
|
|
2161
|
+
})]
|
|
2162
|
+
});
|
|
2163
|
+
}
|
|
2164
|
+
function ButtonStylePreviewPair({ selection, previewTheme, compact = false }) {
|
|
2165
|
+
const resolved = resolveButtonStyleSelection(selection);
|
|
2166
|
+
if (resolved.kind === "error") return null;
|
|
2167
|
+
return /* @__PURE__ */ jsx(ThemeScope, {
|
|
2168
|
+
theme: {
|
|
2169
|
+
...previewTheme,
|
|
2170
|
+
buttons: resolved.buttonSystem
|
|
2171
|
+
},
|
|
2172
|
+
themeId: `button-style-preview-${encodeURIComponent(buttonStyleSelectionKey(selection))}`,
|
|
2173
|
+
className: cn("relative overflow-hidden bg-transparent", compact ? "h-7" : "h-11"),
|
|
2174
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
2175
|
+
className: cn("absolute left-0 top-1/2 flex w-[142%] -translate-y-1/2 origin-left items-center gap-2", compact ? "scale-[0.56]" : "scale-[0.7]"),
|
|
2176
|
+
"aria-hidden": "true",
|
|
2177
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2178
|
+
className: themeButtonClassName({
|
|
2179
|
+
variant: "primary",
|
|
2180
|
+
size: "sm",
|
|
2181
|
+
extraClassName: "inline-flex shrink-0 items-center justify-center whitespace-nowrap"
|
|
2182
|
+
}),
|
|
2183
|
+
children: "Get started"
|
|
2184
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2185
|
+
className: themeButtonClassName({
|
|
2186
|
+
variant: "secondary",
|
|
2187
|
+
size: "sm",
|
|
2188
|
+
extraClassName: "inline-flex shrink-0 items-center justify-center whitespace-nowrap"
|
|
2189
|
+
}),
|
|
2190
|
+
children: "Learn more"
|
|
2191
|
+
})]
|
|
2192
|
+
})
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2195
|
+
//#endregion
|
|
2081
2196
|
//#region ../preview-next/src/client/preview/typographyFontCatalog.ts
|
|
2082
2197
|
const typographyFontCategories = [
|
|
2083
2198
|
{
|
|
@@ -3092,7 +3207,8 @@ const PALETTE_SURFACE_ROLES = [
|
|
|
3092
3207
|
label: "Border"
|
|
3093
3208
|
}
|
|
3094
3209
|
];
|
|
3095
|
-
function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVersion = null, selectionUpdatedAt, initialSelections, headerSelectionContext,
|
|
3210
|
+
function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVersion = null, selectionUpdatedAt, initialSelections, headerSelectionContext, onFocusedSurfaceChange, siteStyleAccess }) {
|
|
3211
|
+
const designOpenRequest = usePreviewDesignOpenRequest();
|
|
3096
3212
|
const router = useRouter();
|
|
3097
3213
|
const previewDesign = usePreviewDesignCoordinator();
|
|
3098
3214
|
const siteChromeCustomize = useSiteChromeCustomizeOptional();
|
|
@@ -3106,10 +3222,8 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3106
3222
|
selectionVersion: initialSelections.selectionVersion ?? selectionVersion ?? 0,
|
|
3107
3223
|
selectionUpdatedAt: initialSelections.selectionUpdatedAt ?? selectionUpdatedAt ?? null
|
|
3108
3224
|
},
|
|
3109
|
-
headerSelectionContext
|
|
3110
|
-
footerSelectionContext
|
|
3225
|
+
headerSelectionContext
|
|
3111
3226
|
}), [
|
|
3112
|
-
footerSelectionContext,
|
|
3113
3227
|
headerSelectionContext,
|
|
3114
3228
|
theme,
|
|
3115
3229
|
initialSelections,
|
|
@@ -3170,8 +3284,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3170
3284
|
siteStyle,
|
|
3171
3285
|
selection: state.previewed,
|
|
3172
3286
|
baseTheme: theme,
|
|
3173
|
-
headerSelectionContext
|
|
3174
|
-
footerSelectionContext
|
|
3287
|
+
headerSelectionContext
|
|
3175
3288
|
}).themeOverlay, "site-style");
|
|
3176
3289
|
}, [
|
|
3177
3290
|
state,
|
|
@@ -3179,7 +3292,6 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3179
3292
|
clearPreview,
|
|
3180
3293
|
previewTheme,
|
|
3181
3294
|
headerSelectionContext,
|
|
3182
|
-
footerSelectionContext,
|
|
3183
3295
|
theme
|
|
3184
3296
|
]);
|
|
3185
3297
|
useEffect(() => {
|
|
@@ -3190,14 +3302,14 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3190
3302
|
};
|
|
3191
3303
|
}, []);
|
|
3192
3304
|
useEffect(() => {
|
|
3193
|
-
if (!
|
|
3194
|
-
if (appliedExpandedRowRequestIdRef.current ===
|
|
3305
|
+
if (!designOpenRequest) return;
|
|
3306
|
+
if (appliedExpandedRowRequestIdRef.current === designOpenRequest.requestId) return;
|
|
3195
3307
|
setState((current) => {
|
|
3196
3308
|
if (!current) return current;
|
|
3197
|
-
appliedExpandedRowRequestIdRef.current =
|
|
3198
|
-
return openRow(current, expandedRowForPreviewDesignRow(
|
|
3309
|
+
appliedExpandedRowRequestIdRef.current = designOpenRequest.requestId;
|
|
3310
|
+
return openRow(current, expandedRowForPreviewDesignRow(designOpenRequest.row));
|
|
3199
3311
|
});
|
|
3200
|
-
}, [
|
|
3312
|
+
}, [designOpenRequest, hasLoadedState]);
|
|
3201
3313
|
const handlePreviewSiteStyle = useCallback((siteStyleId) => {
|
|
3202
3314
|
setState((current) => {
|
|
3203
3315
|
if (!current) return current;
|
|
@@ -3208,8 +3320,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3208
3320
|
siteStyle,
|
|
3209
3321
|
selection: next.previewed,
|
|
3210
3322
|
baseTheme: theme,
|
|
3211
|
-
headerSelectionContext
|
|
3212
|
-
footerSelectionContext
|
|
3323
|
+
headerSelectionContext
|
|
3213
3324
|
});
|
|
3214
3325
|
return applyResolvedSelections(next, {
|
|
3215
3326
|
resolved: {
|
|
@@ -3219,13 +3330,9 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3219
3330
|
warnings: result.warnings
|
|
3220
3331
|
});
|
|
3221
3332
|
});
|
|
3222
|
-
}, [
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
theme
|
|
3226
|
-
]);
|
|
3227
|
-
const handlePreviewPersonality = useCallback((id) => {
|
|
3228
|
-
setState((current) => current ? previewButtonPersonality(current, id) : current);
|
|
3333
|
+
}, [headerSelectionContext, theme]);
|
|
3334
|
+
const handlePreviewButtonStyle = useCallback((id) => {
|
|
3335
|
+
setState((current) => current ? previewButtonStyle(current, id) : current);
|
|
3229
3336
|
}, []);
|
|
3230
3337
|
const handlePreviewHeaderLayout = useCallback((id) => {
|
|
3231
3338
|
if (!id) return;
|
|
@@ -3243,25 +3350,6 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3243
3350
|
if (plan.kind !== "footer") return;
|
|
3244
3351
|
setState((current) => current ? previewFooterLook(current, plan.next.footerLookId) : current);
|
|
3245
3352
|
}, []);
|
|
3246
|
-
const handlePreviewFooterLayout = useCallback((id) => {
|
|
3247
|
-
if (!id) return;
|
|
3248
|
-
setState((current) => {
|
|
3249
|
-
if (!current) return current;
|
|
3250
|
-
const siteStyle = getCuratedSiteStyle(current.previewed.siteStyleId);
|
|
3251
|
-
if (!siteStyle) return current;
|
|
3252
|
-
const models = buildSiteChromeLookModels({
|
|
3253
|
-
state: current,
|
|
3254
|
-
siteStyle,
|
|
3255
|
-
headerSelectionContext,
|
|
3256
|
-
footerSelectionContext
|
|
3257
|
-
});
|
|
3258
|
-
const nextLookId = planSiteChromeFooterLayoutSelection({
|
|
3259
|
-
layoutId: id,
|
|
3260
|
-
currentLookId: current.previewed.footerLookId ?? models.footer.renderedLookId
|
|
3261
|
-
});
|
|
3262
|
-
return nextLookId ? previewFooterLook(current, nextLookId) : current;
|
|
3263
|
-
});
|
|
3264
|
-
}, [footerSelectionContext, headerSelectionContext]);
|
|
3265
3353
|
const handlePreviewPaletteItem = useCallback((item) => {
|
|
3266
3354
|
setState((current) => {
|
|
3267
3355
|
if (!current) return current;
|
|
@@ -3289,15 +3377,10 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3289
3377
|
siteStyle,
|
|
3290
3378
|
selection: current.previewed,
|
|
3291
3379
|
baseTheme: theme,
|
|
3292
|
-
headerSelectionContext
|
|
3293
|
-
footerSelectionContext
|
|
3380
|
+
headerSelectionContext
|
|
3294
3381
|
}).themeOverlay.typography, patch);
|
|
3295
3382
|
});
|
|
3296
|
-
}, [
|
|
3297
|
-
footerSelectionContext,
|
|
3298
|
-
headerSelectionContext,
|
|
3299
|
-
theme
|
|
3300
|
-
]);
|
|
3383
|
+
}, [headerSelectionContext, theme]);
|
|
3301
3384
|
const handleHeadingTypographyChange = useCallback((patch) => {
|
|
3302
3385
|
patchTypography({
|
|
3303
3386
|
kind: "heading",
|
|
@@ -3416,7 +3499,6 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3416
3499
|
});
|
|
3417
3500
|
}, [
|
|
3418
3501
|
apiClient,
|
|
3419
|
-
footerSelectionContext,
|
|
3420
3502
|
headerSelectionContext,
|
|
3421
3503
|
applyFailed,
|
|
3422
3504
|
applyStarted,
|
|
@@ -3442,29 +3524,26 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3442
3524
|
className: "text-sm text-muted-foreground",
|
|
3443
3525
|
children: "This site uses a Site Style that cannot be configured here."
|
|
3444
3526
|
});
|
|
3445
|
-
const currentPersonality = findButtonPersonality(state.previewed.buttonPersonalityId);
|
|
3446
3527
|
const currentPalette = palettePreviewProjection(state.previewed.palette);
|
|
3447
3528
|
const paletteMutation = paletteMutationCapability(state);
|
|
3448
3529
|
const paletteControlsDisabled = saving || !stagedCapabilities.canPreviewStaged || paletteMutation.kind !== "editable";
|
|
3449
3530
|
const currentCuratedValueKey = currentPalette.kind === "curated" ? currentPalette.valueKey : currentPalette.kind === "curated-fork" ? currentPalette.sourceValueKey : null;
|
|
3450
3531
|
const currentCuratedPalette = currentCuratedValueKey ? findCuratedPalette(currentCuratedValueKey) : null;
|
|
3451
3532
|
const paletteIsCustom = currentPalette.kind !== "invalid" && (!currentCuratedPalette || currentPalette.mode !== currentCuratedPalette.mode || !paletteColorsEqual(currentPalette.colors, currentCuratedPalette.colors));
|
|
3452
|
-
const
|
|
3533
|
+
const currentPreviewPlan = planSiteStylePreviewChange({
|
|
3453
3534
|
siteStyle: currentSiteStyle,
|
|
3454
3535
|
selection: state.previewed,
|
|
3455
3536
|
baseTheme: theme,
|
|
3456
|
-
headerSelectionContext
|
|
3457
|
-
|
|
3458
|
-
|
|
3537
|
+
headerSelectionContext
|
|
3538
|
+
});
|
|
3539
|
+
const currentTypography = currentPreviewPlan.themeOverlay.typography;
|
|
3459
3540
|
const chromeLookModels = buildSiteChromeLookModels({
|
|
3460
3541
|
state,
|
|
3461
3542
|
siteStyle: currentSiteStyle,
|
|
3462
|
-
headerSelectionContext
|
|
3463
|
-
footerSelectionContext
|
|
3543
|
+
headerSelectionContext
|
|
3464
3544
|
});
|
|
3465
3545
|
const currentHeaderLayout = getHeaderLayout(state.previewed.headerLayoutId);
|
|
3466
3546
|
const currentHeaderStyle = getHeaderStyle(state.previewed.headerStyleId);
|
|
3467
|
-
const currentFooterLayout = getFooterLayout(chromeLookModels.footerLayout.renderedLayoutId);
|
|
3468
3547
|
const currentFooterLook = state.previewed.footerLookId ? findFooterLook(state.previewed.footerLookId) : findFooterLook(chromeLookModels.footer.renderedLookId);
|
|
3469
3548
|
const headerSurfaceState = siteChromeCustomize?.getSurfaceState("header") ?? { kind: "unavailable" };
|
|
3470
3549
|
if (state.expandedRow === "typography" && typographySurface.kind !== "overview") return /* @__PURE__ */ jsxs("div", {
|
|
@@ -3557,32 +3636,14 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3557
3636
|
}) : null
|
|
3558
3637
|
}),
|
|
3559
3638
|
/* @__PURE__ */ jsx(SiteChromeLookRow, {
|
|
3560
|
-
label: "Footer
|
|
3561
|
-
ariaLabel: "Footer
|
|
3562
|
-
defaultDescription: "
|
|
3563
|
-
expanded: state.expandedRow === "footer-layout",
|
|
3564
|
-
onToggle: () => handleToggleRow("footer-layout"),
|
|
3565
|
-
currentId: chromeLookModels.footerLayout.renderedLayoutId,
|
|
3566
|
-
currentLabel: currentFooterLayout?.label ?? chromeLookModels.footerLayout.renderedLayoutId,
|
|
3567
|
-
scopeDescription: "Changes the footer structure on every page.",
|
|
3568
|
-
options: chromeLookModels.footerLayout.options,
|
|
3569
|
-
diagnostics: [],
|
|
3570
|
-
onCycle: (direction) => {
|
|
3571
|
-
const next = cycleSiteChromeLookId(chromeLookModels.footerLayout.options, chromeLookModels.footerLayout.renderedLayoutId, direction);
|
|
3572
|
-
if (next !== void 0) handlePreviewFooterLayout(next);
|
|
3573
|
-
},
|
|
3574
|
-
onPreview: handlePreviewFooterLayout,
|
|
3575
|
-
disabled: aggregateMutationControlsDisabled
|
|
3576
|
-
}),
|
|
3577
|
-
/* @__PURE__ */ jsx(SiteChromeLookRow, {
|
|
3578
|
-
label: "Footer look",
|
|
3579
|
-
ariaLabel: "Footer look",
|
|
3580
|
-
defaultDescription: "Use the footer look chosen for this site style.",
|
|
3639
|
+
label: "Footer links",
|
|
3640
|
+
ariaLabel: "Footer link treatment",
|
|
3641
|
+
defaultDescription: "Use the footer link treatment chosen for this site style.",
|
|
3581
3642
|
expanded: state.expandedRow === "footer",
|
|
3582
3643
|
onToggle: () => handleToggleRow("footer"),
|
|
3583
3644
|
currentId: state.previewed.footerLookId,
|
|
3584
|
-
currentLabel: state.previewed.footerLookId ? currentFooterLook?.label ?? "Unknown footer
|
|
3585
|
-
scopeDescription: "Changes
|
|
3645
|
+
currentLabel: state.previewed.footerLookId ? currentFooterLook?.label ?? "Unknown footer link treatment" : `${currentFooterLook?.label ?? "Site style"} (default)`,
|
|
3646
|
+
scopeDescription: "Changes footer navigation links on every page.",
|
|
3586
3647
|
options: chromeLookModels.footer.options,
|
|
3587
3648
|
diagnostics: chromeLookModels.footer.diagnostics,
|
|
3588
3649
|
onCycle: (direction) => {
|
|
@@ -3592,13 +3653,13 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3592
3653
|
onPreview: handlePreviewFooterLook,
|
|
3593
3654
|
disabled: aggregateMutationControlsDisabled
|
|
3594
3655
|
}),
|
|
3595
|
-
/* @__PURE__ */ jsx(
|
|
3656
|
+
/* @__PURE__ */ jsx(ButtonStyleRow, {
|
|
3596
3657
|
expanded: state.expandedRow === "buttons",
|
|
3597
3658
|
onToggle: () => handleToggleRow("buttons"),
|
|
3598
3659
|
siteStyle: currentSiteStyle,
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
onPreview:
|
|
3660
|
+
current: state.previewed.buttonStyleSelection,
|
|
3661
|
+
previewTheme: currentPreviewPlan.themeOverlay,
|
|
3662
|
+
onPreview: handlePreviewButtonStyle,
|
|
3602
3663
|
disabled: aggregateMutationControlsDisabled
|
|
3603
3664
|
}),
|
|
3604
3665
|
/* @__PURE__ */ jsx(TypographyRow, {
|
|
@@ -3687,7 +3748,7 @@ function StyleConfiguratorSaveControls({ previewingChange, applyAllowed, saving,
|
|
|
3687
3748
|
}) : null
|
|
3688
3749
|
] });
|
|
3689
3750
|
}
|
|
3690
|
-
function StyleRowFrame({ label, currentLabel, swatch, expanded, onToggle, children }) {
|
|
3751
|
+
function StyleRowFrame({ label, currentLabel, currentSummary, swatch, expanded, onToggle, children }) {
|
|
3691
3752
|
return /* @__PURE__ */ jsx(Collapsible, {
|
|
3692
3753
|
open: expanded,
|
|
3693
3754
|
onOpenChange: onToggle,
|
|
@@ -3706,7 +3767,10 @@ function StyleRowFrame({ label, currentLabel, swatch, expanded, onToggle, childr
|
|
|
3706
3767
|
children: [/* @__PURE__ */ jsx("div", {
|
|
3707
3768
|
className: "text-xs uppercase tracking-wide text-muted-foreground",
|
|
3708
3769
|
children: label
|
|
3709
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
3770
|
+
}), currentSummary ? /* @__PURE__ */ jsx("div", {
|
|
3771
|
+
"aria-label": currentLabel,
|
|
3772
|
+
children: currentSummary
|
|
3773
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
3710
3774
|
className: "truncate text-sm font-medium",
|
|
3711
3775
|
children: currentLabel
|
|
3712
3776
|
})]
|
|
@@ -3745,23 +3809,23 @@ function SiteStyleRow({ expanded, onToggle, current, onPreview, disabled }) {
|
|
|
3745
3809
|
})
|
|
3746
3810
|
});
|
|
3747
3811
|
}
|
|
3748
|
-
function
|
|
3812
|
+
function ButtonStyleRow({ expanded, onToggle, siteStyle, current, previewTheme, onPreview, disabled }) {
|
|
3749
3813
|
return /* @__PURE__ */ jsx(StyleRowFrame, {
|
|
3750
3814
|
label: "Button style",
|
|
3751
|
-
currentLabel,
|
|
3815
|
+
currentLabel: findButtonStyleRecipe(current.styleId).accessibilityLabel,
|
|
3816
|
+
currentSummary: /* @__PURE__ */ jsx(ButtonStylePreviewPair, {
|
|
3817
|
+
selection: current,
|
|
3818
|
+
previewTheme,
|
|
3819
|
+
compact: true
|
|
3820
|
+
}),
|
|
3752
3821
|
expanded,
|
|
3753
3822
|
onToggle,
|
|
3754
|
-
children: /* @__PURE__ */ jsx(
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
label: personality.name,
|
|
3761
|
-
description: personality.description,
|
|
3762
|
-
onSelect: () => onPreview(personality.id),
|
|
3763
|
-
disabled
|
|
3764
|
-
}, personality.id))
|
|
3823
|
+
children: /* @__PURE__ */ jsx(ButtonStylePicker, {
|
|
3824
|
+
selections: siteStyle.buttonStyleChoices,
|
|
3825
|
+
current,
|
|
3826
|
+
previewTheme,
|
|
3827
|
+
onPreview,
|
|
3828
|
+
disabled
|
|
3765
3829
|
})
|
|
3766
3830
|
});
|
|
3767
3831
|
}
|
|
@@ -4197,7 +4261,6 @@ function expandedRowForPreviewDesignRow(row) {
|
|
|
4197
4261
|
case "header": return "header-layout";
|
|
4198
4262
|
case "header-layout":
|
|
4199
4263
|
case "header-style":
|
|
4200
|
-
case "footer-layout":
|
|
4201
4264
|
case "footer": return row;
|
|
4202
4265
|
default: return assertNever$1(row, "Unhandled preview design row");
|
|
4203
4266
|
}
|
|
@@ -4221,11 +4284,11 @@ function WarningNotice({ warnings, onDismiss }) {
|
|
|
4221
4284
|
});
|
|
4222
4285
|
}
|
|
4223
4286
|
function describeWarning(warning) {
|
|
4224
|
-
return `Button style changed to ${warning.fellBackTo} because ${warning.requested} is not offered for this site style.`;
|
|
4287
|
+
return `Button style changed to ${warning.fellBackTo.styleId} because ${warning.requested} is not offered for this site style.`;
|
|
4225
4288
|
}
|
|
4226
4289
|
//#endregion
|
|
4227
4290
|
//#region ../preview-next/src/client/preview/PreviewEditorSidebar.tsx
|
|
4228
|
-
function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null,
|
|
4291
|
+
function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonStyleSelection = null, runtimePaletteState, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
4229
4292
|
const controller = useEntryController();
|
|
4230
4293
|
const controllerBlocks = controller.blocks;
|
|
4231
4294
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -4352,7 +4415,6 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4352
4415
|
blockEditorRef,
|
|
4353
4416
|
onBlocksChange: handleBlocksChange,
|
|
4354
4417
|
metadataPanel: metadataSectionContent,
|
|
4355
|
-
designOpenRequestId: designRowRequest?.id ?? null,
|
|
4356
4418
|
designTakeoverActive,
|
|
4357
4419
|
designPanel: canInspectSiteStyle(siteStyleAccess) ? /* @__PURE__ */ jsx(StyleConfigurator, {
|
|
4358
4420
|
siteId,
|
|
@@ -4365,7 +4427,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4365
4427
|
initialSelections: {
|
|
4366
4428
|
selectionVersion: themeSelectionVersion,
|
|
4367
4429
|
selectionUpdatedAt: themeSelectionUpdatedAt,
|
|
4368
|
-
|
|
4430
|
+
buttonStyleSelection: themeSelectionButtonStyleSelection,
|
|
4369
4431
|
runtimePaletteState,
|
|
4370
4432
|
headerLayoutId: themeSelectionHeaderLayoutId,
|
|
4371
4433
|
headerStyleId: themeSelectionHeaderStyleId,
|
|
@@ -4373,8 +4435,6 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4373
4435
|
footerLookId: themeSelectionFooterLookId
|
|
4374
4436
|
},
|
|
4375
4437
|
headerSelectionContext: themeSelectionHeaderContext,
|
|
4376
|
-
footerSelectionContext: themeSelectionFooterContext,
|
|
4377
|
-
expandedRowRequest: designRowRequest,
|
|
4378
4438
|
onFocusedSurfaceChange: setDesignTakeoverActive,
|
|
4379
4439
|
siteStyleAccess
|
|
4380
4440
|
}) : null,
|
|
@@ -4407,6 +4467,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4407
4467
|
manageLinksHref: `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}/navigation`,
|
|
4408
4468
|
manageSettingsHref: `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}/settings`,
|
|
4409
4469
|
legalRegion: theme?.footer?.bottomBar?.enabled === true ? "separate" : "integrated",
|
|
4470
|
+
loadingFallback: /* @__PURE__ */ jsx(ContentSpinner, { className: "py-8" }),
|
|
4410
4471
|
initialTarget: previewInspection.kind === "footer-module" ? {
|
|
4411
4472
|
kind: "module",
|
|
4412
4473
|
moduleId: previewInspection.moduleId
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $
|
|
3
|
-
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import { E as FixedBottomSurface, a as usePreviewPageDesignEditorState, c as applyPreviewChromeSurfaceToElement, l as resolvePreviewChromeSurface, o as PREVIEW_CHROME_PORTAL_CLASS_NAME, s as PREVIEW_CHROME_THEME_CLASS_NAME
|
|
2
|
+
import { $d as Sparkles, Ct as useEntryEditorController, Df as EllipsisVertical, Et as useEditorUiStoreInstance, Fu as DropdownMenuItem, Hl as TooltipContent, It as useMultiAutosave, Jd as TriangleAlert, Nu as DropdownMenu, Pu as DropdownMenuContent, Ru as DropdownMenuTrigger, Tf as Eye, Tt as useEditorUiStore, Vl as Tooltip, Wl as TooltipTrigger, _t as useEditor, _u as DialogDescription, a as previewDesignHistoryDomainForCommand, af as Redo2, bu as DialogTitle, cf as PenLine, ed as Button, gu as DialogContent, i as usePreviewDesignHistoryOrder, lf as Palette, mu as Dialog, n as useSiteChromeCustomizeOptional, o as selectPreviewDesignHistoryDomain, pf as LoaderCircle, qd as Undo2, rd as cn, sf as Pencil, td as cva, wt as classifyHistoryShortcut, yu as DialogHeader, zf as ChevronDown } from "./SiteChromeCustomizeContext-DOSDLCiJ.mjs";
|
|
3
|
+
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-BkT1D06A.mjs";
|
|
4
|
+
import { E as FixedBottomSurface, a as usePreviewPageDesignEditorState, c as applyPreviewChromeSurfaceToElement, l as resolvePreviewChromeSurface, o as PREVIEW_CHROME_PORTAL_CLASS_NAME, s as PREVIEW_CHROME_THEME_CLASS_NAME } from "./SdkPreviewModeRuntime-DeOTAFvR.mjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState, useTransition } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -395,7 +395,6 @@ function usePreviewSidebarControls() {
|
|
|
395
395
|
uiStore.getState().setDrawerOpen(false);
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
|
-
setPreviewSidebarTab(tab);
|
|
399
398
|
uiStore.getState().setPreviewSidebarTab(tab);
|
|
400
399
|
uiStore.getState().setDrawerOpen(true);
|
|
401
400
|
}, [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as markPreviewAuthExpired, s as ApiRequestError } from "./previewAuthStore-
|
|
2
|
+
import { n as markPreviewAuthExpired, s as ApiRequestError } from "./previewAuthStore-BkT1D06A.mjs";
|
|
3
3
|
import { createContext, useContext, useRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { MutationCache, QueryCache, QueryClient, QueryClientProvider } from "@tanstack/react-query";
|