@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,25 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type MagicLinkFormProps = {
|
|
3
|
-
/** Initial email to pre-populate the form */
|
|
4
3
|
initialEmail?: string;
|
|
5
|
-
/** Title shown above the form */
|
|
6
4
|
title?: string;
|
|
7
|
-
/** Subtitle/description shown below the title */
|
|
8
5
|
subtitle?: string;
|
|
9
|
-
/** Text for the submit button */
|
|
10
6
|
buttonText?: string;
|
|
11
|
-
/** Success message shown after email is sent */
|
|
12
7
|
successMessage?: string;
|
|
13
|
-
/** Called when successfully sent (optional) */
|
|
14
8
|
onSuccess?: () => void;
|
|
15
|
-
/** CSS class prefix for styling (e.g., 'cp' for customer portal, 'er' for event registration, 'cr' for course registration) */
|
|
16
9
|
classPrefix?: 'cp' | 'er' | 'cr' | 'er-whole-series';
|
|
17
|
-
/** Whether to show compact/inline styling */
|
|
18
10
|
compact?: boolean;
|
|
19
11
|
};
|
|
20
|
-
|
|
21
|
-
* Reusable magic link login form.
|
|
22
|
-
* Used by Customer Portal and Event Registration blocks.
|
|
23
|
-
*/
|
|
24
|
-
export declare function MagicLinkForm({ initialEmail, title, subtitle, buttonText, successMessage, onSuccess, classPrefix, compact, }: MagicLinkFormProps): React.JSX.Element;
|
|
25
|
-
export default MagicLinkForm;
|
|
12
|
+
export declare function MagicLinkForm(props: MagicLinkFormProps): React.JSX.Element;
|
|
@@ -4,6 +4,12 @@ export type MagicLinkSubmissionState = Readonly<{
|
|
|
4
4
|
tag: 'submitting';
|
|
5
5
|
}> | Readonly<{
|
|
6
6
|
tag: 'success';
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
tag: 'demo_link';
|
|
9
|
+
url: string;
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
tag: 'demo_refused';
|
|
12
|
+
message: string;
|
|
7
13
|
}> | Readonly<{
|
|
8
14
|
tag: 'error';
|
|
9
15
|
message: string;
|
|
@@ -12,6 +18,12 @@ export type MagicLinkSubmissionAction = Readonly<{
|
|
|
12
18
|
type: 'submit-started';
|
|
13
19
|
}> | Readonly<{
|
|
14
20
|
type: 'submit-succeeded';
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
type: 'submit-demo-link';
|
|
23
|
+
url: string;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
type: 'submit-demo-refused';
|
|
26
|
+
message: string;
|
|
15
27
|
}> | Readonly<{
|
|
16
28
|
type: 'submit-failed';
|
|
17
29
|
message: string;
|
|
@@ -8,6 +8,7 @@ import { type InteractiveIslandProps } from '../../../contracts/islands';
|
|
|
8
8
|
import type { BrowserReadAuthority } from '../api/types';
|
|
9
9
|
type ShopSourceProps = ShopDisplayConfig & Readonly<{
|
|
10
10
|
siteId?: string;
|
|
11
|
+
demoEmailSuppressed?: boolean;
|
|
11
12
|
apiBaseUrl?: string;
|
|
12
13
|
readAuthority?: BrowserReadAuthority;
|
|
13
14
|
stage?: 'preview' | 'published';
|
|
@@ -17,6 +18,7 @@ export type PassesMembershipsHydration = Readonly<{
|
|
|
17
18
|
memberships: readonly PublicMembershipProduct[];
|
|
18
19
|
passPurchaseMode: 'add_to_cart' | 'buy_now';
|
|
19
20
|
buttonVariant: BlockButtonRole;
|
|
21
|
+
demoEmailSuppressed?: boolean;
|
|
20
22
|
}>;
|
|
21
23
|
export type ProductListHydration = Readonly<{
|
|
22
24
|
products: readonly PublicProduct[];
|
|
@@ -39,6 +41,7 @@ export type CartHydration = Readonly<{
|
|
|
39
41
|
export type CheckoutHydration = Readonly<{
|
|
40
42
|
emptyStateText: string;
|
|
41
43
|
submitButtonText: string;
|
|
44
|
+
demoEmailSuppressed?: boolean;
|
|
42
45
|
}>;
|
|
43
46
|
type ShopIslandMeta = Readonly<{
|
|
44
47
|
siteId?: string;
|
|
@@ -116,6 +119,7 @@ export declare const shopBlockRuntime: Readonly<{
|
|
|
116
119
|
memberships: readonly PublicMembershipProduct[];
|
|
117
120
|
passPurchaseMode: "add_to_cart" | "buy_now";
|
|
118
121
|
buttonVariant: BlockButtonRole;
|
|
122
|
+
demoEmailSuppressed?: boolean;
|
|
119
123
|
}>;
|
|
120
124
|
}>;
|
|
121
125
|
contracts: Readonly<{
|
|
@@ -164,6 +168,7 @@ export declare const shopBlockRuntime: Readonly<{
|
|
|
164
168
|
memberships: readonly PublicMembershipProduct[];
|
|
165
169
|
passPurchaseMode: "add_to_cart" | "buy_now";
|
|
166
170
|
buttonVariant: BlockButtonRole;
|
|
171
|
+
demoEmailSuppressed?: boolean;
|
|
167
172
|
}>;
|
|
168
173
|
}>) => unknown;
|
|
169
174
|
decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
|
|
@@ -206,6 +211,7 @@ export declare const shopBlockRuntime: Readonly<{
|
|
|
206
211
|
memberships: readonly PublicMembershipProduct[];
|
|
207
212
|
passPurchaseMode: "add_to_cart" | "buy_now";
|
|
208
213
|
buttonVariant: BlockButtonRole;
|
|
214
|
+
demoEmailSuppressed?: boolean;
|
|
209
215
|
}>;
|
|
210
216
|
}>>;
|
|
211
217
|
}>;
|
|
@@ -474,6 +480,7 @@ export declare const checkoutBlockRuntime: Readonly<{
|
|
|
474
480
|
hydration: Readonly<{
|
|
475
481
|
emptyStateText: string;
|
|
476
482
|
submitButtonText: string;
|
|
483
|
+
demoEmailSuppressed?: boolean;
|
|
477
484
|
}>;
|
|
478
485
|
}>;
|
|
479
486
|
contracts: Readonly<{
|
|
@@ -494,6 +501,7 @@ export declare const checkoutBlockRuntime: Readonly<{
|
|
|
494
501
|
hydration: Readonly<{
|
|
495
502
|
emptyStateText: string;
|
|
496
503
|
submitButtonText: string;
|
|
504
|
+
demoEmailSuppressed?: boolean;
|
|
497
505
|
}>;
|
|
498
506
|
}>) => unknown;
|
|
499
507
|
decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
|
|
@@ -508,6 +516,7 @@ export declare const checkoutBlockRuntime: Readonly<{
|
|
|
508
516
|
hydration: Readonly<{
|
|
509
517
|
emptyStateText: string;
|
|
510
518
|
submitButtonText: string;
|
|
519
|
+
demoEmailSuppressed?: boolean;
|
|
511
520
|
}>;
|
|
512
521
|
}>>;
|
|
513
522
|
}>;
|
|
@@ -563,6 +572,7 @@ export declare const shopInteractiveIslandPropsCodec: Readonly<{
|
|
|
563
572
|
memberships: readonly PublicMembershipProduct[];
|
|
564
573
|
passPurchaseMode: "add_to_cart" | "buy_now";
|
|
565
574
|
buttonVariant: BlockButtonRole;
|
|
575
|
+
demoEmailSuppressed?: boolean;
|
|
566
576
|
}>;
|
|
567
577
|
}>>;
|
|
568
578
|
}>) => unknown;
|
|
@@ -615,6 +625,7 @@ export declare const shopInteractiveIslandPropsCodec: Readonly<{
|
|
|
615
625
|
memberships: readonly PublicMembershipProduct[];
|
|
616
626
|
passPurchaseMode: "add_to_cart" | "buy_now";
|
|
617
627
|
buttonVariant: BlockButtonRole;
|
|
628
|
+
demoEmailSuppressed?: boolean;
|
|
618
629
|
}>;
|
|
619
630
|
}>>;
|
|
620
631
|
}>>;
|
|
@@ -851,6 +862,7 @@ export declare const checkoutInteractiveIslandPropsCodec: Readonly<{
|
|
|
851
862
|
hydration: Readonly<{
|
|
852
863
|
emptyStateText: string;
|
|
853
864
|
submitButtonText: string;
|
|
865
|
+
demoEmailSuppressed?: boolean;
|
|
854
866
|
}>;
|
|
855
867
|
}>>;
|
|
856
868
|
}>) => unknown;
|
|
@@ -875,6 +887,7 @@ export declare const checkoutInteractiveIslandPropsCodec: Readonly<{
|
|
|
875
887
|
hydration: Readonly<{
|
|
876
888
|
emptyStateText: string;
|
|
877
889
|
submitButtonText: string;
|
|
890
|
+
demoEmailSuppressed?: boolean;
|
|
878
891
|
}>;
|
|
879
892
|
}>>;
|
|
880
893
|
}>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BookingSuccessCopy } from '../../nodes/booking-form.state';
|
|
3
|
+
export declare function BookingConfirmation(props: Readonly<{
|
|
4
|
+
demoEmailSuppressed?: boolean;
|
|
5
|
+
email: string | null;
|
|
6
|
+
copy: BookingSuccessCopy;
|
|
7
|
+
messagePresentation: BookingConfirmationMessagePresentation;
|
|
8
|
+
noteClassName?: string;
|
|
9
|
+
showConfirmationNote?: boolean;
|
|
10
|
+
}>): React.ReactNode;
|
|
11
|
+
export declare function DemoBookingPortalAccess(props: Readonly<{
|
|
12
|
+
email: string | null;
|
|
13
|
+
noteClassName?: string;
|
|
14
|
+
showConfirmationNote?: boolean;
|
|
15
|
+
}>): React.ReactElement;
|
|
16
|
+
type BookingConfirmationMessagePresentation = Readonly<{
|
|
17
|
+
kind: 'paragraph';
|
|
18
|
+
className?: string;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'plain';
|
|
21
|
+
}>;
|
|
22
|
+
export {};
|
|
@@ -12,6 +12,7 @@ export type { ActionRowProps } from './ActionRow';
|
|
|
12
12
|
export { FieldValidationMessage, getFieldValidationControlProps, } from './FieldValidationMessage';
|
|
13
13
|
export type { FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, } from './FieldValidationMessage';
|
|
14
14
|
export { FeedbackMessage } from './FeedbackMessage';
|
|
15
|
+
export { DemoPortalSignInLink } from './DemoPortalSignInLink';
|
|
15
16
|
export type { FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, FeedbackTreatment, } from './FeedbackMessage';
|
|
16
17
|
export { LoggedInAsUser } from './LoggedInAsUser';
|
|
17
18
|
export { StateIcon } from './StateIcon';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type StoredDemoBookingPass = Readonly<{
|
|
2
|
+
email: string;
|
|
3
|
+
pass: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function normalizeDemoBookingEmail(email: string): string;
|
|
6
|
+
export declare function storeDemoBookingPass(email: string, pass: string): void;
|
|
7
|
+
export declare function storeDemoBookingPassIfAvailable(email: string | null | undefined, pass: string | null | undefined): void;
|
|
8
|
+
export declare function getDemoBookingPass(email: string): string | null;
|
|
9
|
+
export declare function storeDemoBookingCheckoutReturn(email: string, pass: string | null | undefined): void;
|
|
10
|
+
export declare function readDemoBookingCheckoutReturnEmail(): string | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const CUSTOMER_PORTAL_PATH = "/portal";
|
|
2
|
+
export declare function buildPortalCallbackUrl(origin: string, redirectTo: string): string;
|
|
3
|
+
export type DemoPortalMagicLinkRequest = Readonly<{
|
|
4
|
+
email: string;
|
|
5
|
+
redirectUrl: string;
|
|
6
|
+
demoBookingPass?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type DemoPortalMagicLinkResponse = Readonly<{
|
|
9
|
+
message: string;
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
demoSignInUrl: string;
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
kind: 'demo_email_not_booked_here';
|
|
14
|
+
message: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type DemoPortalMagicLinkOutcome = Readonly<{
|
|
17
|
+
kind: 'email_sent';
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'demo_sign_in';
|
|
20
|
+
url: string;
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
kind: 'refused';
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function requestDemoPortalMagicLink(input: Readonly<{
|
|
26
|
+
email: string;
|
|
27
|
+
redirectUrl: string;
|
|
28
|
+
send: (request: DemoPortalMagicLinkRequest) => Promise<DemoPortalMagicLinkResponse>;
|
|
29
|
+
}>): Promise<DemoPortalMagicLinkOutcome>;
|
|
@@ -48,6 +48,10 @@ export declare const eventRegistrationErrors: {
|
|
|
48
48
|
readonly message: "The payment options for this event have changed. Please check the latest options before continuing.";
|
|
49
49
|
readonly action: "payment-options";
|
|
50
50
|
};
|
|
51
|
+
readonly verificationFailed: {
|
|
52
|
+
readonly message: "We couldn’t confirm this request came from a person. Please refresh the page and try again.";
|
|
53
|
+
readonly action: "none";
|
|
54
|
+
};
|
|
51
55
|
readonly idempotencyConflict: {
|
|
52
56
|
readonly message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.";
|
|
53
57
|
readonly action: "portal";
|
|
@@ -2,9 +2,8 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import type { BlockManifest } from '../../../blocks/src/index';
|
|
3
3
|
import { type FieldWidgetComponent } from '../../../block-form/src/index';
|
|
4
4
|
import type { ManifestFormSource } from '../../../block-form/src/index';
|
|
5
|
-
export type { AutosaveHandle } from '../
|
|
5
|
+
export type { AutosaveHandle } from '../ui/stores/types';
|
|
6
6
|
export type ContentFieldsFormProps<TValues extends Record<string, unknown>> = {
|
|
7
|
-
siteId: string;
|
|
8
7
|
manifest?: BlockManifest;
|
|
9
8
|
form?: ManifestFormSource;
|
|
10
9
|
/**
|
|
@@ -14,12 +13,8 @@ export type ContentFieldsFormProps<TValues extends Record<string, unknown>> = {
|
|
|
14
13
|
initialValues?: TValues;
|
|
15
14
|
paletteTokens?: Record<string, string>;
|
|
16
15
|
widgets?: Partial<Record<string, FieldWidgetComponent>>;
|
|
17
|
-
mediaProvider?: (props: {
|
|
18
|
-
siteId: string;
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
}) => ReactNode;
|
|
21
16
|
errorComponent?: (props: {
|
|
22
17
|
error: string;
|
|
23
18
|
}) => ReactNode;
|
|
24
19
|
};
|
|
25
|
-
export declare function ContentFieldsForm<TValues extends Record<string, unknown>>({
|
|
20
|
+
export declare function ContentFieldsForm<TValues extends Record<string, unknown>>({ manifest, form: formSpec, initialValues: _initialValues, paletteTokens, widgets, errorComponent: ErrorComponent, }: ContentFieldsFormProps<TValues>): import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ApiClient } from '../../../api/src/request';
|
|
3
|
+
import type { DocumentLeaseReadInput } from './readDocumentLeaseBaselines';
|
|
4
|
+
import type { EditLeaseScope } from '../../../core/src/index';
|
|
5
|
+
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
6
|
+
import type { EditLeaseLossSignal } from './editLeaseLossSignal';
|
|
7
|
+
import { useEditLease, type EditLeaseChangeSubscription } from '../hooks/useEditLease';
|
|
8
|
+
export type EditorLeaseConfig = Readonly<{
|
|
9
|
+
siteId: string;
|
|
10
|
+
scope: EditLeaseScope;
|
|
11
|
+
subscribeToLeaseChanges?: EditLeaseChangeSubscription;
|
|
12
|
+
/** Refresh display props after the authoritative baseline has been applied. */
|
|
13
|
+
onGranted?: () => void;
|
|
14
|
+
onAccessChanged?: () => void;
|
|
15
|
+
}>;
|
|
16
|
+
export type EditLeaseActions = ReturnType<typeof useEditLease>;
|
|
17
|
+
/**
|
|
18
|
+
* Discarding is local and synchronous: it can't fail, and it happens before the tab leaves
|
|
19
|
+
* edit mode. Newer server values arrive by the take-back refresh on the next grant, or, in
|
|
20
|
+
* view mode, by live drafts and reload broadcasts.
|
|
21
|
+
*/
|
|
22
|
+
export type EditLeaseControllerActions = EditLeaseActions & Readonly<{
|
|
23
|
+
discardLocal: () => void;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Mounts the lease session only while `lease` is set. Children keep their position in the
|
|
27
|
+
* tree either way, so joining or leaving the lease never remounts the editor.
|
|
28
|
+
*/
|
|
29
|
+
export declare function EditLeaseController({ children, lease, ...session }: Readonly<{
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
document: Pick<DocumentLeaseReadInput, 'type' | 'schema' | 'blockFieldExtensions'>;
|
|
32
|
+
lease: EditorLeaseConfig | null;
|
|
33
|
+
apiClient: ApiClient;
|
|
34
|
+
uiStore: EditorUiStoreInstance;
|
|
35
|
+
leaseLossSignal: EditLeaseLossSignal;
|
|
36
|
+
/** Rendered beside children, only while the lease session is mounted. */
|
|
37
|
+
sessionChildren?: ReactNode;
|
|
38
|
+
}>): import("react").JSX.Element;
|
|
39
|
+
export declare function useEditLeaseActions(): EditLeaseControllerActions | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type LeaseNotice, type LeaseNoticeAction } from './editLeaseNotice';
|
|
3
|
+
export type LeaseNoticeHandlers = Readonly<Record<LeaseNoticeAction, () => void>>;
|
|
4
|
+
/** Makes a mount's editing surface inert while the tab is waiting for, or denied, the lease. */
|
|
5
|
+
export declare function EditorWriteSurface({ children }: Readonly<{
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}>): import("react").JSX.Element;
|
|
8
|
+
export declare function LeaseNoticeButtons({ notice, handlers, size }: Readonly<{
|
|
9
|
+
notice: LeaseNotice;
|
|
10
|
+
handlers: LeaseNoticeHandlers;
|
|
11
|
+
size?: 'sm';
|
|
12
|
+
}>): import("react").JSX.Element[];
|
|
13
|
+
/** A blocking modal; it can't be dismissed, because the modal is the only way forward. */
|
|
14
|
+
export declare function EditLeaseModalView({ notice, handlers }: Readonly<{
|
|
15
|
+
notice: LeaseNotice | null;
|
|
16
|
+
handlers: LeaseNoticeHandlers;
|
|
17
|
+
}>): import("react").JSX.Element;
|
|
18
|
+
/** The document's lease modal. Pass `onKeepViewing` where the tab can return to view mode. */
|
|
19
|
+
export declare function EditLeaseModal({ thing, onKeepViewing }: Readonly<{
|
|
20
|
+
thing: string;
|
|
21
|
+
onKeepViewing?: () => void;
|
|
22
|
+
}>): import("react").JSX.Element | null;
|
|
23
|
+
export declare function LeaseDiscardedNoticeView({ thing, onDismiss }: Readonly<{
|
|
24
|
+
thing: string;
|
|
25
|
+
onDismiss: () => void;
|
|
26
|
+
}>): import("react").JSX.Element;
|
|
27
|
+
/** Shown after taking the lease back replaced edits another tab had changed. */
|
|
28
|
+
export declare function EditLeaseDiscardedNotice({ thing }: Readonly<{
|
|
29
|
+
thing: string;
|
|
30
|
+
}>): import("react").JSX.Element | null;
|
|
31
|
+
/**
|
|
32
|
+
* One write gate per editor mount: the whole editing surface is inert while the tab can't
|
|
33
|
+
* write, and the lease modal explains why. The modal portals outside the inert subtree.
|
|
34
|
+
*/
|
|
35
|
+
export declare function EditorWriteGate({ thing, children }: Readonly<{
|
|
36
|
+
thing: string;
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
}>): import("react").JSX.Element;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type ContentEntrySnapshot, type ContentTypeSchema, type ToolbarState } from '../../../content-model/src/index';
|
|
2
2
|
import type { EditorBlockId, MailingListProviderScope } from '../../../core/src/index';
|
|
3
|
-
import type { BlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
3
|
+
import type { BlockItem, ServerBlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
4
4
|
import { type ReactNode } from 'react';
|
|
5
|
-
import { type
|
|
6
|
-
import type
|
|
7
|
-
import { type
|
|
8
|
-
import type { DraftWorkflowStatus } from '../types';
|
|
5
|
+
import { type EntryActions } from '../hooks/useEntryActions';
|
|
6
|
+
import { type BlockedPublishPlan } from '../hooks/blockedPublishPlan';
|
|
7
|
+
import { type ContentEntryEditorServices, type PageSurfaceEditorServices } from '../services';
|
|
9
8
|
import { type EditorUiState } from '../ui/editorUiStore';
|
|
10
9
|
import type { ResolveBlockManifest } from '../ui/blockValidationView';
|
|
10
|
+
import { type RouteWrites } from './routeWrites';
|
|
11
|
+
import type { EditorApiClient, EditorApiClientFactory } from '../services/editorApiClient';
|
|
12
|
+
import { type EditorLeaseParticipation } from './editorLeaseParticipation';
|
|
13
|
+
import { type LiveDraftsConfig } from '../liveDrafts/useLiveDrafts';
|
|
11
14
|
export type EntryControllerBlocksSlice = {
|
|
12
15
|
list: BlockItem[];
|
|
13
16
|
status: 'idle' | 'loading' | 'error';
|
|
@@ -16,10 +19,6 @@ export type EntryControllerBlocksSlice = {
|
|
|
16
19
|
};
|
|
17
20
|
};
|
|
18
21
|
export type EntryControllerUiSlice = EditorUiState;
|
|
19
|
-
export type EntryControllerAutosaveState = {
|
|
20
|
-
status: DraftWorkflowStatus;
|
|
21
|
-
hasFailedSaves: boolean;
|
|
22
|
-
};
|
|
23
22
|
export type EntryDraftBlockPatch = {
|
|
24
23
|
blockId: EditorBlockId;
|
|
25
24
|
path?: string | null;
|
|
@@ -47,18 +46,9 @@ export type EntryRecoveryConflictState = Readonly<{
|
|
|
47
46
|
reviewAffectedBlocks: () => void;
|
|
48
47
|
discardRecoveredChanges: () => void;
|
|
49
48
|
}>;
|
|
50
|
-
|
|
51
|
-
export type EntryActions = Readonly<{
|
|
52
|
-
kind: 'entryLifecycle';
|
|
53
|
-
saveDraft: () => Promise<void>;
|
|
54
|
-
publish: (options?: PublishOptions) => Promise<void>;
|
|
55
|
-
discardDraft: () => Promise<void>;
|
|
56
|
-
deleteEntry: () => Promise<void>;
|
|
57
|
-
}> | Readonly<{
|
|
58
|
-
kind: 'pageSurfaceDraft';
|
|
59
|
-
saveDraft: () => Promise<void>;
|
|
60
|
-
}>;
|
|
49
|
+
export type { EntryActions };
|
|
61
50
|
export type EntryControllerContextValue = {
|
|
51
|
+
apiClient: EditorApiClient;
|
|
62
52
|
entry: ContentEntrySnapshot;
|
|
63
53
|
baseline: Record<string, unknown>;
|
|
64
54
|
errorMessage: string | null;
|
|
@@ -66,21 +56,25 @@ export type EntryControllerContextValue = {
|
|
|
66
56
|
type: 'blocked';
|
|
67
57
|
}> | null;
|
|
68
58
|
recoveryConflict: EntryRecoveryConflictState | null;
|
|
69
|
-
setErrorMessage: (msg: string | null) => void;
|
|
70
59
|
actions: EntryActions;
|
|
60
|
+
/** Writes that return the route row they wrote (native publish, schedule, cancel). */
|
|
61
|
+
routeWrites: RouteWrites;
|
|
71
62
|
blocks: EntryControllerBlocksSlice;
|
|
72
63
|
drafts: EntryDraftsSlice;
|
|
73
64
|
toolbar: ToolbarState<Record<string, unknown>>;
|
|
74
65
|
};
|
|
75
66
|
type BaseInternalProps = {
|
|
76
67
|
children: ReactNode;
|
|
77
|
-
|
|
68
|
+
apiClientFactory: EditorApiClientFactory;
|
|
69
|
+
/** Viewing mounts no lease controller; switching to a lease config keeps the store and its edits. */
|
|
70
|
+
editLease: EditorLeaseParticipation;
|
|
78
71
|
siteId: string;
|
|
79
72
|
routeId?: string;
|
|
80
73
|
type: string;
|
|
81
74
|
schema: ContentTypeSchema;
|
|
82
75
|
entityLabel?: string | null;
|
|
83
76
|
initialEntry?: ContentEntrySnapshot | null;
|
|
77
|
+
initialMetadataRevision: string | null;
|
|
84
78
|
/** Autosave mode (default: auto). Manual disables background autosave triggers. */
|
|
85
79
|
saveMode?: 'auto' | 'manual';
|
|
86
80
|
/** Initial content values for content entries - used to hydrate content store */
|
|
@@ -89,34 +83,35 @@ type BaseInternalProps = {
|
|
|
89
83
|
initialPublishedContent?: Record<string, unknown> | null;
|
|
90
84
|
onEntryUpdated?: (response: unknown) => void;
|
|
91
85
|
historyShortcutsEnabled?: boolean;
|
|
86
|
+
blockFieldExtensions?: import('../../../editor-blocks/src/block-editor/blockDraftBaselineSeed').BlockFieldExtensions | null;
|
|
92
87
|
resolveBlockManifest?: ResolveBlockManifest;
|
|
93
88
|
getExpectedMailingListProviderScope?: () => MailingListProviderScope | null;
|
|
89
|
+
/** Live drafts between tabs (issue 1545); omitted where the host has no realtime client. */
|
|
90
|
+
liveDrafts?: LiveDraftsConfig | null;
|
|
94
91
|
};
|
|
95
92
|
type EditorOwnerServiceProps = Readonly<{
|
|
96
93
|
owner: {
|
|
97
94
|
kind: 'contentEntry';
|
|
98
95
|
contentEntryId: string;
|
|
99
96
|
};
|
|
100
|
-
services?:
|
|
101
|
-
kind: 'entryLifecycle';
|
|
102
|
-
}>;
|
|
97
|
+
services?: ContentEntryEditorServices;
|
|
103
98
|
}> | Readonly<{
|
|
104
99
|
owner: {
|
|
105
100
|
kind: 'pageSurface';
|
|
106
101
|
pageSurfaceId: string;
|
|
107
102
|
};
|
|
108
|
-
services:
|
|
109
|
-
kind: 'pageSurfaceDraft';
|
|
110
|
-
}>;
|
|
103
|
+
services: PageSurfaceEditorServices | ((apiClient: EditorApiClient) => PageSurfaceEditorServices);
|
|
111
104
|
}>;
|
|
112
105
|
type PageInternalProps = {
|
|
113
106
|
kind: 'page';
|
|
107
|
+
initialContentRevision?: never;
|
|
114
108
|
initialStatus?: 'draft' | 'scheduled' | 'published';
|
|
115
|
-
initialBlocks?:
|
|
109
|
+
initialBlocks?: ServerBlockItem[];
|
|
116
110
|
};
|
|
117
111
|
type ContentInternalProps = {
|
|
118
112
|
kind: 'content';
|
|
119
|
-
|
|
113
|
+
initialContentRevision: string;
|
|
114
|
+
initialBlocks?: ServerBlockItem[];
|
|
120
115
|
};
|
|
121
116
|
type EntryControllerProviderProps = BaseInternalProps & EditorOwnerServiceProps & (PageInternalProps | ContentInternalProps);
|
|
122
117
|
/**
|
|
@@ -137,34 +132,3 @@ type EntryControllerProviderProps = BaseInternalProps & EditorOwnerServiceProps
|
|
|
137
132
|
export declare function EntryControllerProvider(props: EntryControllerProviderProps): import("react").JSX.Element;
|
|
138
133
|
export declare function useEntryEditorController(): EntryControllerContextValue;
|
|
139
134
|
export declare function useEntryController(): EntryControllerContextValue;
|
|
140
|
-
/**
|
|
141
|
-
* Hook to access autosave status from the uiStore.
|
|
142
|
-
*
|
|
143
|
-
* @deprecated Use useEditorUiStore with selectors instead for better performance:
|
|
144
|
-
* ```tsx
|
|
145
|
-
* const metadataStatus = useEditorUiStore(state => state.autosave.metadata.status)
|
|
146
|
-
* const blocksStatus = useEditorUiStore(state => state.autosave.blocks.status)
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* This hook exists for backward compatibility and subscribes to the entire
|
|
150
|
-
* autosave state, causing re-renders when any autosave status changes.
|
|
151
|
-
*/
|
|
152
|
-
export declare function useAutosave(): {
|
|
153
|
-
autosave: import("../ui/editorUiStore").AutosaveStatus;
|
|
154
|
-
blockAutosave: import("../ui/editorUiStore").AutosaveStatus;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* @deprecated Use useEditorUiStore hook directly from '../ui/editorUiStore'
|
|
158
|
-
* This provides granular selector support for better performance.
|
|
159
|
-
*
|
|
160
|
-
* Example:
|
|
161
|
-
* ```tsx
|
|
162
|
-
* // Old (re-renders on any state change):
|
|
163
|
-
* const uiStore = useEntryUiStore()
|
|
164
|
-
*
|
|
165
|
-
* // New (only re-renders when metadata status changes):
|
|
166
|
-
* const metadataStatus = useEditorUiStore(state => state.metadata.getSnapshot().syncState.kind)
|
|
167
|
-
* ```
|
|
168
|
-
*/
|
|
169
|
-
export declare function useEntryUiStore(): import("zustand").StoreApi<EditorUiState>;
|
|
170
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A linked entry held elsewhere keeps a notice scoped to its panel: it doesn't make the whole
|
|
3
|
+
* page read-only, so it never raises the page's modal.
|
|
4
|
+
*/
|
|
5
|
+
export declare function LinkedEntryLeaseBanner({ entryId }: Readonly<{
|
|
6
|
+
entryId: string;
|
|
7
|
+
}>): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EditorApiClient, EditorApiClientFactory } from '../services/editorApiClient';
|
|
2
|
+
import { type EditorLeaseConfig } from './EditLeaseController';
|
|
3
|
+
type Props = Readonly<{
|
|
4
|
+
apiClientFactory: EditorApiClientFactory;
|
|
5
|
+
parentApiClient: EditorApiClient;
|
|
6
|
+
lease: EditorLeaseConfig;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* A linked entry keeps its lease controller, and so its lease authority, while it's
|
|
10
|
+
* selected, edited, or has a request in flight or abandoned; it unmounts only once that
|
|
11
|
+
* request settles (issue 1553, D2 and row L6).
|
|
12
|
+
*/
|
|
13
|
+
export declare function LinkedEntryLeaseControllers(props: Props): import("react").JSX.Element[];
|
|
14
|
+
export {};
|
|
@@ -18,3 +18,9 @@ export type DeriveEditorUnpublishedStateInput = Readonly<{
|
|
|
18
18
|
hasBeenPublishedBefore: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
export declare function deriveEditorUnpublishedState(input: DeriveEditorUnpublishedStateInput): EditorUnpublishedState;
|
|
21
|
+
/**
|
|
22
|
+
* Discard returns a document to its published version, so it needs both
|
|
23
|
+
* something to discard and a published version to go back to. A document that
|
|
24
|
+
* has never been published keeps its drafts, and its Discard is unavailable.
|
|
25
|
+
*/
|
|
26
|
+
export declare function canDiscardDraft(state: Pick<EditorUnpublishedState, "hasUnpublishedChanges" | "hasBeenPublishedBefore">): boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A document value (its metadata or its content) as the server last gave it:
|
|
3
|
+
* the draft the editor starts from, the published version it compares
|
|
4
|
+
* against, and the revision the next save is checked with.
|
|
5
|
+
*
|
|
6
|
+
* Kept free of imports so the editor services, which also run beside the
|
|
7
|
+
* server, can describe a discard result without pulling in the block editor.
|
|
8
|
+
*/
|
|
9
|
+
export type DocumentValueBaseline = Readonly<{
|
|
10
|
+
baseline: Record<string, unknown> | null;
|
|
11
|
+
published: Record<string, unknown> | null;
|
|
12
|
+
revision: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
/** Unknown publication evidence retains the existing baseline; known null clears it. */
|
|
15
|
+
export type SavedPublication = Readonly<{
|
|
16
|
+
kind: 'unknown';
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
kind: 'known';
|
|
19
|
+
values: Record<string, unknown> | null;
|
|
20
|
+
}>;
|
|
21
|
+
export type DocumentSaveReceipt<TRevision extends string | null = string | null> = Readonly<{
|
|
22
|
+
values: Record<string, unknown>;
|
|
23
|
+
revision: TRevision;
|
|
24
|
+
published: SavedPublication;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Connects save responses to the mounted lease controller without storing protocol state. */
|
|
2
|
+
export declare function createEditLeaseLossSignal(): {
|
|
3
|
+
emit: () => void;
|
|
4
|
+
subscribe: (listener: () => void) => () => void;
|
|
5
|
+
};
|
|
6
|
+
export type EditLeaseLossSignal = ReturnType<typeof createEditLeaseLossSignal>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EditorEditability } from './editorEditability';
|
|
2
|
+
/**
|
|
3
|
+
* What a lease notice button does; "Edit here" and "Take over" both take the lease.
|
|
4
|
+
* `keep-viewing` only returns the tab to view mode; `discard-and-view` throws away the
|
|
5
|
+
* tab's unsaved edits first, so the label always says what the click does.
|
|
6
|
+
*/
|
|
7
|
+
export type LeaseNoticeAction = 'take-over' | 'retry' | 'discard' | 'keep-viewing' | 'discard-and-view';
|
|
8
|
+
export type LeaseNoticeButton = Readonly<{
|
|
9
|
+
action: LeaseNoticeAction;
|
|
10
|
+
label: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type LeaseNotice = Readonly<{
|
|
13
|
+
variant: 'your-other-tab' | 'another-user' | 'lost-with-unsaved' | 'unreachable';
|
|
14
|
+
title: string;
|
|
15
|
+
body: string | null;
|
|
16
|
+
buttons: readonly LeaseNoticeButton[];
|
|
17
|
+
}>;
|
|
18
|
+
export type LeaseNoticeInput = Readonly<{
|
|
19
|
+
editability: EditorEditability;
|
|
20
|
+
/** "this page", "this entry" or "this event page". */
|
|
21
|
+
thing: string;
|
|
22
|
+
unsaved: boolean;
|
|
23
|
+
/** Preview only: the tab can go back to view mode instead. */
|
|
24
|
+
canKeepViewing: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
/** The blocking notice for a read-only mount, or null when nothing should be said. */
|
|
27
|
+
export declare function planLeaseNotice({ editability, thing, unsaved, canKeepViewing }: LeaseNoticeInput): LeaseNotice | null;
|
|
28
|
+
export declare function leaseDiscardedMessage(thing: string): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { EditAuthority, EditLeaseHolder, EditLeaseToken } from '../../../core/src/index';
|
|
2
|
+
/**
|
|
3
|
+
* Why a store writes without a lease: a server-side exemption, or a surface the lease
|
|
4
|
+
* protocol does not manage (the footer composer and standalone stores).
|
|
5
|
+
*/
|
|
6
|
+
export type UnleasedReason = Extract<EditAuthority, {
|
|
7
|
+
kind: 'exempt';
|
|
8
|
+
}>['reason'] | 'unmanaged-surface';
|
|
9
|
+
/**
|
|
10
|
+
* A mount either declares an exemption, participates in the lease protocol, or is only
|
|
11
|
+
* viewing (a preview tab that has not asked to edit, so it never competes for the lease).
|
|
12
|
+
*/
|
|
13
|
+
export type EditorEditability = Readonly<{
|
|
14
|
+
kind: 'unleased';
|
|
15
|
+
reason: UnleasedReason;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'viewing';
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'acquiring';
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
kind: 'editable';
|
|
22
|
+
token: EditLeaseToken;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'read-only';
|
|
25
|
+
reason: 'held-elsewhere';
|
|
26
|
+
holder: EditLeaseHolder;
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
kind: 'read-only';
|
|
29
|
+
reason: 'unreachable';
|
|
30
|
+
}>;
|
|
31
|
+
/** The explicit editability of a store that no lease manages, such as the footer composer. */
|
|
32
|
+
export declare const unmanagedSurfaceEditability: EditorEditability;
|
|
33
|
+
export declare function canEditorWrite(editability: EditorEditability): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether a mount's editing surface is made inert. A viewer is never blocked (its writes are
|
|
36
|
+
* refused by the store and the API client instead); a tab waiting for or denied the lease is.
|
|
37
|
+
*/
|
|
38
|
+
export declare function blocksEditingSurface(editability: EditorEditability): boolean;
|