@riverbankcms/sdk 0.147.0 → 0.148.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{PreviewEditorSidebar-DtpB3_sS.mjs → PreviewEditorSidebar-DvEPG3Z2.mjs} +202 -143
- package/dist/{PreviewEditorUI-DxTLgaHo.mjs → PreviewEditorUI-D6eb6fkx.mjs} +68 -60
- package/dist/{PreviewQueryProvider-Dd4dxOiU.mjs → PreviewQueryProvider-5znTyJuz.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DMMNCngt.mjs → SdkPreviewModeRuntime-DJ6utQ_R.mjs} +1191 -513
- package/dist/{SiteChromeCustomizeContext-DQXZXiqS.mjs → SiteChromeCustomizeContext-CFJYh6vo.mjs} +201798 -197304
- 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 +0 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +4 -4
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -0
- 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/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 +133 -41
- package/dist/_dts/api/src/eventEmailTemplates.d.ts +2 -2
- package/dist/_dts/api/src/eventManagementContracts.d.ts +25 -0
- 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 +6 -5
- 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 +2 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +4 -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 +0 -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/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/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/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/proof-block-islands.d.ts +16 -4
- 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 +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/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 +2 -0
- 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 +24 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -3
- 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 +15 -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 +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/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 +4 -1
- 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.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 +5 -5
- 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/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/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 +4 -0
- package/dist/_dts/core/src/uuid.d.ts +7 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -153
- 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/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/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 +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 +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/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/client/{BookingMailingListNote-1n4Ch_u_.mjs → BookingMailingListNote-CzRt2dF_.mjs} +98 -96
- package/dist/client/DemoBookingPortalAccess-mxqwap3f.mjs +344 -0
- package/dist/client/{EventCombined.client-C0pgma9y.mjs → EventCombined.client-CDb11igO.mjs} +6 -6
- package/dist/client/{EventListing.client-4fhLOvHP.mjs → EventListing.client-EgYhzKPa.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DScC4F3w.mjs → LeafletStaticMap-gtmtaA2b.mjs} +1 -1
- package/dist/client/{TerminalPanel-B5ZUsYhe.mjs → TerminalPanel-DvNUP5ot.mjs} +1 -1
- package/dist/client/{ThemedButton-DoVIV1Ao.mjs → ThemedButton-C7CeUJjW.mjs} +1 -1
- package/dist/client/{accordion-CoT5g7zo.mjs → accordion-kjvt49rA.mjs} +1 -1
- package/dist/client/{bookingForm-BWxB46xD.mjs → bookingForm-pbRZordh.mjs} +212 -62
- package/dist/client/bookings.mjs +616 -225
- package/dist/client/{carousel-DtNYWFd3.mjs → carousel-f4Zbmicv.mjs} +1 -1
- package/dist/client/{cart-z4qZih1Y.mjs → cart-DO20An50.mjs} +3 -3
- package/dist/client/{checkout-DpL7euFH.mjs → checkout-Du5amDR_.mjs} +3 -3
- package/dist/client/{checkoutUrls-BEfR7kVu.mjs → checkoutUrls-CXhko2Rv.mjs} +1 -1
- package/dist/client/client.mjs +1753 -823
- package/dist/client/{context-C8TinPJc.mjs → context-eW97E945.mjs} +4 -3
- package/dist/client/{dates-vwwxTeB0.mjs → dates-jPCirRea.mjs} +56 -11
- package/dist/client/{eventCalendar-DIbHfJXO.mjs → eventCalendar-C2M-iE4j.mjs} +9 -9
- package/dist/client/{eventCombined-DoGMJ6cg.mjs → eventCombined-W6ns3LHg.mjs} +4 -4
- package/dist/client/{eventDetails-BjN9v6a1.mjs → eventDetails-CR-GT0f0.mjs} +4 -4
- package/dist/client/{eventListing-DajjWgOv.mjs → eventListing-BK8AfYZz.mjs} +4 -4
- package/dist/client/{eventRegistration-DMq9gMA-.mjs → eventRegistration-BJSd4KUu.mjs} +369 -242
- package/dist/client/{form-Qf6qTbos.mjs → form-BvpfbQaT.mjs} +3 -3
- package/dist/client/{headerSection-D7qJrqFX.mjs → headerSection-I5sUQ8x-.mjs} +3 -3
- package/dist/client/hooks.mjs +254 -53
- package/dist/client/{locationMap-CCF9-t_0.mjs → locationMap-BLvwf9_f.mjs} +3 -3
- package/dist/client/{media-CwBGetqC.mjs → media-Cl38iOMI.mjs} +10 -3
- package/dist/client/{newsletterForm-DzCLSP4S.mjs → newsletterForm-DrQ2weE8.mjs} +3 -3
- package/dist/client/{pricing-Cgxv2KLC.mjs → pricing-BES87mrR.mjs} +1 -1
- package/dist/client/{productDetail-ru9w5GHx.mjs → productDetail-Url9jcc5.mjs} +3 -3
- package/dist/client/{productList-zaapKSl-.mjs → productList-DE7ngEZJ.mjs} +3 -3
- package/dist/client/{propsDecoder-CwvvNOHx.mjs → propsDecoder-D1OtGXDV.mjs} +89 -17
- package/dist/client/rendering/client.mjs +1445 -658
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2478 -1515
- package/dist/client/{routeIslandApiConfig-BwVFo0Y4.mjs → routeIslandApiConfig-BG9Y-SHg.mjs} +1 -1
- package/dist/client/{shop-mktkXvbV.mjs → shop-CJkuySJ3.mjs} +126 -79
- package/dist/client/{shop-commerce-De7gEnkA.mjs → shop-commerce-4rKj5n9h.mjs} +25 -13
- package/dist/client/{shop-commerce-store-B3MCxIBW.mjs → shop-commerce-store-Bxm75Pg6.mjs} +1 -1
- package/dist/client/{shopShared-TqExh235.mjs → shopShared-DpoQDWfz.mjs} +4 -4
- package/dist/client/{useEventFilters-n_OjkIjX.mjs → useEventFilters-D8HliSqR.mjs} +32 -17
- package/dist/preview-next/before-render.mjs +192 -83
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +192 -83
- package/dist/preview-next/middleware.mjs +192 -83
- package/dist/{previewAuthStore-C_EHQ5XA.mjs → previewAuthStore-BXXF3hhW.mjs} +194 -83
- package/dist/{sdk-runtime-BIkJg5y1.mjs → sdk-runtime-C2a05WjL.mjs} +2 -2
- package/dist/{separator-C9qDP95Z.mjs → separator-CuNhBAhS.mjs} +1 -1
- package/dist/server/components.mjs +1720 -1392
- package/dist/server/config-validation.mjs +221 -37
- package/dist/server/config.mjs +221 -37
- package/dist/server/data.mjs +221 -37
- package/dist/server/index.mjs +195 -84
- package/dist/server/next.mjs +490 -196
- package/dist/server/page-converter.mjs +53 -14
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1427 -1098
- package/dist/server/rendering.mjs +2693 -2365
- package/dist/server/routing.mjs +291 -55
- package/dist/server/server.mjs +281 -114
- package/package.json +1 -1
- 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/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
|
@@ -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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type EditorBlockValues, type EditorContentValues, type EditorMetadataValues, type EditorValueRecord, type ValueSync } from '../../../core/src/index';
|
|
2
|
+
/**
|
|
3
|
+
* One editor value: its sync state (baseline, local intent and request) plus the
|
|
4
|
+
* published baseline. `version` counts changes for history, subscriptions and publish
|
|
5
|
+
* reconciliation; it is never a save acknowledgement.
|
|
6
|
+
*/
|
|
7
|
+
export type EditorValueSnapshot<TValue extends EditorValueRecord | null> = Readonly<{
|
|
8
|
+
version: number;
|
|
9
|
+
sync: ValueSync<TValue>;
|
|
10
|
+
publishedBaseline: TValue;
|
|
11
|
+
}>;
|
|
12
|
+
export type EditorBrandedValues = EditorMetadataValues | EditorContentValues | EditorBlockValues;
|
|
13
|
+
export type NullableEditorValues<TValue extends EditorBrandedValues> = TValue | null;
|
|
14
|
+
export declare function createValueSnapshot<TValue extends EditorBrandedValues>(): EditorValueSnapshot<NullableEditorValues<TValue>>;
|
|
15
|
+
type ValueSnapshotUpdates<TValue extends EditorValueRecord | null> = Partial<Pick<EditorValueSnapshot<TValue>, 'sync' | 'publishedBaseline'>>;
|
|
16
|
+
/** Applies updates, bumping `version` only when something changed. */
|
|
17
|
+
export declare function updateValueSnapshot<TValue extends EditorValueRecord | null>(snapshot: EditorValueSnapshot<TValue>, updates: ValueSnapshotUpdates<TValue>): EditorValueSnapshot<TValue>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { EditorBlockId, EditorBlockVersions } from '../../../core/src/index';
|
|
2
|
+
import { type BlockFieldExtensions } from '../../../editor-blocks/src/block-editor/blockDraftBaselineSeed';
|
|
3
|
+
import type { ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
4
|
+
import type { RefreshPolicy } from '../sync/valueSync';
|
|
5
|
+
import type { EditorHistorySnapshot } from './editorSnapshot';
|
|
6
|
+
export type ServerBlockAdmission = Readonly<{
|
|
7
|
+
block: ServerBlockItem;
|
|
8
|
+
action: 'reconcile' | 'replace';
|
|
9
|
+
}>;
|
|
10
|
+
/** Seed preparation and the request-aware refresh reducer are the sole draft admission transition. */
|
|
11
|
+
export declare function prepareServerBlockAdmissions(entries: readonly ServerBlockAdmission[], extensions?: BlockFieldExtensions | null): {
|
|
12
|
+
action: "replace" | "reconcile";
|
|
13
|
+
seed: Readonly<{
|
|
14
|
+
blockId: EditorBlockId;
|
|
15
|
+
baseline: import("../../../core/src/index").EditorBlockBaselineInput;
|
|
16
|
+
initMeta: import("../../../core/src/index").EditorDraftBlockInitMetaInput;
|
|
17
|
+
refreshMeta: import("../../../core/src/index").EditorDraftBlockBaselineUpdateMetaInput;
|
|
18
|
+
}>;
|
|
19
|
+
versions: Readonly<{
|
|
20
|
+
draftContentId: import("../../../core/src/index").ContentVersionId | null;
|
|
21
|
+
publishedPlacement: import("../../../core/src/index").PublishedBlockPlacementRead;
|
|
22
|
+
}>;
|
|
23
|
+
}[];
|
|
24
|
+
export declare function admitBlockDrafts(snapshot: EditorHistorySnapshot, entries: ReturnType<typeof prepareServerBlockAdmissions>, policy?: RefreshPolicy): EditorHistorySnapshot;
|
|
25
|
+
/** History can restore admitted blocks; it cannot invent server identity. */
|
|
26
|
+
export declare function assertAdmittedDrafts(previous: EditorHistorySnapshot, next: EditorHistorySnapshot, requireVersions: (id: EditorBlockId) => EditorBlockVersions): void;
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* 2. Before publish, saveNow() / flushAllPending() may be called to ensure all changes are saved
|
|
7
|
-
* 3. useEntryActions waits for all saves to complete via status subscriptions
|
|
2
|
+
* The autosave handle registry. Each scheduler registers its handle; `flushValues`
|
|
3
|
+
* is the one waiter for "saved before X" (publish, Save draft, slot switches, generated
|
|
4
|
+
* icons) and asks the handles to send through `sendRequests`. Status isn't stored here:
|
|
5
|
+
* it's derived from the values (`selectAutosaveStatus`, issue 1553).
|
|
8
6
|
*/
|
|
9
|
-
import type {
|
|
7
|
+
import type { FlushPolicy, FlushRequest, FlushResult, SendAcknowledgement } from '../../sync/sendPlanning';
|
|
8
|
+
import type { FlushOptions } from '../../sync/flushValues';
|
|
9
|
+
import type { AutosaveHandle, AutosaveType } from './types';
|
|
10
10
|
export type AutosaveState = {
|
|
11
|
-
metadata: AutosaveStatus;
|
|
12
|
-
content: AutosaveStatus;
|
|
13
|
-
blocks: AutosaveStatus;
|
|
14
|
-
linkedEntries: AutosaveStatus;
|
|
15
|
-
setMetadataStatus: (status: Partial<AutosaveStatus>) => void;
|
|
16
|
-
setContentStatus: (status: Partial<AutosaveStatus>) => void;
|
|
17
|
-
setBlocksStatus: (status: Partial<AutosaveStatus>) => void;
|
|
18
|
-
setLinkedEntriesStatus: (status: Partial<AutosaveStatus>) => void;
|
|
19
11
|
registerAutosave: (type: AutosaveType, handle: AutosaveHandle) => void;
|
|
20
12
|
unregisterAutosave: (type: AutosaveType) => void;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
saveNow: (types: AutosaveType[]) => Promise<void>;
|
|
28
|
-
flushAllPending: () => void;
|
|
13
|
+
registeredSchedulers: () => readonly AutosaveType[];
|
|
14
|
+
/** Sends each request's values in its scheduler's next batch; resolves once the batches finish. */
|
|
15
|
+
sendRequests: (requests: readonly FlushRequest[]) => Promise<readonly SendAcknowledgement[]>;
|
|
16
|
+
/** Resolves once the values in scope are saved, or can't be (`planFlush`). */
|
|
17
|
+
flushValues: (policy: FlushPolicy, options?: FlushOptions) => Promise<FlushResult>;
|
|
18
|
+
cancelPending: (scheduler: AutosaveType) => void;
|
|
29
19
|
cancelAllPending: () => void;
|
|
30
20
|
};
|
|
31
21
|
/**
|
|
32
|
-
* Creates the autosave
|
|
33
|
-
*
|
|
34
|
-
* @param triggerUpdate - Callback to trigger React re-renders
|
|
22
|
+
* Creates the autosave registry. `flush` is the store-bound `flushValues`; the registry
|
|
23
|
+
* holds no status of its own.
|
|
35
24
|
*/
|
|
36
|
-
export declare function createAutosaveSlice(
|
|
25
|
+
export declare function createAutosaveSlice(flush: (policy: FlushPolicy, options?: FlushOptions) => Promise<FlushResult>): AutosaveState;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type EditorBlockId, type EditorBlockVersions, type EditorBlockVersionsEntry, type SavedBlockContentVersion } from '../../../../core/src/index';
|
|
2
|
+
/**
|
|
3
|
+
* Server versions per block. Server-owned, so this lives outside undo history:
|
|
4
|
+
* undoing an edit never brings back an id the server has already replaced.
|
|
5
|
+
*/
|
|
6
|
+
export type BlockVersionsState = Readonly<{
|
|
7
|
+
revision: number;
|
|
8
|
+
/** Null for blocks not admitted to this editor. */
|
|
9
|
+
get: (blockId: EditorBlockId) => EditorBlockVersions | null;
|
|
10
|
+
require: (blockId: EditorBlockId) => EditorBlockVersions;
|
|
11
|
+
set: (entries: readonly EditorBlockVersionsEntry[]) => void;
|
|
12
|
+
applySaved: (blockId: EditorBlockId, saved: SavedBlockContentVersion) => void;
|
|
13
|
+
}>;
|
|
14
|
+
type BlockVersionsSnapshot = Readonly<{
|
|
15
|
+
byId: ReadonlyMap<EditorBlockId, EditorBlockVersions>;
|
|
16
|
+
revision: number;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function withBlockVersions(snapshot: BlockVersionsSnapshot, entries: readonly EditorBlockVersionsEntry[]): BlockVersionsSnapshot;
|
|
19
|
+
/** Internal record operation lets the editor commit versions and drafts before notifying. */
|
|
20
|
+
export declare function createBlockVersionsSlice(triggerUpdate: () => void): Readonly<{
|
|
21
|
+
state: BlockVersionsState;
|
|
22
|
+
record: (entries: readonly EditorBlockVersionsEntry[]) => boolean;
|
|
23
|
+
}>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ApiClient } from '../../../../api/src/request';
|
|
2
|
+
import type { DraftTarget } from '../../../../realtime/src/index';
|
|
3
|
+
import { type EditorEditability } from '../../controller/editorEditability';
|
|
4
|
+
export type LinkedEntryLeaseBinding = Readonly<{
|
|
5
|
+
contentTypeKey: string;
|
|
6
|
+
apiClient: ApiClient;
|
|
7
|
+
takeOver: () => void;
|
|
8
|
+
retry: () => void;
|
|
9
|
+
}>;
|
|
10
|
+
export type LinkedEntryLeaseSession = LinkedEntryLeaseBinding & (Readonly<{
|
|
11
|
+
kind: 'linked';
|
|
12
|
+
editability: EditorEditability;
|
|
13
|
+
discarded: boolean;
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'parent';
|
|
16
|
+
}>);
|
|
17
|
+
type WriteAuthorityState = Pick<LinkedEntryLeaseState, 'linkedEntryLeases'> & Readonly<{
|
|
18
|
+
editability: EditorEditability;
|
|
19
|
+
}>;
|
|
20
|
+
type LeaseOwnerState = Pick<LinkedEntryLeaseState, 'linkedEntryLeases'> & Readonly<{
|
|
21
|
+
editability: EditorEditability;
|
|
22
|
+
leaseDiscardedChanges: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function readLinkedEntryLease(state: LeaseOwnerState, entryId: string): (Readonly<{
|
|
25
|
+
contentTypeKey: string;
|
|
26
|
+
apiClient: ApiClient;
|
|
27
|
+
takeOver: () => void;
|
|
28
|
+
retry: () => void;
|
|
29
|
+
}> & Readonly<{
|
|
30
|
+
kind: "linked";
|
|
31
|
+
editability: EditorEditability;
|
|
32
|
+
discarded: boolean;
|
|
33
|
+
}>) | {
|
|
34
|
+
editability: EditorEditability;
|
|
35
|
+
discarded: boolean;
|
|
36
|
+
contentTypeKey: string;
|
|
37
|
+
apiClient: ApiClient;
|
|
38
|
+
takeOver: () => void;
|
|
39
|
+
retry: () => void;
|
|
40
|
+
kind: "parent";
|
|
41
|
+
} | undefined;
|
|
42
|
+
export type LinkedEntryLeaseState = {
|
|
43
|
+
linkedEntryLeases: Readonly<Record<string, LinkedEntryLeaseSession | undefined>>;
|
|
44
|
+
registerLinkedEntryLease: (entryId: string, binding: LinkedEntryLeaseBinding, kind: LinkedEntryLeaseSession['kind']) => void;
|
|
45
|
+
setLinkedEntryLease: (entryId: string, session: LinkedEntryLeaseSession | undefined) => void;
|
|
46
|
+
};
|
|
47
|
+
export declare function createLinkedEntryLeaseSlice(set: (update: (state: LinkedEntryLeaseState) => Partial<LinkedEntryLeaseState>) => void): LinkedEntryLeaseState;
|
|
48
|
+
export declare function canWriteLinkedEntry(state: WriteAuthorityState, entryId: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Per-item write authority, shared by autosave and the live-drafts projection: the
|
|
51
|
+
* document's own values follow the document lease; a linked entry follows its own.
|
|
52
|
+
*/
|
|
53
|
+
export declare function canWriteDraftTarget(state: WriteAuthorityState, target: DraftTarget): boolean;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LinkedSaveHandovers } from '../../liveDrafts/linkedSaveHandovers';
|
|
2
|
+
/**
|
|
3
|
+
* This tab's accepted linked-entry saves, handing over to the rendered data (issue 1553, D).
|
|
4
|
+
* Outside history, snapshots and autosave, beside `remoteDrafts`: `settle` records them,
|
|
5
|
+
* and the renderer's retention replaces the map as they drop.
|
|
6
|
+
*/
|
|
7
|
+
export type LinkedSaveHandoversState = {
|
|
8
|
+
linkedSaveHandovers: LinkedSaveHandovers;
|
|
9
|
+
setLinkedSaveHandovers: (handovers: LinkedSaveHandovers) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function createLinkedSaveHandoversSlice(set: (update: (state: LinkedSaveHandoversState) => Partial<LinkedSaveHandoversState>) => void): LinkedSaveHandoversState;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RemoteDraftOverlay } from '../../liveDrafts/remoteDraftOverlay';
|
|
2
|
+
/**
|
|
3
|
+
* Read-only overlay of another tab's live drafts (issue 1545). Deliberately outside
|
|
4
|
+
* history, snapshots, autosave and linked-entry save inputs: only the renderer reads it.
|
|
5
|
+
*/
|
|
6
|
+
export type RemoteDraftsState = {
|
|
7
|
+
remoteDrafts: RemoteDraftOverlay;
|
|
8
|
+
setRemoteDrafts: (overlay: RemoteDraftOverlay) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function createRemoteDraftsSlice(set: (update: (state: RemoteDraftsState) => Partial<RemoteDraftsState>) => void): RemoteDraftsState;
|
|
@@ -1,17 +1,77 @@
|
|
|
1
|
-
import type { EditorBlockId } from '../../../../core/src/index';
|
|
1
|
+
import type { EditorBlockId, SendId } from '../../../../core/src/index';
|
|
2
|
+
import type { FlushCheckpoint, SendAcknowledgement } from '../../sync/sendPlanning';
|
|
3
|
+
import type { EditorValueKey } from '../editorSnapshot';
|
|
2
4
|
export type AutosaveStatusValue = 'idle' | 'saving' | 'success' | 'error';
|
|
3
5
|
export type AutosaveStatus = {
|
|
4
6
|
status: AutosaveStatusValue;
|
|
5
7
|
lastSavedAt: string | null;
|
|
6
8
|
hasFailedSaves: boolean;
|
|
7
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* One autosave scheduler's handle. `sendNow` sends the given values in the scheduler's
|
|
12
|
+
* next batch, retrying failures explicitly, alongside anything the background would send.
|
|
13
|
+
*/
|
|
8
14
|
export type AutosaveHandle = {
|
|
9
15
|
trigger: () => void;
|
|
10
|
-
cancel
|
|
11
|
-
flush: () =>
|
|
16
|
+
cancel: () => void;
|
|
17
|
+
flush: () => Promise<void>;
|
|
12
18
|
isPending: () => boolean;
|
|
19
|
+
sendNow: (keys: readonly EditorValueKey[], checkpoints?: readonly FlushCheckpoint[], signal?: AbortSignal) => Promise<readonly SendAcknowledgement[]>;
|
|
13
20
|
};
|
|
14
21
|
export type AutosaveType = 'metadata' | 'content' | 'blocks' | 'linkedEntries';
|
|
22
|
+
/**
|
|
23
|
+
* Operations that write the document's route or draft on the server; while one's request
|
|
24
|
+
* is out, the document's values are held (issue 1553, B-ownership).
|
|
25
|
+
*/
|
|
26
|
+
export type HeldOperation = 'publish' | 'schedule' | 'cancel-schedule' | 'discard-draft' | 'delete';
|
|
27
|
+
/** Operations on the whole document; their status sits beside the values' (issue 1553). */
|
|
28
|
+
export type LifecycleOperation = 'save-draft' | 'restore-replay' | HeldOperation;
|
|
29
|
+
/**
|
|
30
|
+
* Why an operation didn't happen. `server` is a refused request; the others are refusals
|
|
31
|
+
* before any request: values whose saves failed, values that can't be sent (not writable
|
|
32
|
+
* or not saveable), and blocks that fail publish validation.
|
|
33
|
+
*/
|
|
34
|
+
export type LifecycleFailure = Readonly<{
|
|
35
|
+
kind: 'server';
|
|
36
|
+
message: string;
|
|
37
|
+
}> | Readonly<{
|
|
38
|
+
kind: 'values-failed';
|
|
39
|
+
ids: readonly SendId[];
|
|
40
|
+
}> | Readonly<{
|
|
41
|
+
kind: 'values-blocked';
|
|
42
|
+
keys: readonly EditorValueKey[];
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
kind: 'invalid-blocks';
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* A failed status records the failure and how many saves had been accepted when it
|
|
48
|
+
* failed, so whether it still holds is derived (`activeFailure`) rather than cleared.
|
|
49
|
+
* `holding` is a held operation whose request is out (or about to be): the document's
|
|
50
|
+
* values aren't sent until it ends, and edits typed meanwhile wait (`schedulerValues`).
|
|
51
|
+
*/
|
|
52
|
+
export type LifecycleStatus = Readonly<{
|
|
53
|
+
kind: 'idle';
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: 'running';
|
|
56
|
+
operation: LifecycleOperation;
|
|
57
|
+
}> | Readonly<{
|
|
58
|
+
kind: 'holding';
|
|
59
|
+
operation: HeldOperation;
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: 'failed';
|
|
62
|
+
operation: LifecycleOperation;
|
|
63
|
+
failure: LifecycleFailure;
|
|
64
|
+
acceptedSaves: number;
|
|
65
|
+
}>;
|
|
66
|
+
/** What a lifecycle action tells its caller. Expected refusals are results, not throws. */
|
|
67
|
+
export type LifecycleOutcome = Readonly<{
|
|
68
|
+
kind: 'done';
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'no-changes';
|
|
71
|
+
}> | Readonly<{
|
|
72
|
+
kind: 'failed';
|
|
73
|
+
failure: LifecycleFailure;
|
|
74
|
+
}>;
|
|
15
75
|
export type FocusSettingsTab = 'display' | 'behavior' | 'style';
|
|
16
76
|
export type FocusTarget = Readonly<{
|
|
17
77
|
kind: 'block';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type FooterCompositionSnapshot, type PublicProfileSnapshot } from '../../api/src/footer-settings';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FooterComposerPanelProps } from './footerComposerPanelTypes';
|
|
3
3
|
import { type FooterCompositionV1, type PublicProfile } from '../../core/src/index';
|
|
4
4
|
import type { FooterEditorTarget } from './footerComposer';
|
|
5
5
|
import { type FooterNavigationLayoutAccess } from './useFooterNavigationLayout';
|
|
6
6
|
export type SaveState = 'idle' | 'saving' | 'saved' | 'conflict' | 'failed';
|
|
7
7
|
export type CompositionSaveOutcome = 'saved' | 'conflict' | 'failed';
|
|
8
8
|
type FooterComposerStateOptions = Readonly<{
|
|
9
|
-
apiClient:
|
|
9
|
+
apiClient: FooterComposerPanelProps['apiClient'];
|
|
10
10
|
canEdit: boolean;
|
|
11
11
|
initialTarget?: FooterEditorTarget;
|
|
12
12
|
initialTargetRequestId?: number;
|
|
@@ -11,7 +11,7 @@ export type FooterNavigationLayoutAccess = Readonly<{
|
|
|
11
11
|
selectionVersion: number;
|
|
12
12
|
}>;
|
|
13
13
|
export declare function useFooterNavigationLayout({ apiClient, siteId, access, onSaved, onSaveStateChange, onMessageChange, }: Readonly<{
|
|
14
|
-
apiClient: ApiClient
|
|
14
|
+
apiClient: ApiClient<'applySiteStyleSelection'>;
|
|
15
15
|
siteId: string;
|
|
16
16
|
access: FooterNavigationLayoutAccess;
|
|
17
17
|
onSaved?: () => void;
|
|
@@ -58,18 +58,18 @@ export declare const EVENT_CONTENT_TYPE_SCHEMA: {
|
|
|
58
58
|
readonly id: "summary";
|
|
59
59
|
readonly type: "textarea";
|
|
60
60
|
readonly label: "Short introduction";
|
|
61
|
-
readonly description: "
|
|
61
|
+
readonly description: "Shown in your listings and search results, and at the top of its page.";
|
|
62
62
|
readonly rows: 3;
|
|
63
63
|
}, {
|
|
64
64
|
readonly id: "image";
|
|
65
65
|
readonly type: "media";
|
|
66
66
|
readonly label: "Event image";
|
|
67
|
-
readonly description: "
|
|
67
|
+
readonly description: "At the top of its page and beside it in your listings.";
|
|
68
68
|
}, {
|
|
69
69
|
readonly id: "body";
|
|
70
70
|
readonly type: "richText";
|
|
71
|
-
readonly label: "
|
|
72
|
-
readonly description: "
|
|
71
|
+
readonly label: "Full description";
|
|
72
|
+
readonly description: "The main text on its page, under the introduction.";
|
|
73
73
|
}];
|
|
74
74
|
readonly routing: {
|
|
75
75
|
readonly enabled: true;
|