@riverbankcms/sdk 0.135.1 → 0.137.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 (220) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/README.md +4 -8
  3. package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
  4. package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
  5. package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
  6. package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +621 -238
  7. package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +5041 -2407
  8. package/dist/_dts/ai/src/contracts/proposals.d.ts +18 -850
  9. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +412 -2316
  10. package/dist/_dts/ai/src/designer/themePatch.d.ts +5 -10
  11. package/dist/_dts/api/src/accessAdmin.d.ts +1 -9
  12. package/dist/_dts/api/src/accountApi.d.ts +49 -2
  13. package/dist/_dts/api/src/contentRuntime.d.ts +7 -4
  14. package/dist/_dts/api/src/domainConnection.d.ts +41 -0
  15. package/dist/_dts/api/src/endpoints.d.ts +201 -181
  16. package/dist/_dts/api/src/index.d.ts +5 -3
  17. package/dist/_dts/api/src/media.d.ts +19 -2
  18. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  19. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
  20. package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
  21. package/dist/_dts/api/src/sdkContracts.d.ts +2 -15
  22. package/dist/_dts/api/src/sdkMediaContracts.d.ts +40 -0
  23. package/dist/_dts/api/src/sdkMediaEndpointDefinitions.d.ts +61 -0
  24. package/dist/_dts/api/src/sdkThemeWire.d.ts +21 -436
  25. package/dist/_dts/api/src/siteInfrastructure.d.ts +17 -23
  26. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +7 -21
  27. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +27 -3
  28. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -17
  29. package/dist/_dts/api/src/types.d.ts +1 -1
  30. package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
  31. package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
  32. package/dist/_dts/blocks/src/PageRenderer.d.ts +13 -7
  33. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
  34. package/dist/_dts/blocks/src/definitions.d.ts +14 -0
  35. package/dist/_dts/blocks/src/index.d.ts +4 -3
  36. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +49 -0
  37. package/dist/_dts/blocks/src/pageRendererBlockSupport.d.ts +75 -0
  38. package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +2 -0
  39. package/dist/_dts/blocks/src/server.d.ts +2 -2
  40. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
  41. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
  42. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
  43. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
  44. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
  45. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  46. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +4 -2
  47. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  48. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  49. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
  50. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
  51. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  52. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +47 -21
  53. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +38 -9
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ErrorStep.d.ts +3 -5
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
  58. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -0
  59. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.d.ts +5 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +25 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +4 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +8 -3
  63. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -0
  64. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +5 -2
  65. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +2 -0
  66. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
  67. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
  68. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
  69. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
  70. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/capacity.d.ts +164 -0
  71. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/cta.d.ts +29 -0
  72. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +47 -0
  73. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +14 -0
  74. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/people.d.ts +6 -0
  75. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/pricing.d.ts +31 -0
  76. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
  77. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
  78. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
  79. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
  80. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/OfferingTitle.d.ts +11 -0
  81. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +4 -1
  82. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
  83. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
  84. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
  85. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +3 -1
  86. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listingLayout.d.ts +23 -0
  87. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
  88. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
  89. package/dist/_dts/calendar/src/grid.d.ts +24 -66
  90. package/dist/_dts/calendar/src/index.d.ts +2 -2
  91. package/dist/_dts/calendar/src/timetable.d.ts +5 -9
  92. package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
  93. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +57 -0
  94. package/dist/_dts/commerce/src/purchase/index.d.ts +3 -0
  95. package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
  96. package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
  97. package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
  98. package/dist/_dts/core/src/slug.d.ts +20 -5
  99. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +8 -40
  100. package/dist/_dts/db/src/index.d.ts +1 -0
  101. package/dist/_dts/db/src/utils/postgrestFilter.d.ts +2 -0
  102. package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +4 -0
  103. package/dist/_dts/media-core/src/fileDomain.d.ts +3 -0
  104. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
  105. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -0
  106. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
  107. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -2
  108. package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
  109. package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +1 -1
  110. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -0
  111. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlSaveRequest.d.ts +51 -0
  112. package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +24 -2
  113. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +23 -1
  114. package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +8 -0
  115. package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
  116. package/dist/_dts/sdk/src/public-api/contracts.d.ts +7 -2
  117. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
  118. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
  119. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
  120. package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
  121. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
  122. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  123. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
  124. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
  125. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
  126. package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
  127. package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
  128. package/dist/_dts/sdk/src/version.d.ts +1 -1
  129. package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
  130. package/dist/_dts/theme-core/src/data.d.ts +12 -0
  131. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  132. package/dist/_dts/theme-core/src/gradients/types.d.ts +5 -0
  133. package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +25 -2
  134. package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
  135. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -810
  136. package/dist/_dts/theme-core/src/schema.d.ts +460 -1285
  137. package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
  138. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +223 -1
  139. package/dist/_dts/theme-core/src/site-styles/headerBrandPresentation.d.ts +63 -0
  140. package/dist/_dts/theme-core/src/site-styles/headerBytesComparison.d.ts +30 -0
  141. package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +50 -1
  142. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +48 -38
  143. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
  144. package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
  145. package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
  146. package/dist/_dts/theme-core/src/site-styles/headerPreferences.d.ts +162 -0
  147. package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +73 -0
  148. package/dist/_dts/theme-core/src/site-styles/headerRecompile.d.ts +118 -0
  149. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +25 -2
  150. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
  151. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +168 -0
  152. package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
  153. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
  154. package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +20 -1
  155. package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +43 -2
  156. package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
  157. package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
  158. package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-CwJOxn7A.mjs} +274 -278
  159. package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
  160. package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
  161. package/dist/client/{accordion-KIDsKTwS.mjs → accordion-MGAO3PuE.mjs} +1 -1
  162. package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-CudlQPUu.mjs} +5 -5
  163. package/dist/client/bookings.mjs +476 -98
  164. package/dist/client/capacity-BW00PO7s.mjs +271 -0
  165. package/dist/client/{carousel-YwUgyL66.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
  166. package/dist/client/{cart-BbwuNrUT.mjs → cart-Bq5eU0xZ.mjs} +3 -3
  167. package/dist/client/{checkout-hp1ucmEY.mjs → checkout-BAFVRdrK.mjs} +3 -3
  168. package/dist/client/client.mjs +4641 -2721
  169. package/dist/client/{context-DljQn8L5.mjs → context-DCkiHVdD.mjs} +20 -5
  170. package/dist/client/dates-2RPXHQy4.mjs +264 -0
  171. package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-B0O-hPF7.mjs} +261 -126
  172. package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
  173. package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-D8GG2dnD.mjs} +7 -4
  174. package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-3ssV_bxz.mjs} +3 -3
  175. package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-bPQo3kVw.mjs} +610 -313
  176. package/dist/client/{form-D2KIyCVJ.mjs → form-qMv8RDkk.mjs} +2 -2
  177. package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
  178. package/dist/client/hooks.mjs +2514 -308
  179. package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-0_xlBnNI.mjs} +2 -2
  180. package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
  181. package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-FBEOM7jW.mjs} +3 -3
  182. package/dist/client/{productList-T4Cii1ot.mjs → productList-R0OSGhnn.mjs} +3 -3
  183. package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pYvx_Srl.mjs} +179 -401
  184. package/dist/client/rendering/client.mjs +3496 -2223
  185. package/dist/client/rendering/islands.mjs +17 -17
  186. package/dist/client/rendering.mjs +4400 -2510
  187. package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
  188. package/dist/client/{shop-B5zAcKZn.mjs → shop-RUG9DmRE.mjs} +6 -6
  189. package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
  190. package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
  191. package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-vXU1omwJ.mjs} +3 -3
  192. package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
  193. package/dist/preview-next/before-render.mjs +86 -51
  194. package/dist/preview-next/client/runtime.mjs +4 -4
  195. package/dist/preview-next/keepAlive.mjs +86 -51
  196. package/dist/preview-next/middleware.mjs +86 -51
  197. package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-L_cKW8Sb.mjs} +86 -51
  198. package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
  199. package/dist/{separator-CadhAtI7.mjs → separator-BIHkie5i.mjs} +1 -1
  200. package/dist/server/components.mjs +4397 -2960
  201. package/dist/server/config-validation.mjs +354 -145
  202. package/dist/server/config.mjs +354 -145
  203. package/dist/server/data.mjs +354 -144
  204. package/dist/server/index.mjs +201 -55
  205. package/dist/server/manifest.mjs +0 -1
  206. package/dist/server/next.mjs +4046 -2611
  207. package/dist/server/page-converter.mjs +225 -122
  208. package/dist/server/prebuild.mjs +1 -1
  209. package/dist/server/rendering/server.mjs +4105 -2636
  210. package/dist/server/rendering.mjs +4522 -3087
  211. package/dist/server/routing.mjs +3289 -1637
  212. package/dist/server/server.mjs +23175 -21079
  213. package/dist/server/theme-bridge.mjs +708 -272
  214. package/dist/server/theme.mjs +29 -25
  215. package/dist/styles/index.css +624 -181
  216. package/package.json +1 -1
  217. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +0 -48
  218. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +0 -17
  219. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +0 -100
  220. /package/dist/_dts/blocks/src/system/runtime/nodes/events/{shared → domain}/destination.d.ts +0 -0
@@ -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-61X2m7QV.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 confirmAutosaveBatch, 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 idleEditorTransactionQueueState, Ja as RotateCcw, Jn as visibleHeaderClearancePx, Jr as eventCalendarListLayoutOptions, Jt as unsafeAsLinkedContentEntryId, K as deriveTransactionCapabilities, 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, W as beginAutosaveBatch, Wi as mapOptionValueForSelect, Wn as projectRecurringSchedule, Wr as defaultThemeTokens, Wt as createHistoryState, Xn as compileManifestContentContract, Y as rejectAutosaveBatch, Yn as resolveVariantKey, Yr as bookingConsentCarrierSchema, Yt as recordsEqual, Zi as Select, Zn as validateManifestDraft, Zr as planSiteChromePlacement, Zt as useDebouncedLatestSave, _ as reportPreviewDesignError, _a as DialogHeader, _i as getAtPath, _r as applyCompiledRuntimeFieldsToContent, _t as IconPickerField, ai as isRecord$13, ar as blogFeaturedPostFragment, at as useUISelector, bn as deriveLaunchReadiness, br as retargetCompiledRuntimeFieldsForContentAdjacency, bt as ButtonVariantField, ci as isInlineTextEmpty, cr as formCopyFragment, d as PreviewDesignCoordinatorProvider, 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, fa as TabsTrigger, fi as getCurrentResolveImageUrlContext, fn as evaluateVisibility, fr as heroCtaRowFragment, ft as SiteOptionPickerField, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, ga as DialogFooter, gi as attachRenderableMediaAssetFields, gn as getPageDesignEditorState, gr as defineFragment, gt as InlineTextField, h as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, 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 usePreviewThemeOverlay, 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, p as PreviewThemeOverlayProvider, pa as Dialog, pi as resolveImageUrlWithContext, pn as createStoreBackend, pr as ctaRowFragment, pt as SiteOptionWidgetProvider, q as enqueueTransaction, 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, va as DialogTitle, vi as siblingPath, vn as decodePublicProductCategorySelectorQuery, vr as compileEditorModelRuntime, vt as EntryPickerField, wn as useApiMediaUploader, wt as ReferenceField, xn as AMBIENT_BACKGROUND_ROLES, xr as formatSiteChromeBackgroundTokenLabel, xt as ButtonWidgetProvider, yn as DEFAULT_LAUNCH_READINESS_INPUT, yr as retargetCompiledBoundaryRuntimeForContentAdjacency, yt as EntryPickerWidgetProvider, za as parseSiteId, zi as isHeaderField, zn as defaultTransforms, zr as sectionTransitionFamilyForBoundaryOptionId, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-BbkNSt5a.mjs";
3
+ import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-ztQUdsNo.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-L_cKW8Sb.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";
@@ -509,6 +509,32 @@ function isSiteStyleTransitionStyleGroup(value) {
509
509
  function boundaryMapForAdjacentBlockIds(boundaries) {
510
510
  return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
511
511
  }
512
+ /** Keep a surviving block's outgoing treatment when omitted blocks change its neighbor. */
513
+ function boundariesForSurvivingBlocks(boundaries, blocks) {
514
+ const outgoing = new Map(boundaries.map((boundary) => [boundary.previousBlockId, boundary]));
515
+ const incoming = new Map(boundaries.map((boundary) => [boundary.nextBlockId, boundary]));
516
+ return blocks.flatMap((block, index) => {
517
+ const next = blocks[index + 1];
518
+ if (!block.id || !next?.id) return [];
519
+ const boundary = outgoing.get(block.id);
520
+ if (!boundary) return [];
521
+ if (boundary.nextBlockId === next.id) return [boundary];
522
+ const destination = incoming.get(next.id);
523
+ return [retargetCompiledBoundaryRuntimeForContentAdjacency({
524
+ ...boundary,
525
+ boundaryId: `boundary:${block.id}:${next.id}`,
526
+ nextBlockId: next.id,
527
+ to: destination?.to ?? boundary.to,
528
+ cssVars: {
529
+ ...boundary.cssVars,
530
+ to: destination?.cssVars.to ?? boundary.cssVars.to
531
+ }
532
+ }, {
533
+ currentContent: block.content,
534
+ nextContent: next.content
535
+ })];
536
+ });
537
+ }
512
538
  function boundaryBetweenBlocks(previousBlock, nextBlock, boundaries) {
513
539
  const previousBlockId = previousBlock?.id ?? null;
514
540
  const nextBlockId = nextBlock?.id ?? null;
@@ -573,34 +599,185 @@ function pageBlockPosition(index, blockCount) {
573
599
  return "middle";
574
600
  }
575
601
  //#endregion
602
+ //#region ../blocks/src/pageRenderAdmission.ts
603
+ function toEditorPresentationPage(page) {
604
+ if (!page) return null;
605
+ return {
606
+ ...page,
607
+ blocks: page.blocks.map((block) => ({
608
+ ...block,
609
+ presentationAdmission: { kind: "editor" }
610
+ }))
611
+ };
612
+ }
613
+ //#endregion
614
+ //#region ../blocks/src/pageRendererBlockSupport.tsx
615
+ function fallback(message) {
616
+ return /* @__PURE__ */ jsx("div", {
617
+ className: "rb-p-6 rb-caption",
618
+ style: textColorStyle("mutedText"),
619
+ children: message
620
+ });
621
+ }
622
+ /**
623
+ * A page with nothing to show. Authoring surfaces get the diagnostic; a public
624
+ * page renders nothing at all rather than telling a visitor about the outline.
625
+ */
626
+ function emptyPageNotice(audience) {
627
+ if (audience === "public") return null;
628
+ return /* @__PURE__ */ jsx("div", {
629
+ className: "rb-p-6 rb-caption",
630
+ style: textColorStyle("mutedText"),
631
+ children: "No blocks found."
632
+ });
633
+ }
634
+ /**
635
+ * A public page dropped a block, so nothing in the rendered HTML says the
636
+ * content is missing. Say it in the logs instead.
637
+ */
638
+ function warnOmittedFromPublicPage(input) {
639
+ try {
640
+ console.warn("[blocks:PageRenderer] omitted a non-renderable block from a public page", {
641
+ blockId: input.block.id ?? null,
642
+ blockKind: input.block.kind,
643
+ outcome: input.outcome,
644
+ ...input.admissionError ? { error: input.admissionError } : {}
645
+ });
646
+ } catch {}
647
+ }
648
+ function shouldDebugCustomBlocks() {
649
+ try {
650
+ return globalThis.process?.env?.DEBUG_CUSTOM_BLOCKS === "1";
651
+ } catch {
652
+ return false;
653
+ }
654
+ }
655
+ /**
656
+ * Look up a block override component by block kind.
657
+ * Supports both full ("block.hero") and short ("hero") keys.
658
+ */
659
+ function getBlockOverride(blockKind, overrides) {
660
+ if (!overrides) return void 0;
661
+ if (overrides[blockKind]) return overrides[blockKind];
662
+ const shortKind = blockKind.replace(/^block\./, "");
663
+ if (overrides[shortKind]) return overrides[shortKind];
664
+ }
665
+ /**
666
+ * Resolves block content based on stage priority.
667
+ * For draft/preview: draftContent takes priority over content.
668
+ * For published: content is the source of truth.
669
+ * Returns empty object if no content exists (validator will handle placeholders if needed).
670
+ */
671
+ function getRenderableContent(block, previewStage = "published") {
672
+ const source = previewStage === "preview" && block.draftContent ? block.draftContent : block.content ?? {};
673
+ if (!isObjectRecord(source)) return {};
674
+ return source;
675
+ }
676
+ function resolvePageRendererImageResolveContext(dataContext) {
677
+ const input = dataContext?.imageResolveContext;
678
+ return buildResolveImageUrlContext({
679
+ siteId: input?.siteId ?? dataContext?.siteId,
680
+ supabaseUrl: input?.supabaseUrl ?? dataContext?.supabaseUrl,
681
+ mediaAssetIndex: input?.mediaAssetIndex,
682
+ mediaAssets: input?.mediaAssets ?? dataContext?.mediaAssets
683
+ });
684
+ }
685
+ /**
686
+ * The RSC-safe props every override component receives, whether the block
687
+ * resolved a manifest or is being rendered from an override alone.
688
+ */
689
+ function buildBlockOverrideProps(input) {
690
+ return {
691
+ content: input.content,
692
+ ...overrideThemeProps(input.themeResources),
693
+ ...blockOverrideContextProps(input.dataContext),
694
+ data: input.data,
695
+ imageResolveContext: input.imageResolveContext,
696
+ blockId: input.block.id ?? null,
697
+ blockKind: input.block.kind
698
+ };
699
+ }
700
+ /** The render-context half of the override props, absent context included. */
701
+ function blockOverrideContextProps(dataContext) {
702
+ const context = dataContext ?? {};
703
+ return {
704
+ siteId: context.siteId,
705
+ apiBaseUrl: context.apiBaseUrl,
706
+ bookingTimeZone: context.bookingTimeZone,
707
+ portalToken: context.portalToken ?? null,
708
+ previewToken: context.previewToken ?? null,
709
+ stage: context.previewStage,
710
+ occurrenceContext: context.occurrenceContext ?? null,
711
+ entrySubrouteContext: context.entrySubrouteContext ?? null,
712
+ contentEntry: context.contentEntry ?? null,
713
+ pageSurface: context.pageSurface ?? null,
714
+ subject: context.subject ?? null,
715
+ supabaseUrl: context.supabaseUrl
716
+ };
717
+ }
718
+ const blockComponentCache = /* @__PURE__ */ new WeakMap();
719
+ const DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS = 25;
720
+ let cachedPerfSlowBlockRenderThresholdMs = null;
721
+ function getPerfSlowBlockRenderThresholdMs() {
722
+ if (cachedPerfSlowBlockRenderThresholdMs !== null) return cachedPerfSlowBlockRenderThresholdMs;
723
+ const raw = globalThis.process?.env?.DEBUG_PERF_BLOCK_MS;
724
+ const parsed = raw ? Number.parseInt(raw, 10) : NaN;
725
+ cachedPerfSlowBlockRenderThresholdMs = Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS;
726
+ return cachedPerfSlowBlockRenderThresholdMs;
727
+ }
728
+ function getCachedBlockComponent(manifest) {
729
+ const cached = blockComponentCache.get(manifest);
730
+ if (cached) return cached;
731
+ const created = makeDefaultBlockComponent({ manifest });
732
+ blockComponentCache.set(manifest, created);
733
+ return created;
734
+ }
735
+ //#endregion
576
736
  //#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;
737
+ function EditorPageRenderer(props) {
738
+ const page = React$1.useMemo(() => toEditorPresentationPage(props.page), [props.page]);
739
+ return /* @__PURE__ */ jsx(PageRendererCore, {
740
+ ...props,
741
+ page,
742
+ audience: "authoring"
743
+ });
744
+ }
745
+ function PageRendererCore(props) {
746
+ const { page, audience, runtimeBoundaries, dataContext, wrapBlock, wrapBoundary, registry } = props;
579
747
  const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
580
748
  dataContext?.imageResolveContext,
581
749
  dataContext?.mediaAssets,
582
750
  dataContext?.siteId,
583
751
  dataContext?.supabaseUrl
584
752
  ]);
585
- const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(runtimeBoundaries ?? []), [runtimeBoundaries]);
586
753
  const usesRuntimeBoundaries = runtimeBoundaries !== void 0;
587
754
  const themeResources = React$1.useMemo(() => resolvePageThemeResources(props), [
588
755
  props.rendering,
589
756
  props.theme,
590
757
  props.themeTokens
591
758
  ]);
592
- if (!page || page.blocks.length === 0) return /* @__PURE__ */ jsx("div", {
593
- className: "rb-p-6 rb-caption",
594
- style: textColorStyle("mutedText"),
595
- children: "No blocks found."
596
- });
597
759
  const resolvedRegistry = registry ?? getDefaultComponentRegistry();
598
760
  setContextResolveImageUrlContext(imageResolveContext);
599
- return /* @__PURE__ */ jsx("div", { children: page.blocks.map((block, index) => {
600
- const blockPosition = pageBlockPosition(index, page.blocks.length);
601
- const blockKey = block.id ?? `${block.kind}-${index}`;
602
- const previousBlock = page.blocks[index - 1] ?? null;
603
- const nextBlock = page.blocks[index + 1] ?? null;
761
+ const sections = usePageSections(props, {
762
+ page,
763
+ themeResources,
764
+ imageResolveContext,
765
+ registry: resolvedRegistry
766
+ });
767
+ const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(boundariesForSurvivingBlocks(runtimeBoundaries ?? [], sections.map(({ block }) => ({
768
+ ...block,
769
+ content: getRenderableContent(block, dataContext?.previewStage)
770
+ })))), [
771
+ runtimeBoundaries,
772
+ sections,
773
+ dataContext?.previewStage
774
+ ]);
775
+ if (sections.length === 0) return emptyPageNotice(audience);
776
+ return /* @__PURE__ */ jsx("div", { children: sections.map((section, index) => {
777
+ const { block, blockKey, node } = section;
778
+ const blockPosition = pageBlockPosition(index, sections.length);
779
+ const previousBlock = sections[index - 1]?.block ?? null;
780
+ const nextBlock = sections[index + 1]?.block ?? null;
604
781
  const boundaryBefore = boundaryBetweenBlocks(previousBlock, block, boundaryByAdjacentBlockIds);
605
782
  const boundaryAfter = boundaryBetweenBlocks(block, nextBlock, boundaryByAdjacentBlockIds);
606
783
  const boundaryElement = renderBoundaryAfterBlock({
@@ -615,19 +792,7 @@ function PageRenderer(props) {
615
792
  const managesOwnWrapper = definition?.manifest.behaviours?.managesOwnWrapper;
616
793
  const renderableContent = getRenderableContent(block, dataContext?.previewStage);
617
794
  const variantKey = definition?.manifest ? resolveVariantKey(definition.manifest, renderableContent) : null;
618
- const shouldUseWrapper = !managesOwnWrapper || Boolean(wrapBlock);
619
- const blockSectionProps = buildBlockSectionProps({
620
- props,
621
- themeResources,
622
- block,
623
- blockKey,
624
- imageResolveContext,
625
- registry: resolvedRegistry
626
- });
627
- if (!shouldUseWrapper) {
628
- const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
629
- return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
630
- }
795
+ if (!(!managesOwnWrapper || Boolean(wrapBlock))) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [node, boundaryElement] }, blockKey);
631
796
  const wrapperClassName = [`block-${cleanKind}`, wrapBlock ? "group relative" : null].filter(Boolean).join(" ");
632
797
  const styleGroup = typeof renderableContent.styleGroup === "string" ? renderableContent.styleGroup : void 0;
633
798
  const blockLook = typeof renderableContent.blockLook === "string" ? renderableContent.blockLook : void 0;
@@ -652,7 +817,7 @@ function PageRenderer(props) {
652
817
  "data-site-style-boundary-after": boundaryAfter?.metrics.size,
653
818
  "data-style-group": styleGroup,
654
819
  style: blockStyle,
655
- children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
820
+ children: node
656
821
  }, blockKey);
657
822
  if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
658
823
  if (usesRuntimeBoundaries || !isSiteStyleTransitionStyleGroup(styleGroup)) return blockElement;
@@ -665,20 +830,71 @@ function PageRenderer(props) {
665
830
  })] }, blockKey);
666
831
  }) });
667
832
  }
668
- function resolvePageRendererImageResolveContext(dataContext) {
669
- const input = dataContext?.imageResolveContext;
670
- return buildResolveImageUrlContext({
671
- siteId: input?.siteId ?? dataContext?.siteId,
672
- supabaseUrl: input?.supabaseUrl ?? dataContext?.supabaseUrl,
673
- mediaAssetIndex: input?.mediaAssetIndex,
674
- mediaAssets: input?.mediaAssets ?? dataContext?.mediaAssets
833
+ /**
834
+ * Memoised so that a re-render with unchanged inputs reuses the same section
835
+ * elements and React can skip the block subtrees, exactly as the per-block memo
836
+ * did before public pages started resolving their bodies up front.
837
+ */
838
+ function usePageSections(props, input) {
839
+ const { page, themeResources, imageResolveContext, registry } = input;
840
+ return React$1.useMemo(() => admitPageSections({
841
+ props,
842
+ blocks: page?.blocks ?? [],
843
+ audience: props.audience,
844
+ themeResources,
845
+ imageResolveContext,
846
+ registry
847
+ }), [
848
+ page,
849
+ props.audience,
850
+ themeResources,
851
+ imageResolveContext,
852
+ registry,
853
+ props.dataContext,
854
+ props.routeMap,
855
+ props.wrapBlock,
856
+ props.blockOverrides,
857
+ props.sdkConfig,
858
+ props.customBlocks,
859
+ props.previewAuthoring
860
+ ]);
861
+ }
862
+ /**
863
+ * Resolves each block's rendered body before the page decides what to wrap.
864
+ *
865
+ * On a public page the body is resolved eagerly so a block that cannot render
866
+ * is dropped along with its wrapper, its data attributes, its boundary reserve
867
+ * space and its style-group sibling — the section body is the single source of
868
+ * truth for whether the block is on the page (issue 1378). Authoring surfaces
869
+ * keep the memoised component so the editor's render-loop guards still hold.
870
+ */
871
+ function admitPageSections(input) {
872
+ const sections = [];
873
+ input.blocks.forEach((block, index) => {
874
+ const blockKey = block.id ?? `${block.kind}-${index}`;
875
+ const blockSectionProps = buildBlockSectionProps({
876
+ props: input.props,
877
+ themeResources: input.themeResources,
878
+ block,
879
+ blockKey,
880
+ imageResolveContext: input.imageResolveContext,
881
+ registry: input.registry
882
+ });
883
+ const node = input.audience === "public" ? renderBlockSection(blockSectionProps) : /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
884
+ if (node === null || node === void 0) return;
885
+ sections.push({
886
+ block,
887
+ blockKey,
888
+ node
889
+ });
675
890
  });
891
+ return sections;
676
892
  }
677
893
  function buildBlockSectionProps(input) {
678
894
  return {
895
+ audience: input.props.audience,
679
896
  themeResources: input.themeResources,
680
897
  block: input.block,
681
- usePlaceholders: input.props.usePlaceholders ?? false,
682
898
  dataContext: input.props.dataContext,
683
899
  blockKey: input.blockKey,
684
900
  registry: input.registry,
@@ -692,72 +908,24 @@ function buildBlockSectionProps(input) {
692
908
  };
693
909
  }
694
910
  /**
695
- * Look up a block override component by block kind.
696
- * Supports both full ("block.hero") and short ("hero") keys.
697
- */
698
- function getBlockOverride(blockKind, overrides) {
699
- if (!overrides) return void 0;
700
- if (overrides[blockKind]) return overrides[blockKind];
701
- const shortKind = blockKind.replace(/^block\./, "");
702
- if (overrides[shortKind]) return overrides[shortKind];
703
- }
704
- const blockComponentCache = /* @__PURE__ */ new WeakMap();
705
- const manifestValidatorCache = /* @__PURE__ */ new WeakMap();
706
- const DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS = 25;
707
- let cachedPerfSlowBlockRenderThresholdMs = null;
708
- function getPerfSlowBlockRenderThresholdMs() {
709
- if (cachedPerfSlowBlockRenderThresholdMs !== null) return cachedPerfSlowBlockRenderThresholdMs;
710
- const raw = globalThis.process?.env?.DEBUG_PERF_BLOCK_MS;
711
- const parsed = raw ? Number.parseInt(raw, 10) : NaN;
712
- cachedPerfSlowBlockRenderThresholdMs = Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS;
713
- return cachedPerfSlowBlockRenderThresholdMs;
714
- }
715
- function getCachedBlockComponent(manifest) {
716
- const cached = blockComponentCache.get(manifest);
717
- if (cached) return cached;
718
- const created = makeDefaultBlockComponent({ manifest });
719
- blockComponentCache.set(manifest, created);
720
- return created;
721
- }
722
- /**
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
911
  * Memoized block section component.
755
912
  *
756
913
  * Custom memoization prevents render loops during editing by explicitly checking
757
914
  * referential equality of all props that affect rendering. Standard React.memo
758
915
  * wouldn't catch all the render triggers from the editor store.
759
916
  */
760
- const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, block, usePlaceholders, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
917
+ const MemoBlockSection = React$1.memo(function MemoBlockSection(props) {
918
+ return renderBlockSection(props);
919
+ }, (prev, next) => {
920
+ return prev.audience === next.audience && 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;
921
+ });
922
+ /**
923
+ * Renders a single block body.
924
+ *
925
+ * Returns `null` when the block cannot render and the audience is `public`;
926
+ * the caller treats that as "this block is not on the page".
927
+ */
928
+ function renderBlockSection({ audience, themeResources, block, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
761
929
  const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
762
930
  const fallbackImageResolveContext = getCurrentResolveImageUrlContext();
763
931
  const resolvedImageResolveContext = imageResolveContext ?? fallbackImageResolveContext;
@@ -777,6 +945,30 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
777
945
  } catch {}
778
946
  return node;
779
947
  }
948
+ /**
949
+ * The one place that decides what a block that cannot render leaves behind.
950
+ * A public page gets nothing (and a log line, since dropping content on a
951
+ * 200 is otherwise invisible); authoring surfaces get the diagnostic.
952
+ */
953
+ function diagnostic(message, detail) {
954
+ if (audience !== "public") return fallback(message);
955
+ warnOmittedFromPublicPage({
956
+ block,
957
+ ...detail
958
+ });
959
+ return null;
960
+ }
961
+ function withBlockWrapper(node) {
962
+ if (node === null) return null;
963
+ return wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, node) }) : /* @__PURE__ */ jsx(Fragment$1, { children: node });
964
+ }
965
+ if (block.presentationAdmission.kind === "invalid") return finish(diagnostic(`Invalid content for block kind "${block.kind}".`, {
966
+ outcome: "invalidContent",
967
+ admissionError: block.presentationAdmission.error
968
+ }), {
969
+ outcome: "invalidContent",
970
+ override: false
971
+ });
780
972
  const OverrideComponent = getBlockOverride(block.kind, blockOverrides);
781
973
  requireBlockOverride(themeResources, OverrideComponent, block.kind);
782
974
  let definition = getBlockDefinition(block.kind);
@@ -789,25 +981,14 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
789
981
  }).findManifest(block.kind)?.descriptor.definition;
790
982
  if (!definition) {
791
983
  if (OverrideComponent) {
792
- const rendered = /* @__PURE__ */ jsx(OverrideComponent, {
984
+ const rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...buildBlockOverrideProps({
985
+ block,
793
986
  content: getRenderableContent(block, dataContext?.previewStage),
794
- ...overrideThemeProps(themeResources),
795
987
  data: void 0,
796
- siteId: dataContext?.siteId,
797
- apiBaseUrl: dataContext?.apiBaseUrl,
798
- portalToken: dataContext?.portalToken ?? null,
799
- previewToken: dataContext?.previewToken ?? null,
800
- stage: dataContext?.previewStage,
801
- occurrenceContext: dataContext?.occurrenceContext ?? null,
802
- entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
803
- contentEntry: dataContext?.contentEntry ?? null,
804
- pageSurface: dataContext?.pageSurface ?? null,
805
- subject: dataContext?.subject ?? null,
806
- supabaseUrl: dataContext?.supabaseUrl,
807
- imageResolveContext: resolvedImageResolveContext,
808
- blockId: block.id ?? null,
809
- blockKind: block.kind
810
- });
988
+ themeResources,
989
+ dataContext,
990
+ imageResolveContext: resolvedImageResolveContext
991
+ }) });
811
992
  return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
812
993
  outcome: "overrideWithoutDefinition",
813
994
  override: true,
@@ -823,8 +1004,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
823
1004
  dbCustomBlocksCount: customBlocks?.length ?? 0
824
1005
  });
825
1006
  } catch {}
826
- const rendered = fallback(block.kind.startsWith("custom.") ? `No renderer available for block kind "${block.kind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${block.kind}".`);
827
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
1007
+ return finish(withBlockWrapper(diagnostic(block.kind.startsWith("custom.") ? `No renderer available for block kind "${block.kind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${block.kind}".`, { outcome: "missingDefinition" })), {
828
1008
  outcome: "missingDefinition",
829
1009
  override: false
830
1010
  });
@@ -839,43 +1019,18 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
839
1019
  manifestKeys: Object.keys(definition.manifest ?? {}).sort()
840
1020
  });
841
1021
  } catch {}
842
- const rendered = fallback(block.kind.startsWith("custom.") ? `No renderer available for block kind "${block.kind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${block.kind}"].` : `No renderer available for block kind "${block.kind}".`);
843
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
1022
+ return finish(withBlockWrapper(diagnostic(block.kind.startsWith("custom.") ? `No renderer available for block kind "${block.kind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${block.kind}"].` : `No renderer available for block kind "${block.kind}".`, { outcome: "missingLayout" })), {
844
1023
  outcome: "missingLayout",
845
1024
  override: false
846
1025
  });
847
1026
  }
848
1027
  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;
868
- else {
869
- const rendered = fallback(`Unable to render block kind "${block.kind}".`);
870
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
871
- outcome: "invalidPlaceholder",
872
- override: false
873
- });
874
- }
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",
1028
+ let data = content;
1029
+ if (block.presentationAdmission.kind === "editor") {
1030
+ const draft = validateManifestDraft(compileManifestContentContract(definition.manifest), content);
1031
+ if (draft.kind === "previewable") data = draft.data;
1032
+ else return finish(withBlockWrapper(diagnostic(`Unable to render block kind "${block.kind}".`, { outcome: "invalidPlaceholder" })), {
1033
+ outcome: "invalidPlaceholder",
879
1034
  override: false
880
1035
  });
881
1036
  }
@@ -884,25 +1039,14 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
884
1039
  const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : data;
885
1040
  const resolved = resolveBlockData(block.id, definition.dataLoaders, dataContext, routes);
886
1041
  const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
887
- const baseProps = {
1042
+ const baseProps = buildBlockOverrideProps({
1043
+ block,
888
1044
  content: hydratedContent,
889
- ...overrideThemeProps(themeResources),
890
1045
  data: resolved,
891
- siteId: dataContext?.siteId,
892
- apiBaseUrl: dataContext?.apiBaseUrl,
893
- portalToken: dataContext?.portalToken ?? null,
894
- previewToken: dataContext?.previewToken ?? null,
895
- stage: dataContext?.previewStage,
896
- occurrenceContext: dataContext?.occurrenceContext ?? null,
897
- entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
898
- contentEntry: dataContext?.contentEntry ?? null,
899
- pageSurface: dataContext?.pageSurface ?? null,
900
- subject: dataContext?.subject ?? null,
901
- supabaseUrl: dataContext?.supabaseUrl,
902
- imageResolveContext: resolvedImageResolveContext,
903
- blockId: block.id ?? null,
904
- blockKind: block.kind
905
- };
1046
+ themeResources,
1047
+ dataContext,
1048
+ imageResolveContext: resolvedImageResolveContext
1049
+ });
906
1050
  let rendered;
907
1051
  if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...baseProps });
908
1052
  else {
@@ -949,65 +1093,11 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
949
1093
  hasResolvedData
950
1094
  });
951
1095
  } catch {
952
- const rendered = usePlaceholders ? fallback(`Unable to render block kind "${block.kind}".`) : fallback(`Invalid content for block kind "${block.kind}".`);
953
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
1096
+ return finish(withBlockWrapper(diagnostic(block.presentationAdmission.kind === "editor" ? `Unable to render block kind "${block.kind}".` : `Invalid content for block kind "${block.kind}".`, { outcome: "exception" })), {
954
1097
  outcome: "exception",
955
1098
  override: false
956
1099
  });
957
1100
  }
958
- }, (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;
960
- });
961
- function fallback(message) {
962
- return /* @__PURE__ */ jsx("div", {
963
- className: "rb-p-6 rb-caption",
964
- style: textColorStyle("mutedText"),
965
- children: message
966
- });
967
- }
968
- function shouldDebugCustomBlocks() {
969
- try {
970
- return globalThis.process?.env?.DEBUG_CUSTOM_BLOCKS === "1";
971
- } catch {
972
- return false;
973
- }
974
- }
975
- /**
976
- * Resolves block content based on stage priority.
977
- * For draft/preview: draftContent takes priority over content.
978
- * For published: content is the source of truth.
979
- * Returns empty object if no content exists (validator will handle placeholders if needed).
980
- */
981
- function getRenderableContent(block, previewStage = "published") {
982
- const source = previewStage === "preview" && block.draftContent ? block.draftContent : block.content ?? {};
983
- if (!isObjectRecord(source)) return {};
984
- return source;
985
- }
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
1101
  }
1012
1102
  //#endregion
1013
1103
  //#region ../theme-core/src/fonts/types.ts
@@ -1802,6 +1892,297 @@ function normalizePublicApiLoaderParams(endpoint, params, context) {
1802
1892
  const Text = Text$1;
1803
1893
  const RichText = RichText$1;
1804
1894
  //#endregion
1895
+ //#region ../db/src/schemas/forms.ts
1896
+ /**
1897
+ * Form Settings Schemas
1898
+ *
1899
+ * Zod schemas for validating form settings JSON stored in the database.
1900
+ * These schemas are the single source of truth for form settings validation
1901
+ * across API routes, type guards, and client-side form submission.
1902
+ */
1903
+ const sensitiveCollectionModeSchema = z.enum(["standard", "sensitive"]).default("standard");
1904
+ const sensitiveCollectionConfirmationVersionSchema = z.union([z.literal(1), z.null()]);
1905
+ const formPresentationSettingsShape = {
1906
+ submitLabel: z.string().min(1).max(40).nullable().optional(),
1907
+ templateKey: z.string().min(1).nullable().optional()
1908
+ };
1909
+ const formPresentationSettingsSchema = z.object(formPresentationSettingsShape).strict();
1910
+ const sensitiveCollectionConfigSchema = z.object({
1911
+ enabledAt: z.string().datetime().nullable(),
1912
+ enabledByUserId: z.string().uuid().nullable(),
1913
+ confirmationVersion: sensitiveCollectionConfirmationVersionSchema
1914
+ }).strict();
1915
+ /**
1916
+ * Email notification settings for contact forms
1917
+ */
1918
+ const emailNotificationSchema = z.object({
1919
+ enabled: z.boolean(),
1920
+ recipients: z.array(z.string().email()).optional()
1921
+ }).strict();
1922
+ /**
1923
+ * Submitter auto-reply settings for contact forms.
1924
+ *
1925
+ * Intentionally does not include form field values; overrides are purely template strings.
1926
+ */
1927
+ const submitterAutoReplySchema = z.object({
1928
+ enabled: z.boolean(),
1929
+ override: z.object({
1930
+ subjectTemplate: z.string().max(200),
1931
+ bodyTemplate: z.string().max(1e4)
1932
+ }).strict().optional()
1933
+ }).strict();
1934
+ /**
1935
+ * Webhook notification settings for forms
1936
+ */
1937
+ const webhookNotificationSchema = z.object({
1938
+ enabled: z.boolean(),
1939
+ url: z.string().url().optional(),
1940
+ headers: z.record(z.string(), z.string()).optional()
1941
+ }).strict();
1942
+ /**
1943
+ * Notification settings structure
1944
+ */
1945
+ const notificationSettingsSchema = z.object({
1946
+ email: emailNotificationSchema.optional(),
1947
+ autoReply: submitterAutoReplySchema.optional(),
1948
+ webhook: webhookNotificationSchema.optional(),
1949
+ emails: z.array(z.string().email()).optional()
1950
+ }).strict().optional();
1951
+ const standardContactOptionalFieldSettingsSchema = z.object({ visible: z.boolean() }).strict();
1952
+ const contactFormDefinitionSettingsSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("custom-contact") }).strict(), z.object({
1953
+ kind: z.literal("standard-contact"),
1954
+ optionalFields: z.object({
1955
+ name: standardContactOptionalFieldSettingsSchema,
1956
+ phone: standardContactOptionalFieldSettingsSchema
1957
+ }).strict()
1958
+ }).strict()]);
1959
+ /**
1960
+ * Contact form settings
1961
+ * Used for general inquiry forms that send notifications to site owners
1962
+ */
1963
+ const contactFormSettingsSchema = z.object({
1964
+ type: z.literal("contact"),
1965
+ successMessage: z.string().optional(),
1966
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
1967
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional(),
1968
+ notifications: notificationSettingsSchema,
1969
+ definition: contactFormDefinitionSettingsSchema.default({ kind: "custom-contact" })
1970
+ }).strict();
1971
+ /**
1972
+ * Booking form settings
1973
+ * Used for appointment booking forms that create appointments in the system
1974
+ *
1975
+ * Service configuration:
1976
+ * - serviceId: Single service (backward compatible)
1977
+ * - serviceIds: Multiple services (user selects at booking time)
1978
+ * - If neither provided: Shows all available services for the site
1979
+ *
1980
+ * Note: Form can have either serviceId OR serviceIds, not both.
1981
+ * XOR validation enforces this constraint.
1982
+ */
1983
+ const bookingFormSettingsSchema = z.object({
1984
+ type: z.literal("booking"),
1985
+ serviceId: z.string().optional(),
1986
+ serviceIds: z.array(z.string()).optional(),
1987
+ resourceId: z.string().nullable().optional(),
1988
+ requiresApproval: z.boolean().default(false),
1989
+ successMessage: z.string().optional(),
1990
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
1991
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional()
1992
+ }).strict().refine((data) => {
1993
+ const hasSingle = data.serviceId !== void 0 && data.serviceId.length > 0;
1994
+ const hasMultiple = data.serviceIds !== void 0 && data.serviceIds.length > 0;
1995
+ return !(hasSingle && hasMultiple);
1996
+ }, { message: "Form cannot have both serviceId and serviceIds. Use one or the other." });
1997
+ /**
1998
+ * Event registration form settings
1999
+ * Used for event registration forms that create event attendees
2000
+ *
2001
+ * Series configuration:
2002
+ * - seriesId: Single event series (form is for specific event)
2003
+ * - If not provided: Block must specify series or get from context
2004
+ */
2005
+ const eventRegistrationFormSettingsSchema = z.object({
2006
+ type: z.literal("event-registration"),
2007
+ seriesId: z.string().uuid().optional(),
2008
+ maxTickets: z.number().int().positive().max(10).default(10),
2009
+ requiresApproval: z.boolean().default(false),
2010
+ successMessage: z.string().optional(),
2011
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
2012
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional()
2013
+ }).strict();
2014
+ /**
2015
+ * Booking Questions form settings
2016
+ * Used for reusable short forms / detailed questionnaires attached through booking requirements.
2017
+ */
2018
+ const bookingQuestionsFormSettingsSchema = z.object({
2019
+ type: z.literal("booking-questions"),
2020
+ schemaVersion: z.literal(2).default(2),
2021
+ shape: z.enum(["short-form", "detailed-questionnaire"]).default("short-form"),
2022
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
2023
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional(),
2024
+ audienceHint: z.enum([
2025
+ "appointments",
2026
+ "events",
2027
+ "courses",
2028
+ "mixed"
2029
+ ]).optional(),
2030
+ customerTitle: z.string().min(1).max(120).optional(),
2031
+ introTitle: z.string().min(1).max(120).nullable().optional(),
2032
+ introBody: z.string().min(1).max(4e3).nullable().optional(),
2033
+ reviewLayout: z.enum(["flat", "sectioned"]).default("flat")
2034
+ }).strict();
2035
+ z.discriminatedUnion("type", [
2036
+ contactFormSettingsSchema,
2037
+ bookingFormSettingsSchema,
2038
+ eventRegistrationFormSettingsSchema,
2039
+ bookingQuestionsFormSettingsSchema
2040
+ ]);
2041
+ const contactFormSettingsInputSchema = contactFormSettingsSchema.extend(formPresentationSettingsShape).strict();
2042
+ const bookingFormSettingsInputSchema = bookingFormSettingsSchema.safeExtend(formPresentationSettingsShape).strict();
2043
+ const eventRegistrationFormSettingsInputSchema = eventRegistrationFormSettingsSchema.extend(formPresentationSettingsShape).strict();
2044
+ const bookingQuestionsFormSettingsInputSchema = bookingQuestionsFormSettingsSchema.extend(formPresentationSettingsShape).strict();
2045
+ /**
2046
+ * Transitional input schema for API/SDK callers that may still send form-level
2047
+ * presentation metadata inside settings. Storage code must split these keys out
2048
+ * before persisting canonical behavior settings.
2049
+ */
2050
+ const formSettingsInputSchema = z.discriminatedUnion("type", [
2051
+ contactFormSettingsInputSchema,
2052
+ bookingFormSettingsInputSchema,
2053
+ eventRegistrationFormSettingsInputSchema,
2054
+ bookingQuestionsFormSettingsInputSchema
2055
+ ]);
2056
+ /**
2057
+ * Form field option schema
2058
+ */
2059
+ const formFieldOptionSchema = z.object({
2060
+ value: z.string().min(1),
2061
+ label: z.string()
2062
+ }).strict();
2063
+ /**
2064
+ * Form field layout schema
2065
+ * Controls presentation on the public site renderer (e.g. 2-column rows).
2066
+ */
2067
+ const formFieldLayoutSchema = z.object({ width: z.enum(["full", "half"]).default("full") }).strict();
2068
+ const formFieldSchema = z.object({
2069
+ id: z.string().min(1, "Field ID is required"),
2070
+ label: z.string().min(1, "Field label is required"),
2071
+ type: z.enum([
2072
+ "text",
2073
+ "email",
2074
+ "textarea",
2075
+ "select",
2076
+ "radio",
2077
+ "checkbox",
2078
+ "consent",
2079
+ "tel",
2080
+ "url",
2081
+ "number",
2082
+ "date",
2083
+ "time"
2084
+ ]),
2085
+ required: z.boolean().default(false),
2086
+ placeholder: z.string().optional(),
2087
+ helpText: z.string().optional(),
2088
+ options: z.array(formFieldOptionSchema).optional(),
2089
+ multiple: z.boolean().optional(),
2090
+ minLength: z.number().int().positive().optional(),
2091
+ maxLength: z.number().int().positive().optional(),
2092
+ pattern: z.string().optional(),
2093
+ min: z.number().optional(),
2094
+ max: z.number().optional(),
2095
+ layout: formFieldLayoutSchema.optional()
2096
+ }).strict();
2097
+ const bookingQuestionFieldTypeSchema = z.enum([
2098
+ "text",
2099
+ "email",
2100
+ "textarea",
2101
+ "select",
2102
+ "radio",
2103
+ "checkbox",
2104
+ "tel",
2105
+ "url",
2106
+ "number",
2107
+ "date",
2108
+ "time"
2109
+ ]);
2110
+ const bookingQuestionDocumentFileTypeSchema = z.enum([
2111
+ "pdf",
2112
+ "image",
2113
+ "docx"
2114
+ ]);
2115
+ const bookingQuestionScalarFieldSchema = formFieldSchema.extend({ type: bookingQuestionFieldTypeSchema }).strict();
2116
+ const bookingQuestionDocumentUploadFieldSchema = z.object({
2117
+ id: z.string().min(1, "Field ID is required"),
2118
+ label: z.string().min(1, "Field label is required"),
2119
+ type: z.literal("document_upload"),
2120
+ required: z.boolean().default(false),
2121
+ placeholder: z.string().optional(),
2122
+ helpText: z.string().optional(),
2123
+ layout: formFieldLayoutSchema.optional(),
2124
+ allowedFileTypes: z.array(bookingQuestionDocumentFileTypeSchema).min(1, "Choose at least one allowed file type").default([
2125
+ "pdf",
2126
+ "image",
2127
+ "docx"
2128
+ ]),
2129
+ maxBytes: z.number().int().positive().max(25 * 1024 * 1024).default(25 * 1024 * 1024)
2130
+ }).strict();
2131
+ const bookingQuestionFieldSchema = z.discriminatedUnion("type", [bookingQuestionScalarFieldSchema, bookingQuestionDocumentUploadFieldSchema]);
2132
+ const bookingQuestionsSectionSchema = z.object({
2133
+ id: z.string().min(1, "Section ID is required"),
2134
+ title: z.string().min(1, "Section title is required"),
2135
+ description: z.string().optional(),
2136
+ items: z.array(bookingQuestionFieldSchema).min(1, "Section must contain at least one question")
2137
+ }).strict();
2138
+ const bookingQuestionsDetailedSchemaSchema = z.object({
2139
+ schemaVersion: z.literal(2),
2140
+ sections: z.array(bookingQuestionsSectionSchema).min(1, "Questionnaire must have at least one section")
2141
+ }).strict();
2142
+ /**
2143
+ * Form schema structure
2144
+ * Validates the complete form schema stored in schema_json column
2145
+ */
2146
+ const formSchemaSchema = z.object({
2147
+ version: z.string().default("1.0"),
2148
+ fields: z.array(formFieldSchema).min(1, "Form must have at least one field")
2149
+ }).strict();
2150
+ const bookingQuestionsFlatSchemaSchema = z.object({
2151
+ version: z.string().default("1.0"),
2152
+ fields: z.array(bookingQuestionFieldSchema).min(1, "Form must have at least one question")
2153
+ }).strict();
2154
+ z.union([bookingQuestionsFlatSchemaSchema, bookingQuestionsDetailedSchemaSchema]);
2155
+ const formSlugSchema = z.string().min(1, "Form slug is required").regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Use lowercase letters, numbers, and hyphens only").transform((value) => value);
2156
+ z.object({
2157
+ name: z.string().min(1, "Form name is required"),
2158
+ slug: formSlugSchema,
2159
+ schema: formSchemaSchema,
2160
+ settings: formSettingsInputSchema.optional(),
2161
+ presentation: formPresentationSettingsSchema.optional()
2162
+ }).strict();
2163
+ //#endregion
2164
+ //#region ../db/src/schemas/standard-contact.ts
2165
+ const standardContactLabelSchema = z.string().trim().min(1).max(80);
2166
+ const standardContactPlaceholderSchema = z.string().trim().max(160).optional();
2167
+ function standardContactFieldSchema(id, type, required) {
2168
+ return z.object({
2169
+ id: z.literal(id),
2170
+ label: standardContactLabelSchema,
2171
+ type: z.literal(type),
2172
+ required: z.literal(required),
2173
+ placeholder: standardContactPlaceholderSchema
2174
+ }).strict();
2175
+ }
2176
+ z.object({
2177
+ version: z.literal("1.0"),
2178
+ fields: z.tuple([
2179
+ standardContactFieldSchema("name", "text", false),
2180
+ standardContactFieldSchema("email", "email", true),
2181
+ standardContactFieldSchema("phone", "tel", false),
2182
+ standardContactFieldSchema("message", "textarea", true)
2183
+ ])
2184
+ }).strict();
2185
+ //#endregion
1805
2186
  //#region ../media-storage-supabase/dist/index.mjs
1806
2187
  function ok(value) {
1807
2188
  return {
@@ -2573,15 +2954,17 @@ const createApiMediaRepo = ({ client }) => ({
2573
2954
  }, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.update));
2574
2955
  },
2575
2956
  async deleteAsset(assetId, options) {
2576
- try {
2577
- await client({
2578
- endpoint: "mediaDelete",
2579
- params: { assetId },
2580
- body: { deleteObject: options?.deleteObject }
2581
- });
2582
- } catch (error) {
2583
- throw toMediaStorageError(error, DEFAULT_MESSAGES.delete);
2584
- }
2957
+ const response = await callClient(client, {
2958
+ endpoint: "mediaDelete",
2959
+ params: { assetId },
2960
+ body: { deleteObject: options?.deleteObject }
2961
+ }, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.delete));
2962
+ if (response.kind === "deleted") return response;
2963
+ const orphanWarning = response.warnings.find((warning) => warning.kind === "ORPHAN_CLEANUP_FAILED");
2964
+ return orphanWarning === void 0 ? { kind: "deleted" } : {
2965
+ kind: "deleted_with_orphan_warning",
2966
+ warning: orphanWarning
2967
+ };
2585
2968
  },
2586
2969
  generateStoragePath
2587
2970
  });
@@ -2672,8 +3055,9 @@ function createCachedMediaRepo(baseRepo, options) {
2672
3055
  return result;
2673
3056
  },
2674
3057
  async deleteAsset(assetId, options) {
2675
- await baseRepo.deleteAsset(assetId, options);
3058
+ const outcome = await baseRepo.deleteAsset(assetId, options);
2676
3059
  invalidateCache();
3060
+ return outcome;
2677
3061
  },
2678
3062
  generateStoragePath: baseRepo.generateStoragePath
2679
3063
  };
@@ -8348,10 +8732,10 @@ function resolveShellThemeRoles(props) {
8348
8732
  }
8349
8733
  const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
8350
8734
  const PreviewEditorSidebar = React.lazy(async () => {
8351
- return { default: (await import("./PreviewEditorSidebar-D4p_5TdY.mjs")).PreviewEditorSidebar };
8735
+ return { default: (await import("./PreviewEditorSidebar-Bn6cONPa.mjs")).PreviewEditorSidebar };
8352
8736
  });
8353
8737
  const PreviewEditorUI = React.lazy(async () => {
8354
- return { default: (await import("./PreviewEditorUI-D0cRoTX1.mjs")).PreviewEditorUI };
8738
+ return { default: (await import("./PreviewEditorUI-LAwXZPSx.mjs")).PreviewEditorUI };
8355
8739
  });
8356
8740
  const previewPaneContainmentStyle = {
8357
8741
  contain: "layout paint",
@@ -8367,6 +8751,7 @@ function renderShellProviders(input) {
8367
8751
  siteId: props.siteId,
8368
8752
  apiClient: input.apiClient,
8369
8753
  theme: themeRoles.persistenceTheme,
8754
+ headerPreferences: props.themeSelectionHeaderPreferences ?? null,
8370
8755
  themeId: props.themeId ?? null,
8371
8756
  selectionId: props.themeSelectionId ?? null,
8372
8757
  selectionVersion: props.themeSelectionVersion ?? null,
@@ -8682,6 +9067,7 @@ function resolveShellLayoutProps(input) {
8682
9067
  themeSelectionUpdatedAt: props.themeSelectionUpdatedAt ?? null,
8683
9068
  themeSelectionButtonStyleSelection: props.themeSelectionButtonStyleSelection ?? null,
8684
9069
  themeSelectionButtonStyleRepairs: props.themeSelectionButtonStyleRepairs ?? [],
9070
+ themeSelectionHeaderPreferences: props.themeSelectionHeaderPreferences ?? null,
8685
9071
  themeSelectionHeaderSelection: props.themeSelectionHeaderSelection ?? null,
8686
9072
  themeSelectionFooterLookId: props.themeSelectionFooterLookId ?? null,
8687
9073
  themeSelectionHeaderLogo: props.themeSelectionHeaderLogo,
@@ -10782,7 +11168,7 @@ function EditablePageRenderer(props) {
10782
11168
  linkedEntryDataContext,
10783
11169
  liveResolvedData
10784
11170
  ]);
10785
- return /* @__PURE__ */ jsx(PageRenderer, {
11171
+ return /* @__PURE__ */ jsx(EditorPageRenderer, {
10786
11172
  ...pageRendererProps,
10787
11173
  page: renderPage,
10788
11174
  runtimeBoundaries,
@@ -10790,8 +11176,7 @@ function EditablePageRenderer(props) {
10790
11176
  wrapBlock: allowInlineEditing ? wrapBlockWithProvider : pageRendererProps.wrapBlock,
10791
11177
  wrapBoundary: allowInlineEditing ? wrapBoundaryWithControl : pageRendererProps.wrapBoundary,
10792
11178
  dataContext,
10793
- previewAuthoring,
10794
- usePlaceholders: true
11179
+ previewAuthoring
10795
11180
  });
10796
11181
  }
10797
11182
  function retargetRuntimeBoundariesForRenderPage(boundaries, page) {
@@ -11169,7 +11554,6 @@ function SdkPreviewModeRuntime(props) {
11169
11554
  const editablePage = model.rendering.kind === "overrides-only" ? /* @__PURE__ */ jsx(EditablePageRenderer, {
11170
11555
  rendering: { kind: "overrides-only" },
11171
11556
  page,
11172
- usePlaceholders: false,
11173
11557
  dataContext,
11174
11558
  routeMap,
11175
11559
  blockOverrides: typedBlockOverrides ?? {},
@@ -11178,7 +11562,6 @@ function SdkPreviewModeRuntime(props) {
11178
11562
  }) : /* @__PURE__ */ jsx(EditablePageRenderer, {
11179
11563
  theme: requireSdkPreviewTheme(model.theme),
11180
11564
  page,
11181
- usePlaceholders: false,
11182
11565
  dataContext,
11183
11566
  routeMap,
11184
11567
  blockOverrides: typedBlockOverrides ?? void 0,