@riverbankcms/sdk 0.147.0 → 0.149.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 +16 -0
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DtpB3_sS.mjs → PreviewEditorSidebar-DBKln68M.mjs} +301 -205
- package/dist/{PreviewEditorUI-DxTLgaHo.mjs → PreviewEditorUI-DpRX4Mum.mjs} +68 -63
- package/dist/{PreviewQueryProvider-Dd4dxOiU.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
- package/dist/{SdkPreviewModeRuntime-DMMNCngt.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +1247 -541
- package/dist/{SiteChromeCustomizeContext-DQXZXiqS.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +209720 -204978
- package/dist/_dts/ai/src/contracts/proposals.d.ts +0 -33
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +0 -3
- package/dist/_dts/api/src/accessAdmin.d.ts +0 -4
- package/dist/_dts/api/src/accountApi.d.ts +1 -1
- 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 +33 -50
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
- package/dist/_dts/api/src/bookingOperations.d.ts +9 -11
- package/dist/_dts/api/src/bookingRecords.d.ts +16 -11
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/bookings.d.ts +7 -7
- package/dist/_dts/api/src/calendar.d.ts +9 -9
- package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -8
- package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
- 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/customerMembershipOutcomes.d.ts +1 -1
- 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 +135 -51
- package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +29 -7
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +0 -8
- 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 -7
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/navigation.d.ts +5 -5
- 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 +4 -2
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +6 -29
- package/dist/_dts/api/src/redirects.d.ts +3 -3
- package/dist/_dts/api/src/request.d.ts +11 -2
- 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 +1 -2
- 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/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 +9 -2
- 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/siteManagementEndpoints.d.ts +15 -8
- package/dist/_dts/api/src/siteMembers.d.ts +10 -10
- package/dist/_dts/api/src/siteOnboarding.d.ts +14 -0
- package/dist/_dts/api/src/siteOperations.d.ts +6 -2
- 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/client/events.d.ts +3 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -14
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +4 -13
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +9 -8
- 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 +28 -28
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +7 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
- 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 +4 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +6 -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 +72 -12
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +36 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +3 -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 +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.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.state.d.ts +17 -2
- 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 +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
- 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/PaymentSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -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 +29 -29
- 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 +54 -6
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
- 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/utils/demoBookingPassStorage.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
- package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
- 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/editLeaseHandover.d.ts +30 -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/lib/browserStorage.d.ts +5 -0
- 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/booking-flexible-balance.d.ts +2 -2
- package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
- package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
- package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
- package/dist/_dts/core/src/branded.d.ts +15 -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 +60 -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 +7 -0
- package/dist/_dts/core/src/uuid.d.ts +7 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +456 -189
- 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/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/MediaPickerDialog.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -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/index.d.ts +2 -0
- 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/composer/mergeDrafts.d.ts +8 -3
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +6 -3
- 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 +23 -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/preview-next/src/client/previewAuthStore.d.ts +7 -0
- package/dist/_dts/preview-next/src/constants.d.ts +4 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -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 +1 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
- 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/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
- package/dist/_dts/ui/src/color-picker.d.ts +1 -1
- package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
- package/dist/client/{BookingMailingListNote-1n4Ch_u_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +504 -163
- package/dist/client/DemoBookingPortalAccess-BFGB1Fay.mjs +344 -0
- package/dist/client/{EventCombined.client-C0pgma9y.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
- package/dist/client/{EventListing.client-4fhLOvHP.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DScC4F3w.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
- package/dist/client/{TerminalPanel-B5ZUsYhe.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
- package/dist/client/{ThemedButton-DoVIV1Ao.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
- package/dist/client/{accordion-CoT5g7zo.mjs → accordion-DXWIfT3T.mjs} +1 -1
- package/dist/client/{bookingForm-BWxB46xD.mjs → bookingForm-CjZgHNvv.mjs} +216 -63
- package/dist/client/bookings.mjs +1187 -692
- package/dist/client/{carousel-DtNYWFd3.mjs → carousel-DSLikmvZ.mjs} +1 -1
- package/dist/client/{cart-z4qZih1Y.mjs → cart-HDjWReFt.mjs} +3 -3
- package/dist/client/{checkout-DpL7euFH.mjs → checkout-CUvRZA3W.mjs} +3 -3
- package/dist/client/{checkoutUrls-BEfR7kVu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
- package/dist/client/client.mjs +2711 -1684
- package/dist/client/{context-C8TinPJc.mjs → context-DFmaZa-Q.mjs} +4 -3
- package/dist/client/{dates-vwwxTeB0.mjs → dates-BBep1JnF.mjs} +56 -11
- package/dist/client/{eventCalendar-DIbHfJXO.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
- package/dist/client/{eventCombined-DoGMJ6cg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
- package/dist/client/{eventDetails-BjN9v6a1.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
- package/dist/client/{eventListing-DajjWgOv.mjs → eventListing-BMt5snal.mjs} +4 -4
- package/dist/client/{eventRegistration-DMq9gMA-.mjs → eventRegistration-O6ZxHfOb.mjs} +422 -570
- package/dist/client/{form-Qf6qTbos.mjs → form-DFa1D8vt.mjs} +3 -3
- package/dist/client/{headerSection-D7qJrqFX.mjs → headerSection-CmjHLR-N.mjs} +3 -3
- package/dist/client/hooks.mjs +414 -182
- package/dist/client/{locationMap-CCF9-t_0.mjs → locationMap-BXKP_lGh.mjs} +3 -3
- package/dist/client/{media-CwBGetqC.mjs → media-Cl38iOMI.mjs} +10 -3
- package/dist/client/{newsletterForm-DzCLSP4S.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
- package/dist/client/{pricing-Cgxv2KLC.mjs → pricing-KEAEsibq.mjs} +1 -1
- package/dist/client/{productDetail-ru9w5GHx.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
- package/dist/client/{productList-zaapKSl-.mjs → productList-D91V0sYa.mjs} +3 -3
- package/dist/client/{propsDecoder-CwvvNOHx.mjs → propsDecoder-DZd6RJeA.mjs} +244 -94
- package/dist/client/rendering/client.mjs +2656 -1705
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +3430 -2352
- package/dist/client/{routeIslandApiConfig-BwVFo0Y4.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
- package/dist/client/{shop-mktkXvbV.mjs → shop-4F2jLQPI.mjs} +131 -85
- package/dist/client/{shop-commerce-De7gEnkA.mjs → shop-commerce-BbfCJjB3.mjs} +25 -13
- package/dist/client/{shop-commerce-store-B3MCxIBW.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
- package/dist/client/{shopShared-TqExh235.mjs → shopShared-DlONJt0T.mjs} +4 -4
- package/dist/client/{useEventFilters-n_OjkIjX.mjs → useEventFilters-COYyL3m7.mjs} +32 -17
- package/dist/preview-next/before-render.mjs +207 -105
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/constants.mjs +5 -1
- package/dist/preview-next/index.mjs +5 -1
- package/dist/preview-next/keepAlive.mjs +341 -165
- package/dist/preview-next/middleware.mjs +207 -105
- package/dist/{previewAuthStore-C_EHQ5XA.mjs → previewAuthStore-BBmV7UsW.mjs} +243 -112
- package/dist/{sdk-runtime-BIkJg5y1.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
- package/dist/{separator-C9qDP95Z.mjs → separator-ByL72zUT.mjs} +1 -1
- package/dist/server/components.mjs +1839 -1475
- package/dist/server/config-validation.mjs +381 -166
- package/dist/server/config.mjs +381 -166
- package/dist/server/data.mjs +381 -166
- package/dist/server/index.mjs +214 -110
- package/dist/server/next.mjs +663 -351
- package/dist/server/page-converter.mjs +198 -79
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1536 -1169
- package/dist/server/rendering.mjs +2432 -2068
- package/dist/server/routing.mjs +456 -173
- package/dist/server/server.mjs +447 -267
- package/package.json +1 -1
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
- package/dist/_dts/billing/src/plans/display.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +0 -3
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
- 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/client/DiscountCodeDisclosure-CKJtz0mY.mjs +0 -137
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ContentEditorServices } from '../services';
|
|
2
|
+
import type { PublishPageSurfaceResponse } from '../../../api/src/content-editor';
|
|
3
|
+
import type { RoutingHelpers } from '../../../content-model/src/index';
|
|
4
|
+
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
5
|
+
import type { AutosaveHandle } from '../ui/stores/types';
|
|
6
|
+
type ValueAutosaveInput = Readonly<{
|
|
7
|
+
services: ContentEditorServices;
|
|
8
|
+
uiStore: EditorUiStoreInstance;
|
|
9
|
+
delay: number;
|
|
10
|
+
routing?: RoutingHelpers;
|
|
11
|
+
onPublication?: (publication: Extract<PublishPageSurfaceResponse, {
|
|
12
|
+
publication: 'published';
|
|
13
|
+
}>) => void;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function useEntryValueAutosaves(input: ValueAutosaveInput & {
|
|
16
|
+
isPage: boolean;
|
|
17
|
+
}): {
|
|
18
|
+
metadataAutosave: AutosaveHandle;
|
|
19
|
+
contentAutosave: AutosaveHandle;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BlockFieldExtensions } from '../../../editor-blocks/src/block-editor/blockDraftBaselineSeed';
|
|
2
|
+
import { type ContentEntrySnapshot, type RoutingHelpers } from '../../../content-model/src/index';
|
|
3
|
+
import { type EditorPublishedVersionScope } from '../ui/editorUiStore';
|
|
4
|
+
import type { ResolveBlockManifest } from '../ui/blockValidationView';
|
|
5
|
+
import { type EditorLeaseParticipation } from './editorLeaseParticipation';
|
|
6
|
+
import type { ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
7
|
+
type InitialEditorUiStoreOptions = Readonly<{
|
|
8
|
+
entry: ContentEntrySnapshot;
|
|
9
|
+
routing: RoutingHelpers;
|
|
10
|
+
hasRoute: boolean;
|
|
11
|
+
isPage: boolean;
|
|
12
|
+
publishedVersionScope: EditorPublishedVersionScope;
|
|
13
|
+
initialMetadataRevision: string | null;
|
|
14
|
+
resolveBlockManifest?: ResolveBlockManifest;
|
|
15
|
+
blockFieldExtensions?: BlockFieldExtensions | null;
|
|
16
|
+
initialBlocks: readonly ServerBlockItem[];
|
|
17
|
+
editLease: EditorLeaseParticipation;
|
|
18
|
+
}>;
|
|
19
|
+
/** Own store identity and synchronous metadata hydration together. */
|
|
20
|
+
export declare function useInitialEditorUiStore({ entry, routing, hasRoute, isPage, publishedVersionScope, initialMetadataRevision, resolveBlockManifest, editLease, blockFieldExtensions, initialBlocks, }: InitialEditorUiStoreOptions): {
|
|
21
|
+
uiStore: import("zustand").StoreApi<import("..").EditorUiState>;
|
|
22
|
+
hasHydratedContentRef: import("react").RefObject<boolean>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { ContentEntrySnapshot, RoutingHelpers } from '../../../content-model/src/index';
|
|
3
|
+
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
4
|
+
export declare function useMetadataReconciliation(input: Readonly<{
|
|
5
|
+
initialEntry?: ContentEntrySnapshot | null;
|
|
6
|
+
revision?: string | null;
|
|
7
|
+
routing: RoutingHelpers;
|
|
8
|
+
uiStore: EditorUiStoreInstance;
|
|
9
|
+
}>): void;
|
|
10
|
+
export declare function useContentReconciliation(input: Readonly<{
|
|
11
|
+
isPage: boolean;
|
|
12
|
+
initialContent?: Record<string, unknown> | null;
|
|
13
|
+
published?: Record<string, unknown> | null;
|
|
14
|
+
revision?: string | null;
|
|
15
|
+
hydratedRef: RefObject<boolean>;
|
|
16
|
+
uiStore: EditorUiStoreInstance;
|
|
17
|
+
}>): void;
|
|
@@ -3,7 +3,7 @@ import type { ApiClient } from '../../api/src/request';
|
|
|
3
3
|
import type { FooterEditorTarget } from './footerComposer';
|
|
4
4
|
import type { FooterNavigationLayoutAccess } from './useFooterNavigationLayout';
|
|
5
5
|
export type FooterComposerPanelProps = Readonly<{
|
|
6
|
-
apiClient: ApiClient
|
|
6
|
+
apiClient: ApiClient<'getFooterComposition' | 'updateFooterComposition' | 'getPublicProfile' | 'updatePublicProfile' | 'getNavigationMenus' | 'getMailingListAuthoringContext' | 'listForms' | 'applySiteStyleSelection'>;
|
|
7
7
|
siteId: string;
|
|
8
8
|
customFooterMode: 'default' | 'blocks' | 'default+blocks' | 'none';
|
|
9
9
|
manageLinksHref: string;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
2
2
|
import { type BlockedPublishPlan } from "./blockedPublishPlan";
|
|
3
|
+
/**
|
|
4
|
+
* Reveals and focuses what blocks publishing. The banner's message isn't set here: it
|
|
5
|
+
* derives from the recorded `invalid-blocks` failure and the current validation.
|
|
6
|
+
*/
|
|
3
7
|
export declare function applyBlockedPublishPlan(uiStore: EditorUiStoreInstance, plan: Extract<BlockedPublishPlan, {
|
|
4
8
|
type: "blocked";
|
|
5
|
-
}
|
|
9
|
+
}>): void;
|
|
@@ -1,48 +1,9 @@
|
|
|
1
1
|
import type { BlockDraftSaveability } from "../../../block-form/src/blockDraftSaveability";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
blockId: EditorBlockId;
|
|
11
|
-
}> | Readonly<{
|
|
12
|
-
kind: "validPending";
|
|
13
|
-
blockId: EditorBlockId;
|
|
14
|
-
version: number;
|
|
15
|
-
}> | Readonly<{
|
|
16
|
-
kind: "invalidPending";
|
|
17
|
-
blockId: EditorBlockId;
|
|
18
|
-
issues: BlockDraftSaveability["issues"];
|
|
19
|
-
}> | Readonly<{
|
|
20
|
-
kind: "saving";
|
|
21
|
-
blockId: EditorBlockId;
|
|
22
|
-
version: number;
|
|
23
|
-
}> | Readonly<{
|
|
24
|
-
kind: "saveFailed";
|
|
25
|
-
blockId: EditorBlockId;
|
|
26
|
-
error: string;
|
|
27
|
-
issues: BlockDraftSaveability["issues"];
|
|
28
|
-
}>;
|
|
29
|
-
export type BlockDraftAutosaveDecision = Readonly<{
|
|
30
|
-
type: "save";
|
|
31
|
-
blockId: EditorBlockId;
|
|
32
|
-
data: Record<string, unknown>;
|
|
33
|
-
acknowledgedVersion: number;
|
|
34
|
-
}> | Readonly<{
|
|
35
|
-
type: "skip";
|
|
36
|
-
blockId: EditorBlockId;
|
|
37
|
-
reason: "baseline" | "invalid" | "saving" | "saveFailed";
|
|
38
|
-
}>;
|
|
39
|
-
export declare function deriveBlockDraftLifecycle(input: Readonly<{
|
|
40
|
-
snapshot: EditorDraftSnapshot;
|
|
41
|
-
saveability: BlockDraftSaveability;
|
|
42
|
-
autosaveStatus?: AutosaveStatusValue;
|
|
43
|
-
}>): BlockDraftLifecycle;
|
|
44
|
-
export declare function deriveBlockDraftAutosaveDecision(input: Readonly<{
|
|
45
|
-
snapshot: CurrentEditorDraftSnapshot;
|
|
46
|
-
lifecycle: BlockDraftLifecycle;
|
|
47
|
-
}>): BlockDraftAutosaveDecision;
|
|
48
|
-
export {};
|
|
2
|
+
/**
|
|
3
|
+
* Whether a block's values may be sent: validation found nothing blocking. A failed save
|
|
4
|
+
* with no validation issues is saveable again; whether it is retried now is `canSend`'s
|
|
5
|
+
* rule (issue 1553, rows S3 and S3b).
|
|
6
|
+
*/
|
|
7
|
+
export declare function isBlockSaveable(saveability: BlockDraftSaveability): boolean;
|
|
8
|
+
/** The payload a block save sends: its values, unwrapped from a `data` envelope if present. */
|
|
9
|
+
export declare function blockSaveData(values: Record<string, unknown> | null): Record<string, unknown>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { EditLeaseAcquireResult, EditLeaseToken, EditLeaseView } from '../../../core/src/index';
|
|
2
|
+
import type { EditorEditability } from '../controller/editorEditability';
|
|
3
|
+
export type LeaseFailure = 'unavailable' | 'invalid' | 'required' | 'forbidden' | 'not-found';
|
|
4
|
+
type Phase = Readonly<{
|
|
5
|
+
kind: 'idle';
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
kind: 'suspended';
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
kind: 'requesting';
|
|
10
|
+
id: number;
|
|
11
|
+
takingBack: boolean;
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
kind: 'refreshing' | 'confirming';
|
|
14
|
+
id: number;
|
|
15
|
+
takingBack: boolean;
|
|
16
|
+
token: EditLeaseToken;
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
kind: 'checking';
|
|
19
|
+
id: number;
|
|
20
|
+
takingBack: boolean;
|
|
21
|
+
priorToken: EditLeaseToken | null;
|
|
22
|
+
showing: Extract<EditorEditability, {
|
|
23
|
+
kind: 'read-only';
|
|
24
|
+
}> | null;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
kind: 'editable';
|
|
27
|
+
id: number;
|
|
28
|
+
token: EditLeaseToken;
|
|
29
|
+
failures: number;
|
|
30
|
+
}> | Readonly<{
|
|
31
|
+
kind: 'held';
|
|
32
|
+
holder: Extract<EditLeaseView, {
|
|
33
|
+
kind: 'held-elsewhere';
|
|
34
|
+
}>['holder'];
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
kind: 'unavailable';
|
|
37
|
+
}> | Readonly<{
|
|
38
|
+
kind: 'fault';
|
|
39
|
+
reason: LeaseFailure;
|
|
40
|
+
}> | Readonly<{
|
|
41
|
+
kind: 'closed';
|
|
42
|
+
}>;
|
|
43
|
+
export type LeaseMachine = Readonly<{
|
|
44
|
+
phase: Phase;
|
|
45
|
+
nextId: number;
|
|
46
|
+
}>;
|
|
47
|
+
export type LeaseEvent = Readonly<{
|
|
48
|
+
kind: 'acquire';
|
|
49
|
+
takeover: boolean;
|
|
50
|
+
}> | Readonly<{
|
|
51
|
+
kind: 'recheck';
|
|
52
|
+
}> | Readonly<{
|
|
53
|
+
kind: 'lease-lost';
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: 'grant';
|
|
56
|
+
id: number;
|
|
57
|
+
result: EditLeaseAcquireResult | LeaseFailure;
|
|
58
|
+
}> | Readonly<{
|
|
59
|
+
kind: 'view';
|
|
60
|
+
id: number;
|
|
61
|
+
result: EditLeaseView | LeaseFailure;
|
|
62
|
+
}> | Readonly<{
|
|
63
|
+
kind: 'refreshed';
|
|
64
|
+
id: number;
|
|
65
|
+
success: boolean;
|
|
66
|
+
}> | Readonly<{
|
|
67
|
+
kind: 'confirmed';
|
|
68
|
+
id: number;
|
|
69
|
+
result: 'mine' | LeaseFailure | 'lost';
|
|
70
|
+
}> | Readonly<{
|
|
71
|
+
kind: 'heartbeat';
|
|
72
|
+
id: number;
|
|
73
|
+
result: 'mine' | LeaseFailure | 'lost';
|
|
74
|
+
}> | Readonly<{
|
|
75
|
+
kind: 'tick';
|
|
76
|
+
}> | Readonly<{
|
|
77
|
+
kind: 'suspend';
|
|
78
|
+
}> | Readonly<{
|
|
79
|
+
kind: 'stop';
|
|
80
|
+
}>;
|
|
81
|
+
export type LeaseEffect = Readonly<{
|
|
82
|
+
kind: 'clear-discarded';
|
|
83
|
+
}> | Readonly<{
|
|
84
|
+
kind: 'request';
|
|
85
|
+
id: number;
|
|
86
|
+
takeover: boolean;
|
|
87
|
+
}> | Readonly<{
|
|
88
|
+
kind: 'read';
|
|
89
|
+
id: number;
|
|
90
|
+
}> | Readonly<{
|
|
91
|
+
kind: 'refresh';
|
|
92
|
+
id: number;
|
|
93
|
+
takingBack: boolean;
|
|
94
|
+
}> | Readonly<{
|
|
95
|
+
kind: 'confirm';
|
|
96
|
+
id: number;
|
|
97
|
+
token: EditLeaseToken;
|
|
98
|
+
}> | Readonly<{
|
|
99
|
+
kind: 'heartbeat';
|
|
100
|
+
id: number;
|
|
101
|
+
token: EditLeaseToken;
|
|
102
|
+
}> | Readonly<{
|
|
103
|
+
kind: 'release';
|
|
104
|
+
token: EditLeaseToken;
|
|
105
|
+
}> | Readonly<{
|
|
106
|
+
kind: 'fault';
|
|
107
|
+
reason: LeaseFailure;
|
|
108
|
+
}>;
|
|
109
|
+
export type LeaseStep = Readonly<{
|
|
110
|
+
state: LeaseMachine;
|
|
111
|
+
effects: readonly LeaseEffect[];
|
|
112
|
+
}>;
|
|
113
|
+
export declare function initialLeaseMachine(): LeaseMachine;
|
|
114
|
+
export declare function stepLease(state: LeaseMachine, event: LeaseEvent): LeaseStep;
|
|
115
|
+
/**
|
|
116
|
+
* The store editability a lease phase implies. A stopped session (`closed`) implies none:
|
|
117
|
+
* it no longer owns the store, so the host decides (preview hands it back to viewing).
|
|
118
|
+
*/
|
|
119
|
+
export declare function leaseEditability(state: LeaseMachine): EditorEditability | null;
|
|
120
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { AutosaveStatus } from "../ui/stores/types";
|
|
2
1
|
import type { EditorUnpublishedState } from "../controller/deriveEditorUnpublishedState";
|
|
3
2
|
import { type BlockedPublishPlan } from "./blockedPublishPlan";
|
|
4
3
|
import type { BlockValidationError } from "./validateBlocksForPublish";
|
|
5
|
-
export type PublishDisabledReason = "noUnpublishedChanges" | "invalidBlocks" | "invalidBlockSummary"
|
|
4
|
+
export type PublishDisabledReason = "noUnpublishedChanges" | "invalidBlocks" | "invalidBlockSummary";
|
|
6
5
|
export type PublishabilityPlan = Readonly<{
|
|
7
6
|
kind: "allowed";
|
|
8
7
|
canPublish: true;
|
|
@@ -27,12 +26,6 @@ export type PublishabilityPlan = Readonly<{
|
|
|
27
26
|
type: "allowed";
|
|
28
27
|
}>;
|
|
29
28
|
}>;
|
|
30
|
-
export type PublishabilityAutosaveState = Readonly<{
|
|
31
|
-
metadata: AutosaveStatus;
|
|
32
|
-
content: AutosaveStatus;
|
|
33
|
-
blocks: AutosaveStatus;
|
|
34
|
-
linkedEntries: AutosaveStatus;
|
|
35
|
-
}>;
|
|
36
29
|
export type DerivePublishabilityInput = Readonly<{
|
|
37
30
|
unpublishedState: EditorUnpublishedState;
|
|
38
31
|
validationErrors: readonly BlockValidationError[];
|
|
@@ -42,7 +35,10 @@ export type DerivePublishabilityInput = Readonly<{
|
|
|
42
35
|
*/
|
|
43
36
|
hasInvalidBlockSummary?: boolean;
|
|
44
37
|
drawerOpen: boolean;
|
|
45
|
-
autosave?: PublishabilityAutosaveState;
|
|
46
|
-
includeAutosaveFailures?: boolean;
|
|
47
38
|
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Block validation, focus and whether there's anything to publish. Whether the values
|
|
41
|
+
* can be saved first is the publish flush plan's decision (`selectPublishFlushPlan`),
|
|
42
|
+
* for the action and the toolbar alike (issue 1553, rows Q1–Q3).
|
|
43
|
+
*/
|
|
48
44
|
export declare function derivePublishability(input: DerivePublishabilityInput): PublishabilityPlan;
|
|
@@ -10,28 +10,18 @@ export type BlockAutosaveOptions = {
|
|
|
10
10
|
siteId: string;
|
|
11
11
|
/** Whether this entry has a route (pages have blocks, content entries don't) */
|
|
12
12
|
hasRoute: boolean;
|
|
13
|
-
owner: BlockAutosaveOwner;
|
|
14
13
|
getExpectedMailingListProviderScope?: () => MailingListProviderScope | null;
|
|
15
14
|
};
|
|
16
|
-
export type BlockAutosaveOwner = Readonly<{
|
|
17
|
-
kind: 'contentEntry';
|
|
18
|
-
}> | Readonly<{
|
|
19
|
-
kind: 'pageSurface';
|
|
20
|
-
}>;
|
|
21
15
|
export type BlockSaveRevisionPlan = Readonly<{
|
|
22
|
-
kind: 'bestEffort';
|
|
23
|
-
optimisticHash: string | null;
|
|
24
|
-
}> | Readonly<{
|
|
25
16
|
kind: 'compareAndSet';
|
|
26
17
|
optimisticHash: string;
|
|
27
18
|
}> | Readonly<{
|
|
28
19
|
kind: 'missingRequiredRevision';
|
|
29
20
|
}>;
|
|
30
|
-
export declare function
|
|
21
|
+
export declare function planBlockSaveRevision(optimisticHash: string | null): BlockSaveRevisionPlan;
|
|
31
22
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* Only enabled for pages (hasRoute=true), as content entries don't have blocks.
|
|
23
|
+
* Block autosave for pages: the block family's adapter for `useValueAutosave`. Each
|
|
24
|
+
* block's request carries its own id, so one failure in a batch fails only that block
|
|
25
|
+
* (row K1). Only enabled for pages (hasRoute=true), as content entries don't have blocks.
|
|
36
26
|
*/
|
|
37
|
-
export declare function useBlockAutosave({ uiStore, apiClient, siteId, hasRoute,
|
|
27
|
+
export declare function useBlockAutosave({ uiStore, apiClient, siteId, hasRoute, getExpectedMailingListProviderScope, }: BlockAutosaveOptions): import("../ui/editorUiStore").AutosaveHandle;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export type DebouncedLatestSaveHandle = {
|
|
1
|
+
export type DebouncedLatestSaveHandle<TResult = void, TSnapshot = unknown> = {
|
|
2
2
|
trigger: () => void;
|
|
3
3
|
cancel: () => void;
|
|
4
|
-
flush: () => Promise<
|
|
4
|
+
flush: () => Promise<TResult | undefined>;
|
|
5
5
|
isPending: () => boolean;
|
|
6
|
+
whenIdle: () => Promise<TResult | undefined>;
|
|
7
|
+
run: (snapshot: TSnapshot) => Promise<TResult | undefined>;
|
|
6
8
|
};
|
|
7
9
|
export type DebouncedLatestSaveConfig<TSnapshot, TPayload, TResult> = {
|
|
8
10
|
getSnapshot: () => TSnapshot;
|
|
9
|
-
buildPayload: (snapshot: TSnapshot) => TPayload | null | undefined;
|
|
11
|
+
buildPayload: (snapshot: TSnapshot, preceding?: TResult) => TPayload | null | undefined;
|
|
10
12
|
save: (payload: TPayload) => Promise<TResult>;
|
|
11
13
|
shouldSkip?: (snapshot: TSnapshot) => boolean;
|
|
12
14
|
onSaving?: (snapshot: TSnapshot) => void;
|
|
@@ -19,6 +21,6 @@ export type DebouncedLatestSaveConfig<TSnapshot, TPayload, TResult> = {
|
|
|
19
21
|
delay?: number;
|
|
20
22
|
maxWait?: number;
|
|
21
23
|
enabled?: boolean;
|
|
22
|
-
retryDelay?: number;
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
/** Timing and serial execution only. Request identity and save eligibility remain in the value store. */
|
|
26
|
+
export declare function useDebouncedLatestSave<TSnapshot, TPayload, TResult>(config: DebouncedLatestSaveConfig<TSnapshot, TPayload, TResult>): DebouncedLatestSaveHandle<TResult, TSnapshot>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ApiClient } from '../../../api/src/request';
|
|
2
|
+
import type { EditLeaseScope } from '../../../core/src/index';
|
|
3
|
+
import type { EditorLeaseUiState } from '../ui/editorLeaseUiState';
|
|
4
|
+
type LeaseUiPort = Readonly<{
|
|
5
|
+
getState: () => Pick<EditorLeaseUiState, 'setEditability' | 'setLeaseDiscardedChanges'>;
|
|
6
|
+
}>;
|
|
7
|
+
import type { EditLeaseLossSignal } from '../controller/editLeaseLossSignal';
|
|
8
|
+
type LeaseParams = Readonly<{
|
|
9
|
+
siteId: string;
|
|
10
|
+
nodeType: EditLeaseScope['nodeType'];
|
|
11
|
+
nodeId: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type EditLeaseChangeSubscription = (scope: Pick<LeaseParams, 'nodeType' | 'nodeId'>, listener: () => void) => () => void;
|
|
14
|
+
export type UseEditLeaseOptions = Readonly<{
|
|
15
|
+
scope: LeaseParams;
|
|
16
|
+
apiClient: ApiClient;
|
|
17
|
+
uiStore: LeaseUiPort;
|
|
18
|
+
subscribeToLeaseChanges?: EditLeaseChangeSubscription;
|
|
19
|
+
onGranted?: (takingBack: boolean, isCurrent: () => boolean) => Promise<void> | void;
|
|
20
|
+
onAccessChanged?: () => void;
|
|
21
|
+
leaseLossSignal: EditLeaseLossSignal;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function useEditLease({ scope, apiClient, uiStore, subscribeToLeaseChanges, onGranted, onAccessChanged, leaseLossSignal, }: UseEditLeaseOptions): {
|
|
24
|
+
takeOver: () => void;
|
|
25
|
+
retry: () => void;
|
|
26
|
+
recheck: () => void;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -1,65 +1,51 @@
|
|
|
1
1
|
import { type ContentEntrySnapshot, type RoutingHelpers } from '../../../content-model/src/index';
|
|
2
2
|
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
3
|
+
import type { LifecycleOutcome } from '../ui/stores/types';
|
|
3
4
|
import type { BlockedPublishPlan } from './blockedPublishPlan';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
5
|
+
import type { DiscardDraftInput, DiscardLifecycleResult, EditorDeletion, PublishLifecycleResult } from '../services/contentEntryServices';
|
|
6
|
+
export type PublishOptions = Readonly<{
|
|
7
|
+
whenUnchanged?: 'publish' | 'skip';
|
|
8
|
+
}>;
|
|
9
|
+
export type EntryActions = Readonly<{
|
|
10
|
+
saveDraft: () => Promise<LifecycleOutcome>;
|
|
11
|
+
publish: (options?: PublishOptions) => Promise<LifecycleOutcome>;
|
|
12
|
+
discardDraft: () => Promise<LifecycleOutcome>;
|
|
13
|
+
deletion: Readonly<{
|
|
14
|
+
kind: 'deletable';
|
|
15
|
+
deleteEntry: () => Promise<LifecycleOutcome>;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'deletedWithOwner';
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
19
20
|
export type EntryActionsOptions<TEntry extends ContentEntrySnapshot> = {
|
|
20
21
|
/** Current entry snapshot */
|
|
21
22
|
entry: TEntry;
|
|
22
23
|
/** UI store instance (to read latest metadata values at call time) */
|
|
23
24
|
uiStore: EditorUiStoreInstance;
|
|
24
|
-
/** Whether this entry has a route (pages vs content) */
|
|
25
|
-
hasRoute: boolean;
|
|
26
25
|
/** Routing helpers (for routable published baseline derivations). */
|
|
27
26
|
routing?: RoutingHelpers;
|
|
28
27
|
/** Publish mutation from react-query */
|
|
29
28
|
publishMutation: {
|
|
30
|
-
mutateAsync: (
|
|
29
|
+
mutateAsync: () => Promise<PublishLifecycleResult<TEntry>>;
|
|
31
30
|
};
|
|
32
31
|
/** Discard draft mutation from react-query */
|
|
33
32
|
discardMutation: {
|
|
34
|
-
mutateAsync: () => Promise<TEntry
|
|
33
|
+
mutateAsync: (input: DiscardDraftInput) => Promise<DiscardLifecycleResult<TEntry>>;
|
|
35
34
|
};
|
|
36
35
|
/** Entry definition with services */
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
clearError?: boolean;
|
|
41
|
-
}) => {
|
|
36
|
+
deletion: EditorDeletion;
|
|
37
|
+
/** The metadata values an entry snapshot holds, as the store holds them (`normalizedMetadataBaseline`). */
|
|
38
|
+
metadataOf: (nextEntry: TEntry) => {
|
|
42
39
|
baseline: Record<string, unknown>;
|
|
43
40
|
values: Record<string, unknown>;
|
|
44
41
|
};
|
|
45
|
-
/** Function to reset form from snapshot */
|
|
46
|
-
resetFromSnapshot: (snapshot: {
|
|
47
|
-
baseline: Record<string, unknown>;
|
|
48
|
-
values: Record<string, unknown>;
|
|
49
|
-
}) => void;
|
|
50
|
-
/** Function to set error message */
|
|
51
|
-
setErrorMessage: (message: string | null) => void;
|
|
52
42
|
setBlockedPublishPlan?: (plan: Extract<BlockedPublishPlan, {
|
|
53
43
|
type: 'blocked';
|
|
54
44
|
}> | null) => void;
|
|
55
45
|
};
|
|
56
46
|
/**
|
|
57
|
-
* Hook to handle entry actions (publish, discard, delete).
|
|
58
|
-
*
|
|
47
|
+
* Hook to handle entry actions (save draft, publish, discard, delete). Each returns a
|
|
48
|
+
* `LifecycleOutcome`; expected refusals are results, and the error banner and status
|
|
49
|
+
* derive from the lifecycle failure it records (issue 1553).
|
|
59
50
|
*/
|
|
60
|
-
export declare function useEntryActions<TEntry extends ContentEntrySnapshot>({ entry, uiStore,
|
|
61
|
-
saveDraft: () => Promise<void>;
|
|
62
|
-
publish: (options?: PublishOptions) => Promise<void>;
|
|
63
|
-
discardDraft: () => Promise<void>;
|
|
64
|
-
deleteEntry: () => Promise<void>;
|
|
65
|
-
};
|
|
51
|
+
export declare function useEntryActions<TEntry extends ContentEntrySnapshot>({ entry, uiStore, routing, publishMutation, discardMutation, deletion, metadataOf, setBlockedPublishPlan: setBlockedPlan, }: EntryActionsOptions<TEntry>): EntryActions;
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
1
2
|
import type { ContentEntrySnapshot } from '../../../content-model/src/index';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
5
|
-
|
|
3
|
+
import type { DocumentBlockState } from '@riverbankcms/api/content-entries';
|
|
4
|
+
import type { DiscardDraftInput, DiscardLifecycleResult, PublishLifecycleResult } from '../services/contentEntryServices';
|
|
5
|
+
type BlockCacheContext = {
|
|
6
|
+
queryClient: ReturnType<typeof useQueryClient>;
|
|
7
|
+
siteId: string;
|
|
8
|
+
type: string;
|
|
9
|
+
entryId: string;
|
|
6
10
|
};
|
|
7
|
-
export declare function
|
|
8
|
-
|
|
11
|
+
export declare function reconcileBlockCache(context: BlockCacheContext, state: DocumentBlockState): void;
|
|
12
|
+
export declare function usePublishEntryMutation<TEntry extends ContentEntrySnapshot = ContentEntrySnapshot>({ publishFn, siteId, type, entryId, }: {
|
|
13
|
+
publishFn?: () => Promise<PublishLifecycleResult<TEntry>>;
|
|
9
14
|
siteId: string;
|
|
10
15
|
type: string;
|
|
11
16
|
entryId: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}): import("@tanstack/react-query").UseMutationResult<Readonly<{
|
|
16
|
-
snapshot: TEntry;
|
|
17
|
-
publishedContent?: Record<string, unknown> | null;
|
|
18
|
-
publishedBlocks?: readonly import("../../../api/src/index").PublishedBlockBaseline[];
|
|
19
|
-
}>, Error, TPublishPayload | undefined, unknown>;
|
|
20
|
-
export declare function useDiscardDraftMutation<TEntry = unknown>({ discardFn, siteId, type, entryId, isPage, pageId, }: {
|
|
21
|
-
discardFn?: () => Promise<TEntry>;
|
|
17
|
+
}): import("@tanstack/react-query").UseMutationResult<PublishLifecycleResult<TEntry>, Error, void, unknown>;
|
|
18
|
+
export declare function useDiscardDraftMutation<TEntry extends ContentEntrySnapshot>({ discardFn, siteId, type, entryId, }: {
|
|
19
|
+
discardFn?: (input: DiscardDraftInput) => Promise<DiscardLifecycleResult<TEntry>>;
|
|
22
20
|
siteId: string;
|
|
23
21
|
type: string;
|
|
24
22
|
entryId: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
23
|
+
}): import("@tanstack/react-query").UseMutationResult<DiscardLifecycleResult<TEntry>, Error, Readonly<{
|
|
24
|
+
contentRevision: string | null;
|
|
25
|
+
}>, unknown>;
|
|
28
26
|
export {};
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { LinkedContentEntryId, LinkedContentTypeKey } from '../linkedEntries/domain';
|
|
1
|
+
import { type LinkedContentEntryId, type LinkedContentTypeKey } from '../linkedEntries/domain';
|
|
3
2
|
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
4
3
|
export type PendingLinkedEntrySave = Readonly<{
|
|
5
4
|
entryId: LinkedContentEntryId;
|
|
6
5
|
contentTypeKey: LinkedContentTypeKey;
|
|
7
6
|
content: Record<string, unknown>;
|
|
8
|
-
optimisticHash: string
|
|
9
|
-
acknowledgedVersion: number;
|
|
7
|
+
optimisticHash: string;
|
|
10
8
|
}>;
|
|
11
9
|
export type LinkedEntrySaveResult = Readonly<{
|
|
12
10
|
entryId: LinkedContentEntryId;
|
|
13
11
|
content: Record<string, unknown>;
|
|
14
|
-
optimisticHash: string
|
|
12
|
+
optimisticHash: string;
|
|
15
13
|
}>;
|
|
16
14
|
export type LinkedEntryAutosaveOptions = Readonly<{
|
|
17
15
|
uiStore: EditorUiStoreInstance;
|
|
18
|
-
apiClient: ApiClient;
|
|
19
16
|
siteId: string;
|
|
20
17
|
saveLinkedEntry?: (save: PendingLinkedEntrySave) => Promise<LinkedEntrySaveResult>;
|
|
21
18
|
}>;
|
|
22
|
-
|
|
23
|
-
export declare function useLinkedEntryAutosave(
|
|
19
|
+
/** Linked-entry autosave: the linked-entry family's adapter for `useValueAutosave`. */
|
|
20
|
+
export declare function useLinkedEntryAutosave(options: LinkedEntryAutosaveOptions): import("../ui/editorUiStore").AutosaveHandle;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { BaselineRevision, SaveFailure, SavedBlockContentVersion } from '../../../core/src/index';
|
|
2
|
+
import type { EditorUiState, EditorUiStoreInstance, EditorValueKey, StartedSend } from '../ui/editorUiStore';
|
|
3
|
+
import type { AutosaveHandle, AutosaveType } from '../ui/stores/types';
|
|
4
|
+
import { type FlushCheckpoint, type SendAcknowledgement } from '../sync/sendPlanning';
|
|
5
|
+
import type { SendMode } from '../sync/valueSync';
|
|
6
|
+
/** What the server stored for one request. */
|
|
7
|
+
export type SavedValue = Readonly<{
|
|
8
|
+
blockVersion?: SavedBlockContentVersion;
|
|
9
|
+
values: Record<string, unknown> | null;
|
|
10
|
+
revision: BaselineRevision;
|
|
11
|
+
published?: Readonly<{
|
|
12
|
+
kind: 'known';
|
|
13
|
+
values: Record<string, unknown> | null;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'unknown';
|
|
16
|
+
}>;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* One value family's part of autosave: which scheduler it is, and how one started request
|
|
20
|
+
* is sent. `send` resolves with what the server stored and throws on failure.
|
|
21
|
+
*/
|
|
22
|
+
export type ValueAutosaveAdapter<TSaved extends SavedValue = SavedValue> = Readonly<{
|
|
23
|
+
uiStore: EditorUiStoreInstance;
|
|
24
|
+
scheduler: AutosaveType;
|
|
25
|
+
send: (send: StartedSend) => Promise<TSaved>;
|
|
26
|
+
onSaved?: (send: StartedSend, saved: TSaved) => void;
|
|
27
|
+
enabled?: boolean;
|
|
28
|
+
delay?: number;
|
|
29
|
+
maxWait?: number;
|
|
30
|
+
}>;
|
|
31
|
+
/** One batch: the values to send and how a failure among them is treated (`canSend`). */
|
|
32
|
+
export type SendBatch = Readonly<{
|
|
33
|
+
keys: readonly EditorValueKey[];
|
|
34
|
+
mode: SendMode;
|
|
35
|
+
checkpoints?: readonly FlushCheckpoint[];
|
|
36
|
+
completed?: readonly SendAcknowledgement[];
|
|
37
|
+
signal?: AbortSignal;
|
|
38
|
+
}>;
|
|
39
|
+
/** A save that can't be compared-and-set: the editor never received the value's revision. */
|
|
40
|
+
export declare function missingRevisionError(): Error;
|
|
41
|
+
/** A send found the tab no longer holds the value's lease before it reached the server. */
|
|
42
|
+
export declare class LeaseLostError extends Error {
|
|
43
|
+
constructor();
|
|
44
|
+
}
|
|
45
|
+
/** Losing the lease leaves edits unsaved, not failed; they send again once writable (W1). */
|
|
46
|
+
export declare function saveFailureOf(error: unknown): SaveFailure;
|
|
47
|
+
/**
|
|
48
|
+
* The next batch for a scheduler: what the background would send, plus any values a
|
|
49
|
+
* flush asked for, which are sent explicitly so a failure is retried (row S3b). A
|
|
50
|
+
* requested value still has to be writable and saveable now: the lease or a block's
|
|
51
|
+
* validity can change between the flush's plan and this batch.
|
|
52
|
+
*/
|
|
53
|
+
export declare function nextSendBatch(state: EditorUiState, scheduler: AutosaveType, requested: readonly EditorValueKey[]): SendBatch;
|
|
54
|
+
/**
|
|
55
|
+
* The whole send effect: start every planned request under its own id, send them
|
|
56
|
+
* together, and settle each response against its id only.
|
|
57
|
+
*/
|
|
58
|
+
export declare function sendPlanned<TSaved extends SavedValue>(adapter: ValueAutosaveAdapter<TSaved>, batch: SendBatch): Promise<readonly SendAcknowledgement[]>;
|
|
59
|
+
/**
|
|
60
|
+
* The one autosave hook (issue 1553). `useDebouncedLatestSave` is the timing shell
|
|
61
|
+
* (debounce, max wait, one batch at a time); the store's request slots say what is
|
|
62
|
+
* outstanding and `planSends` says what may send.
|
|
63
|
+
*/
|
|
64
|
+
export declare function useValueAutosave<TSaved extends SavedValue>(adapter: ValueAutosaveAdapter<TSaved>): AutosaveHandle;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pre-publish validation for blocks.
|
|
3
|
-
*
|
|
4
|
-
* Validates all block content using strict mode validation before allowing publish.
|
|
5
|
-
* This catches empty required fields and other validation errors that were allowed
|
|
6
|
-
* during editing (draft mode) but must be fixed before publishing.
|
|
7
|
-
*/
|
|
8
1
|
import type { FieldValidationDescriptor } from '../../../blocks/src/index';
|
|
9
2
|
import type { EditorBlockId } from '../../../core/src/index';
|
|
10
3
|
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|