@riverbankcms/sdk 0.140.0 → 0.142.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-CUyTzd5z.mjs → PreviewEditorSidebar-Dk6Dt11f.mjs} +24 -15
- package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-D6EQTsCA.mjs} +3 -3
- package/dist/{PreviewQueryProvider-CN0ewic5.mjs → PreviewQueryProvider-CC-EPkyQ.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-DH1n4ytY.mjs} +85 -54
- package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-DunIzY0K.mjs} +797 -216
- package/dist/_dts/api/src/billing.d.ts +6 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
- package/dist/_dts/api/src/domainConnection.d.ts +4 -0
- package/dist/_dts/api/src/endpoints.d.ts +0 -27
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
- package/dist/_dts/api/src/sdkConfig/layout.d.ts +13 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -8
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
- package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -31
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +18 -5
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +56 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +8 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +5 -0
- package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +63 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +1 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3102 -3122
- package/dist/_dts/editor-blocks/src/block-editor/ColourFieldOptionsProvider.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/block-editor/colourFieldVisibility.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +3 -6
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/footerInspection.d.ts +16 -0
- package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +6 -0
- package/dist/_dts/sdk/src/config/types.d.ts +2 -18
- package/dist/_dts/sdk/src/config/validation.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
- package/dist/_dts/theme-core/src/footer/mode.d.ts +10 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +1 -7
- package/dist/_dts/theme-core/src/site-styles/effectivePageDesign.d.ts +32 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-CnJeq3_r.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-BINEO6J9.mjs} +1 -1
- package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-srxNQ6sZ.mjs} +11 -15
- package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-DbyVyGkX.mjs} +4 -17
- package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-B-wpijzL.mjs} +1 -1
- package/dist/client/{accordion-6HiIFxNL.mjs → accordion-B-iUXU7n.mjs} +1 -1
- package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-BXYPke5q.mjs} +5 -5
- package/dist/client/bookings.mjs +194 -102
- package/dist/client/{carousel-DmkZRRq_.mjs → carousel-Cr4aj63H.mjs} +1 -1
- package/dist/client/{cart-CIC24330.mjs → cart-DibP9WWa.mjs} +3 -3
- package/dist/client/{checkout-D1Zw9imo.mjs → checkout-CrSBVnL8.mjs} +3 -3
- package/dist/client/client.mjs +643 -192
- package/dist/client/{context-Cy1OayHx.mjs → context-Ces-AgdR.mjs} +1 -1
- package/dist/client/{dates-aDcfoLHr.mjs → dates-BXyNeNhB.mjs} +2 -2
- package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-HwpPeqrH.mjs} +11 -7
- package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-BpFUkuEI.mjs} +3 -3
- package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-DK_agiWy.mjs} +4 -4
- package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-DhzHqP1c.mjs} +3 -3
- package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-BdQ_Dn2d.mjs} +124 -32
- package/dist/client/{form-BbWckVWY.mjs → form-B1frcuzy.mjs} +2 -2
- package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-CT5z460s.mjs} +2 -2
- package/dist/client/hooks.mjs +274 -45
- package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-CIQXB9i2.mjs} +2 -2
- package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-BYNYZSes.mjs} +23 -10
- package/dist/client/{pricing-Copadu-2.mjs → pricing-CbTlAsmt.mjs} +1 -1
- package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-CR7Z3yjS.mjs} +3 -3
- package/dist/client/{productList-BRiIRUcd.mjs → productList-DXj00vzR.mjs} +3 -3
- package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-DiLiBdek.mjs} +57 -16
- package/dist/client/rendering/client.mjs +476 -132
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +686 -195
- package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-CrcbBf0h.mjs} +28 -11
- package/dist/client/{shop-Vn6yNFED.mjs → shop-DgqiB_1b.mjs} +6 -6
- package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D_J781in.mjs} +5 -5
- package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-PGUbDwqe.mjs} +1 -1
- package/dist/client/{shopShared-COIeK77T.mjs → shopShared-C_Bb2zwG.mjs} +3 -3
- package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-CM17Xpr1.mjs} +17 -11
- package/dist/preview-next/before-render.mjs +0 -37
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-chrome.css +4 -8
- package/dist/preview-next/keepAlive.mjs +0 -37
- package/dist/preview-next/middleware.mjs +0 -37
- package/dist/{previewAuthStore-Gjb6r6vz.mjs → previewAuthStore-oVttoRDO.mjs} +0 -37
- package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-DhmuRhIX.mjs} +2 -2
- package/dist/{separator-DKDRJ1oH.mjs → separator-C3hlg9LH.mjs} +1 -1
- package/dist/server/components.mjs +452 -111
- package/dist/server/config-validation.mjs +263 -40
- package/dist/server/config.mjs +263 -40
- package/dist/server/data.mjs +274 -45
- package/dist/server/index.mjs +1 -38
- package/dist/server/next.mjs +427 -119
- package/dist/server/page-converter.mjs +208 -33
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +467 -119
- package/dist/server/rendering.mjs +467 -117
- package/dist/server/routing.mjs +301 -50
- package/dist/server/server.mjs +275 -83
- package/dist/server/theme-bridge.mjs +57 -23
- package/dist/server/theme.mjs +11 -9
- package/dist/styles/index.css +28 -2
- package/package.json +1 -1
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as FooterComposerPanel,
|
|
3
|
-
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import { t as Separator } from "./separator-
|
|
5
|
-
import { S as getSiteFontsStorageUrl, _ as usePreviewBlockCustomizeSelectionOptional, b as buildFontPreviewUrl, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as useBlockCustomizeControls, h as usePreviewSiteFontStorageUrl, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, u as canInspectSiteStyle, v as PreviewFormProvider, x as generateFontFaceCss, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-
|
|
2
|
+
import { $ as FooterComposerPanel, A as markApplySaving, Aa as CollapsibleContent, Ai as buttonStyleHoverPreferenceValue, B as setPaletteColors, Ba as Button, Br as curatedPalettes, C as cancelPreview, D as isPreviewingChange, Dr as curatedSiteStyles, E as dismissWarnings, F as previewFooterLook, Fa as DropdownMenuItem, Fi as updateButtonStyleSelectionChoice, H as syncStyleConfiguratorState, Ha as cn, Hi as VARIANT_ROLES, Ht as useEditorUiStore, I as previewHeaderLayout, Ia as DropdownMenuLabel, Ii as buttonStyleSelectionKey, It as BlockEditor, Ki as resolveSdkFooterMode, L as previewHeaderStyle, La as DropdownMenuSeparator, M as palettePreviewProjection, Ma as Surface, Mi as findButtonStyleRecipe, Mr as findFooterLook, N as previewButtonStyle, Na as DropdownMenu, Ni as resolveButtonStyleSelection, Nr as getHeaderLayout, O as markApplyFailed, P as previewCuratedPalette, Pa as DropdownMenuContent, Pi as updateButtonStyleHoverPreference, Pr as getHeaderStyle, Q as resolvePreviewSidebarTab, R as previewSiteStyle, Ra as DropdownMenuTrigger, S as applyTypographyDraftPatch, Sa as TabsTrigger, T as deriveStyleConfiguratorCapabilities, U as toggleRow, Ua as X$1, Ui as paletteColorEntries, Ut as useEditorUiStoreInstance, V as styleConfiguratorHistoryEntryForPersistedSelection, Wi as paletteColorsSchema, X as resolveStyleConfiguratorInitialSnapshot, Xa as SlidersHorizontal, Ya as Smartphone, Z as createOptimisticActionRunner, _ as reportPreviewDesignError, _a as PopoverTrigger, at as useUISelector, b as planSiteChromeSelection, ba as TabsContent, bn as listEntryPageContentSlots, c as selectionSnapshotFromApplySiteStyleSelectionResponse, ca as SelectContent, cn as resolveContentTitle, ct as useEntryController, da as SelectValue, dn as ManifestForm, do as ChevronDown, f as usePreviewDesignCoordinator, fa as Callout, fo as Check, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, ga as PopoverContent, gn as createStoreBackend, go as assertNever$1, ha as Popover, in as isAdapterReferenceKind, io as LoaderCircle, it as ContentFieldsForm, j as openRow, ja as CollapsibleTrigger, ji as buttonStyleSelectionParameterValue, k as markApplySaved, ka as Collapsible, kn as ThemeScope, kr as getCuratedSiteStyle, l as deriveSiteStylePreviewUpdate, la as SelectItem, lo as ChevronRight, ma as SearchInput, mn as FormRenderer, mo as unsafeAsEditorBlockId, n as useSiteChromeCustomizeOptional, no as Monitor, on as deriveRouteMetadataPresentation, pa as CalloutDescription, pn as createManifestValidation, qa as Tablet, ro as Maximize2, s as buildApplySiteStyleSelectionBody, sa as Select, sn as resolvePageRouteSlug, u as planConfiguratorPreview, ua as SelectTrigger, uo as ChevronLeft, v as buildSiteChromeSelectionModels, va as Input, w as createStyleConfiguratorState, x as applyResolvedSelections, xa as TabsList, y as cycleSiteChromeSelectionId, ya as Tabs, z as resetTypographyToSaved, zi as themeButtonClassName } from "./SiteChromeCustomizeContext-DunIzY0K.mjs";
|
|
3
|
+
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-oVttoRDO.mjs";
|
|
4
|
+
import { t as Separator } from "./separator-C3hlg9LH.mjs";
|
|
5
|
+
import { S as getSiteFontsStorageUrl, _ as usePreviewBlockCustomizeSelectionOptional, b as buildFontPreviewUrl, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as useBlockCustomizeControls, h as usePreviewSiteFontStorageUrl, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, u as canInspectSiteStyle, v as PreviewFormProvider, x as generateFontFaceCss, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-DH1n4ytY.mjs";
|
|
6
6
|
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
9
9
|
import { useRouter } from "next/navigation.js";
|
|
10
|
+
//#region ../preview-next/src/client/preview/footerInspection.ts
|
|
11
|
+
/** Shared by sidebar routing and the footer panel's initial editing target. */
|
|
12
|
+
function resolveFooterInspection(inspection) {
|
|
13
|
+
return inspection?.kind === "footer" || inspection?.kind === "footer-module" ? inspection : null;
|
|
14
|
+
}
|
|
15
|
+
function footerComposerInspectionProps(inspection) {
|
|
16
|
+
return {
|
|
17
|
+
initialTarget: inspection?.kind === "footer-module" ? {
|
|
18
|
+
kind: "module",
|
|
19
|
+
moduleId: inspection.moduleId
|
|
20
|
+
} : { kind: "overview" },
|
|
21
|
+
initialTargetRequestId: inspection?.requestId
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
10
25
|
//#region ../../node_modules/.pnpm/react-colorful@5.7.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-colorful/dist/index.mjs
|
|
11
26
|
function u() {
|
|
12
27
|
return (u = Object.assign || function(e) {
|
|
@@ -1820,7 +1835,7 @@ function DesignSection({ panel, takeover, controls }) {
|
|
|
1820
1835
|
}
|
|
1821
1836
|
//#endregion
|
|
1822
1837
|
//#region ../preview-next/src/client/preview/PreviewFooterEditorPanel.tsx
|
|
1823
|
-
function PreviewFooterEditorPanel({ apiClient, siteId, dashboardBaseUrl, theme, selectionId, selectionVersion, siteStyleAccess, inspection, canEdit, onSaved }) {
|
|
1838
|
+
function PreviewFooterEditorPanel({ sdkConfig, apiClient, siteId, dashboardBaseUrl, theme, selectionId, selectionVersion, siteStyleAccess, inspection, canEdit, onSaved }) {
|
|
1824
1839
|
const dashboardSiteUrl = `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}`;
|
|
1825
1840
|
const navigationLayoutAccess = siteStyleAccess.kind === "apply-allowed" && theme && selectionVersion !== null ? {
|
|
1826
1841
|
kind: "editable",
|
|
@@ -1831,25 +1846,18 @@ function PreviewFooterEditorPanel({ apiClient, siteId, dashboardBaseUrl, theme,
|
|
|
1831
1846
|
return /* @__PURE__ */ jsx(FooterComposerPanel, {
|
|
1832
1847
|
apiClient,
|
|
1833
1848
|
siteId,
|
|
1834
|
-
customFooterMode:
|
|
1849
|
+
customFooterMode: resolveSdkFooterMode(sdkConfig),
|
|
1835
1850
|
manageLinksHref: `${dashboardSiteUrl}/navigation`,
|
|
1836
1851
|
manageSettingsHref: `${dashboardSiteUrl}/settings`,
|
|
1837
1852
|
legalRegion: theme?.footer.bottomBar?.enabled ? "separate" : "integrated",
|
|
1838
1853
|
navigationLayoutAccess,
|
|
1839
1854
|
loadingFallback: /* @__PURE__ */ jsx(ContentSpinner, { className: "py-8" }),
|
|
1840
|
-
|
|
1841
|
-
kind: "module",
|
|
1842
|
-
moduleId: inspection.moduleId
|
|
1843
|
-
} : { kind: "overview" },
|
|
1844
|
-
initialTargetRequestId: inspection?.requestId,
|
|
1855
|
+
...footerComposerInspectionProps(inspection),
|
|
1845
1856
|
variant: "sidebar",
|
|
1846
1857
|
canEdit,
|
|
1847
1858
|
onSaved
|
|
1848
1859
|
});
|
|
1849
1860
|
}
|
|
1850
|
-
function resolvePreviewFooterMode(value) {
|
|
1851
|
-
return value === "blocks" || value === "default+blocks" || value === "none" ? value : "default";
|
|
1852
|
-
}
|
|
1853
1861
|
//#endregion
|
|
1854
1862
|
//#region ../preview-next/src/client/preview/PreviewEditorGuidanceCard.tsx
|
|
1855
1863
|
function PreviewEditorGuidanceCard({ guidance, completeSetupDisabled, onCompleteSetup }) {
|
|
@@ -4505,8 +4513,9 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4505
4513
|
fields: findLinkedEntryManifestFieldsFromSnapshot(snapshot)
|
|
4506
4514
|
})
|
|
4507
4515
|
});
|
|
4508
|
-
const footerInspection = previewInspection
|
|
4516
|
+
const footerInspection = resolveFooterInspection(previewInspection);
|
|
4509
4517
|
const footerPanel = /* @__PURE__ */ jsx(PreviewFooterEditorPanel, {
|
|
4518
|
+
sdkConfig,
|
|
4510
4519
|
apiClient,
|
|
4511
4520
|
siteId,
|
|
4512
4521
|
dashboardBaseUrl,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $t as useMultiAutosave,
|
|
3
|
-
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import { C 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-
|
|
2
|
+
import { $a as Pencil, $t as useMultiAutosave, Ba as Button, Ca as Dialog, Da as DialogHeader, Fa as DropdownMenuItem, Ga as Undo2, Ha as cn, Ht as useEditorUiStore, Ja as Sparkles, Ka as TriangleAlert, Na as DropdownMenu, Nt as useEditor, Oa as DialogTitle, Pa as DropdownMenuContent, Qa as Redo2, Ra as DropdownMenuTrigger, Ta as DialogDescription, Ut as useEditorUiStoreInstance, Va as cva, Vt as classifyHistoryShortcut, a as previewDesignHistoryDomainForCommand, aa as TooltipContent, co as EllipsisVertical, do as ChevronDown, eo as PenLine, i as usePreviewDesignHistoryOrder, ia as Tooltip, io as LoaderCircle, lt as useEntryEditorController, n as useSiteChromeCustomizeOptional, o as selectPreviewDesignHistoryDomain, oa as TooltipTrigger, so as Eye, to as Palette, wa as DialogContent } from "./SiteChromeCustomizeContext-DunIzY0K.mjs";
|
|
3
|
+
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-oVttoRDO.mjs";
|
|
4
|
+
import { C 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-DH1n4ytY.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";
|
|
@@ -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-oVttoRDO.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $i as
|
|
3
|
-
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-
|
|
4
|
-
import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth } from "./previewAuthStore-
|
|
2
|
+
import { $i as mapCurrentValueForSelect, $n as coerceLinkedContentEntriesPayload, $r as runTransforms, An as containerResponsiveThemeCss, Ar as compileTransitionRuntime, At as RichTextField, Ba as Button, Bi as parseThemeForPersistence, Bn as compileManifestContentContract, Bt as getBlockManifestFromSdkConfig, Ca as Dialog, Ci as isRecord$13, Cn as deriveLaunchReadiness, Cr as retargetCompiledRuntimeFieldsForContentAdjacency, Ct as ButtonVariantField, Da as DialogHeader, Di as asDesignBlockId, Dn as useApiMediaUploader, Dt as ReferenceField, Ea as DialogFooter, Ei as pageDesignEditorBackgroundOverrideOwner, En as useMediaEditorOptional, Er as componentRuntimeRulesForTheme, Et as MediaField, Fn as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Fr as gradientToCss, Ft as LinkWidgetProvider, G as confirmAutosaveBatch, Gi as paletteModeSchema, Gn as escapeStyleContent, Gr as backgroundAppearanceColorTokenNames, Gt as canRedoHistory, Ha as cn, Hn as buildThemeRuntime, Hr as sectionTransitionFamilies, Ht as useEditorUiStore, In as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, Ir as GRADIENT_PRESETS, J as idleEditorTransactionQueueState, Ji as getFieldIntent, Jn as defaultTransforms, Jr as ctaButton, Jt as pushHistoryEntry, K as deriveTransactionCapabilities, Ki as resolveSdkFooterMode, Kn as readBlockComposition, Kr as backgroundAppearanceQuickColorTokenNames, Kt as canUndoHistory, Li as textColorStyle, Ln as planSiteOverlayHeaderClearance, Lr as GRADIENT_PRESET_IDS, Lt as hideThemeV2RawStyleFields, Mn as makeDefaultBlockComponent, Mt as EditorProvider, Nn as getBlockDefinition, Nt as useEditor, Oa as DialogTitle, Oi as assertNever$1, On as isSupportedLoaderEndpoint, Or as designRuntimeRulesForTheme, Ot as ReferenceWidgetProvider, Pn as projectRecurringSchedule, Pt as LinkField, Q as resolvePreviewSidebarTab, Qi as hasEmptyOption, Qn as LINKED_CONTENT_ENTRY_META_KEY, Qr as parseBackgroundContent, Qt as recordsEqual, Ri as defaultThemeTokens, Rn as visibleHeaderClearancePx, Rr as getGradientPreset, Rt as prepareBlockEditorManifest, Sa as TabsTrigger, Si as isObjectRecord, Sn as DEFAULT_LAUNCH_READINESS_INPUT, Sr as retargetCompiledBoundaryRuntimeForContentAdjacency, St as EntryPickerWidgetProvider, Ta as DialogDescription, Ti as isThemeV2NormalEditorRawStyleFieldName, Tn as MediaEditorContextProvider, Tr as planPageDesignLayoutLookCompatibility, Tt as FileField, Ua as X, Un as DEFAULT_THEME_RESPONSIVE_MODE, Ur as sectionTransitionFamilyForBoundaryOptionId, Ut as useEditorUiStoreInstance, Vi as ORDINARY_TEXT_MIN_CONTRAST_RATIO, Vn as validateManifestDraft, Vr as defaultSectionTransitionVariantForFamily, W as beginAutosaveBatch, Wa as Upload, Wi as paletteColorsSchema, Wn as getResponsiveScopeSpec, Wr as sectionTransitionVariantForBoundaryOptionId, Wt as useOptionalEditorUiStoreInstance, Xi as SdkConfigProvider, Xn as resolvePageRouteTarget, Xt as undoHistory, Y as rejectAutosaveBatch, Yi as isHeaderField, Yn as resolveEntryRouteTarget, Yr as bindingSchema, Yt as redoHistory, Za as RotateCcw, Zi as useSdkConfig, Zn as resolveRouteTarget, Zr as planSiteChromePlacement, Zt as unsafeAsLinkedContentEntryId, _ as reportPreviewDesignError, _i as BlockApiProvider, _n as MediaEditor, _o as expectParsedBrandedId, _r as heroCopyFragment, _t as loadMailingListAuthoringContext, ai as coerceInlineTextWithFallback, an as parseReferenceKind, ao as Image, ar as cardFragment, at as useUISelector, ba as TabsContent, bi as eventCalendarListLayoutOptions, bo as __exportAll, br as applyCompiledRuntimeFieldsToContent, bt as IconPickerField, ca as SelectContent, ci as Text$1, cr as blogFeaturedPostFragment, d as PreviewDesignCoordinatorProvider, da as SelectValue, di as getCurrentResolveImageUrlContext, dr as formCopyFragment, dt as createSiteOptionWidgetAdapters, ea as mapOptionValueForSelect, ei as parseBlockIconValue, en as useDebouncedLatestSave, er as getLinkedContentEntryMeta, et as renderSiteChromeBlock, fi as resolveImageUrlWithContext, fn as createManifestFormAdapter, fr as testimonialsCarouselFragment, ft as SiteOptionPickerField, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, gi as siblingPath, gn as createStoreBackend, go as assertNever$2, gr as ctaRowFragment, gt as MailingListTargetingField, h as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, hi as getAtPath, hn as evaluateVisibility, ho as unsafeAsEditorBlockValues, hr as heroCtaRowFragment, ht as OfferingsPreviewWidgetProvider, i as usePreviewDesignHistoryOrder, ii as logger, ir as headingFragment, jn as createCustomBlockRegistry, jr as surfaceResolutionContextFromTheme, jt as RichTextWidgetProvider, ki as makeBoundaryId, kn as ThemeScope, kt as useRichTextImagePicker, la as SelectItem, li as RichText$1, ln as PaletteProvider, lo as ChevronRight, lr as singleButtonFragment, lt as useEntryEditorController, m as usePreviewThemeOverlay, mi as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, mn as FormRenderer, mo as unsafeAsEditorBlockId, mr as ctaCopyFragment, mt as OfferingsPreviewGroupOrderField, n as useSiteChromeCustomizeOptional, na as FieldFrame, ni as parseGeneratedIconSetId, nn as createSnapshotFromPageRecord, nr as ImageResolveContextProvider, nt as PreviewInlineTextEditor, oi as inlineTextToPlainText, oo as GripVertical, or as faqAccordionFragment, ot as EditableBlockProvider, p as PreviewThemeOverlayProvider, pi as setContextResolveImageUrlContext, po as parseFooterModuleId, pr as testimonialsHeadingFragment, pt as SiteOptionWidgetProvider, q as enqueueTransaction, qi as attachRenderableMediaAssetFields, qn as getDefaultComponentRegistry, qr as parseBackgroundAppearanceColorToken, qt as createHistoryState, r as PreviewDesignHistoryOrderProvider, ra as useField, ri as renderInlineText, rn as BUILT_IN_REFERENCE_KINDS, rr as richTextFragment, rt as PreviewTextEditor, sa as Select, si as isInlineTextEmpty, sr as faqHeadingFragment, st as EntryControllerProvider, t as SiteChromeCustomizeProvider, ta as unmapValueFromSelect, ti as parseGeneratedIconAssetId, tn as createRoutingHelpers, tr as clientComponentRegistry, tt as PreviewRichTextEditor, ua as SelectTrigger, ui as buildResolveImageUrlContext, un as usePalette, uo as ChevronLeft, ur as formEmbedFragment, ut as createSiteOptionApiLoader, vi as calendarWindowQuerySchema, vn as applyPageDesignEditorAction, vo as parseMediaAssetId, vr as bodyCopyFragment, vt as MailingListTargetingProvider, wa as DialogContent, wi as corners, wn as AMBIENT_BACKGROUND_ROLES, wr as formatSiteChromeBackgroundTokenLabel, wt as ButtonWidgetProvider, xa as TabsList, xi as bookingConsentCarrierSchema, xn as decodePublicProductCategorySelectorQuery, xr as compileEditorModelRuntime, xt as EntryPickerField, ya as Tabs, yi as eventCalendarListLayoutCompatibleDisplayModeValues, yn as getPageDesignEditorState, yo as parseSiteId, yr as defineFragment, yt as InlineTextField, zn as resolveVariantKey, zr as parseGradientPresetId, zt as stripTopLevelRoutingUi } from "./SiteChromeCustomizeContext-DunIzY0K.mjs";
|
|
3
|
+
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-CC-EPkyQ.mjs";
|
|
4
|
+
import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth } from "./previewAuthStore-oVttoRDO.mjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import React, { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -460,7 +460,7 @@ function pageBlockPosition(index, blockCount) {
|
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region ../blocks/src/pageRendererContracts.ts
|
|
462
462
|
function buildPageRendererRootRuntime(dataContext) {
|
|
463
|
-
const { siteId = null, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, bookingOfferingPresets = [], mailingList = { tag: "not_configured" }, eventRegistrationOverlayEnabled = false, loaderFailures = {} } = dataContext ?? {};
|
|
463
|
+
const { siteId = null, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, bookingOfferingPresets = [], appointmentServicePathPrefix = null, mailingList = { tag: "not_configured" }, eventRegistrationOverlayEnabled = false, loaderFailures = {} } = dataContext ?? {};
|
|
464
464
|
return {
|
|
465
465
|
siteId,
|
|
466
466
|
pageId,
|
|
@@ -470,6 +470,7 @@ function buildPageRendererRootRuntime(dataContext) {
|
|
|
470
470
|
apiBaseUrl,
|
|
471
471
|
portalToken,
|
|
472
472
|
bookingOfferingPresets,
|
|
473
|
+
appointmentServicePathPrefix,
|
|
473
474
|
mailingList,
|
|
474
475
|
eventRegistrationOverlayEnabled,
|
|
475
476
|
loaderFailures
|
|
@@ -2022,12 +2023,12 @@ function normalizeContent(block) {
|
|
|
2022
2023
|
}
|
|
2023
2024
|
/**
|
|
2024
2025
|
* Normalize params for API calls.
|
|
2025
|
-
* Converts
|
|
2026
|
+
* Converts supplied values to strings, preserving absent versus explicitly empty params.
|
|
2026
2027
|
*/
|
|
2027
2028
|
function normalizeParams(input) {
|
|
2028
2029
|
if (!input || typeof input !== "object") return {};
|
|
2029
2030
|
const output = {};
|
|
2030
|
-
for (const [key, value] of Object.entries(input)) output[key] = coerceToString(value);
|
|
2031
|
+
for (const [key, value] of Object.entries(input)) if (value !== void 0 && value !== null) output[key] = coerceToString(value);
|
|
2031
2032
|
return output;
|
|
2032
2033
|
}
|
|
2033
2034
|
function isNonArrayObject(value) {
|
|
@@ -2091,6 +2092,14 @@ function coercePayload(payload) {
|
|
|
2091
2092
|
* - Frontend: provide internal API client
|
|
2092
2093
|
* - SDK: provide SDK client with endpoint mapping
|
|
2093
2094
|
*/
|
|
2095
|
+
function projectDataLoaders(loaders, shouldLoad, blockId, blockKind) {
|
|
2096
|
+
if (!shouldLoad) return [...loaders];
|
|
2097
|
+
return loaders.filter(({ key }) => shouldLoad({
|
|
2098
|
+
blockId,
|
|
2099
|
+
blockKind,
|
|
2100
|
+
loaderKey: key
|
|
2101
|
+
}));
|
|
2102
|
+
}
|
|
2094
2103
|
function shouldSkipResolvedLoader(input) {
|
|
2095
2104
|
if (input.loader.requiredParams?.some((param) => !input.params[param]?.trim())) return true;
|
|
2096
2105
|
return Boolean(input.isValidEndpoint && !input.isValidEndpoint(input.endpoint));
|
|
@@ -2119,7 +2128,7 @@ async function prefetchBlockData(page, context, options) {
|
|
|
2119
2128
|
return (await prefetchBlockDataWithFailures(page, context, options)).resolvedData;
|
|
2120
2129
|
}
|
|
2121
2130
|
async function prefetchBlockDataWithFailures(page, context, options) {
|
|
2122
|
-
const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings } = options;
|
|
2131
|
+
const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings, shouldLoad } = options;
|
|
2123
2132
|
const results = {};
|
|
2124
2133
|
const loaderFailures = {};
|
|
2125
2134
|
const tasks = [];
|
|
@@ -2136,6 +2145,7 @@ async function prefetchBlockDataWithFailures(page, context, options) {
|
|
|
2136
2145
|
loader
|
|
2137
2146
|
})) : [];
|
|
2138
2147
|
} else loaders = [];
|
|
2148
|
+
loaders = projectDataLoaders(loaders, shouldLoad, blockId, block.kind);
|
|
2139
2149
|
if (loaders.length === 0) continue;
|
|
2140
2150
|
const root = {
|
|
2141
2151
|
...context.root ?? {},
|
|
@@ -2277,8 +2287,8 @@ function toStringParams(value) {
|
|
|
2277
2287
|
for (const [k, v] of Object.entries(value)) if (typeof v === "string") out[k] = v;
|
|
2278
2288
|
return out;
|
|
2279
2289
|
}
|
|
2280
|
-
function stripEmptyStringValues(params) {
|
|
2281
|
-
for (const [key, value] of Object.entries(params)) if (value === "") delete params[key];
|
|
2290
|
+
function stripEmptyStringValues(params, endpoint) {
|
|
2291
|
+
for (const [key, value] of Object.entries(params)) if (value === "" && !(key === "seriesIds" && (endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow"))) delete params[key];
|
|
2282
2292
|
}
|
|
2283
2293
|
function ensureSiteId(params, context) {
|
|
2284
2294
|
if (!params.siteId && typeof context.siteId === "string" && context.siteId) params.siteId = context.siteId;
|
|
@@ -2320,7 +2330,7 @@ function normalizeOrder(orderBy) {
|
|
|
2320
2330
|
*/
|
|
2321
2331
|
function normalizeLoaderParams(endpoint, params, context) {
|
|
2322
2332
|
const out = toStringParams(params);
|
|
2323
|
-
stripEmptyStringValues(out);
|
|
2333
|
+
stripEmptyStringValues(out, endpoint);
|
|
2324
2334
|
if (endpoint === "getPublicFormById") {
|
|
2325
2335
|
ensureSiteId(out, context);
|
|
2326
2336
|
if (!out.formId && out.formSlug) {
|
|
@@ -7791,6 +7801,15 @@ function resolvePreviewThemeRoles(input) {
|
|
|
7791
7801
|
documentTheme: input.renderTheme ?? input.theme
|
|
7792
7802
|
};
|
|
7793
7803
|
}
|
|
7804
|
+
z.object({
|
|
7805
|
+
palette: paletteColorsSchema,
|
|
7806
|
+
paletteMode: paletteModeSchema,
|
|
7807
|
+
typography: z.object({
|
|
7808
|
+
headingFamily: z.string().trim().min(1),
|
|
7809
|
+
bodyFamily: z.string().trim().min(1)
|
|
7810
|
+
}).strict(),
|
|
7811
|
+
corners
|
|
7812
|
+
}).strict();
|
|
7794
7813
|
const DEFAULT_PREVIEW_CHROME_FLOATING_PLACEMENT = Object.freeze({
|
|
7795
7814
|
kind: "anchor-top-right",
|
|
7796
7815
|
topPx: 8,
|
|
@@ -9231,16 +9250,26 @@ function resolveShellThemeRoles(props) {
|
|
|
9231
9250
|
}
|
|
9232
9251
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
9233
9252
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
9234
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
9253
|
+
return { default: (await import("./PreviewEditorSidebar-Dk6Dt11f.mjs")).PreviewEditorSidebar };
|
|
9235
9254
|
});
|
|
9236
9255
|
const PreviewEditorUI = React.lazy(async () => {
|
|
9237
|
-
return { default: (await import("./PreviewEditorUI-
|
|
9256
|
+
return { default: (await import("./PreviewEditorUI-D6EQTsCA.mjs")).PreviewEditorUI };
|
|
9238
9257
|
});
|
|
9239
9258
|
const previewPaneContainmentStyle = {
|
|
9240
9259
|
contain: "layout paint",
|
|
9241
9260
|
isolation: "isolate",
|
|
9242
9261
|
transform: "translateZ(0)"
|
|
9243
9262
|
};
|
|
9263
|
+
function PreviewScrollViewport({ children }) {
|
|
9264
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9265
|
+
className: "relative h-full min-h-0 overflow-hidden bg-muted/30",
|
|
9266
|
+
style: previewPaneContainmentStyle,
|
|
9267
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
9268
|
+
className: "relative flex h-full min-h-0 flex-col overflow-auto",
|
|
9269
|
+
children
|
|
9270
|
+
})
|
|
9271
|
+
});
|
|
9272
|
+
}
|
|
9244
9273
|
function renderShellProviders(input) {
|
|
9245
9274
|
if (!input.themeRoles) return input.content;
|
|
9246
9275
|
const { props, themeRoles } = input;
|
|
@@ -9414,44 +9443,40 @@ function PreviewShellLayout(props) {
|
|
|
9414
9443
|
contentObserverRef.current?.disconnect();
|
|
9415
9444
|
};
|
|
9416
9445
|
}, [viewportMode, viewportWidth]);
|
|
9417
|
-
const leftPane = /* @__PURE__ */ jsx(
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9446
|
+
const leftPane = /* @__PURE__ */ jsx(PreviewScrollViewport, { children: /* @__PURE__ */ jsx(PreviewDocumentContent, {
|
|
9447
|
+
rendering,
|
|
9448
|
+
themeRuntime,
|
|
9449
|
+
viewportMode,
|
|
9450
|
+
viewportWidth,
|
|
9451
|
+
scale: useMemo(() => {
|
|
9452
|
+
const ZOOM_PERCENTAGES = {
|
|
9453
|
+
33: .33,
|
|
9454
|
+
50: .5,
|
|
9455
|
+
75: .75,
|
|
9456
|
+
100: 1
|
|
9457
|
+
};
|
|
9458
|
+
if (viewportMode === "squeeze") return 1;
|
|
9459
|
+
if (zoom === "fit") {
|
|
9460
|
+
if (!containerWidth || containerWidth === 0) return 1;
|
|
9461
|
+
const calculatedScale = containerWidth / (viewportWidth === "full" ? 1440 : viewportWidth);
|
|
9462
|
+
return Math.min(1, calculatedScale);
|
|
9463
|
+
}
|
|
9464
|
+
return ZOOM_PERCENTAGES[zoom];
|
|
9465
|
+
}, [
|
|
9423
9466
|
viewportMode,
|
|
9424
9467
|
viewportWidth,
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
}
|
|
9438
|
-
return ZOOM_PERCENTAGES[zoom];
|
|
9439
|
-
}, [
|
|
9440
|
-
viewportMode,
|
|
9441
|
-
viewportWidth,
|
|
9442
|
-
zoom,
|
|
9443
|
-
containerWidth
|
|
9444
|
-
]),
|
|
9445
|
-
contentHeight,
|
|
9446
|
-
scaleContainerRef,
|
|
9447
|
-
contentRef,
|
|
9448
|
-
headerNode,
|
|
9449
|
-
bannerNode,
|
|
9450
|
-
footerNode,
|
|
9451
|
-
siteChromeRenderModel,
|
|
9452
|
-
children
|
|
9453
|
-
})
|
|
9454
|
-
});
|
|
9468
|
+
zoom,
|
|
9469
|
+
containerWidth
|
|
9470
|
+
]),
|
|
9471
|
+
contentHeight,
|
|
9472
|
+
scaleContainerRef,
|
|
9473
|
+
contentRef,
|
|
9474
|
+
headerNode,
|
|
9475
|
+
bannerNode,
|
|
9476
|
+
footerNode,
|
|
9477
|
+
siteChromeRenderModel,
|
|
9478
|
+
children
|
|
9479
|
+
}) });
|
|
9455
9480
|
const rightPane = /* @__PURE__ */ jsx("div", {
|
|
9456
9481
|
className: `${PREVIEW_CHROME_THEME_CLASS_NAME} flex h-full min-h-0 flex-col overflow-hidden ${surfaceDocument.surfaceClassName ?? ""}`,
|
|
9457
9482
|
...getPreviewChromeSurfaceDataProps(surfaceDocument),
|
|
@@ -11553,6 +11578,7 @@ function eventLoaderParams(params) {
|
|
|
11553
11578
|
scheduleScope: params.scheduleScope || void 0,
|
|
11554
11579
|
entryId: params.entryId || void 0,
|
|
11555
11580
|
seriesId: params.seriesId || void 0,
|
|
11581
|
+
seriesIds: params.seriesIds,
|
|
11556
11582
|
includeOccurrenceId: params.includeOccurrenceId || void 0
|
|
11557
11583
|
});
|
|
11558
11584
|
}
|
|
@@ -12004,11 +12030,14 @@ var SdkPreviewModeRuntime_exports = /* @__PURE__ */ __exportAll({ SdkPreviewMode
|
|
|
12004
12030
|
function isSdkCustomBlockArray(value) {
|
|
12005
12031
|
return Array.isArray(value);
|
|
12006
12032
|
}
|
|
12007
|
-
function
|
|
12033
|
+
function getSdkConfigForPreview(value) {
|
|
12008
12034
|
if (!value || typeof value !== "object") return null;
|
|
12009
|
-
if (!("customBlocks" in value)) return {};
|
|
12035
|
+
if (!("customBlocks" in value)) return { layout: { footerMode: resolveSdkFooterMode(value) } };
|
|
12010
12036
|
const customBlocks = value.customBlocks;
|
|
12011
|
-
return
|
|
12037
|
+
return {
|
|
12038
|
+
layout: { footerMode: resolveSdkFooterMode(value) },
|
|
12039
|
+
...isSdkCustomBlockArray(customBlocks) ? { customBlocks } : {}
|
|
12040
|
+
};
|
|
12012
12041
|
}
|
|
12013
12042
|
function SdkPreviewModeRuntime(props) {
|
|
12014
12043
|
const { apiBaseUrl, siteId, siteSlug, previewSession, previewToken } = props;
|
|
@@ -12017,8 +12046,10 @@ function SdkPreviewModeRuntime(props) {
|
|
|
12017
12046
|
const siteFontStorageUrl = resolveContentStorageUrl(content);
|
|
12018
12047
|
const sdkConfigForEditor = useMemo(() => {
|
|
12019
12048
|
const blocks = customBlocks ?? sdkConfig?.customBlocks ?? void 0;
|
|
12020
|
-
|
|
12021
|
-
|
|
12049
|
+
return {
|
|
12050
|
+
layout: sdkConfig?.layout,
|
|
12051
|
+
...blocks?.length ? { customBlocks: blocks } : {}
|
|
12052
|
+
};
|
|
12022
12053
|
}, [sdkConfig, customBlocks]);
|
|
12023
12054
|
const blockApiConfig = useMemo(() => ({
|
|
12024
12055
|
baseUrl: apiBaseUrl,
|
|
@@ -12100,7 +12131,7 @@ function resolveSdkPreviewRuntimeModel(props) {
|
|
|
12100
12131
|
};
|
|
12101
12132
|
const page = content.page;
|
|
12102
12133
|
const routeMap = content.routeMap ?? void 0;
|
|
12103
|
-
const sdkConfig =
|
|
12134
|
+
const sdkConfig = getSdkConfigForPreview(content.sdkConfig);
|
|
12104
12135
|
const customBlocks = isSdkCustomBlockArray(content.customBlocks) ? content.customBlocks : null;
|
|
12105
12136
|
const initialBlocks = (page.blocks ?? []).map((block, index) => ({
|
|
12106
12137
|
id: block.id ?? null,
|