@riverbankcms/sdk 0.107.0 → 0.108.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-DpAbAl08.mjs → PreviewEditorSidebar-BBT-kZAM.mjs} +46 -11
- package/dist/{PreviewEditorUI-O7cn6Xxv.mjs → PreviewEditorUI-D69xNKT2.mjs} +10 -9
- package/dist/{PreviewQueryProvider-D0tnKl0t.mjs → PreviewQueryProvider-RRu7wyQ5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CVB7urtl.mjs → SdkPreviewModeRuntime-CuDjXH6o.mjs} +426 -72
- package/dist/{SiteChromeCustomizeContext-C_sizso-.mjs → SiteChromeCustomizeContext-BQUY2dEk.mjs} +3865 -544
- package/dist/_dts/ai/src/contracts/proposals.d.ts +3712 -220
- package/dist/_dts/api/src/blocks.d.ts +41 -7
- package/dist/_dts/api/src/bookingRecords.d.ts +180 -115
- package/dist/_dts/api/src/cache-tags.d.ts +3 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +19 -1
- package/dist/_dts/api/src/endpoints.d.ts +99 -0
- package/dist/_dts/api/src/footer-settings.d.ts +1 -0
- package/dist/_dts/api/src/footerSettings.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +5 -2
- package/dist/_dts/api/src/navigation/contracts.d.ts +3 -3
- package/dist/_dts/api/src/previewContentContract.d.ts +4 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +62 -0
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +143 -55
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +41 -1
- package/dist/_dts/blocks/src/primitives/layout/Section.d.ts +0 -1
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +9 -48
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +5 -0
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +2 -2
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/fragments/footerNav.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledContainer.d.ts +4 -4
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +3 -12
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -1
- package/dist/_dts/blocks/src/system/types/link.d.ts +3 -3
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +27 -8
- package/dist/_dts/content-editor/src/footerComposer.d.ts +56 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +5 -5
- package/dist/_dts/content-editor/src/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +3 -1
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +20 -36
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +5 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +11 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
- package/dist/_dts/content-model/src/definitions/shared.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/editor-state.d.ts +4 -0
- package/dist/_dts/core/src/footer-composition.d.ts +143 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/public-profile.d.ts +73 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3043 -2941
- package/dist/_dts/db/src/schemas/forms.d.ts +10 -10
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +5 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockReorder.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
- package/dist/_dts/path-utils/src/index.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/previewErrorMessages.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +1 -0
- package/dist/_dts/sdk/src/client/management/blocks.d.ts +14 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +15 -1
- package/dist/_dts/sdk/src/config/content-types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/content-validation.d.ts +4 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +13 -10
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/cards/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/footer/mode.d.ts +15 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +36 -30
- package/dist/_dts/theme-core/src/navigation/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +1186 -34
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +12 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +15 -0
- package/dist/cli/index.mjs +760 -374
- package/dist/client/{DiscountCodeDisclosure-BwGkvmVH.mjs → DiscountCodeDisclosure-D6TOf6Hi.mjs} +1 -1
- package/dist/client/{EventCombined.client-JnWE6Hzc.mjs → EventCombined.client-Dao3zxRk.mjs} +3 -3
- package/dist/client/{EventListing.client-DQewc_kg.mjs → EventListing.client-B2NNt4y1.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DPAU3SFt.mjs → LeafletStaticMap-BhwFo16w.mjs} +1 -1
- package/dist/client/{MagicLinkForm-D4kpWCbW.mjs → MagicLinkForm-BWnB7cMR.mjs} +2 -2
- package/dist/client/{StepIndicator-CBlkb4rA.mjs → StepIndicator-TzRiQ0BY.mjs} +2 -2
- package/dist/client/{accordion-DAIBVpTS.mjs → accordion-BPy-AJ4_.mjs} +1 -1
- package/dist/client/{bookingForm-DZ-4l5_1.mjs → bookingForm-BL4PGZds.mjs} +6 -6
- package/dist/client/bookings.mjs +143 -94
- package/dist/client/{buttons-DJgynGHQ.mjs → buttons-EBjyslaX.mjs} +144 -95
- package/dist/client/{carousel-D-SLfX8r.mjs → carousel-C2b7Cn9-.mjs} +1 -1
- package/dist/client/{cart-CEgbgJhX.mjs → cart-BQcbXIVD.mjs} +3 -3
- package/dist/client/{checkout-CXWrCRAA.mjs → checkout-DEmpGRJu.mjs} +3 -3
- package/dist/client/client.mjs +827 -434
- package/dist/client/{courseRegistration-DVmLrRVz.mjs → courseRegistration-BqRZPmsq.mjs} +7 -7
- package/dist/client/{eventCalendar-DCuyPY_c.mjs → eventCalendar-B8N_tSl5.mjs} +5 -5
- package/dist/client/{eventCombined-kP2CA2D4.mjs → eventCombined-Gjn6gtq7.mjs} +2 -2
- package/dist/client/{eventDetails-DU0LeF5e.mjs → eventDetails-M-VCxA-r.mjs} +3 -3
- package/dist/client/{eventListing-CcHF87BI.mjs → eventListing-DR19hqYi.mjs} +2 -2
- package/dist/client/{eventRegistration-DJnR0yFH.mjs → eventRegistration-BR02a0k3.mjs} +7 -7
- package/dist/client/{form-CH1lCusH.mjs → form-LY2xIbwg.mjs} +2 -2
- package/dist/client/{headerSection-CBPFZoku.mjs → headerSection-CYwwXJfh.mjs} +3 -3
- package/dist/client/hooks.mjs +377 -362
- package/dist/client/{locationMap-Cx1hBg5n.mjs → locationMap-DWnBXrFq.mjs} +2 -2
- package/dist/client/{newsletterForm-1ZL_ti9u.mjs → newsletterForm-D9s-fQ2P.mjs} +2 -2
- package/dist/client/{pricing-BIbzmV0G.mjs → pricing-DDq80oYc.mjs} +1 -1
- package/dist/client/{productDetail-BTh5gHBV.mjs → productDetail-B0SbWd45.mjs} +3 -3
- package/dist/client/{productList-Cc7OMrqN.mjs → productList-PwYlZn0y.mjs} +3 -3
- package/dist/client/{propsDecoder-oR-M-ISN.mjs → propsDecoder-BRWBiH7i.mjs} +33 -9
- package/dist/client/rendering/client.mjs +247 -40
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +478 -270
- package/dist/client/{shop-CQ_YbCnn.mjs → shop-CMwZPYME.mjs} +6 -6
- package/dist/client/{shop-commerce-BM-AoD3M.mjs → shop-commerce-BuxsFate.mjs} +5 -5
- package/dist/client/{shop-commerce-store-DFMQhU5p.mjs → shop-commerce-store-boYlEJ91.mjs} +1 -1
- package/dist/client/{shopShared-D0SKO2Cu.mjs → shopShared-D2naaOes.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-CrG4_ARt.mjs → useDiscountCodeUi-D9RHpVoj.mjs} +1 -1
- package/dist/client/{useEventFilters-CxK8Fekl.mjs → useEventFilters-igGiK1re.mjs} +3 -3
- package/dist/client/{usePolling-jcVryNgZ.mjs → usePolling-CI7MbsFB.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +178 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +178 -0
- package/dist/{previewAuthStore-BPcJPzdz.mjs → previewAuthStore-a_cBD28m.mjs} +178 -0
- package/dist/{sdk-runtime-C39Rsk-x.mjs → sdk-runtime-MBzD-GmP.mjs} +2 -2
- package/dist/{separator-BoMSQnsP.mjs → separator-5ahRBC85.mjs} +1 -1
- package/dist/server/components.mjs +556 -366
- package/dist/server/config-validation.mjs +384 -363
- package/dist/server/config.mjs +384 -364
- package/dist/server/data.mjs +377 -362
- package/dist/server/index.mjs +179 -1
- package/dist/server/navigation.mjs +9 -3
- package/dist/server/next.mjs +1384 -995
- package/dist/server/page-converter.mjs +368 -355
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +539 -360
- package/dist/server/rendering.mjs +556 -366
- package/dist/server/routing.mjs +613 -543
- package/dist/server/server.mjs +554 -361
- package/dist/server/theme-bridge.mjs +189 -98
- package/dist/server/theme.mjs +161 -95
- package/dist/styles/index.css +7 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as
|
|
3
|
-
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import { C as buildFontPreviewUrl, D as Callout, O as CalloutDescription, S as isAdapterReferenceKind, T as getSiteFontsStorageUrl, _ 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 generateFontFaceCss, x as BlockEditor, y as PreviewFormProvider } from "./SdkPreviewModeRuntime-
|
|
5
|
-
import { t as Separator } from "./separator-
|
|
2
|
+
import { $l as Input, A as deriveStyleConfiguratorCapabilities, Au as DropdownMenuItem, B as previewButtonPersonality, Bd as X$1, Ca as curatedPalettes, Ct as useEntryController, D as committedPaletteForSnapshot, Da as paletteColorsEqual, Dt as useEditorUiStoreInstance, Du as Surface, E as cancelPreview, Ea as paletteColorEntries, Et as useEditorUiStore, F as markApplySaving, G as previewSitePalette, Gl as SelectTrigger, H as previewFooterLook, Hl as Select, Ht as resolvePageRouteSlug, I as openRow, If as Check, J as resetTypographyToSaved, K as previewSiteStyle, Kd as Tablet, Kl as SelectValue, L as paletteMutationCapability, M as isPreviewingChange, Mu as DropdownMenuSeparator, N as markApplyFailed, Nf as ChevronRight, Nu as DropdownMenuTrigger, O as createPalette, Oa as paletteColorsSchema, Ou as DropdownMenu, P as markApplySaved, Pf as ChevronLeft, Q as toggleRow, Ql as PopoverTrigger, Qt as FormRenderer, Qu as cn, R as palettePreviewProjection, T as applyTypographyDraftPatch, Ta as buildPaletteLibraryReadModel, Td as assertNever$1, U as previewHeaderLayout, Ui as getCuratedSiteStyle, Ul as SelectContent, Ut as resolveContentTitle, V as previewCuratedPalette, Vi as curatedSiteStyles, Vt as deriveRouteMetadataPresentation, W as previewHeaderStyle, Wl as SelectItem, X as styleConfiguratorHistoryEntryForPersistedSelection, Xd as SlidersHorizontal, Xl as Popover, Y as setPaletteColors, Yd as Smartphone, Yl as SearchInput, Yt as ManifestForm, Yu as Button, Z as syncStyleConfiguratorState, Zl as PopoverContent, Zt as createManifestValidation, _ as planSiteChromeFooterLayoutSelection, _u as CollapsibleContent, af as Monitor, at as createOptimisticActionRunner, bt as useUISelector, c as selectionSnapshotFromApplySiteStyleSelectionResponse, ca as findFooterLook, cf as LoaderCircle, d as PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE, da as getHeaderStyle, dn as listEntryPageContentSlots, en as createStoreBackend, eu as Tabs, f as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, g as cycleableSiteChromeOptions, gu as Collapsible, h as cycleSiteChromeLookId, id as unsafeAsEditorBlockId, j as dismissWarnings, ju as DropdownMenuLabel, k as createStyleConfiguratorState, ku as DropdownMenuContent, l as resolveStyleConfiguratorInitialSnapshot, la as getFooterLayout, m as buildSiteChromeLookModels, n as useSiteChromeCustomizeOptional, nl as buttonPersonalities, nu as TabsList, ot as resolvePreviewSidebarTab, p as reportPreviewDesignError, q as reconcilePaletteLibraryActive, rl as findButtonPersonality, ru as TabsTrigger, s as buildApplySiteStyleSelectionBody, sa as requireEntriesForCuratedChoices, sf as Maximize2, st as FooterComposerPanel, tf as Plus, tu as TabsContent, u as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, ua as getHeaderLayout, v as planSiteChromeLookSelection, vu as CollapsibleTrigger, w as applyResolvedSelections, wa as findCuratedPalette, x as usePreviewDesignCoordinator, y as planSiteStylePreviewChange, yt as ContentFieldsForm, z as prepareStalePaletteRetry } from "./SiteChromeCustomizeContext-BQUY2dEk.mjs";
|
|
3
|
+
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-a_cBD28m.mjs";
|
|
4
|
+
import { C as buildFontPreviewUrl, D as Callout, O as CalloutDescription, S as isAdapterReferenceKind, T as getSiteFontsStorageUrl, _ 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 generateFontFaceCss, x as BlockEditor, y as PreviewFormProvider } from "./SdkPreviewModeRuntime-CuDjXH6o.mjs";
|
|
5
|
+
import { t as Separator } from "./separator-5ahRBC85.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";
|
|
@@ -3363,7 +3363,8 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3363
3363
|
}).then(unwrapResponse);
|
|
3364
3364
|
live = prepareStalePaletteRetry(reconcilePaletteLibraryActive(current, paletteAuthority.active, paletteAuthority.palettes), { sitePalettes: paletteAuthority.palettes });
|
|
3365
3365
|
} catch (error) {
|
|
3366
|
-
|
|
3366
|
+
reportPreviewDesignError("Failed to refresh palette authority", error);
|
|
3367
|
+
const message = PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE;
|
|
3367
3368
|
setState((latest) => latest ? markApplyFailed(latest, message, "stale") : latest);
|
|
3368
3369
|
return;
|
|
3369
3370
|
}
|
|
@@ -3397,11 +3398,12 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
|
|
|
3397
3398
|
headerLayoutId: compiled.resolvedSelections.headerLayoutId,
|
|
3398
3399
|
headerStyleId: compiled.resolvedSelections.headerStyleId,
|
|
3399
3400
|
headerLookId: compiled.resolvedSelections.headerLookId,
|
|
3401
|
+
footerLookId: compiled.resolvedSelections.footerLookId,
|
|
3400
3402
|
typography: compiled.themeOverlay.typography
|
|
3401
3403
|
},
|
|
3402
3404
|
selectionId
|
|
3403
3405
|
});
|
|
3404
|
-
if (!body.ok) throw new
|
|
3406
|
+
if (!body.ok) throw new StyleApplyPlanError(paletteApplyPlanErrorMessage(body.error));
|
|
3405
3407
|
return unwrapResponse(await apiClient({
|
|
3406
3408
|
endpoint: "applySiteStyleSelection",
|
|
3407
3409
|
params: { siteId },
|
|
@@ -3933,10 +3935,11 @@ function PaletteRow({ expanded, onToggle, apiClient, siteId, siteStyle, palette,
|
|
|
3933
3935
|
onLibraryLoaded(response);
|
|
3934
3936
|
}).catch((error) => {
|
|
3935
3937
|
if (cancelled) return;
|
|
3938
|
+
reportPreviewDesignError("Failed to load site palettes", error);
|
|
3936
3939
|
setLibrary((current) => ({
|
|
3937
3940
|
kind: "failed",
|
|
3938
3941
|
palettes: current.palettes,
|
|
3939
|
-
message:
|
|
3942
|
+
message: PREVIEW_DESIGN_LOAD_ERROR_MESSAGE
|
|
3940
3943
|
}));
|
|
3941
3944
|
});
|
|
3942
3945
|
return () => {
|
|
@@ -4176,9 +4179,13 @@ function paletteApplyPlanErrorMessage(error) {
|
|
|
4176
4179
|
}
|
|
4177
4180
|
}
|
|
4178
4181
|
function classifyStyleApplyError(error) {
|
|
4182
|
+
if (error instanceof StyleApplyPlanError) return {
|
|
4183
|
+
kind: "other",
|
|
4184
|
+
message: error.message
|
|
4185
|
+
};
|
|
4179
4186
|
if (isRecord(error)) {
|
|
4180
4187
|
const status = error.status;
|
|
4181
|
-
const code = error.code;
|
|
4188
|
+
const code = error.code ?? error.errorCode;
|
|
4182
4189
|
if (code === "PALETTE_CAP_REACHED") return {
|
|
4183
4190
|
kind: "palette-cap",
|
|
4184
4191
|
message: "This site has reached its palette limit. Your palette draft is still here."
|
|
@@ -4188,11 +4195,18 @@ function classifyStyleApplyError(error) {
|
|
|
4188
4195
|
message: "This design changed elsewhere. Refreshing the latest version now."
|
|
4189
4196
|
};
|
|
4190
4197
|
}
|
|
4198
|
+
reportPreviewDesignError("Failed to apply site style selection", error);
|
|
4191
4199
|
return {
|
|
4192
4200
|
kind: "other",
|
|
4193
|
-
message:
|
|
4201
|
+
message: PREVIEW_DESIGN_SAVE_ERROR_MESSAGE
|
|
4194
4202
|
};
|
|
4195
4203
|
}
|
|
4204
|
+
var StyleApplyPlanError = class extends Error {
|
|
4205
|
+
constructor(..._args) {
|
|
4206
|
+
super(..._args);
|
|
4207
|
+
this.name = "StyleApplyPlanError";
|
|
4208
|
+
}
|
|
4209
|
+
};
|
|
4196
4210
|
function expandedRowForPreviewDesignRow(row) {
|
|
4197
4211
|
switch (row) {
|
|
4198
4212
|
case "header": return "header-layout";
|
|
@@ -4226,7 +4240,7 @@ function describeWarning(warning) {
|
|
|
4226
4240
|
}
|
|
4227
4241
|
//#endregion
|
|
4228
4242
|
//#region ../preview-next/src/client/preview/PreviewEditorSidebar.tsx
|
|
4229
|
-
function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, runtimePaletteState, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = 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 }) {
|
|
4243
|
+
function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, runtimePaletteState, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest = null, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
4230
4244
|
const controller = useEntryController();
|
|
4231
4245
|
const controllerBlocks = controller.blocks;
|
|
4232
4246
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -4399,6 +4413,24 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4399
4413
|
})
|
|
4400
4414
|
})
|
|
4401
4415
|
});
|
|
4416
|
+
const resolvedEditorPanel = previewInspection.kind === "footer-module" || previewInspection.kind === "footer" ? /* @__PURE__ */ jsx("div", {
|
|
4417
|
+
className: "h-full overflow-y-auto",
|
|
4418
|
+
children: /* @__PURE__ */ jsx(FooterComposerPanel, {
|
|
4419
|
+
apiClient,
|
|
4420
|
+
siteId,
|
|
4421
|
+
customFooterMode: resolvePreviewFooterMode(theme?.footer?.mode),
|
|
4422
|
+
manageLinksHref: `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}/navigation`,
|
|
4423
|
+
manageSettingsHref: `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}/settings`,
|
|
4424
|
+
legalRegion: theme?.footer?.bottomBar?.enabled === true ? "separate" : "integrated",
|
|
4425
|
+
initialTarget: previewInspection.kind === "footer-module" ? {
|
|
4426
|
+
kind: "module",
|
|
4427
|
+
moduleId: previewInspection.moduleId
|
|
4428
|
+
} : { kind: "overview" },
|
|
4429
|
+
variant: "sidebar",
|
|
4430
|
+
canEdit,
|
|
4431
|
+
onSaved: onFooterSaved
|
|
4432
|
+
})
|
|
4433
|
+
}) : editorPanel;
|
|
4402
4434
|
const assistantPanelDisplay = assistantAvailable ? assistantPanel : /* @__PURE__ */ jsx("div", {
|
|
4403
4435
|
className: "flex h-full flex-col items-center justify-center p-6 text-center text-sm text-muted-foreground",
|
|
4404
4436
|
children: "AI Assistant is available for pages in preview mode."
|
|
@@ -4445,7 +4477,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4445
4477
|
value: "editor",
|
|
4446
4478
|
forceMount: true,
|
|
4447
4479
|
className: "mt-0 min-h-0 flex-1 overflow-hidden data-[state=inactive]:hidden",
|
|
4448
|
-
children:
|
|
4480
|
+
children: resolvedEditorPanel
|
|
4449
4481
|
}),
|
|
4450
4482
|
showAssistantTab ? /* @__PURE__ */ jsx(TabsContent, {
|
|
4451
4483
|
value: "assistant",
|
|
@@ -4457,6 +4489,9 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4457
4489
|
})
|
|
4458
4490
|
});
|
|
4459
4491
|
}
|
|
4492
|
+
function resolvePreviewFooterMode(value) {
|
|
4493
|
+
return value === "blocks" || value === "default+blocks" || value === "none" ? value : "default";
|
|
4494
|
+
}
|
|
4460
4495
|
function PreviewMetadataPanel({ ownerKind, contentTypeKey, entry }) {
|
|
4461
4496
|
const uiStore = useEditorUiStoreInstance();
|
|
4462
4497
|
const currentSlug = useEditorUiStore((state) => state.metadata.getAtPath("draftSlug")) ?? void 0;
|
|
@@ -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, u as setPreviewSidebarTab } from "./SdkPreviewModeRuntime-
|
|
2
|
+
import { Au as DropdownMenuItem, Dt as useEditorUiStoreInstance, Et as useEditorUiStore, Ff as ChevronDown, Hd as Undo2, Il as Tooltip, Jd as Sparkles, Ll as TooltipContent, Lt as useMultiAutosave, Nu as DropdownMenuTrigger, Ou as DropdownMenu, Qu as cn, Sf as EllipsisVertical, Tt as classifyHistoryShortcut, Ud as TriangleAlert, Xu as cva, Yu as Button, a as previewDesignHistoryDomainForCommand, bf as Eye, cf as LoaderCircle, du as DialogContent, ef as Redo2, fu as DialogDescription, hu as DialogTitle, i as usePreviewDesignHistoryOrder, if as Palette, ku as DropdownMenuContent, lu as Dialog, mu as DialogHeader, n as useSiteChromeCustomizeOptional, nf as Pencil, o as selectPreviewDesignHistoryDomain, rf as PenLine, vt as useEditor, wt as useEntryEditorController, zl as TooltipTrigger } from "./SiteChromeCustomizeContext-BQUY2dEk.mjs";
|
|
3
|
+
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-a_cBD28m.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, u as setPreviewSidebarTab } from "./SdkPreviewModeRuntime-CuDjXH6o.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";
|
|
@@ -718,20 +718,21 @@ function PreviewEditorUI({ dashboardBaseUrl = null, inMaintenanceMode = false, s
|
|
|
718
718
|
disableDiscard: base.disableDiscard ?? !hasUnpublishedChanges
|
|
719
719
|
};
|
|
720
720
|
}, [hasUnpublishedChanges, controller.toolbar]);
|
|
721
|
-
const
|
|
721
|
+
const entryLifecycleActions = controller.actions.kind === "entryLifecycle" ? controller.actions : null;
|
|
722
|
+
const handlePublish = entryLifecycleActions ? async () => {
|
|
722
723
|
try {
|
|
723
|
-
await
|
|
724
|
+
await entryLifecycleActions.publish();
|
|
724
725
|
} catch (err) {
|
|
725
726
|
console.error("Preview publish error", err);
|
|
726
727
|
}
|
|
727
|
-
};
|
|
728
|
-
const handleDiscard = async () => {
|
|
728
|
+
} : void 0;
|
|
729
|
+
const handleDiscard = entryLifecycleActions ? async () => {
|
|
729
730
|
try {
|
|
730
|
-
await
|
|
731
|
+
await entryLifecycleActions.discardDraft();
|
|
731
732
|
} catch (err) {
|
|
732
733
|
console.error("Preview discard error", err);
|
|
733
734
|
}
|
|
734
|
-
};
|
|
735
|
+
} : void 0;
|
|
735
736
|
const designHistoryControllers = useMemo(() => ({
|
|
736
737
|
"site-style-design": siteStyleHistory,
|
|
737
738
|
"site-chrome-quick-controls": quickControlHistory,
|
|
@@ -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-a_cBD28m.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";
|