@riverbankcms/sdk 0.135.0 → 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.
Files changed (153) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +4 -8
  3. package/dist/{PreviewEditorSidebar-roNY0GVy.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
  4. package/dist/{PreviewEditorUI-KboDbEh_.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
  5. package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
  6. package/dist/{SdkPreviewModeRuntime-DBrF7Caa.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
  7. package/dist/{SiteChromeCustomizeContext-DrIEpJKn.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2334 -1173
  8. package/dist/_dts/ai/src/contracts/proposals.d.ts +8 -554
  9. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +401 -2312
  10. package/dist/_dts/api/src/contentRuntime.d.ts +6 -0
  11. package/dist/_dts/api/src/endpoints.d.ts +7 -0
  12. package/dist/_dts/api/src/index.d.ts +1 -0
  13. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  14. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
  15. package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
  16. package/dist/_dts/api/src/sdkThemeWire.d.ts +6 -432
  17. package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
  18. package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
  19. package/dist/_dts/blocks/src/PageRenderer.d.ts +12 -6
  20. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
  21. package/dist/_dts/blocks/src/definitions.d.ts +14 -0
  22. package/dist/_dts/blocks/src/index.d.ts +4 -3
  23. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +40 -0
  24. package/dist/_dts/blocks/src/server.d.ts +2 -2
  25. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +25 -0
  26. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
  27. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
  28. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
  29. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
  30. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  32. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  33. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  34. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
  35. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
  36. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  37. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
  38. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
  41. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
  42. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
  46. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +19 -1
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
  54. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
  55. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
  56. package/dist/_dts/calendar/src/grid.d.ts +24 -66
  57. package/dist/_dts/calendar/src/index.d.ts +2 -2
  58. package/dist/_dts/calendar/src/timetable.d.ts +5 -9
  59. package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
  60. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
  61. package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
  62. package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
  63. package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
  64. package/dist/_dts/core/src/slug.d.ts +20 -5
  65. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
  66. package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
  67. package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
  68. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
  69. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
  70. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
  71. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
  72. package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
  73. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
  74. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  75. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
  76. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
  77. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
  78. package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
  79. package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
  80. package/dist/_dts/sdk/src/version.d.ts +1 -1
  81. package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
  82. package/dist/_dts/theme-core/src/data.d.ts +12 -0
  83. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  84. package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
  85. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
  86. package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
  87. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
  88. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
  89. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
  90. package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
  91. package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
  92. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
  93. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
  94. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
  95. package/dist/client/{BookingConsentAgreement-BQqwi8Oa.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
  96. package/dist/client/{DiscountCodeDisclosure-B97aMo0V.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
  97. package/dist/client/{EventCombined.client-Bs2Iw9Q6.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
  98. package/dist/client/{EventListing.client-C4QUQdmg.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
  99. package/dist/client/{LeafletStaticMap-CwWRk69M.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
  100. package/dist/client/{accordion-BA0j8Mpw.mjs → accordion-CK29E8rG.mjs} +1 -1
  101. package/dist/client/{bookingForm-Br2e41H0.mjs → bookingForm-DFvnet-N.mjs} +5 -5
  102. package/dist/client/bookings.mjs +87 -47
  103. package/dist/client/{carousel-B4dmwnpD.mjs → carousel-BVU5NQlb.mjs} +1 -1
  104. package/dist/client/{cart-B_ckGW4b.mjs → cart-BNItcZVa.mjs} +3 -3
  105. package/dist/client/{checkout-DAyspHdf.mjs → checkout-Bu6iCdkP.mjs} +3 -3
  106. package/dist/client/client.mjs +1985 -1055
  107. package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
  108. package/dist/client/{eventCalendar-pJu3FUod.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
  109. package/dist/client/{eventCombined-B6Kacm9F.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
  110. package/dist/client/{eventDetails-CaX9z1pv.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
  111. package/dist/client/{eventListing-B9aXPO-I.mjs → eventListing-CS7PHY7v.mjs} +3 -3
  112. package/dist/client/{eventRegistration-CBSovBkg.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
  113. package/dist/client/{form-Cm0tu_7o.mjs → form-RMpoLTyr.mjs} +2 -2
  114. package/dist/client/{headerSection-OgRtHeKS.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
  115. package/dist/client/hooks.mjs +2254 -298
  116. package/dist/client/{locationMap-DmjcYqNM.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
  117. package/dist/client/{newsletterForm-D08OZQAC.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
  118. package/dist/client/{productDetail-BqZeu2P4.mjs → productDetail-4SZCLhAf.mjs} +3 -3
  119. package/dist/client/{productList-mNyIF9FG.mjs → productList-D7AP4GNq.mjs} +3 -3
  120. package/dist/client/{propsDecoder-DwHXRm9X.mjs → propsDecoder-pzBeCh14.mjs} +123 -46
  121. package/dist/client/rendering/client.mjs +793 -488
  122. package/dist/client/rendering/islands.mjs +17 -17
  123. package/dist/client/rendering.mjs +2161 -1268
  124. package/dist/client/{scrollToBlock-DtmdM3v-.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
  125. package/dist/client/{shop-CNjZK16F.mjs → shop-Cp5p_kGe.mjs} +6 -6
  126. package/dist/client/{shop-commerce-DkNNao1J.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
  127. package/dist/client/{shop-commerce-store-9WA--zuW.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
  128. package/dist/client/{shopShared-CHCVfccY.mjs → shopShared-BDf9ljkm.mjs} +3 -3
  129. package/dist/client/{useEventFilters-DvuaB4ZN.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
  130. package/dist/preview-next/before-render.mjs +7 -0
  131. package/dist/preview-next/client/runtime.mjs +4 -4
  132. package/dist/preview-next/keepAlive.mjs +7 -0
  133. package/dist/preview-next/middleware.mjs +7 -0
  134. package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
  135. package/dist/{sdk-runtime-3GhW4knb.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
  136. package/dist/{separator-D3bCWYYb.mjs → separator-DaPLtJ1f.mjs} +1 -1
  137. package/dist/server/components.mjs +1562 -917
  138. package/dist/server/config-validation.mjs +94 -135
  139. package/dist/server/config.mjs +94 -135
  140. package/dist/server/data.mjs +94 -134
  141. package/dist/server/index.mjs +122 -4
  142. package/dist/server/manifest.mjs +0 -1
  143. package/dist/server/next.mjs +1467 -732
  144. package/dist/server/page-converter.mjs +87 -113
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +1717 -939
  147. package/dist/server/rendering.mjs +1729 -1044
  148. package/dist/server/routing.mjs +3229 -1835
  149. package/dist/server/server.mjs +21739 -19801
  150. package/dist/server/theme-bridge.mjs +656 -264
  151. package/dist/server/theme.mjs +2 -17
  152. package/dist/styles/index.css +609 -181
  153. 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 must be published before the server stops supplying its temporary fallback. Externally pinned hosts must upgrade to this SDK contract and either opt into override-only rendering or provide a real local/CMS theme before that server cutover.
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 Maximize2, $i as SelectTrigger, A as markApplySaved, B as resetTypographyToSaved, Bt as useEditorUiStoreInstance, C as applyTypographyDraftPatch, Ca as DropdownMenuContent, Ci as updateButtonStyleSelectionChoice, Cr as curatedSiteStyles, D as dismissWarnings, Da as DropdownMenuTrigger, Dr as findFooterLook, E as deriveStyleConfiguratorCapabilities, Ea as DropdownMenuSeparator, En as ThemeScope, F as previewCuratedPalette, Fa as assertNever$1, Fr as curatedPalettes, Ga as Smartphone, H as styleConfiguratorHistoryEntryForPersistedSelection, I as previewFooterLook, Ka as SlidersHorizontal, L as previewHeaderLayout, M as openRow, N as palettePreviewProjection, Na as unsafeAsEditorBlockId, Ni as paletteColorEntries, Nt as BlockEditor, O as isPreviewingChange, Or as getHeaderLayout, P as previewButtonStyle, Pi as paletteColorsSchema, Q as resolvePreviewSidebarTab, Qa as Monitor, Qi as SelectItem, R as previewHeaderStyle, S as applyResolvedSelections, Sa as DropdownMenu, Si as updateButtonStyleHoverPreference, T as createStyleConfiguratorState, Ta as DropdownMenuLabel, Ti as themeButtonClassName, Tr as getCuratedSiteStyle, U as syncStyleConfiguratorState, Ua as Tablet, V as setPaletteColors, W as toggleRow, Xi as Select, Z as createOptimisticActionRunner, Zi as SelectContent, _ as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, _n as listEntryPageContentSlots, aa as PopoverContent, an as resolveContentTitle, ao as ChevronRight, at as useUISelector, b as cycleSiteChromeSelectionId, ba as CollapsibleTrigger, bi as findButtonStyleRecipe, c as selectionSnapshotFromApplySiteStyleSelectionResponse, ca as Tabs, cn as ManifestForm, co as Check, ct as useEntryController, d as resolveStyleConfiguratorInitialSnapshot, da as TabsTrigger, dn as FormRenderer, ea as SelectValue, eo as LoaderCircle, ia as Popover, in as resolvePageRouteSlug, it as ContentFieldsForm, j as markApplySaving, ja as cn, ji as VARIANT_ROLES, k as markApplyFailed, ka as Button, kr as getHeaderStyle, l as deriveSiteStylePreviewUpdate, la as TabsContent, n as useSiteChromeCustomizeOptional, na as CalloutDescription, oa as PopoverTrigger, oo as ChevronLeft, p as usePreviewDesignCoordinator, pn as createStoreBackend, ra as SearchInput, rn as deriveRouteMetadataPresentation, s as buildApplySiteStyleSelectionBody, sa as Input, so as ChevronDown, ta as Callout, tn as isAdapterReferenceKind, u as planSiteStylePreviewChange, ua as TabsList, un as createManifestValidation, v as reportPreviewDesignError, va as Collapsible, vi as buttonStyleHoverPreferenceValue, w as cancelPreview, wa as DropdownMenuItem, wi as buttonStyleSelectionKey, x as planSiteChromeSelection, xa as Surface, xi as resolveButtonStyleSelection, y as buildSiteChromeSelectionModels, ya as CollapsibleContent, yi as buttonStyleSelectionParameterValue, z as previewSiteStyle, za as X$1, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-DrIEpJKn.mjs";
3
- import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-C7ksxt5b.mjs";
4
- import { t as Separator } from "./separator-D3bCWYYb.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-DBrF7Caa.mjs";
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 cva, At as useEditor, Bt as useEditorUiStoreInstance, Ca as DropdownMenuContent, Da as DropdownMenuTrigger, Ha as TriangleAlert, Ja as Redo2, Ji as TooltipContent, Rt as classifyHistoryShortcut, Sa as DropdownMenu, Va as Undo2, Wa as Sparkles, Xa as PenLine, Xt as useMultiAutosave, Ya as Pencil, Yi as TooltipTrigger, Za as Palette, _a as DialogTitle, a as previewDesignHistoryDomainForCommand, eo as LoaderCircle, fa as Dialog, ga as DialogHeader, i as usePreviewDesignHistoryOrder, io as EllipsisVertical, ja as cn, ka as Button, lt as useEntryEditorController, ma as DialogDescription, n as useSiteChromeCustomizeOptional, o as selectPreviewDesignHistoryDomain, pa as DialogContent, qi as Tooltip, ro as Eye, so as ChevronDown, wa as DropdownMenuItem, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-DrIEpJKn.mjs";
3
- import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-C7ksxt5b.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-DBrF7Caa.mjs";
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-C7ksxt5b.mjs";
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 SelectTrigger, $n as richTextFragment, $r as parseBlockIconValue, $t as createSnapshotFromPageRecord, Ai as assertNever$1, An as getResponsiveScopeSpec, Ar as gradientToCss, At as useEditor, Ba as Upload, Bi as useSdkConfig, Bn as resolveEntryRouteTarget, Br as backgroundAppearanceColorTokenNames, Bt as useEditorUiStoreInstance, Cn as useMediaEditorOptional, Ct as MediaField, Di as isThemeV2NormalEditorRawStyleFieldName, Dn as containerResponsiveThemeCss, Dt as RichTextField, Ei as parseThemeForPersistence, En as ThemeScope, Er as surfaceResolutionContextFromTheme, Et as useRichTextImagePicker, Fa as assertNever$2, Fi as ORDINARY_TEXT_MIN_CONTRAST_RATIO, Fn as getDefaultComponentRegistry, Ft as prepareBlockEditorManifest, G as beginAutosaveBatch, Gi as FieldFrame, Gn as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Gr as bindingSchema, Gt as pushHistoryEntry, Hi as mapCurrentValueForSelect, Hn as resolveRouteTarget, Hr as parseBackgroundAppearanceColorToken, Ht as canRedoHistory, Ia as expectParsedBrandedId, Ii as BlockApiProvider, In as LINKED_CONTENT_ENTRY_META_KEY, Ir as defaultSectionTransitionVariantForFamily, It as stripTopLevelRoutingUi, J as enqueueTransaction, Jn as visibleHeaderClearancePx, Jr as bookingConsentCarrierSchema, Jt as unsafeAsLinkedContentEntryId, K as confirmAutosaveBatch, Ki as useField, Kn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, Kr as eventCalendarListLayoutCompatibleDisplayModeValues, Kt as redoHistory, La as parseMediaAssetId, Li as getFieldIntent, Ln as coerceLinkedContentEntriesPayload, Lr as sectionTransitionFamilies, Lt as getBlockManifestFromSdkConfig, Ma as parseFooterModuleId, Mi as textColorStyle, Mn as createCustomBlockRegistry, Mr as GRADIENT_PRESET_IDS, Mt as LinkWidgetProvider, Na as unsafeAsEditorBlockId, Nn as makeDefaultBlockComponent, Nr as getGradientPreset, Oi as pageDesignEditorBackgroundOverrideOwner, On as buildThemeRuntime, Ot as RichTextWidgetProvider, Pa as unsafeAsEditorBlockValues, Pn as readBlockComposition, Pr as parseGradientPresetId, Pt as hideThemeV2RawStyleFields, Q as resolvePreviewSidebarTab, Qi as SelectItem, Qn as ImageResolveContextProvider, Qr as runTransforms, Qt as createRoutingHelpers, Ra as parseSiteId, Ri as isHeaderField, Rn as getLinkedContentEntryMeta, Rr as sectionTransitionFamilyForBoundaryOptionId, Sn as MediaEditorContextProvider, Sr as componentRuntimeRulesForTheme, St as FileField, Tn as isSupportedLoaderEndpoint, Tt as ReferenceWidgetProvider, Ui as mapOptionValueForSelect, Un as getBlockDefinition, Ur as defaultThemeTokens, Ut as canUndoHistory, Vi as hasEmptyOption, Vn as resolvePageRouteTarget, Vr as backgroundAppearanceQuickColorTokenNames, Vt as useOptionalEditorUiStoreInstance, Wi as unmapValueFromSelect, Wn as projectRecurringSchedule, Wr as ctaButton, Wt as createHistoryState, X as rejectAutosaveBatch, Xi as Select, Xn as createManifestValidator, Xr as planSiteChromePlacement, Y as idleEditorTransactionQueueState, Yn as resolveVariantKey, Yt as recordsEqual, Zi as SelectContent, Zn as clientComponentRegistry, Zr as parseBackgroundContent, Zt as useDebouncedLatestSave, _ as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, _a as DialogTitle, _i as siblingPath, _r as applyCompiledRuntimeFieldsToContent, _t as IconPickerField, ai as coerceInlineTextWithFallback, ao as ChevronRight, ar as singleButtonFragment, at as useUISelector, bn as deriveLaunchReadiness, br as retargetCompiledRuntimeFieldsForContentAdjacency, bt as ButtonVariantField, ca as Tabs, ci as Text$1, cr as testimonialsCarouselFragment, da as TabsTrigger, di as getCurrentResolveImageUrlContext, dn as FormRenderer, dr as heroCtaRowFragment, dt as createSiteOptionWidgetAdapters, ea as SelectValue, ei as parseGeneratedIconAssetId, en as BUILT_IN_REFERENCE_KINDS, er as headingFragment, et as renderSiteChromeBlock, f as PreviewDesignCoordinatorProvider, fa as Dialog, fi as resolveImageUrlWithContext, fn as evaluateVisibility, fr as ctaRowFragment, ft as SiteOptionPickerField, g as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, ga as DialogHeader, gi as getAtPath, gn as getPageDesignEditorState, gr as formatSiteChromeBackgroundTokenLabel, gt as InlineTextField, h as usePreviewThemeOverlay, ha as DialogFooter, hi as attachRenderableMediaAssetFields, hn as applyPageDesignEditorAction, hr as defineFragment, ht as OfferingsPreviewWidgetProvider, i as usePreviewDesignHistoryOrder, ii as isRecord$13, ir as blogFeaturedPostFragment, ja as cn, jn as escapeStyleContent, jr as GRADIENT_PRESETS, jt as LinkField, ka as Button, ki as asDesignBlockId, kn as DEFAULT_THEME_RESPONSIVE_MODE, kt as EditorProvider, la as TabsContent, li as RichText$1, ln as createManifestFormAdapter, lo as __exportAll, lr as testimonialsHeadingFragment, lt as useEntryEditorController, m as PreviewThemeOverlayProvider, ma as DialogDescription, mi as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, mn as MediaEditor, mr as bodyCopyFragment, mt as OfferingsPreviewGroupOrderField, n as useSiteChromeCustomizeOptional, ni as renderInlineText, nn as parseReferenceKind, no as GripVertical, nr as faqAccordionFragment, nt as PreviewInlineTextEditor, oi as inlineTextToPlainText, on as PaletteProvider, oo as ChevronLeft, or as formEmbedFragment, ot as EditableBlockProvider, pa as DialogContent, pi as setContextResolveImageUrlContext, pn as createStoreBackend, pr as heroCopyFragment, pt as SiteOptionWidgetProvider, q as deriveTransactionCapabilities, qa as RotateCcw, qn as planSiteOverlayHeaderClearance, qr as eventCalendarListLayoutOptions, qt as undoHistory, r as PreviewDesignHistoryOrderProvider, ri as isObjectRecord, rr as faqHeadingFragment, rt as PreviewTextEditor, si as isInlineTextEmpty, sn as usePalette, sr as formCopyFragment, st as EntryControllerProvider, t as SiteChromeCustomizeProvider, ti as parseGeneratedIconSetId, to as Image, tr as cardFragment, tt as PreviewRichTextEditor, ua as TabsList, ui as buildResolveImageUrlContext, ur as ctaCopyFragment, ut as createSiteOptionApiLoader, v as reportPreviewDesignError, vn as decodePublicProductCategorySelectorQuery, vr as compileEditorModelRuntime, vt as EntryPickerField, wn as useApiMediaUploader, wr as designRuntimeRulesForTheme, wt as ReferenceField, xn as AMBIENT_BACKGROUND_ROLES, xr as planPageDesignLayoutLookCompatibility, xt as ButtonWidgetProvider, yn as DEFAULT_LAUNCH_READINESS_INPUT, yr as retargetCompiledBoundaryRuntimeForContentAdjacency, yt as EntryPickerWidgetProvider, za as X, zi as SdkConfigProvider, zn as defaultTransforms, zr as sectionTransitionVariantForBoundaryOptionId, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-DrIEpJKn.mjs";
3
- import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-DcgaESkm.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-C7ksxt5b.mjs";
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 PageRenderer(props) {
578
- const { page, runtimeBoundaries, usePlaceholders = false, dataContext, wrapBlock, wrapBoundary, registry, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring } = props;
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, usePlaceholders, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
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
- const parsed = getCachedValidator(definition.manifest, "strict").safeParse(content);
850
- try {
851
- if (globalThis.process?.env?.NODE_ENV !== "production" && !parsed.success && !usePlaceholders) console.warn("[blocks:PageRenderer] manifest validation failed", {
852
- blockId: block.id ?? null,
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 = usePlaceholders ? fallback(`Unable to render block kind "${block.kind}".`) : fallback(`Invalid content for block kind "${block.kind}".`);
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.usePlaceholders === next.usePlaceholders && prev.wrapBlock === next.wrapBlock && prev.blockOverrides === next.blockOverrides && prev.sdkConfig === next.sdkConfig && prev.customBlocks === next.customBlocks && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
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-roNY0GVy.mjs")).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-KboDbEh_.mjs")).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(PageRenderer, {
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,