@riverbankcms/sdk 0.146.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 (466) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{PreviewEditorSidebar-kg2r2Fyi.mjs → PreviewEditorSidebar-DvEPG3Z2.mjs} +249 -172
  3. package/dist/{PreviewEditorUI-sWMLp5dT.mjs → PreviewEditorUI-D6eb6fkx.mjs} +68 -60
  4. package/dist/{PreviewQueryProvider-Cg51xq1w.mjs → PreviewQueryProvider-5znTyJuz.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-h2ti3Hch.mjs → SdkPreviewModeRuntime-DJ6utQ_R.mjs} +1180 -475
  6. package/dist/{SiteChromeCustomizeContext-DEACFH9m.mjs → SiteChromeCustomizeContext-CFJYh6vo.mjs} +199078 -193767
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +198 -33
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +18 -3
  9. package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
  10. package/dist/_dts/api/src/accountApi.d.ts +6 -6
  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 +16 -2
  25. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -13
  26. package/dist/_dts/api/src/bookingOperations.d.ts +6 -48
  27. package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
  28. package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
  29. package/dist/_dts/api/src/bookingRecords.d.ts +12 -49
  30. package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
  31. package/dist/_dts/api/src/bookings.d.ts +8 -7
  32. package/dist/_dts/api/src/calendar.d.ts +9 -9
  33. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -6
  34. package/dist/_dts/api/src/common/envelope.d.ts +2 -2
  35. package/dist/_dts/api/src/content-editor.d.ts +2 -2
  36. package/dist/_dts/api/src/contentEntries.d.ts +17 -48
  37. package/dist/_dts/api/src/contentRuntime.d.ts +51 -37
  38. package/dist/_dts/api/src/contentTypes.d.ts +11 -11
  39. package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +6 -6
  40. package/dist/_dts/api/src/documentLifecycle.d.ts +67 -0
  41. package/dist/_dts/api/src/domains.d.ts +16 -16
  42. package/dist/_dts/api/src/editLeaseEndpoints.d.ts +72 -0
  43. package/dist/_dts/api/src/emailSettings.d.ts +4 -4
  44. package/dist/_dts/api/src/endpoints.d.ts +725 -607
  45. package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
  46. package/dist/_dts/api/src/eventManagementContracts.d.ts +48 -8
  47. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -9
  48. package/dist/_dts/api/src/eventPageWords.d.ts +7 -12
  49. package/dist/_dts/api/src/footerSettings.d.ts +6 -6
  50. package/dist/_dts/api/src/index.d.ts +8 -6
  51. package/dist/_dts/api/src/indexCoreTypes.d.ts +2 -1
  52. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  53. package/dist/_dts/api/src/launchReadiness.d.ts +1 -6
  54. package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
  55. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
  56. package/dist/_dts/api/src/navigation.d.ts +5 -5
  57. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +15 -0
  58. package/dist/_dts/api/src/occurrenceScheduling.d.ts +19 -0
  59. package/dist/_dts/api/src/pageSurfaceEditorEndpoints.d.ts +55 -0
  60. package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +28 -7
  61. package/dist/_dts/api/src/pages.d.ts +7 -7
  62. package/dist/_dts/api/src/performance.d.ts +1 -1
  63. package/dist/_dts/api/src/public/index.d.ts +1 -1
  64. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +50 -0
  65. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
  66. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
  67. package/dist/_dts/api/src/redirects.d.ts +3 -3
  68. package/dist/_dts/api/src/request.d.ts +10 -1
  69. package/dist/_dts/api/src/resources.d.ts +4 -4
  70. package/dist/_dts/api/src/routes.d.ts +8 -3
  71. package/dist/_dts/api/src/sdk-event-upsert.d.ts +15 -1
  72. package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +21 -0
  73. package/dist/_dts/api/src/sdkContracts.d.ts +5 -28
  74. package/dist/_dts/api/src/sdkCourseBooking.d.ts +4 -4
  75. package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +1 -1
  76. package/dist/_dts/api/src/sdkEventOccurrenceRequestContracts.d.ts +43 -0
  77. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +4 -2
  78. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +8 -1
  79. package/dist/_dts/api/src/seo.d.ts +4 -4
  80. package/dist/_dts/api/src/services.d.ts +4 -4
  81. package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
  82. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +19 -25
  83. package/dist/_dts/api/src/siteMembers.d.ts +10 -10
  84. package/dist/_dts/api/src/siteOnboarding.d.ts +16 -14
  85. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -3
  86. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +5 -12
  87. package/dist/_dts/api/src/siteRuntimeEntry.d.ts +31 -0
  88. package/dist/_dts/billing/src/checkout/platform.d.ts +77 -0
  89. package/dist/_dts/billing/src/components/index.d.ts +25 -40
  90. package/dist/_dts/billing/src/membership/index.d.ts +1 -3
  91. package/dist/_dts/billing/src/plans/entitlements.d.ts +80 -0
  92. package/dist/_dts/billing/src/plans/registry.d.ts +16 -16
  93. package/dist/_dts/billing/src/plans/standing.d.ts +9 -2
  94. package/dist/_dts/billing/src/plans/types.d.ts +5 -15
  95. package/dist/_dts/billing/src/site-arrangements.d.ts +2 -2
  96. package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +2 -4
  97. package/dist/_dts/billing/src/subscriptions/store.d.ts +17 -11
  98. package/dist/_dts/block-form/src/backend/store-backend.d.ts +6 -7
  99. package/dist/_dts/block-form/src/backend/types.d.ts +7 -0
  100. package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -1
  101. package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
  102. package/dist/_dts/blocks/src/client/events.d.ts +3 -0
  103. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +24 -4
  104. package/dist/_dts/blocks/src/index.d.ts +1 -1
  105. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +18 -9
  106. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +4 -0
  107. package/dist/_dts/blocks/src/portal/types.d.ts +0 -2
  108. package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +2 -1
  109. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -1
  110. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +4 -4
  111. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +6 -1
  112. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
  113. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -2
  114. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  115. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +6 -0
  116. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +18 -0
  117. package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +6 -0
  118. package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +4 -0
  119. package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +4 -1
  120. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +36 -6
  121. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +18 -3
  122. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +11 -0
  123. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
  124. package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -1
  125. package/dist/_dts/blocks/src/system/runtime/hooks/usePolling.d.ts +7 -48
  126. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.checkout-return-context.d.ts +7 -0
  127. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +11 -0
  128. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +13 -0
  129. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +28 -0
  130. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
  131. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
  132. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.payment-confirmation.d.ts +13 -0
  133. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
  134. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
  135. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +17 -1
  136. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-actions.d.ts +8 -0
  137. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +9 -0
  138. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
  139. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +4 -0
  140. package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
  141. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
  142. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
  143. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +5 -0
  144. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +7 -1
  145. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
  146. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
  147. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +8 -0
  148. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +5 -5
  149. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
  150. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +18 -5
  151. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +6 -0
  152. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +37 -3
  153. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.client.d.ts +1 -1
  154. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +16 -1
  155. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.d.ts +13 -0
  156. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +5 -5
  157. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +2 -4
  158. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -14
  159. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +12 -0
  160. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
  161. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -0
  162. package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
  163. package/dist/_dts/blocks/src/system/runtime/shared/components/DemoBookingPortalAccess.d.ts +22 -0
  164. package/dist/_dts/blocks/src/system/runtime/shared/components/DemoPortalSignInLink.d.ts +4 -0
  165. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
  166. package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
  167. package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
  168. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoBookingPassStorage.d.ts +10 -0
  169. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
  170. package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
  171. package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
  172. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
  173. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
  174. package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -7
  175. package/dist/_dts/content-editor/src/controller/EditLeaseController.d.ts +39 -0
  176. package/dist/_dts/content-editor/src/controller/EditorWriteGate.d.ts +38 -0
  177. package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +25 -61
  178. package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseBanner.d.ts +7 -0
  179. package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseControllers.d.ts +14 -0
  180. package/dist/_dts/content-editor/src/controller/deriveEditorUnpublishedState.d.ts +6 -0
  181. package/dist/_dts/content-editor/src/controller/documentValueBaseline.d.ts +25 -0
  182. package/dist/_dts/content-editor/src/controller/editLeaseLossSignal.d.ts +6 -0
  183. package/dist/_dts/content-editor/src/controller/editLeaseNotice.d.ts +28 -0
  184. package/dist/_dts/content-editor/src/controller/editorClientId.d.ts +2 -0
  185. package/dist/_dts/content-editor/src/controller/editorEditability.d.ts +38 -0
  186. package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +34 -0
  187. package/dist/_dts/content-editor/src/controller/normalizedMetadataBaseline.d.ts +29 -0
  188. package/dist/_dts/content-editor/src/controller/pageSurfaceDocumentBaselines.d.ts +14 -0
  189. package/dist/_dts/content-editor/src/controller/pageSurfaceLifecycle.d.ts +11 -0
  190. package/dist/_dts/content-editor/src/controller/planDocumentBaselineRefresh.d.ts +19 -0
  191. package/dist/_dts/content-editor/src/controller/readDocumentLeaseBaselines.d.ts +19 -0
  192. package/dist/_dts/content-editor/src/controller/refreshDocumentLeaseBaseline.d.ts +12 -0
  193. package/dist/_dts/content-editor/src/controller/refreshLinkedEntry.d.ts +17 -0
  194. package/dist/_dts/content-editor/src/controller/replayRestoredEditorEffects.d.ts +2 -3
  195. package/dist/_dts/content-editor/src/controller/routeWrites.d.ts +26 -0
  196. package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +16 -17
  197. package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +6 -2
  198. package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +3 -3
  199. package/dist/_dts/content-editor/src/controller/useEntryValueAutosaves.d.ts +21 -0
  200. package/dist/_dts/content-editor/src/controller/useInitialEditorUiStore.d.ts +24 -0
  201. package/dist/_dts/content-editor/src/controller/useServerBaselineReconciliation.d.ts +17 -0
  202. package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +1 -1
  203. package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +5 -1
  204. package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +8 -47
  205. package/dist/_dts/content-editor/src/hooks/editLeaseMachine.d.ts +120 -0
  206. package/dist/_dts/content-editor/src/hooks/publishability.d.ts +6 -10
  207. package/dist/_dts/content-editor/src/hooks/useAutosaveStatus.d.ts +3 -0
  208. package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +5 -15
  209. package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +7 -5
  210. package/dist/_dts/content-editor/src/hooks/useEditLease.d.ts +28 -0
  211. package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +25 -39
  212. package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +17 -19
  213. package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +5 -8
  214. package/dist/_dts/content-editor/src/hooks/useValueAutosave.d.ts +64 -0
  215. package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +0 -7
  216. package/dist/_dts/content-editor/src/index.d.ts +26 -7
  217. package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +12 -0
  218. package/dist/_dts/content-editor/src/linkedEntries/owner.d.ts +9 -0
  219. package/dist/_dts/content-editor/src/liveDrafts/draftProjection.d.ts +66 -0
  220. package/dist/_dts/content-editor/src/liveDrafts/linkedSaveHandovers.d.ts +37 -0
  221. package/dist/_dts/content-editor/src/liveDrafts/remoteDraftOverlay.d.ts +113 -0
  222. package/dist/_dts/content-editor/src/liveDrafts/useLiveDrafts.d.ts +32 -0
  223. package/dist/_dts/content-editor/src/liveDrafts/useRetentionTicks.d.ts +7 -0
  224. package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +6 -0
  225. package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +1 -0
  226. package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +96 -19
  227. package/dist/_dts/content-editor/src/services/editorApiClient.d.ts +13 -0
  228. package/dist/_dts/content-editor/src/services/index.d.ts +2 -0
  229. package/dist/_dts/content-editor/src/services/pageSurfaceEditorServices.d.ts +23 -0
  230. package/dist/_dts/content-editor/src/sync/flushValues.d.ts +13 -0
  231. package/dist/_dts/content-editor/src/sync/lifecycleFailure.d.ts +51 -0
  232. package/dist/_dts/content-editor/src/sync/runLifecycle.d.ts +64 -0
  233. package/dist/_dts/content-editor/src/sync/schedulerValues.d.ts +27 -0
  234. package/dist/_dts/content-editor/src/sync/sendPlanning.d.ts +104 -0
  235. package/dist/_dts/content-editor/src/sync/valueSync.d.ts +114 -0
  236. package/dist/_dts/content-editor/src/ui/blockCollection.d.ts +8 -0
  237. package/dist/_dts/content-editor/src/ui/documentLifecycle.d.ts +18 -0
  238. package/dist/_dts/content-editor/src/ui/editorLeaseUiState.d.ts +7 -0
  239. package/dist/_dts/content-editor/src/ui/editorRefresh.d.ts +82 -0
  240. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +102 -127
  241. package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +1 -1
  242. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +126 -72
  243. package/dist/_dts/content-editor/src/ui/editorValueSnapshot.d.ts +18 -0
  244. package/dist/_dts/content-editor/src/ui/serverBlockAdmission.d.ts +26 -0
  245. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +16 -27
  246. package/dist/_dts/content-editor/src/ui/stores/blockVersionsStore.d.ts +24 -0
  247. package/dist/_dts/content-editor/src/ui/stores/linkedEntryLeaseStore.d.ts +54 -0
  248. package/dist/_dts/content-editor/src/ui/stores/linkedSaveHandoversStore.d.ts +11 -0
  249. package/dist/_dts/content-editor/src/ui/stores/remoteDraftsStore.d.ts +10 -0
  250. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +63 -3
  251. package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +2 -2
  252. package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +1 -1
  253. package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -4
  254. package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -4
  255. package/dist/_dts/content-model/src/definitions/shared.d.ts +11 -2
  256. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  257. package/dist/_dts/content-model/src/entry-slots/serializeAllowedBlocks.d.ts +2 -0
  258. package/dist/_dts/content-model/src/metadataConfig.d.ts +10 -38
  259. package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
  260. package/dist/_dts/content-model/src/types.d.ts +0 -1
  261. package/dist/_dts/core/src/block-content-identity.d.ts +49 -1
  262. package/dist/_dts/core/src/branded.d.ts +12 -0
  263. package/dist/_dts/core/src/currency-format.d.ts +8 -2
  264. package/dist/_dts/core/src/demo-lifecycle-status.d.ts +2 -2
  265. package/dist/_dts/core/src/demo-warm-pool-target.d.ts +8 -0
  266. package/dist/_dts/core/src/edit-lease.d.ts +55 -0
  267. package/dist/_dts/core/src/editor-state.d.ts +38 -13
  268. package/dist/_dts/core/src/editor-value-sync.d.ts +79 -0
  269. package/dist/_dts/core/src/html-entities.d.ts +6 -0
  270. package/dist/_dts/core/src/index.d.ts +5 -1
  271. package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
  272. package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
  273. package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -0
  274. package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
  275. package/dist/_dts/core/src/participants.d.ts +0 -38
  276. package/dist/_dts/core/src/uuid.d.ts +7 -5
  277. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +261 -175
  278. package/dist/_dts/editor/src/EditorProvider.d.ts +5 -0
  279. package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +14 -0
  280. package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +1 -0
  281. package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +0 -1
  282. package/dist/_dts/editor/src/index.d.ts +1 -1
  283. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +10 -9
  284. package/dist/_dts/editor-blocks/src/BlockForm.d.ts +1 -1
  285. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
  286. package/dist/_dts/editor-blocks/src/block-editor/BlockCardFrame.d.ts +1 -1
  287. package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +1 -1
  288. package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
  289. package/dist/_dts/editor-blocks/src/block-editor/applyExtendedFieldDefaults.d.ts +3 -4
  290. package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +4 -8
  291. package/dist/_dts/editor-blocks/src/block-editor/editorBlockItem.d.ts +23 -0
  292. package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +2 -7
  293. package/dist/_dts/editor-blocks/src/block-editor/hooks/applyBlockStructureChange.d.ts +4 -0
  294. package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +14 -5
  295. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +21 -19
  296. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -10
  297. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +8 -16
  298. package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +6 -16
  299. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +37 -9
  300. package/dist/_dts/editor-blocks/src/index.d.ts +2 -1
  301. package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +1 -1
  302. package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +1 -1
  303. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +1 -1
  304. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +1 -1
  305. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +3 -2
  306. package/dist/_dts/media-core/src/fileStorage.d.ts +4 -0
  307. package/dist/_dts/media-editor/src/context.d.ts +1 -1
  308. package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
  309. package/dist/_dts/media-editor/src/provider.d.ts +3 -2
  310. package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
  311. package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +3 -1
  312. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
  313. package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +8 -3
  314. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +10 -6
  315. package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +22 -2
  316. package/dist/_dts/preview-next/src/client/blocks/previewProjection/entryFieldRebinding.d.ts +13 -0
  317. package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +2 -1
  318. package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +11 -1
  319. package/dist/_dts/preview-next/src/client/blocks/renderPrecedence.d.ts +17 -0
  320. package/dist/_dts/preview-next/src/client/blocks/useLinkedSaveHandoverRetention.d.ts +20 -0
  321. package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
  322. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
  323. package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
  324. package/dist/_dts/preview-next/src/client/preview/PreviewAccessBanners.d.ts +7 -0
  325. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
  326. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +24 -14
  327. package/dist/_dts/preview-next/src/client/preview/PreviewLeaseEditingMode.d.ts +2 -0
  328. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -2
  329. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
  330. package/dist/_dts/preview-next/src/client/preview/previewCustomizeAutosave.d.ts +5 -0
  331. package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +3 -4
  332. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +1 -0
  333. package/dist/_dts/preview-next/src/client/preview/usePreviewCustomizeWorkflowState.d.ts +4 -0
  334. package/dist/_dts/realtime/src/client.d.ts +3 -0
  335. package/dist/_dts/realtime/src/draftChannel.d.ts +91 -0
  336. package/dist/_dts/realtime/src/drafts.d.ts +210 -0
  337. package/dist/_dts/realtime/src/index.d.ts +3 -0
  338. package/dist/_dts/realtime/src/leaseChangeSubscriptions.d.ts +8 -0
  339. package/dist/_dts/realtime/src/types.d.ts +113 -0
  340. package/dist/_dts/realtime/src/useDraftChannel.d.ts +34 -0
  341. package/dist/_dts/realtime/src/useSiteRealtimeReload.d.ts +27 -0
  342. package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -55
  343. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  344. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
  345. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  346. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -2
  347. package/dist/_dts/sdk/src/version.d.ts +1 -1
  348. package/dist/_dts/surfaces/src/index.d.ts +1 -0
  349. package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
  350. package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
  351. package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
  352. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  353. package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
  354. package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
  355. package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
  356. package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
  357. package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
  358. package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
  359. package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
  360. package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
  361. package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
  362. package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
  363. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
  364. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
  365. package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
  366. package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
  367. package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
  368. package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
  369. package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
  370. package/dist/_dts/ui/src/badge.d.ts +2 -1
  371. package/dist/_dts/ui/src/button.d.ts +1 -1
  372. package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
  373. package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
  374. package/dist/_dts/ui/src/combobox.d.ts +26 -1
  375. package/dist/_dts/ui/src/date-picker.d.ts +5 -8
  376. package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
  377. package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
  378. package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
  379. package/dist/_dts/ui/src/index.d.ts +4 -1
  380. package/dist/_dts/ui/src/native-select.d.ts +8 -0
  381. package/dist/_dts/ui/src/popover.d.ts +7 -1
  382. package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
  383. package/dist/_dts/ui/src/surface.d.ts +1 -1
  384. package/dist/client/{BookingConsentAgreement-BQKL045f.mjs → BookingMailingListNote-CzRt2dF_.mjs} +110 -97
  385. package/dist/client/{CheckboxChoice--W2n6yKs.mjs → CheckboxChoice-B33MqoUo.mjs} +1 -1
  386. package/dist/client/DemoBookingPortalAccess-mxqwap3f.mjs +344 -0
  387. package/dist/client/{EventCombined.client-BdRjVbhH.mjs → EventCombined.client-CDb11igO.mjs} +7 -7
  388. package/dist/client/{EventListing.client-DBxC6xOU.mjs → EventListing.client-EgYhzKPa.mjs} +2 -2
  389. package/dist/client/{LeafletStaticMap-mHEJKrTs.mjs → LeafletStaticMap-gtmtaA2b.mjs} +1 -1
  390. package/dist/client/{scrollToBlock-BNgaEUpo.mjs → TerminalPanel-DvNUP5ot.mjs} +77 -77
  391. package/dist/client/{ThemedButton-CE5KYT6z.mjs → ThemedButton-C7CeUJjW.mjs} +2 -2
  392. package/dist/client/{accordion-BEQNSptH.mjs → accordion-kjvt49rA.mjs} +1 -1
  393. package/dist/client/{bookingForm-AMr-s5vw.mjs → bookingForm-pbRZordh.mjs} +411 -141
  394. package/dist/client/bookings.mjs +966 -396
  395. package/dist/client/{carousel-Bbt_QgJy.mjs → carousel-f4Zbmicv.mjs} +2 -2
  396. package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
  397. package/dist/client/{cart-CnWi30zJ.mjs → cart-DO20An50.mjs} +3 -3
  398. package/dist/client/{checkout-f3nkWgd4.mjs → checkout-Du5amDR_.mjs} +3 -3
  399. package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
  400. package/dist/client/client.mjs +3837 -2202
  401. package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
  402. package/dist/client/{context-Bc8T6pCe.mjs → context-eW97E945.mjs} +4 -3
  403. package/dist/client/{dates-DUsCEzLb.mjs → dates-jPCirRea.mjs} +56 -11
  404. package/dist/client/{eventCalendar-CKwgXui5.mjs → eventCalendar-C2M-iE4j.mjs} +10 -10
  405. package/dist/client/{eventCombined-CBAOSTGR.mjs → eventCombined-W6ns3LHg.mjs} +4 -4
  406. package/dist/client/{eventDetails-Dh-_WiBD.mjs → eventDetails-CR-GT0f0.mjs} +4 -4
  407. package/dist/client/{eventListing-CA3frIH5.mjs → eventListing-BK8AfYZz.mjs} +4 -4
  408. package/dist/client/{eventRegistration-BHtsgdcg.mjs → eventRegistration-BJSd4KUu.mjs} +461 -266
  409. package/dist/client/{form-C2h3YAcg.mjs → form-BvpfbQaT.mjs} +5 -5
  410. package/dist/client/{headerSection-lwMuMTH9.mjs → headerSection-I5sUQ8x-.mjs} +3 -3
  411. package/dist/client/hooks.mjs +909 -163
  412. package/dist/client/{locationMap-DJ2bLODV.mjs → locationMap-BLvwf9_f.mjs} +4 -4
  413. package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
  414. package/dist/client/{media-BtJ37tzS.mjs → media-Cl38iOMI.mjs} +11 -4
  415. package/dist/client/{newsletterForm-8Pu5K32g.mjs → newsletterForm-DrQ2weE8.mjs} +6 -6
  416. package/dist/client/{pricing-HHx3IgBz.mjs → pricing-BES87mrR.mjs} +1 -1
  417. package/dist/client/{productDetail-C_1odnAf.mjs → productDetail-Url9jcc5.mjs} +3 -3
  418. package/dist/client/{productList-CtCv-Nmx.mjs → productList-DE7ngEZJ.mjs} +3 -3
  419. package/dist/client/{propsDecoder-Dcgsncxb.mjs → propsDecoder-D1OtGXDV.mjs} +140 -22
  420. package/dist/client/rendering/client.mjs +2366 -997
  421. package/dist/client/rendering/islands.mjs +19 -19
  422. package/dist/client/rendering.mjs +4607 -2884
  423. package/dist/client/{routeIslandApiConfig-CWLP7wu3.mjs → routeIslandApiConfig-BG9Y-SHg.mjs} +1 -1
  424. package/dist/client/{shop-DQXrQ8kJ.mjs → shop-CJkuySJ3.mjs} +126 -79
  425. package/dist/client/{shop-commerce-B88zmWWo.mjs → shop-commerce-4rKj5n9h.mjs} +26 -14
  426. package/dist/client/{shop-commerce-store-DtSfkKuX.mjs → shop-commerce-store-Bxm75Pg6.mjs} +1 -1
  427. package/dist/client/{shopShared-cuaONpkJ.mjs → shopShared-DpoQDWfz.mjs} +5 -5
  428. package/dist/client/{useEventFilters-Bukew6Gb.mjs → useEventFilters-D8HliSqR.mjs} +33 -18
  429. package/dist/preview-next/before-render.mjs +314 -133
  430. package/dist/preview-next/client/runtime.mjs +4 -4
  431. package/dist/preview-next/editor-base.css +53 -2
  432. package/dist/preview-next/editor-chrome.css +7 -4
  433. package/dist/preview-next/keepAlive.mjs +314 -133
  434. package/dist/preview-next/middleware.mjs +314 -133
  435. package/dist/{previewAuthStore-h5IgbSp4.mjs → previewAuthStore-BXXF3hhW.mjs} +316 -133
  436. package/dist/{sdk-runtime-DTc1uIXn.mjs → sdk-runtime-C2a05WjL.mjs} +2 -2
  437. package/dist/{separator-BpHS1KZK.mjs → separator-CuNhBAhS.mjs} +1 -1
  438. package/dist/server/components.mjs +6888 -6157
  439. package/dist/server/config-validation.mjs +931 -199
  440. package/dist/server/config.mjs +931 -199
  441. package/dist/server/data.mjs +929 -198
  442. package/dist/server/index.mjs +317 -134
  443. package/dist/server/navigation.mjs +13 -2
  444. package/dist/server/next.mjs +5003 -4340
  445. package/dist/server/page-converter.mjs +160 -78
  446. package/dist/server/prebuild.mjs +1 -1
  447. package/dist/server/rendering/server.mjs +6421 -5687
  448. package/dist/server/rendering.mjs +7683 -6933
  449. package/dist/server/routing.mjs +1035 -338
  450. package/dist/server/server.mjs +946 -256
  451. package/dist/server/theme-bridge.mjs +66 -17
  452. package/dist/server/theme.mjs +5 -1
  453. package/dist/styles/index.css +32 -4
  454. package/package.json +1 -1
  455. package/dist/_dts/billing/src/plans/display.d.ts +0 -15
  456. package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +0 -4
  457. package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +0 -16
  458. package/dist/_dts/content-editor/src/controller/driver.d.ts +0 -14
  459. package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +0 -7
  460. package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +0 -29
  461. package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +0 -26
  462. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +0 -64
  463. package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +0 -48
  464. package/dist/_dts/content-editor/src/types.d.ts +0 -44
  465. package/dist/_dts/core/src/participant-identity.d.ts +0 -135
  466. package/dist/client/DiscountCodeDisclosure-CsOtjFY7.mjs +0 -137
@@ -0,0 +1,18 @@
1
+ import { type EditorBlockValues, type EditorContentValues, type EditorMetadataValues, type EditorValueRecord, type ValueSync } from '../../../core/src/index';
2
+ /**
3
+ * One editor value: its sync state (baseline, local intent and request) plus the
4
+ * published baseline. `version` counts changes for history, subscriptions and publish
5
+ * reconciliation; it is never a save acknowledgement.
6
+ */
7
+ export type EditorValueSnapshot<TValue extends EditorValueRecord | null> = Readonly<{
8
+ version: number;
9
+ sync: ValueSync<TValue>;
10
+ publishedBaseline: TValue;
11
+ }>;
12
+ export type EditorBrandedValues = EditorMetadataValues | EditorContentValues | EditorBlockValues;
13
+ export type NullableEditorValues<TValue extends EditorBrandedValues> = TValue | null;
14
+ export declare function createValueSnapshot<TValue extends EditorBrandedValues>(): EditorValueSnapshot<NullableEditorValues<TValue>>;
15
+ type ValueSnapshotUpdates<TValue extends EditorValueRecord | null> = Partial<Pick<EditorValueSnapshot<TValue>, 'sync' | 'publishedBaseline'>>;
16
+ /** Applies updates, bumping `version` only when something changed. */
17
+ export declare function updateValueSnapshot<TValue extends EditorValueRecord | null>(snapshot: EditorValueSnapshot<TValue>, updates: ValueSnapshotUpdates<TValue>): EditorValueSnapshot<TValue>;
18
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { EditorBlockId, EditorBlockVersions } from '../../../core/src/index';
2
+ import { type BlockFieldExtensions } from '../../../editor-blocks/src/block-editor/blockDraftBaselineSeed';
3
+ import type { ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
4
+ import type { RefreshPolicy } from '../sync/valueSync';
5
+ import type { EditorHistorySnapshot } from './editorSnapshot';
6
+ export type ServerBlockAdmission = Readonly<{
7
+ block: ServerBlockItem;
8
+ action: 'reconcile' | 'replace';
9
+ }>;
10
+ /** Seed preparation and the request-aware refresh reducer are the sole draft admission transition. */
11
+ export declare function prepareServerBlockAdmissions(entries: readonly ServerBlockAdmission[], extensions?: BlockFieldExtensions | null): {
12
+ action: "replace" | "reconcile";
13
+ seed: Readonly<{
14
+ blockId: EditorBlockId;
15
+ baseline: import("../../../core/src/index").EditorBlockBaselineInput;
16
+ initMeta: import("../../../core/src/index").EditorDraftBlockInitMetaInput;
17
+ refreshMeta: import("../../../core/src/index").EditorDraftBlockBaselineUpdateMetaInput;
18
+ }>;
19
+ versions: Readonly<{
20
+ draftContentId: import("../../../core/src/index").ContentVersionId | null;
21
+ publishedPlacement: import("../../../core/src/index").PublishedBlockPlacementRead;
22
+ }>;
23
+ }[];
24
+ export declare function admitBlockDrafts(snapshot: EditorHistorySnapshot, entries: ReturnType<typeof prepareServerBlockAdmissions>, policy?: RefreshPolicy): EditorHistorySnapshot;
25
+ /** History can restore admitted blocks; it cannot invent server identity. */
26
+ export declare function assertAdmittedDrafts(previous: EditorHistorySnapshot, next: EditorHistorySnapshot, requireVersions: (id: EditorBlockId) => EditorBlockVersions): void;
@@ -1,36 +1,25 @@
1
1
  /**
2
- * Autosave slice for managing autosave status and handle registration.
3
- *
4
- * This slice is critical for the publish workflow:
5
- * 1. Autosave hooks register handles via registerAutosave()
6
- * 2. Before publish, saveNow() / flushAllPending() may be called to ensure all changes are saved
7
- * 3. useEntryActions waits for all saves to complete via status subscriptions
2
+ * The autosave handle registry. Each scheduler registers its handle; `flushValues`
3
+ * is the one waiter for "saved before X" (publish, Save draft, slot switches, generated
4
+ * icons) and asks the handles to send through `sendRequests`. Status isn't stored here:
5
+ * it's derived from the values (`selectAutosaveStatus`, issue 1553).
8
6
  */
9
- import type { AutosaveStatus, AutosaveHandle, AutosaveType } from './types';
7
+ import type { FlushPolicy, FlushRequest, FlushResult, SendAcknowledgement } from '../../sync/sendPlanning';
8
+ import type { FlushOptions } from '../../sync/flushValues';
9
+ import type { AutosaveHandle, AutosaveType } from './types';
10
10
  export type AutosaveState = {
11
- metadata: AutosaveStatus;
12
- content: AutosaveStatus;
13
- blocks: AutosaveStatus;
14
- linkedEntries: AutosaveStatus;
15
- setMetadataStatus: (status: Partial<AutosaveStatus>) => void;
16
- setContentStatus: (status: Partial<AutosaveStatus>) => void;
17
- setBlocksStatus: (status: Partial<AutosaveStatus>) => void;
18
- setLinkedEntriesStatus: (status: Partial<AutosaveStatus>) => void;
19
11
  registerAutosave: (type: AutosaveType, handle: AutosaveHandle) => void;
20
12
  unregisterAutosave: (type: AutosaveType) => void;
21
- /**
22
- * Immediately saves the given autosave types by triggering and flushing their handles.
23
- *
24
- * Unlike flushAllPending(), this does not rely on a debounced callback being pending, so it
25
- * works for manual-save mode where background triggers are disabled.
26
- */
27
- saveNow: (types: AutosaveType[]) => Promise<void>;
28
- flushAllPending: () => void;
13
+ registeredSchedulers: () => readonly AutosaveType[];
14
+ /** Sends each request's values in its scheduler's next batch; resolves once the batches finish. */
15
+ sendRequests: (requests: readonly FlushRequest[]) => Promise<readonly SendAcknowledgement[]>;
16
+ /** Resolves once the values in scope are saved, or can't be (`planFlush`). */
17
+ flushValues: (policy: FlushPolicy, options?: FlushOptions) => Promise<FlushResult>;
18
+ cancelPending: (scheduler: AutosaveType) => void;
29
19
  cancelAllPending: () => void;
30
20
  };
31
21
  /**
32
- * Creates the autosave slice for managing autosave status and handles.
33
- *
34
- * @param triggerUpdate - Callback to trigger React re-renders
22
+ * Creates the autosave registry. `flush` is the store-bound `flushValues`; the registry
23
+ * holds no status of its own.
35
24
  */
36
- export declare function createAutosaveSlice(triggerUpdate: () => void): AutosaveState;
25
+ export declare function createAutosaveSlice(flush: (policy: FlushPolicy, options?: FlushOptions) => Promise<FlushResult>): AutosaveState;
@@ -0,0 +1,24 @@
1
+ import { type EditorBlockId, type EditorBlockVersions, type EditorBlockVersionsEntry, type SavedBlockContentVersion } from '../../../../core/src/index';
2
+ /**
3
+ * Server versions per block. Server-owned, so this lives outside undo history:
4
+ * undoing an edit never brings back an id the server has already replaced.
5
+ */
6
+ export type BlockVersionsState = Readonly<{
7
+ revision: number;
8
+ /** Null for blocks not admitted to this editor. */
9
+ get: (blockId: EditorBlockId) => EditorBlockVersions | null;
10
+ require: (blockId: EditorBlockId) => EditorBlockVersions;
11
+ set: (entries: readonly EditorBlockVersionsEntry[]) => void;
12
+ applySaved: (blockId: EditorBlockId, saved: SavedBlockContentVersion) => void;
13
+ }>;
14
+ type BlockVersionsSnapshot = Readonly<{
15
+ byId: ReadonlyMap<EditorBlockId, EditorBlockVersions>;
16
+ revision: number;
17
+ }>;
18
+ export declare function withBlockVersions(snapshot: BlockVersionsSnapshot, entries: readonly EditorBlockVersionsEntry[]): BlockVersionsSnapshot;
19
+ /** Internal record operation lets the editor commit versions and drafts before notifying. */
20
+ export declare function createBlockVersionsSlice(triggerUpdate: () => void): Readonly<{
21
+ state: BlockVersionsState;
22
+ record: (entries: readonly EditorBlockVersionsEntry[]) => boolean;
23
+ }>;
24
+ export {};
@@ -0,0 +1,54 @@
1
+ import type { ApiClient } from '../../../../api/src/request';
2
+ import type { DraftTarget } from '../../../../realtime/src/index';
3
+ import { type EditorEditability } from '../../controller/editorEditability';
4
+ export type LinkedEntryLeaseBinding = Readonly<{
5
+ contentTypeKey: string;
6
+ apiClient: ApiClient;
7
+ takeOver: () => void;
8
+ retry: () => void;
9
+ }>;
10
+ export type LinkedEntryLeaseSession = LinkedEntryLeaseBinding & (Readonly<{
11
+ kind: 'linked';
12
+ editability: EditorEditability;
13
+ discarded: boolean;
14
+ }> | Readonly<{
15
+ kind: 'parent';
16
+ }>);
17
+ type WriteAuthorityState = Pick<LinkedEntryLeaseState, 'linkedEntryLeases'> & Readonly<{
18
+ editability: EditorEditability;
19
+ }>;
20
+ type LeaseOwnerState = Pick<LinkedEntryLeaseState, 'linkedEntryLeases'> & Readonly<{
21
+ editability: EditorEditability;
22
+ leaseDiscardedChanges: boolean;
23
+ }>;
24
+ export declare function readLinkedEntryLease(state: LeaseOwnerState, entryId: string): (Readonly<{
25
+ contentTypeKey: string;
26
+ apiClient: ApiClient;
27
+ takeOver: () => void;
28
+ retry: () => void;
29
+ }> & Readonly<{
30
+ kind: "linked";
31
+ editability: EditorEditability;
32
+ discarded: boolean;
33
+ }>) | {
34
+ editability: EditorEditability;
35
+ discarded: boolean;
36
+ contentTypeKey: string;
37
+ apiClient: ApiClient;
38
+ takeOver: () => void;
39
+ retry: () => void;
40
+ kind: "parent";
41
+ } | undefined;
42
+ export type LinkedEntryLeaseState = {
43
+ linkedEntryLeases: Readonly<Record<string, LinkedEntryLeaseSession | undefined>>;
44
+ registerLinkedEntryLease: (entryId: string, binding: LinkedEntryLeaseBinding, kind: LinkedEntryLeaseSession['kind']) => void;
45
+ setLinkedEntryLease: (entryId: string, session: LinkedEntryLeaseSession | undefined) => void;
46
+ };
47
+ export declare function createLinkedEntryLeaseSlice(set: (update: (state: LinkedEntryLeaseState) => Partial<LinkedEntryLeaseState>) => void): LinkedEntryLeaseState;
48
+ export declare function canWriteLinkedEntry(state: WriteAuthorityState, entryId: string): boolean;
49
+ /**
50
+ * Per-item write authority, shared by autosave and the live-drafts projection: the
51
+ * document's own values follow the document lease; a linked entry follows its own.
52
+ */
53
+ export declare function canWriteDraftTarget(state: WriteAuthorityState, target: DraftTarget): boolean;
54
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type LinkedSaveHandovers } from '../../liveDrafts/linkedSaveHandovers';
2
+ /**
3
+ * This tab's accepted linked-entry saves, handing over to the rendered data (issue 1553, D).
4
+ * Outside history, snapshots and autosave, beside `remoteDrafts`: `settle` records them,
5
+ * and the renderer's retention replaces the map as they drop.
6
+ */
7
+ export type LinkedSaveHandoversState = {
8
+ linkedSaveHandovers: LinkedSaveHandovers;
9
+ setLinkedSaveHandovers: (handovers: LinkedSaveHandovers) => void;
10
+ };
11
+ export declare function createLinkedSaveHandoversSlice(set: (update: (state: LinkedSaveHandoversState) => Partial<LinkedSaveHandoversState>) => void): LinkedSaveHandoversState;
@@ -0,0 +1,10 @@
1
+ import { type RemoteDraftOverlay } from '../../liveDrafts/remoteDraftOverlay';
2
+ /**
3
+ * Read-only overlay of another tab's live drafts (issue 1545). Deliberately outside
4
+ * history, snapshots, autosave and linked-entry save inputs: only the renderer reads it.
5
+ */
6
+ export type RemoteDraftsState = {
7
+ remoteDrafts: RemoteDraftOverlay;
8
+ setRemoteDrafts: (overlay: RemoteDraftOverlay) => void;
9
+ };
10
+ export declare function createRemoteDraftsSlice(set: (update: (state: RemoteDraftsState) => Partial<RemoteDraftsState>) => void): RemoteDraftsState;
@@ -1,17 +1,77 @@
1
- import type { EditorBlockId } from '../../../../core/src/index';
1
+ import type { EditorBlockId, SendId } from '../../../../core/src/index';
2
+ import type { FlushCheckpoint, SendAcknowledgement } from '../../sync/sendPlanning';
3
+ import type { EditorValueKey } from '../editorSnapshot';
2
4
  export type AutosaveStatusValue = 'idle' | 'saving' | 'success' | 'error';
3
5
  export type AutosaveStatus = {
4
6
  status: AutosaveStatusValue;
5
7
  lastSavedAt: string | null;
6
8
  hasFailedSaves: boolean;
7
9
  };
10
+ /**
11
+ * One autosave scheduler's handle. `sendNow` sends the given values in the scheduler's
12
+ * next batch, retrying failures explicitly, alongside anything the background would send.
13
+ */
8
14
  export type AutosaveHandle = {
9
15
  trigger: () => void;
10
- cancel?: () => void;
11
- flush: () => void | Promise<void>;
16
+ cancel: () => void;
17
+ flush: () => Promise<void>;
12
18
  isPending: () => boolean;
19
+ sendNow: (keys: readonly EditorValueKey[], checkpoints?: readonly FlushCheckpoint[], signal?: AbortSignal) => Promise<readonly SendAcknowledgement[]>;
13
20
  };
14
21
  export type AutosaveType = 'metadata' | 'content' | 'blocks' | 'linkedEntries';
22
+ /**
23
+ * Operations that write the document's route or draft on the server; while one's request
24
+ * is out, the document's values are held (issue 1553, B-ownership).
25
+ */
26
+ export type HeldOperation = 'publish' | 'schedule' | 'cancel-schedule' | 'discard-draft' | 'delete';
27
+ /** Operations on the whole document; their status sits beside the values' (issue 1553). */
28
+ export type LifecycleOperation = 'save-draft' | 'restore-replay' | HeldOperation;
29
+ /**
30
+ * Why an operation didn't happen. `server` is a refused request; the others are refusals
31
+ * before any request: values whose saves failed, values that can't be sent (not writable
32
+ * or not saveable), and blocks that fail publish validation.
33
+ */
34
+ export type LifecycleFailure = Readonly<{
35
+ kind: 'server';
36
+ message: string;
37
+ }> | Readonly<{
38
+ kind: 'values-failed';
39
+ ids: readonly SendId[];
40
+ }> | Readonly<{
41
+ kind: 'values-blocked';
42
+ keys: readonly EditorValueKey[];
43
+ }> | Readonly<{
44
+ kind: 'invalid-blocks';
45
+ }>;
46
+ /**
47
+ * A failed status records the failure and how many saves had been accepted when it
48
+ * failed, so whether it still holds is derived (`activeFailure`) rather than cleared.
49
+ * `holding` is a held operation whose request is out (or about to be): the document's
50
+ * values aren't sent until it ends, and edits typed meanwhile wait (`schedulerValues`).
51
+ */
52
+ export type LifecycleStatus = Readonly<{
53
+ kind: 'idle';
54
+ }> | Readonly<{
55
+ kind: 'running';
56
+ operation: LifecycleOperation;
57
+ }> | Readonly<{
58
+ kind: 'holding';
59
+ operation: HeldOperation;
60
+ }> | Readonly<{
61
+ kind: 'failed';
62
+ operation: LifecycleOperation;
63
+ failure: LifecycleFailure;
64
+ acceptedSaves: number;
65
+ }>;
66
+ /** What a lifecycle action tells its caller. Expected refusals are results, not throws. */
67
+ export type LifecycleOutcome = Readonly<{
68
+ kind: 'done';
69
+ }> | Readonly<{
70
+ kind: 'no-changes';
71
+ }> | Readonly<{
72
+ kind: 'failed';
73
+ failure: LifecycleFailure;
74
+ }>;
15
75
  export type FocusSettingsTab = 'display' | 'behavior' | 'style';
16
76
  export type FocusTarget = Readonly<{
17
77
  kind: 'block';
@@ -1,12 +1,12 @@
1
1
  import { type FooterCompositionSnapshot, type PublicProfileSnapshot } from '../../api/src/footer-settings';
2
- import type { ApiClient } from '../../api/src/request';
2
+ import type { FooterComposerPanelProps } from './footerComposerPanelTypes';
3
3
  import { type FooterCompositionV1, type PublicProfile } from '../../core/src/index';
4
4
  import type { FooterEditorTarget } from './footerComposer';
5
5
  import { type FooterNavigationLayoutAccess } from './useFooterNavigationLayout';
6
6
  export type SaveState = 'idle' | 'saving' | 'saved' | 'conflict' | 'failed';
7
7
  export type CompositionSaveOutcome = 'saved' | 'conflict' | 'failed';
8
8
  type FooterComposerStateOptions = Readonly<{
9
- apiClient: ApiClient;
9
+ apiClient: FooterComposerPanelProps['apiClient'];
10
10
  canEdit: boolean;
11
11
  initialTarget?: FooterEditorTarget;
12
12
  initialTargetRequestId?: number;
@@ -11,7 +11,7 @@ export type FooterNavigationLayoutAccess = Readonly<{
11
11
  selectionVersion: number;
12
12
  }>;
13
13
  export declare function useFooterNavigationLayout({ apiClient, siteId, access, onSaved, onSaveStateChange, onMessageChange, }: Readonly<{
14
- apiClient: ApiClient;
14
+ apiClient: ApiClient<'applySiteStyleSelection'>;
15
15
  siteId: string;
16
16
  access: FooterNavigationLayoutAccess;
17
17
  onSaved?: () => void;
@@ -58,18 +58,18 @@ export declare const EVENT_CONTENT_TYPE_SCHEMA: {
58
58
  readonly id: "summary";
59
59
  readonly type: "textarea";
60
60
  readonly label: "Short introduction";
61
- readonly description: "Write one or two sentences that help people quickly understand what this is. It appears wherever the event is listed and near the top of its page.";
61
+ readonly description: "Shown in your listings and search results, and at the top of its page.";
62
62
  readonly rows: 3;
63
63
  }, {
64
64
  readonly id: "image";
65
65
  readonly type: "media";
66
66
  readonly label: "Event image";
67
- readonly description: "Choose the main image people will see wherever the event is listed and on its page.";
67
+ readonly description: "At the top of its page and beside it in your listings.";
68
68
  }, {
69
69
  readonly id: "body";
70
70
  readonly type: "richText";
71
- readonly label: "About this event";
72
- readonly description: "Add the main information people need before booking—what to expect, who it’s for, what’s included, and anything they should bring or know.";
71
+ readonly label: "Full description";
72
+ readonly description: "The main text on its page, under the introduction.";
73
73
  }];
74
74
  readonly routing: {
75
75
  readonly enabled: true;
@@ -161,18 +161,18 @@ export declare const BUILTIN_CONTENT_TYPE_SCHEMAS: {
161
161
  readonly id: "summary";
162
162
  readonly type: "textarea";
163
163
  readonly label: "Short introduction";
164
- readonly description: "Write one or two sentences that help people quickly understand what this is. It appears wherever the event is listed and near the top of its page.";
164
+ readonly description: "Shown in your listings and search results, and at the top of its page.";
165
165
  readonly rows: 3;
166
166
  }, {
167
167
  readonly id: "image";
168
168
  readonly type: "media";
169
169
  readonly label: "Event image";
170
- readonly description: "Choose the main image people will see wherever the event is listed and on its page.";
170
+ readonly description: "At the top of its page and beside it in your listings.";
171
171
  }, {
172
172
  readonly id: "body";
173
173
  readonly type: "richText";
174
- readonly label: "About this event";
175
- readonly description: "Add the main information people need before booking—what to expect, who it’s for, what’s included, and anything they should bring or know.";
174
+ readonly label: "Full description";
175
+ readonly description: "The main text on its page, under the introduction.";
176
176
  }];
177
177
  readonly routing: {
178
178
  readonly enabled: true;
@@ -69,8 +69,6 @@ type EnsureRecord<T extends Record<string, unknown>> = T;
69
69
  export type RoutableMetadataValues = EnsureRecord<{
70
70
  draftTitle: string;
71
71
  draftSlug: string;
72
- draftStatus: string;
73
- scheduledPublishAt: string | null;
74
72
  draftMetaTitle: string | null;
75
73
  draftMetaDescription: string | null;
76
74
  ogImageId: string | null;
@@ -87,6 +85,17 @@ export declare function createMetadataStateFromSnapshot(snapshot: ContentEntrySn
87
85
  values: RoutableMetadataValues | Record<string, never>;
88
86
  baseline: RoutableMetadataValues | Record<string, never>;
89
87
  };
88
+ /**
89
+ * The route's lifecycle fields as the editor reads them: from the entry snapshot, never
90
+ * from metadata values (issue 1553, FO2). Lifecycle operations (publish, schedule,
91
+ * cancel, discard) own them; forms get them read-only, e.g. slug auto-generation's
92
+ * `statusFieldId`. Non-routable content has none.
93
+ */
94
+ export type RouteLifecycleContext = Readonly<{
95
+ draftStatus: string;
96
+ scheduledPublishAt: string | null;
97
+ }>;
98
+ export declare function routeLifecycleContext(snapshot: ContentEntrySnapshot): RouteLifecycleContext | null;
90
99
  /**
91
100
  * Extract published metadata values from a snapshot.
92
101
  * Used to set the publishedBaseline for unpublished changes detection.
@@ -1,2 +1,3 @@
1
1
  export * from './types';
2
+ export * from './serializeAllowedBlocks';
2
3
  export * from './sdkBlocks';
@@ -0,0 +1,2 @@
1
+ import type { EntrySlotAllowedBlocks, EntrySlotDefinition } from './types';
2
+ export declare function serializeEntrySlotAllowedBlocks(definition: EntrySlotDefinition): EntrySlotAllowedBlocks;
@@ -33,7 +33,7 @@ export type RouteMetadataPresentation = Readonly<{
33
33
  manifest: RouteMetadataManifest;
34
34
  typeKey: string | null;
35
35
  }>;
36
- export type RouteMetadataFieldId = "draftTitle" | "draftSlug" | "draftStatus" | "scheduledPublishAt" | "draftMetaTitle" | "draftMetaDescription" | "ogImageId";
36
+ export type RouteMetadataFieldId = "draftTitle" | "draftSlug" | "draftMetaTitle" | "draftMetaDescription" | "ogImageId";
37
37
  type RouteMetadataTextField = {
38
38
  id: "draftTitle" | "draftMetaTitle" | "draftMetaDescription" | "ogImageId";
39
39
  type: "text";
@@ -54,39 +54,17 @@ type RouteMetadataSlugField = {
54
54
  description: string;
55
55
  required: true;
56
56
  sourceFieldId?: "draftTitle";
57
+ /**
58
+ * Auto-generation runs only while this reads "draft". It isn't a metadata value: the
59
+ * form backend supplies it read-only from the entry snapshot (`routeLifecycleContext`).
60
+ */
57
61
  statusFieldId: "draftStatus";
58
62
  maxLength: number;
59
63
  ui: {
60
64
  showSlugPreview: true;
61
65
  };
62
66
  };
63
- type RouteMetadataSelectField = {
64
- id: "draftStatus";
65
- type: "select";
66
- label: string;
67
- description: string;
68
- required: true;
69
- defaultValue: string;
70
- options: Array<{
71
- value: string;
72
- label: string;
73
- }>;
74
- multiple: false;
75
- };
76
- type RouteMetadataDatetimeField = {
77
- id: "scheduledPublishAt";
78
- type: "datetime";
79
- label: string;
80
- description: string;
81
- required: false;
82
- ui: {
83
- visibleWhen: {
84
- field: "draftStatus";
85
- equals: "scheduled";
86
- };
87
- };
88
- };
89
- export type RouteMetadataField = RouteMetadataTextField | RouteMetadataSlugField | RouteMetadataSelectField | RouteMetadataDatetimeField;
67
+ export type RouteMetadataField = RouteMetadataTextField | RouteMetadataSlugField;
90
68
  export type RouteMetadataManifest = {
91
69
  name: string;
92
70
  version: string;
@@ -97,22 +75,16 @@ export type RouteMetadataManifest = {
97
75
  slots: [];
98
76
  };
99
77
  export declare const ROUTE_METADATA_MANIFEST: RouteMetadataManifest;
100
- export declare const METADATA_WORKFLOW_FIELDS: {
101
- readonly title: "draftTitle";
102
- readonly slug: "draftSlug";
103
- readonly status: "draftStatus";
104
- readonly publishAt: "scheduledPublishAt";
105
- };
106
78
  export declare function pageRouteSlugFromEditorValue(value: string | null | undefined): PageRouteSlug;
107
79
  export declare function pageRouteSlugToEditorValue(slug: PageRouteSlug): string;
108
80
  export declare function pageRouteSlugToStoredValue(slug: PageRouteSlug): string | null;
109
81
  export declare function isHomepagePageRouteSlug(slug: PageRouteSlug): boolean;
110
82
  export declare function resolvePageRouteSlug(entry: ContentEntrySnapshot, currentSlug?: string | null): PageRouteSlug | null;
111
83
  export declare const ROUTE_METADATA_MANAGED_FIELDS_BY_TYPE: {
112
- readonly event: readonly ["draftTitle", "draftSlug", "draftStatus", "scheduledPublishAt"];
113
- readonly product: readonly ["draftTitle", "draftSlug", "draftStatus", "scheduledPublishAt"];
114
- readonly "product-category": readonly ["draftTitle", "draftSlug", "draftStatus", "scheduledPublishAt"];
115
- readonly "team-member": readonly ["draftTitle", "draftSlug", "draftStatus", "scheduledPublishAt"];
84
+ readonly event: readonly ["draftTitle", "draftSlug"];
85
+ readonly product: readonly ["draftTitle", "draftSlug"];
86
+ readonly "product-category": readonly ["draftTitle", "draftSlug"];
87
+ readonly "team-member": readonly ["draftTitle", "draftSlug"];
116
88
  };
117
89
  export declare function getManagedRouteMetadataFieldIdsForType(typeKey: string | null | undefined): ReadonlyArray<RouteMetadataFieldId>;
118
90
  export declare function isRouteMetadataFieldEditableForType(typeKey: string | null | undefined, fieldId: string): boolean;
@@ -154,7 +154,6 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
154
154
  readonly maxTickets: "5";
155
155
  readonly showVenue: true;
156
156
  readonly showCapacity: true;
157
- readonly successMessage: "Thank you for registering! Check your email for confirmation details.";
158
157
  readonly buttonText: "Complete Registration";
159
158
  readonly buttonVariant: "primary";
160
159
  };
@@ -74,7 +74,6 @@ export type ContentEntryDefinition<TEntry extends ContentEntrySnapshot, TValues
74
74
  routing: RoutingHelpers;
75
75
  hasRoute: boolean;
76
76
  services: {
77
- saveMetadata: (payload: TMetadataPayload) => Promise<TMetadataResponse>;
78
77
  publish: (payload: TPublishPayload | undefined) => Promise<TEntry>;
79
78
  discardDraft: () => Promise<TEntry>;
80
79
  deleteEntry: () => Promise<void>;
@@ -1,5 +1,53 @@
1
- /** A block version ID is meaningful only with its draft or published stage. */
1
+ import { type ContentVersionId } from './branded';
2
+ /** A block version ID is meaningful only with its draft or published stage (wire shape). */
2
3
  export type BlockContentIdentity = Readonly<{
3
4
  draftContentId: string | null;
4
5
  publishedContentId: string | null;
5
6
  }>;
7
+ /** A published version paired with the content it authorises. */
8
+ export type PublishedBlockPlacement = Readonly<{
9
+ kind: 'published';
10
+ id: ContentVersionId;
11
+ content: Record<string, unknown>;
12
+ }>;
13
+ /**
14
+ * A published pointer the server sent without its content, or with an id that
15
+ * isn't a content version id. It can't be cited as published.
16
+ */
17
+ export type IncompleteBlockPlacement = Readonly<{
18
+ kind: 'incomplete';
19
+ id: string | null;
20
+ content: Record<string, unknown> | null;
21
+ }>;
22
+ /** What a read of a block's published version finds; `null` when it was never published. */
23
+ export type PublishedBlockPlacementRead = PublishedBlockPlacement | IncompleteBlockPlacement | null;
24
+ /** The one pairing of a published id with its content. */
25
+ export declare function readPublishedBlockPlacement(id: string | null | undefined, content: Record<string, unknown> | null | undefined): PublishedBlockPlacementRead;
26
+ /**
27
+ * The server's versions of one editor block. This is server-owned state: the
28
+ * editor keeps it outside undo history, so undo never restores a replaced id.
29
+ */
30
+ export type EditorBlockVersions = Readonly<{
31
+ draftContentId: ContentVersionId | null;
32
+ publishedPlacement: PublishedBlockPlacementRead;
33
+ }>;
34
+ export declare const NO_BLOCK_VERSIONS: EditorBlockVersions;
35
+ /** The one conversion from wire identity to editor identity. */
36
+ export declare function readEditorBlockVersions(wire: Partial<BlockContentIdentity> & Readonly<{
37
+ publishedContent?: Record<string, unknown> | null;
38
+ }>): EditorBlockVersions;
39
+ /** Editor identity from a render block, whose published placement is already paired. */
40
+ export declare function readEditorBlockVersionsFromPlacement(draftContentId: string | null | undefined, publishedPlacement: PublishedBlockPlacementRead): EditorBlockVersions;
41
+ /** The published version a block can cite, if it has a complete one. */
42
+ export declare function publishedVersionOf(versions: EditorBlockVersions | undefined): PublishedBlockPlacement | null;
43
+ /** The content version a block renders: its draft if it has one, else its published version. */
44
+ export declare function selectedContentVersionId(versions: EditorBlockVersions): ContentVersionId | null;
45
+ /** Published content the editor treats as its dirty-state baseline. */
46
+ export declare function publishedContentOf(versions: EditorBlockVersions | undefined): Record<string, unknown> | null;
47
+ export type SavedBlockContentVersion = Readonly<{
48
+ contentId: string;
49
+ stage: 'draft' | 'published';
50
+ data: unknown;
51
+ }>;
52
+ /** A block's versions after the server acknowledges one content save. */
53
+ export declare function applySavedBlockContentVersion(versions: EditorBlockVersions, saved: SavedBlockContentVersion): EditorBlockVersions;
@@ -29,6 +29,8 @@ export type ApiKeyId = Brand<string, 'ApiKeyId'>;
29
29
  export type SiteRouteId = Brand<string, 'SiteRouteId'>;
30
30
  export type PageId = Brand<string, 'PageId'>;
31
31
  export type PageSurfaceId = Brand<string, 'PageSurfaceId'>;
32
+ export type EditLeaseToken = Brand<string, 'EditLeaseToken'>;
33
+ export type EditorClientId = Brand<string, 'EditorClientId'>;
32
34
  export type OccurrenceId = Brand<string, 'OccurrenceId'>;
33
35
  export type EventOfferingId = Brand<string, 'EventOfferingId'>;
34
36
  export type EventSeriesId = Brand<string, 'EventSeriesId'>;
@@ -116,6 +118,10 @@ export type ContentBlockId = Brand<string, 'ContentBlockId'>;
116
118
  export type ContentVersionId = Brand<string, 'ContentVersionId'>;
117
119
  export type EntryContentHash = Brand<string, 'EntryContentHash'>;
118
120
  export type StripeInvoiceId = Brand<string, 'StripeInvoiceId'>;
121
+ /** A platform (not Connect) Stripe customer id, `cus_…`. */
122
+ export type StripeCustomerId = Brand<string, 'StripeCustomerId'>;
123
+ /** A Stripe subscription id, `sub_…`. */
124
+ export type StripeSubscriptionId = Brand<string, 'StripeSubscriptionId'>;
119
125
  export type NewsletterSubscriberId = Brand<string, 'NewsletterSubscriberId'>;
120
126
  export type NavigationMenuId = Brand<string, 'NavigationMenuId'>;
121
127
  export type NavigationItemId = Brand<string, 'NavigationItemId'>;
@@ -178,6 +184,8 @@ export declare const unsafeAsApiKeyId: (id: string) => ApiKeyId;
178
184
  export declare const unsafeAsSiteRouteId: (id: string) => SiteRouteId;
179
185
  export declare const unsafeAsPageId: (id: string) => PageId;
180
186
  export declare const unsafeAsPageSurfaceId: (id: string) => PageSurfaceId;
187
+ export declare const unsafeAsEditLeaseToken: (id: string) => EditLeaseToken;
188
+ export declare const unsafeAsEditorClientId: (id: string) => EditorClientId;
181
189
  export declare const unsafeAsOccurrenceId: (id: string) => OccurrenceId;
182
190
  export declare const unsafeAsEventOfferingId: (id: string) => EventOfferingId;
183
191
  export declare const unsafeAsEventSeriesId: (id: string) => EventSeriesId;
@@ -250,6 +258,8 @@ export declare const unsafeAsContentBlockId: (id: string) => ContentBlockId;
250
258
  export declare const unsafeAsContentVersionId: (id: string) => ContentVersionId;
251
259
  export declare const unsafeAsEntryContentHash: (value: string) => EntryContentHash;
252
260
  export declare const unsafeAsStripeInvoiceId: (id: string) => StripeInvoiceId;
261
+ export declare const unsafeAsStripeCustomerId: (id: string) => StripeCustomerId;
262
+ export declare const unsafeAsStripeSubscriptionId: (id: string) => StripeSubscriptionId;
253
263
  export declare const unsafeAsNewsletterSubscriberId: (id: string) => NewsletterSubscriberId;
254
264
  export declare const unsafeAsNavigationMenuId: (id: string) => NavigationMenuId;
255
265
  export declare const unsafeAsNavigationItemId: (id: string) => NavigationItemId;
@@ -286,6 +296,8 @@ export declare const parseApiKeyId: (value: unknown) => Result<ApiKeyId, Branded
286
296
  export declare const parseSiteRouteId: (value: unknown) => Result<SiteRouteId, BrandedIdParseError>;
287
297
  export declare const parsePageId: (value: unknown) => Result<PageId, BrandedIdParseError>;
288
298
  export declare const parsePageSurfaceId: (value: unknown) => Result<PageSurfaceId, BrandedIdParseError>;
299
+ export declare const parseEditLeaseToken: (value: unknown) => Result<EditLeaseToken, BrandedIdParseError>;
300
+ export declare const parseEditorClientId: (value: unknown) => Result<EditorClientId, BrandedIdParseError>;
289
301
  export declare const parseOccurrenceId: (value: unknown) => Result<OccurrenceId, BrandedIdParseError>;
290
302
  export declare const parseEventOfferingId: (value: unknown) => Result<EventOfferingId, BrandedIdParseError>;
291
303
  export declare const parseEventAttendeeTicketLineId: (value: unknown) => Result<EventAttendeeTicketLineId, BrandedIdParseError>;
@@ -17,9 +17,10 @@ export declare function unsafeCurrencyCode(value: string): CurrencyCode;
17
17
  /**
18
18
  * Trailing-decimal policy for a formatted amount:
19
19
  * - 'exact' : the currency's natural precision (usually 2) — "£25.00"
20
- * - 'auto' : drop trailing zeros within the currency's natural precision — "£25", "£25.50"
20
+ * - 'auto' : drop trailing zeros within the currency's natural precision — "£25", "£25.5"
21
+ * - 'whole' : round to whole major units — "£25"
21
22
  */
22
- export type CurrencyDecimals = 'exact' | 'auto';
23
+ export type CurrencyDecimals = 'exact' | 'auto' | 'whole';
23
24
  export type FormatCurrencyOptions = Readonly<{
24
25
  /** Defaults to 'exact'. */
25
26
  decimals?: CurrencyDecimals;
@@ -36,4 +37,9 @@ export type FormatCurrencyOptions = Readonly<{
36
37
  * own `Intl.NumberFormat`.
37
38
  */
38
39
  export declare function formatCurrencyAmount(amountCents: number, currency: string, options?: FormatCurrencyOptions): string;
40
+ /**
41
+ * `formatCurrencyAmount` for an amount already in MAJOR units (29.99 = £29.99),
42
+ * such as a registrar price. Prefer minor units everywhere else.
43
+ */
44
+ export declare function formatCurrencyMajorUnits(amount: number, currency: string, options?: FormatCurrencyOptions): string;
39
45
  export {};