@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.
- package/CHANGELOG.md +28 -0
- package/dist/{PreviewEditorSidebar-kg2r2Fyi.mjs → PreviewEditorSidebar-DvEPG3Z2.mjs} +249 -172
- package/dist/{PreviewEditorUI-sWMLp5dT.mjs → PreviewEditorUI-D6eb6fkx.mjs} +68 -60
- package/dist/{PreviewQueryProvider-Cg51xq1w.mjs → PreviewQueryProvider-5znTyJuz.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-h2ti3Hch.mjs → SdkPreviewModeRuntime-DJ6utQ_R.mjs} +1180 -475
- package/dist/{SiteChromeCustomizeContext-DEACFH9m.mjs → SiteChromeCustomizeContext-CFJYh6vo.mjs} +199078 -193767
- package/dist/_dts/ai/src/contracts/proposals.d.ts +198 -33
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +18 -3
- package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
- package/dist/_dts/api/src/accountApi.d.ts +6 -6
- package/dist/_dts/api/src/admin.d.ts +22 -22
- package/dist/_dts/api/src/aiPatch.d.ts +2 -2
- package/dist/_dts/api/src/aiPlayground.d.ts +1 -0
- package/dist/_dts/api/src/analytics.d.ts +2 -2
- package/dist/_dts/api/src/apiEndpointTypes.d.ts +2 -0
- package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
- package/dist/_dts/api/src/auth.d.ts +10 -10
- package/dist/_dts/api/src/availability.d.ts +6 -6
- package/dist/_dts/api/src/billing.d.ts +42 -15
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +15 -6
- package/dist/_dts/api/src/blocks.d.ts +15 -14
- package/dist/_dts/api/src/blocksKeys.d.ts +2 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +16 -2
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -13
- package/dist/_dts/api/src/bookingOperations.d.ts +6 -48
- package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
- package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +12 -49
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
- package/dist/_dts/api/src/bookings.d.ts +8 -7
- package/dist/_dts/api/src/calendar.d.ts +9 -9
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -6
- package/dist/_dts/api/src/common/envelope.d.ts +2 -2
- package/dist/_dts/api/src/content-editor.d.ts +2 -2
- package/dist/_dts/api/src/contentEntries.d.ts +17 -48
- package/dist/_dts/api/src/contentRuntime.d.ts +51 -37
- package/dist/_dts/api/src/contentTypes.d.ts +11 -11
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +6 -6
- package/dist/_dts/api/src/documentLifecycle.d.ts +67 -0
- package/dist/_dts/api/src/domains.d.ts +16 -16
- package/dist/_dts/api/src/editLeaseEndpoints.d.ts +72 -0
- package/dist/_dts/api/src/emailSettings.d.ts +4 -4
- package/dist/_dts/api/src/endpoints.d.ts +725 -607
- package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +48 -8
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -9
- package/dist/_dts/api/src/eventPageWords.d.ts +7 -12
- package/dist/_dts/api/src/footerSettings.d.ts +6 -6
- package/dist/_dts/api/src/index.d.ts +8 -6
- package/dist/_dts/api/src/indexCoreTypes.d.ts +2 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -6
- package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation.d.ts +5 -5
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +15 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +19 -0
- package/dist/_dts/api/src/pageSurfaceEditorEndpoints.d.ts +55 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +28 -7
- package/dist/_dts/api/src/pages.d.ts +7 -7
- package/dist/_dts/api/src/performance.d.ts +1 -1
- package/dist/_dts/api/src/public/index.d.ts +1 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +50 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/redirects.d.ts +3 -3
- package/dist/_dts/api/src/request.d.ts +10 -1
- package/dist/_dts/api/src/resources.d.ts +4 -4
- package/dist/_dts/api/src/routes.d.ts +8 -3
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +15 -1
- package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +21 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +5 -28
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +4 -4
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/sdkEventOccurrenceRequestContracts.d.ts +43 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +4 -2
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +8 -1
- package/dist/_dts/api/src/seo.d.ts +4 -4
- package/dist/_dts/api/src/services.d.ts +4 -4
- package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +19 -25
- package/dist/_dts/api/src/siteMembers.d.ts +10 -10
- package/dist/_dts/api/src/siteOnboarding.d.ts +16 -14
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +5 -12
- package/dist/_dts/api/src/siteRuntimeEntry.d.ts +31 -0
- package/dist/_dts/billing/src/checkout/platform.d.ts +77 -0
- package/dist/_dts/billing/src/components/index.d.ts +25 -40
- package/dist/_dts/billing/src/membership/index.d.ts +1 -3
- package/dist/_dts/billing/src/plans/entitlements.d.ts +80 -0
- package/dist/_dts/billing/src/plans/registry.d.ts +16 -16
- package/dist/_dts/billing/src/plans/standing.d.ts +9 -2
- package/dist/_dts/billing/src/plans/types.d.ts +5 -15
- package/dist/_dts/billing/src/site-arrangements.d.ts +2 -2
- package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +2 -4
- package/dist/_dts/billing/src/subscriptions/store.d.ts +17 -11
- package/dist/_dts/block-form/src/backend/store-backend.d.ts +6 -7
- package/dist/_dts/block-form/src/backend/types.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
- package/dist/_dts/blocks/src/client/events.d.ts +3 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +24 -4
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +18 -9
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +4 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +6 -1
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +36 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +18 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/usePolling.d.ts +7 -48
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.checkout-return-context.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.payment-confirmation.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +17 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-actions.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +7 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +18 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +37 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +16 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +2 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DemoBookingPortalAccess.d.ts +22 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DemoPortalSignInLink.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoBookingPassStorage.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
- package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -7
- package/dist/_dts/content-editor/src/controller/EditLeaseController.d.ts +39 -0
- package/dist/_dts/content-editor/src/controller/EditorWriteGate.d.ts +38 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +25 -61
- package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseBanner.d.ts +7 -0
- package/dist/_dts/content-editor/src/controller/LinkedEntryLeaseControllers.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/deriveEditorUnpublishedState.d.ts +6 -0
- package/dist/_dts/content-editor/src/controller/documentValueBaseline.d.ts +25 -0
- package/dist/_dts/content-editor/src/controller/editLeaseLossSignal.d.ts +6 -0
- package/dist/_dts/content-editor/src/controller/editLeaseNotice.d.ts +28 -0
- package/dist/_dts/content-editor/src/controller/editorClientId.d.ts +2 -0
- package/dist/_dts/content-editor/src/controller/editorEditability.d.ts +38 -0
- package/dist/_dts/content-editor/src/controller/editorLeaseParticipation.d.ts +34 -0
- package/dist/_dts/content-editor/src/controller/normalizedMetadataBaseline.d.ts +29 -0
- package/dist/_dts/content-editor/src/controller/pageSurfaceDocumentBaselines.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/pageSurfaceLifecycle.d.ts +11 -0
- package/dist/_dts/content-editor/src/controller/planDocumentBaselineRefresh.d.ts +19 -0
- package/dist/_dts/content-editor/src/controller/readDocumentLeaseBaselines.d.ts +19 -0
- package/dist/_dts/content-editor/src/controller/refreshDocumentLeaseBaseline.d.ts +12 -0
- package/dist/_dts/content-editor/src/controller/refreshLinkedEntry.d.ts +17 -0
- package/dist/_dts/content-editor/src/controller/replayRestoredEditorEffects.d.ts +2 -3
- package/dist/_dts/content-editor/src/controller/routeWrites.d.ts +26 -0
- package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +16 -17
- package/dist/_dts/content-editor/src/controller/useBlockedPublishPlan.d.ts +6 -2
- package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +3 -3
- package/dist/_dts/content-editor/src/controller/useEntryValueAutosaves.d.ts +21 -0
- package/dist/_dts/content-editor/src/controller/useInitialEditorUiStore.d.ts +24 -0
- package/dist/_dts/content-editor/src/controller/useServerBaselineReconciliation.d.ts +17 -0
- package/dist/_dts/content-editor/src/footerComposerPanelTypes.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/applyBlockedPublishPlan.d.ts +5 -1
- package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +8 -47
- package/dist/_dts/content-editor/src/hooks/editLeaseMachine.d.ts +120 -0
- package/dist/_dts/content-editor/src/hooks/publishability.d.ts +6 -10
- package/dist/_dts/content-editor/src/hooks/useAutosaveStatus.d.ts +3 -0
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +5 -15
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +7 -5
- package/dist/_dts/content-editor/src/hooks/useEditLease.d.ts +28 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +25 -39
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +17 -19
- package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +5 -8
- package/dist/_dts/content-editor/src/hooks/useValueAutosave.d.ts +64 -0
- package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +0 -7
- package/dist/_dts/content-editor/src/index.d.ts +26 -7
- package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +12 -0
- package/dist/_dts/content-editor/src/linkedEntries/owner.d.ts +9 -0
- package/dist/_dts/content-editor/src/liveDrafts/draftProjection.d.ts +66 -0
- package/dist/_dts/content-editor/src/liveDrafts/linkedSaveHandovers.d.ts +37 -0
- package/dist/_dts/content-editor/src/liveDrafts/remoteDraftOverlay.d.ts +113 -0
- package/dist/_dts/content-editor/src/liveDrafts/useLiveDrafts.d.ts +32 -0
- package/dist/_dts/content-editor/src/liveDrafts/useRetentionTicks.d.ts +7 -0
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +6 -0
- package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +1 -0
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +96 -19
- package/dist/_dts/content-editor/src/services/editorApiClient.d.ts +13 -0
- package/dist/_dts/content-editor/src/services/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/services/pageSurfaceEditorServices.d.ts +23 -0
- package/dist/_dts/content-editor/src/sync/flushValues.d.ts +13 -0
- package/dist/_dts/content-editor/src/sync/lifecycleFailure.d.ts +51 -0
- package/dist/_dts/content-editor/src/sync/runLifecycle.d.ts +64 -0
- package/dist/_dts/content-editor/src/sync/schedulerValues.d.ts +27 -0
- package/dist/_dts/content-editor/src/sync/sendPlanning.d.ts +104 -0
- package/dist/_dts/content-editor/src/sync/valueSync.d.ts +114 -0
- package/dist/_dts/content-editor/src/ui/blockCollection.d.ts +8 -0
- package/dist/_dts/content-editor/src/ui/documentLifecycle.d.ts +18 -0
- package/dist/_dts/content-editor/src/ui/editorLeaseUiState.d.ts +7 -0
- package/dist/_dts/content-editor/src/ui/editorRefresh.d.ts +82 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +102 -127
- package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +126 -72
- package/dist/_dts/content-editor/src/ui/editorValueSnapshot.d.ts +18 -0
- package/dist/_dts/content-editor/src/ui/serverBlockAdmission.d.ts +26 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +16 -27
- package/dist/_dts/content-editor/src/ui/stores/blockVersionsStore.d.ts +24 -0
- package/dist/_dts/content-editor/src/ui/stores/linkedEntryLeaseStore.d.ts +54 -0
- package/dist/_dts/content-editor/src/ui/stores/linkedSaveHandoversStore.d.ts +11 -0
- package/dist/_dts/content-editor/src/ui/stores/remoteDraftsStore.d.ts +10 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +63 -3
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +2 -2
- package/dist/_dts/content-editor/src/useFooterNavigationLayout.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -4
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -4
- package/dist/_dts/content-model/src/definitions/shared.d.ts +11 -2
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/serializeAllowedBlocks.d.ts +2 -0
- package/dist/_dts/content-model/src/metadataConfig.d.ts +10 -38
- package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
- package/dist/_dts/content-model/src/types.d.ts +0 -1
- package/dist/_dts/core/src/block-content-identity.d.ts +49 -1
- package/dist/_dts/core/src/branded.d.ts +12 -0
- package/dist/_dts/core/src/currency-format.d.ts +8 -2
- package/dist/_dts/core/src/demo-lifecycle-status.d.ts +2 -2
- package/dist/_dts/core/src/demo-warm-pool-target.d.ts +8 -0
- package/dist/_dts/core/src/edit-lease.d.ts +55 -0
- package/dist/_dts/core/src/editor-state.d.ts +38 -13
- package/dist/_dts/core/src/editor-value-sync.d.ts +79 -0
- package/dist/_dts/core/src/html-entities.d.ts +6 -0
- package/dist/_dts/core/src/index.d.ts +5 -1
- package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
- package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -0
- package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
- package/dist/_dts/core/src/participants.d.ts +0 -38
- package/dist/_dts/core/src/uuid.d.ts +7 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +261 -175
- package/dist/_dts/editor/src/EditorProvider.d.ts +5 -0
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +14 -0
- package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +1 -0
- package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +0 -1
- package/dist/_dts/editor/src/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +10 -9
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardFrame.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/applyExtendedFieldDefaults.d.ts +3 -4
- package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +4 -8
- package/dist/_dts/editor-blocks/src/block-editor/editorBlockItem.d.ts +23 -0
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +2 -7
- package/dist/_dts/editor-blocks/src/block-editor/hooks/applyBlockStructureChange.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +14 -5
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +21 -19
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -10
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +8 -16
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +6 -16
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +37 -9
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +3 -2
- package/dist/_dts/media-core/src/fileStorage.d.ts +4 -0
- package/dist/_dts/media-editor/src/context.d.ts +1 -1
- package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -2
- package/dist/_dts/media-editor/src/provider.d.ts +3 -2
- package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +8 -3
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +10 -6
- package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +22 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/entryFieldRebinding.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/blocks/renderPrecedence.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/blocks/useLinkedSaveHandoverRetention.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewAccessBanners.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +24 -14
- package/dist/_dts/preview-next/src/client/preview/PreviewLeaseEditingMode.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeAutosave.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/usePreviewCustomizeWorkflowState.d.ts +4 -0
- package/dist/_dts/realtime/src/client.d.ts +3 -0
- package/dist/_dts/realtime/src/draftChannel.d.ts +91 -0
- package/dist/_dts/realtime/src/drafts.d.ts +210 -0
- package/dist/_dts/realtime/src/index.d.ts +3 -0
- package/dist/_dts/realtime/src/leaseChangeSubscriptions.d.ts +8 -0
- package/dist/_dts/realtime/src/types.d.ts +113 -0
- package/dist/_dts/realtime/src/useDraftChannel.d.ts +34 -0
- package/dist/_dts/realtime/src/useSiteRealtimeReload.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -55
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
- package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
- package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
- package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
- package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
- package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
- package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
- package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
- package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
- package/dist/_dts/ui/src/badge.d.ts +2 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
- package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
- package/dist/_dts/ui/src/combobox.d.ts +26 -1
- package/dist/_dts/ui/src/date-picker.d.ts +5 -8
- package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
- package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
- package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
- package/dist/_dts/ui/src/index.d.ts +4 -1
- package/dist/_dts/ui/src/native-select.d.ts +8 -0
- package/dist/_dts/ui/src/popover.d.ts +7 -1
- package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
- package/dist/_dts/ui/src/surface.d.ts +1 -1
- package/dist/client/{BookingConsentAgreement-BQKL045f.mjs → BookingMailingListNote-CzRt2dF_.mjs} +110 -97
- package/dist/client/{CheckboxChoice--W2n6yKs.mjs → CheckboxChoice-B33MqoUo.mjs} +1 -1
- package/dist/client/DemoBookingPortalAccess-mxqwap3f.mjs +344 -0
- package/dist/client/{EventCombined.client-BdRjVbhH.mjs → EventCombined.client-CDb11igO.mjs} +7 -7
- package/dist/client/{EventListing.client-DBxC6xOU.mjs → EventListing.client-EgYhzKPa.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-mHEJKrTs.mjs → LeafletStaticMap-gtmtaA2b.mjs} +1 -1
- package/dist/client/{scrollToBlock-BNgaEUpo.mjs → TerminalPanel-DvNUP5ot.mjs} +77 -77
- package/dist/client/{ThemedButton-CE5KYT6z.mjs → ThemedButton-C7CeUJjW.mjs} +2 -2
- package/dist/client/{accordion-BEQNSptH.mjs → accordion-kjvt49rA.mjs} +1 -1
- package/dist/client/{bookingForm-AMr-s5vw.mjs → bookingForm-pbRZordh.mjs} +411 -141
- package/dist/client/bookings.mjs +966 -396
- package/dist/client/{carousel-Bbt_QgJy.mjs → carousel-f4Zbmicv.mjs} +2 -2
- package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
- package/dist/client/{cart-CnWi30zJ.mjs → cart-DO20An50.mjs} +3 -3
- package/dist/client/{checkout-f3nkWgd4.mjs → checkout-Du5amDR_.mjs} +3 -3
- package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
- package/dist/client/client.mjs +3837 -2202
- package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
- package/dist/client/{context-Bc8T6pCe.mjs → context-eW97E945.mjs} +4 -3
- package/dist/client/{dates-DUsCEzLb.mjs → dates-jPCirRea.mjs} +56 -11
- package/dist/client/{eventCalendar-CKwgXui5.mjs → eventCalendar-C2M-iE4j.mjs} +10 -10
- package/dist/client/{eventCombined-CBAOSTGR.mjs → eventCombined-W6ns3LHg.mjs} +4 -4
- package/dist/client/{eventDetails-Dh-_WiBD.mjs → eventDetails-CR-GT0f0.mjs} +4 -4
- package/dist/client/{eventListing-CA3frIH5.mjs → eventListing-BK8AfYZz.mjs} +4 -4
- package/dist/client/{eventRegistration-BHtsgdcg.mjs → eventRegistration-BJSd4KUu.mjs} +461 -266
- package/dist/client/{form-C2h3YAcg.mjs → form-BvpfbQaT.mjs} +5 -5
- package/dist/client/{headerSection-lwMuMTH9.mjs → headerSection-I5sUQ8x-.mjs} +3 -3
- package/dist/client/hooks.mjs +909 -163
- package/dist/client/{locationMap-DJ2bLODV.mjs → locationMap-BLvwf9_f.mjs} +4 -4
- package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
- package/dist/client/{media-BtJ37tzS.mjs → media-Cl38iOMI.mjs} +11 -4
- package/dist/client/{newsletterForm-8Pu5K32g.mjs → newsletterForm-DrQ2weE8.mjs} +6 -6
- package/dist/client/{pricing-HHx3IgBz.mjs → pricing-BES87mrR.mjs} +1 -1
- package/dist/client/{productDetail-C_1odnAf.mjs → productDetail-Url9jcc5.mjs} +3 -3
- package/dist/client/{productList-CtCv-Nmx.mjs → productList-DE7ngEZJ.mjs} +3 -3
- package/dist/client/{propsDecoder-Dcgsncxb.mjs → propsDecoder-D1OtGXDV.mjs} +140 -22
- package/dist/client/rendering/client.mjs +2366 -997
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +4607 -2884
- package/dist/client/{routeIslandApiConfig-CWLP7wu3.mjs → routeIslandApiConfig-BG9Y-SHg.mjs} +1 -1
- package/dist/client/{shop-DQXrQ8kJ.mjs → shop-CJkuySJ3.mjs} +126 -79
- package/dist/client/{shop-commerce-B88zmWWo.mjs → shop-commerce-4rKj5n9h.mjs} +26 -14
- package/dist/client/{shop-commerce-store-DtSfkKuX.mjs → shop-commerce-store-Bxm75Pg6.mjs} +1 -1
- package/dist/client/{shopShared-cuaONpkJ.mjs → shopShared-DpoQDWfz.mjs} +5 -5
- package/dist/client/{useEventFilters-Bukew6Gb.mjs → useEventFilters-D8HliSqR.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +314 -133
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +53 -2
- package/dist/preview-next/editor-chrome.css +7 -4
- package/dist/preview-next/keepAlive.mjs +314 -133
- package/dist/preview-next/middleware.mjs +314 -133
- package/dist/{previewAuthStore-h5IgbSp4.mjs → previewAuthStore-BXXF3hhW.mjs} +316 -133
- package/dist/{sdk-runtime-DTc1uIXn.mjs → sdk-runtime-C2a05WjL.mjs} +2 -2
- package/dist/{separator-BpHS1KZK.mjs → separator-CuNhBAhS.mjs} +1 -1
- package/dist/server/components.mjs +6888 -6157
- package/dist/server/config-validation.mjs +931 -199
- package/dist/server/config.mjs +931 -199
- package/dist/server/data.mjs +929 -198
- package/dist/server/index.mjs +317 -134
- package/dist/server/navigation.mjs +13 -2
- package/dist/server/next.mjs +5003 -4340
- package/dist/server/page-converter.mjs +160 -78
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6421 -5687
- package/dist/server/rendering.mjs +7683 -6933
- package/dist/server/routing.mjs +1035 -338
- package/dist/server/server.mjs +946 -256
- package/dist/server/theme-bridge.mjs +66 -17
- package/dist/server/theme.mjs +5 -1
- package/dist/styles/index.css +32 -4
- package/package.json +1 -1
- package/dist/_dts/billing/src/plans/display.d.ts +0 -15
- package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +0 -4
- package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +0 -16
- package/dist/_dts/content-editor/src/controller/driver.d.ts +0 -14
- package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +0 -7
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +0 -29
- package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +0 -26
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +0 -64
- package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +0 -48
- package/dist/_dts/content-editor/src/types.d.ts +0 -44
- package/dist/_dts/core/src/participant-identity.d.ts +0 -135
- package/dist/client/DiscountCodeDisclosure-CsOtjFY7.mjs +0 -137
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type ContentEntrySnapshot, type ContentTypeSchema, type ToolbarState } from '../../../content-model/src/index';
|
|
2
2
|
import type { EditorBlockId, MailingListProviderScope } from '../../../core/src/index';
|
|
3
|
-
import type { BlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
3
|
+
import type { BlockItem, ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
4
4
|
import { type ReactNode } from 'react';
|
|
5
|
-
import { type
|
|
6
|
-
import type
|
|
7
|
-
import { type
|
|
8
|
-
import type { DraftWorkflowStatus } from '../types';
|
|
5
|
+
import { type EntryActions } from '../hooks/useEntryActions';
|
|
6
|
+
import { type BlockedPublishPlan } from '../hooks/blockedPublishPlan';
|
|
7
|
+
import { type ContentEntryEditorServices, type PageSurfaceEditorServices } from '../services';
|
|
9
8
|
import { type EditorUiState } from '../ui/editorUiStore';
|
|
10
9
|
import type { ResolveBlockManifest } from '../ui/blockValidationView';
|
|
10
|
+
import { type RouteWrites } from './routeWrites';
|
|
11
|
+
import type { EditorApiClient, EditorApiClientFactory } from '../services/editorApiClient';
|
|
12
|
+
import { type EditorLeaseParticipation } from './editorLeaseParticipation';
|
|
13
|
+
import { type LiveDraftsConfig } from '../liveDrafts/useLiveDrafts';
|
|
11
14
|
export type EntryControllerBlocksSlice = {
|
|
12
15
|
list: BlockItem[];
|
|
13
16
|
status: 'idle' | 'loading' | 'error';
|
|
@@ -16,10 +19,6 @@ export type EntryControllerBlocksSlice = {
|
|
|
16
19
|
};
|
|
17
20
|
};
|
|
18
21
|
export type EntryControllerUiSlice = EditorUiState;
|
|
19
|
-
export type EntryControllerAutosaveState = {
|
|
20
|
-
status: DraftWorkflowStatus;
|
|
21
|
-
hasFailedSaves: boolean;
|
|
22
|
-
};
|
|
23
22
|
export type EntryDraftBlockPatch = {
|
|
24
23
|
blockId: EditorBlockId;
|
|
25
24
|
path?: string | null;
|
|
@@ -47,18 +46,9 @@ export type EntryRecoveryConflictState = Readonly<{
|
|
|
47
46
|
reviewAffectedBlocks: () => void;
|
|
48
47
|
discardRecoveredChanges: () => void;
|
|
49
48
|
}>;
|
|
50
|
-
|
|
51
|
-
export type EntryActions = Readonly<{
|
|
52
|
-
kind: 'entryLifecycle';
|
|
53
|
-
saveDraft: () => Promise<void>;
|
|
54
|
-
publish: (options?: PublishOptions) => Promise<void>;
|
|
55
|
-
discardDraft: () => Promise<void>;
|
|
56
|
-
deleteEntry: () => Promise<void>;
|
|
57
|
-
}> | Readonly<{
|
|
58
|
-
kind: 'pageSurfaceDraft';
|
|
59
|
-
saveDraft: () => Promise<void>;
|
|
60
|
-
}>;
|
|
49
|
+
export type { EntryActions };
|
|
61
50
|
export type EntryControllerContextValue = {
|
|
51
|
+
apiClient: EditorApiClient;
|
|
62
52
|
entry: ContentEntrySnapshot;
|
|
63
53
|
baseline: Record<string, unknown>;
|
|
64
54
|
errorMessage: string | null;
|
|
@@ -66,21 +56,25 @@ export type EntryControllerContextValue = {
|
|
|
66
56
|
type: 'blocked';
|
|
67
57
|
}> | null;
|
|
68
58
|
recoveryConflict: EntryRecoveryConflictState | null;
|
|
69
|
-
setErrorMessage: (msg: string | null) => void;
|
|
70
59
|
actions: EntryActions;
|
|
60
|
+
/** Writes that return the route row they wrote (native publish, schedule, cancel). */
|
|
61
|
+
routeWrites: RouteWrites;
|
|
71
62
|
blocks: EntryControllerBlocksSlice;
|
|
72
63
|
drafts: EntryDraftsSlice;
|
|
73
64
|
toolbar: ToolbarState<Record<string, unknown>>;
|
|
74
65
|
};
|
|
75
66
|
type BaseInternalProps = {
|
|
76
67
|
children: ReactNode;
|
|
77
|
-
|
|
68
|
+
apiClientFactory: EditorApiClientFactory;
|
|
69
|
+
/** Viewing mounts no lease controller; switching to a lease config keeps the store and its edits. */
|
|
70
|
+
editLease: EditorLeaseParticipation;
|
|
78
71
|
siteId: string;
|
|
79
72
|
routeId?: string;
|
|
80
73
|
type: string;
|
|
81
74
|
schema: ContentTypeSchema;
|
|
82
75
|
entityLabel?: string | null;
|
|
83
76
|
initialEntry?: ContentEntrySnapshot | null;
|
|
77
|
+
initialMetadataRevision: string | null;
|
|
84
78
|
/** Autosave mode (default: auto). Manual disables background autosave triggers. */
|
|
85
79
|
saveMode?: 'auto' | 'manual';
|
|
86
80
|
/** Initial content values for content entries - used to hydrate content store */
|
|
@@ -89,34 +83,35 @@ type BaseInternalProps = {
|
|
|
89
83
|
initialPublishedContent?: Record<string, unknown> | null;
|
|
90
84
|
onEntryUpdated?: (response: unknown) => void;
|
|
91
85
|
historyShortcutsEnabled?: boolean;
|
|
86
|
+
blockFieldExtensions?: import('../../../editor-blocks/src/block-editor/blockDraftBaselineSeed').BlockFieldExtensions | null;
|
|
92
87
|
resolveBlockManifest?: ResolveBlockManifest;
|
|
93
88
|
getExpectedMailingListProviderScope?: () => MailingListProviderScope | null;
|
|
89
|
+
/** Live drafts between tabs (issue 1545); omitted where the host has no realtime client. */
|
|
90
|
+
liveDrafts?: LiveDraftsConfig | null;
|
|
94
91
|
};
|
|
95
92
|
type EditorOwnerServiceProps = Readonly<{
|
|
96
93
|
owner: {
|
|
97
94
|
kind: 'contentEntry';
|
|
98
95
|
contentEntryId: string;
|
|
99
96
|
};
|
|
100
|
-
services?:
|
|
101
|
-
kind: 'entryLifecycle';
|
|
102
|
-
}>;
|
|
97
|
+
services?: ContentEntryEditorServices;
|
|
103
98
|
}> | Readonly<{
|
|
104
99
|
owner: {
|
|
105
100
|
kind: 'pageSurface';
|
|
106
101
|
pageSurfaceId: string;
|
|
107
102
|
};
|
|
108
|
-
services:
|
|
109
|
-
kind: 'pageSurfaceDraft';
|
|
110
|
-
}>;
|
|
103
|
+
services: PageSurfaceEditorServices | ((apiClient: EditorApiClient) => PageSurfaceEditorServices);
|
|
111
104
|
}>;
|
|
112
105
|
type PageInternalProps = {
|
|
113
106
|
kind: 'page';
|
|
107
|
+
initialContentRevision?: never;
|
|
114
108
|
initialStatus?: 'draft' | 'scheduled' | 'published';
|
|
115
|
-
initialBlocks?:
|
|
109
|
+
initialBlocks?: ServerBlockItem[];
|
|
116
110
|
};
|
|
117
111
|
type ContentInternalProps = {
|
|
118
112
|
kind: 'content';
|
|
119
|
-
|
|
113
|
+
initialContentRevision: string;
|
|
114
|
+
initialBlocks?: ServerBlockItem[];
|
|
120
115
|
};
|
|
121
116
|
type EntryControllerProviderProps = BaseInternalProps & EditorOwnerServiceProps & (PageInternalProps | ContentInternalProps);
|
|
122
117
|
/**
|
|
@@ -137,34 +132,3 @@ type EntryControllerProviderProps = BaseInternalProps & EditorOwnerServiceProps
|
|
|
137
132
|
export declare function EntryControllerProvider(props: EntryControllerProviderProps): import("react").JSX.Element;
|
|
138
133
|
export declare function useEntryEditorController(): EntryControllerContextValue;
|
|
139
134
|
export declare function useEntryController(): EntryControllerContextValue;
|
|
140
|
-
/**
|
|
141
|
-
* Hook to access autosave status from the uiStore.
|
|
142
|
-
*
|
|
143
|
-
* @deprecated Use useEditorUiStore with selectors instead for better performance:
|
|
144
|
-
* ```tsx
|
|
145
|
-
* const metadataStatus = useEditorUiStore(state => state.autosave.metadata.status)
|
|
146
|
-
* const blocksStatus = useEditorUiStore(state => state.autosave.blocks.status)
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* This hook exists for backward compatibility and subscribes to the entire
|
|
150
|
-
* autosave state, causing re-renders when any autosave status changes.
|
|
151
|
-
*/
|
|
152
|
-
export declare function useAutosave(): {
|
|
153
|
-
autosave: import("../ui/editorUiStore").AutosaveStatus;
|
|
154
|
-
blockAutosave: import("../ui/editorUiStore").AutosaveStatus;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* @deprecated Use useEditorUiStore hook directly from '../ui/editorUiStore'
|
|
158
|
-
* This provides granular selector support for better performance.
|
|
159
|
-
*
|
|
160
|
-
* Example:
|
|
161
|
-
* ```tsx
|
|
162
|
-
* // Old (re-renders on any state change):
|
|
163
|
-
* const uiStore = useEntryUiStore()
|
|
164
|
-
*
|
|
165
|
-
* // New (only re-renders when metadata status changes):
|
|
166
|
-
* const metadataStatus = useEditorUiStore(state => state.metadata.getSnapshot().syncState.kind)
|
|
167
|
-
* ```
|
|
168
|
-
*/
|
|
169
|
-
export declare function useEntryUiStore(): import("zustand").StoreApi<EditorUiState>;
|
|
170
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A linked entry held elsewhere keeps a notice scoped to its panel: it doesn't make the whole
|
|
3
|
+
* page read-only, so it never raises the page's modal.
|
|
4
|
+
*/
|
|
5
|
+
export declare function LinkedEntryLeaseBanner({ entryId }: Readonly<{
|
|
6
|
+
entryId: string;
|
|
7
|
+
}>): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EditorApiClient, EditorApiClientFactory } from '../services/editorApiClient';
|
|
2
|
+
import { type EditorLeaseConfig } from './EditLeaseController';
|
|
3
|
+
type Props = Readonly<{
|
|
4
|
+
apiClientFactory: EditorApiClientFactory;
|
|
5
|
+
parentApiClient: EditorApiClient;
|
|
6
|
+
lease: EditorLeaseConfig;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* A linked entry keeps its lease controller, and so its lease authority, while it's
|
|
10
|
+
* selected, edited, or has a request in flight or abandoned; it unmounts only once that
|
|
11
|
+
* request settles (issue 1553, D2 and row L6).
|
|
12
|
+
*/
|
|
13
|
+
export declare function LinkedEntryLeaseControllers(props: Props): import("react").JSX.Element[];
|
|
14
|
+
export {};
|
|
@@ -18,3 +18,9 @@ export type DeriveEditorUnpublishedStateInput = Readonly<{
|
|
|
18
18
|
hasBeenPublishedBefore: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
export declare function deriveEditorUnpublishedState(input: DeriveEditorUnpublishedStateInput): EditorUnpublishedState;
|
|
21
|
+
/**
|
|
22
|
+
* Discard returns a document to its published version, so it needs both
|
|
23
|
+
* something to discard and a published version to go back to. A document that
|
|
24
|
+
* has never been published keeps its drafts, and its Discard is unavailable.
|
|
25
|
+
*/
|
|
26
|
+
export declare function canDiscardDraft(state: Pick<EditorUnpublishedState, "hasUnpublishedChanges" | "hasBeenPublishedBefore">): boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A document value (its metadata or its content) as the server last gave it:
|
|
3
|
+
* the draft the editor starts from, the published version it compares
|
|
4
|
+
* against, and the revision the next save is checked with.
|
|
5
|
+
*
|
|
6
|
+
* Kept free of imports so the editor services, which also run beside the
|
|
7
|
+
* server, can describe a discard result without pulling in the block editor.
|
|
8
|
+
*/
|
|
9
|
+
export type DocumentValueBaseline = Readonly<{
|
|
10
|
+
baseline: Record<string, unknown> | null;
|
|
11
|
+
published: Record<string, unknown> | null;
|
|
12
|
+
revision: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
/** Unknown publication evidence retains the existing baseline; known null clears it. */
|
|
15
|
+
export type SavedPublication = Readonly<{
|
|
16
|
+
kind: 'unknown';
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
kind: 'known';
|
|
19
|
+
values: Record<string, unknown> | null;
|
|
20
|
+
}>;
|
|
21
|
+
export type DocumentSaveReceipt<TRevision extends string | null = string | null> = Readonly<{
|
|
22
|
+
values: Record<string, unknown>;
|
|
23
|
+
revision: TRevision;
|
|
24
|
+
published: SavedPublication;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Connects save responses to the mounted lease controller without storing protocol state. */
|
|
2
|
+
export declare function createEditLeaseLossSignal(): {
|
|
3
|
+
emit: () => void;
|
|
4
|
+
subscribe: (listener: () => void) => () => void;
|
|
5
|
+
};
|
|
6
|
+
export type EditLeaseLossSignal = ReturnType<typeof createEditLeaseLossSignal>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EditorEditability } from './editorEditability';
|
|
2
|
+
/**
|
|
3
|
+
* What a lease notice button does; "Edit here" and "Take over" both take the lease.
|
|
4
|
+
* `keep-viewing` only returns the tab to view mode; `discard-and-view` throws away the
|
|
5
|
+
* tab's unsaved edits first, so the label always says what the click does.
|
|
6
|
+
*/
|
|
7
|
+
export type LeaseNoticeAction = 'take-over' | 'retry' | 'discard' | 'keep-viewing' | 'discard-and-view';
|
|
8
|
+
export type LeaseNoticeButton = Readonly<{
|
|
9
|
+
action: LeaseNoticeAction;
|
|
10
|
+
label: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type LeaseNotice = Readonly<{
|
|
13
|
+
variant: 'your-other-tab' | 'another-user' | 'lost-with-unsaved' | 'unreachable';
|
|
14
|
+
title: string;
|
|
15
|
+
body: string | null;
|
|
16
|
+
buttons: readonly LeaseNoticeButton[];
|
|
17
|
+
}>;
|
|
18
|
+
export type LeaseNoticeInput = Readonly<{
|
|
19
|
+
editability: EditorEditability;
|
|
20
|
+
/** "this page", "this entry" or "this event page". */
|
|
21
|
+
thing: string;
|
|
22
|
+
unsaved: boolean;
|
|
23
|
+
/** Preview only: the tab can go back to view mode instead. */
|
|
24
|
+
canKeepViewing: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
/** The blocking notice for a read-only mount, or null when nothing should be said. */
|
|
27
|
+
export declare function planLeaseNotice({ editability, thing, unsaved, canKeepViewing }: LeaseNoticeInput): LeaseNotice | null;
|
|
28
|
+
export declare function leaseDiscardedMessage(thing: string): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { EditAuthority, EditLeaseHolder, EditLeaseToken } from '../../../core/src/index';
|
|
2
|
+
/**
|
|
3
|
+
* Why a store writes without a lease: a server-side exemption, or a surface the lease
|
|
4
|
+
* protocol does not manage (the footer composer and standalone stores).
|
|
5
|
+
*/
|
|
6
|
+
export type UnleasedReason = Extract<EditAuthority, {
|
|
7
|
+
kind: 'exempt';
|
|
8
|
+
}>['reason'] | 'unmanaged-surface';
|
|
9
|
+
/**
|
|
10
|
+
* A mount either declares an exemption, participates in the lease protocol, or is only
|
|
11
|
+
* viewing (a preview tab that has not asked to edit, so it never competes for the lease).
|
|
12
|
+
*/
|
|
13
|
+
export type EditorEditability = Readonly<{
|
|
14
|
+
kind: 'unleased';
|
|
15
|
+
reason: UnleasedReason;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'viewing';
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'acquiring';
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
kind: 'editable';
|
|
22
|
+
token: EditLeaseToken;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'read-only';
|
|
25
|
+
reason: 'held-elsewhere';
|
|
26
|
+
holder: EditLeaseHolder;
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
kind: 'read-only';
|
|
29
|
+
reason: 'unreachable';
|
|
30
|
+
}>;
|
|
31
|
+
/** The explicit editability of a store that no lease manages, such as the footer composer. */
|
|
32
|
+
export declare const unmanagedSurfaceEditability: EditorEditability;
|
|
33
|
+
export declare function canEditorWrite(editability: EditorEditability): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether a mount's editing surface is made inert. A viewer is never blocked (its writes are
|
|
36
|
+
* refused by the store and the API client instead); a tab waiting for or denied the lease is.
|
|
37
|
+
*/
|
|
38
|
+
export declare function blocksEditingSurface(editability: EditorEditability): boolean;
|
|
@@ -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,
|
|
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:
|
|
8
|
-
blockAutosave:
|
|
9
|
-
linkedEntryAutosave?:
|
|
7
|
+
metadataAutosave: TriggerHandle;
|
|
8
|
+
blockAutosave: TriggerHandle;
|
|
9
|
+
linkedEntryAutosave?: TriggerHandle | null;
|
|
10
10
|
/** Content autosave - only provided for content entries (not pages) */
|
|
11
|
-
contentAutosave?:
|
|
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
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
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
|
-
|
|
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:
|
|
14
|
+
initialBlocks: ServerBlockItem[];
|
|
15
15
|
}): {
|
|
16
16
|
blocksSlice: {
|
|
17
|
-
list:
|
|
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 {};
|