@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,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type EditorBlockVersions } from '../../../core/src/index';
|
|
2
|
+
import { type EditorBlockCollectionOwner, type EditorBlockCollectionReadBaseline, unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorValueRecord, type BaselineRevision, type SendId, type ValueSync } from '../../../core/src/index';
|
|
2
3
|
import { type LinkedContentEntryId, type LinkedContentTypeKey } from '../linkedEntries/domain';
|
|
4
|
+
import { type EditorValueSnapshot } from './editorValueSnapshot';
|
|
5
|
+
import { type OwnWriteSince, type RefreshPolicy, type ValueSyncEvent, type ValueSyncOutcome } from '../sync/valueSync';
|
|
6
|
+
export type { EditorValueSnapshot } from './editorValueSnapshot';
|
|
3
7
|
export { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
|
|
4
8
|
export type EditorCommand = {
|
|
5
9
|
type: 'set-metadata-value';
|
|
@@ -52,13 +56,6 @@ type PersistRemoveEffect = Readonly<{
|
|
|
52
56
|
blockId: EditorBlockId;
|
|
53
57
|
}>;
|
|
54
58
|
export type EditorEffect = PersistReorderEffect | PersistInsertEffect | PersistRemoveEffect;
|
|
55
|
-
export type EditorValueSnapshot<TValue extends EditorValueRecord | null> = Readonly<{
|
|
56
|
-
version: number;
|
|
57
|
-
baseline: TValue;
|
|
58
|
-
current: TValue;
|
|
59
|
-
publishedBaseline: TValue;
|
|
60
|
-
syncState: EditorSyncState;
|
|
61
|
-
}>;
|
|
62
59
|
export type EditorValuePublicationState<TValue extends EditorValueRecord | null> = Readonly<{
|
|
63
60
|
kind: 'empty';
|
|
64
61
|
hasUnpublishedChanges: false;
|
|
@@ -81,27 +78,15 @@ export type EditorValuePublicationState<TValue extends EditorValueRecord | null>
|
|
|
81
78
|
hasUnpublishedChanges: true;
|
|
82
79
|
}>;
|
|
83
80
|
export declare function deriveEditorValuePublicationState<TValue extends EditorValueRecord | null>(snapshot: EditorValueSnapshot<TValue>): EditorValuePublicationState<TValue>;
|
|
84
|
-
export type EditorPublishSuccessTransition = Readonly<{
|
|
85
|
-
metadata: Readonly<{
|
|
86
|
-
baseline: EditorMetadataValues | null;
|
|
87
|
-
current: EditorMetadataValues | null;
|
|
88
|
-
published: EditorMetadataValues | null;
|
|
89
|
-
}>;
|
|
90
|
-
content: Readonly<{
|
|
91
|
-
published: EditorContentValues | null;
|
|
92
|
-
versionAtPublishStart: number;
|
|
93
|
-
}>;
|
|
94
|
-
blockPublishedBaselines: readonly BlockPublishedBaselineInput[] | null;
|
|
95
|
-
}>;
|
|
96
81
|
type EditorMetadataSnapshot = EditorValueSnapshot<EditorMetadataValues | null>;
|
|
97
82
|
type EditorContentSnapshot = EditorValueSnapshot<EditorContentValues | null>;
|
|
83
|
+
/** The linked entry's baseline revision (its optimistic hash) lives in `sync`. */
|
|
98
84
|
export type EditorLinkedEntryMeta = Readonly<{
|
|
99
85
|
entryId: LinkedContentEntryId;
|
|
100
86
|
contentTypeKey: LinkedContentTypeKey;
|
|
101
87
|
contentTypeLabel: string;
|
|
102
88
|
title: string;
|
|
103
89
|
titleField: string | null;
|
|
104
|
-
optimisticHash: string | null;
|
|
105
90
|
fields: readonly EditorValueRecord[];
|
|
106
91
|
}>;
|
|
107
92
|
export type EditorLinkedEntrySnapshot = EditorValueSnapshot<EditorContentValues | null> & Readonly<{
|
|
@@ -111,31 +96,26 @@ export type EditorBlockMeta = Readonly<{
|
|
|
111
96
|
kind: string;
|
|
112
97
|
purpose: string | null;
|
|
113
98
|
orderIndex: number | null;
|
|
114
|
-
publishedContent: EditorBlockValues | null;
|
|
115
|
-
optimisticHash: string | null;
|
|
116
99
|
}>;
|
|
117
100
|
export type EditorDraftSnapshot = EditorStructuralDraftSnapshot;
|
|
118
101
|
export type DraftBlockInitMetaInput = EditorDraftBlockInitMetaInput;
|
|
119
102
|
export type DraftBlockBaselineUpdateMetaInput = EditorDraftBlockBaselineUpdateMetaInput;
|
|
120
103
|
export type DraftBlockBaselineInput = EditorBlockBaselineInput;
|
|
121
|
-
export type
|
|
122
|
-
export type EditorBlockItem = Partial<BlockContentIdentity> & Readonly<{
|
|
104
|
+
export type EditorBlockItem = Readonly<{
|
|
123
105
|
id?: string | null;
|
|
124
106
|
kind: string;
|
|
125
107
|
content?: EditorValueRecord | null;
|
|
126
108
|
orderIndex?: number | null;
|
|
127
109
|
draftContent?: EditorValueRecord | null;
|
|
128
|
-
publishedContent?: EditorValueRecord | null;
|
|
129
110
|
bindings?: EditorValueRecord | null;
|
|
130
111
|
purpose?: string | null;
|
|
131
112
|
optimisticHash?: string | null;
|
|
132
113
|
}>;
|
|
133
|
-
type NormalizedEditorBlockBase =
|
|
114
|
+
type NormalizedEditorBlockBase = Readonly<{
|
|
134
115
|
kind: string;
|
|
135
116
|
content: EditorBlockValues | null;
|
|
136
117
|
orderIndex: number | null;
|
|
137
118
|
draftContent: EditorBlockValues | null;
|
|
138
|
-
publishedContent: EditorBlockValues | null;
|
|
139
119
|
bindings: EditorBlockValues | null;
|
|
140
120
|
purpose: string | null;
|
|
141
121
|
optimisticHash: string | null;
|
|
@@ -153,10 +133,30 @@ export type EditorHistorySnapshot = Readonly<{
|
|
|
153
133
|
* Structural/history operations and baseline acknowledgements keep this list in sync,
|
|
154
134
|
* while draft-only validation/edit metadata continues to live in `drafts`.
|
|
155
135
|
*/
|
|
136
|
+
blockCollectionOwner: EditorBlockCollectionOwner | null;
|
|
137
|
+
collectionReadBaselines: Readonly<Record<string, EditorBlockCollectionReadBaseline>>;
|
|
156
138
|
blockList: readonly NormalizedEditorBlockItem[];
|
|
157
139
|
drafts: Readonly<Record<EditorBlockId, EditorDraftSnapshot>>;
|
|
158
140
|
linkedEntries: Readonly<Record<string, EditorLinkedEntrySnapshot>>;
|
|
159
141
|
}>;
|
|
142
|
+
/** Which value a sync event applies to. A linked entry that is the document itself routes to content. */
|
|
143
|
+
export type EditorValueKey = Readonly<{
|
|
144
|
+
kind: 'metadata';
|
|
145
|
+
}> | Readonly<{
|
|
146
|
+
kind: 'content';
|
|
147
|
+
}> | Readonly<{
|
|
148
|
+
kind: 'block';
|
|
149
|
+
blockId: EditorBlockId;
|
|
150
|
+
}> | Readonly<{
|
|
151
|
+
kind: 'linked-entry';
|
|
152
|
+
entryId: string;
|
|
153
|
+
}>;
|
|
154
|
+
/** Events arrive unbranded; each family brands (and clones) the values it stores. */
|
|
155
|
+
export type EditorValueSyncEvent = ValueSyncEvent<EditorValueRecord | null>;
|
|
156
|
+
export type EditorValueTransition = Readonly<{
|
|
157
|
+
snapshot: EditorHistorySnapshot;
|
|
158
|
+
outcome: ValueSyncOutcome;
|
|
159
|
+
}>;
|
|
160
160
|
export declare function requirePersistedEditorBlock(block: EditorBlockItem | NormalizedEditorBlockItem): PersistedEditorBlockItem;
|
|
161
161
|
export declare function createEditorDraftSnapshotFromBlock(block: PersistedEditorBlockItem): EditorDraftSnapshot;
|
|
162
162
|
export declare function createEditorHistorySnapshot(): EditorHistorySnapshot;
|
|
@@ -171,78 +171,24 @@ export type EditorUserOperation = {
|
|
|
171
171
|
type: 'user-command';
|
|
172
172
|
command: EditorCommand;
|
|
173
173
|
};
|
|
174
|
+
/**
|
|
175
|
+
* History-free operations. Save requests don't appear here: the store applies their
|
|
176
|
+
* sync events (`send-started`, `send-succeeded`, `send-failed`) through `applyValueEvent`.
|
|
177
|
+
*/
|
|
174
178
|
export type EditorSystemOperation = {
|
|
175
|
-
type: 'hydrate-metadata';
|
|
176
|
-
baseline: EditorMetadataValues | null;
|
|
177
|
-
current?: EditorMetadataValues | null;
|
|
178
|
-
published?: EditorMetadataValues | null;
|
|
179
|
-
} | {
|
|
180
|
-
type: 'hydrate-content';
|
|
181
|
-
baseline: EditorContentValues | null;
|
|
182
|
-
current?: EditorContentValues | null;
|
|
183
|
-
published?: EditorContentValues | null;
|
|
184
|
-
} | {
|
|
185
179
|
type: 'set-metadata-published-baseline';
|
|
186
180
|
published: EditorMetadataValues | null;
|
|
187
181
|
} | {
|
|
188
182
|
type: 'set-content-published-baseline';
|
|
189
183
|
published: EditorContentValues | null;
|
|
190
|
-
} | {
|
|
191
|
-
type: 'apply-publish-success';
|
|
192
|
-
transition: EditorPublishSuccessTransition;
|
|
193
|
-
} | {
|
|
194
|
-
type: 'autosave-metadata-succeeded';
|
|
195
|
-
savedValues: EditorMetadataValues | null;
|
|
196
|
-
acknowledgedVersion: number;
|
|
197
|
-
} | {
|
|
198
|
-
type: 'autosave-content-succeeded';
|
|
199
|
-
savedValues: EditorContentValues | null;
|
|
200
|
-
acknowledgedVersion: number;
|
|
201
|
-
} | {
|
|
202
|
-
type: 'autosave-metadata-failed';
|
|
203
|
-
message?: string;
|
|
204
|
-
} | {
|
|
205
|
-
type: 'autosave-content-failed';
|
|
206
|
-
message?: string;
|
|
207
|
-
} | {
|
|
208
|
-
type: 'clear-metadata-error';
|
|
209
|
-
} | {
|
|
210
|
-
type: 'clear-content-error';
|
|
211
184
|
} | {
|
|
212
185
|
type: 'init-new-draft-block';
|
|
213
186
|
blockId: EditorBlockId;
|
|
214
187
|
baseline: DraftBlockBaselineInput;
|
|
215
188
|
meta: DraftBlockInitMetaInput;
|
|
216
|
-
} | {
|
|
217
|
-
type: 'update-draft-block-baseline';
|
|
218
|
-
blockId: EditorBlockId;
|
|
219
|
-
baseline: DraftBlockBaselineInput;
|
|
220
|
-
meta?: DraftBlockBaselineUpdateMetaInput;
|
|
221
189
|
} | {
|
|
222
190
|
type: 'remove-draft-block';
|
|
223
191
|
blockId: EditorBlockId;
|
|
224
|
-
} | {
|
|
225
|
-
type: 'set-draft-published-baselines';
|
|
226
|
-
blocks: readonly BlockPublishedBaselineInput[];
|
|
227
|
-
} | {
|
|
228
|
-
type: 'autosave-draft-succeeded';
|
|
229
|
-
blockId: EditorBlockId;
|
|
230
|
-
savedValues: EditorBlockValues | null;
|
|
231
|
-
acknowledgedVersion: number;
|
|
232
|
-
optimisticHash: string | null;
|
|
233
|
-
} | {
|
|
234
|
-
type: 'autosave-draft-failed';
|
|
235
|
-
blockId: EditorBlockId;
|
|
236
|
-
message?: string;
|
|
237
|
-
} | {
|
|
238
|
-
type: 'clear-draft-error';
|
|
239
|
-
blockId: EditorBlockId;
|
|
240
|
-
} | {
|
|
241
|
-
type: 'set-draft-pending';
|
|
242
|
-
blockId: EditorBlockId;
|
|
243
|
-
} | {
|
|
244
|
-
type: 'clear-draft-pending';
|
|
245
|
-
blockId: EditorBlockId;
|
|
246
192
|
} | {
|
|
247
193
|
type: 'hydrate-linked-entry';
|
|
248
194
|
entryId: string;
|
|
@@ -253,23 +199,14 @@ export type EditorSystemOperation = {
|
|
|
253
199
|
optimisticHash?: string | null;
|
|
254
200
|
fields: readonly EditorValueRecord[];
|
|
255
201
|
baseline: EditorContentValues | null;
|
|
256
|
-
current?: EditorContentValues | null;
|
|
257
|
-
} | {
|
|
258
|
-
type: 'discard-linked-entry';
|
|
259
|
-
entryId: string;
|
|
260
202
|
} | {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
optimisticHash?: string | null;
|
|
203
|
+
/** An `edited` event outside history: a preview runtime showing values it drives. */
|
|
204
|
+
type: 'edit-without-history';
|
|
205
|
+
key: EditorValueKey;
|
|
206
|
+
values: EditorValueRecord | null;
|
|
266
207
|
} | {
|
|
267
|
-
type: '
|
|
268
|
-
|
|
269
|
-
message?: string;
|
|
270
|
-
} | {
|
|
271
|
-
type: 'clear-linked-entry-error';
|
|
272
|
-
entryId: string;
|
|
208
|
+
type: 'discard-local-edits';
|
|
209
|
+
contentOwnerEntryId?: string;
|
|
273
210
|
} | {
|
|
274
211
|
type: 'replace-block-list';
|
|
275
212
|
next: readonly EditorBlockItem[];
|
|
@@ -279,36 +216,73 @@ export declare function applyEditorCommand(snapshot: EditorHistorySnapshot, comm
|
|
|
279
216
|
export declare function applyUserOperation(snapshot: EditorHistorySnapshot, operation: EditorUserOperation): EditorHistorySnapshot;
|
|
280
217
|
export declare function applySystemOperation(snapshot: EditorHistorySnapshot, operation: EditorSystemOperation): EditorHistorySnapshot;
|
|
281
218
|
export declare function applyEditorOperation(snapshot: EditorHistorySnapshot, operation: EditorOperation): EditorHistorySnapshot;
|
|
282
|
-
|
|
283
|
-
export declare function
|
|
219
|
+
/** The sync state of one value, or `undefined` when that block or linked entry isn't loaded. */
|
|
220
|
+
export declare function valueSyncAt(snapshot: EditorHistorySnapshot, key: EditorValueKey): ValueSync<EditorValueRecord | null> | undefined;
|
|
221
|
+
/** Applies one sync event to one value; the single path every family's transitions take. */
|
|
222
|
+
export declare function applyValueEvent(snapshot: EditorHistorySnapshot, key: EditorValueKey, event: EditorValueSyncEvent): EditorValueTransition;
|
|
223
|
+
/** What one started request carries: the values sent and the revision they were based on. */
|
|
224
|
+
export type StartedSend = Readonly<{
|
|
225
|
+
key: EditorValueKey;
|
|
226
|
+
id: SendId;
|
|
227
|
+
values: EditorValueRecord | null;
|
|
228
|
+
basis: BaselineRevision;
|
|
229
|
+
}>;
|
|
230
|
+
export declare function startedSendAt(snapshot: EditorHistorySnapshot, key: EditorValueKey, id: SendId): StartedSend | null;
|
|
231
|
+
export declare function aggregateSyncState(snapshot: EditorHistorySnapshot): 'baseline' | 'pending' | 'failed';
|
|
284
232
|
export declare function setMetadataPublishedBaseline(snapshot: EditorHistorySnapshot, published: EditorMetadataValues | null): EditorHistorySnapshot;
|
|
285
233
|
export declare function setContentPublishedBaseline(snapshot: EditorHistorySnapshot, published: EditorContentValues | null): EditorHistorySnapshot;
|
|
286
|
-
export declare function applyPublishSuccessTransition(snapshot: EditorHistorySnapshot, transition: EditorPublishSuccessTransition): EditorHistorySnapshot;
|
|
287
|
-
export declare function autosaveMetadataSucceeded(snapshot: EditorHistorySnapshot, savedValues: EditorMetadataValues | null, acknowledgedVersion: number): EditorHistorySnapshot;
|
|
288
|
-
export declare function autosaveContentSucceeded(snapshot: EditorHistorySnapshot, savedValues: EditorContentValues | null, acknowledgedVersion: number): EditorHistorySnapshot;
|
|
289
|
-
export declare function autosaveMetadataFailed(snapshot: EditorHistorySnapshot, message?: string): EditorHistorySnapshot;
|
|
290
|
-
export declare function autosaveContentFailed(snapshot: EditorHistorySnapshot, message?: string): EditorHistorySnapshot;
|
|
291
|
-
export declare function clearMetadataError(snapshot: EditorHistorySnapshot): EditorHistorySnapshot;
|
|
292
|
-
export declare function clearContentError(snapshot: EditorHistorySnapshot): EditorHistorySnapshot;
|
|
293
234
|
export declare function getCurrentValues<TValue extends EditorValueRecord | null>(snapshot: EditorValueSnapshot<TValue>): TValue;
|
|
294
|
-
|
|
295
|
-
|
|
235
|
+
/**
|
|
236
|
+
* How a server block value arrives (issue 1553): a read is a refresh under its policy;
|
|
237
|
+
* a response to this tab's own write (discard draft's block result) is rebased against
|
|
238
|
+
* what the person's edits are measured from.
|
|
239
|
+
*/
|
|
240
|
+
export type DraftBlockArrival = Readonly<{
|
|
241
|
+
kind: 'refreshed';
|
|
242
|
+
policy: RefreshPolicy;
|
|
243
|
+
}> | Readonly<{
|
|
244
|
+
kind: 'own-write';
|
|
245
|
+
since: OwnWriteSince<EditorBlockValues | null>;
|
|
246
|
+
}>;
|
|
296
247
|
export declare function initNewDraftBlock(snapshot: EditorHistorySnapshot, blockId: EditorBlockId, baseline: DraftBlockBaselineInput, meta: DraftBlockInitMetaInput): EditorHistorySnapshot;
|
|
297
|
-
|
|
248
|
+
/** What a server block refresh carries; the shape of editor-blocks' baseline seed. */
|
|
249
|
+
export type DraftBlockRefresh = Readonly<{
|
|
250
|
+
blockId: EditorBlockId;
|
|
251
|
+
baseline: DraftBlockBaselineInput;
|
|
252
|
+
initMeta?: DraftBlockInitMetaInput;
|
|
253
|
+
refreshMeta?: DraftBlockBaselineUpdateMetaInput;
|
|
254
|
+
}>;
|
|
255
|
+
/**
|
|
256
|
+
* Refreshes one block from the server: an existing draft moves under the policy, a
|
|
257
|
+
* missing one is created pristine (when the refresh says how to create it).
|
|
258
|
+
*/
|
|
259
|
+
export declare function refreshDraftBlock(snapshot: EditorHistorySnapshot, refresh: DraftBlockRefresh, arrival: DraftBlockArrival): EditorValueTransition;
|
|
298
260
|
export declare function removeDraftBlock(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
|
|
299
|
-
|
|
300
|
-
export declare function autosaveDraftSucceeded(snapshot: EditorHistorySnapshot, blockId: EditorBlockId, savedValues: EditorBlockValues | null, acknowledgedVersion: number, optimisticHash: string | null): EditorHistorySnapshot;
|
|
301
|
-
export declare function autosaveDraftFailed(snapshot: EditorHistorySnapshot, blockId: EditorBlockId, message?: string): EditorHistorySnapshot;
|
|
302
|
-
export declare function clearDraftError(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
|
|
303
|
-
export declare function setDraftPending(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
|
|
304
|
-
export declare function clearDraftPending(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
|
|
305
|
-
export declare function hydrateLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, input: Extract<EditorSystemOperation, {
|
|
261
|
+
type LinkedEntryHydration = Extract<EditorSystemOperation, {
|
|
306
262
|
type: 'hydrate-linked-entry';
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
263
|
+
}>;
|
|
264
|
+
/**
|
|
265
|
+
* Opening a linked entry from the rendered page is an ordinary keep-local refresh of its
|
|
266
|
+
* record. A render without a revision keeps the record's own rather than wiping it.
|
|
267
|
+
*/
|
|
268
|
+
export declare function hydrateLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, input: LinkedEntryHydration): EditorHistorySnapshot;
|
|
269
|
+
/**
|
|
270
|
+
* Throw away every unsaved local edit, synchronously and locally: each value is
|
|
271
|
+
* `discarded`, so it shows its baseline and any request still outstanding becomes
|
|
272
|
+
* abandoned (issue 1553, D1–D3). Linked entries keep their record (D2); the document's
|
|
273
|
+
* own entry is routed through content. Nothing is read from the server, so it can't
|
|
274
|
+
* fail; newer server values arrive by the usual paths.
|
|
275
|
+
*/
|
|
276
|
+
export declare function discardLocalEditsSnapshot(snapshot: EditorHistorySnapshot, contentOwnerEntryId?: string): EditorHistorySnapshot;
|
|
277
|
+
/** The linked entries whose local edits a discard would throw away. */
|
|
278
|
+
export declare function editedLinkedEntryIds(snapshot: EditorHistorySnapshot): readonly string[];
|
|
279
|
+
/**
|
|
280
|
+
* Undo and redo restore what the person sees, never sync state (issue 1553, D4).
|
|
281
|
+
* Displayed values and structure come from the target; baselines, revisions, requests
|
|
282
|
+
* and published baselines come from the present. A block record brought back by
|
|
283
|
+
* structure has no request (U3); other records missing from the target keep the present's.
|
|
284
|
+
*/
|
|
285
|
+
export declare function restoreDisplay(present: EditorHistorySnapshot, target: EditorHistorySnapshot): EditorHistorySnapshot;
|
|
312
286
|
export declare function replaceEditorBlockList(snapshot: EditorHistorySnapshot, blockList: readonly EditorBlockItem[]): EditorHistorySnapshot;
|
|
313
287
|
export declare function getDraftSnapshot(snapshot: EditorHistorySnapshot, blockId: string): EditorDraftSnapshot | null;
|
|
314
288
|
export declare function inspectDrafts(snapshot: EditorHistorySnapshot): EditorDraftSnapshot[];
|
|
@@ -320,5 +294,6 @@ export type EditorDraftUnpublishedBlockChange = Readonly<{
|
|
|
320
294
|
currentContent: EditorBlockValues | null;
|
|
321
295
|
publishedContent: EditorBlockValues | null;
|
|
322
296
|
}>;
|
|
323
|
-
export declare function
|
|
324
|
-
export declare function
|
|
297
|
+
export declare function blockPublicationState(draft: EditorDraftSnapshot, versions: EditorBlockVersions): EditorValuePublicationState<EditorBlockValues | null>;
|
|
298
|
+
export declare function getFirstUnpublishedDraftChange(snapshot: EditorHistorySnapshot, versionsFor: (blockId: EditorBlockId) => EditorBlockVersions): EditorDraftUnpublishedBlockChange | null;
|
|
299
|
+
export declare function hasUnpublishedDraftChanges(snapshot: EditorHistorySnapshot, versionsFor: (blockId: EditorBlockId) => EditorBlockVersions): boolean;
|
|
@@ -87,7 +87,7 @@ export declare function confirmStagedSession<TSnapshot, THistoryEntry, TTargetKe
|
|
|
87
87
|
export declare function rejectStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>, failure: EditorTransactionFailure): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
|
|
88
88
|
export declare function cancelStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
|
|
89
89
|
export declare function enqueueTransaction<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>, transaction: EditorTransaction<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
|
|
90
|
-
export declare function beginAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
|
|
90
|
+
export declare function beginAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>, captured?: EditorSaveBatch<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
|
|
91
91
|
export declare function confirmAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
|
|
92
92
|
export declare function rejectAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>, failure: EditorTransactionFailure): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
|
|
93
93
|
export declare function coalesceQueuedTransactions<TAction, THistoryEntry, TTargetKey extends string = string>(queue: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[], transaction: EditorTransaction<TAction, THistoryEntry, TTargetKey>): readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BlockFieldExtensions } from '../../../editor-blocks/src/block-editor/blockDraftBaselineSeed';
|
|
2
|
+
import type { EditorBlockCollectionOwner, EditorBlockCollectionReadBaseline } from '../../../core/src/index';
|
|
3
|
+
import { type ServerBlockAdmission } from './serverBlockAdmission';
|
|
4
|
+
import { type BlockVersionsState } from './stores/blockVersionsStore';
|
|
5
|
+
import { type EditorBlockVersions, type EditorInsertBlockCommand, type SavedBlockContentVersion } from '../../../core/src/index';
|
|
6
|
+
import type { ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
7
|
+
import { type DocumentLifecycleResult } from './documentLifecycle';
|
|
8
|
+
import type { EditorValueRecord, FooterModuleId } from '../../../core/src/index';
|
|
9
|
+
import type { EditorLeaseUiState } from './editorLeaseUiState';
|
|
10
|
+
import type { DraftsSlice } from '../../../editor-blocks/src/block-editor/types';
|
|
11
|
+
import { type EditorEditability } from '../controller/editorEditability';
|
|
12
|
+
export { unmanagedSurfaceEditability } from '../controller/editorEditability';
|
|
13
|
+
import { type LinkedEntryLeaseState } from './stores/linkedEntryLeaseStore';
|
|
14
|
+
import { type DocumentValueRefreshInput, type OwnWrite, type PublishSuccessRefresh, type ValueRefresh } from './editorRefresh';
|
|
15
|
+
import { type RemoteDraftsState } from './stores/remoteDraftsStore';
|
|
16
|
+
import { type LinkedSaveHandoversState } from './stores/linkedSaveHandoversStore';
|
|
2
17
|
import { type EditorUnpublishedState } from '../controller/deriveEditorUnpublishedState';
|
|
3
18
|
import { type AutosaveState } from './stores/autosaveStore';
|
|
4
19
|
import { type GeneratedIconAssetsState } from './stores/generatedIconAssetsStore';
|
|
5
20
|
import { type ArrayKeysState } from './stores/arrayKeysStore';
|
|
6
21
|
import { type ViewportState } from './stores/viewportStore';
|
|
7
22
|
import { type AiOverlaysState } from './stores/aiOverlaysSlice';
|
|
8
|
-
import { type EditorValueSnapshot, type EditorBlockItem, type EditorBlockId, type NormalizedEditorBlockItem, type
|
|
23
|
+
import { type EditorValueSnapshot, type EditorBlockItem, type EditorBlockId, type NormalizedEditorBlockItem, type EditorCommand, type EditorContentValues, type EditorDraftUnpublishedBlockChange, type EditorEffect, type EditorHistorySnapshot, type EditorLinkedEntrySnapshot, type EditorMetadataValues, type EditorValueKey, type StartedSend } from './editorHistory';
|
|
24
|
+
import { type RefreshPolicy, type SendMode, type ValueSyncOutcome } from '../sync/valueSync';
|
|
25
|
+
import type { BaselineRevision, SaveFailure, SendId, ValueSync } from '../../../core/src/index';
|
|
9
26
|
import { type HistoryState } from './editorHistory';
|
|
10
|
-
import type { FocusRequest, FocusTarget } from './stores/types';
|
|
11
|
-
import { type LinkedContentEntryId } from '../linkedEntries/domain';
|
|
27
|
+
import type { FocusRequest, FocusTarget, HeldOperation, LifecycleFailure, LifecycleOperation, LifecycleStatus } from './stores/types';
|
|
28
|
+
import { type LinkedContentEntryId, type LinkedEntryOpenTarget } from '../linkedEntries/domain';
|
|
12
29
|
import { type BlockDraftSaveability, type BlockDraftValidationIssue, type ResolveBlockManifest } from './blockValidationView';
|
|
13
|
-
export type { AutosaveStatusValue, AutosaveStatus, AutosaveHandle, AutosaveType,
|
|
30
|
+
export type { AutosaveStatusValue, AutosaveStatus, AutosaveHandle, AutosaveType, FocusRequest, HeldOperation, LifecycleFailure, LifecycleOperation, LifecycleOutcome, LifecycleStatus, ViewportMode, ViewportWidth, ZoomLevel, } from './stores/types';
|
|
14
31
|
export type { AutosaveState } from './stores/autosaveStore';
|
|
15
32
|
export type { ArrayKeysState } from './stores/arrayKeysStore';
|
|
16
33
|
export type { ViewportState } from './stores/viewportStore';
|
|
@@ -41,15 +58,24 @@ export type ActivePreviewField = (Readonly<{
|
|
|
41
58
|
entryId: LinkedContentEntryId;
|
|
42
59
|
fieldPath: string;
|
|
43
60
|
}>) | null;
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
/** How a save request settled. `at` is the ISO time the shell observed the response. */
|
|
62
|
+
export type SendResult = Readonly<{
|
|
63
|
+
kind: 'succeeded';
|
|
64
|
+
values: Record<string, unknown> | null;
|
|
65
|
+
revision: BaselineRevision;
|
|
66
|
+
at: string;
|
|
67
|
+
published?: Readonly<{
|
|
68
|
+
kind: 'known';
|
|
69
|
+
values: Record<string, unknown> | null;
|
|
70
|
+
} | {
|
|
71
|
+
kind: 'unknown';
|
|
72
|
+
}>;
|
|
73
|
+
blockVersion?: SavedBlockContentVersion;
|
|
74
|
+
}> | Readonly<{
|
|
75
|
+
kind: 'failed';
|
|
76
|
+
failure: SaveFailure;
|
|
52
77
|
}>;
|
|
78
|
+
export type { EditorValueKey, StartedSend } from './editorHistory';
|
|
53
79
|
/**
|
|
54
80
|
* Form-facing metadata facade. Consumers pass plain records for ergonomics;
|
|
55
81
|
* the reducer core normalizes and brands values at this boundary.
|
|
@@ -57,16 +83,16 @@ export type AutosaveAcknowledgement = Readonly<{
|
|
|
57
83
|
export type MetadataState = {
|
|
58
84
|
getSnapshot: () => MetadataSnapshot;
|
|
59
85
|
getCurrentValues: () => Record<string, unknown> | null;
|
|
60
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Applies a server read of this value as a refresh event (issue 1553). Ordinary
|
|
88
|
+
* refreshes are keep-local; returns whether local edits were discarded.
|
|
89
|
+
*/
|
|
90
|
+
refresh: (input: DocumentValueRefreshInput, policy?: RefreshPolicy) => boolean;
|
|
61
91
|
setPublishedBaseline: (published: Record<string, unknown> | null) => void;
|
|
62
92
|
hasUnpublishedChanges: () => boolean;
|
|
63
|
-
setBaseline: (baseline: Record<string, unknown> | null) => void;
|
|
64
93
|
setCurrentValues: (values: Record<string, unknown> | null) => void;
|
|
65
94
|
setAtPath: (path: string, value: unknown) => void;
|
|
66
95
|
getAtPath: <R = unknown>(path: string) => R | undefined;
|
|
67
|
-
autosaveSucceeded: (savedValues: Record<string, unknown> | null, acknowledgement?: AutosaveAcknowledgement) => void;
|
|
68
|
-
autosaveFailed: (message?: string) => void;
|
|
69
|
-
clearError: () => void;
|
|
70
96
|
};
|
|
71
97
|
export type ContentState = Omit<MetadataState, 'getSnapshot'> & {
|
|
72
98
|
getSnapshot: () => ContentSnapshot;
|
|
@@ -91,18 +117,7 @@ export type PreviewInspection = Readonly<{
|
|
|
91
117
|
}>;
|
|
92
118
|
export type LinkedEntryState = {
|
|
93
119
|
getSelectedEntryId: () => LinkedContentEntryId | null;
|
|
94
|
-
open: (target:
|
|
95
|
-
entryId: string;
|
|
96
|
-
contentTypeKey: string;
|
|
97
|
-
contentTypeLabel: string;
|
|
98
|
-
title: string;
|
|
99
|
-
optimisticHash?: string | null;
|
|
100
|
-
content: Record<string, unknown>;
|
|
101
|
-
contentType: {
|
|
102
|
-
titleField?: string | null;
|
|
103
|
-
fields: readonly Record<string, unknown>[];
|
|
104
|
-
};
|
|
105
|
-
}) => void;
|
|
120
|
+
open: (target: LinkedEntryOpenTarget) => void;
|
|
106
121
|
close: () => void;
|
|
107
122
|
discard: (entryId?: string) => void;
|
|
108
123
|
getSelectedSnapshot: () => EditorLinkedEntrySnapshot | null;
|
|
@@ -112,11 +127,6 @@ export type LinkedEntryState = {
|
|
|
112
127
|
setCurrentValues: (values: Record<string, unknown> | null, entryId?: string) => void;
|
|
113
128
|
setAtPath: (path: string, value: unknown, entryId?: string) => void;
|
|
114
129
|
getAtPath: <R = unknown>(path: string, entryId?: string) => R | undefined;
|
|
115
|
-
saveSucceeded: (entryId: string, content: Record<string, unknown> | null, acknowledgement?: AutosaveAcknowledgement & {
|
|
116
|
-
optimisticHash?: string | null;
|
|
117
|
-
}) => void;
|
|
118
|
-
saveFailed: (entryId: string, message?: string) => void;
|
|
119
|
-
clearError: (entryId?: string) => void;
|
|
120
130
|
};
|
|
121
131
|
export type EditorPreviewInspectorStore = {
|
|
122
132
|
getState: () => {
|
|
@@ -127,6 +137,12 @@ export type EditorPreviewInspectorStore = {
|
|
|
127
137
|
structure?: AiOverlaysState['structure'];
|
|
128
138
|
}>;
|
|
129
139
|
linkedEntries: Pick<LinkedEntryState, 'inspect'>;
|
|
140
|
+
blockVersions: Pick<BlockVersionsState, 'get' | 'revision'>;
|
|
141
|
+
remoteDrafts?: RemoteDraftsState['remoteDrafts'];
|
|
142
|
+
linkedSaveHandovers?: LinkedSaveHandoversState['linkedSaveHandovers'];
|
|
143
|
+
content?: Pick<ContentState, 'getSnapshot'>;
|
|
144
|
+
/** Decides the render source: a viewer renders live drafts, any other tab its own edits. */
|
|
145
|
+
editability: EditorEditability;
|
|
130
146
|
};
|
|
131
147
|
};
|
|
132
148
|
export type EditorHistoryState = HistoryState<EditorHistorySnapshot>;
|
|
@@ -155,54 +171,40 @@ export type BlockValidationState = {
|
|
|
155
171
|
} | null;
|
|
156
172
|
getBlockSaveability: (blockId: EditorBlockId) => BlockDraftSaveability;
|
|
157
173
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
* can pass raw form values; the reducer core normalizes and brands them here.
|
|
165
|
-
*/
|
|
166
|
-
initNewBlock: (blockId: EditorBlockId, baseline: DraftBlockBaselineInput, meta: DraftBlockInitMetaInput) => void;
|
|
167
|
-
updateBlockBaseline: (blockId: EditorBlockId, baseline: DraftBlockBaselineInput, meta?: DraftBlockBaselineUpdateMetaInput) => void;
|
|
168
|
-
setBlockPublishedBaselinesFromBlocks: (blocks: readonly BlockPublishedBaselineInput[]) => void;
|
|
169
|
-
edit: (blockId: EditorBlockId, content: Record<string, unknown> | null) => void;
|
|
170
|
-
remove: (blockId: EditorBlockId) => void;
|
|
171
|
-
clearError: (blockId: EditorBlockId) => void;
|
|
172
|
-
setPending: (blockId: EditorBlockId) => void;
|
|
173
|
-
clearPending: (blockId: EditorBlockId) => void;
|
|
174
|
-
setFailed: (blockId: EditorBlockId, message?: string) => void;
|
|
175
|
-
autosaveSucceeded: (blockId: EditorBlockId, content: Record<string, unknown> | null, acknowledgement?: AutosaveAcknowledgement) => void;
|
|
176
|
-
autosaveFailed: (blockId: EditorBlockId, message?: string) => void;
|
|
177
|
-
setAtPath: (blockId: EditorBlockId, path: string, value: unknown) => void;
|
|
178
|
-
getAtPath: <T = unknown>(blockId: EditorBlockId, path: string) => T | undefined;
|
|
179
|
-
updateBlockOrder: (blockIds: EditorBlockId[]) => void;
|
|
174
|
+
/**
|
|
175
|
+
* Form-facing drafts facade: editor-blocks' `DraftsSlice` contract plus the store-only
|
|
176
|
+
* publish helpers. Baseline inputs stay unbranded so editor consumers can pass raw
|
|
177
|
+
* form values; the reducer core normalizes and brands them here.
|
|
178
|
+
*/
|
|
179
|
+
export type DraftsState = DraftsSlice & {
|
|
180
180
|
hasUnpublishedBlockChanges: () => boolean;
|
|
181
181
|
getFirstUnpublishedBlockChange: () => EditorDraftUnpublishedBlockChange | null;
|
|
182
|
-
markAllBlocksAsPublished: () => void;
|
|
183
182
|
onChange: (listener: (blockId: EditorBlockId) => void) => () => void;
|
|
183
|
+
/**
|
|
184
|
+
* Shows `content` as the block's local edit without a history entry: a preview runtime
|
|
185
|
+
* (customize) drives these values and owns their undo (issue 1553).
|
|
186
|
+
*/
|
|
187
|
+
editWithoutHistory: (blockId: EditorBlockId, content: Record<string, unknown> | null) => void;
|
|
184
188
|
};
|
|
189
|
+
/** Local edits are refused while the tab can't write (read-only, acquiring or viewing). */
|
|
190
|
+
export type EditorUserOperationOutcome = 'applied' | 'unchanged' | 'refused';
|
|
191
|
+
export type EditorPublishedVersionScope = 'metadata' | 'content';
|
|
185
192
|
export type CreateEditorUiStoreOptions = Readonly<{
|
|
193
|
+
publishedVersionScope?: EditorPublishedVersionScope;
|
|
194
|
+
contentOwnerEntryId?: string;
|
|
195
|
+
/** Required so a new caller can't write freely by omission; unmanaged surfaces say so explicitly. */
|
|
196
|
+
editability: EditorLeaseUiState['editability'];
|
|
186
197
|
resolveBlockManifest?: ResolveBlockManifest;
|
|
198
|
+
resolveBlockFieldExtensions?: () => BlockFieldExtensions | null | undefined;
|
|
187
199
|
}>;
|
|
188
200
|
type RestoreListener = (transition: {
|
|
189
201
|
previous: EditorHistorySnapshot;
|
|
190
202
|
next: EditorHistorySnapshot;
|
|
191
203
|
effects: readonly EditorEffect[];
|
|
192
204
|
}) => void;
|
|
193
|
-
export type ApplyPublishSuccessTransitionInput =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
current: Record<string, unknown> | null;
|
|
197
|
-
published: Record<string, unknown> | null;
|
|
198
|
-
}>;
|
|
199
|
-
content: Readonly<{
|
|
200
|
-
published: Record<string, unknown> | null;
|
|
201
|
-
versionAtPublishStart: number;
|
|
202
|
-
}>;
|
|
203
|
-
blockPublishedBaselines: readonly BlockPublishedBaselineInput[] | null;
|
|
204
|
-
}>;
|
|
205
|
-
export type EditorUiState = {
|
|
205
|
+
export type ApplyPublishSuccessTransitionInput = PublishSuccessRefresh;
|
|
206
|
+
export type EditorUiState = EditorLeaseUiState & LinkedEntryLeaseState & RemoteDraftsState & LinkedSaveHandoversState & {
|
|
207
|
+
contentOwnerEntryId: string | undefined;
|
|
206
208
|
drawerOpen: boolean;
|
|
207
209
|
previewSidebarTab: PreviewSidebarTab;
|
|
208
210
|
previewInspection: PreviewInspection;
|
|
@@ -222,9 +224,36 @@ export type EditorUiState = {
|
|
|
222
224
|
clearFocus: () => void;
|
|
223
225
|
setActiveBlockId: (id: EditorBlockId | null) => void;
|
|
224
226
|
getDraftSyncState: () => 'baseline' | 'pending' | 'failed';
|
|
227
|
+
/** The document's lifecycle operations (`LifecycleOperation`); outside history, beside the values' states. */
|
|
228
|
+
lifecycle: LifecycleStatus;
|
|
229
|
+
/** When a save or lifecycle operation was last accepted (ISO time). */
|
|
230
|
+
lastSavedAt: string | null;
|
|
231
|
+
/** How many saves have been accepted; a `server` lifecycle failure holds until this moves. */
|
|
232
|
+
acceptedSaves: number;
|
|
233
|
+
setLifecycle: (change: LifecycleChange) => void;
|
|
234
|
+
/**
|
|
235
|
+
* Starts a save for each value that may send now, allocating one id per request.
|
|
236
|
+
* Returns what each started request carries; values that may not send are left out.
|
|
237
|
+
*/
|
|
238
|
+
beginSends: (keys: readonly EditorValueKey[], mode?: SendMode, checkpoints?: ReadonlyMap<string, Record<string, unknown> | null>) => readonly StartedSend[];
|
|
239
|
+
/** One value's sync state; `undefined` when that block or linked entry isn't loaded. */
|
|
240
|
+
getValueSync: (key: EditorValueKey) => ValueSync<EditorValueRecord | null> | undefined;
|
|
241
|
+
/** Applies a response. Only the value's current request is acknowledged; others are ignored. */
|
|
242
|
+
settle: (key: EditorValueKey, id: SendId, result: SendResult) => ValueSyncOutcome;
|
|
243
|
+
/** Throws away every unsaved local edit, synchronously; see `discardLocalEditsSnapshot`. */
|
|
244
|
+
discardLocalEdits: () => void;
|
|
225
245
|
getUnpublishedState: () => EditorUnpublishedState;
|
|
226
246
|
hasAnyUnpublishedChanges: () => boolean;
|
|
247
|
+
applyDocumentLifecycle: (result: DocumentLifecycleResult) => void;
|
|
227
248
|
applyPublishSuccessTransition: (transition: ApplyPublishSuccessTransitionInput) => void;
|
|
249
|
+
/** Applies what this tab's own writes returned, rebased under any edits (`OwnWrite`). */
|
|
250
|
+
applyOwnWrites: (writes: readonly OwnWrite[]) => void;
|
|
251
|
+
/**
|
|
252
|
+
* Applies server reads as refresh events in one update, under one policy (issue 1553):
|
|
253
|
+
* keep-local for ordinary refreshes, take-back for a lease grant, replace for discard
|
|
254
|
+
* draft. Returns whether local edits were discarded.
|
|
255
|
+
*/
|
|
256
|
+
refreshValues: (refreshes: readonly ValueRefresh[], policy: RefreshPolicy) => boolean;
|
|
228
257
|
history: {
|
|
229
258
|
getState: () => EditorHistoryState;
|
|
230
259
|
canUndo: () => boolean;
|
|
@@ -241,9 +270,16 @@ export type EditorUiState = {
|
|
|
241
270
|
};
|
|
242
271
|
blockValidation: BlockValidationState;
|
|
243
272
|
structure: {
|
|
273
|
+
getOwner: () => EditorBlockCollectionOwner | null;
|
|
274
|
+
mount: (owner: EditorBlockCollectionOwner, blocks: readonly ServerBlockItem[], reads?: readonly EditorBlockCollectionReadBaseline[]) => void;
|
|
275
|
+
unmount: (owner: EditorBlockCollectionOwner) => void;
|
|
244
276
|
getList: () => readonly NormalizedEditorBlockItem[];
|
|
245
277
|
replaceList: (next: readonly EditorBlockItem[]) => void;
|
|
246
278
|
};
|
|
279
|
+
blockVersions: BlockVersionsState;
|
|
280
|
+
admitServerBlocks: (entries: readonly ServerBlockAdmission[], policy?: RefreshPolicy) => void;
|
|
281
|
+
insertServerBlock: (command: EditorInsertBlockCommand, versions: EditorBlockVersions) => void;
|
|
282
|
+
remapServerBlock: (fromId: EditorBlockId, toId: EditorBlockId, versions: EditorBlockVersions) => void;
|
|
247
283
|
drafts: DraftsState;
|
|
248
284
|
metadata: MetadataState;
|
|
249
285
|
content: ContentState;
|
|
@@ -254,7 +290,25 @@ export type EditorUiState = {
|
|
|
254
290
|
viewport: ViewportState;
|
|
255
291
|
aiOverlays: AiOverlaysState;
|
|
256
292
|
};
|
|
257
|
-
|
|
293
|
+
/**
|
|
294
|
+
* How a lifecycle operation moves the status: it starts, finishes (recording when it
|
|
295
|
+
* saved, if it did) or fails.
|
|
296
|
+
*/
|
|
297
|
+
export type LifecycleChange = Readonly<{
|
|
298
|
+
kind: 'start';
|
|
299
|
+
operation: LifecycleOperation;
|
|
300
|
+
}> | Readonly<{
|
|
301
|
+
kind: 'hold';
|
|
302
|
+
operation: HeldOperation;
|
|
303
|
+
}> | Readonly<{
|
|
304
|
+
kind: 'finish';
|
|
305
|
+
at: string | null;
|
|
306
|
+
}> | Readonly<{
|
|
307
|
+
kind: 'fail';
|
|
308
|
+
operation: LifecycleOperation;
|
|
309
|
+
failure: LifecycleFailure;
|
|
310
|
+
}>;
|
|
311
|
+
export declare function createEditorUiStore(options: CreateEditorUiStoreOptions): import("zustand").StoreApi<EditorUiState>;
|
|
258
312
|
export type EditorUiStoreInstance = ReturnType<typeof createEditorUiStore>;
|
|
259
313
|
export declare const EditorUiStoreProvider: import("react").Provider<import("zustand").StoreApi<EditorUiState> | null>;
|
|
260
314
|
export declare function useEditorUiStore<T>(selector: (state: EditorUiState) => T): T;
|