@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
@@ -0,0 +1,34 @@
1
+ import type { EditAuthority } from '../../../core/src/index';
2
+ import type { EditorEditability } from './editorEditability';
3
+ import type { EditorLeaseConfig } from './EditLeaseController';
4
+ /**
5
+ * How a mount takes part in the edit lease:
6
+ * - a lease config: it holds (or asks for) the lease;
7
+ * - an exemption: it writes without a lease;
8
+ * - viewing: it is not trying to edit, so it mounts no lease controller at all.
9
+ */
10
+ export type EditorLeaseParticipation = EditorLeaseConfig | Extract<EditAuthority, {
11
+ kind: 'exempt';
12
+ }> | EditorViewingParticipation;
13
+ export type EditorViewingParticipation = Readonly<{
14
+ kind: 'viewing';
15
+ }>;
16
+ export declare const VIEWING_PARTICIPATION: EditorViewingParticipation;
17
+ type ClassifiedParticipation = Readonly<{
18
+ kind: 'leased';
19
+ config: EditorLeaseConfig;
20
+ }> | Extract<EditAuthority, {
21
+ kind: 'exempt';
22
+ }> | EditorViewingParticipation;
23
+ export type LeaseParticipationKind = ClassifiedParticipation['kind'];
24
+ export declare function classifyLeaseParticipation(participation: EditorLeaseParticipation): ClassifiedParticipation;
25
+ export declare function leaseConfigOf(participation: EditorLeaseParticipation): EditorLeaseConfig | null;
26
+ /** Viewing and leased mounts share one store identity, so switching between them keeps local edits. */
27
+ export declare function leaseExemptionOf(participation: EditorLeaseParticipation): "team-member-profile" | "sdk" | null;
28
+ export declare function initialParticipationEditability(participation: EditorLeaseParticipation): EditorEditability;
29
+ /**
30
+ * The store's editability after the mount's participation changes. A lease controller owns
31
+ * editability while it is mounted; this only moves the store into and out of `viewing`.
32
+ */
33
+ export declare function nextParticipationEditability(participation: LeaseParticipationKind, current: EditorEditability): EditorEditability;
34
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { ContentRouteRecord } from '../../../api/src/content-editor';
2
+ import { type ContentEntrySnapshot, type RoutingHelpers } from '../../../content-model/src/index';
3
+ /**
4
+ * A snapshot's metadata values as the editor holds and sends them. A homepage has no
5
+ * slug (the snapshot's is null); the editor holds that as '', which is what the metadata
6
+ * endpoints accept, so a whole-record save after a lifecycle write isn't refused.
7
+ */
8
+ export declare function normalizedMetadataBaseline(entry: ContentEntrySnapshot): Record<string, unknown>;
9
+ /** A document's metadata as the store holds it: its values, published baseline and draft revision. */
10
+ export type DocumentMetadata = Readonly<{
11
+ values: Record<string, unknown>;
12
+ published: Record<string, unknown> | null;
13
+ revision: string | null;
14
+ }>;
15
+ /**
16
+ * The one mapping from an entry snapshot to the metadata the store holds, for server
17
+ * props, lease-grant reads and the route rows lifecycle writes return.
18
+ */
19
+ export declare function snapshotMetadata(snapshot: ContentEntrySnapshot, routing: RoutingHelpers, revision: string | null): DocumentMetadata;
20
+ /** A route row (a write's own result, or a read) as the owning document's metadata. */
21
+ export declare function routeMetadata(documentId: string, route: ContentRouteRecord, routing: RoutingHelpers): DocumentMetadata;
22
+ export declare function routeField(route: Record<string, unknown>, camel: string, snake: string): unknown;
23
+ /**
24
+ * A metadata save's stored route as the values the editor holds, normalised like
25
+ * `normalizedMetadataBaseline`: a homepage's stored slug is null, held as ''. Otherwise a
26
+ * later edit sees the null as a change of its own and sends it, which the metadata
27
+ * endpoints refuse (issue 1553, found by the discard E2E).
28
+ */
29
+ export declare function savedRouteMetadataValues(route: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,14 @@
1
+ import type { PageSurfaceEditorDocument } from '../../../api/src/content-editor';
2
+ import type { RoutingHelpers } from '../../../content-model/src/index';
3
+ import type { DocumentValueBaseline } from './documentValueBaseline';
4
+ export type PageSurfaceDocumentBaselines = Readonly<{
5
+ metadata: DocumentValueBaseline;
6
+ content: DocumentValueBaseline;
7
+ }>;
8
+ /**
9
+ * The editor baselines a page surface's server document stands for: its
10
+ * route's draft metadata and its content draft, each with the revision the
11
+ * next save must quote. Re-reading after a lease grant and applying a discard
12
+ * both read the document this way, so the two agree with the first load.
13
+ */
14
+ export declare function pageSurfaceDocumentBaselines(document: PageSurfaceEditorDocument, routing: RoutingHelpers): PageSurfaceDocumentBaselines;
@@ -0,0 +1,11 @@
1
+ import type { PublishPageSurfaceResponse } from '../../../api/src/content-editor';
2
+ import type { RoutingHelpers } from '../../../content-model/src/index';
3
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
4
+ import type { DocumentSince } from '../sync/runLifecycle';
5
+ import type { DiscardLifecycleResult } from '../services/contentEntryServices';
6
+ import type { ContentEntrySnapshot } from '../../../content-model/src/index';
7
+ /** A native publication follows the same atomic receipt reconciliation as entries. */
8
+ export declare function applyPageSurfacePublish(store: EditorUiStoreInstance, routing: RoutingHelpers | undefined, since: DocumentSince, publication: PublishPageSurfaceResponse): void;
9
+ export declare function applyPageSurfaceDiscard(store: EditorUiStoreInstance, routing: RoutingHelpers | undefined, since: DocumentSince, result: Extract<DiscardLifecycleResult<ContentEntrySnapshot>, {
10
+ kind: 'serverDocument';
11
+ }>): void;
@@ -0,0 +1,19 @@
1
+ import type { EditorBlockVersions } from '../../../core/src/index';
2
+ import type { BlockDraftBaselineSeed } from '../../../editor-blocks/src/index';
3
+ import type { ValueRefresh } from '../ui/editorRefresh';
4
+ import type { DocumentValueBaseline } from './documentValueBaseline';
5
+ export type { DocumentValueBaseline };
6
+ export type FreshDocumentBaselines = Readonly<{
7
+ metadata: DocumentValueBaseline;
8
+ content: DocumentValueBaseline | null;
9
+ blocks: readonly (BlockDraftBaselineSeed & Readonly<{
10
+ versions: EditorBlockVersions;
11
+ }>)[];
12
+ }>;
13
+ /**
14
+ * A fresh read of the whole document as refresh events. The refresh policy (keep-local,
15
+ * or take-back after a grant) is the reducer's to apply, against each value's local
16
+ * intent (issue 1553). Only incoming items are refreshed; a block missing from the read
17
+ * is left alone, as the block seeder does.
18
+ */
19
+ export declare function planDocumentBaselineRefresh(fresh: FreshDocumentBaselines): readonly ValueRefresh[];
@@ -0,0 +1,19 @@
1
+ import type { ApiClient } from '../../../api/src/request';
2
+ import { type ContentTypeSchema } from '../../../content-model/src/index';
3
+ import { type ServerBlockItem } from '../../../editor-blocks/src/index';
4
+ import { type BlockFieldExtensions } from '../../../editor-blocks/src/block-editor/blockDraftBaselineSeed';
5
+ import type { EditLeaseScope } from '../../../core/src/index';
6
+ import type { FreshDocumentBaselines } from './planDocumentBaselineRefresh';
7
+ export type DocumentLeaseReadInput = Readonly<{
8
+ apiClient: ApiClient;
9
+ siteId: string;
10
+ scope: EditLeaseScope;
11
+ type: string;
12
+ schema: ContentTypeSchema;
13
+ blockFieldExtensions?: BlockFieldExtensions | null;
14
+ }>;
15
+ export type DocumentLeaseBaselines = Readonly<{
16
+ baselines: FreshDocumentBaselines;
17
+ blocks: readonly ServerBlockItem[];
18
+ }>;
19
+ export declare function readDocumentLeaseBaselines(input: DocumentLeaseReadInput): Promise<DocumentLeaseBaselines>;
@@ -0,0 +1,12 @@
1
+ import type { RefreshPolicy } from '../sync/valueSync';
2
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
3
+ import { type DocumentLeaseReadInput } from './readDocumentLeaseBaselines';
4
+ /**
5
+ * The grant's authoritative reread (row F8). It waits until no save is outstanding, so
6
+ * the read sees this tab's own saves, then applies every fresh baseline in one refresh
7
+ * under the grant's policy. All reads complete before anything changes, and a grant that
8
+ * was overtaken while it waited or read applies nothing.
9
+ */
10
+ export declare function refreshDocumentLeaseBaseline(input: DocumentLeaseReadInput & Readonly<{
11
+ uiStore: EditorUiStoreInstance;
12
+ }>, policy: Extract<RefreshPolicy, 'keep-local' | 'take-back'>, isCurrent: () => boolean): Promise<void>;
@@ -0,0 +1,17 @@
1
+ import type { ApiClient } from '../../../api/src/request';
2
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
3
+ import type { EditorEditability } from './editorEditability';
4
+ /** Updates a linked entry's own lease session, if it has one. */
5
+ export declare function updateLinkedEntrySession(store: EditorUiStoreInstance, entryId: string, update: Partial<Readonly<{
6
+ editability: EditorEditability;
7
+ discarded: boolean;
8
+ }>>): void;
9
+ /**
10
+ * The linked entry's grant reread: it waits until the entry has no save outstanding, so
11
+ * the read sees this tab's own save (row F8), then applies the read as one refresh.
12
+ */
13
+ export declare function refreshLinkedEntry(apiClient: ApiClient, store: EditorUiStoreInstance, scope: Readonly<{
14
+ siteId: string;
15
+ type: string;
16
+ entryId: string;
17
+ }>, takingBack: boolean, isCurrent: () => boolean): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  import { type EditorPageId, type EditorSiteId } from '../ui/editorHistory';
2
2
  import type { EditorEffect, EditorHistorySnapshot } from '../ui/editorHistory';
3
3
  import type { EditorUiStoreInstance } from '../ui/editorUiStore';
4
+ import type { LifecycleOutcome } from '../ui/stores/types';
4
5
  import type { ApiClient } from '../services';
5
- import { type EditorEffectDrainResult } from './editorEffectDrain';
6
6
  type ReplayRestoredEditorEffectsArgs = Readonly<{
7
7
  previous: EditorHistorySnapshot;
8
8
  effects: readonly EditorEffect[];
@@ -10,7 +10,6 @@ type ReplayRestoredEditorEffectsArgs = Readonly<{
10
10
  siteId: EditorSiteId;
11
11
  pageId: EditorPageId;
12
12
  uiStore: EditorUiStoreInstance;
13
- setErrorMessage: (message: string | null) => void;
14
13
  }>;
15
- export declare function replayRestoredEditorEffects({ previous, effects, apiClient, siteId, pageId, uiStore, setErrorMessage, }: ReplayRestoredEditorEffectsArgs): Promise<EditorEffectDrainResult>;
14
+ export declare function replayRestoredEditorEffects({ previous, effects, apiClient, siteId, pageId, uiStore, }: ReplayRestoredEditorEffectsArgs): Promise<LifecycleOutcome>;
16
15
  export {};
@@ -0,0 +1,26 @@
1
+ import type { ContentRouteRecord } from '../../../api/src/content-editor';
2
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
3
+ import type { LifecycleOutcome } from '../ui/stores/types';
4
+ import { type DocumentSince } from '../sync/runLifecycle';
5
+ import type { DocumentMetadata } from './normalizedMetadataBaseline';
6
+ /** Lifecycle writes a host issues itself: native page-surface publish, schedule and cancel. */
7
+ export type RouteWriteOperation = 'publish' | 'schedule' | 'cancel-schedule';
8
+ /**
9
+ * Writes whose response is the route row they wrote (issue 1553, A), run through the
10
+ * document's one lifecycle shell (B-ownership): each settles what its operation settles
11
+ * first, holds the document while its request is out, and applies its response as this
12
+ * tab's own write.
13
+ */
14
+ export type RouteWrites = Readonly<{
15
+ /** The document metadata a route row holds: values, published baseline and draft revision. */
16
+ metadataOf: (route: ContentRouteRecord) => DocumentMetadata;
17
+ /**
18
+ * Runs such a write under `operation`'s reconciliation; `apply` receives the response
19
+ * and what the person's edits are measured from. A refusal or rejected request is the
20
+ * outcome's failure (also the banner's); callers branch on it rather than catching.
21
+ */
22
+ run: <T>(operation: RouteWriteOperation, request: () => Promise<T>, apply: (response: T, since: DocumentSince) => void) => Promise<LifecycleOutcome>;
23
+ /** Applies a route row as this tab's own write: rebased under any edit typed meanwhile (rows R1–R11, WR4). */
24
+ applyRoute: (route: ContentRouteRecord, since: DocumentSince) => void;
25
+ }>;
26
+ export declare function createRouteWrites(uiStore: EditorUiStoreInstance, metadataOf: RouteWrites['metadataOf']): RouteWrites;
@@ -1,29 +1,28 @@
1
- import type { useStoreAutosave } from '../hooks/useStoreAutosave';
2
- import type { useBlockAutosave } from '../hooks/useBlockAutosave';
3
- import type { AutosaveHandle } from '../hooks/useSimpleAutosave';
4
1
  import type { createEditorUiStore } from '../ui/editorUiStore';
2
+ import type { AutosaveHandle, AutosaveType } from '../ui/stores/types';
3
+ import { type SchedulerValue, type SendSignature } from '../sync/sendPlanning';
4
+ type TriggerHandle = Pick<AutosaveHandle, 'trigger'>;
5
5
  type UseAutosaveTriggersProps = {
6
6
  uiStore: ReturnType<typeof createEditorUiStore>;
7
- metadataAutosave: ReturnType<typeof useStoreAutosave>;
8
- blockAutosave: ReturnType<typeof useBlockAutosave>;
9
- linkedEntryAutosave?: AutosaveHandle | null;
7
+ metadataAutosave: TriggerHandle;
8
+ blockAutosave: TriggerHandle;
9
+ linkedEntryAutosave?: TriggerHandle | null;
10
10
  /** Content autosave - only provided for content entries (not pages) */
11
- contentAutosave?: ReturnType<typeof useStoreAutosave> | null;
11
+ contentAutosave?: TriggerHandle | null;
12
12
  hasRoute: boolean;
13
13
  /** When false, does not trigger background autosaves (manual-save mode). */
14
14
  enableTriggers?: boolean;
15
15
  };
16
+ type SignatureMemory = Readonly<Record<AutosaveType, SendSignature>>;
16
17
  /**
17
- * Hook that orchestrates autosave triggering based on draft state changes.
18
- *
19
- * Uses VERSION-BASED TRIGGERING to handle continuous editing correctly:
20
- * - Metadata: Triggers when status='pending' AND version changed
21
- * - Content: Triggers when status='pending' AND version changed (content entries only)
22
- * - Blocks: Triggers when any block has status='pending' AND version changed
23
- *
24
- * This solves the "autosave only fires once" bug that occurred with status
25
- * transition tracking. When a user continues editing during/after save,
26
- * status stays 'pending' but version increments, so we still trigger.
18
+ * Which schedulers are due: those whose send signature changed and isn't empty. The
19
+ * signature covers edits, a request settling with newer edits and a value becoming
20
+ * writable again, so each of those starts a save (issue 1553, rows S2, S5, D2).
27
21
  */
22
+ export declare function dueSchedulers(previous: SignatureMemory, values: readonly SchedulerValue[]): Readonly<{
23
+ memory: SignatureMemory;
24
+ due: readonly AutosaveType[];
25
+ }>;
26
+ /** Starts each scheduler's debounced save when its values may send something new. */
28
27
  export declare function useAutosaveTriggers({ uiStore, metadataAutosave, blockAutosave, linkedEntryAutosave, contentAutosave, hasRoute, enableTriggers, }: UseAutosaveTriggersProps): void;
29
28
  export {};
@@ -1,10 +1,14 @@
1
- import { type Dispatch, type SetStateAction } from 'react';
2
1
  import type { EditorUiStoreInstance } from '../ui/editorUiStore';
3
2
  import { type BlockedPublishPlan } from '../hooks/blockedPublishPlan';
4
3
  type VisibleBlockedPublishPlan = Extract<BlockedPublishPlan, {
5
4
  type: 'blocked';
6
5
  }>;
7
- export declare function useBlockedPublishPlan(uiStore: EditorUiStoreInstance, setErrorMessage: Dispatch<SetStateAction<string | null>>): readonly [
6
+ /**
7
+ * The publish-blocking plan a refused publish showed, kept current: it's re-derived on
8
+ * every block change and cleared once validation passes. The error banner reads its
9
+ * message while the `invalid-blocks` failure holds (row B5).
10
+ */
11
+ export declare function useBlockedPublishPlan(uiStore: EditorUiStoreInstance): readonly [
8
12
  VisibleBlockedPublishPlan | null,
9
13
  (plan: VisibleBlockedPublishPlan | null) => void
10
14
  ];
@@ -1,4 +1,4 @@
1
- import type { BlockItem } from '../../../editor-blocks/src/block-editor/types';
1
+ import type { BlockItem, ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
2
2
  import type { EditorUiState } from '../ui/editorUiStore';
3
3
  import type { ApiClient } from '../services';
4
4
  type StoreApi<T> = {
@@ -11,10 +11,10 @@ export declare function useBlocksList({ apiClient, uiStore, siteId, entryId, isP
11
11
  siteId: string;
12
12
  entryId: string;
13
13
  isPage: boolean;
14
- initialBlocks: BlockItem[];
14
+ initialBlocks: ServerBlockItem[];
15
15
  }): {
16
16
  blocksSlice: {
17
- list: BlockItem[];
17
+ list: import("../ui/editorSnapshot").NormalizedEditorBlockItem[];
18
18
  status: "idle";
19
19
  actions: {
20
20
  setList: (next: BlockItem[]) => void;
@@ -0,0 +1,21 @@
1
+ import type { ContentEditorServices } from '../services';
2
+ import type { PublishPageSurfaceResponse } from '../../../api/src/content-editor';
3
+ import type { RoutingHelpers } from '../../../content-model/src/index';
4
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
5
+ import type { AutosaveHandle } from '../ui/stores/types';
6
+ type ValueAutosaveInput = Readonly<{
7
+ services: ContentEditorServices;
8
+ uiStore: EditorUiStoreInstance;
9
+ delay: number;
10
+ routing?: RoutingHelpers;
11
+ onPublication?: (publication: Extract<PublishPageSurfaceResponse, {
12
+ publication: 'published';
13
+ }>) => void;
14
+ }>;
15
+ export declare function useEntryValueAutosaves(input: ValueAutosaveInput & {
16
+ isPage: boolean;
17
+ }): {
18
+ metadataAutosave: AutosaveHandle;
19
+ contentAutosave: AutosaveHandle;
20
+ };
21
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { BlockFieldExtensions } from '../../../editor-blocks/src/block-editor/blockDraftBaselineSeed';
2
+ import { type ContentEntrySnapshot, type RoutingHelpers } from '../../../content-model/src/index';
3
+ import { type EditorPublishedVersionScope } from '../ui/editorUiStore';
4
+ import type { ResolveBlockManifest } from '../ui/blockValidationView';
5
+ import { type EditorLeaseParticipation } from './editorLeaseParticipation';
6
+ import type { ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
7
+ type InitialEditorUiStoreOptions = Readonly<{
8
+ entry: ContentEntrySnapshot;
9
+ routing: RoutingHelpers;
10
+ hasRoute: boolean;
11
+ isPage: boolean;
12
+ publishedVersionScope: EditorPublishedVersionScope;
13
+ initialMetadataRevision: string | null;
14
+ resolveBlockManifest?: ResolveBlockManifest;
15
+ blockFieldExtensions?: BlockFieldExtensions | null;
16
+ initialBlocks: readonly ServerBlockItem[];
17
+ editLease: EditorLeaseParticipation;
18
+ }>;
19
+ /** Own store identity and synchronous metadata hydration together. */
20
+ export declare function useInitialEditorUiStore({ entry, routing, hasRoute, isPage, publishedVersionScope, initialMetadataRevision, resolveBlockManifest, editLease, blockFieldExtensions, initialBlocks, }: InitialEditorUiStoreOptions): {
21
+ uiStore: import("zustand").StoreApi<import("..").EditorUiState>;
22
+ hasHydratedContentRef: import("react").RefObject<boolean>;
23
+ };
24
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type RefObject } from 'react';
2
+ import type { ContentEntrySnapshot, RoutingHelpers } from '../../../content-model/src/index';
3
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
4
+ export declare function useMetadataReconciliation(input: Readonly<{
5
+ initialEntry?: ContentEntrySnapshot | null;
6
+ revision?: string | null;
7
+ routing: RoutingHelpers;
8
+ uiStore: EditorUiStoreInstance;
9
+ }>): void;
10
+ export declare function useContentReconciliation(input: Readonly<{
11
+ isPage: boolean;
12
+ initialContent?: Record<string, unknown> | null;
13
+ published?: Record<string, unknown> | null;
14
+ revision?: string | null;
15
+ hydratedRef: RefObject<boolean>;
16
+ uiStore: EditorUiStoreInstance;
17
+ }>): void;
@@ -3,7 +3,7 @@ import type { ApiClient } from '../../api/src/request';
3
3
  import type { FooterEditorTarget } from './footerComposer';
4
4
  import type { FooterNavigationLayoutAccess } from './useFooterNavigationLayout';
5
5
  export type FooterComposerPanelProps = Readonly<{
6
- apiClient: ApiClient;
6
+ apiClient: ApiClient<'getFooterComposition' | 'updateFooterComposition' | 'getPublicProfile' | 'updatePublicProfile' | 'getNavigationMenus' | 'getMailingListAuthoringContext' | 'listForms' | 'applySiteStyleSelection'>;
7
7
  siteId: string;
8
8
  customFooterMode: 'default' | 'blocks' | 'default+blocks' | 'none';
9
9
  manageLinksHref: string;
@@ -1,5 +1,9 @@
1
1
  import type { EditorUiStoreInstance } from '../ui/editorUiStore';
2
2
  import { type BlockedPublishPlan } from "./blockedPublishPlan";
3
+ /**
4
+ * Reveals and focuses what blocks publishing. The banner's message isn't set here: it
5
+ * derives from the recorded `invalid-blocks` failure and the current validation.
6
+ */
3
7
  export declare function applyBlockedPublishPlan(uiStore: EditorUiStoreInstance, plan: Extract<BlockedPublishPlan, {
4
8
  type: "blocked";
5
- }>, setErrorMessage: (message: string | null) => void): void;
9
+ }>): void;
@@ -1,48 +1,9 @@
1
1
  import type { BlockDraftSaveability } from "../../../block-form/src/blockDraftSaveability";
2
- import type { EditorBlockId } from "../../../core/src/index";
3
- import type { AutosaveStatusValue } from "../ui/stores/types";
4
- import type { EditorDraftSnapshot } from "../ui/editorHistory";
5
- type CurrentEditorDraftSnapshot = EditorDraftSnapshot & {
6
- current: NonNullable<EditorDraftSnapshot["current"]>;
7
- };
8
- export type BlockDraftLifecycle = Readonly<{
9
- kind: "baseline";
10
- blockId: EditorBlockId;
11
- }> | Readonly<{
12
- kind: "validPending";
13
- blockId: EditorBlockId;
14
- version: number;
15
- }> | Readonly<{
16
- kind: "invalidPending";
17
- blockId: EditorBlockId;
18
- issues: BlockDraftSaveability["issues"];
19
- }> | Readonly<{
20
- kind: "saving";
21
- blockId: EditorBlockId;
22
- version: number;
23
- }> | Readonly<{
24
- kind: "saveFailed";
25
- blockId: EditorBlockId;
26
- error: string;
27
- issues: BlockDraftSaveability["issues"];
28
- }>;
29
- export type BlockDraftAutosaveDecision = Readonly<{
30
- type: "save";
31
- blockId: EditorBlockId;
32
- data: Record<string, unknown>;
33
- acknowledgedVersion: number;
34
- }> | Readonly<{
35
- type: "skip";
36
- blockId: EditorBlockId;
37
- reason: "baseline" | "invalid" | "saving" | "saveFailed";
38
- }>;
39
- export declare function deriveBlockDraftLifecycle(input: Readonly<{
40
- snapshot: EditorDraftSnapshot;
41
- saveability: BlockDraftSaveability;
42
- autosaveStatus?: AutosaveStatusValue;
43
- }>): BlockDraftLifecycle;
44
- export declare function deriveBlockDraftAutosaveDecision(input: Readonly<{
45
- snapshot: CurrentEditorDraftSnapshot;
46
- lifecycle: BlockDraftLifecycle;
47
- }>): BlockDraftAutosaveDecision;
48
- export {};
2
+ /**
3
+ * Whether a block's values may be sent: validation found nothing blocking. A failed save
4
+ * with no validation issues is saveable again; whether it is retried now is `canSend`'s
5
+ * rule (issue 1553, rows S3 and S3b).
6
+ */
7
+ export declare function isBlockSaveable(saveability: BlockDraftSaveability): boolean;
8
+ /** The payload a block save sends: its values, unwrapped from a `data` envelope if present. */
9
+ export declare function blockSaveData(values: Record<string, unknown> | null): Record<string, unknown>;
@@ -0,0 +1,120 @@
1
+ import type { EditLeaseAcquireResult, EditLeaseToken, EditLeaseView } from '../../../core/src/index';
2
+ import type { EditorEditability } from '../controller/editorEditability';
3
+ export type LeaseFailure = 'unavailable' | 'invalid' | 'required' | 'forbidden' | 'not-found';
4
+ type Phase = Readonly<{
5
+ kind: 'idle';
6
+ }> | Readonly<{
7
+ kind: 'suspended';
8
+ }> | Readonly<{
9
+ kind: 'requesting';
10
+ id: number;
11
+ takingBack: boolean;
12
+ }> | Readonly<{
13
+ kind: 'refreshing' | 'confirming';
14
+ id: number;
15
+ takingBack: boolean;
16
+ token: EditLeaseToken;
17
+ }> | Readonly<{
18
+ kind: 'checking';
19
+ id: number;
20
+ takingBack: boolean;
21
+ priorToken: EditLeaseToken | null;
22
+ showing: Extract<EditorEditability, {
23
+ kind: 'read-only';
24
+ }> | null;
25
+ }> | Readonly<{
26
+ kind: 'editable';
27
+ id: number;
28
+ token: EditLeaseToken;
29
+ failures: number;
30
+ }> | Readonly<{
31
+ kind: 'held';
32
+ holder: Extract<EditLeaseView, {
33
+ kind: 'held-elsewhere';
34
+ }>['holder'];
35
+ }> | Readonly<{
36
+ kind: 'unavailable';
37
+ }> | Readonly<{
38
+ kind: 'fault';
39
+ reason: LeaseFailure;
40
+ }> | Readonly<{
41
+ kind: 'closed';
42
+ }>;
43
+ export type LeaseMachine = Readonly<{
44
+ phase: Phase;
45
+ nextId: number;
46
+ }>;
47
+ export type LeaseEvent = Readonly<{
48
+ kind: 'acquire';
49
+ takeover: boolean;
50
+ }> | Readonly<{
51
+ kind: 'recheck';
52
+ }> | Readonly<{
53
+ kind: 'lease-lost';
54
+ }> | Readonly<{
55
+ kind: 'grant';
56
+ id: number;
57
+ result: EditLeaseAcquireResult | LeaseFailure;
58
+ }> | Readonly<{
59
+ kind: 'view';
60
+ id: number;
61
+ result: EditLeaseView | LeaseFailure;
62
+ }> | Readonly<{
63
+ kind: 'refreshed';
64
+ id: number;
65
+ success: boolean;
66
+ }> | Readonly<{
67
+ kind: 'confirmed';
68
+ id: number;
69
+ result: 'mine' | LeaseFailure | 'lost';
70
+ }> | Readonly<{
71
+ kind: 'heartbeat';
72
+ id: number;
73
+ result: 'mine' | LeaseFailure | 'lost';
74
+ }> | Readonly<{
75
+ kind: 'tick';
76
+ }> | Readonly<{
77
+ kind: 'suspend';
78
+ }> | Readonly<{
79
+ kind: 'stop';
80
+ }>;
81
+ export type LeaseEffect = Readonly<{
82
+ kind: 'clear-discarded';
83
+ }> | Readonly<{
84
+ kind: 'request';
85
+ id: number;
86
+ takeover: boolean;
87
+ }> | Readonly<{
88
+ kind: 'read';
89
+ id: number;
90
+ }> | Readonly<{
91
+ kind: 'refresh';
92
+ id: number;
93
+ takingBack: boolean;
94
+ }> | Readonly<{
95
+ kind: 'confirm';
96
+ id: number;
97
+ token: EditLeaseToken;
98
+ }> | Readonly<{
99
+ kind: 'heartbeat';
100
+ id: number;
101
+ token: EditLeaseToken;
102
+ }> | Readonly<{
103
+ kind: 'release';
104
+ token: EditLeaseToken;
105
+ }> | Readonly<{
106
+ kind: 'fault';
107
+ reason: LeaseFailure;
108
+ }>;
109
+ export type LeaseStep = Readonly<{
110
+ state: LeaseMachine;
111
+ effects: readonly LeaseEffect[];
112
+ }>;
113
+ export declare function initialLeaseMachine(): LeaseMachine;
114
+ export declare function stepLease(state: LeaseMachine, event: LeaseEvent): LeaseStep;
115
+ /**
116
+ * The store editability a lease phase implies. A stopped session (`closed`) implies none:
117
+ * it no longer owns the store, so the host decides (preview hands it back to viewing).
118
+ */
119
+ export declare function leaseEditability(state: LeaseMachine): EditorEditability | null;
120
+ export {};
@@ -1,8 +1,7 @@
1
- import type { AutosaveStatus } from "../ui/stores/types";
2
1
  import type { EditorUnpublishedState } from "../controller/deriveEditorUnpublishedState";
3
2
  import { type BlockedPublishPlan } from "./blockedPublishPlan";
4
3
  import type { BlockValidationError } from "./validateBlocksForPublish";
5
- export type PublishDisabledReason = "noUnpublishedChanges" | "invalidBlocks" | "invalidBlockSummary" | "autosaveFailed";
4
+ export type PublishDisabledReason = "noUnpublishedChanges" | "invalidBlocks" | "invalidBlockSummary";
6
5
  export type PublishabilityPlan = Readonly<{
7
6
  kind: "allowed";
8
7
  canPublish: true;
@@ -27,12 +26,6 @@ export type PublishabilityPlan = Readonly<{
27
26
  type: "allowed";
28
27
  }>;
29
28
  }>;
30
- export type PublishabilityAutosaveState = Readonly<{
31
- metadata: AutosaveStatus;
32
- content: AutosaveStatus;
33
- blocks: AutosaveStatus;
34
- linkedEntries: AutosaveStatus;
35
- }>;
36
29
  export type DerivePublishabilityInput = Readonly<{
37
30
  unpublishedState: EditorUnpublishedState;
38
31
  validationErrors: readonly BlockValidationError[];
@@ -42,7 +35,10 @@ export type DerivePublishabilityInput = Readonly<{
42
35
  */
43
36
  hasInvalidBlockSummary?: boolean;
44
37
  drawerOpen: boolean;
45
- autosave?: PublishabilityAutosaveState;
46
- includeAutosaveFailures?: boolean;
47
38
  }>;
39
+ /**
40
+ * Block validation, focus and whether there's anything to publish. Whether the values
41
+ * can be saved first is the publish flush plan's decision (`selectPublishFlushPlan`),
42
+ * for the action and the toolbar alike (issue 1553, rows Q1–Q3).
43
+ */
48
44
  export declare function derivePublishability(input: DerivePublishabilityInput): PublishabilityPlan;
@@ -0,0 +1,3 @@
1
+ import type { AutosaveStatus, AutosaveType } from '../ui/stores/types';
2
+ /** The derived autosave status for one scheduler, or the whole document when none is given. */
3
+ export declare function useAutosaveStatus(scheduler?: AutosaveType): AutosaveStatus;
@@ -10,28 +10,18 @@ export type BlockAutosaveOptions = {
10
10
  siteId: string;
11
11
  /** Whether this entry has a route (pages have blocks, content entries don't) */
12
12
  hasRoute: boolean;
13
- owner: BlockAutosaveOwner;
14
13
  getExpectedMailingListProviderScope?: () => MailingListProviderScope | null;
15
14
  };
16
- export type BlockAutosaveOwner = Readonly<{
17
- kind: 'contentEntry';
18
- }> | Readonly<{
19
- kind: 'pageSurface';
20
- }>;
21
15
  export type BlockSaveRevisionPlan = Readonly<{
22
- kind: 'bestEffort';
23
- optimisticHash: string | null;
24
- }> | Readonly<{
25
16
  kind: 'compareAndSet';
26
17
  optimisticHash: string;
27
18
  }> | Readonly<{
28
19
  kind: 'missingRequiredRevision';
29
20
  }>;
30
- export declare function planBlockSaveRevisionForOwner(owner: BlockAutosaveOwner, optimisticHash: string | null): BlockSaveRevisionPlan;
21
+ export declare function planBlockSaveRevision(optimisticHash: string | null): BlockSaveRevisionPlan;
31
22
  /**
32
- * Hook to handle block autosave for pages.
33
- * Watches for pending block changes and debounces saves to the server.
34
- *
35
- * Only enabled for pages (hasRoute=true), as content entries don't have blocks.
23
+ * Block autosave for pages: the block family's adapter for `useValueAutosave`. Each
24
+ * block's request carries its own id, so one failure in a batch fails only that block
25
+ * (row K1). Only enabled for pages (hasRoute=true), as content entries don't have blocks.
36
26
  */
37
- export declare function useBlockAutosave({ uiStore, apiClient, siteId, hasRoute, owner, getExpectedMailingListProviderScope, }: BlockAutosaveOptions): import("./useSimpleAutosave").AutosaveHandle;
27
+ export declare function useBlockAutosave({ uiStore, apiClient, siteId, hasRoute, getExpectedMailingListProviderScope, }: BlockAutosaveOptions): import("../ui/editorUiStore").AutosaveHandle;