@riverbankcms/sdk 0.147.0 → 0.148.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 (381) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{PreviewEditorSidebar-DtpB3_sS.mjs → PreviewEditorSidebar-DvEPG3Z2.mjs} +202 -143
  3. package/dist/{PreviewEditorUI-DxTLgaHo.mjs → PreviewEditorUI-D6eb6fkx.mjs} +68 -60
  4. package/dist/{PreviewQueryProvider-Dd4dxOiU.mjs → PreviewQueryProvider-5znTyJuz.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-DMMNCngt.mjs → SdkPreviewModeRuntime-DJ6utQ_R.mjs} +1191 -513
  6. package/dist/{SiteChromeCustomizeContext-DQXZXiqS.mjs → SiteChromeCustomizeContext-CFJYh6vo.mjs} +201798 -197304
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +0 -33
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +0 -3
  9. package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
  10. package/dist/_dts/api/src/accountApi.d.ts +1 -1
  11. package/dist/_dts/api/src/admin.d.ts +22 -22
  12. package/dist/_dts/api/src/aiPatch.d.ts +2 -2
  13. package/dist/_dts/api/src/aiPlayground.d.ts +1 -0
  14. package/dist/_dts/api/src/analytics.d.ts +2 -2
  15. package/dist/_dts/api/src/apiEndpointTypes.d.ts +2 -0
  16. package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
  17. package/dist/_dts/api/src/auth.d.ts +10 -10
  18. package/dist/_dts/api/src/availability.d.ts +6 -6
  19. package/dist/_dts/api/src/billing.d.ts +42 -15
  20. package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +8 -0
  21. package/dist/_dts/api/src/billingEndpointTypes.d.ts +15 -6
  22. package/dist/_dts/api/src/blocks.d.ts +15 -14
  23. package/dist/_dts/api/src/blocksKeys.d.ts +2 -0
  24. package/dist/_dts/api/src/bookingConfig.d.ts +0 -2
  25. package/dist/_dts/api/src/bookingOperations.d.ts +4 -4
  26. package/dist/_dts/api/src/bookingRecords.d.ts +1 -0
  27. package/dist/_dts/api/src/bookings.d.ts +7 -7
  28. package/dist/_dts/api/src/calendar.d.ts +9 -9
  29. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -6
  30. package/dist/_dts/api/src/common/envelope.d.ts +2 -2
  31. package/dist/_dts/api/src/content-editor.d.ts +2 -2
  32. package/dist/_dts/api/src/contentEntries.d.ts +17 -48
  33. package/dist/_dts/api/src/contentRuntime.d.ts +51 -37
  34. package/dist/_dts/api/src/contentTypes.d.ts +11 -11
  35. package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +6 -6
  36. package/dist/_dts/api/src/documentLifecycle.d.ts +67 -0
  37. package/dist/_dts/api/src/domains.d.ts +16 -16
  38. package/dist/_dts/api/src/editLeaseEndpoints.d.ts +72 -0
  39. package/dist/_dts/api/src/emailSettings.d.ts +4 -4
  40. package/dist/_dts/api/src/endpoints.d.ts +133 -41
  41. package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
  42. package/dist/_dts/api/src/eventManagementContracts.d.ts +25 -0
  43. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +0 -8
  44. package/dist/_dts/api/src/eventPageWords.d.ts +7 -12
  45. package/dist/_dts/api/src/footerSettings.d.ts +6 -6
  46. package/dist/_dts/api/src/index.d.ts +6 -5
  47. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
  48. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  49. package/dist/_dts/api/src/navigation.d.ts +5 -5
  50. package/dist/_dts/api/src/pageSurfaceEditorEndpoints.d.ts +55 -0
  51. package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +28 -7
  52. package/dist/_dts/api/src/pages.d.ts +7 -7
  53. package/dist/_dts/api/src/performance.d.ts +1 -1
  54. package/dist/_dts/api/src/public/index.d.ts +1 -1
  55. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -0
  56. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
  57. package/dist/_dts/api/src/redirects.d.ts +3 -3
  58. package/dist/_dts/api/src/request.d.ts +10 -1
  59. package/dist/_dts/api/src/resources.d.ts +4 -4
  60. package/dist/_dts/api/src/routes.d.ts +8 -3
  61. package/dist/_dts/api/src/sdk-event-upsert.d.ts +0 -1
  62. package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +21 -0
  63. package/dist/_dts/api/src/sdkContracts.d.ts +5 -28
  64. package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +1 -1
  65. package/dist/_dts/api/src/sdkEventOccurrenceRequestContracts.d.ts +43 -0
  66. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +4 -2
  67. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +8 -1
  68. package/dist/_dts/api/src/seo.d.ts +4 -4
  69. package/dist/_dts/api/src/services.d.ts +4 -4
  70. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +15 -8
  71. package/dist/_dts/api/src/siteMembers.d.ts +10 -10
  72. package/dist/_dts/api/src/siteOnboarding.d.ts +14 -0
  73. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -3
  74. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +5 -12
  75. package/dist/_dts/api/src/siteRuntimeEntry.d.ts +31 -0
  76. package/dist/_dts/billing/src/checkout/platform.d.ts +77 -0
  77. package/dist/_dts/billing/src/components/index.d.ts +25 -40
  78. package/dist/_dts/billing/src/membership/index.d.ts +1 -3
  79. package/dist/_dts/billing/src/plans/entitlements.d.ts +80 -0
  80. package/dist/_dts/billing/src/plans/registry.d.ts +16 -16
  81. package/dist/_dts/billing/src/plans/standing.d.ts +9 -2
  82. package/dist/_dts/billing/src/plans/types.d.ts +5 -15
  83. package/dist/_dts/billing/src/site-arrangements.d.ts +2 -2
  84. package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +2 -4
  85. package/dist/_dts/billing/src/subscriptions/store.d.ts +17 -11
  86. package/dist/_dts/block-form/src/backend/store-backend.d.ts +6 -7
  87. package/dist/_dts/block-form/src/backend/types.d.ts +7 -0
  88. package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -1
  89. package/dist/_dts/blocks/src/client/events.d.ts +3 -0
  90. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
  91. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +4 -13
  92. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  93. package/dist/_dts/blocks/src/portal/types.d.ts +0 -2
  94. package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +2 -1
  95. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -1
  96. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +4 -4
  97. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +6 -1
  98. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -2
  99. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  100. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -0
  101. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +6 -0
  102. package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +6 -0
  103. package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +4 -0
  104. package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +4 -1
  105. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -6
  106. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -3
  107. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +3 -0
  108. package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -1
  109. package/dist/_dts/blocks/src/system/runtime/hooks/usePolling.d.ts +7 -48
  110. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.checkout-return-context.d.ts +7 -0
  111. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +3 -1
  112. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
  113. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +9 -0
  114. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.payment-confirmation.d.ts +13 -0
  115. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +15 -1
  116. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-actions.d.ts +8 -0
  117. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +1 -0
  118. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
  119. package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
  120. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
  121. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +5 -0
  122. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +4 -1
  123. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -0
  124. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -5
  125. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -5
  126. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +6 -0
  127. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +37 -3
  128. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.client.d.ts +1 -1
  129. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +16 -1
  130. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.d.ts +13 -0
  131. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +5 -5
  132. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -14
  133. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +12 -0
  134. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
  135. package/dist/_dts/blocks/src/system/runtime/shared/components/DemoBookingPortalAccess.d.ts +22 -0
  136. package/dist/_dts/blocks/src/system/runtime/shared/components/DemoPortalSignInLink.d.ts +4 -0
  137. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
  138. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoBookingPassStorage.d.ts +10 -0
  139. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
  140. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
  141. package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -7
  142. package/dist/_dts/content-editor/src/controller/EditLeaseController.d.ts +39 -0
  143. package/dist/_dts/content-editor/src/controller/EditorWriteGate.d.ts +38 -0
  144. package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +25 -61
  145. package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseBanner.d.ts +7 -0
  146. package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseControllers.d.ts +14 -0
  147. package/dist/_dts/content-editor/src/controller/deriveEditorUnpublishedState.d.ts +6 -0
  148. package/dist/_dts/content-editor/src/controller/documentValueBaseline.d.ts +25 -0
  149. package/dist/_dts/content-editor/src/controller/editLeaseLossSignal.d.ts +6 -0
  150. package/dist/_dts/content-editor/src/controller/editLeaseNotice.d.ts +28 -0
  151. package/dist/_dts/content-editor/src/controller/editorClientId.d.ts +2 -0
  152. package/dist/_dts/content-editor/src/controller/editorEditability.d.ts +38 -0
  153. package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +34 -0
  154. package/dist/_dts/content-editor/src/controller/normalizedMetadataBaseline.d.ts +29 -0
  155. package/dist/_dts/content-editor/src/controller/pageSurfaceDocumentBaselines.d.ts +14 -0
  156. package/dist/_dts/content-editor/src/controller/pageSurfaceLifecycle.d.ts +11 -0
  157. package/dist/_dts/content-editor/src/controller/planDocumentBaselineRefresh.d.ts +19 -0
  158. package/dist/_dts/content-editor/src/controller/readDocumentLeaseBaselines.d.ts +19 -0
  159. package/dist/_dts/content-editor/src/controller/refreshDocumentLeaseBaseline.d.ts +12 -0
  160. package/dist/_dts/content-editor/src/controller/refreshLinkedEntry.d.ts +17 -0
  161. package/dist/_dts/content-editor/src/controller/replayRestoredEditorEffects.d.ts +2 -3
  162. package/dist/_dts/content-editor/src/controller/routeWrites.d.ts +26 -0
  163. package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +16 -17
  164. package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +6 -2
  165. package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +3 -3
  166. package/dist/_dts/content-editor/src/controller/useEntryValueAutosaves.d.ts +21 -0
  167. package/dist/_dts/content-editor/src/controller/useInitialEditorUiStore.d.ts +24 -0
  168. package/dist/_dts/content-editor/src/controller/useServerBaselineReconciliation.d.ts +17 -0
  169. package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +1 -1
  170. package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +5 -1
  171. package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +8 -47
  172. package/dist/_dts/content-editor/src/hooks/editLeaseMachine.d.ts +120 -0
  173. package/dist/_dts/content-editor/src/hooks/publishability.d.ts +6 -10
  174. package/dist/_dts/content-editor/src/hooks/useAutosaveStatus.d.ts +3 -0
  175. package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +5 -15
  176. package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +7 -5
  177. package/dist/_dts/content-editor/src/hooks/useEditLease.d.ts +28 -0
  178. package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +25 -39
  179. package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +17 -19
  180. package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +5 -8
  181. package/dist/_dts/content-editor/src/hooks/useValueAutosave.d.ts +64 -0
  182. package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +0 -7
  183. package/dist/_dts/content-editor/src/index.d.ts +26 -7
  184. package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +12 -0
  185. package/dist/_dts/content-editor/src/linkedEntries/owner.d.ts +9 -0
  186. package/dist/_dts/content-editor/src/liveDrafts/draftProjection.d.ts +66 -0
  187. package/dist/_dts/content-editor/src/liveDrafts/linkedSaveHandovers.d.ts +37 -0
  188. package/dist/_dts/content-editor/src/liveDrafts/remoteDraftOverlay.d.ts +113 -0
  189. package/dist/_dts/content-editor/src/liveDrafts/useLiveDrafts.d.ts +32 -0
  190. package/dist/_dts/content-editor/src/liveDrafts/useRetentionTicks.d.ts +7 -0
  191. package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +6 -0
  192. package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +1 -0
  193. package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +96 -19
  194. package/dist/_dts/content-editor/src/services/editorApiClient.d.ts +13 -0
  195. package/dist/_dts/content-editor/src/services/index.d.ts +2 -0
  196. package/dist/_dts/content-editor/src/services/pageSurfaceEditorServices.d.ts +23 -0
  197. package/dist/_dts/content-editor/src/sync/flushValues.d.ts +13 -0
  198. package/dist/_dts/content-editor/src/sync/lifecycleFailure.d.ts +51 -0
  199. package/dist/_dts/content-editor/src/sync/runLifecycle.d.ts +64 -0
  200. package/dist/_dts/content-editor/src/sync/schedulerValues.d.ts +27 -0
  201. package/dist/_dts/content-editor/src/sync/sendPlanning.d.ts +104 -0
  202. package/dist/_dts/content-editor/src/sync/valueSync.d.ts +114 -0
  203. package/dist/_dts/content-editor/src/ui/blockCollection.d.ts +8 -0
  204. package/dist/_dts/content-editor/src/ui/documentLifecycle.d.ts +18 -0
  205. package/dist/_dts/content-editor/src/ui/editorLeaseUiState.d.ts +7 -0
  206. package/dist/_dts/content-editor/src/ui/editorRefresh.d.ts +82 -0
  207. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +102 -127
  208. package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +1 -1
  209. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +126 -72
  210. package/dist/_dts/content-editor/src/ui/editorValueSnapshot.d.ts +18 -0
  211. package/dist/_dts/content-editor/src/ui/serverBlockAdmission.d.ts +26 -0
  212. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +16 -27
  213. package/dist/_dts/content-editor/src/ui/stores/blockVersionsStore.d.ts +24 -0
  214. package/dist/_dts/content-editor/src/ui/stores/linkedEntryLeaseStore.d.ts +54 -0
  215. package/dist/_dts/content-editor/src/ui/stores/linkedSaveHandoversStore.d.ts +11 -0
  216. package/dist/_dts/content-editor/src/ui/stores/remoteDraftsStore.d.ts +10 -0
  217. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +63 -3
  218. package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +2 -2
  219. package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +1 -1
  220. package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -4
  221. package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -4
  222. package/dist/_dts/content-model/src/definitions/shared.d.ts +11 -2
  223. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  224. package/dist/_dts/content-model/src/entry-slots/serializeAllowedBlocks.d.ts +2 -0
  225. package/dist/_dts/content-model/src/metadataConfig.d.ts +10 -38
  226. package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
  227. package/dist/_dts/content-model/src/types.d.ts +0 -1
  228. package/dist/_dts/core/src/block-content-identity.d.ts +49 -1
  229. package/dist/_dts/core/src/branded.d.ts +12 -0
  230. package/dist/_dts/core/src/currency-format.d.ts +8 -2
  231. package/dist/_dts/core/src/demo-lifecycle-status.d.ts +2 -2
  232. package/dist/_dts/core/src/demo-warm-pool-target.d.ts +8 -0
  233. package/dist/_dts/core/src/edit-lease.d.ts +55 -0
  234. package/dist/_dts/core/src/editor-state.d.ts +38 -13
  235. package/dist/_dts/core/src/editor-value-sync.d.ts +79 -0
  236. package/dist/_dts/core/src/html-entities.d.ts +6 -0
  237. package/dist/_dts/core/src/index.d.ts +4 -0
  238. package/dist/_dts/core/src/uuid.d.ts +7 -5
  239. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -153
  240. package/dist/_dts/editor/src/EditorProvider.d.ts +5 -0
  241. package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +14 -0
  242. package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +1 -0
  243. package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +0 -1
  244. package/dist/_dts/editor/src/index.d.ts +1 -1
  245. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +10 -9
  246. package/dist/_dts/editor-blocks/src/BlockForm.d.ts +1 -1
  247. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
  248. package/dist/_dts/editor-blocks/src/block-editor/BlockCardFrame.d.ts +1 -1
  249. package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +1 -1
  250. package/dist/_dts/editor-blocks/src/block-editor/applyExtendedFieldDefaults.d.ts +3 -4
  251. package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +4 -8
  252. package/dist/_dts/editor-blocks/src/block-editor/editorBlockItem.d.ts +23 -0
  253. package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +2 -7
  254. package/dist/_dts/editor-blocks/src/block-editor/hooks/applyBlockStructureChange.d.ts +4 -0
  255. package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +14 -5
  256. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +21 -19
  257. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -10
  258. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +8 -16
  259. package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +6 -16
  260. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +37 -9
  261. package/dist/_dts/editor-blocks/src/index.d.ts +2 -1
  262. package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +1 -1
  263. package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +1 -1
  264. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +1 -1
  265. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +1 -1
  266. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +3 -2
  267. package/dist/_dts/media-core/src/fileStorage.d.ts +4 -0
  268. package/dist/_dts/media-editor/src/context.d.ts +1 -1
  269. package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
  270. package/dist/_dts/media-editor/src/provider.d.ts +3 -2
  271. package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
  272. package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +3 -1
  273. package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +8 -3
  274. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +6 -3
  275. package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +22 -2
  276. package/dist/_dts/preview-next/src/client/blocks/previewProjection/entryFieldRebinding.d.ts +13 -0
  277. package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +2 -1
  278. package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +11 -1
  279. package/dist/_dts/preview-next/src/client/blocks/renderPrecedence.d.ts +17 -0
  280. package/dist/_dts/preview-next/src/client/blocks/useLinkedSaveHandoverRetention.d.ts +20 -0
  281. package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
  282. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
  283. package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
  284. package/dist/_dts/preview-next/src/client/preview/PreviewAccessBanners.d.ts +7 -0
  285. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
  286. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +24 -14
  287. package/dist/_dts/preview-next/src/client/preview/PreviewLeaseEditingMode.d.ts +2 -0
  288. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -2
  289. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
  290. package/dist/_dts/preview-next/src/client/preview/previewCustomizeAutosave.d.ts +5 -0
  291. package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +3 -4
  292. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +1 -0
  293. package/dist/_dts/preview-next/src/client/preview/usePreviewCustomizeWorkflowState.d.ts +4 -0
  294. package/dist/_dts/realtime/src/client.d.ts +3 -0
  295. package/dist/_dts/realtime/src/draftChannel.d.ts +91 -0
  296. package/dist/_dts/realtime/src/drafts.d.ts +210 -0
  297. package/dist/_dts/realtime/src/index.d.ts +3 -0
  298. package/dist/_dts/realtime/src/leaseChangeSubscriptions.d.ts +8 -0
  299. package/dist/_dts/realtime/src/types.d.ts +113 -0
  300. package/dist/_dts/realtime/src/useDraftChannel.d.ts +34 -0
  301. package/dist/_dts/realtime/src/useSiteRealtimeReload.d.ts +27 -0
  302. package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -55
  303. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
  304. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
  305. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -0
  306. package/dist/_dts/sdk/src/version.d.ts +1 -1
  307. package/dist/_dts/surfaces/src/index.d.ts +1 -0
  308. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
  309. package/dist/client/{BookingMailingListNote-1n4Ch_u_.mjs → BookingMailingListNote-CzRt2dF_.mjs} +98 -96
  310. package/dist/client/DemoBookingPortalAccess-mxqwap3f.mjs +344 -0
  311. package/dist/client/{EventCombined.client-C0pgma9y.mjs → EventCombined.client-CDb11igO.mjs} +6 -6
  312. package/dist/client/{EventListing.client-4fhLOvHP.mjs → EventListing.client-EgYhzKPa.mjs} +2 -2
  313. package/dist/client/{LeafletStaticMap-DScC4F3w.mjs → LeafletStaticMap-gtmtaA2b.mjs} +1 -1
  314. package/dist/client/{TerminalPanel-B5ZUsYhe.mjs → TerminalPanel-DvNUP5ot.mjs} +1 -1
  315. package/dist/client/{ThemedButton-DoVIV1Ao.mjs → ThemedButton-C7CeUJjW.mjs} +1 -1
  316. package/dist/client/{accordion-CoT5g7zo.mjs → accordion-kjvt49rA.mjs} +1 -1
  317. package/dist/client/{bookingForm-BWxB46xD.mjs → bookingForm-pbRZordh.mjs} +212 -62
  318. package/dist/client/bookings.mjs +616 -225
  319. package/dist/client/{carousel-DtNYWFd3.mjs → carousel-f4Zbmicv.mjs} +1 -1
  320. package/dist/client/{cart-z4qZih1Y.mjs → cart-DO20An50.mjs} +3 -3
  321. package/dist/client/{checkout-DpL7euFH.mjs → checkout-Du5amDR_.mjs} +3 -3
  322. package/dist/client/{checkoutUrls-BEfR7kVu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
  323. package/dist/client/client.mjs +1753 -823
  324. package/dist/client/{context-C8TinPJc.mjs → context-eW97E945.mjs} +4 -3
  325. package/dist/client/{dates-vwwxTeB0.mjs → dates-jPCirRea.mjs} +56 -11
  326. package/dist/client/{eventCalendar-DIbHfJXO.mjs → eventCalendar-C2M-iE4j.mjs} +9 -9
  327. package/dist/client/{eventCombined-DoGMJ6cg.mjs → eventCombined-W6ns3LHg.mjs} +4 -4
  328. package/dist/client/{eventDetails-BjN9v6a1.mjs → eventDetails-CR-GT0f0.mjs} +4 -4
  329. package/dist/client/{eventListing-DajjWgOv.mjs → eventListing-BK8AfYZz.mjs} +4 -4
  330. package/dist/client/{eventRegistration-DMq9gMA-.mjs → eventRegistration-BJSd4KUu.mjs} +369 -242
  331. package/dist/client/{form-Qf6qTbos.mjs → form-BvpfbQaT.mjs} +3 -3
  332. package/dist/client/{headerSection-D7qJrqFX.mjs → headerSection-I5sUQ8x-.mjs} +3 -3
  333. package/dist/client/hooks.mjs +254 -53
  334. package/dist/client/{locationMap-CCF9-t_0.mjs → locationMap-BLvwf9_f.mjs} +3 -3
  335. package/dist/client/{media-CwBGetqC.mjs → media-Cl38iOMI.mjs} +10 -3
  336. package/dist/client/{newsletterForm-DzCLSP4S.mjs → newsletterForm-DrQ2weE8.mjs} +3 -3
  337. package/dist/client/{pricing-Cgxv2KLC.mjs → pricing-BES87mrR.mjs} +1 -1
  338. package/dist/client/{productDetail-ru9w5GHx.mjs → productDetail-Url9jcc5.mjs} +3 -3
  339. package/dist/client/{productList-zaapKSl-.mjs → productList-DE7ngEZJ.mjs} +3 -3
  340. package/dist/client/{propsDecoder-CwvvNOHx.mjs → propsDecoder-D1OtGXDV.mjs} +89 -17
  341. package/dist/client/rendering/client.mjs +1445 -658
  342. package/dist/client/rendering/islands.mjs +18 -18
  343. package/dist/client/rendering.mjs +2478 -1515
  344. package/dist/client/{routeIslandApiConfig-BwVFo0Y4.mjs → routeIslandApiConfig-BG9Y-SHg.mjs} +1 -1
  345. package/dist/client/{shop-mktkXvbV.mjs → shop-CJkuySJ3.mjs} +126 -79
  346. package/dist/client/{shop-commerce-De7gEnkA.mjs → shop-commerce-4rKj5n9h.mjs} +25 -13
  347. package/dist/client/{shop-commerce-store-B3MCxIBW.mjs → shop-commerce-store-Bxm75Pg6.mjs} +1 -1
  348. package/dist/client/{shopShared-TqExh235.mjs → shopShared-DpoQDWfz.mjs} +4 -4
  349. package/dist/client/{useEventFilters-n_OjkIjX.mjs → useEventFilters-D8HliSqR.mjs} +32 -17
  350. package/dist/preview-next/before-render.mjs +192 -83
  351. package/dist/preview-next/client/runtime.mjs +4 -4
  352. package/dist/preview-next/keepAlive.mjs +192 -83
  353. package/dist/preview-next/middleware.mjs +192 -83
  354. package/dist/{previewAuthStore-C_EHQ5XA.mjs → previewAuthStore-BXXF3hhW.mjs} +194 -83
  355. package/dist/{sdk-runtime-BIkJg5y1.mjs → sdk-runtime-C2a05WjL.mjs} +2 -2
  356. package/dist/{separator-C9qDP95Z.mjs → separator-CuNhBAhS.mjs} +1 -1
  357. package/dist/server/components.mjs +1720 -1392
  358. package/dist/server/config-validation.mjs +221 -37
  359. package/dist/server/config.mjs +221 -37
  360. package/dist/server/data.mjs +221 -37
  361. package/dist/server/index.mjs +195 -84
  362. package/dist/server/next.mjs +490 -196
  363. package/dist/server/page-converter.mjs +53 -14
  364. package/dist/server/prebuild.mjs +1 -1
  365. package/dist/server/rendering/server.mjs +1427 -1098
  366. package/dist/server/rendering.mjs +2693 -2365
  367. package/dist/server/routing.mjs +291 -55
  368. package/dist/server/server.mjs +281 -114
  369. package/package.json +1 -1
  370. package/dist/_dts/billing/src/plans/display.d.ts +0 -15
  371. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +0 -3
  372. package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +0 -4
  373. package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +0 -16
  374. package/dist/_dts/content-editor/src/controller/driver.d.ts +0 -14
  375. package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +0 -7
  376. package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +0 -29
  377. package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +0 -26
  378. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +0 -64
  379. package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +0 -48
  380. package/dist/_dts/content-editor/src/types.d.ts +0 -44
  381. package/dist/client/DiscountCodeDisclosure-CKJtz0mY.mjs +0 -137
package/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and then gets the version it went out in.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ### Breaking: page workflows can't set status or schedule (#1553)
11
+
12
+ - A page workflow's `draftContentPatch` no longer accepts `draftStatus` or
13
+ `scheduledPublishAt`. The patch schema is strict, so a patch that includes
14
+ either field is rejected, where before it changed the page's draft status or
15
+ schedule. The remaining page fields (`draftTitle`,
16
+ `draftSlug`, `draftMetaTitle`, `draftMetaDescription`, `canonicalUrl`,
17
+ `ogImageId`) behave as before, and content-entry patches are unaffected.
18
+ - Status and schedule now belong to the lifecycle operations only (publish,
19
+ schedule, cancel, unpublish, discard), which is also what the dashboard
20
+ editors do. A workflow that set them should drop those fields and leave
21
+ publishing to those operations.
22
+ - Will accepted this break on 2026-09-27. At release, the SDK consumer review
23
+ still needs to confirm which estate workflows, if any, return these fields.
24
+ The `riverbankcms init-docs` workflow guide has been updated to match.
25
+
10
26
  ### Event pushes can tell the people booked about a venue move (#1501)
11
27
 
12
28
  - The Event upsert body takes an optional `attendeeNotification`, the same
@@ -1,27 +1,12 @@
1
1
  "use client";
2
- import { $ as FooterComposerPanel, $i as resolveSdkFooterMode, A as markApplySaving, An as ThemeScope, Ar as getCuratedSiteStyle, B as setPaletteColors, Ba as DropdownMenu, Bi as findButtonStyleRecipe, Br as curatedPalettes, C as cancelPreview, Ca as PopoverContent, D as isPreviewingChange, Da as TabsContent, E as dismissWarnings, Ea as Tabs, Eo as assertNever$1, F as previewFooterLook, Ga as DropdownMenuTrigger, H as syncStyleConfiguratorState, Ha as DropdownMenuItem, Hi as updateButtonStyleHoverPreference, I as previewHeaderLayout, Ia as Collapsible, L as previewHeaderStyle, La as CollapsibleContent, Lt as BlockEditor, M as palettePreviewProjection, Mr as findFooterLook, N as previewButtonStyle, Nr as getHeaderLayout, O as markApplyFailed, Oa as TabsList, Or as curatedSiteStyles, P as previewCuratedPalette, Pr as getHeaderStyle, Q as resolvePreviewSidebarTab, R as previewSiteStyle, Ra as CollapsibleTrigger, Ri as buttonStyleHoverPreferenceValue, S as applyTypographyDraftPatch, Sa as Popover, T as deriveStyleConfiguratorCapabilities, Ta as Input, U as toggleRow, Ua as DropdownMenuLabel, Ui as updateButtonStyleSelectionChoice, Ut as useEditorUiStore, V as styleConfiguratorHistoryEntryForPersistedSelection, Va as DropdownMenuContent, Vi as resolveButtonStyleSelection, Wa as DropdownMenuSeparator, Wi as buttonStyleSelectionKey, Wt as useEditorUiStoreInstance, X as resolveStyleConfiguratorInitialSnapshot, Xa as X$1, Xi as paletteColorEntries, Ya as cn, Yi as VARIANT_ROLES, Z as createOptimisticActionRunner, Zi as paletteColorsSchema, _ as reportPreviewDesignError, _a as SelectTrigger, _n as createStoreBackend, _o as ChevronLeft, an as isAdapterReferenceKind, at as ContentFieldsForm, b as planSiteChromeSelection, ba as CalloutDescription, c as selectionSnapshotFromApplySiteStyleSelectionResponse, cn as resolvePageRouteSlug, do as LoaderCircle, eo as Tablet, f as usePreviewDesignCoordinator, fn as ManifestForm, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, ga as SelectItem, go as ChevronRight, ha as SelectContent, hn as FormRenderer, j as openRow, k as markApplySaved, ka as TabsTrigger, l as deriveSiteStylePreviewUpdate, li as ThemedButtonSpecimen, ln as resolveContentTitle, lo as Monitor, lt as useEntryController, ma as Select, mn as createManifestValidation, n as useSiteChromeCustomizeOptional, no as Smartphone, ot as useUISelector, qa as Button, ro as SlidersHorizontal, s as buildApplySiteStyleSelectionBody, sn as deriveRouteMetadataPresentation, u as planConfiguratorPreview, uo as Maximize2, v as buildSiteChromeSelectionModels, va as SelectValue, vo as ChevronDown, w as createStyleConfiguratorState, wa as PopoverTrigger, wo as unsafeAsEditorBlockId, x as applyResolvedSelections, xa as SearchInput, xn as listEntryPageContentSlots, y as cycleSiteChromeSelectionId, ya as Callout, yo as Check, z as resetTypographyToSaved, za as Surface, zi as buttonStyleSelectionParameterValue } from "./SiteChromeCustomizeContext-DQXZXiqS.mjs";
3
- import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-C_EHQ5XA.mjs";
4
- import { t as Separator } from "./separator-C9qDP95Z.mjs";
5
- import { S as getSiteFontsStorageUrl, _ as usePreviewBlockCustomizeSelectionOptional, b as buildFontPreviewUrl, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as useBlockCustomizeControls, h as usePreviewSiteFontStorageUrl, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, u as canInspectSiteStyle, v as PreviewFormProvider, x as generateFontFaceCss, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-DMMNCngt.mjs";
2
+ import { $ as FooterComposerPanel, $i as VARIANT_ROLES, $o as valueStatus, $t as createStoreBackend, A as markApplySaving, Ai as curatedSiteStyles, An as listPageSurfaceContentSlots, B as setPaletteColors, Ba as CalloutDescription, Bn as resolvePageRouteSlug, C as cancelPreview, D as isPreviewingChange, Do as Maximize2, E as dismissWarnings, Eo as Monitor, F as previewFooterLook, Fa as SelectContent, Fn as routeLifecycleContext, Fo as ChevronDown, Ga as Input, Gi as curatedPalettes, H as syncStyleConfiguratorState, Ha as Popover, Hn as useEditorUiStore, I as previewHeaderLayout, Ia as SelectItem, Ii as resolveSdkFooterMode, Io as Check, Ja as TabsList, Ji as findButtonStyleRecipe, Jt as BlockEditor, Ka as Tabs, Ki as buttonStyleHoverPreferenceValue, L as previewHeaderStyle, La as SelectTrigger, Li as findFooterLook, Ln as isAdapterReferenceKind, Lo as Button, M as palettePreviewProjection, Mi as getCuratedSiteStyle, N as previewButtonStyle, No as ChevronRight, O as markApplyFailed, On as createManifestValidation, Oo as LoaderCircle, P as previewCuratedPalette, Pa as Select, Po as ChevronLeft, Q as resolvePreviewSidebarTab, Qi as buttonStyleSelectionKey, Qo as syncStateOf, Qt as FormRenderer, R as previewSiteStyle, Ra as SelectValue, Ri as getHeaderLayout, S as applyTypographyDraftPatch, T as deriveStyleConfiguratorCapabilities, U as toggleRow, Ua as PopoverContent, Un as useEditorUiStoreInstance, Uo as canWriteLinkedEntry, V as styleConfiguratorHistoryEntryForPersistedSelection, Va as SearchInput, Vn as resolveContentTitle, Vo as isEdited, Wa as PopoverTrigger, X as resolveStyleConfiguratorInitialSnapshot, Xi as updateButtonStyleHoverPreference, Ya as TabsTrigger, Yi as resolveButtonStyleSelection, Z as createOptimisticActionRunner, Zi as updateButtonStyleSelectionChoice, Zo as displayedValues, Zt as ManifestForm, _ as reportPreviewDesignError, _a as paletteColorEntries, _o as Tablet, ao as Surface, at as ContentFieldsForm, b as planSiteChromeSelection, bo as SlidersHorizontal, c as selectionSnapshotFromApplySiteStyleSelectionResponse, co as DropdownMenuItem, do as DropdownMenuTrigger, f as usePreviewDesignCoordinator, ft as useAutosaveStatus, g as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, io as CollapsibleTrigger, ir as toEditorBlockItem, j as openRow, jn as blocksKeys, jr as ThemedButtonSpecimen, k as markApplySaved, kn as listEntryPageContentSlots, l as deriveSiteStylePreviewUpdate, lo as DropdownMenuLabel, lt as useEntryController, n as useSiteChromeCustomizeOptional, no as Collapsible, oo as DropdownMenu, ot as useUISelector, po as X$1, qa as TabsContent, qi as buttonStyleSelectionParameterValue, ro as CollapsibleContent, s as buildApplySiteStyleSelectionBody, so as DropdownMenuContent, sr as ThemeScope, ts as assertNever$1, u as planConfiguratorPreview, uo as DropdownMenuSeparator, v as buildSiteChromeSelectionModels, va as paletteColorsSchema, vt as LinkedEntryLeaseBanner, w as createStyleConfiguratorState, x as applyResolvedSelections, y as cycleSiteChromeSelectionId, yo as Smartphone, z as resetTypographyToSaved, za as Callout, zi as getHeaderStyle, zn as deriveRouteMetadataPresentation, zo as cn } from "./SiteChromeCustomizeContext-CFJYh6vo.mjs";
3
+ import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-BXXF3hhW.mjs";
4
+ import { S as getSiteFontsStorageUrl, _ as usePreviewBlockCustomizeSelectionOptional, b as buildFontPreviewUrl, d as buildPreviewDashboardSetupUrl, f as resolvePreviewDashboardSetupHandoff, g as useBlockCustomizeControls, h as usePreviewSiteFontStorageUrl, m as resolvePreviewSidebarChromeModel, p as resolvePreviewEditorGuidanceModel, u as canInspectSiteStyle, v as PreviewFormProvider, x as generateFontFaceCss, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-DJ6utQ_R.mjs";
5
+ import { t as Separator } from "./separator-CuNhBAhS.mjs";
6
6
  import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { useQuery, useQueryClient } from "@tanstack/react-query";
9
9
  import { useRouter } from "next/navigation.js";
10
- //#region ../preview-next/src/client/preview/footerInspection.ts
11
- /** Shared by sidebar routing and the footer panel's initial editing target. */
12
- function resolveFooterInspection(inspection) {
13
- return inspection?.kind === "footer" || inspection?.kind === "footer-module" ? inspection : null;
14
- }
15
- function footerComposerInspectionProps(inspection) {
16
- return {
17
- initialTarget: inspection?.kind === "footer-module" ? {
18
- kind: "module",
19
- moduleId: inspection.moduleId
20
- } : { kind: "overview" },
21
- initialTargetRequestId: inspection?.requestId
22
- };
23
- }
24
- //#endregion
25
10
  //#region ../../node_modules/.pnpm/react-colorful@5.7.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-colorful/dist/index.mjs
26
11
  function u() {
27
12
  return (u = Object.assign || function(e) {
@@ -818,6 +803,21 @@ function normalizeFieldUi(value) {
818
803
  return value;
819
804
  }
820
805
  //#endregion
806
+ //#region ../preview-next/src/client/preview/footerInspection.ts
807
+ /** Shared by sidebar routing and the footer panel's initial editing target. */
808
+ function resolveFooterInspection(inspection) {
809
+ return inspection?.kind === "footer" || inspection?.kind === "footer-module" ? inspection : null;
810
+ }
811
+ function footerComposerInspectionProps(inspection) {
812
+ return {
813
+ initialTarget: inspection?.kind === "footer-module" ? {
814
+ kind: "module",
815
+ moduleId: inspection.moduleId
816
+ } : { kind: "overview" },
817
+ initialTargetRequestId: inspection?.requestId
818
+ };
819
+ }
820
+ //#endregion
821
821
  //#region ../preview-next/src/client/preview/PreviewZoomControls.tsx
822
822
  function PreviewZoomControls({ zoom, onZoomChange, disabled }) {
823
823
  return /* @__PURE__ */ jsxs(Select, {
@@ -1075,13 +1075,37 @@ function resolveSubrouteNotice(ctx, args) {
1075
1075
  const EMPTY_BLOCKS = [];
1076
1076
  const EMPTY_SLOTS = [];
1077
1077
  const EMPTY_SELECTION = { kind: "none" };
1078
- function entryPageContentSlotsKey(siteId, typeKey, entryId) {
1079
- return [
1080
- "preview-entry-page-content-slots",
1078
+ /**
1079
+ * The shared slot-list keys, so the controller's refreshes (a lease grant, a
1080
+ * discard that reverts sections) re-read this panel's slots.
1081
+ */
1082
+ function pageContentSlotsKey(siteId, typeKey, entryId, pageSurfaceId) {
1083
+ return pageSurfaceId ? blocksKeys.surfaceSlots(siteId, pageSurfaceId) : blocksKeys.entrySlots(siteId, typeKey, entryId);
1084
+ }
1085
+ function loadContentSlots(apiClient, siteId, typeKey, entryId, pageSurfaceId) {
1086
+ return pageSurfaceId ? listPageSurfaceContentSlots(apiClient, {
1081
1087
  siteId,
1082
- typeKey,
1088
+ pageSurfaceId
1089
+ }) : listEntryPageContentSlots(apiClient, {
1090
+ siteId,
1091
+ type: typeKey,
1083
1092
  entryId
1084
- ];
1093
+ });
1094
+ }
1095
+ function slotOwner(slot, typeKey, entryId, pageSurfaceId) {
1096
+ if (!pageSurfaceId) return {
1097
+ kind: "entry-slot",
1098
+ type: typeKey,
1099
+ entryId,
1100
+ slotKey: slot.slotKey
1101
+ };
1102
+ if (!("compositionHash" in slot)) throw new Error("Page surface slot is missing its revision");
1103
+ return {
1104
+ kind: "surface-slot",
1105
+ pageSurfaceId,
1106
+ slotKey: slot.slotKey,
1107
+ compositionHash: slot.compositionHash
1108
+ };
1085
1109
  }
1086
1110
  function getAllowedBlockKinds(slot) {
1087
1111
  return slot.allowedBlocks.blockKinds;
@@ -1126,26 +1150,23 @@ function updateBlocksWithSavedContent(blocks, blockId, content) {
1126
1150
  function getErrorMessage(error) {
1127
1151
  return error instanceof Error ? error.message : "Unable to load Page Content.";
1128
1152
  }
1129
- function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId, theme = null, apiClient, sdkConfig = null, widgets }) {
1153
+ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId, pageSurfaceId, theme = null, apiClient, sdkConfig = null, widgets }) {
1130
1154
  const router = useRouter();
1131
1155
  const queryClient = useQueryClient();
1132
1156
  const uiStore = useEditorUiStoreInstance();
1133
1157
  const blockEditorRef = useRef(null);
1134
1158
  const focusRequest = useEditorUiStore((state) => state.focusRequest);
1135
- const blockAutosaveStatus = useEditorUiStore((state) => state.autosave.blocks.status);
1159
+ const blockAutosaveStatus = useAutosaveStatus("blocks").status;
1136
1160
  const [slotSelection, setSlotSelection] = useState(EMPTY_SELECTION);
1137
- const queryKey = useMemo(() => entryPageContentSlotsKey(siteId, typeKey, entryId), [
1161
+ const queryKey = useMemo(() => pageContentSlotsKey(siteId, typeKey, entryId, pageSurfaceId), [
1138
1162
  entryId,
1163
+ pageSurfaceId,
1139
1164
  siteId,
1140
1165
  typeKey
1141
1166
  ]);
1142
1167
  const slotsQuery = useQuery({
1143
1168
  queryKey,
1144
- queryFn: () => listEntryPageContentSlots(apiClient, {
1145
- siteId,
1146
- type: typeKey,
1147
- entryId
1148
- }),
1169
+ queryFn: () => loadContentSlots(apiClient, siteId, typeKey, entryId, pageSurfaceId),
1149
1170
  staleTime: 3e4
1150
1171
  });
1151
1172
  const handleBlockSave = useCallback((blockId, content) => {
@@ -1175,7 +1196,17 @@ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId,
1175
1196
  const warnings = slotsQuery.data?.warnings ?? [];
1176
1197
  const selection = useMemo(() => resolveSlotSelection(slotSelection, slots), [slotSelection, slots]);
1177
1198
  const selectedSlot = useMemo(() => findSelectedSlot(selection, slots), [selection, slots]);
1178
- const selectedBlocks = selectedSlot?.blocks ?? EMPTY_BLOCKS;
1199
+ const selectedBlocks = useMemo(() => (selectedSlot?.blocks ?? EMPTY_BLOCKS).map(toEditorBlockItem), [selectedSlot]);
1200
+ const collectionReads = useMemo(() => slots.map((slot) => ({
1201
+ owner: slotOwner(slot, typeKey, entryId, pageSurfaceId),
1202
+ currentBlockIds: slot.blocks.map((block) => block.id),
1203
+ publishedBlockIds: slot.publishedBlockIds
1204
+ })), [
1205
+ slots,
1206
+ typeKey,
1207
+ entryId,
1208
+ pageSurfaceId
1209
+ ]);
1179
1210
  const focusRequestedBlockField = useCallback((editor) => {
1180
1211
  if (!editor) return false;
1181
1212
  if (!focusRequest?.blockId) return false;
@@ -1227,13 +1258,12 @@ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId,
1227
1258
  ref: handleBlockEditorRef,
1228
1259
  siteId,
1229
1260
  dashboardBaseUrl,
1230
- owner: {
1231
- kind: "entry-slot",
1232
- type: typeKey,
1233
- entryId,
1234
- slotKey: selectedSlot.slotKey
1261
+ owner: slotOwner(selectedSlot, typeKey, entryId, pageSurfaceId),
1262
+ source: {
1263
+ kind: "server",
1264
+ blocks: selectedBlocks
1235
1265
  },
1236
- blocks: [...selectedBlocks],
1266
+ collectionReads,
1237
1267
  apiClient,
1238
1268
  uiStore,
1239
1269
  theme,
@@ -1263,7 +1293,11 @@ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId,
1263
1293
  value: selectedSlot.slotKey,
1264
1294
  onValueChange: async (nextSlotKey) => {
1265
1295
  if (blockAutosaveStatus === "saving") return;
1266
- await uiStore.getState().autosave.saveNow(["blocks"]);
1296
+ const blockKeys = uiStore.getState().drafts.inspect().map((draft) => ({
1297
+ kind: "block",
1298
+ blockId: draft.id
1299
+ }));
1300
+ await uiStore.getState().autosave.flushValues("save-draft", { keys: blockKeys }).catch(() => null);
1267
1301
  setSlotSelection({
1268
1302
  kind: "selected",
1269
1303
  slotKey: nextSlotKey
@@ -1285,7 +1319,7 @@ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId,
1285
1319
  }
1286
1320
  //#endregion
1287
1321
  //#region ../preview-next/src/client/preview/EntryEditorPanel.tsx
1288
- function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, entrySubrouteContext, metadataPanel, linkedEntrySection, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
1322
+ function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, pageSurfaceId, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, entrySubrouteContext, metadataPanel, linkedEntrySection, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
1289
1323
  const [contentOpen, setContentOpen] = useState(true);
1290
1324
  const [pageContentOpen, setPageContentOpen] = useState(false);
1291
1325
  const [templateOpen, setTemplateOpen] = useState(false);
@@ -1350,7 +1384,6 @@ function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSche
1350
1384
  theme: theme ?? null,
1351
1385
  previewClient: apiClient,
1352
1386
  children: /* @__PURE__ */ jsx(ContentFieldsForm, {
1353
- siteId,
1354
1387
  form: contentFormSpec,
1355
1388
  initialValues: contentInitialValues,
1356
1389
  widgets
@@ -1387,6 +1420,7 @@ function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSche
1387
1420
  dashboardBaseUrl,
1388
1421
  typeKey: entryData.type,
1389
1422
  entryId: entryData.id,
1423
+ pageSurfaceId,
1390
1424
  theme,
1391
1425
  apiClient,
1392
1426
  sdkConfig: sdkConfig ?? null,
@@ -1753,7 +1787,7 @@ function PageBlockEditorPanel(props) {
1753
1787
  kind: "page",
1754
1788
  pageId: props.pageId
1755
1789
  },
1756
- blocks: props.blockItems,
1790
+ source: { kind: "mounted" },
1757
1791
  uiStore: props.uiStoreForBlockEditor,
1758
1792
  apiClient: props.apiClient,
1759
1793
  onBlocksChange: props.onBlocksChange,
@@ -4441,7 +4475,10 @@ function isRecord(value) {
4441
4475
  }
4442
4476
  //#endregion
4443
4477
  //#region ../preview-next/src/client/preview/PreviewEditorSidebar.tsx
4444
- function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonStyleSelection = null, themeSelectionButtonStyleRepairs, themeSelectionHeaderSelection = null, themeSelectionFooterLookId = null, themeSelectionHeaderLogo, apiClient, bearerToken, entrySubrouteContext, assistantPanel, sdkConfig, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
4478
+ function assistantTabAvailable(input) {
4479
+ return input.enabled && Boolean(input.pageId && input.bearerToken && input.canEdit);
4480
+ }
4481
+ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, pageNodeType, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonStyleSelection = null, themeSelectionButtonStyleRepairs, themeSelectionHeaderSelection = null, themeSelectionFooterLookId = null, themeSelectionHeaderLogo, apiClient, bearerToken, entrySubrouteContext, assistantPanel, sdkConfig, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
4445
4482
  const controller = useEntryController();
4446
4483
  const controllerBlocks = controller.blocks;
4447
4484
  const uiStore = useEditorUiStoreInstance();
@@ -4467,28 +4504,16 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
4467
4504
  surfaceId
4468
4505
  ]);
4469
4506
  const showAssistantTab = Boolean(assistantPanel);
4470
- const assistantAvailable = showAssistantTab && Boolean(pageId && bearerToken && canEdit);
4507
+ const assistantAvailable = assistantTabAvailable({
4508
+ enabled: showAssistantTab,
4509
+ pageId,
4510
+ bearerToken,
4511
+ canEdit
4512
+ });
4471
4513
  const effectiveActiveTab = showAssistantTab ? resolvePreviewSidebarTab(activeTab) : "editor";
4472
4514
  const blockItems = useMemo(() => controllerBlocks.list, [controllerBlocks.list]);
4473
4515
  const blockEditorRef = useRef(null);
4474
4516
  const contentFormWidgets = useMemo(() => previewWidgetOverrides, []);
4475
- const handleBlocksChange = useCallback((nextItems) => {
4476
- controllerBlocks.actions.setList(nextItems);
4477
- const drafts = uiStore.getState().drafts;
4478
- const extractData = (content) => {
4479
- if (!content || typeof content !== "object") return null;
4480
- const obj = content;
4481
- if ("data" in obj && obj.data && typeof obj.data === "object") return obj.data;
4482
- return obj;
4483
- };
4484
- for (const block of nextItems) {
4485
- if (!block.id) continue;
4486
- const baseline = extractData(block.content ?? block.draftContent ?? block.publishedContent ?? null);
4487
- const blockId = unsafeAsEditorBlockId(block.id);
4488
- if (drafts.getBlockSnapshot(blockId)) drafts.updateBlockBaseline(blockId, baseline, { kind: block.kind });
4489
- else drafts.initNewBlock(blockId, baseline, { kind: block.kind });
4490
- }
4491
- }, [controllerBlocks.actions, uiStore]);
4492
4517
  useEffect(() => {
4493
4518
  if (entryData) return;
4494
4519
  const req = focusRequest;
@@ -4506,10 +4531,12 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
4506
4531
  return /* @__PURE__ */ jsx(PreviewMetadataPanel, {
4507
4532
  ownerKind: entryData ? "content" : "page",
4508
4533
  contentTypeKey: entryData?.type ?? null,
4509
- entry: controller.entry
4534
+ entry: controller.entry,
4535
+ statusMessage: controller.toolbar.publishedMessage ?? null
4510
4536
  });
4511
4537
  }, [
4512
4538
  controller.entry,
4539
+ controller.toolbar.publishedMessage,
4513
4540
  entryData,
4514
4541
  pageId
4515
4542
  ]);
@@ -4543,6 +4570,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
4543
4570
  siteId,
4544
4571
  dashboardBaseUrl,
4545
4572
  entryData,
4573
+ pageSurfaceId: pageNodeType === "page_surface" ? pageId : null,
4546
4574
  contentTypeSchema,
4547
4575
  referenceContentTypeKeys,
4548
4576
  draftContent,
@@ -4569,7 +4597,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
4569
4597
  blockItems,
4570
4598
  uiStoreForBlockEditor,
4571
4599
  blockEditorRef,
4572
- onBlocksChange: handleBlocksChange,
4600
+ onBlocksChange: controllerBlocks.actions.setList,
4573
4601
  metadataPanel: metadataSectionContent,
4574
4602
  designTakeoverActive,
4575
4603
  designPanel: canInspectSiteStyle(siteStyleAccess) ? /* @__PURE__ */ jsx(StyleConfigurator, {
@@ -4669,10 +4697,33 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
4669
4697
  })
4670
4698
  });
4671
4699
  }
4672
- function PreviewMetadataPanel({ ownerKind, contentTypeKey, entry }) {
4673
- const uiStore = useEditorUiStoreInstance();
4700
+ function PreviewMetadataPanel({ ownerKind, contentTypeKey, entry, statusMessage }) {
4701
+ const metadataPresentation = usePreviewMetadataPresentation(ownerKind, contentTypeKey, entry);
4702
+ const manifest = metadataPresentation.manifest;
4703
+ const backend = usePreviewMetadataBackend(manifest, routeLifecycleContext(entry)?.draftStatus ?? "draft");
4704
+ return /* @__PURE__ */ jsxs("div", {
4705
+ className: "space-y-4",
4706
+ children: [
4707
+ metadataPresentation.kind === "page-homepage" ? /* @__PURE__ */ jsx("div", {
4708
+ className: "inline-flex rounded-md bg-muted px-2 py-1 text-xs font-medium text-muted-foreground",
4709
+ children: "Homepage"
4710
+ }) : null,
4711
+ statusMessage ? /* @__PURE__ */ jsx("p", {
4712
+ className: "text-xs text-muted-foreground",
4713
+ "data-testid": "preview-metadata-status",
4714
+ children: statusMessage
4715
+ }) : null,
4716
+ /* @__PURE__ */ jsx(ManifestForm, {
4717
+ manifest,
4718
+ backend,
4719
+ className: "space-y-4"
4720
+ })
4721
+ ]
4722
+ });
4723
+ }
4724
+ function usePreviewMetadataPresentation(ownerKind, contentTypeKey, entry) {
4674
4725
  const currentSlug = useEditorUiStore((state) => state.metadata.getAtPath("draftSlug")) ?? void 0;
4675
- const metadataPresentation = useMemo(() => {
4726
+ return useMemo(() => {
4676
4727
  if (ownerKind === "content") return deriveRouteMetadataPresentation({
4677
4728
  kind: "content",
4678
4729
  typeKey: contentTypeKey
@@ -4689,33 +4740,89 @@ function PreviewMetadataPanel({ ownerKind, contentTypeKey, entry }) {
4689
4740
  entry,
4690
4741
  ownerKind
4691
4742
  ]);
4692
- const manifest = metadataPresentation.manifest;
4693
- const isHomepage = metadataPresentation.kind === "page-homepage";
4743
+ }
4744
+ /** The metadata form's backend; slug auto-generation reads the snapshot's status from its read-only context (row SL1). */
4745
+ function usePreviewMetadataBackend(manifest, draftStatus) {
4746
+ const uiStore = useEditorUiStoreInstance();
4694
4747
  const validation = useMemo(() => createManifestValidation(manifest), [manifest]);
4695
- const backend = useMemo(() => createStoreBackend({
4748
+ return useMemo(() => createStoreBackend({
4696
4749
  scope: "metadata",
4697
4750
  store: uiStore,
4751
+ context: { draftStatus },
4698
4752
  validateFn: (values) => {
4699
4753
  const result = validation.schema.safeParse(values);
4700
- if (!result.success) return result.error.issues;
4701
- return [];
4754
+ return result.success ? [] : result.error.issues;
4702
4755
  }
4703
- }), [uiStore, validation]);
4756
+ }), [
4757
+ draftStatus,
4758
+ uiStore,
4759
+ validation
4760
+ ]);
4761
+ }
4762
+ function LinkedEntryEditorPanel({ siteId, apiClient, theme, widgets, entry, fields }) {
4763
+ const uiStore = useEditorUiStoreInstance();
4764
+ const canWrite = useUISelector(uiStore, (state) => canWriteLinkedEntry(state, entry.meta.entryId));
4765
+ const { manifest, backend } = useLinkedEntryForm(entry, fields, widgets);
4766
+ const syncState = syncStateOf(entry.sync);
4767
+ const errorMessage = syncState.kind === "failed" ? syncState.error : null;
4768
+ const dirty = isEdited(entry.sync);
4769
+ const isSaving = valueStatus(entry.sync) === "saving";
4770
+ const displayTitle = resolveContentTitle(displayedValues(entry.sync), entry.meta.titleField, entry.meta.title);
4704
4771
  return /* @__PURE__ */ jsxs("div", {
4705
- className: "space-y-4",
4706
- children: [isHomepage ? /* @__PURE__ */ jsx("div", {
4707
- className: "inline-flex rounded-md bg-muted px-2 py-1 text-xs font-medium text-muted-foreground",
4708
- children: "Homepage"
4709
- }) : null, /* @__PURE__ */ jsx(ManifestForm, {
4710
- manifest,
4711
- backend,
4712
- className: "space-y-4"
4713
- })]
4772
+ className: "bg-muted/20",
4773
+ children: [
4774
+ /* @__PURE__ */ jsx(LinkedEntryLeaseBanner, { entryId: entry.meta.entryId }),
4775
+ /* @__PURE__ */ jsxs("div", {
4776
+ className: "flex items-start justify-between gap-3 px-4 py-3",
4777
+ children: [/* @__PURE__ */ jsxs("div", {
4778
+ className: "min-w-0",
4779
+ children: [/* @__PURE__ */ jsx("div", {
4780
+ className: "truncate text-sm font-medium",
4781
+ children: displayTitle
4782
+ }), /* @__PURE__ */ jsx("p", {
4783
+ className: "mt-1 text-xs leading-5 text-muted-foreground",
4784
+ children: "Changes update this linked entry wherever it appears."
4785
+ })]
4786
+ }), /* @__PURE__ */ jsx("div", {
4787
+ className: "flex shrink-0 items-center gap-2",
4788
+ children: /* @__PURE__ */ jsx(Button, {
4789
+ type: "button",
4790
+ variant: "outline",
4791
+ size: "sm",
4792
+ onClick: () => {
4793
+ if (dirty) uiStore.getState().linkedEntries.discard(entry.meta.entryId);
4794
+ else uiStore.getState().linkedEntries.close();
4795
+ },
4796
+ children: dirty ? "Discard" : "Close"
4797
+ })
4798
+ })]
4799
+ }),
4800
+ /* @__PURE__ */ jsxs("div", {
4801
+ className: "px-4 pb-4",
4802
+ inert: !canWrite,
4803
+ children: [errorMessage ? /* @__PURE__ */ jsx("div", {
4804
+ className: "mb-3 rounded-md border border-red-500 bg-red-50 px-3 py-2 text-sm text-red-700",
4805
+ children: errorMessage
4806
+ }) : isSaving ? /* @__PURE__ */ jsx("div", {
4807
+ className: "mb-3 rounded-md border border-sky-500 bg-sky-50 px-3 py-2 text-sm text-sky-700",
4808
+ children: "Saving changes"
4809
+ }) : null, /* @__PURE__ */ jsx(PreviewFormProvider, {
4810
+ siteId,
4811
+ theme: theme ?? null,
4812
+ previewClient: apiClient,
4813
+ children: /* @__PURE__ */ jsx(ManifestForm, {
4814
+ manifest,
4815
+ backend,
4816
+ widgetOverrides: widgets,
4817
+ className: "space-y-4"
4818
+ })
4819
+ })]
4820
+ })
4821
+ ]
4714
4822
  });
4715
4823
  }
4716
- function LinkedEntryEditorPanel({ siteId, apiClient, theme, widgets, entry, fields }) {
4824
+ function useLinkedEntryForm(entry, fields, widgets) {
4717
4825
  const uiStore = useEditorUiStoreInstance();
4718
- const linkedEntriesAutosave = useUISelector(uiStore, (state) => state.autosave.linkedEntries);
4719
4826
  const manifest = useMemo(() => ({
4720
4827
  name: `linked-content-${entry.meta.contentTypeKey}`,
4721
4828
  version: "1.0",
@@ -4730,65 +4837,17 @@ function LinkedEntryEditorPanel({ siteId, apiClient, theme, widgets, entry, fiel
4730
4837
  fields
4731
4838
  ]);
4732
4839
  const validation = useMemo(() => createManifestValidation(manifest, { widgets }), [manifest, widgets]);
4733
- const backend = useMemo(() => createStoreBackend({
4734
- scope: "linkedContent",
4735
- store: uiStore,
4736
- validateFn: (values) => {
4737
- const result = validation.schema.safeParse(values);
4738
- return result.success ? [] : result.error.issues;
4739
- }
4740
- }), [uiStore, validation]);
4741
- const syncState = entry.syncState;
4742
- const errorMessage = syncState.kind === "failed" ? syncState.error : null;
4743
- const dirty = syncState.kind === "pending" || syncState.kind === "failed";
4744
- const isSaving = linkedEntriesAutosave.status === "saving" && dirty;
4745
- return /* @__PURE__ */ jsxs("div", {
4746
- className: "bg-muted/20",
4747
- children: [/* @__PURE__ */ jsxs("div", {
4748
- className: "flex items-start justify-between gap-3 px-4 py-3",
4749
- children: [/* @__PURE__ */ jsxs("div", {
4750
- className: "min-w-0",
4751
- children: [/* @__PURE__ */ jsx("div", {
4752
- className: "truncate text-sm font-medium",
4753
- children: resolveContentTitle(entry.current ?? entry.baseline ?? null, entry.meta.titleField, entry.meta.title)
4754
- }), /* @__PURE__ */ jsx("p", {
4755
- className: "mt-1 text-xs leading-5 text-muted-foreground",
4756
- children: "Changes update this linked entry wherever it appears."
4757
- })]
4758
- }), /* @__PURE__ */ jsx("div", {
4759
- className: "flex shrink-0 items-center gap-2",
4760
- children: /* @__PURE__ */ jsx(Button, {
4761
- type: "button",
4762
- variant: "outline",
4763
- size: "sm",
4764
- onClick: () => {
4765
- if (dirty) uiStore.getState().linkedEntries.discard(entry.meta.entryId);
4766
- else uiStore.getState().linkedEntries.close();
4767
- },
4768
- children: dirty ? "Discard" : "Close"
4769
- })
4770
- })]
4771
- }), /* @__PURE__ */ jsxs("div", {
4772
- className: "px-4 pb-4",
4773
- children: [errorMessage ? /* @__PURE__ */ jsx("div", {
4774
- className: "mb-3 rounded-md border border-red-500 bg-red-50 px-3 py-2 text-sm text-red-700",
4775
- children: errorMessage
4776
- }) : isSaving ? /* @__PURE__ */ jsx("div", {
4777
- className: "mb-3 rounded-md border border-sky-500 bg-sky-50 px-3 py-2 text-sm text-sky-700",
4778
- children: "Saving changes"
4779
- }) : null, /* @__PURE__ */ jsx(PreviewFormProvider, {
4780
- siteId,
4781
- theme: theme ?? null,
4782
- previewClient: apiClient,
4783
- children: /* @__PURE__ */ jsx(ManifestForm, {
4784
- manifest,
4785
- backend,
4786
- widgetOverrides: widgets,
4787
- className: "space-y-4"
4788
- })
4789
- })]
4790
- })]
4791
- });
4840
+ return {
4841
+ manifest,
4842
+ backend: useMemo(() => createStoreBackend({
4843
+ scope: "linkedContent",
4844
+ store: uiStore,
4845
+ validateFn: (values) => {
4846
+ const result = validation.schema.safeParse(values);
4847
+ return result.success ? [] : result.error.issues;
4848
+ }
4849
+ }), [uiStore, validation])
4850
+ };
4792
4851
  }
4793
4852
  function buildLinkedEntrySidebarSection(input) {
4794
4853
  const { snapshot, inspection, renderContent } = input;