@riverbankcms/sdk 0.135.1 → 0.136.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/CHANGELOG.md +13 -0
- package/README.md +4 -8
- package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
- package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
- package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2299 -1149
- package/dist/_dts/ai/src/contracts/proposals.d.ts +8 -554
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +401 -2312
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -0
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/index.d.ts +1 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
- package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +6 -432
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
- package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +12 -6
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
- package/dist/_dts/blocks/src/definitions.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +40 -0
- package/dist/_dts/blocks/src/server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
- package/dist/_dts/calendar/src/grid.d.ts +24 -66
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/calendar/src/timetable.d.ts +5 -9
- package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
- package/dist/_dts/core/src/slug.d.ts +20 -5
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
- package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
- package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
- package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
- package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
- package/dist/client/{accordion-KIDsKTwS.mjs → accordion-CK29E8rG.mjs} +1 -1
- package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-DFvnet-N.mjs} +5 -5
- package/dist/client/bookings.mjs +86 -47
- package/dist/client/{carousel-YwUgyL66.mjs → carousel-BVU5NQlb.mjs} +1 -1
- package/dist/client/{cart-BbwuNrUT.mjs → cart-BNItcZVa.mjs} +3 -3
- package/dist/client/{checkout-hp1ucmEY.mjs → checkout-Bu6iCdkP.mjs} +3 -3
- package/dist/client/client.mjs +1950 -1031
- package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
- package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
- package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
- package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
- package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-CS7PHY7v.mjs} +3 -3
- package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
- package/dist/client/{form-D2KIyCVJ.mjs → form-RMpoLTyr.mjs} +2 -2
- package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
- package/dist/client/hooks.mjs +2225 -276
- package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
- package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
- package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-4SZCLhAf.mjs} +3 -3
- package/dist/client/{productList-T4Cii1ot.mjs → productList-D7AP4GNq.mjs} +3 -3
- package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pzBeCh14.mjs} +94 -24
- package/dist/client/rendering/client.mjs +758 -464
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +2126 -1244
- package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
- package/dist/client/{shop-B5zAcKZn.mjs → shop-Cp5p_kGe.mjs} +6 -6
- package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
- package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
- package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-BDf9ljkm.mjs} +3 -3
- package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +7 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +7 -0
- package/dist/preview-next/middleware.mjs +7 -0
- package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
- package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
- package/dist/{separator-CadhAtI7.mjs → separator-DaPLtJ1f.mjs} +1 -1
- package/dist/server/components.mjs +1527 -893
- package/dist/server/config-validation.mjs +65 -113
- package/dist/server/config.mjs +65 -113
- package/dist/server/data.mjs +65 -112
- package/dist/server/index.mjs +122 -4
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +1432 -708
- package/dist/server/page-converter.mjs +58 -91
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1682 -915
- package/dist/server/rendering.mjs +1694 -1020
- package/dist/server/routing.mjs +3230 -1843
- package/dist/server/server.mjs +21710 -19779
- package/dist/server/theme-bridge.mjs +656 -264
- package/dist/server/theme.mjs +2 -17
- package/dist/styles/index.css +609 -181
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and then gets the version it went out in.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
### Breaking: manifest content uses explicit trust stages (#1245)
|
|
11
|
+
|
|
12
|
+
- SDK rendering now exposes `RenderablePageOutline` values whose blocks carry a
|
|
13
|
+
closed render-admission result. Valid blocks contain renderable content;
|
|
14
|
+
invalid content or an unavailable manifest remains represented as an invalid
|
|
15
|
+
block admission so hosts can diagnose it without receiving rejected content.
|
|
16
|
+
- `EditorPageRenderer` is the explicit raw/incomplete editor entrypoint. The
|
|
17
|
+
production renderer no longer accepts the `usePlaceholders` trust-stage
|
|
18
|
+
switch.
|
|
19
|
+
- The JSON transport remains record-shaped, but consumers constructing or
|
|
20
|
+
inspecting renderer page outlines must handle the new admission contract.
|
|
21
|
+
No deprecated aliases or compatibility mode are retained.
|
|
22
|
+
|
|
10
23
|
### Routable content includes native page surfaces (#1332)
|
|
11
24
|
|
|
12
25
|
- **`RoutableContentItem` is now a discriminated union.** The public routable-
|
package/README.md
CHANGED
|
@@ -1135,16 +1135,12 @@ const { baseUrl } = getRiverbankEnv();
|
|
|
1135
1135
|
pageId="page-456"
|
|
1136
1136
|
previewStage="preview" // or "published"
|
|
1137
1137
|
client={client}
|
|
1138
|
-
|
|
1139
|
-
// Editor-mid-edit fallback: when strict manifest validation fails (e.g.
|
|
1140
|
-
// a required field is temporarily empty), retry against a relaxed
|
|
1141
|
-
// validator over the same content so valid in-flight fields still
|
|
1142
|
-
// render instead of flipping the block to the red "Invalid content"
|
|
1143
|
-
// fallback. Leave unset (or `false`) for production frontends.
|
|
1144
|
-
usePlaceholders={true}
|
|
1145
1138
|
/>
|
|
1146
1139
|
```
|
|
1147
1140
|
|
|
1141
|
+
`Block` uses strict manifest validation. Editor-owned incomplete draft previews
|
|
1142
|
+
must use the editor renderer rather than weakening this production boundary.
|
|
1143
|
+
|
|
1148
1144
|
### CTA Links with Page/Entry Identifiers
|
|
1149
1145
|
|
|
1150
1146
|
Block content can reference pages and content entries using stable identifiers instead of UUIDs. These links are resolved at render time:
|
|
@@ -2680,7 +2676,7 @@ The optional theme-independent wrapper belongs inside `rendering`: use `runtime:
|
|
|
2680
2676
|
|
|
2681
2677
|
`SiteResponse.theme` is required but nullable: `Theme | null`. A null value means the CMS has no theme; it does not select a rendering mode. Override-only rendering deliberately ignores it. Themed catch-all rendering first prefers explicit `theme`, `themes`, or `getTheme` inputs, then uses the CMS theme. If none resolves, it throws the exported `MissingSdkThemeError` with code `missing_sdk_theme` before theme parsing or token construction.
|
|
2682
2678
|
|
|
2683
|
-
The nullable contract
|
|
2679
|
+
The nullable contract was published before the server stopped supplying its temporary fallback. Externally pinned hosts must use that SDK contract and either opt into override-only rendering or provide a real local/CMS theme.
|
|
2684
2680
|
|
|
2685
2681
|
Keep the `server-only` marker at the top of the registry so Next.js turns an accidental Client Component import into a build error. `generateMetadata()` never receives or runs host loaders—even with `customMetadata`—so a normal request does not repeat host queries for metadata and rendering.
|
|
2686
2682
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as FooterComposerPanel, $a as
|
|
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 Monitor, $i as SelectItem, A as markApplySaved, Aa as Button, Ar as getHeaderStyle, B as resetTypographyToSaved, Ba as X$1, Bt as useEditorUiStoreInstance, C as applyTypographyDraftPatch, Ca as DropdownMenu, Ci as updateButtonStyleHoverPreference, D as dismissWarnings, Da as DropdownMenuSeparator, E as deriveStyleConfiguratorCapabilities, Ea as DropdownMenuLabel, Ei as themeButtonClassName, En as ThemeScope, Er as getCuratedSiteStyle, F as previewCuratedPalette, Fi as paletteColorsSchema, H as styleConfiguratorHistoryEntryForPersistedSelection, I as previewFooterLook, Ia as assertNever$1, Ir as curatedPalettes, Ka as Smartphone, L as previewHeaderLayout, M as openRow, Ma as cn, Mi as VARIANT_ROLES, N as palettePreviewProjection, Nt as BlockEditor, O as isPreviewingChange, Oa as DropdownMenuTrigger, Or as findFooterLook, P as previewButtonStyle, Pa as unsafeAsEditorBlockId, Pi as paletteColorEntries, Q as resolvePreviewSidebarTab, Qi as SelectContent, R as previewHeaderStyle, S as applyResolvedSelections, Sa as Surface, Si as resolveButtonStyleSelection, T as createStyleConfiguratorState, Ta as DropdownMenuItem, Ti as buttonStyleSelectionKey, U as syncStyleConfiguratorState, V as setPaletteColors, W as toggleRow, Wa as Tablet, Z as createOptimisticActionRunner, Zi as Select, _ as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, _n as listEntryPageContentSlots, aa as Popover, an as resolveContentTitle, at as useUISelector, b as cycleSiteChromeSelectionId, ba as CollapsibleContent, bi as buttonStyleSelectionParameterValue, c as selectionSnapshotFromApplySiteStyleSelectionResponse, ca as Input, cn as ManifestForm, co as ChevronDown, ct as useEntryController, d as resolveStyleConfiguratorInitialSnapshot, da as TabsList, dn as FormRenderer, ea as SelectTrigger, eo as Maximize2, fa as TabsTrigger, ia as SearchInput, in as resolvePageRouteSlug, it as ContentFieldsForm, j as markApplySaving, k as markApplyFailed, kr as getHeaderLayout, l as deriveSiteStylePreviewUpdate, la as Tabs, lo as Check, n as useSiteChromeCustomizeOptional, na as Callout, oa as PopoverContent, oo as ChevronRight, p as usePreviewDesignCoordinator, pn as createStoreBackend, qa as SlidersHorizontal, ra as CalloutDescription, rn as deriveRouteMetadataPresentation, s as buildApplySiteStyleSelectionBody, sa as PopoverTrigger, so as ChevronLeft, ta as SelectValue, tn as isAdapterReferenceKind, to as LoaderCircle, u as planSiteStylePreviewChange, ua as TabsContent, un as createManifestValidation, v as reportPreviewDesignError, w as cancelPreview, wa as DropdownMenuContent, wi as updateButtonStyleSelectionChoice, wr as curatedSiteStyles, x as planSiteChromeSelection, xa as CollapsibleTrigger, xi as findButtonStyleRecipe, y as buildSiteChromeSelectionModels, ya as Collapsible, yi as buttonStyleHoverPreferenceValue, z as previewSiteStyle, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-B6d5zkog.mjs";
|
|
3
|
+
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-DbqBol0V.mjs";
|
|
4
|
+
import { t as Separator } from "./separator-DaPLtJ1f.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-CnWmj-2B.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Aa as
|
|
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 { Aa as Button, At as useEditor, Bt as useEditorUiStoreInstance, Ca as DropdownMenu, Ga as Sparkles, Ha as Undo2, Ji as Tooltip, Ma as cn, Oa as DropdownMenuTrigger, Qa as Palette, Rt as classifyHistoryShortcut, Ta as DropdownMenuItem, Ua as TriangleAlert, Xa as Pencil, Xi as TooltipTrigger, Xt as useMultiAutosave, Ya as Redo2, Yi as TooltipContent, Za as PenLine, _a as DialogHeader, a as previewDesignHistoryDomainForCommand, ao as EllipsisVertical, co as ChevronDown, ha as DialogDescription, i as usePreviewDesignHistoryOrder, io as Eye, ja as cva, lt as useEntryEditorController, ma as DialogContent, n as useSiteChromeCustomizeOptional, o as selectPreviewDesignHistoryDomain, pa as Dialog, to as LoaderCircle, va as DialogTitle, wa as DropdownMenuContent, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-B6d5zkog.mjs";
|
|
3
|
+
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-DbqBol0V.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-CnWmj-2B.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-DbqBol0V.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 SelectItem, $n as ImageResolveContextProvider, $r as runTransforms, $t as createSnapshotFromPageRecord, Aa as Button, Ai as asDesignBlockId, An as getResponsiveScopeSpec, At as useEditor, Ba as X, Bi as SdkConfigProvider, Bn as resolveEntryRouteTarget, Br as sectionTransitionVariantForBoundaryOptionId, Bt as useEditorUiStoreInstance, Cn as useMediaEditorOptional, Cr as componentRuntimeRulesForTheme, Ct as MediaField, Di as parseThemeForPersistence, Dn as containerResponsiveThemeCss, Dr as surfaceResolutionContextFromTheme, Dt as RichTextField, En as ThemeScope, Et as useRichTextImagePicker, Fa as unsafeAsEditorBlockValues, Fn as getDefaultComponentRegistry, Fr as parseGradientPresetId, Ft as prepareBlockEditorManifest, G as beginAutosaveBatch, Gi as unmapValueFromSelect, Gn as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Gr as ctaButton, Gt as pushHistoryEntry, Hi as hasEmptyOption, Hn as resolveRouteTarget, Hr as backgroundAppearanceQuickColorTokenNames, Ht as canRedoHistory, Ia as assertNever$2, Ii as ORDINARY_TEXT_MIN_CONTRAST_RATIO, In as LINKED_CONTENT_ENTRY_META_KEY, It as stripTopLevelRoutingUi, J as enqueueTransaction, Ja as RotateCcw, Jn as visibleHeaderClearancePx, Jr as eventCalendarListLayoutOptions, Jt as unsafeAsLinkedContentEntryId, K as confirmAutosaveBatch, Ki as FieldFrame, Kn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, Kr as bindingSchema, Kt as redoHistory, La as expectParsedBrandedId, Li as BlockApiProvider, Ln as coerceLinkedContentEntriesPayload, Lr as defaultSectionTransitionVariantForFamily, Lt as getBlockManifestFromSdkConfig, Ma as cn, Mn as createCustomBlockRegistry, Mr as GRADIENT_PRESETS, Mt as LinkWidgetProvider, Na as parseFooterModuleId, Ni as textColorStyle, Nn as makeDefaultBlockComponent, Nr as GRADIENT_PRESET_IDS, Oi as isThemeV2NormalEditorRawStyleFieldName, On as buildThemeRuntime, Ot as RichTextWidgetProvider, Pa as unsafeAsEditorBlockId, Pn as readBlockComposition, Pr as getGradientPreset, Pt as hideThemeV2RawStyleFields, Q as resolvePreviewSidebarTab, Qi as SelectContent, Qn as clientComponentRegistry, Qr as parseBackgroundContent, Qt as createRoutingHelpers, Ra as parseMediaAssetId, Ri as getFieldIntent, Rn as getLinkedContentEntryMeta, Rr as sectionTransitionFamilies, Sn as MediaEditorContextProvider, Sr as planPageDesignLayoutLookCompatibility, St as FileField, Tn as isSupportedLoaderEndpoint, Tr as designRuntimeRulesForTheme, Tt as ReferenceWidgetProvider, Ui as mapCurrentValueForSelect, Un as getBlockDefinition, Ur as parseBackgroundAppearanceColorToken, Ut as canUndoHistory, Va as Upload, Vi as useSdkConfig, Vn as resolvePageRouteTarget, Vr as backgroundAppearanceColorTokenNames, Vt as useOptionalEditorUiStoreInstance, Wi as mapOptionValueForSelect, Wn as projectRecurringSchedule, Wr as defaultThemeTokens, Wt as createHistoryState, X as rejectAutosaveBatch, Xn as compileManifestContentContract, Y as idleEditorTransactionQueueState, Yn as resolveVariantKey, Yr as bookingConsentCarrierSchema, Yt as recordsEqual, Zi as Select, Zn as validateManifestDraft, Zr as planSiteChromePlacement, Zt as useDebouncedLatestSave, _ as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, _a as DialogHeader, _i as getAtPath, _r as formatSiteChromeBackgroundTokenLabel, _t as IconPickerField, ai as isRecord$13, ar as blogFeaturedPostFragment, at as useUISelector, bn as deriveLaunchReadiness, br as retargetCompiledBoundaryRuntimeForContentAdjacency, bt as ButtonVariantField, ci as isInlineTextEmpty, cr as formCopyFragment, da as TabsList, di as buildResolveImageUrlContext, dn as FormRenderer, dr as ctaCopyFragment, dt as createSiteOptionWidgetAdapters, ea as SelectTrigger, ei as parseBlockIconValue, en as BUILT_IN_REFERENCE_KINDS, er as richTextFragment, et as renderSiteChromeBlock, f as PreviewDesignCoordinatorProvider, fa as TabsTrigger, fi as getCurrentResolveImageUrlContext, fn as evaluateVisibility, fr as heroCtaRowFragment, ft as SiteOptionPickerField, g as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, ga as DialogFooter, gi as attachRenderableMediaAssetFields, gn as getPageDesignEditorState, gr as defineFragment, gt as InlineTextField, h as usePreviewThemeOverlay, ha as DialogDescription, hi as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, hn as applyPageDesignEditorAction, hr as bodyCopyFragment, ht as OfferingsPreviewWidgetProvider, i as usePreviewDesignHistoryOrder, ii as isObjectRecord, ir as faqHeadingFragment, ji as assertNever$1, jn as escapeStyleContent, jr as gradientToCss, jt as LinkField, ki as pageDesignEditorBackgroundOverrideOwner, kn as DEFAULT_THEME_RESPONSIVE_MODE, kt as EditorProvider, la as Tabs, li as Text$1, ln as createManifestFormAdapter, lr as testimonialsCarouselFragment, lt as useEntryEditorController, m as PreviewThemeOverlayProvider, ma as DialogContent, mi as setContextResolveImageUrlContext, mn as MediaEditor, mr as heroCopyFragment, mt as OfferingsPreviewGroupOrderField, n as useSiteChromeCustomizeOptional, ni as parseGeneratedIconSetId, nn as parseReferenceKind, no as Image, nr as cardFragment, nt as PreviewInlineTextEditor, oi as coerceInlineTextWithFallback, on as PaletteProvider, oo as ChevronRight, or as singleButtonFragment, ot as EditableBlockProvider, pa as Dialog, pi as resolveImageUrlWithContext, pn as createStoreBackend, pr as ctaRowFragment, pt as SiteOptionWidgetProvider, q as deriveTransactionCapabilities, qi as useField, qn as planSiteOverlayHeaderClearance, qr as eventCalendarListLayoutCompatibleDisplayModeValues, qt as undoHistory, r as PreviewDesignHistoryOrderProvider, ri as renderInlineText, ro as GripVertical, rr as faqAccordionFragment, rt as PreviewTextEditor, si as inlineTextToPlainText, sn as usePalette, so as ChevronLeft, sr as formEmbedFragment, st as EntryControllerProvider, t as SiteChromeCustomizeProvider, ta as SelectValue, ti as parseGeneratedIconAssetId, tr as headingFragment, tt as PreviewRichTextEditor, ua as TabsContent, ui as RichText$1, uo as __exportAll, ur as testimonialsHeadingFragment, ut as createSiteOptionApiLoader, v as reportPreviewDesignError, va as DialogTitle, vi as siblingPath, vn as decodePublicProductCategorySelectorQuery, vr as applyCompiledRuntimeFieldsToContent, vt as EntryPickerField, wn as useApiMediaUploader, wt as ReferenceField, xn as AMBIENT_BACKGROUND_ROLES, xr as retargetCompiledRuntimeFieldsForContentAdjacency, xt as ButtonWidgetProvider, yn as DEFAULT_LAUNCH_READINESS_INPUT, yr as compileEditorModelRuntime, yt as EntryPickerWidgetProvider, za as parseSiteId, zi as isHeaderField, zn as defaultTransforms, zr as sectionTransitionFamilyForBoundaryOptionId, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-B6d5zkog.mjs";
|
|
3
|
+
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-wbEpXryy.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-DbqBol0V.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";
|
|
@@ -573,9 +573,28 @@ function pageBlockPosition(index, blockCount) {
|
|
|
573
573
|
return "middle";
|
|
574
574
|
}
|
|
575
575
|
//#endregion
|
|
576
|
+
//#region ../blocks/src/pageRenderAdmission.ts
|
|
577
|
+
function toEditorPresentationPage(page) {
|
|
578
|
+
if (!page) return null;
|
|
579
|
+
return {
|
|
580
|
+
...page,
|
|
581
|
+
blocks: page.blocks.map((block) => ({
|
|
582
|
+
...block,
|
|
583
|
+
presentationAdmission: { kind: "editor" }
|
|
584
|
+
}))
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
//#endregion
|
|
576
588
|
//#region ../blocks/src/PageRenderer.tsx
|
|
577
|
-
function
|
|
578
|
-
const
|
|
589
|
+
function EditorPageRenderer(props) {
|
|
590
|
+
const page = React$1.useMemo(() => toEditorPresentationPage(props.page), [props.page]);
|
|
591
|
+
return /* @__PURE__ */ jsx(PageRendererCore, {
|
|
592
|
+
...props,
|
|
593
|
+
page
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
function PageRendererCore(props) {
|
|
597
|
+
const { page, runtimeBoundaries, dataContext, wrapBlock, wrapBoundary, registry } = props;
|
|
579
598
|
const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
|
|
580
599
|
dataContext?.imageResolveContext,
|
|
581
600
|
dataContext?.mediaAssets,
|
|
@@ -674,11 +693,11 @@ function resolvePageRendererImageResolveContext(dataContext) {
|
|
|
674
693
|
mediaAssets: input?.mediaAssets ?? dataContext?.mediaAssets
|
|
675
694
|
});
|
|
676
695
|
}
|
|
696
|
+
const resolveBookingTimeZone = (dataContext) => dataContext?.bookingTimeZone;
|
|
677
697
|
function buildBlockSectionProps(input) {
|
|
678
698
|
return {
|
|
679
699
|
themeResources: input.themeResources,
|
|
680
700
|
block: input.block,
|
|
681
|
-
usePlaceholders: input.props.usePlaceholders ?? false,
|
|
682
701
|
dataContext: input.props.dataContext,
|
|
683
702
|
blockKey: input.blockKey,
|
|
684
703
|
registry: input.registry,
|
|
@@ -702,7 +721,6 @@ function getBlockOverride(blockKind, overrides) {
|
|
|
702
721
|
if (overrides[shortKind]) return overrides[shortKind];
|
|
703
722
|
}
|
|
704
723
|
const blockComponentCache = /* @__PURE__ */ new WeakMap();
|
|
705
|
-
const manifestValidatorCache = /* @__PURE__ */ new WeakMap();
|
|
706
724
|
const DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS = 25;
|
|
707
725
|
let cachedPerfSlowBlockRenderThresholdMs = null;
|
|
708
726
|
function getPerfSlowBlockRenderThresholdMs() {
|
|
@@ -720,44 +738,13 @@ function getCachedBlockComponent(manifest) {
|
|
|
720
738
|
return created;
|
|
721
739
|
}
|
|
722
740
|
/**
|
|
723
|
-
* Render-time manifest validator — see `.claude/plans/dapper-jingling-emerson.md`
|
|
724
|
-
* Phase 10. One function, two flavours:
|
|
725
|
-
*
|
|
726
|
-
* - `strict` (default): the contract every render surface tries first. No
|
|
727
|
-
* null tolerance, no missing-required tolerance. Production frontends and
|
|
728
|
-
* the dashboard preview both go through this path; after Phases 6-9 the
|
|
729
|
-
* preview satisfies strict structurally.
|
|
730
|
-
* - `relaxed`: editor-mid-edit fallback. Reached via `usePlaceholders` when
|
|
731
|
-
* strict fails. Built on `mode: 'draft'` so empty required fields parse
|
|
732
|
-
* as `undefined` and the user's valid in-flight fields flow through.
|
|
733
|
-
*
|
|
734
|
-
* Per-manifest, per-flavour cached. Adding a third flavour means adding a
|
|
735
|
-
* branch to the `createManifestValidator` call below and a member to
|
|
736
|
-
* `ValidationFlavour` — no per-flavour helper duplication.
|
|
737
|
-
*/
|
|
738
|
-
function getCachedValidator(manifest, flavour) {
|
|
739
|
-
let perFlavour = manifestValidatorCache.get(manifest);
|
|
740
|
-
if (!perFlavour) {
|
|
741
|
-
perFlavour = /* @__PURE__ */ new Map();
|
|
742
|
-
manifestValidatorCache.set(manifest, perFlavour);
|
|
743
|
-
}
|
|
744
|
-
const cached = perFlavour.get(flavour);
|
|
745
|
-
if (cached) return cached;
|
|
746
|
-
const created = createManifestValidator(manifest, {
|
|
747
|
-
allowNull: false,
|
|
748
|
-
...flavour === "relaxed" ? { mode: "draft" } : {}
|
|
749
|
-
});
|
|
750
|
-
perFlavour.set(flavour, created);
|
|
751
|
-
return created;
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
741
|
* Memoized block section component.
|
|
755
742
|
*
|
|
756
743
|
* Custom memoization prevents render loops during editing by explicitly checking
|
|
757
744
|
* referential equality of all props that affect rendering. Standard React.memo
|
|
758
745
|
* wouldn't catch all the render triggers from the editor store.
|
|
759
746
|
*/
|
|
760
|
-
const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, block,
|
|
747
|
+
const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, block, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
|
|
761
748
|
const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
|
|
762
749
|
const fallbackImageResolveContext = getCurrentResolveImageUrlContext();
|
|
763
750
|
const resolvedImageResolveContext = imageResolveContext ?? fallbackImageResolveContext;
|
|
@@ -777,6 +764,19 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
777
764
|
} catch {}
|
|
778
765
|
return node;
|
|
779
766
|
}
|
|
767
|
+
if (block.presentationAdmission.kind === "invalid") {
|
|
768
|
+
try {
|
|
769
|
+
if (globalThis.process?.env?.NODE_ENV !== "production") console.warn("[blocks:PageRenderer] block admission failed", {
|
|
770
|
+
blockId: block.id ?? null,
|
|
771
|
+
blockKind: block.kind,
|
|
772
|
+
error: block.presentationAdmission.error
|
|
773
|
+
});
|
|
774
|
+
} catch {}
|
|
775
|
+
return finish(fallback(`Invalid content for block kind "${block.kind}".`), {
|
|
776
|
+
outcome: "invalidContent",
|
|
777
|
+
override: false
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
780
|
const OverrideComponent = getBlockOverride(block.kind, blockOverrides);
|
|
781
781
|
requireBlockOverride(themeResources, OverrideComponent, block.kind);
|
|
782
782
|
let definition = getBlockDefinition(block.kind);
|
|
@@ -846,25 +846,10 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
848
|
const content = getRenderableContent(block, dataContext?.previewStage);
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
blockKind: block.kind,
|
|
854
|
-
content: summarizeValue(content),
|
|
855
|
-
expectedFields: (definition.manifest.fields ?? []).map((f) => ({
|
|
856
|
-
id: f.id,
|
|
857
|
-
type: f.type,
|
|
858
|
-
required: !!f.required
|
|
859
|
-
})),
|
|
860
|
-
issues: parsed.error?.issues ?? null
|
|
861
|
-
});
|
|
862
|
-
} catch {}
|
|
863
|
-
let data;
|
|
864
|
-
if (parsed.success) data = parsed.data;
|
|
865
|
-
else if (usePlaceholders) {
|
|
866
|
-
const relaxed = getCachedValidator(definition.manifest, "relaxed").safeParse(content);
|
|
867
|
-
if (relaxed.success) data = relaxed.data;
|
|
849
|
+
let data = content;
|
|
850
|
+
if (block.presentationAdmission.kind === "editor") {
|
|
851
|
+
const draft = validateManifestDraft(compileManifestContentContract(definition.manifest), content);
|
|
852
|
+
if (draft.kind === "previewable") data = draft.data;
|
|
868
853
|
else {
|
|
869
854
|
const rendered = fallback(`Unable to render block kind "${block.kind}".`);
|
|
870
855
|
return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
|
|
@@ -872,12 +857,6 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
872
857
|
override: false
|
|
873
858
|
});
|
|
874
859
|
}
|
|
875
|
-
} else {
|
|
876
|
-
const rendered = fallback(`Invalid content for block kind "${block.kind}".`);
|
|
877
|
-
return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
|
|
878
|
-
outcome: "invalidContent",
|
|
879
|
-
override: false
|
|
880
|
-
});
|
|
881
860
|
}
|
|
882
861
|
try {
|
|
883
862
|
const routes = routeMap ?? dataContext?.routes;
|
|
@@ -903,6 +882,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
903
882
|
blockId: block.id ?? null,
|
|
904
883
|
blockKind: block.kind
|
|
905
884
|
};
|
|
885
|
+
baseProps.bookingTimeZone = resolveBookingTimeZone(dataContext);
|
|
906
886
|
let rendered;
|
|
907
887
|
if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...baseProps });
|
|
908
888
|
else {
|
|
@@ -949,14 +929,14 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
949
929
|
hasResolvedData
|
|
950
930
|
});
|
|
951
931
|
} catch {
|
|
952
|
-
const rendered =
|
|
932
|
+
const rendered = block.presentationAdmission.kind === "editor" ? fallback(`Unable to render block kind "${block.kind}".`) : fallback(`Invalid content for block kind "${block.kind}".`);
|
|
953
933
|
return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
|
|
954
934
|
outcome: "exception",
|
|
955
935
|
override: false
|
|
956
936
|
});
|
|
957
937
|
}
|
|
958
938
|
}, (prev, next) => {
|
|
959
|
-
return prev.block === next.block && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.
|
|
939
|
+
return prev.block === next.block && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.block.presentationAdmission === next.block.presentationAdmission && prev.wrapBlock === next.wrapBlock && prev.blockOverrides === next.blockOverrides && prev.sdkConfig === next.sdkConfig && prev.customBlocks === next.customBlocks && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
|
|
960
940
|
});
|
|
961
941
|
function fallback(message) {
|
|
962
942
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -983,32 +963,6 @@ function getRenderableContent(block, previewStage = "published") {
|
|
|
983
963
|
if (!isObjectRecord(source)) return {};
|
|
984
964
|
return source;
|
|
985
965
|
}
|
|
986
|
-
function summarizeValue(value) {
|
|
987
|
-
try {
|
|
988
|
-
if (value === null || value === void 0) return value;
|
|
989
|
-
if (typeof value === "string") return value.length > 160 ? `${value.slice(0, 160)}…` : value;
|
|
990
|
-
if (typeof value === "number" || typeof value === "boolean") return value;
|
|
991
|
-
if (Array.isArray(value)) return `[array(${value.length})]`;
|
|
992
|
-
if (typeof value === "object") {
|
|
993
|
-
const rec = value;
|
|
994
|
-
const keys = Object.keys(rec);
|
|
995
|
-
const preview = {};
|
|
996
|
-
for (const k of keys.slice(0, 8)) {
|
|
997
|
-
const v = rec[k];
|
|
998
|
-
if (k === "body" || k === "content") preview[k] = !!(v && typeof v === "object" && isObjectRecord(v) && v.type === "doc") ? "{type:doc}" : summarizeValue(v);
|
|
999
|
-
else preview[k] = summarizeValue(v);
|
|
1000
|
-
}
|
|
1001
|
-
return {
|
|
1002
|
-
keys,
|
|
1003
|
-
preview
|
|
1004
|
-
};
|
|
1005
|
-
}
|
|
1006
|
-
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint" || typeof value === "symbol") return String(value);
|
|
1007
|
-
return "[uninspectable]";
|
|
1008
|
-
} catch {
|
|
1009
|
-
return "[uninspectable]";
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
966
|
//#endregion
|
|
1013
967
|
//#region ../theme-core/src/fonts/types.ts
|
|
1014
968
|
/**
|
|
@@ -8348,10 +8302,10 @@ function resolveShellThemeRoles(props) {
|
|
|
8348
8302
|
}
|
|
8349
8303
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
8350
8304
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
8351
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
8305
|
+
return { default: (await import("./PreviewEditorSidebar-BU5ZlhQR.mjs")).PreviewEditorSidebar };
|
|
8352
8306
|
});
|
|
8353
8307
|
const PreviewEditorUI = React.lazy(async () => {
|
|
8354
|
-
return { default: (await import("./PreviewEditorUI-
|
|
8308
|
+
return { default: (await import("./PreviewEditorUI-9XkHL-bC.mjs")).PreviewEditorUI };
|
|
8355
8309
|
});
|
|
8356
8310
|
const previewPaneContainmentStyle = {
|
|
8357
8311
|
contain: "layout paint",
|
|
@@ -10782,7 +10736,7 @@ function EditablePageRenderer(props) {
|
|
|
10782
10736
|
linkedEntryDataContext,
|
|
10783
10737
|
liveResolvedData
|
|
10784
10738
|
]);
|
|
10785
|
-
return /* @__PURE__ */ jsx(
|
|
10739
|
+
return /* @__PURE__ */ jsx(EditorPageRenderer, {
|
|
10786
10740
|
...pageRendererProps,
|
|
10787
10741
|
page: renderPage,
|
|
10788
10742
|
runtimeBoundaries,
|
|
@@ -10790,8 +10744,7 @@ function EditablePageRenderer(props) {
|
|
|
10790
10744
|
wrapBlock: allowInlineEditing ? wrapBlockWithProvider : pageRendererProps.wrapBlock,
|
|
10791
10745
|
wrapBoundary: allowInlineEditing ? wrapBoundaryWithControl : pageRendererProps.wrapBoundary,
|
|
10792
10746
|
dataContext,
|
|
10793
|
-
previewAuthoring
|
|
10794
|
-
usePlaceholders: true
|
|
10747
|
+
previewAuthoring
|
|
10795
10748
|
});
|
|
10796
10749
|
}
|
|
10797
10750
|
function retargetRuntimeBoundariesForRenderPage(boundaries, page) {
|
|
@@ -11169,7 +11122,6 @@ function SdkPreviewModeRuntime(props) {
|
|
|
11169
11122
|
const editablePage = model.rendering.kind === "overrides-only" ? /* @__PURE__ */ jsx(EditablePageRenderer, {
|
|
11170
11123
|
rendering: { kind: "overrides-only" },
|
|
11171
11124
|
page,
|
|
11172
|
-
usePlaceholders: false,
|
|
11173
11125
|
dataContext,
|
|
11174
11126
|
routeMap,
|
|
11175
11127
|
blockOverrides: typedBlockOverrides ?? {},
|
|
@@ -11178,7 +11130,6 @@ function SdkPreviewModeRuntime(props) {
|
|
|
11178
11130
|
}) : /* @__PURE__ */ jsx(EditablePageRenderer, {
|
|
11179
11131
|
theme: requireSdkPreviewTheme(model.theme),
|
|
11180
11132
|
page,
|
|
11181
|
-
usePlaceholders: false,
|
|
11182
11133
|
dataContext,
|
|
11183
11134
|
routeMap,
|
|
11184
11135
|
blockOverrides: typedBlockOverrides ?? void 0,
|