@riverbankcms/sdk 0.136.0 → 0.138.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 (343) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/README.md +7 -4
  3. package/dist/{PreviewEditorSidebar-BU5ZlhQR.mjs → PreviewEditorSidebar-BVPur_CU.mjs} +12 -18
  4. package/dist/{PreviewEditorUI-9XkHL-bC.mjs → PreviewEditorUI-DLhWX8oh.mjs} +3 -3
  5. package/dist/{PreviewQueryProvider-wbEpXryy.mjs → PreviewQueryProvider-BguJY1SW.mjs} +1 -1
  6. package/dist/{SdkPreviewModeRuntime-CnWmj-2B.mjs → SdkPreviewModeRuntime-Tda6qw4z.mjs} +1375 -495
  7. package/dist/{SiteChromeCustomizeContext-B6d5zkog.mjs → SiteChromeCustomizeContext-BHFgMjde.mjs} +35665 -33602
  8. package/dist/_dts/ai/src/contracts/proposals.d.ts +7226 -3057
  9. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +1223 -811
  10. package/dist/_dts/ai/src/designer/themePatch.d.ts +5 -10
  11. package/dist/_dts/api/src/accessAdmin.d.ts +16 -18
  12. package/dist/_dts/api/src/accountApi.d.ts +49 -2
  13. package/dist/_dts/api/src/appointmentServiceContracts.d.ts +83 -0
  14. package/dist/_dts/api/src/appointmentServiceLocation.d.ts +12 -0
  15. package/dist/_dts/api/src/appointmentServiceVisibility.d.ts +14 -0
  16. package/dist/_dts/api/src/appointmentSetup.d.ts +8 -0
  17. package/dist/_dts/api/src/bookingConfig.d.ts +35 -87
  18. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +1 -1
  19. package/dist/_dts/api/src/bookingOperations.d.ts +2 -69
  20. package/dist/_dts/api/src/bookingRecords.d.ts +2 -2
  21. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +2 -2
  22. package/dist/_dts/api/src/bookingServicePricing.d.ts +47 -0
  23. package/dist/_dts/api/src/bookings.d.ts +2 -2
  24. package/dist/_dts/api/src/cache-tags.d.ts +7 -2
  25. package/dist/_dts/api/src/common/index.d.ts +1 -0
  26. package/dist/_dts/api/src/common/zodFieldErrors.d.ts +34 -0
  27. package/dist/_dts/api/src/communications.d.ts +14 -8
  28. package/dist/_dts/api/src/contentRuntime.d.ts +3 -6
  29. package/dist/_dts/api/src/domainConnection.d.ts +41 -0
  30. package/dist/_dts/api/src/endpoints.d.ts +1636 -1637
  31. package/dist/_dts/api/src/eventAttendanceLabels.d.ts +2 -2
  32. package/dist/_dts/api/src/eventManagementContracts.d.ts +10 -14
  33. package/dist/_dts/api/src/index.d.ts +11 -9
  34. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
  35. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  36. package/dist/_dts/api/src/media.d.ts +19 -2
  37. package/dist/_dts/api/src/occurrenceScheduling.d.ts +1 -1
  38. package/dist/_dts/api/src/participantMessaging.d.ts +3 -3
  39. package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
  40. package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +62 -0
  41. package/dist/_dts/api/src/publicBookingService.d.ts +109 -2
  42. package/dist/_dts/api/src/publicEventCheckoutEndpointDefinitions.d.ts +27 -0
  43. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  44. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -1
  45. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +30 -148
  46. package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +8 -26
  47. package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +5 -13
  48. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -3
  49. package/dist/_dts/api/src/schemas/admin-allowed-domains.d.ts +76 -0
  50. package/dist/_dts/api/src/schemas/admin-observability-logs.d.ts +61 -0
  51. package/dist/_dts/api/src/schemas/admin-users.d.ts +80 -0
  52. package/dist/_dts/api/src/schemas/newsletter-memberships.d.ts +98 -0
  53. package/dist/_dts/api/src/schemas/sdk-entries.d.ts +128 -0
  54. package/dist/_dts/api/src/schemas/site-api-keys.d.ts +112 -0
  55. package/dist/_dts/api/src/schemas/support.d.ts +35 -0
  56. package/dist/_dts/api/src/sdk-event-booking-offer.d.ts +14 -0
  57. package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +4 -16
  58. package/dist/_dts/api/src/sdk-event-upsert.d.ts +11 -21
  59. package/dist/_dts/api/src/sdkContracts.d.ts +8 -23
  60. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +37 -0
  61. package/dist/_dts/api/src/sdkMediaContracts.d.ts +40 -0
  62. package/dist/_dts/api/src/sdkMediaEndpointDefinitions.d.ts +66 -0
  63. package/dist/_dts/api/src/sdkThemeWire.d.ts +157 -146
  64. package/dist/_dts/api/src/siteInfrastructure.d.ts +37 -37
  65. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +35 -54
  66. package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
  67. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +38 -16
  68. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -17
  69. package/dist/_dts/api/src/types.d.ts +2 -2
  70. package/dist/_dts/api/src/{wholeSeriesOfferings.d.ts → wholeSeriesRuns.d.ts} +11 -67
  71. package/dist/_dts/block-form/src/FormRenderer.d.ts +3 -1
  72. package/dist/_dts/block-form/src/backend/store-backend.d.ts +2 -1
  73. package/dist/_dts/block-form/src/backend/types.d.ts +2 -0
  74. package/dist/_dts/block-form/src/context/FormFocusContext.d.ts +7 -0
  75. package/dist/_dts/block-form/src/index.d.ts +2 -0
  76. package/dist/_dts/block-form/src/manifest/ManifestForm.d.ts +2 -1
  77. package/dist/_dts/block-form/src/utils/promotedFieldBackend.d.ts +8 -0
  78. package/dist/_dts/block-form/src/utils/promotedFieldPlan.d.ts +18 -0
  79. package/dist/_dts/block-form/src/utils/resolvePromotedFields.d.ts +8 -1
  80. package/dist/_dts/blocks/src/BlockErrorBoundary.d.ts +46 -0
  81. package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -141
  82. package/dist/_dts/blocks/src/contracts/index.d.ts +2 -0
  83. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -6
  84. package/dist/_dts/blocks/src/index.d.ts +1 -0
  85. package/dist/_dts/blocks/src/pageRenderAudience.d.ts +54 -0
  86. package/dist/_dts/blocks/src/pageRenderDiagnostics.d.ts +26 -0
  87. package/dist/_dts/blocks/src/pageRenderPlan.d.ts +116 -0
  88. package/dist/_dts/blocks/src/pageRenderPreparation.d.ts +109 -0
  89. package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +1 -0
  90. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +154 -0
  91. package/dist/_dts/blocks/src/portal/types.d.ts +1 -1
  92. package/dist/_dts/blocks/src/server.d.ts +1 -0
  93. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +12 -20
  94. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
  95. package/dist/_dts/blocks/src/system/blocks/events/eventCalendarDataLoaders.d.ts +3 -0
  96. package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +95 -0
  97. package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
  98. package/dist/_dts/blocks/src/system/blocks/events/shared/runGrouping.d.ts +37 -0
  99. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +1046 -773
  100. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +59 -46
  101. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -3
  102. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +161 -161
  103. package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +13 -6
  104. package/dist/_dts/blocks/src/system/blocks/offerings-preview/scheduleSummary.d.ts +10 -4
  105. package/dist/_dts/blocks/src/system/constants/buttonRoles.d.ts +2 -2
  106. package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -0
  107. package/dist/_dts/blocks/src/system/customize/facets.d.ts +4 -4
  108. package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
  109. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +5 -9
  110. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +83 -83
  111. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +12 -3
  112. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -8
  113. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  114. package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +13 -0
  115. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +12 -20
  116. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +32 -37
  117. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +15 -18
  118. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +11 -8
  119. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +38 -22
  120. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +7 -0
  121. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.d.ts +2 -2
  122. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +16 -4
  123. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ErrorStep.d.ts +3 -5
  124. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +4 -2
  125. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +1 -1
  126. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -3
  127. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
  128. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventScope.d.ts +1 -1
  129. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -0
  130. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +15 -0
  131. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +2 -2
  132. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.d.ts +5 -0
  133. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +25 -0
  134. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.d.ts +14 -3
  135. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +3 -21
  136. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +4 -0
  137. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +0 -3
  138. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +14 -16
  139. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +13 -15
  140. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +7 -3
  141. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +9 -3
  142. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +25 -23
  143. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +2 -0
  144. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +11 -4
  145. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -13
  146. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +5 -0
  147. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +1 -0
  148. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -3
  149. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/capacity.d.ts +164 -0
  150. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/cta.d.ts +29 -0
  151. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +47 -0
  152. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +14 -0
  153. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/people.d.ts +6 -0
  154. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/pricing.d.ts +24 -0
  155. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/OfferingTitle.d.ts +11 -0
  156. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -1
  157. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +1 -1
  158. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +1080 -560
  159. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +2 -2
  160. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +3 -1
  161. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listingLayout.d.ts +23 -0
  162. package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +2 -2
  163. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -7
  164. package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +11 -0
  165. package/dist/_dts/commerce/src/moneyReport.d.ts +1 -1
  166. package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
  167. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +57 -0
  168. package/dist/_dts/commerce/src/purchase/eventOrderOptionSnapshot.d.ts +3 -0
  169. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -0
  170. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +6 -3
  171. package/dist/_dts/commerce/src/purchase/types.d.ts +3 -2
  172. package/dist/_dts/commerce/src/waitlists.d.ts +1 -1
  173. package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +4 -0
  174. package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +11 -0
  175. package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +1 -1
  176. package/dist/_dts/content-editor/src/hooks/blockedPublishPlan.d.ts +13 -5
  177. package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +5 -1
  178. package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +34 -2
  179. package/dist/_dts/content-editor/src/index.d.ts +2 -1
  180. package/dist/_dts/content-editor/src/ui/blockValidationManifestRegistry.d.ts +2 -0
  181. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +4 -2
  182. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +27 -5
  183. package/dist/_dts/content-model/src/content-types/schema.d.ts +3 -3
  184. package/dist/_dts/content-model/src/templates/defaults.d.ts +11 -0
  185. package/dist/_dts/core/src/branded.d.ts +28 -9
  186. package/dist/_dts/core/src/event-booking-offer-parser.d.ts +82 -0
  187. package/dist/_dts/core/src/event-booking-offer.d.ts +89 -0
  188. package/dist/_dts/core/src/event-page-surface-subject.d.ts +81 -4
  189. package/dist/_dts/core/src/event-pricing.d.ts +81 -89
  190. package/dist/_dts/core/src/index.d.ts +3 -0
  191. package/dist/_dts/core/src/non-empty-array.d.ts +3 -0
  192. package/dist/_dts/core/src/whole-series-run-schedule.d.ts +92 -0
  193. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +495 -279
  194. package/dist/_dts/db/src/index.d.ts +1 -0
  195. package/dist/_dts/db/src/utils/postgrestFilter.d.ts +2 -0
  196. package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -6
  197. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
  198. package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +2 -2
  199. package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +4 -2
  200. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockValidationManifests.d.ts +1 -0
  201. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +22 -7
  202. package/dist/_dts/editor-blocks/src/block-editor/useSettingsFieldFocus.d.ts +18 -0
  203. package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +4 -0
  204. package/dist/_dts/media-core/src/fileDomain.d.ts +3 -0
  205. package/dist/_dts/preview-next/src/client/blocks/previewBatchLoaderParams.d.ts +2 -0
  206. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -0
  207. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
  208. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -2
  209. package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +1 -1
  210. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -0
  211. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlSaveRequest.d.ts +51 -0
  212. package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +24 -2
  213. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +23 -1
  214. package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +8 -0
  215. package/dist/_dts/sdk/src/client/{eventSubrouteReadOperations.d.ts → publicEventReadOperations.d.ts} +4 -3
  216. package/dist/_dts/sdk/src/client/types.d.ts +6 -10
  217. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  218. package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
  219. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +5 -0
  220. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +2 -3
  221. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +8 -8
  222. package/dist/_dts/sdk/src/next/tags.d.ts +5 -8
  223. package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -26
  224. package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +9 -1
  225. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
  226. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +6 -53
  227. package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
  228. package/dist/_dts/sdk/src/version.d.ts +1 -1
  229. package/dist/_dts/theme-core/src/accordions/types.d.ts +5 -5
  230. package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +25 -25
  231. package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +25 -25
  232. package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +7 -7
  233. package/dist/_dts/theme-core/src/buttons/types.d.ts +22 -22
  234. package/dist/_dts/theme-core/src/cards/types.d.ts +49 -49
  235. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  236. package/dist/_dts/theme-core/src/gradients/types.d.ts +5 -0
  237. package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +26 -3
  238. package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
  239. package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
  240. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +195 -195
  241. package/dist/_dts/theme-core/src/navigation/types.d.ts +3 -3
  242. package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
  243. package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
  244. package/dist/_dts/theme-core/src/schema.d.ts +258 -257
  245. package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
  246. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  247. package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
  248. package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
  249. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +10 -0
  250. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +4 -4
  251. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  252. package/dist/_dts/theme-core/src/site-styles/headerBrandPresentation.d.ts +63 -0
  253. package/dist/_dts/theme-core/src/site-styles/headerBytesComparison.d.ts +30 -0
  254. package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +50 -1
  255. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +48 -9
  256. package/dist/_dts/theme-core/src/site-styles/headerPreferences.d.ts +162 -0
  257. package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +73 -0
  258. package/dist/_dts/theme-core/src/site-styles/headerRecompile.d.ts +118 -0
  259. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +10 -1
  260. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +1 -1
  261. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +7 -0
  262. package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
  263. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
  264. package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +20 -1
  265. package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +43 -2
  266. package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
  267. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
  268. package/dist/_dts/ui/src/badge.d.ts +1 -1
  269. package/dist/_dts/ui/src/button.d.ts +2 -2
  270. package/dist/client/{BookingConsentAgreement-DCch21a6.mjs → BookingConsentAgreement-DQUik1Mx.mjs} +2 -2
  271. package/dist/client/{DiscountCodeDisclosure-DIj1T59K.mjs → DiscountCodeDisclosure-CU67Q4vH.mjs} +1 -1
  272. package/dist/client/{EventCombined.client-BWVNlXTx.mjs → EventCombined.client-a02TXUgg.mjs} +233 -348
  273. package/dist/client/{EventListing.client-DVFCDe3i.mjs → EventListing.client-99qx7jFl.mjs} +2 -2
  274. package/dist/client/{LeafletStaticMap-BY5mIHw9.mjs → LeafletStaticMap-CWzcq73L.mjs} +1 -1
  275. package/dist/client/{accordion-CK29E8rG.mjs → accordion-D1nb3-Oj.mjs} +1 -1
  276. package/dist/client/{bookingForm-DFvnet-N.mjs → bookingForm-BGrmLhaO.mjs} +5 -5
  277. package/dist/client/bookings.mjs +10555 -10475
  278. package/dist/client/{carousel-BVU5NQlb.mjs → carousel-DSmOx3ad.mjs} +1 -1
  279. package/dist/client/{cart-BNItcZVa.mjs → cart-COWeOIUk.mjs} +3 -3
  280. package/dist/client/{checkout-Bu6iCdkP.mjs → checkout-CeysaIJK.mjs} +3 -3
  281. package/dist/client/client.mjs +58968 -57441
  282. package/dist/client/{context-BImarOAq.mjs → context-DBzX85Xc.mjs} +46 -18
  283. package/dist/client/dates-DCYhZBlW.mjs +264 -0
  284. package/dist/client/{eventCalendar-DS2h-UXD.mjs → eventCalendar-BgsN73Ul.mjs} +21 -44
  285. package/dist/client/{eventCombined-Drt4Oq9p.mjs → eventCombined-DcZQAMQP.mjs} +3 -3
  286. package/dist/client/{eventDetails-Bl2vWgTX.mjs → eventDetails-BWwGJ54l.mjs} +131 -51
  287. package/dist/client/{eventListing-CS7PHY7v.mjs → eventListing-DqYqV8vp.mjs} +3 -3
  288. package/dist/client/{eventRegistration-D-j8eNy2.mjs → eventRegistration-DQGDgu_e.mjs} +1122 -803
  289. package/dist/client/{form-RMpoLTyr.mjs → form-ClfpasVT.mjs} +2 -2
  290. package/dist/client/{headerSection-BYE3Lb3k.mjs → headerSection-BuOMe98N.mjs} +2 -2
  291. package/dist/client/hooks.mjs +9630 -9526
  292. package/dist/client/{locationMap-BxSr7Kkh.mjs → locationMap-CEqu_sfa.mjs} +2 -2
  293. package/dist/client/{newsletterForm-DerbXwFC.mjs → newsletterForm-IbrHjMxy.mjs} +2 -2
  294. package/dist/client/pricing-xj7MPZlK.mjs +314 -0
  295. package/dist/client/{productDetail-4SZCLhAf.mjs → productDetail-vxqTt5Xj.mjs} +3 -3
  296. package/dist/client/{productList-D7AP4GNq.mjs → productList-OTdZu8sb.mjs} +3 -3
  297. package/dist/client/{propsDecoder-pzBeCh14.mjs → propsDecoder-CY9gGEF7.mjs} +786 -1194
  298. package/dist/client/rendering/client.mjs +11481 -10469
  299. package/dist/client/rendering/islands.mjs +17 -17
  300. package/dist/client/rendering.mjs +26871 -25232
  301. package/dist/client/{scrollToBlock-CduAKf8T.mjs → scrollToBlock--BFV6kl-.mjs} +1 -1
  302. package/dist/client/{shop-Cp5p_kGe.mjs → shop-CP4YbDL9.mjs} +6 -6
  303. package/dist/client/{shop-commerce-DicXYaYX.mjs → shop-commerce-APs4XBXE.mjs} +5 -5
  304. package/dist/client/{shop-commerce-store-CGWnpY4K.mjs → shop-commerce-store-CAVLxLFr.mjs} +1 -1
  305. package/dist/client/{shopShared-BDf9ljkm.mjs → shopShared-BnSRrwXI.mjs} +3 -3
  306. package/dist/client/{useEventFilters-DeeyGYuk.mjs → useEventFilters-1a1by4c8.mjs} +33 -18
  307. package/dist/preview-next/before-render.mjs +186 -148
  308. package/dist/preview-next/client/runtime.mjs +4 -4
  309. package/dist/preview-next/keepAlive.mjs +186 -148
  310. package/dist/preview-next/middleware.mjs +186 -148
  311. package/dist/{previewAuthStore-DbqBol0V.mjs → previewAuthStore-BkEgnYPP.mjs} +186 -148
  312. package/dist/{sdk-runtime-19MO27F0.mjs → sdk-runtime-DwGfsT0S.mjs} +2 -2
  313. package/dist/{separator-DaPLtJ1f.mjs → separator-BeqDLneQ.mjs} +1 -1
  314. package/dist/server/components.mjs +53243 -51879
  315. package/dist/server/config-validation.mjs +1015 -906
  316. package/dist/server/config.mjs +1019 -910
  317. package/dist/server/data.mjs +10304 -10200
  318. package/dist/server/index.mjs +217 -198
  319. package/dist/server/next/tags.mjs +18 -4
  320. package/dist/server/next.mjs +62787 -61617
  321. package/dist/server/page-converter.mjs +797 -917
  322. package/dist/server/prebuild.mjs +1 -1
  323. package/dist/server/rendering/server.mjs +52557 -51365
  324. package/dist/server/rendering.mjs +54373 -53054
  325. package/dist/server/routing.mjs +13274 -13142
  326. package/dist/server/server.mjs +1076 -1154
  327. package/dist/server/theme-bridge.mjs +69 -9
  328. package/dist/server/theme.mjs +27 -8
  329. package/dist/styles/index.css +32 -1
  330. package/package.json +1 -1
  331. package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +0 -65
  332. package/dist/_dts/api/src/publicWholeSeriesEndpointDefinitions.d.ts +0 -20
  333. package/dist/_dts/api/src/sdk-event-pricing.d.ts +0 -61
  334. package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +0 -3
  335. package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +0 -50
  336. package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +0 -135
  337. package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +0 -87
  338. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +0 -48
  339. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +0 -17
  340. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +0 -100
  341. package/dist/_dts/sdk/src/client/wholeSeriesReadOperations.d.ts +0 -11
  342. package/dist/_dts/sdk/src/public-api/wholeSeriesContracts.d.ts +0 -2
  343. /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 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";
2
+ import { $n as ImageResolveContextProvider, $r as parseGeneratedIconAssetId, $t as createSnapshotFromPageRecord, An as getBlockDefinition, At as useEditor, Ba as assertNever$2, Bn as DEFAULT_THEME_RESPONSIVE_MODE, Br as sectionTransitionFamilyForBoundaryOptionId, Bt as useEditorUiStoreInstance, Ci as pageDesignEditorBackgroundOverrideOwner, Cn as useMediaEditorOptional, Cr as componentRuntimeRulesForTheme, Ct as MediaField, Dn as containerResponsiveThemeCss, Dr as compileTransitionRuntime, Dt as RichTextField, Ei as makeBoundaryId, En as ThemeScope, Et as useRichTextImagePicker, Fn as visibleHeaderClearancePx, Fr as getGradientPreset, Ft as prepareBlockEditorManifest, G as confirmAutosaveBatch, Ga as Upload, Gi as useSdkConfig, Gn as defaultTransforms, Gr as defaultThemeTokens, Gt as pushHistoryEntry, Ha as parseMediaAssetId, Hi as getFieldIntent, Hn as escapeStyleContent, Hr as backgroundAppearanceColorTokenNames, Ht as canRedoHistory, Ia as cn, Ii as parseThemeForPersistence, In as resolveVariantKey, Ir as parseGradientPresetId, It as stripTopLevelRoutingUi, J as idleEditorTransactionQueueState, Ji as mapOptionValueForSelect, Jn as resolveRouteTarget, Jt as unsafeAsLinkedContentEntryId, K as deriveTransactionCapabilities, Ki as hasEmptyOption, Kn as resolveEntryRouteTarget, Kr as ctaButton, Kt as redoHistory, La as parseFooterModuleId, Li as ORDINARY_TEXT_MIN_CONTRAST_RATIO, Ln as compileManifestContentContract, Lt as getBlockManifestFromSdkConfig, Mn as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Mr as gradientToCss, Mt as LinkWidgetProvider, Nn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, Nr as GRADIENT_PRESETS, On as createCustomBlockRegistry, Or as surfaceResolutionContextFromTheme, Ot as RichTextWidgetProvider, Pa as Button, Pi as textColorStyle, Pn as planSiteOverlayHeaderClearance, Pr as GRADIENT_PRESET_IDS, Pt as hideThemeV2RawStyleFields, Q as resolvePreviewSidebarTab, Qa as RotateCcw, Qn as clientComponentRegistry, Qr as parseBlockIconValue, Qt as createRoutingHelpers, Ra as unsafeAsEditorBlockId, Rn as validateManifestDraft, Rr as defaultSectionTransitionVariantForFamily, Sa as DialogTitle, Si as isThemeV2NormalEditorRawStyleFieldName, Sn as MediaEditorContextProvider, Sr as planPageDesignLayoutLookCompatibility, St as FileField, Ti as assertNever$1, Tn as isSupportedLoaderEndpoint, Tr as designRuntimeRulesForTheme, Tt as ReferenceWidgetProvider, Ua as parseSiteId, Ui as isHeaderField, Un as readBlockComposition, Ur as backgroundAppearanceQuickColorTokenNames, Ut as canUndoHistory, Va as expectParsedBrandedId, Vi as attachRenderableMediaAssetFields, Vn as getResponsiveScopeSpec, Vr as sectionTransitionVariantForBoundaryOptionId, Vt as useOptionalEditorUiStoreInstance, W as beginAutosaveBatch, Wa as X, Wi as SdkConfigProvider, Wn as getDefaultComponentRegistry, Wr as parseBackgroundAppearanceColorToken, Wt as createHistoryState, Xi as FieldFrame, Xn as coerceLinkedContentEntriesPayload, Xr as parseBackgroundContent, Y as rejectAutosaveBatch, Yi as unmapValueFromSelect, Yn as LINKED_CONTENT_ENTRY_META_KEY, Yr as planSiteChromePlacement, Yt as recordsEqual, Zi as useField, Zn as getLinkedContentEntryMeta, Zr as runTransforms, Zt as useDebouncedLatestSave, _ as reportPreviewDesignError, _a as Dialog, _i as eventCalendarListLayoutCompatibleDisplayModeValues, _r as applyCompiledRuntimeFieldsToContent, _t as IconPickerField, aa as SelectValue, ai as isInlineTextEmpty, ar as blogFeaturedPostFragment, at as useUISelector, ba as DialogFooter, bi as isObjectRecord, bn as deriveLaunchReadiness, br as retargetCompiledRuntimeFieldsForContentAdjacency, bt as ButtonVariantField, ci as buildResolveImageUrlContext, cr as formCopyFragment, d as PreviewDesignCoordinatorProvider, di as setContextResolveImageUrlContext, dn as FormRenderer, do as ChevronLeft, dr as ctaCopyFragment, dt as createSiteOptionWidgetAdapters, ei as parseGeneratedIconSetId, en as BUILT_IN_REFERENCE_KINDS, er as richTextFragment, et as renderSiteChromeBlock, fi as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, fn as evaluateVisibility, fr as heroCtaRowFragment, ft as SiteOptionPickerField, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, ga as TabsTrigger, gi as calendarWindowQuerySchema, gn as getPageDesignEditorState, gr as defineFragment, gt as InlineTextField, h as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, ha as TabsList, hi as BlockApiProvider, hn as applyPageDesignEditorAction, hr as bodyCopyFragment, ht as OfferingsPreviewWidgetProvider, i as usePreviewDesignHistoryOrder, ia as SelectTrigger, ii as inlineTextToPlainText, ir as faqHeadingFragment, jn as projectRecurringSchedule, jt as LinkField, kn as makeDefaultBlockComponent, kt as EditorProvider, li as getCurrentResolveImageUrlContext, ln as createManifestFormAdapter, lr as testimonialsCarouselFragment, lt as useEntryEditorController, m as usePreviewThemeOverlay, ma as TabsContent, mi as siblingPath, mn as MediaEditor, mo as __exportAll, mr as heroCopyFragment, mt as OfferingsPreviewGroupOrderField, n as useSiteChromeCustomizeOptional, na as SelectContent, ni as logger, nn as parseReferenceKind, nr as cardFragment, nt as PreviewInlineTextEditor, oi as Text$1, on as PaletteProvider, oo as Image, or as singleButtonFragment, ot as EditableBlockProvider, p as PreviewThemeOverlayProvider, pa as Tabs, pi as getAtPath, pn as createStoreBackend, pr as ctaRowFragment, pt as SiteOptionWidgetProvider, q as enqueueTransaction, qi as mapCurrentValueForSelect, qn as resolvePageRouteTarget, qr as bindingSchema, qt as undoHistory, r as PreviewDesignHistoryOrderProvider, ra as SelectItem, ri as coerceInlineTextWithFallback, rr as faqAccordionFragment, rt as PreviewTextEditor, si as RichText$1, sn as usePalette, so as GripVertical, sr as formEmbedFragment, st as EntryControllerProvider, t as SiteChromeCustomizeProvider, ta as Select, ti as renderInlineText, tr as headingFragment, tt as PreviewRichTextEditor, ui as resolveImageUrlWithContext, uo as ChevronRight, ur as testimonialsHeadingFragment, ut as createSiteOptionApiLoader, va as DialogContent, vi as eventCalendarListLayoutOptions, vn as decodePublicProductCategorySelectorQuery, vr as compileEditorModelRuntime, vt as EntryPickerField, wi as asDesignBlockId, wn as useApiMediaUploader, wt as ReferenceField, xa as DialogHeader, xi as isRecord$13, xn as AMBIENT_BACKGROUND_ROLES, xr as formatSiteChromeBackgroundTokenLabel, xt as ButtonWidgetProvider, ya as DialogDescription, yi as bookingConsentCarrierSchema, yn as DEFAULT_LAUNCH_READINESS_INPUT, yr as retargetCompiledBoundaryRuntimeForContentAdjacency, yt as EntryPickerWidgetProvider, za as unsafeAsEditorBlockValues, zn as buildThemeRuntime, zr as sectionTransitionFamilies, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-BHFgMjde.mjs";
3
+ import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-BguJY1SW.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-BkEgnYPP.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";
@@ -345,6 +345,473 @@ function getFragmentRegistry() {
345
345
  return fragmentRegistry;
346
346
  }
347
347
  //#endregion
348
+ //#region ../blocks/src/pageRenderingMode.ts
349
+ var MissingBlockOverrideError = class extends Error {
350
+ constructor(blockKind) {
351
+ super(`Override-only rendering requires an override for block kind "${blockKind}".`);
352
+ this.blockKind = blockKind;
353
+ this.code = "missing_block_override";
354
+ this.name = "MissingBlockOverrideError";
355
+ }
356
+ };
357
+ function isOverrideOnlyResourceInput(props) {
358
+ return props.rendering?.kind === "overrides-only";
359
+ }
360
+ function resolvePageThemeResources(props) {
361
+ if (isOverrideOnlyResourceInput(props)) return { kind: "unavailable" };
362
+ return {
363
+ kind: "available",
364
+ tokens: props.themeTokens ?? buildThemeRuntime(props.theme).tokens,
365
+ config: props.theme
366
+ };
367
+ }
368
+ function requireBlockOverride(resources, override, blockKind) {
369
+ if (resources.kind === "unavailable" && !override) throw new MissingBlockOverrideError(blockKind);
370
+ }
371
+ function overrideThemeProps(resources) {
372
+ return resources.kind === "available" ? {
373
+ theme: resources.tokens,
374
+ themeConfig: resources.config
375
+ } : {};
376
+ }
377
+ function requireThemeResources(resources, blockKind) {
378
+ if (resources.kind === "unavailable") throw new MissingBlockOverrideError(blockKind);
379
+ return resources;
380
+ }
381
+ //#endregion
382
+ //#region ../blocks/src/pageRendererBoundaries.tsx
383
+ const boundaryKey = (previousBlockId, nextBlockId) => `${previousBlockId}\u0000${nextBlockId}`;
384
+ function isSiteStyleTransitionStyleGroup(value) {
385
+ return value?.startsWith("site-style-transition-") === true;
386
+ }
387
+ function boundaryMapForAdjacentBlockIds(boundaries) {
388
+ return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
389
+ }
390
+ function boundaryBetweenBlocks(previousBlock, nextBlock, boundaries) {
391
+ const previousBlockId = previousBlock?.id ?? null;
392
+ const nextBlockId = nextBlock?.id ?? null;
393
+ if (!previousBlockId || !nextBlockId) return null;
394
+ return boundaries.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
395
+ }
396
+ function renderBoundaryAfterBlock(input) {
397
+ const previousBlockId = input.block.id;
398
+ const nextBlockId = input.nextBlock?.id ?? null;
399
+ if (!previousBlockId || !nextBlockId) return null;
400
+ const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
401
+ if (!boundary) return null;
402
+ const rendered = /* @__PURE__ */ jsx("div", {
403
+ "aria-hidden": "true",
404
+ "data-block-boundary": "",
405
+ "data-boundary-id": boundary.boundaryId,
406
+ "data-boundary-previous-block-id": boundary.previousBlockId,
407
+ "data-boundary-next-block-id": boundary.nextBlockId,
408
+ "data-style-group": boundary.styleGroup,
409
+ style: boundaryCssVarsStyle(boundary)
410
+ }, `${input.blockKey}:boundary`);
411
+ return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
412
+ }
413
+ function boundaryCssVarsStyle(boundary) {
414
+ return {
415
+ "--site-style-transition-from": boundary.cssVars.from,
416
+ "--site-style-transition-to": boundary.cssVars.to
417
+ };
418
+ }
419
+ function boundaryReserveCssVarsStyle(input) {
420
+ const before = input.before?.metrics.reserveCss ?? null;
421
+ const after = input.after?.metrics.reserveCss ?? null;
422
+ if (!before && !after) return void 0;
423
+ return {
424
+ ...before ? { "--site-style-boundary-before-reserve": before } : {},
425
+ ...after ? { "--site-style-boundary-after-reserve": after } : {}
426
+ };
427
+ }
428
+ function transitionCssVarsStyle(content) {
429
+ const transitionStyles = isObjectRecord(content._transitionStyles) ? content._transitionStyles : null;
430
+ const cssVars = isObjectRecord(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
431
+ const from = typeof cssVars?.from === "string" ? cssVars.from : null;
432
+ const to = typeof cssVars?.to === "string" ? cssVars.to : null;
433
+ if (!from && !to) return void 0;
434
+ return {
435
+ ...from ? { "--site-style-transition-from": from } : {},
436
+ ...to ? { "--site-style-transition-to": to } : {}
437
+ };
438
+ }
439
+ function mergeStyleObjects(left, right) {
440
+ if (!left) return right;
441
+ if (!right) return left;
442
+ return {
443
+ ...left,
444
+ ...right
445
+ };
446
+ }
447
+ function pageBlockPosition(index, blockCount) {
448
+ if (blockCount <= 1) return "only";
449
+ if (index === 0) return "first";
450
+ if (index === blockCount - 1) return "last";
451
+ return "middle";
452
+ }
453
+ //#endregion
454
+ //#region ../blocks/src/pageRenderAudience.tsx
455
+ /**
456
+ * The single policy for what a non-renderable block looks like.
457
+ *
458
+ * Public visitors never see renderer diagnostics, so every reason omits.
459
+ * Authoring surfaces keep the wording they have always had — the strings below
460
+ * are moved verbatim from the five former `fallback()` call sites.
461
+ */
462
+ function presentNotRenderableBlock(reason, audience) {
463
+ if (audience === "public") return null;
464
+ return diagnostic(authoringMessage(reason));
465
+ }
466
+ function authoringMessage(reason) {
467
+ switch (reason.kind) {
468
+ case "invalid-admission": return `Invalid content for block kind "${reason.blockKind}".`;
469
+ case "missing-definition": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${reason.blockKind}".`;
470
+ case "missing-layout": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${reason.blockKind}"].` : `No renderer available for block kind "${reason.blockKind}".`;
471
+ case "editor-unpreviewable":
472
+ case "render-threw": return `Unable to render block kind "${reason.blockKind}".`;
473
+ }
474
+ }
475
+ /**
476
+ * The empty-page notice. Authoring-only for the same reason as the block
477
+ * diagnostics: "No blocks found." is a message for whoever is building the
478
+ * page, not for whoever is reading it.
479
+ */
480
+ function presentEmptyPage(audience) {
481
+ if (audience === "public") return null;
482
+ return diagnostic("No blocks found.");
483
+ }
484
+ function diagnostic(message) {
485
+ return /* @__PURE__ */ jsx("div", {
486
+ className: "rb-p-6 rb-caption",
487
+ style: textColorStyle("mutedText"),
488
+ children: message
489
+ });
490
+ }
491
+ //#endregion
492
+ //#region ../blocks/src/pageRenderDiagnostics.ts
493
+ /**
494
+ * Emits one structured record per omitted block, per server render pass.
495
+ *
496
+ * Server-only by decision D3: public pages are server-rendered, and this is the
497
+ * runtime whose logger transport reaches centralised collection. A browser-side
498
+ * record would not, and re-render/hydration would multiply it. The cost is that
499
+ * an omission only a client navigation can see goes unlogged.
500
+ *
501
+ * Deliberately *not* inside the plan's `useMemo` — React makes no promises about
502
+ * when a memo recomputes, so a log placed there is neither reliable nor bounded.
503
+ */
504
+ function logOmittedBlocks(plan, dataContext) {
505
+ if (typeof window !== "undefined") return;
506
+ if (plan.omitted.length === 0) return;
507
+ const page = {
508
+ siteId: dataContext?.siteId ?? null,
509
+ pageId: dataContext?.pageId ?? null
510
+ };
511
+ if (plan.entries.length === 0) {
512
+ logger.error("blocks.pageRenderer.pageFullyOmitted", {
513
+ ...page,
514
+ omittedCount: plan.omitted.length,
515
+ blocks: plan.omitted.map((omission) => ({
516
+ blockId: omission.blockId,
517
+ blockKind: omission.blockKind,
518
+ reason: omission.reason.kind
519
+ }))
520
+ });
521
+ debugOmittedCustomBlocks(plan);
522
+ return;
523
+ }
524
+ for (const omission of plan.omitted) logger.warn("blocks.pageRenderer.blockOmitted", {
525
+ ...page,
526
+ blockId: omission.blockId,
527
+ blockKind: omission.blockKind,
528
+ reason: omission.reason.kind,
529
+ admissionError: omission.reason.kind === "invalid-admission" ? omission.reason.error.kind : null
530
+ });
531
+ debugOmittedCustomBlocks(plan);
532
+ }
533
+ /**
534
+ * Unlike the plan-time omissions this one genuinely can fire per re-render —
535
+ * it is raised where the failure happens, and no once-ness is claimed for it.
536
+ */
537
+ function logRenderThrew(block, dataContext) {
538
+ if (typeof window !== "undefined") return;
539
+ logger.warn("blocks.pageRenderer.blockRenderThrew", {
540
+ siteId: dataContext?.siteId ?? null,
541
+ pageId: dataContext?.pageId ?? null,
542
+ blockId: block.id ?? null,
543
+ blockKind: block.kind
544
+ });
545
+ }
546
+ /**
547
+ * Opt-in developer affordance for tracking down custom-block resolution.
548
+ *
549
+ * Driven off the plan's omissions so it stays reachable on **public** renders —
550
+ * "my custom block doesn't show up on the live site" is the exact situation it
551
+ * exists for, and that is the render where the block is now silently absent.
552
+ */
553
+ function debugOmittedCustomBlocks(plan) {
554
+ if (!shouldDebugCustomBlocks()) return;
555
+ for (const omission of plan.omitted) {
556
+ if (!omission.blockKind.startsWith("custom.")) continue;
557
+ debugCustomBlockResolution(omission.reason.kind, omission.blockId, omission.blockKind, omission.debug);
558
+ }
559
+ }
560
+ /** The authoring-side equivalent, where the block stays in the entry list. */
561
+ function debugCustomBlockDiagnostic(reason, block, debug) {
562
+ if (!block.kind.startsWith("custom.") || !shouldDebugCustomBlocks()) return;
563
+ debugCustomBlockResolution(reason.kind, block.id ?? null, block.kind, debug);
564
+ }
565
+ function debugCustomBlockResolution(reasonKind, blockId, blockKind, debug) {
566
+ try {
567
+ console.warn(reasonKind === "missing-definition" ? "[blocks:PageRenderer] custom block definition missing" : "[blocks:PageRenderer] custom block has no layout/variants and no override", {
568
+ blockId,
569
+ blockKind,
570
+ hasOverride: debug.hasOverride,
571
+ sdkCustomBlocksCount: debug.sdkCustomBlocksCount,
572
+ dbCustomBlocksCount: debug.dbCustomBlocksCount,
573
+ manifestKeys: debug.manifestKeys
574
+ });
575
+ } catch {}
576
+ }
577
+ function shouldDebugCustomBlocks() {
578
+ try {
579
+ return globalThis.process?.env?.DEBUG_CUSTOM_BLOCKS === "1";
580
+ } catch {
581
+ return false;
582
+ }
583
+ }
584
+ //#endregion
585
+ //#region ../blocks/src/pageRenderPlan.ts
586
+ /**
587
+ * Decides, once per page render, which blocks can render and what happens to
588
+ * the ones that cannot.
589
+ *
590
+ * Pure. Effects — logging in particular — belong at the call site, because this
591
+ * runs inside a `useMemo` whose recomputation React makes no promises about.
592
+ */
593
+ function buildPageRenderPlan(input) {
594
+ const resolveTarget = createRenderTargetResolver(input);
595
+ const entries = [];
596
+ const omitted = [];
597
+ for (const block of input.page.blocks) {
598
+ const outcome = planBlock(block, getRenderableContent(block, input.previewStage), resolveTarget);
599
+ if (outcome.kind !== "diagnostic") {
600
+ entries.push(outcome);
601
+ continue;
602
+ }
603
+ const resolved = resolveTarget(block.kind);
604
+ const debug = {
605
+ hasOverride: Boolean(resolved.override),
606
+ sdkCustomBlocksCount: input.sdkConfig?.customBlocks?.length ?? 0,
607
+ dbCustomBlocksCount: input.customBlocks?.length ?? 0,
608
+ manifestKeys: resolved.definition ? Object.keys(resolved.definition.manifest ?? {}).sort() : null
609
+ };
610
+ if (input.audience === "public") {
611
+ omitted.push({
612
+ blockId: block.id ?? null,
613
+ blockKind: block.kind,
614
+ reason: outcome.reason,
615
+ override: resolved.override,
616
+ debug
617
+ });
618
+ continue;
619
+ }
620
+ entries.push({
621
+ ...outcome,
622
+ debug
623
+ });
624
+ }
625
+ return {
626
+ entries,
627
+ omitted,
628
+ runtimeBoundaries: retargetBoundariesAcrossOmissions({
629
+ boundaries: input.runtimeBoundaries,
630
+ originalBlocks: input.page.blocks,
631
+ survivingBlocks: new Set(entries.map((entry) => entry.block)),
632
+ previewStage: input.previewStage
633
+ })
634
+ };
635
+ }
636
+ /**
637
+ * Mirrors the order of the checks `MemoBlockSection` used to make inline, so no
638
+ * case changes meaning: admission first, then definition/override resolution,
639
+ * then the layout requirement.
640
+ */
641
+ function planBlock(block, renderableContent, resolveTarget) {
642
+ const common = {
643
+ block,
644
+ renderableContent
645
+ };
646
+ if (block.presentationAdmission.kind === "invalid") return {
647
+ ...common,
648
+ kind: "diagnostic",
649
+ reason: {
650
+ kind: "invalid-admission",
651
+ blockKind: block.kind,
652
+ error: block.presentationAdmission.error
653
+ }
654
+ };
655
+ const { definition, systemDefinition, override } = resolveTarget(block.kind);
656
+ const isCustom = block.kind.startsWith("custom.");
657
+ if (!definition) return override ? {
658
+ ...common,
659
+ kind: "override-only",
660
+ override
661
+ } : {
662
+ ...common,
663
+ kind: "diagnostic",
664
+ reason: {
665
+ kind: "missing-definition",
666
+ blockKind: block.kind,
667
+ isCustom
668
+ }
669
+ };
670
+ const manifestHasLayout = Boolean(definition.manifest.layout) || Object.keys(definition.manifest.variants ?? {}).length > 0;
671
+ if (!override && !manifestHasLayout) return {
672
+ ...common,
673
+ kind: "diagnostic",
674
+ reason: {
675
+ kind: "missing-layout",
676
+ blockKind: block.kind,
677
+ isCustom
678
+ }
679
+ };
680
+ return {
681
+ ...common,
682
+ kind: "renderable",
683
+ definition,
684
+ override,
685
+ variantKey: systemDefinition ? resolveVariantKey(systemDefinition.manifest, renderableContent) ?? null : null,
686
+ managesOwnWrapper: Boolean(systemDefinition?.manifest.behaviours?.managesOwnWrapper)
687
+ };
688
+ }
689
+ /**
690
+ * Resolves definition + override once per block kind, and builds the
691
+ * custom-block registry at most once per plan rather than once per custom
692
+ * block, which is what the previous inline path did.
693
+ */
694
+ function createRenderTargetResolver(input) {
695
+ const cache = /* @__PURE__ */ new Map();
696
+ let customRegistry = null;
697
+ const customRegistryOnce = () => {
698
+ customRegistry ?? (customRegistry = createCustomBlockRegistry({
699
+ sdkConfig: input.sdkConfig,
700
+ customBlocks: (input.customBlocks ?? []).map((manifest) => ({
701
+ manifest,
702
+ source: { kind: "managed-database" }
703
+ }))
704
+ }));
705
+ return customRegistry;
706
+ };
707
+ return (blockKind) => {
708
+ const cached = cache.get(blockKind);
709
+ if (cached) return cached;
710
+ const systemDefinition = getBlockDefinition(blockKind);
711
+ const resolved = {
712
+ definition: systemDefinition ?? (blockKind.startsWith("custom.") ? customRegistryOnce().findManifest(blockKind)?.descriptor.definition : void 0),
713
+ systemDefinition,
714
+ override: getBlockOverride(blockKind, input.blockOverrides)
715
+ };
716
+ cache.set(blockKind, resolved);
717
+ return resolved;
718
+ };
719
+ }
720
+ /**
721
+ * Look up a block override component by block kind.
722
+ * Supports both full ("block.hero") and short ("hero") keys.
723
+ */
724
+ function getBlockOverride(blockKind, overrides) {
725
+ if (!overrides) return void 0;
726
+ if (overrides[blockKind]) return overrides[blockKind];
727
+ return overrides[blockKind.replace(/^block\./, "")];
728
+ }
729
+ /**
730
+ * Resolves block content based on stage priority.
731
+ * For draft/preview: draftContent takes priority over content.
732
+ * For published: content is the source of truth.
733
+ */
734
+ function getRenderableContent(block, previewStage = "published") {
735
+ const source = previewStage === "preview" && block.draftContent ? block.draftContent : block.content ?? {};
736
+ return isObjectRecord(source) ? source : {};
737
+ }
738
+ /**
739
+ * Re-points section boundaries across omitted blocks.
740
+ *
741
+ * Boundaries are keyed by adjacent block-id *pairs*, so dropping B from
742
+ * [A, B, C] does not merely remove B's boundaries — it removes the boundary
743
+ * between the survivors, because no `A→C` key was ever compiled.
744
+ *
745
+ * Per decision D2 the treatment for a merged gap comes from the boundary
746
+ * entering the omitted run (`A→firstOmitted`), falling back to the one leaving
747
+ * it (`lastOmitted→C`). The destination surface is a separate question: only
748
+ * the exiting boundary knows what C looks like, so the merged boundary ends on
749
+ * that endpoint rather than on the omitted block's. In the exiting-only
750
+ * fallback the origin remains an approximation: `from` is the omitted block's
751
+ * surface, because no compiled boundary carries A's. The hosted path no longer
752
+ * needs this at all (site-renderer admits blocks before compiling boundaries);
753
+ * it remains the safety net for an SDK whose compiled boundaries predate an
754
+ * omission.
755
+ */
756
+ function retargetBoundariesAcrossOmissions(input) {
757
+ const { boundaries, originalBlocks, survivingBlocks, previewStage } = input;
758
+ if (boundaries === void 0) return void 0;
759
+ if (boundaries.length === 0) return boundaries;
760
+ if (!originalBlocks.some((block) => !survivingBlocks.has(block))) return boundaries;
761
+ const byPair = new Map(boundaries.map((boundary) => [pairKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
762
+ const retargeted = [];
763
+ let previousSurvivor = null;
764
+ let run = [];
765
+ for (const block of originalBlocks) {
766
+ if (!survivingBlocks.has(block)) {
767
+ run.push(block);
768
+ continue;
769
+ }
770
+ if (previousSurvivor?.id && block.id) {
771
+ const boundary = run.length === 0 ? byPair.get(pairKey(previousSurvivor.id, block.id)) : mergedBoundary({
772
+ byPair,
773
+ previousBlock: previousSurvivor,
774
+ previousBlockId: previousSurvivor.id,
775
+ nextBlock: block,
776
+ nextBlockId: block.id,
777
+ run,
778
+ previewStage
779
+ });
780
+ if (boundary) retargeted.push(boundary);
781
+ }
782
+ previousSurvivor = block;
783
+ run = [];
784
+ }
785
+ return retargeted;
786
+ }
787
+ function mergedBoundary(input) {
788
+ const { byPair, previousBlock, previousBlockId, nextBlock, nextBlockId, run, previewStage } = input;
789
+ const firstOmittedId = run[0]?.id;
790
+ const lastOmittedId = run[run.length - 1]?.id;
791
+ const entering = firstOmittedId ? byPair.get(pairKey(previousBlockId, firstOmittedId)) : void 0;
792
+ const exiting = lastOmittedId ? byPair.get(pairKey(lastOmittedId, nextBlockId)) : void 0;
793
+ const donor = entering ?? exiting;
794
+ if (!donor) return void 0;
795
+ const transition = compileTransitionRuntime({
796
+ treatment: donor.treatment,
797
+ from: donor.from,
798
+ to: exiting?.to ?? donor.to
799
+ });
800
+ return retargetCompiledBoundaryRuntimeForContentAdjacency({
801
+ ...donor,
802
+ boundaryId: makeBoundaryId(asDesignBlockId(previousBlockId), asDesignBlockId(nextBlockId)),
803
+ previousBlockId,
804
+ nextBlockId,
805
+ from: transition.from,
806
+ to: transition.to,
807
+ cssVars: transition.cssVars
808
+ }, {
809
+ currentContent: getRenderableContent(previousBlock, previewStage),
810
+ nextContent: getRenderableContent(nextBlock, previewStage)
811
+ });
812
+ }
813
+ const pairKey = boundaryKey;
814
+ //#endregion
348
815
  //#region ../blocks/src/system/manifest/hydrateLinks.ts
349
816
  /**
350
817
  * Hydrates link objects within block content using the provided route map. Returns
@@ -467,112 +934,202 @@ function resolveBlockData(blockId, dataLoaders, dataContext, routes) {
467
934
  return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
468
935
  }
469
936
  //#endregion
470
- //#region ../blocks/src/pageRenderingMode.ts
471
- var MissingBlockOverrideError = class extends Error {
472
- constructor(blockKind) {
473
- super(`Override-only rendering requires an override for block kind "${blockKind}".`);
474
- this.blockKind = blockKind;
475
- this.code = "missing_block_override";
476
- this.name = "MissingBlockOverrideError";
937
+ //#region ../blocks/src/pageRenderPreparation.ts
938
+ /**
939
+ * Stage two of the render plan.
940
+ *
941
+ * `buildPageRenderPlan` decides everything knowable from the page and the block
942
+ * registries. This pass decides everything knowable once the *render* inputs are
943
+ * in scope — routes, resolved data, theme resources — which is where content
944
+ * parsing, link hydration and data resolution can throw.
945
+ *
946
+ * Why a second stage rather than folding `render-threw` into `buildPageRenderPlan`
947
+ * with the other three reasons: the work that throws reads `dataContext`,
948
+ * `routeMap` and `themeResources`, none of which are plan inputs. Adding them
949
+ * would make every plan entry a fresh object on every render whose `dataContext`
950
+ * identity changed, and entry identity is exactly what `MemoBlockSection`'s
951
+ * comparator uses to skip a block subtree. So the decision moves as early as its
952
+ * inputs allow — before any wrapper markup exists — and no earlier.
953
+ *
954
+ * Pure, and memoised by the caller. Failures come back as data so the logging
955
+ * stays at the edge (decision D3), matching `buildPageRenderPlan`.
956
+ */
957
+ function preparePageRender(input) {
958
+ const entries = [];
959
+ const constructionFailures = [];
960
+ for (const entry of input.plan.entries) {
961
+ const prepared = prepareEntry(entry, input);
962
+ if (prepared.kind === "render-threw") constructionFailures.push(entry);
963
+ entries.push({
964
+ entry,
965
+ prepared
966
+ });
477
967
  }
478
- };
479
- function isOverrideOnlyResourceInput(props) {
480
- return props.rendering?.kind === "overrides-only";
481
- }
482
- function resolvePageThemeResources(props) {
483
- if (isOverrideOnlyResourceInput(props)) return { kind: "unavailable" };
968
+ if (constructionFailures.length === 0 || input.audience === "authoring") return {
969
+ entries,
970
+ constructionFailures,
971
+ runtimeBoundaries: input.plan.runtimeBoundaries
972
+ };
973
+ const survivors = entries.filter((candidate) => candidate.prepared.kind !== "render-threw");
484
974
  return {
485
- kind: "available",
486
- tokens: props.themeTokens ?? buildThemeRuntime(props.theme).tokens,
487
- config: props.theme
975
+ entries: survivors,
976
+ constructionFailures,
977
+ runtimeBoundaries: retargetBoundariesAcrossOmissions({
978
+ boundaries: input.plan.runtimeBoundaries,
979
+ originalBlocks: input.plan.entries.map((planned) => planned.block),
980
+ survivingBlocks: new Set(survivors.map((survivor) => survivor.entry.block)),
981
+ previewStage: input.previewStage
982
+ })
488
983
  };
489
984
  }
490
- function requireBlockOverride(resources, override, blockKind) {
491
- if (resources.kind === "unavailable" && !override) throw new MissingBlockOverrideError(blockKind);
492
- }
493
- function overrideThemeProps(resources) {
494
- return resources.kind === "available" ? {
495
- theme: resources.tokens,
496
- themeConfig: resources.config
497
- } : {};
498
- }
499
- function requireThemeResources(resources, blockKind) {
500
- if (resources.kind === "unavailable") throw new MissingBlockOverrideError(blockKind);
501
- return resources;
502
- }
503
- //#endregion
504
- //#region ../blocks/src/pageRendererBoundaries.tsx
505
- const boundaryKey = (previousBlockId, nextBlockId) => `${previousBlockId}\u0000${nextBlockId}`;
506
- function isSiteStyleTransitionStyleGroup(value) {
507
- return value?.startsWith("site-style-transition-") === true;
508
- }
509
- function boundaryMapForAdjacentBlockIds(boundaries) {
510
- return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
511
- }
512
- function boundaryBetweenBlocks(previousBlock, nextBlock, boundaries) {
513
- const previousBlockId = previousBlock?.id ?? null;
514
- const nextBlockId = nextBlock?.id ?? null;
515
- if (!previousBlockId || !nextBlockId) return null;
516
- return boundaries.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
517
- }
518
- function renderBoundaryAfterBlock(input) {
519
- const previousBlockId = input.block.id;
520
- const nextBlockId = input.nextBlock?.id ?? null;
521
- if (!previousBlockId || !nextBlockId) return null;
522
- const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
523
- if (!boundary) return null;
524
- const rendered = /* @__PURE__ */ jsx("div", {
525
- "aria-hidden": "true",
526
- "data-block-boundary": "",
527
- "data-boundary-id": boundary.boundaryId,
528
- "data-boundary-previous-block-id": boundary.previousBlockId,
529
- "data-boundary-next-block-id": boundary.nextBlockId,
530
- "data-style-group": boundary.styleGroup,
531
- style: boundaryCssVarsStyle(boundary)
532
- }, `${input.blockKey}:boundary`);
533
- return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
985
+ function prepareEntry(entry, input) {
986
+ if (entry.kind !== "renderable") return { kind: "plan-decided" };
987
+ const draftContent = previewableEditorContent(entry);
988
+ if (draftContent === null) return { kind: "editor-unpreviewable" };
989
+ try {
990
+ return buildPreparedContent(entry, draftContent, input);
991
+ } catch {
992
+ return { kind: "render-threw" };
993
+ }
534
994
  }
535
- function boundaryCssVarsStyle(boundary) {
995
+ /**
996
+ * Editor admission validates raw in-flight values without minting a renderable
997
+ * proof. Returns `null` when even relaxed validation rejects the draft.
998
+ */
999
+ function previewableEditorContent(entry) {
1000
+ if (entry.block.presentationAdmission.kind !== "editor") return entry.renderableContent;
1001
+ const draft = validateManifestDraft(compileManifestContentContract(entry.definition.manifest), entry.renderableContent);
1002
+ return draft.kind === "previewable" ? draft.data : null;
1003
+ }
1004
+ function buildPreparedContent(entry, content, input) {
1005
+ const { dataContext } = input;
1006
+ const block = entry.block;
1007
+ const routes = input.routeMap ?? dataContext?.routes;
1008
+ const hydratedContent = routes ? hydrateManifestLinks(entry.definition.manifest, content, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : content;
1009
+ const resolved = resolveBlockData(block.id, entry.definition.dataLoaders, dataContext, routes);
1010
+ const baseProps = buildBlockOverrideProps({
1011
+ content: hydratedContent,
1012
+ data: resolved,
1013
+ block,
1014
+ themeResources: input.themeResources,
1015
+ dataContext,
1016
+ imageResolveContext: input.imageResolveContext
1017
+ });
1018
+ baseProps.bookingTimeZone = dataContext?.bookingTimeZone;
536
1019
  return {
537
- "--site-style-transition-from": boundary.cssVars.from,
538
- "--site-style-transition-to": boundary.cssVars.to
1020
+ kind: "content",
1021
+ baseProps,
1022
+ component: entry.override ? void 0 : getCachedBlockComponent(entry.definition.manifest),
1023
+ hasResolvedData: !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0,
1024
+ routes
539
1025
  };
540
1026
  }
541
- function boundaryReserveCssVarsStyle(input) {
542
- const before = input.before?.metrics.reserveCss ?? null;
543
- const after = input.after?.metrics.reserveCss ?? null;
544
- if (!before && !after) return void 0;
1027
+ /**
1028
+ * The serialisable prop bundle every block component and override receives.
1029
+ *
1030
+ * Shared by the with-definition and override-without-definition paths, which
1031
+ * differ only in the content and resolved data they pass in.
1032
+ */
1033
+ function buildBlockOverrideProps(input) {
1034
+ const { block, dataContext } = input;
545
1035
  return {
546
- ...before ? { "--site-style-boundary-before-reserve": before } : {},
547
- ...after ? { "--site-style-boundary-after-reserve": after } : {}
1036
+ content: input.content,
1037
+ ...overrideThemeProps(input.themeResources),
1038
+ data: input.data,
1039
+ ...blockSessionProps(dataContext),
1040
+ ...blockSubjectProps(dataContext),
1041
+ imageResolveContext: input.imageResolveContext,
1042
+ blockId: block.id ?? null,
1043
+ blockKind: block.kind
548
1044
  };
549
1045
  }
550
- function transitionCssVarsStyle(content) {
551
- const transitionStyles = isObjectRecord(content._transitionStyles) ? content._transitionStyles : null;
552
- const cssVars = isObjectRecord(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
553
- const from = typeof cssVars?.from === "string" ? cssVars.from : null;
554
- const to = typeof cssVars?.to === "string" ? cssVars.to : null;
555
- if (!from && !to) return void 0;
1046
+ /** Site, transport and session context a block needs to call back to the API. */
1047
+ function blockSessionProps(dataContext) {
556
1048
  return {
557
- ...from ? { "--site-style-transition-from": from } : {},
558
- ...to ? { "--site-style-transition-to": to } : {}
1049
+ siteId: dataContext?.siteId,
1050
+ apiBaseUrl: dataContext?.apiBaseUrl,
1051
+ supabaseUrl: dataContext?.supabaseUrl,
1052
+ portalToken: dataContext?.portalToken ?? null,
1053
+ previewToken: dataContext?.previewToken ?? null,
1054
+ stage: dataContext?.previewStage
559
1055
  };
560
1056
  }
561
- function mergeStyleObjects(left, right) {
562
- if (!left) return right;
563
- if (!right) return left;
1057
+ /** What this render is *about* — the entry, occurrence or surface in scope. */
1058
+ function blockSubjectProps(dataContext) {
564
1059
  return {
565
- ...left,
566
- ...right
1060
+ occurrenceContext: dataContext?.occurrenceContext ?? null,
1061
+ entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
1062
+ contentEntry: dataContext?.contentEntry ?? null,
1063
+ pageSurface: dataContext?.pageSurface ?? null,
1064
+ subject: dataContext?.subject ?? null
567
1065
  };
568
1066
  }
569
- function pageBlockPosition(index, blockCount) {
570
- if (blockCount <= 1) return "only";
571
- if (index === 0) return "first";
572
- if (index === blockCount - 1) return "last";
573
- return "middle";
1067
+ const blockComponentCache = /* @__PURE__ */ new WeakMap();
1068
+ function getCachedBlockComponent(manifest) {
1069
+ const cached = blockComponentCache.get(manifest);
1070
+ if (cached) return cached;
1071
+ const created = makeDefaultBlockComponent({ manifest });
1072
+ blockComponentCache.set(manifest, created);
1073
+ return created;
574
1074
  }
575
1075
  //#endregion
1076
+ //#region ../blocks/src/BlockErrorBoundary.tsx
1077
+ /**
1078
+ * Catches a throw from inside a block component's own render.
1079
+ *
1080
+ * `preparePageRender` guards everything that happens while *building* a block's
1081
+ * element; this covers the part React runs afterwards, which no try/catch can
1082
+ * reach. Without it one bad block takes the whole page down.
1083
+ *
1084
+ * Error boundaries have to be classes, and a class in a React Server Component
1085
+ * tree is called without `new`, so this file has to be a client module. Which is
1086
+ * also why it imports nothing from the rest of the package: the bundler groups
1087
+ * modules into chunks by which entries reach them, so importing
1088
+ * `pageRenderAudience` or `pageRenderDiagnostics` here would put them in a
1089
+ * chunk marked `"use client"` and turn `presentEmptyPage`, `logOmittedBlocks`
1090
+ * and friends into client references that the server can no longer call. The
1091
+ * fallback node and the log record come in as props instead.
1092
+ *
1093
+ * See the "Render Audiences" section of the package README for what this does
1094
+ * and does not catch on the server.
1095
+ */
1096
+ function createBlockErrorBoundary() {
1097
+ if (typeof React$1.Component !== "function") return function ServerBlockErrorBoundary({ children }) {
1098
+ return children;
1099
+ };
1100
+ return class ClientBlockErrorBoundary extends React$1.Component {
1101
+ constructor(props) {
1102
+ super(props);
1103
+ this.state = {
1104
+ failed: false,
1105
+ resetKey: props.resetKey
1106
+ };
1107
+ }
1108
+ static getDerivedStateFromError() {
1109
+ return { failed: true };
1110
+ }
1111
+ static getDerivedStateFromProps(props, state) {
1112
+ if (props.resetKey === state.resetKey) return null;
1113
+ return {
1114
+ failed: false,
1115
+ resetKey: props.resetKey
1116
+ };
1117
+ }
1118
+ componentDidCatch(error) {
1119
+ try {
1120
+ console.error("blocks.pageRenderer.blockRenderThrew", {
1121
+ ...this.props.record,
1122
+ message: error instanceof Error ? error.message : String(error)
1123
+ });
1124
+ } catch {}
1125
+ }
1126
+ render() {
1127
+ return this.state.failed ? this.props.fallback : this.props.children;
1128
+ }
1129
+ };
1130
+ }
1131
+ const BlockErrorBoundary = createBlockErrorBoundary();
1132
+ //#endregion
576
1133
  //#region ../blocks/src/pageRenderAdmission.ts
577
1134
  function toEditorPresentationPage(page) {
578
1135
  if (!page) return null;
@@ -590,99 +1147,248 @@ function EditorPageRenderer(props) {
590
1147
  const page = React$1.useMemo(() => toEditorPresentationPage(props.page), [props.page]);
591
1148
  return /* @__PURE__ */ jsx(PageRendererCore, {
592
1149
  ...props,
593
- page
1150
+ page,
1151
+ audience: "authoring"
594
1152
  });
595
1153
  }
596
1154
  function PageRendererCore(props) {
597
- const { page, runtimeBoundaries, dataContext, wrapBlock, wrapBoundary, registry } = props;
1155
+ const { page, audience, runtimeBoundaries, dataContext, routeMap, registry, sdkConfig, customBlocks, blockOverrides } = props;
598
1156
  const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
599
1157
  dataContext?.imageResolveContext,
600
1158
  dataContext?.mediaAssets,
601
1159
  dataContext?.siteId,
602
1160
  dataContext?.supabaseUrl
603
1161
  ]);
604
- const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(runtimeBoundaries ?? []), [runtimeBoundaries]);
605
- const usesRuntimeBoundaries = runtimeBoundaries !== void 0;
1162
+ const previewStage = dataContext?.previewStage ?? "published";
1163
+ const plan = React$1.useMemo(() => buildPageRenderPlan({
1164
+ page: page ?? {
1165
+ name: "",
1166
+ path: "",
1167
+ purpose: "",
1168
+ blocks: []
1169
+ },
1170
+ audience,
1171
+ runtimeBoundaries,
1172
+ previewStage,
1173
+ sdkConfig,
1174
+ customBlocks,
1175
+ blockOverrides
1176
+ }), [
1177
+ page,
1178
+ audience,
1179
+ runtimeBoundaries,
1180
+ previewStage,
1181
+ sdkConfig,
1182
+ customBlocks,
1183
+ blockOverrides
1184
+ ]);
606
1185
  const themeResources = React$1.useMemo(() => resolvePageThemeResources(props), [
607
1186
  props.rendering,
608
1187
  props.theme,
609
1188
  props.themeTokens
610
1189
  ]);
611
- if (!page || page.blocks.length === 0) return /* @__PURE__ */ jsx("div", {
612
- className: "rb-p-6 rb-caption",
613
- style: textColorStyle("mutedText"),
614
- children: "No blocks found."
1190
+ const preparation = React$1.useMemo(() => preparePageRender({
1191
+ plan,
1192
+ audience,
1193
+ dataContext,
1194
+ routeMap,
1195
+ themeResources,
1196
+ imageResolveContext,
1197
+ previewStage
1198
+ }), [
1199
+ plan,
1200
+ audience,
1201
+ dataContext,
1202
+ routeMap,
1203
+ themeResources,
1204
+ imageResolveContext,
1205
+ previewStage
1206
+ ]);
1207
+ const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(preparation.runtimeBoundaries ?? []), [preparation.runtimeBoundaries]);
1208
+ const usesRuntimeBoundaries = preparation.runtimeBoundaries !== void 0;
1209
+ reportAndReplayOmissions({
1210
+ plan,
1211
+ preparation,
1212
+ dataContext,
1213
+ themeResources
615
1214
  });
1215
+ if (!page || preparation.entries.length === 0) return presentEmptyPage(audience);
616
1216
  const resolvedRegistry = registry ?? getDefaultComponentRegistry();
617
1217
  setContextResolveImageUrlContext(imageResolveContext);
618
- return /* @__PURE__ */ jsx("div", { children: page.blocks.map((block, index) => {
619
- const blockPosition = pageBlockPosition(index, page.blocks.length);
620
- const blockKey = block.id ?? `${block.kind}-${index}`;
621
- const previousBlock = page.blocks[index - 1] ?? null;
622
- const nextBlock = page.blocks[index + 1] ?? null;
623
- const boundaryBefore = boundaryBetweenBlocks(previousBlock, block, boundaryByAdjacentBlockIds);
624
- const boundaryAfter = boundaryBetweenBlocks(block, nextBlock, boundaryByAdjacentBlockIds);
625
- const boundaryElement = renderBoundaryAfterBlock({
626
- block,
627
- nextBlock,
628
- blockKey,
629
- boundaryByAdjacentBlockIds,
630
- wrapBoundary
631
- });
632
- const cleanKind = block.kind.replace(/^block\./, "");
633
- const definition = getBlockDefinition(block.kind);
634
- const managesOwnWrapper = definition?.manifest.behaviours?.managesOwnWrapper;
635
- const renderableContent = getRenderableContent(block, dataContext?.previewStage);
636
- const variantKey = definition?.manifest ? resolveVariantKey(definition.manifest, renderableContent) : null;
637
- const shouldUseWrapper = !managesOwnWrapper || Boolean(wrapBlock);
638
- const blockSectionProps = buildBlockSectionProps({
639
- props,
640
- themeResources,
641
- block,
642
- blockKey,
643
- imageResolveContext,
644
- registry: resolvedRegistry
645
- });
646
- if (!shouldUseWrapper) {
647
- const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
648
- return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
649
- }
650
- const wrapperClassName = [`block-${cleanKind}`, wrapBlock ? "group relative" : null].filter(Boolean).join(" ");
651
- const styleGroup = typeof renderableContent.styleGroup === "string" ? renderableContent.styleGroup : void 0;
652
- const blockLook = typeof renderableContent.blockLook === "string" ? renderableContent.blockLook : void 0;
653
- const blockComposition = readBlockComposition(renderableContent.blockComposition);
654
- const transitionStyle = transitionCssVarsStyle(renderableContent);
655
- const blockStyle = mergeStyleObjects(transitionStyle, boundaryReserveCssVarsStyle({
656
- before: boundaryBefore,
657
- after: boundaryAfter
658
- }));
659
- const blockElement = /* @__PURE__ */ jsx("div", {
660
- className: wrapperClassName,
661
- "data-block": cleanKind,
662
- "data-block-id": block.id ?? void 0,
663
- "data-block-kind": block.kind,
664
- "data-variant": variantKey ?? void 0,
665
- "data-block-variant": variantKey ?? void 0,
666
- "data-block-look": blockLook,
667
- "data-block-composition": blockComposition?.treatment,
668
- "data-block-composition-kind": blockComposition?.kind,
669
- "data-page-block-position": blockPosition,
670
- "data-site-style-boundary-before": boundaryBefore?.metrics.size,
671
- "data-site-style-boundary-after": boundaryAfter?.metrics.size,
672
- "data-style-group": styleGroup,
673
- style: blockStyle,
674
- children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
675
- }, blockKey);
676
- if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
677
- if (usesRuntimeBoundaries || !isSiteStyleTransitionStyleGroup(styleGroup)) return blockElement;
678
- return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, /* @__PURE__ */ jsx("div", {
679
- "aria-hidden": "true",
680
- "data-block-transition": "",
681
- "data-block-transition-for": block.id ?? blockKey,
682
- "data-style-group": styleGroup,
683
- style: transitionStyle
684
- })] }, blockKey);
685
- }) });
1218
+ return /* @__PURE__ */ jsx("div", { children: preparation.entries.map((entry, index) => renderGuardedPlanEntry({
1219
+ entry,
1220
+ index,
1221
+ entries: preparation.entries,
1222
+ props,
1223
+ themeResources,
1224
+ imageResolveContext,
1225
+ resolvedRegistry,
1226
+ boundaryByAdjacentBlockIds,
1227
+ usesRuntimeBoundaries,
1228
+ wrapBlock: props.wrapBlock,
1229
+ wrapBoundary: props.wrapBoundary
1230
+ })) });
1231
+ }
1232
+ /**
1233
+ * The render pass's effects, kept out of both memos and run in the order the
1234
+ * renderer has always run them in.
1235
+ *
1236
+ * Logging comes first because the replay below can throw: in overrides-only
1237
+ * mode a missing-definition omission would otherwise abort the render before
1238
+ * the deploy-skew signal was ever emitted — the configuration where it is most
1239
+ * diagnostic. Logging is side-effect-free and cannot fail the render.
1240
+ */
1241
+ function reportAndReplayOmissions(input) {
1242
+ const { plan, dataContext } = input;
1243
+ logOmittedBlocks(plan, dataContext);
1244
+ for (const failed of input.preparation.constructionFailures) logRenderThrew(failed.block, dataContext);
1245
+ for (const omission of plan.omitted) switch (omission.reason.kind) {
1246
+ case "invalid-admission": break;
1247
+ case "missing-definition":
1248
+ case "missing-layout":
1249
+ requireBlockOverride(input.themeResources, omission.override, omission.blockKind);
1250
+ break;
1251
+ }
1252
+ for (const failed of input.preparation.constructionFailures) requireEntryBlockOverride(failed, input.themeResources);
1253
+ }
1254
+ const blockKeyFor = (block, index) => block.id ?? `${block.kind}-${index}`;
1255
+ const entryResetTokens = /* @__PURE__ */ new WeakMap();
1256
+ let nextEntryResetToken = 0;
1257
+ /**
1258
+ * A serialisable stand-in for the identity of the block an entry renders.
1259
+ *
1260
+ * The error boundary is a client component, so anything crossing into it has to
1261
+ * survive RSC serialisation — and a prepared entry carries the block definition
1262
+ * and override components. A number minted once per block object says the same
1263
+ * thing: it changes exactly when the block's content does, which is when a
1264
+ * boundary should forget that this block failed.
1265
+ *
1266
+ * Keyed on the block rather than the prepared entry on purpose. `toPresentationPage`
1267
+ * memoises blocks on `props.page`, while a prepared entry is a fresh object every
1268
+ * time preparation recomputes — any `dataContext`, `routeMap` or `themeResources`
1269
+ * identity change — so keying on the entry would reset a failed boundary on renders
1270
+ * where nothing about the block changed, and it would retry and re-log each time.
1271
+ */
1272
+ function entryResetToken(entry) {
1273
+ const block = entry.entry.block;
1274
+ const existing = entryResetTokens.get(block);
1275
+ if (existing !== void 0) return existing;
1276
+ const token = ++nextEntryResetToken;
1277
+ entryResetTokens.set(block, token);
1278
+ return token;
1279
+ }
1280
+ /**
1281
+ * Wraps one entry — wrapper, block and boundary sibling alike — in the per-block
1282
+ * error boundary, so a throw from inside the block's own render takes only that
1283
+ * block out of the page rather than the page itself.
1284
+ */
1285
+ function renderGuardedPlanEntry(input) {
1286
+ const block = input.entry.entry.block;
1287
+ const dataContext = input.props.dataContext;
1288
+ requireEntryBlockOverride(input.entry.entry, input.themeResources);
1289
+ return /* @__PURE__ */ jsx(BlockErrorBoundary, {
1290
+ fallback: presentNotRenderableBlock({
1291
+ kind: "render-threw",
1292
+ blockKind: block.kind
1293
+ }, input.props.audience),
1294
+ record: {
1295
+ siteId: dataContext?.siteId ?? null,
1296
+ pageId: dataContext?.pageId ?? null,
1297
+ blockId: block.id ?? null,
1298
+ blockKind: block.kind
1299
+ },
1300
+ resetKey: entryResetToken(input.entry),
1301
+ children: renderPlanEntry(input)
1302
+ }, blockKeyFor(block, input.index));
1303
+ }
1304
+ /**
1305
+ * The overrides-only guard, run in the order the renderer has always run it:
1306
+ * after an admission failure has already returned, before anything else.
1307
+ */
1308
+ function requireEntryBlockOverride(entry, themeResources) {
1309
+ if (entry.kind === "diagnostic") {
1310
+ if (entry.reason.kind === "invalid-admission") return;
1311
+ requireBlockOverride(themeResources, void 0, entry.block.kind);
1312
+ return;
1313
+ }
1314
+ requireBlockOverride(themeResources, entry.override, entry.block.kind);
1315
+ }
1316
+ /**
1317
+ * Renders one planned block: its wrapper, style-group data attributes,
1318
+ * boundary reserve space and any boundary or transition sibling that follows.
1319
+ *
1320
+ * Extracted from PageRendererCore so the component stays about wiring the plan
1321
+ * rather than also owning per-block markup.
1322
+ */
1323
+ function renderPlanEntry(input) {
1324
+ const { index, entries, props, themeResources, imageResolveContext, resolvedRegistry, boundaryByAdjacentBlockIds, usesRuntimeBoundaries, wrapBlock, wrapBoundary } = input;
1325
+ const entry = input.entry.entry;
1326
+ const block = entry.block;
1327
+ const blockPosition = pageBlockPosition(index, entries.length);
1328
+ const blockKey = blockKeyFor(block, index);
1329
+ const previousBlock = entries[index - 1]?.entry.block ?? null;
1330
+ const nextBlock = entries[index + 1]?.entry.block ?? null;
1331
+ const boundaryBefore = boundaryBetweenBlocks(previousBlock, block, boundaryByAdjacentBlockIds);
1332
+ const boundaryAfter = boundaryBetweenBlocks(block, nextBlock, boundaryByAdjacentBlockIds);
1333
+ const boundaryElement = renderBoundaryAfterBlock({
1334
+ block,
1335
+ nextBlock,
1336
+ blockKey,
1337
+ boundaryByAdjacentBlockIds,
1338
+ wrapBoundary
1339
+ });
1340
+ const cleanKind = block.kind.replace(/^block\./, "");
1341
+ const managesOwnWrapper = entry.kind === "renderable" && entry.managesOwnWrapper;
1342
+ const renderableContent = entry.renderableContent;
1343
+ const variantKey = entry.kind === "renderable" ? entry.variantKey : null;
1344
+ const shouldUseWrapper = !managesOwnWrapper || Boolean(wrapBlock);
1345
+ const blockSectionProps = buildBlockSectionProps({
1346
+ props,
1347
+ themeResources,
1348
+ entry: input.entry,
1349
+ blockKey,
1350
+ imageResolveContext,
1351
+ registry: resolvedRegistry
1352
+ });
1353
+ if (!shouldUseWrapper) {
1354
+ const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
1355
+ return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
1356
+ }
1357
+ const wrapperClassName = [`block-${cleanKind}`, wrapBlock ? "group relative" : null].filter(Boolean).join(" ");
1358
+ const styleGroup = typeof renderableContent.styleGroup === "string" ? renderableContent.styleGroup : void 0;
1359
+ const blockLook = typeof renderableContent.blockLook === "string" ? renderableContent.blockLook : void 0;
1360
+ const blockComposition = readBlockComposition(renderableContent.blockComposition);
1361
+ const transitionStyle = transitionCssVarsStyle(renderableContent);
1362
+ const blockStyle = mergeStyleObjects(transitionStyle, boundaryReserveCssVarsStyle({
1363
+ before: boundaryBefore,
1364
+ after: boundaryAfter
1365
+ }));
1366
+ const blockElement = /* @__PURE__ */ jsx("div", {
1367
+ className: wrapperClassName,
1368
+ "data-block": cleanKind,
1369
+ "data-block-id": block.id ?? void 0,
1370
+ "data-block-kind": block.kind,
1371
+ "data-variant": variantKey ?? void 0,
1372
+ "data-block-variant": variantKey ?? void 0,
1373
+ "data-block-look": blockLook,
1374
+ "data-block-composition": blockComposition?.treatment,
1375
+ "data-block-composition-kind": blockComposition?.kind,
1376
+ "data-page-block-position": blockPosition,
1377
+ "data-site-style-boundary-before": boundaryBefore?.metrics.size,
1378
+ "data-site-style-boundary-after": boundaryAfter?.metrics.size,
1379
+ "data-style-group": styleGroup,
1380
+ style: blockStyle,
1381
+ children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
1382
+ }, blockKey);
1383
+ if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
1384
+ if (usesRuntimeBoundaries || !isSiteStyleTransitionStyleGroup(styleGroup)) return blockElement;
1385
+ return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, /* @__PURE__ */ jsx("div", {
1386
+ "aria-hidden": "true",
1387
+ "data-block-transition": "",
1388
+ "data-block-transition-for": block.id ?? blockKey,
1389
+ "data-style-group": styleGroup,
1390
+ style: transitionStyle
1391
+ })] }, blockKey);
686
1392
  }
687
1393
  function resolvePageRendererImageResolveContext(dataContext) {
688
1394
  const input = dataContext?.imageResolveContext;
@@ -693,34 +1399,20 @@ function resolvePageRendererImageResolveContext(dataContext) {
693
1399
  mediaAssets: input?.mediaAssets ?? dataContext?.mediaAssets
694
1400
  });
695
1401
  }
696
- const resolveBookingTimeZone = (dataContext) => dataContext?.bookingTimeZone;
697
1402
  function buildBlockSectionProps(input) {
698
1403
  return {
699
1404
  themeResources: input.themeResources,
700
- block: input.block,
1405
+ entry: input.entry,
1406
+ audience: input.props.audience,
701
1407
  dataContext: input.props.dataContext,
702
1408
  blockKey: input.blockKey,
703
1409
  registry: input.registry,
704
1410
  routeMap: input.props.routeMap,
705
1411
  wrapBlock: input.props.wrapBlock,
706
- blockOverrides: input.props.blockOverrides,
707
- sdkConfig: input.props.sdkConfig,
708
- customBlocks: input.props.customBlocks,
709
1412
  imageResolveContext: input.imageResolveContext,
710
1413
  previewAuthoring: input.props.previewAuthoring
711
1414
  };
712
1415
  }
713
- /**
714
- * Look up a block override component by block kind.
715
- * Supports both full ("block.hero") and short ("hero") keys.
716
- */
717
- function getBlockOverride(blockKind, overrides) {
718
- if (!overrides) return void 0;
719
- if (overrides[blockKind]) return overrides[blockKind];
720
- const shortKind = blockKind.replace(/^block\./, "");
721
- if (overrides[shortKind]) return overrides[shortKind];
722
- }
723
- const blockComponentCache = /* @__PURE__ */ new WeakMap();
724
1416
  const DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS = 25;
725
1417
  let cachedPerfSlowBlockRenderThresholdMs = null;
726
1418
  function getPerfSlowBlockRenderThresholdMs() {
@@ -730,12 +1422,53 @@ function getPerfSlowBlockRenderThresholdMs() {
730
1422
  cachedPerfSlowBlockRenderThresholdMs = Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_PERF_SLOW_BLOCK_RENDER_THRESHOLD_MS;
731
1423
  return cachedPerfSlowBlockRenderThresholdMs;
732
1424
  }
733
- function getCachedBlockComponent(manifest) {
734
- const cached = blockComponentCache.get(manifest);
735
- if (cached) return cached;
736
- const created = makeDefaultBlockComponent({ manifest });
737
- blockComponentCache.set(manifest, created);
738
- return created;
1425
+ /** Site, stage and transport identity every block view model is resolved against. */
1426
+ function blockRootRuntime(dataContext) {
1427
+ return {
1428
+ siteId: dataContext?.siteId ?? null,
1429
+ pageId: dataContext?.pageId ?? null,
1430
+ previewStage: dataContext?.previewStage ?? "published",
1431
+ apiBaseUrl: dataContext?.apiBaseUrl ?? null,
1432
+ portalToken: dataContext?.portalToken ?? null,
1433
+ bookingOfferingPresets: dataContext?.bookingOfferingPresets ?? [],
1434
+ eventRegistrationOverlayEnabled: dataContext?.eventRegistrationOverlayEnabled ?? false
1435
+ };
1436
+ }
1437
+ /**
1438
+ * Route and identifier maps for CTA link resolution at render time. Omitted
1439
+ * rather than nulled when absent, because a binding checks for the key.
1440
+ */
1441
+ function blockRootLookups(dataContext, routes) {
1442
+ return {
1443
+ ...routes ? { routes } : {},
1444
+ ...dataContext?.pagesByIdentifier ? { pagesByIdentifier: dataContext.pagesByIdentifier } : {},
1445
+ ...dataContext?.entriesByIdentifier ? { entriesByIdentifier: dataContext.entriesByIdentifier } : {}
1446
+ };
1447
+ }
1448
+ /**
1449
+ * The internal-block path: everything a system block component needs and an
1450
+ * override deliberately does not receive.
1451
+ */
1452
+ function renderSystemBlockElement(input) {
1453
+ const { prepared, block, dataContext } = input;
1454
+ const BlockComponent = prepared.component;
1455
+ if (!BlockComponent) return null;
1456
+ const rootContext = { $root: {
1457
+ ...blockRootRuntime(dataContext),
1458
+ ...blockRootLookups(dataContext, prepared.routes),
1459
+ ...blockSubjectProps(dataContext)
1460
+ } };
1461
+ return /* @__PURE__ */ jsx(BlockComponent, {
1462
+ ...prepared.baseProps,
1463
+ registry: input.registry,
1464
+ pathBase: typeof block.id === "string" && block.id.length > 0 ? `blocks.${block.id}.` : void 0,
1465
+ blockBindings: block.bindings,
1466
+ editableRouteMetadataFieldIds: dataContext?.editableRouteMetadataFieldIds ?? void 0,
1467
+ viewModelOverrides: rootContext,
1468
+ fragmentRegistry: getFragmentRegistry(),
1469
+ imageResolveContext: input.imageResolveContext,
1470
+ previewAuthoring: input.previewAuthoring
1471
+ });
739
1472
  }
740
1473
  /**
741
1474
  * Memoized block section component.
@@ -744,7 +1477,10 @@ function getCachedBlockComponent(manifest) {
744
1477
  * referential equality of all props that affect rendering. Standard React.memo
745
1478
  * wouldn't catch all the render triggers from the editor store.
746
1479
  */
747
- const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, block, dataContext, registry, routeMap, wrapBlock, blockOverrides, sdkConfig, customBlocks, imageResolveContext, previewAuthoring }) {
1480
+ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, entry: preparedEntry, audience, dataContext, registry, wrapBlock, imageResolveContext, previewAuthoring }) {
1481
+ const entry = preparedEntry.entry;
1482
+ const prepared = preparedEntry.prepared;
1483
+ const block = entry.block;
748
1484
  const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
749
1485
  const fallbackImageResolveContext = getCurrentResolveImageUrlContext();
750
1486
  const resolvedImageResolveContext = imageResolveContext ?? fallbackImageResolveContext;
@@ -759,210 +1495,75 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
759
1495
  durationMs,
760
1496
  outcome: meta?.outcome ?? "ok",
761
1497
  override: meta?.override ?? false,
762
- hasResolvedData: meta?.hasResolvedData ?? false
763
- });
764
- } catch {}
765
- return node;
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
- const OverrideComponent = getBlockOverride(block.kind, blockOverrides);
781
- requireBlockOverride(themeResources, OverrideComponent, block.kind);
782
- let definition = getBlockDefinition(block.kind);
783
- if (!definition && block.kind.startsWith("custom.")) definition = createCustomBlockRegistry({
784
- sdkConfig,
785
- customBlocks: (customBlocks ?? []).map((manifest) => ({
786
- manifest,
787
- source: { kind: "managed-database" }
788
- }))
789
- }).findManifest(block.kind)?.descriptor.definition;
790
- if (!definition) {
791
- if (OverrideComponent) {
792
- const rendered = /* @__PURE__ */ jsx(OverrideComponent, {
793
- content: getRenderableContent(block, dataContext?.previewStage),
794
- ...overrideThemeProps(themeResources),
795
- 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
- });
811
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
812
- outcome: "overrideWithoutDefinition",
813
- override: true,
814
- hasResolvedData: false
815
- });
816
- }
817
- if (block.kind.startsWith("custom.") && shouldDebugCustomBlocks()) try {
818
- console.warn("[blocks:PageRenderer] custom block definition missing", {
819
- blockId: block.id ?? null,
820
- blockKind: block.kind,
821
- hasOverride: Boolean(OverrideComponent),
822
- sdkCustomBlocksCount: sdkConfig?.customBlocks?.length ?? 0,
823
- dbCustomBlocksCount: customBlocks?.length ?? 0
824
- });
825
- } 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 }), {
828
- outcome: "missingDefinition",
829
- override: false
830
- });
831
- }
832
- const manifestHasLayout = Boolean(definition.manifest.layout) || definition.manifest.variants && Object.keys(definition.manifest.variants).length > 0;
833
- if (!OverrideComponent && !manifestHasLayout) {
834
- if (block.kind.startsWith("custom.") && shouldDebugCustomBlocks()) try {
835
- console.warn("[blocks:PageRenderer] custom block has no layout/variants and no override", {
836
- blockId: block.id ?? null,
837
- blockKind: block.kind,
838
- hasOverride: false,
839
- manifestKeys: Object.keys(definition.manifest ?? {}).sort()
1498
+ hasResolvedData: meta?.hasResolvedData ?? false
840
1499
  });
841
1500
  } 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 }), {
844
- outcome: "missingLayout",
845
- override: false
846
- });
1501
+ return node;
847
1502
  }
848
- const content = getRenderableContent(block, dataContext?.previewStage);
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;
853
- else {
854
- const rendered = fallback(`Unable to render block kind "${block.kind}".`);
855
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
856
- outcome: "invalidPlaceholder",
857
- override: false
858
- });
859
- }
1503
+ function wrapped(node) {
1504
+ return wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, node) }) : /* @__PURE__ */ jsx(Fragment$1, { children: node });
860
1505
  }
861
- try {
862
- const routes = routeMap ?? dataContext?.routes;
863
- const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : data;
864
- const resolved = resolveBlockData(block.id, definition.dataLoaders, dataContext, routes);
865
- const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
866
- const baseProps = {
867
- content: hydratedContent,
868
- ...overrideThemeProps(themeResources),
869
- data: resolved,
870
- siteId: dataContext?.siteId,
871
- apiBaseUrl: dataContext?.apiBaseUrl,
872
- portalToken: dataContext?.portalToken ?? null,
873
- previewToken: dataContext?.previewToken ?? null,
874
- stage: dataContext?.previewStage,
875
- occurrenceContext: dataContext?.occurrenceContext ?? null,
876
- entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
877
- contentEntry: dataContext?.contentEntry ?? null,
878
- pageSurface: dataContext?.pageSurface ?? null,
879
- subject: dataContext?.subject ?? null,
880
- supabaseUrl: dataContext?.supabaseUrl,
881
- imageResolveContext: resolvedImageResolveContext,
882
- blockId: block.id ?? null,
883
- blockKind: block.kind
884
- };
885
- baseProps.bookingTimeZone = resolveBookingTimeZone(dataContext);
886
- let rendered;
887
- if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...baseProps });
888
- else {
889
- requireThemeResources(themeResources, block.kind);
890
- const BlockComponent = getCachedBlockComponent(definition.manifest);
891
- const pathBase = typeof block.id === "string" && block.id.length > 0 ? `blocks.${block.id}.` : void 0;
892
- const rootContext = { $root: {
893
- siteId: dataContext?.siteId ?? null,
894
- pageId: dataContext?.pageId ?? null,
895
- previewStage: dataContext?.previewStage ?? "published",
896
- apiBaseUrl: dataContext?.apiBaseUrl ?? null,
897
- portalToken: dataContext?.portalToken ?? null,
898
- bookingOfferingPresets: dataContext?.bookingOfferingPresets ?? [],
899
- eventRegistrationOverlayEnabled: dataContext?.eventRegistrationOverlayEnabled ?? false,
900
- ...routes ? { routes } : {},
901
- ...dataContext?.pagesByIdentifier ? { pagesByIdentifier: dataContext.pagesByIdentifier } : {},
902
- ...dataContext?.entriesByIdentifier ? { entriesByIdentifier: dataContext.entriesByIdentifier } : {},
903
- occurrenceContext: dataContext?.occurrenceContext ?? null,
904
- entrySubrouteContext: dataContext?.entrySubrouteContext ?? null,
905
- contentEntry: dataContext?.contentEntry ?? null,
906
- pageSurface: dataContext?.pageSurface ?? null,
907
- subject: dataContext?.subject ?? null
908
- } };
909
- const blockBindings = block.bindings;
910
- const fragmentRegistry = getFragmentRegistry();
911
- rendered = /* @__PURE__ */ jsx(BlockComponent, {
912
- ...baseProps,
913
- registry,
914
- pathBase,
915
- blockBindings,
916
- editableRouteMetadataFieldIds: dataContext?.editableRouteMetadataFieldIds ?? void 0,
917
- viewModelOverrides: rootContext,
918
- fragmentRegistry,
919
- imageResolveContext: resolvedImageResolveContext,
920
- previewAuthoring
921
- });
922
- }
923
- if (wrapBlock && block.id) return finish(/* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }), {
924
- override: Boolean(OverrideComponent),
925
- hasResolvedData
1506
+ if (entry.kind === "diagnostic" && entry.reason.kind === "invalid-admission") return finish(presentNotRenderableBlock(entry.reason, audience), {
1507
+ outcome: "invalidContent",
1508
+ override: false
1509
+ });
1510
+ const OverrideComponent = entry.kind === "diagnostic" ? void 0 : entry.override;
1511
+ if (entry.kind === "diagnostic") {
1512
+ debugCustomBlockDiagnostic(entry.reason, block, entry.debug);
1513
+ return finish(presentNotRenderableBlock(entry.reason, audience), {
1514
+ outcome: entry.reason.kind === "missing-definition" ? "missingDefinition" : "missingLayout",
1515
+ override: false
926
1516
  });
927
- return finish(/* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
928
- override: Boolean(OverrideComponent),
929
- hasResolvedData
1517
+ }
1518
+ if (entry.kind === "override-only") {
1519
+ const OverrideOnlyComponent = entry.override;
1520
+ return finish(wrapped(/* @__PURE__ */ jsx(OverrideOnlyComponent, { ...buildBlockOverrideProps({
1521
+ content: entry.renderableContent,
1522
+ data: void 0,
1523
+ block,
1524
+ themeResources,
1525
+ dataContext,
1526
+ imageResolveContext: resolvedImageResolveContext
1527
+ }) })), {
1528
+ outcome: "overrideWithoutDefinition",
1529
+ override: true,
1530
+ hasResolvedData: false
930
1531
  });
931
- } catch {
932
- const rendered = block.presentationAdmission.kind === "editor" ? fallback(`Unable to render block kind "${block.kind}".`) : fallback(`Invalid content for block kind "${block.kind}".`);
933
- return finish(wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment$1, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ jsx(Fragment$1, { children: rendered }), {
934
- outcome: "exception",
935
- override: false
1532
+ }
1533
+ if (prepared.kind === "editor-unpreviewable") return finish(wrapped(presentNotRenderableBlock({
1534
+ kind: "editor-unpreviewable",
1535
+ blockKind: block.kind
1536
+ }, audience)), {
1537
+ outcome: "invalidPlaceholder",
1538
+ override: false
1539
+ });
1540
+ if (prepared.kind !== "content") return finish(wrapped(presentNotRenderableBlock({
1541
+ kind: "render-threw",
1542
+ blockKind: block.kind
1543
+ }, audience)), {
1544
+ outcome: "exception",
1545
+ override: false
1546
+ });
1547
+ let rendered;
1548
+ if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...prepared.baseProps });
1549
+ else {
1550
+ requireThemeResources(themeResources, block.kind);
1551
+ rendered = renderSystemBlockElement({
1552
+ prepared,
1553
+ block,
1554
+ dataContext,
1555
+ registry,
1556
+ previewAuthoring,
1557
+ imageResolveContext: resolvedImageResolveContext
936
1558
  });
937
1559
  }
1560
+ return finish(wrapped(rendered), {
1561
+ override: Boolean(OverrideComponent),
1562
+ hasResolvedData: prepared.hasResolvedData
1563
+ });
938
1564
  }, (prev, next) => {
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;
1565
+ return prev.entry === next.entry && prev.audience === next.audience && prev.registry === next.registry && prev.dataContext === next.dataContext && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.wrapBlock === next.wrapBlock && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
940
1566
  });
941
- function fallback(message) {
942
- return /* @__PURE__ */ jsx("div", {
943
- className: "rb-p-6 rb-caption",
944
- style: textColorStyle("mutedText"),
945
- children: message
946
- });
947
- }
948
- function shouldDebugCustomBlocks() {
949
- try {
950
- return globalThis.process?.env?.DEBUG_CUSTOM_BLOCKS === "1";
951
- } catch {
952
- return false;
953
- }
954
- }
955
- /**
956
- * Resolves block content based on stage priority.
957
- * For draft/preview: draftContent takes priority over content.
958
- * For published: content is the source of truth.
959
- * Returns empty object if no content exists (validator will handle placeholders if needed).
960
- */
961
- function getRenderableContent(block, previewStage = "published") {
962
- const source = previewStage === "preview" && block.draftContent ? block.draftContent : block.content ?? {};
963
- if (!isObjectRecord(source)) return {};
964
- return source;
965
- }
966
1567
  //#endregion
967
1568
  //#region ../theme-core/src/fonts/types.ts
968
1569
  /**
@@ -1710,7 +2311,7 @@ function normalizeLoaderParams(endpoint, params, context) {
1710
2311
  ensureSiteId(out, context);
1711
2312
  return out;
1712
2313
  }
1713
- if (endpoint === "listPublicEvents" || endpoint === "listPublicRecurringSchedule") {
2314
+ if (endpoint === "listPublicEvents" || endpoint === "listPublicRecurringSchedule" || endpoint === "listPublicEventCalendarWindow") {
1714
2315
  ensureSiteId(out, context);
1715
2316
  return out;
1716
2317
  }
@@ -1756,6 +2357,297 @@ function normalizePublicApiLoaderParams(endpoint, params, context) {
1756
2357
  const Text = Text$1;
1757
2358
  const RichText = RichText$1;
1758
2359
  //#endregion
2360
+ //#region ../db/src/schemas/forms.ts
2361
+ /**
2362
+ * Form Settings Schemas
2363
+ *
2364
+ * Zod schemas for validating form settings JSON stored in the database.
2365
+ * These schemas are the single source of truth for form settings validation
2366
+ * across API routes, type guards, and client-side form submission.
2367
+ */
2368
+ const sensitiveCollectionModeSchema = z.enum(["standard", "sensitive"]).default("standard");
2369
+ const sensitiveCollectionConfirmationVersionSchema = z.union([z.literal(1), z.null()]);
2370
+ const formPresentationSettingsShape = {
2371
+ submitLabel: z.string().min(1).max(40).nullable().optional(),
2372
+ templateKey: z.string().min(1).nullable().optional()
2373
+ };
2374
+ const formPresentationSettingsSchema = z.object(formPresentationSettingsShape).strict();
2375
+ const sensitiveCollectionConfigSchema = z.object({
2376
+ enabledAt: z.string().datetime().nullable(),
2377
+ enabledByUserId: z.string().uuid().nullable(),
2378
+ confirmationVersion: sensitiveCollectionConfirmationVersionSchema
2379
+ }).strict();
2380
+ /**
2381
+ * Email notification settings for contact forms
2382
+ */
2383
+ const emailNotificationSchema = z.object({
2384
+ enabled: z.boolean(),
2385
+ recipients: z.array(z.string().email()).optional()
2386
+ }).strict();
2387
+ /**
2388
+ * Submitter auto-reply settings for contact forms.
2389
+ *
2390
+ * Intentionally does not include form field values; overrides are purely template strings.
2391
+ */
2392
+ const submitterAutoReplySchema = z.object({
2393
+ enabled: z.boolean(),
2394
+ override: z.object({
2395
+ subjectTemplate: z.string().max(200),
2396
+ bodyTemplate: z.string().max(1e4)
2397
+ }).strict().optional()
2398
+ }).strict();
2399
+ /**
2400
+ * Webhook notification settings for forms
2401
+ */
2402
+ const webhookNotificationSchema = z.object({
2403
+ enabled: z.boolean(),
2404
+ url: z.string().url().optional(),
2405
+ headers: z.record(z.string(), z.string()).optional()
2406
+ }).strict();
2407
+ /**
2408
+ * Notification settings structure
2409
+ */
2410
+ const notificationSettingsSchema = z.object({
2411
+ email: emailNotificationSchema.optional(),
2412
+ autoReply: submitterAutoReplySchema.optional(),
2413
+ webhook: webhookNotificationSchema.optional(),
2414
+ emails: z.array(z.string().email()).optional()
2415
+ }).strict().optional();
2416
+ const standardContactOptionalFieldSettingsSchema = z.object({ visible: z.boolean() }).strict();
2417
+ const contactFormDefinitionSettingsSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("custom-contact") }).strict(), z.object({
2418
+ kind: z.literal("standard-contact"),
2419
+ optionalFields: z.object({
2420
+ name: standardContactOptionalFieldSettingsSchema,
2421
+ phone: standardContactOptionalFieldSettingsSchema
2422
+ }).strict()
2423
+ }).strict()]);
2424
+ /**
2425
+ * Contact form settings
2426
+ * Used for general inquiry forms that send notifications to site owners
2427
+ */
2428
+ const contactFormSettingsSchema = z.object({
2429
+ type: z.literal("contact"),
2430
+ successMessage: z.string().optional(),
2431
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
2432
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional(),
2433
+ notifications: notificationSettingsSchema,
2434
+ definition: contactFormDefinitionSettingsSchema.default({ kind: "custom-contact" })
2435
+ }).strict();
2436
+ /**
2437
+ * Booking form settings
2438
+ * Used for appointment booking forms that create appointments in the system
2439
+ *
2440
+ * Service configuration:
2441
+ * - serviceId: Single service (backward compatible)
2442
+ * - serviceIds: Multiple services (user selects at booking time)
2443
+ * - If neither provided: Shows all available services for the site
2444
+ *
2445
+ * Note: Form can have either serviceId OR serviceIds, not both.
2446
+ * XOR validation enforces this constraint.
2447
+ */
2448
+ const bookingFormSettingsSchema = z.object({
2449
+ type: z.literal("booking"),
2450
+ serviceId: z.string().optional(),
2451
+ serviceIds: z.array(z.string()).optional(),
2452
+ resourceId: z.string().nullable().optional(),
2453
+ requiresApproval: z.boolean().default(false),
2454
+ successMessage: z.string().optional(),
2455
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
2456
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional()
2457
+ }).strict().refine((data) => {
2458
+ const hasSingle = data.serviceId !== void 0 && data.serviceId.length > 0;
2459
+ const hasMultiple = data.serviceIds !== void 0 && data.serviceIds.length > 0;
2460
+ return !(hasSingle && hasMultiple);
2461
+ }, { message: "Form cannot have both serviceId and serviceIds. Use one or the other." });
2462
+ /**
2463
+ * Event registration form settings
2464
+ * Used for event registration forms that create event attendees
2465
+ *
2466
+ * Series configuration:
2467
+ * - seriesId: Single event series (form is for specific event)
2468
+ * - If not provided: Block must specify series or get from context
2469
+ */
2470
+ const eventRegistrationFormSettingsSchema = z.object({
2471
+ type: z.literal("event-registration"),
2472
+ seriesId: z.string().uuid().optional(),
2473
+ maxTickets: z.number().int().positive().max(10).default(10),
2474
+ requiresApproval: z.boolean().default(false),
2475
+ successMessage: z.string().optional(),
2476
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
2477
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional()
2478
+ }).strict();
2479
+ /**
2480
+ * Booking Questions form settings
2481
+ * Used for reusable short forms / detailed questionnaires attached through booking requirements.
2482
+ */
2483
+ const bookingQuestionsFormSettingsSchema = z.object({
2484
+ type: z.literal("booking-questions"),
2485
+ schemaVersion: z.literal(2).default(2),
2486
+ shape: z.enum(["short-form", "detailed-questionnaire"]).default("short-form"),
2487
+ sensitiveCollectionMode: sensitiveCollectionModeSchema.optional(),
2488
+ sensitiveCollection: sensitiveCollectionConfigSchema.optional(),
2489
+ audienceHint: z.enum([
2490
+ "appointments",
2491
+ "events",
2492
+ "courses",
2493
+ "mixed"
2494
+ ]).optional(),
2495
+ customerTitle: z.string().min(1).max(120).optional(),
2496
+ introTitle: z.string().min(1).max(120).nullable().optional(),
2497
+ introBody: z.string().min(1).max(4e3).nullable().optional(),
2498
+ reviewLayout: z.enum(["flat", "sectioned"]).default("flat")
2499
+ }).strict();
2500
+ z.discriminatedUnion("type", [
2501
+ contactFormSettingsSchema,
2502
+ bookingFormSettingsSchema,
2503
+ eventRegistrationFormSettingsSchema,
2504
+ bookingQuestionsFormSettingsSchema
2505
+ ]);
2506
+ const contactFormSettingsInputSchema = contactFormSettingsSchema.extend(formPresentationSettingsShape).strict();
2507
+ const bookingFormSettingsInputSchema = bookingFormSettingsSchema.safeExtend(formPresentationSettingsShape).strict();
2508
+ const eventRegistrationFormSettingsInputSchema = eventRegistrationFormSettingsSchema.extend(formPresentationSettingsShape).strict();
2509
+ const bookingQuestionsFormSettingsInputSchema = bookingQuestionsFormSettingsSchema.extend(formPresentationSettingsShape).strict();
2510
+ /**
2511
+ * Transitional input schema for API/SDK callers that may still send form-level
2512
+ * presentation metadata inside settings. Storage code must split these keys out
2513
+ * before persisting canonical behavior settings.
2514
+ */
2515
+ const formSettingsInputSchema = z.discriminatedUnion("type", [
2516
+ contactFormSettingsInputSchema,
2517
+ bookingFormSettingsInputSchema,
2518
+ eventRegistrationFormSettingsInputSchema,
2519
+ bookingQuestionsFormSettingsInputSchema
2520
+ ]);
2521
+ /**
2522
+ * Form field option schema
2523
+ */
2524
+ const formFieldOptionSchema = z.object({
2525
+ value: z.string().min(1),
2526
+ label: z.string()
2527
+ }).strict();
2528
+ /**
2529
+ * Form field layout schema
2530
+ * Controls presentation on the public site renderer (e.g. 2-column rows).
2531
+ */
2532
+ const formFieldLayoutSchema = z.object({ width: z.enum(["full", "half"]).default("full") }).strict();
2533
+ const formFieldSchema = z.object({
2534
+ id: z.string().min(1, "Field ID is required"),
2535
+ label: z.string().min(1, "Field label is required"),
2536
+ type: z.enum([
2537
+ "text",
2538
+ "email",
2539
+ "textarea",
2540
+ "select",
2541
+ "radio",
2542
+ "checkbox",
2543
+ "consent",
2544
+ "tel",
2545
+ "url",
2546
+ "number",
2547
+ "date",
2548
+ "time"
2549
+ ]),
2550
+ required: z.boolean().default(false),
2551
+ placeholder: z.string().optional(),
2552
+ helpText: z.string().optional(),
2553
+ options: z.array(formFieldOptionSchema).optional(),
2554
+ multiple: z.boolean().optional(),
2555
+ minLength: z.number().int().positive().optional(),
2556
+ maxLength: z.number().int().positive().optional(),
2557
+ pattern: z.string().optional(),
2558
+ min: z.number().optional(),
2559
+ max: z.number().optional(),
2560
+ layout: formFieldLayoutSchema.optional()
2561
+ }).strict();
2562
+ const bookingQuestionFieldTypeSchema = z.enum([
2563
+ "text",
2564
+ "email",
2565
+ "textarea",
2566
+ "select",
2567
+ "radio",
2568
+ "checkbox",
2569
+ "tel",
2570
+ "url",
2571
+ "number",
2572
+ "date",
2573
+ "time"
2574
+ ]);
2575
+ const bookingQuestionDocumentFileTypeSchema = z.enum([
2576
+ "pdf",
2577
+ "image",
2578
+ "docx"
2579
+ ]);
2580
+ const bookingQuestionScalarFieldSchema = formFieldSchema.extend({ type: bookingQuestionFieldTypeSchema }).strict();
2581
+ const bookingQuestionDocumentUploadFieldSchema = z.object({
2582
+ id: z.string().min(1, "Field ID is required"),
2583
+ label: z.string().min(1, "Field label is required"),
2584
+ type: z.literal("document_upload"),
2585
+ required: z.boolean().default(false),
2586
+ placeholder: z.string().optional(),
2587
+ helpText: z.string().optional(),
2588
+ layout: formFieldLayoutSchema.optional(),
2589
+ allowedFileTypes: z.array(bookingQuestionDocumentFileTypeSchema).min(1, "Choose at least one allowed file type").default([
2590
+ "pdf",
2591
+ "image",
2592
+ "docx"
2593
+ ]),
2594
+ maxBytes: z.number().int().positive().max(25 * 1024 * 1024).default(25 * 1024 * 1024)
2595
+ }).strict();
2596
+ const bookingQuestionFieldSchema = z.discriminatedUnion("type", [bookingQuestionScalarFieldSchema, bookingQuestionDocumentUploadFieldSchema]);
2597
+ const bookingQuestionsSectionSchema = z.object({
2598
+ id: z.string().min(1, "Section ID is required"),
2599
+ title: z.string().min(1, "Section title is required"),
2600
+ description: z.string().optional(),
2601
+ items: z.array(bookingQuestionFieldSchema).min(1, "Section must contain at least one question")
2602
+ }).strict();
2603
+ const bookingQuestionsDetailedSchemaSchema = z.object({
2604
+ schemaVersion: z.literal(2),
2605
+ sections: z.array(bookingQuestionsSectionSchema).min(1, "Questionnaire must have at least one section")
2606
+ }).strict();
2607
+ /**
2608
+ * Form schema structure
2609
+ * Validates the complete form schema stored in schema_json column
2610
+ */
2611
+ const formSchemaSchema = z.object({
2612
+ version: z.string().default("1.0"),
2613
+ fields: z.array(formFieldSchema).min(1, "Form must have at least one field")
2614
+ }).strict();
2615
+ const bookingQuestionsFlatSchemaSchema = z.object({
2616
+ version: z.string().default("1.0"),
2617
+ fields: z.array(bookingQuestionFieldSchema).min(1, "Form must have at least one question")
2618
+ }).strict();
2619
+ z.union([bookingQuestionsFlatSchemaSchema, bookingQuestionsDetailedSchemaSchema]);
2620
+ 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);
2621
+ z.object({
2622
+ name: z.string().min(1, "Form name is required"),
2623
+ slug: formSlugSchema,
2624
+ schema: formSchemaSchema,
2625
+ settings: formSettingsInputSchema.optional(),
2626
+ presentation: formPresentationSettingsSchema.optional()
2627
+ }).strict();
2628
+ //#endregion
2629
+ //#region ../db/src/schemas/standard-contact.ts
2630
+ const standardContactLabelSchema = z.string().trim().min(1).max(80);
2631
+ const standardContactPlaceholderSchema = z.string().trim().max(160).optional();
2632
+ function standardContactFieldSchema(id, type, required) {
2633
+ return z.object({
2634
+ id: z.literal(id),
2635
+ label: standardContactLabelSchema,
2636
+ type: z.literal(type),
2637
+ required: z.literal(required),
2638
+ placeholder: standardContactPlaceholderSchema
2639
+ }).strict();
2640
+ }
2641
+ z.object({
2642
+ version: z.literal("1.0"),
2643
+ fields: z.tuple([
2644
+ standardContactFieldSchema("name", "text", false),
2645
+ standardContactFieldSchema("email", "email", true),
2646
+ standardContactFieldSchema("phone", "tel", false),
2647
+ standardContactFieldSchema("message", "textarea", true)
2648
+ ])
2649
+ }).strict();
2650
+ //#endregion
1759
2651
  //#region ../media-storage-supabase/dist/index.mjs
1760
2652
  function ok(value) {
1761
2653
  return {
@@ -2527,15 +3419,17 @@ const createApiMediaRepo = ({ client }) => ({
2527
3419
  }, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.update));
2528
3420
  },
2529
3421
  async deleteAsset(assetId, options) {
2530
- try {
2531
- await client({
2532
- endpoint: "mediaDelete",
2533
- params: { assetId },
2534
- body: { deleteObject: options?.deleteObject }
2535
- });
2536
- } catch (error) {
2537
- throw toMediaStorageError(error, DEFAULT_MESSAGES.delete);
2538
- }
3422
+ const response = await callClient(client, {
3423
+ endpoint: "mediaDelete",
3424
+ params: { assetId },
3425
+ body: { deleteObject: options?.deleteObject }
3426
+ }, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.delete));
3427
+ if (response.kind === "deleted") return response;
3428
+ const orphanWarning = response.warnings.find((warning) => warning.kind === "ORPHAN_CLEANUP_FAILED");
3429
+ return orphanWarning === void 0 ? { kind: "deleted" } : {
3430
+ kind: "deleted_with_orphan_warning",
3431
+ warning: orphanWarning
3432
+ };
2539
3433
  },
2540
3434
  generateStoragePath
2541
3435
  });
@@ -2626,8 +3520,9 @@ function createCachedMediaRepo(baseRepo, options) {
2626
3520
  return result;
2627
3521
  },
2628
3522
  async deleteAsset(assetId, options) {
2629
- await baseRepo.deleteAsset(assetId, options);
3523
+ const outcome = await baseRepo.deleteAsset(assetId, options);
2630
3524
  invalidateCache();
3525
+ return outcome;
2631
3526
  },
2632
3527
  generateStoragePath: baseRepo.generateStoragePath
2633
3528
  };
@@ -8302,10 +9197,10 @@ function resolveShellThemeRoles(props) {
8302
9197
  }
8303
9198
  const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
8304
9199
  const PreviewEditorSidebar = React.lazy(async () => {
8305
- return { default: (await import("./PreviewEditorSidebar-BU5ZlhQR.mjs")).PreviewEditorSidebar };
9200
+ return { default: (await import("./PreviewEditorSidebar-BVPur_CU.mjs")).PreviewEditorSidebar };
8306
9201
  });
8307
9202
  const PreviewEditorUI = React.lazy(async () => {
8308
- return { default: (await import("./PreviewEditorUI-9XkHL-bC.mjs")).PreviewEditorUI };
9203
+ return { default: (await import("./PreviewEditorUI-DLhWX8oh.mjs")).PreviewEditorUI };
8309
9204
  });
8310
9205
  const previewPaneContainmentStyle = {
8311
9206
  contain: "layout paint",
@@ -8321,6 +9216,7 @@ function renderShellProviders(input) {
8321
9216
  siteId: props.siteId,
8322
9217
  apiClient: input.apiClient,
8323
9218
  theme: themeRoles.persistenceTheme,
9219
+ headerPreferences: props.themeSelectionHeaderPreferences ?? null,
8324
9220
  themeId: props.themeId ?? null,
8325
9221
  selectionId: props.themeSelectionId ?? null,
8326
9222
  selectionVersion: props.themeSelectionVersion ?? null,
@@ -8636,6 +9532,7 @@ function resolveShellLayoutProps(input) {
8636
9532
  themeSelectionUpdatedAt: props.themeSelectionUpdatedAt ?? null,
8637
9533
  themeSelectionButtonStyleSelection: props.themeSelectionButtonStyleSelection ?? null,
8638
9534
  themeSelectionButtonStyleRepairs: props.themeSelectionButtonStyleRepairs ?? [],
9535
+ themeSelectionHeaderPreferences: props.themeSelectionHeaderPreferences ?? null,
8639
9536
  themeSelectionHeaderSelection: props.themeSelectionHeaderSelection ?? null,
8640
9537
  themeSelectionFooterLookId: props.themeSelectionFooterLookId ?? null,
8641
9538
  themeSelectionHeaderLogo: props.themeSelectionHeaderLogo,
@@ -9584,10 +10481,14 @@ function BlockToolbar({ blockId, blockKind, content, bookingOfferingPresets, the
9584
10481
  const state = uiStore.getState();
9585
10482
  state.setPreviewSidebarTab("editor");
9586
10483
  state.setDrawerOpen(true);
9587
- state.requestFocus({
10484
+ const path = typeof focusTarget.itemIndex === "number" && focusTarget.fieldPath ? `${focusTarget.fieldPath}.${focusTarget.itemIndex}` : focusTarget.fieldPath;
10485
+ state.requestFocus(path ? {
10486
+ kind: "main-field",
9588
10487
  blockId: editorBlockId,
9589
- fieldPath: focusTarget.fieldPath,
9590
- itemIndex: focusTarget.itemIndex
10488
+ fieldPath: path
10489
+ } : {
10490
+ kind: "block",
10491
+ blockId: editorBlockId
9591
10492
  });
9592
10493
  };
9593
10494
  const inspectBlock = useCallback(() => {
@@ -10515,6 +11416,80 @@ function resolveRuntimePreviewSource(input) {
10515
11416
  }
10516
11417
  //#endregion
10517
11418
  //#region ../preview-next/src/client/blocks/previewBatchLoaderParams.ts
11419
+ function isBatchableEndpoint(endpoint) {
11420
+ return endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow" || endpoint === "getPublicEventDetails" || endpoint === "listPublicRouteCandidates" || endpoint === "listPublicTeamMembers" || endpoint === "listPublicProducts" || endpoint === "getPublicBookingServices" || endpoint === "getPublicWeeklySlotAvailability" || endpoint === "getPublicFormById";
11421
+ }
11422
+ function buildBatchLoaderRequest(id, endpoint, params) {
11423
+ switch (endpoint) {
11424
+ case "listPublicEventCalendarWindow": return {
11425
+ id,
11426
+ endpoint,
11427
+ params: calendarWindowQuerySchema.parse(params ?? {})
11428
+ };
11429
+ case "listPublicEvents": {
11430
+ const typedParams = params;
11431
+ return typedParams ? {
11432
+ id,
11433
+ endpoint,
11434
+ params: typedParams
11435
+ } : {
11436
+ id,
11437
+ endpoint
11438
+ };
11439
+ }
11440
+ case "getPublicEventDetails": {
11441
+ const typedParams = params;
11442
+ return typedParams ? {
11443
+ id,
11444
+ endpoint,
11445
+ params: typedParams
11446
+ } : {
11447
+ id,
11448
+ endpoint
11449
+ };
11450
+ }
11451
+ case "listPublicRouteCandidates": return {
11452
+ id,
11453
+ endpoint
11454
+ };
11455
+ case "listPublicProducts": {
11456
+ const typedParams = params;
11457
+ return typedParams ? {
11458
+ id,
11459
+ endpoint,
11460
+ params: typedParams
11461
+ } : {
11462
+ id,
11463
+ endpoint
11464
+ };
11465
+ }
11466
+ case "listPublicTeamMembers": return {
11467
+ id,
11468
+ endpoint
11469
+ };
11470
+ case "getPublicBookingServices": {
11471
+ const typedParams = params;
11472
+ return typedParams ? {
11473
+ id,
11474
+ endpoint,
11475
+ params: typedParams
11476
+ } : {
11477
+ id,
11478
+ endpoint
11479
+ };
11480
+ }
11481
+ case "getPublicWeeklySlotAvailability": return {
11482
+ id,
11483
+ endpoint,
11484
+ params: params ?? { serviceId: "" }
11485
+ };
11486
+ case "getPublicFormById": return {
11487
+ id,
11488
+ endpoint,
11489
+ params: params ?? { formId: "" }
11490
+ };
11491
+ }
11492
+ }
10518
11493
  function stripUndefined(obj) {
10519
11494
  const out = {};
10520
11495
  for (const [key, value] of Object.entries(obj)) if (value !== void 0) out[key] = value;
@@ -10552,17 +11527,13 @@ function nonEmpty(params) {
10552
11527
  }
10553
11528
  function toPreviewBatchParams(endpoint, params) {
10554
11529
  switch (endpoint) {
11530
+ case "listPublicEventCalendarWindow": return calendarWindowQuerySchema.parse(params);
10555
11531
  case "listPublicEvents": return nonEmpty({
10556
11532
  ...eventLoaderParams(params),
10557
11533
  detailLevel: params.detailLevel || void 0,
10558
11534
  readProfile: params.readProfile || void 0
10559
11535
  });
10560
11536
  case "getPublicEventDetails": return nonEmpty(eventLoaderParams(params));
10561
- case "listPublicWholeSeriesOfferings": return nonEmpty(stripUndefined({ limit: params.limit || void 0 }));
10562
- case "getPublicWholeSeriesOffering": return nonEmpty(stripUndefined({
10563
- eventSeriesId: params.eventSeriesId || void 0,
10564
- stage: params.stage || void 0
10565
- }));
10566
11537
  case "listPublicProducts": return nonEmpty(stripUndefined({ categorySelector: decodePublicProductCategorySelectorQuery(params) ?? void 0 }));
10567
11538
  case "getPublicBookingServices": return nonEmpty(stripUndefined({ ids: normalizeIdsParam(params.ids || void 0) }));
10568
11539
  case "getPublicFormById": return { formId: params.formId ?? "" };
@@ -10924,97 +11895,6 @@ async function callDirectLoaderApiEndpoint(dashboardApiClient, endpoint, params)
10924
11895
  })));
10925
11896
  }
10926
11897
  }
10927
- function isBatchableEndpoint(endpoint) {
10928
- return endpoint === "listPublicEvents" || endpoint === "getPublicEventDetails" || endpoint === "listPublicWholeSeriesOfferings" || endpoint === "getPublicWholeSeriesOffering" || endpoint === "listPublicRouteCandidates" || endpoint === "listPublicTeamMembers" || endpoint === "listPublicProducts" || endpoint === "getPublicBookingServices" || endpoint === "getPublicWeeklySlotAvailability" || endpoint === "getPublicFormById";
10929
- }
10930
- function buildBatchLoaderRequest(id, endpoint, params) {
10931
- switch (endpoint) {
10932
- case "listPublicEvents": {
10933
- const typedParams = params;
10934
- return typedParams ? {
10935
- id,
10936
- endpoint,
10937
- params: typedParams
10938
- } : {
10939
- id,
10940
- endpoint
10941
- };
10942
- }
10943
- case "getPublicEventDetails": {
10944
- const typedParams = params;
10945
- return typedParams ? {
10946
- id,
10947
- endpoint,
10948
- params: typedParams
10949
- } : {
10950
- id,
10951
- endpoint
10952
- };
10953
- }
10954
- case "listPublicWholeSeriesOfferings": {
10955
- const typedParams = params;
10956
- return typedParams ? {
10957
- id,
10958
- endpoint,
10959
- params: typedParams
10960
- } : {
10961
- id,
10962
- endpoint
10963
- };
10964
- }
10965
- case "getPublicWholeSeriesOffering": {
10966
- const typedParams = params;
10967
- return typedParams ? {
10968
- id,
10969
- endpoint,
10970
- params: typedParams
10971
- } : {
10972
- id,
10973
- endpoint
10974
- };
10975
- }
10976
- case "listPublicRouteCandidates": return {
10977
- id,
10978
- endpoint
10979
- };
10980
- case "listPublicProducts": {
10981
- const typedParams = params;
10982
- return typedParams ? {
10983
- id,
10984
- endpoint,
10985
- params: typedParams
10986
- } : {
10987
- id,
10988
- endpoint
10989
- };
10990
- }
10991
- case "listPublicTeamMembers": return {
10992
- id,
10993
- endpoint
10994
- };
10995
- case "getPublicBookingServices": {
10996
- const typedParams = params;
10997
- return typedParams ? {
10998
- id,
10999
- endpoint,
11000
- params: typedParams
11001
- } : {
11002
- id,
11003
- endpoint
11004
- };
11005
- }
11006
- case "getPublicWeeklySlotAvailability": return {
11007
- id,
11008
- endpoint,
11009
- params: params ?? { serviceId: "" }
11010
- };
11011
- case "getPublicFormById": return {
11012
- id,
11013
- endpoint,
11014
- params: params ?? { formId: "" }
11015
- };
11016
- }
11017
- }
11018
11898
  function usePreviewHeaderClearance() {
11019
11899
  const [clearance, setClearance] = useState({ kind: "none" });
11020
11900
  useEffect(() => {