UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

1,043 lines • 35.4 kB
import { $p as DocumentChangeContextInstance, $r as FieldPresenceData, AC as TrackerContextGetSnapshot, Bf as TasksUpsellContextValue, C_ as UpsellDialogViewedInfo, DC as ChangeIndicatorTrackerContextValue, Dw as PerspectiveContextValue, E_ as NavbarContextValue, Fn as PortableTextMemberItem, Hb as CommentsAuthoringPathContextValue, Hf as TasksNavigationContextValue, It as DocumentFieldAction$1, Iu as DivergenceNavigator, JT as StudioErrorHandler, Jl as PreviewCardContextValue, Ly as StudioColorScheme, M_ as StudioAnnouncementsContextValue, Pc as ReferenceInputOptions, QC as MetadataWrapper, Qg as CommentsContextValue, Ru as ParseError, Sb as CommentIntentGetter, Uc as FormCallbacksValue, Uf as MentionUserContextValue, Vf as TasksContextValue, Vt as DocumentFieldActionNode$1, Vy as AddonDatasetContextValue, W_ as ConfigErrorClassification, Xg as CommentsEnabledContextValue, Xv as SearchContextValue, _t as Workspace, bp as SchedulesContextValue, c_ as CommentsUpsellContextValue, cr as FormBuilderContextValue, ei as FormNodePresence, fb as CommentsSelectedPathContextValue, fi as ResourceCache, ft as Source$1, hp as DocumentActionProps, hx as Locale, ig as UserColorManager, jC as TrackerContextStore, jh as EventsStore, l_ as UpsellData, lp as DocumentActionDescription, ml as ZIndexContextValue, ns as PortableTextMarker, pv as CopyPasteContextType, qy as WorkspacesContextValue, r_ as CommentInputContextValue, rr as VirtualizerScrollInstance, t as ActiveWorkspaceMatcherContextValue, tb as VisibleWorkspacesContextValue, ub as RouterHistory, us as FieldCommentsProps, vg as TagValue, wg as ConsentStatus, wu as ReleasesUpsellContextValue, yr as FormValueContextValue, zC as ConnectorContextValue, zy as StudioThemeColorSchemeKey } from "./_chunks-dts/ActiveWorkspaceMatcherContext.js"; import { t as EnhancedObjectDialogContextValue } from "./_chunks-dts/useEnhancedObjectDialog.js"; import { F as PaneLayoutContextValue, P as PaneContextValue, c as DocumentPaneInfoContextValue, i as PaneRouterContextValue, k as StructureToolContextValue, s as DocumentPaneContextValue, w as RouterPanes, y as PaneNode } from "./_chunks-dts/types.js"; import { g as PresentationParamsContextValue, h as PresentationNavigateContextValue, m as PresentationContextValue, v as PresentationPluginOptions } from "./_chunks-dts/types2.js"; import { _ as RouterContextValue } from "./_chunks-dts/types3.js"; import { CSSProperties, ComponentType, MutableRefObject, PropsWithChildren, ReactNode, RefObject } from "react"; import { ArraySchemaType, ObjectSchemaType, Path, PortableTextBlock, ValidationMarker } from "@sanity/types"; import { SanityClient } from "@sanity/client"; import { i18n } from "i18next"; import { BehaviorSubject, Observable } from "rxjs"; import { PubSub } from "nano-pubsub"; import { PortableTextMemberSchemaTypes } from "@portabletext/sanity-bridge"; import { SanityDocument as SanityDocument$2 } from "sanity"; import { SemVer } from "semver"; import { Serializable } from "@sanity/presentation-comlink"; interface CommentsOnboardingContextValue { isDismissed: boolean; setDismissed: () => void; } /** * @internal */ type TasksEnabledContextValue = { enabled: false; mode: null; } | { enabled: true; mode: 'default' | 'upsell'; }; /** @internal */ declare const ActiveWorkspaceMatcherContext: import("react").Context<ActiveWorkspaceMatcherContextValue | null>; /** * @beta * @hidden */ declare const AddonDatasetContext: import("react").Context<AddonDatasetContextValue | null>; interface StudioAppResponse { id: string; title?: string; type: 'studio' | string; urlType: 'internal' | 'external' | string; appHost: string; } interface StudioApp extends StudioAppResponse { studioUrl: string; } interface CompatibleStudioAppId { /** * AppId to use for the current origin */ appId: string | undefined; /** * All available studio apps */ studioApps: StudioApp[]; } interface AppIdCache { get: (args: { projectId: string; appIdFetcher: AppIdFetcher; }) => Promise<CompatibleStudioAppId | undefined>; } type AppIdFetcher = (projectId: string) => Promise<CompatibleStudioAppId>; /** * @internal */ declare const AppIdCacheContext: import("react").Context<AppIdCache | null>; /** @internal */ interface ArrayValidationState { maxReached: boolean; maxReachedReason: string | undefined; } /** @internal */ declare const ArrayValidationContext: import("react").Context<ArrayValidationState | null>; /** * @internal */ interface AssetLimitUpsellContextValue { upsellDialogOpen: boolean; handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void; upsellData: UpsellData | null; telemetryLogs: { dialogSecondaryClicked: () => void; dialogPrimaryClicked: () => void; }; } /** * @internal */ declare const AssetLimitUpsellContext: import("react").Context<AssetLimitUpsellContextValue | null>; interface CalendarContextValue { date?: Date; endDate?: Date; focusedDate: Date; selectRange?: boolean; selectTime?: boolean; /** * An integer indicating the first day of the week. * Can be either 1 (Monday), 6 (Saturday) or 7 (Sunday). */ firstWeekDay: 1 | 6 | 7; } /** * @internal */ declare const CalendarContext: import("react").Context<CalendarContextValue | undefined>; /** * @internal * @hidden */ type ChangeIndicatorTrackerContextStoreType = TrackerContextStore<ChangeIndicatorTrackerContextValue> | null; /** * @internal * @hidden */ type ChangeIndicatorTrackerGetSnapshotType = TrackerContextGetSnapshot<ChangeIndicatorTrackerContextValue> | null; /** @internal */ declare const ChangeIndicatorTrackerContextStore: import("react").Context<ChangeIndicatorTrackerContextStoreType>; /** @internal */ declare const ChangeIndicatorTrackerContextGetSnapshot: import("react").Context<ChangeIndicatorTrackerGetSnapshotType>; /** * The setter for ColorSchemeValueContext, in a separate context to avoid unnecessary re-renders * If set to false then the UI should adjust to reflect that the Studio can't change the color scheme * @internal */ declare const ColorSchemeSetValueContext: import("react").Context<false | ((nextScheme: StudioThemeColorSchemeKey) => void) | null>; /** * Used to keep track of the internal value, which can be "system" in addition to "light" and "dark" * @internal */ declare const ColorSchemeValueContext: import("react").Context<StudioColorScheme | null>; /** * @internal */ declare const CommentInputContext: import("react").Context<CommentInputContextValue | null>; /** * @beta * @hidden */ declare const CommentsAuthoringPathContext: import("react").Context<CommentsAuthoringPathContextValue | null>; /** * @internal */ declare const CommentsContext: import("react").Context<CommentsContextValue | null>; /** * @internal */ declare const CommentsEnabledContext: import("react").Context<CommentsEnabledContextValue>; /** * @internal */ declare const CommentsIntentContext: import("react").Context<CommentIntentGetter | undefined>; /** * @internal */ declare const CommentsOnboardingContext: import("react").Context<CommentsOnboardingContextValue | null>; /** * @internal */ declare const CommentsSelectedPathContext: import("react").Context<CommentsSelectedPathContextValue | null>; /** * @internal */ declare const CommentsUpsellContext: import("react").Context<CommentsUpsellContextValue | null>; /** * A workspace configuration error (missing project / dataset) detected * during boot by `WorkspacesProvider`'s request handler. Surfaced through * context so it can be rendered lower in the tree — below * `ActiveWorkspaceMatcher` — where the workspace-switcher hooks are * available. * * @internal */ interface ConfigErrorValue { error: ConfigErrorClassification; isStaging: boolean; projectId?: string; dataset?: string; } /** @internal */ declare const ConfigErrorContext: import("react").Context<ConfigErrorValue | null>; /** * @beta * @hidden */ declare const CopyPasteContext: import("react").Context<CopyPasteContextType | null>; /** * Entry in the dialog stack. * * @beta */ interface DialogStackEntry { id: string; path?: Path; } /** * Context value for tracking the dialog stack. * * @beta */ interface DialogStackContextValue { /** Stack of dialog entries, last one is the top */ stack: DialogStackEntry[]; /** Push a dialog onto the stack */ push: (id: string, path?: Path) => void; /** Remove a dialog from the stack */ remove: (id: string) => void; /** Update the path of an existing dialog entry */ update: (id: string, path?: Path) => void; /** Close dialogs. Pass `{ toParent: true }` to close only the top dialog and navigate to the parent. */ close: (options?: { /** * When true, closes only the top dialog and navigates to its parent path. * When false or omitted, closes all dialogs and resets to the root path. */ toParent?: boolean; }) => void; /** Navigate to a specific path, updating the form path and cleaning up stack entries that are at or deeper than the target. */ navigateTo: (path: Path) => void; } /** * Context for tracking the stack of open dialogs. * * @beta */ declare const DialogStackContext: import("react").Context<DialogStackContextValue | null>; /** @internal */ declare const DiffContext: import("react").Context<{ path: Path; }>; /** * @internal */ declare const DocumentActionPropsContext: import("react").Context<DocumentActionProps | undefined>; /** * @internal */ declare const DocumentActionsStateContext: import("react").Context<DocumentActionDescription[] | null>; /** @internal */ declare const DocumentChangeContext: import("react").Context<DocumentChangeContextInstance | null>; /** * @internal */ type DocumentDivergencesContextValue = (DivergenceNavigator & { enabled: true; sessionId: string; }) | { enabled: false; sessionId: null; }; /** * @internal */ declare const DocumentDivergencesContext: import("react").Context<DocumentDivergencesContextValue>; /** * @internal */ interface DocumentFieldActionsContextValue { actions: DocumentFieldAction$1[]; } /** * @internal */ declare const DocumentFieldActionsContext: import("react").Context<DocumentFieldActionsContextValue | null>; /** * @internal */ interface DocumentIdContextValue { id: string; } /** * @internal */ declare const DocumentIdContext: import("react").Context<DocumentIdContextValue | null>; /** * @internal */ interface DocumentLimitUpsellContextValue { upsellDialogOpen: boolean; handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void; handleClose: () => void; upsellData: UpsellData | null; telemetryLogs: { dialogSecondaryClicked: () => void; dialogPrimaryClicked: () => void; panelPrimaryClicked: () => void; panelSecondaryClicked: () => void; }; } /** * @internal */ declare const DocumentLimitUpsellContext: import("react").Context<DocumentLimitUpsellContextValue | null>; /** @internal */ declare const DocumentPaneContext: import("react").Context<DocumentPaneContextValue | null>; /** @internal */ declare const DocumentPaneInfoContext: import("react").Context<DocumentPaneInfoContextValue | null>; /** * @internal * @deprecated This context is no longer used and will be removed in a future release as we make the enhanced object dialog the default. */ declare const EnhancedObjectDialogContext: import("react").Context<EnhancedObjectDialogContextValue>; /** * @internal */ declare const EventsContext: import("react").Context<EventsStore | null>; /** @internal */ interface FeedbackContextValue { telemetryConsent: ConsentStatus; userName: string | undefined; userEmail: string | undefined; tags: Record<string, TagValue>; } /** @internal */ declare const FeedbackContext: import("react").Context<FeedbackContextValue>; /** @internal */ interface FieldActionsContextValue { actions: DocumentFieldActionNode$1[]; __internal_comments?: FieldCommentsProps; __internal_slot?: ReactNode; focused?: boolean; hovered: boolean; onMouseEnter: () => void; onMouseLeave: () => void; } /** @internal */ declare const FieldActionsContext: import("react").Context<FieldActionsContextValue>; /** * @internal */ declare const FormBuilderContext: import("react").Context<FormBuilderContextValue | null>; /** * @internal */ declare const FormCallbacksContext: import("react").Context<FormCallbacksValue | null>; /** @internal */ declare const FormFieldPresenceContext: import("react").Context<FormNodePresence[]>; /** * @internal */ declare const FormValueContext: import("react").Context<FormValueContextValue | null>; interface FreeTrialResponse { id: string; icon: string; style: string; showOnLoad: FreeTrialDialog | null; showOnClick: FreeTrialDialog | null; daysLeft: number; totalDays: number; } interface FreeTrialDialog { _id: string; _type: 'dialog'; _createdAt: string; ctaButton?: { text: string; action: 'openNext' | 'closeDialog' | 'openUrl'; url?: string; }; secondaryButton?: { text: string; }; descriptionText: PortableTextBlock[]; dialogType: 'modal' | 'popover'; headingText: string; id: string; image: Image$1 | null; tags?: Tag[]; _rev: string; _updatedAt: string; } interface Tag { _type: 'tag'; _key: string; tag: string; } interface Image$1 { asset: { url: string; altText: string | null; }; } /** * @internal */ interface FreeTrialContextProps { data: FreeTrialResponse | null; showDialog: boolean; showOnLoad: boolean; /** * If the user is seeing the `showOnLoad` popover or modal, and clicks on the pricing button the `showOnClick` modal should be triggered. */ toggleShowContent: (closeAndReOpen?: boolean) => void; } /** * @internal */ declare const FreeTrialContext: import("react").Context<FreeTrialContextProps | undefined>; /** * Context for tracking fullscreen state of portable text editors by their path * @internal */ interface FullscreenPTEContextValue { /** * Get the fullscreen state for a specific path */ getFullscreenPath: (path: Path) => string | undefined; /** * Set the fullscreen state for a specific path */ setFullscreenPath: (path: Path, isFullscreen: boolean) => void; /** * Check if any portable text editor is currently in fullscreen mode */ hasAnyFullscreen: () => boolean; /** * Get all fullscreen paths */ allFullscreenPaths: string[]; } /** * @internal */ declare const FullscreenPTEContext: import("react").Context<FullscreenPTEContextValue>; /** * @internal * @hidden */ type GetFormValueContextValue = (path: Path) => unknown; /** * @internal */ declare const GetFormValueContext: import("react").Context<GetFormValueContextValue | null>; /** @internal */ interface HoveredFieldContextValue { store: { subscribe: (onStoreCallback: () => void) => () => void; getSnapshot: () => string[]; }; onMouseEnter: (path: Path) => void; onMouseLeave: (path: Path) => void; } /** @internal */ declare const HoveredFieldContext: import("react").Context<HoveredFieldContextValue>; /** * TODO: remove this context when alternate document-specific context are * introduced. * * The following context is used in the structure tool to set the active * document if it's the last pane open in the structure tool. This is a * temporary context provider that was introduced when the comments and tasks * plugins were refactor and decoupled from the structure tool. ideally this * should be removed and replaced with a document-specific context that gives * plugin authors access to what the `usePane`, `usePaneRouter`, and * `useDocumentPane` provides without exposing specifics from the structure tool */ /** * @internal */ declare const IsLastPaneContext: import("react").Context<boolean>; /** * User application from the API * @internal */ interface UserApplication { id: string; type: string; projectId?: string; organizationId?: string; title?: string; urlType: 'internal' | 'external'; appHost: string; } /** * Cache for user applications fetched from the API. * Caches by projectId to avoid duplicate fetches. * @internal */ interface UserApplicationCache { /** * Get user applications for a project. * Returns cached results if available, otherwise fetches from API. */ get: (client: SanityClient) => Promise<UserApplication[]>; } /** * @hidden * @internal */ type LiveUserApplicationContextValue = { userApplication: UserApplication | undefined; isLoading: boolean; }; /** * * @hidden * @internal */ declare const LiveUserApplicationContext: import("react").Context<LiveUserApplicationContextValue>; /** * @internal * @hidden */ interface LocaleContextValue { locales: Locale[]; currentLocale: Locale; __internal: { i18next: i18n; }; changeLocale: (newLocale: string) => Promise<void>; } /** * @internal * @hidden */ declare const LocaleContext: import("react").Context<LocaleContextValue | undefined>; /** * Why the studio last logged the user out, surfaced on the auth screen as a * banner above the login form. `undefined` when the logged-out state isn't the * result of a forced logout (e.g. a normal cold load with no session). * * Currently a single-member union: forced logout only happens on API-tagged * session expiry (`SIO-401-AEX`). Kept as a union so future reasons slot in. * * @internal */ type LoggedOutReason = 'session-expired'; /** @internal */ declare const LoggedOutReasonContext: import("react").Context<"session-expired" | undefined>; /** @internal */ type MediaLibraryIds = { libraryId: string; organizationId: string; }; /** @internal */ declare const MediaLibraryIdsContext: import("react").Context<MediaLibraryIds | null>; /** * @internal */ declare const MentionUserContext: import("react").Context<MentionUserContextValue | null>; /** @internal */ declare const NavbarContext: import("react").Context<NavbarContextValue>; /** * @hidden * @internal */ type PackageVersionInfoContextValue = { /** * Request a new update check */ checkForUpdates: () => void; /** * Status of version check (i.e. are we currently checking for updates) */ versionCheckStatus: { lastCheckedAt: Date | null; checking: boolean; }; /** * Whether this Studio is configured to be auto-updating */ isAutoUpdating: boolean; /** * If an importmap for the sanity module exists in the DOM, includes details * will be undefined if no importmap is found */ importMapInfo?: { valid: false; error: Error; } | { valid: true; minVersion: SemVer; appId?: string; }; /** * What is the version tagged as latest (periodically checked) */ latestTaggedVersion?: SemVer; /** * What version is the Studio currently running */ currentVersion: SemVer; /** * What is the current auto-updating version (as periodically resolved via module server and configured via manage) */ autoUpdatingVersion?: SemVer; }; /** * * @hidden * @internal */ declare const PackageVersionInfoContext: import("react").Context<PackageVersionInfoContextValue>; /** * @internal */ declare const PaneContext: import("react").Context<PaneContextValue | null>; /** * @internal */ declare const PaneLayoutContext: import("react").Context<PaneLayoutContextValue | null>; /** * * @hidden * @beta */ declare const PaneRouterContext: import("react").Context<PaneRouterContextValue>; /** * Setter passed to inputs via `useReportParseError`. Inputs register a * transient parse error keyed by `@sanity/util/paths` `toString(path)`, or * clear it by passing `null`. * * @internal */ type SetParseError = (pathKey: string, value: ParseError | null) => void; interface ParseErrorsContextValue { errors: Record<string, ParseError>; set: SetParseError; } /** * @internal */ declare const ParseErrorsContext: import("react").Context<ParseErrorsContextValue>; /** * * @hidden * @beta */ declare const PerspectiveContext: import("react").Context<PerspectiveContextValue | null>; /** * @internal */ declare const PortableTextMarkersContext: import("react").Context<PortableTextMarker[]>; /** @internal */ type PortableTextEditorElement = HTMLDivElement | HTMLSpanElement; /** * @internal */ declare const PortableTextMemberItemElementRefsContext: import("react").Context<BehaviorSubject<Record<string, PortableTextEditorElement | null | undefined>>>; /** * @internal */ declare const PortableTextMemberItemsContext: import("react").Context<PortableTextMemberItem[]>; /** * Context for Sanity-specific schema types for Portable Text. * This provides access to the full Sanity schema types instead of relying on * `editor.schemaTypes` from PTE, which will contain minimal PT schema types * when PTE removes its Sanity dependencies. * * @internal */ declare const PortableTextMemberSchemaTypesContext: import("react").Context<PortableTextMemberSchemaTypes | null>; /** * @internal */ declare const PresenceContext: import("react").Context<FormNodePresence[]>; /** * @internal * @hidden */ type PresenceTrackerContextStoreType = TrackerContextStore<FieldPresenceData> | null; /** * @internal * @hidden */ type PresenceTrackerGetSnapshotType = TrackerContextGetSnapshot<FieldPresenceData> | null; /** @internal */ declare const PresenceTrackerContextStore: import("react").Context<PresenceTrackerContextStoreType>; /** @internal */ declare const PresenceTrackerContextGetSnapshot: import("react").Context<PresenceTrackerGetSnapshotType>; /** * @internal */ declare const PresentationContext: import("react").Context<PresentationContextValue | null>; /** @internal */ type PresentationDisplayedDocumentContextValue = (displayed: Partial<SanityDocument$2> | null | undefined) => void; /** * @internal */ declare const PresentationDisplayedDocumentContext: import("react").Context<PresentationDisplayedDocumentContextValue | null>; interface PresentationDocumentContextValue { options: PresentationPluginOptions[]; register: (options: PresentationPluginOptions) => () => void; } /** * @internal */ declare const PresentationDocumentContext: import("react").Context<PresentationDocumentContextValue | null>; /** * @internal */ declare const PresentationNavigateContext: import("react").Context<PresentationNavigateContextValue | null>; interface PanelElement { id: string; type: 'panel'; defaultSize: number | null; order: number; maxWidth: number | null; minWidth: number; } interface ResizerElement { id: string; order: number; type: 'resizer'; el: RefObject<HTMLDivElement | null>; } interface PresentationPanelsContextValue { activeResizer: string | null; drag: (id: string, event: MouseEvent) => void; getPanelStyle: (id: string) => React.CSSProperties; registerElement: (id: string, panel: PanelElement | ResizerElement) => void; startDragging: (id: string, event: MouseEvent) => void; stopDragging: () => void; unregisterElement: (id: string) => void; } /** * @internal */ declare const PresentationPanelsContext: import("react").Context<PresentationPanelsContextValue | null>; /** * @internal */ declare const PresentationParamsContext: import("react").Context<PresentationParamsContextValue | null>; interface PresentationSharedStateContextValue { removeValue: (key: string) => void; setValue: (key: string, value: Serializable) => void; } /** * @internal */ declare const PresentationSharedStateContext: import("react").Context<PresentationSharedStateContextValue | null>; /** * @internal */ declare const PreviewCardContext: import("react").Context<PreviewCardContextValue>; /** * @internal */ declare const ReferenceInputOptionsContext: import("react").Context<ReferenceInputOptions>; /** * @internal */ interface ReferenceItemRef { menuRef: MutableRefObject<HTMLDivElement | null>; menuButtonRef: MutableRefObject<HTMLButtonElement | null>; containerRef: MutableRefObject<HTMLDivElement | null>; } /** * This is a way to store ref of the menu as well as the container of the ReferenceItem * so it can be used down the tree for clickOutside handling * @internal */ declare const ReferenceItemRefContext: import("react").Context<ReferenceItemRef | null>; /** * @internal */ interface ReleasesMetadataContextValue { state: MetadataWrapper; addReleaseIdsToListener: (slugs: string[]) => void; removeReleaseIdsFromListener: (slugs: string[]) => void; } /** * @internal * @hidden */ declare const ReleasesMetadataContext: import("react").Context<ReleasesMetadataContextValue | null>; type SortDirection = 'asc' | 'desc'; interface TableSort { column: string; direction: SortDirection; } /** * @internal */ interface TableContextValue { searchTerm: string | null; setSearchTerm: (searchTerm: string) => void; sort: TableSort | null; setSortColumn: (column: string) => void; } /** * @internal */ declare const TableContext: import("react").Context<TableContextValue | null>; /** * @beta * @hidden */ declare const ReleasesUpsellContext: import("react").Context<ReleasesUpsellContextValue | null>; declare const LOADING_PANE: unique symbol; interface PaneData { active: boolean; childItemId: string | null; groupIndex: number; index: number; itemId: string; key: string; pane: PaneNode | typeof LOADING_PANE; params: Record<string, string | undefined> & { perspective?: string; }; path: string; payload: unknown; selected: boolean; siblingIndex: number; maximized: boolean; } interface Panes { paneDataItems: PaneData[]; routerPanes: RouterPanes; resolvedPanes: (PaneNode | typeof LOADING_PANE)[]; maximizedPane: PaneData | null; setMaximizedPane: (pane: PaneData | null) => void; } /** * @internal */ declare const ResolvedPanesContext: import("react").Context<Panes | null>; /** * @internal */ declare function ResolvedPanesProvider({ children, value }: { children: ReactNode; value: Panes; }): import("react").JSX.Element; /** * @internal */ declare const ResourceCacheContext: import("react").Context<ResourceCache | null>; /** @internal */ declare const ReviewChangesContext: import("react").Context<ConnectorContextValue>; /** * @internal */ declare const RouterContext: import("react").Context<RouterContextValue | null>; /** * Internal use only. Userland should leverage the public `useRouter` APIs. * @internal */ declare const RouterHistoryContext: import("react").Context<RouterHistory | null>; interface HasUsedScheduledPublishing { used: boolean; loading: boolean; } /** * @internal */ type ScheduledPublishingEnabledContextValue = { enabled: false; mode: null; hasUsedScheduledPublishing: HasUsedScheduledPublishing; } | { enabled: true; mode: 'default' | 'upsell'; hasUsedScheduledPublishing: HasUsedScheduledPublishing; }; /** * @internal */ declare const ScheduledPublishingEnabledContext: import("react").Context<ScheduledPublishingEnabledContextValue>; /** * @internal */ interface SchedulePublishUpsellContextValue { upsellDialogOpen: boolean; handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void; handleClose: () => void; upsellData: UpsellData | null; telemetryLogs: { dialogSecondaryClicked: () => void; dialogPrimaryClicked: () => void; panelViewed: (source: UpsellDialogViewedInfo['source']) => void; panelDismissed: () => void; panelPrimaryClicked: () => void; panelSecondaryClicked: () => void; }; } /** * @internal */ declare const SchedulePublishUpsellContext: import("react").Context<SchedulePublishUpsellContextValue>; /** * @deprecated we will be dropping support for scheduled publishing on a future major version * @internal */ declare const SchedulesContext: import("react").Context<SchedulesContextValue | undefined>; /** * @internal */ declare const ScrollContext: import("react").Context<PubSub<Event> | null>; /** * @internal */ declare const SearchContext: import("react").Context<SearchContextValue | undefined>; /** * Entry representing a selected annotation for the combined popover * @internal */ interface AnnotationEntry { key: string; title: string; schemaType: ObjectSchemaType; onOpen: () => void; onRemove: () => void; referenceElement: HTMLElement | null; } /** * Context value for tracking selected annotations * @internal */ interface SelectedAnnotationsContextValue { register: (entry: AnnotationEntry) => void; unregister: (key: string) => void; annotations: AnnotationEntry[]; } /** * Context for managing selected annotations in the Portable Text editor. * Used by CombinedAnnotationPopover to show all active annotations in a single popover. * @internal */ declare const SelectedAnnotationsContext: import("react").Context<SelectedAnnotationsContextValue | null>; /** * @internal */ interface SingleDocReleaseContextValue { /** * Sets the scheduled draft perspective into the local router params. */ onSetScheduledDraftPerspective: (releaseId: string) => void; } /** * @internal */ declare const SingleDocReleaseContext: import("react").Context<SingleDocReleaseContextValue | null>; /** * @internal */ type SingleDocReleaseEnabledContextValue = { enabled: false; mode: null; } | { enabled: true; mode: 'default' | 'upsell'; }; /** * @internal */ declare const SingleDocReleaseEnabledContext: import("react").Context<SingleDocReleaseEnabledContextValue>; /** * @internal */ interface SingleDocReleaseUpsellContextValue { upsellDialogOpen: boolean; handleOpenDialog: (source: UpsellDialogViewedInfo['source']) => void; handleClose: () => void; upsellData: UpsellData | null; telemetryLogs: { dialogSecondaryClicked: () => void; dialogPrimaryClicked: () => void; panelViewed: (source: UpsellDialogViewedInfo['source']) => void; panelDismissed: () => void; panelPrimaryClicked: () => void; panelSecondaryClicked: () => void; }; } /** * @internal */ declare const SingleDocReleaseUpsellContext: import("react").Context<SingleDocReleaseUpsellContextValue>; /** * @internal */ declare const SortableItemIdContext: import("react").Context<string | null>; /** * @internal */ declare const SourceContext: import("react").Context<Source$1 | null>; /** * @internal */ declare const StructureToolContext: import("react").Context<StructureToolContextValue | null>; /** * @internal */ declare const StudioAnnouncementContext: import("react").Context<StudioAnnouncementsContextValue | undefined>; /** @internal */ declare const StudioErrorHandlerContext: import("react").Context<StudioErrorHandler | null>; /** * @internal */ declare const TasksContext: import("react").Context<TasksContextValue | null>; /** * @internal */ declare const TasksEnabledContext: import("react").Context<TasksEnabledContextValue>; /** * @internal */ declare const TasksNavigationContext: import("react").Context<TasksNavigationContextValue | null>; /** * @beta * @hidden */ declare const TasksUpsellContext: import("react").Context<TasksUpsellContextValue | null>; /** * @internal */ declare const UserApplicationCacheContext: import("react").Context<UserApplicationCache | null>; /** * @internal */ declare const UserColorManagerContext: import("react").Context<UserColorManager | null>; /** * @internal */ declare const ValidationContext: import("react").Context<ValidationMarker[]>; /** * This is used to store the reference to the scroll element for virtualizer * @internal */ declare const VirtualizerScrollInstanceContext: import("react").Context<VirtualizerScrollInstance | null>; /** @internal */ declare const VisibleWorkspacesContext: import("react").Context<VisibleWorkspacesContextValue | null>; /** * @internal */ declare const WorkspaceContext: import("react").Context<Workspace | null>; /** @internal */ declare const WorkspacesContext: import("react").Context<WorkspacesContextValue | null>; /** * @internal */ declare const zIndexContextDefaults: ZIndexContextValue; /** * TODO: Rename to `ZOffsetsContext` * * @internal */ declare const ZIndexContext: import("react").Context<ZIndexContextValue>; export { ActiveWorkspaceMatcherContext, AddonDatasetContext, AnnotationEntry, AppIdCacheContext, ArrayValidationContext, AssetLimitUpsellContext, AssetLimitUpsellContextValue, CalendarContext, ChangeIndicatorTrackerContextGetSnapshot, ChangeIndicatorTrackerContextStore, ColorSchemeSetValueContext, ColorSchemeValueContext, CommentInputContext, CommentsAuthoringPathContext, CommentsContext, CommentsEnabledContext, CommentsIntentContext, CommentsOnboardingContext, CommentsSelectedPathContext, CommentsUpsellContext, ConfigErrorContext, ConfigErrorValue, CopyPasteContext, DialogStackContext, DialogStackContextValue, DialogStackEntry, DiffContext, DocumentActionPropsContext, DocumentActionsStateContext, DocumentChangeContext, DocumentDivergencesContext, DocumentDivergencesContextValue, DocumentFieldActionsContext, DocumentFieldActionsContextValue, DocumentIdContext, DocumentIdContextValue, DocumentLimitUpsellContext, DocumentLimitUpsellContextValue, DocumentPaneContext, DocumentPaneInfoContext, EnhancedObjectDialogContext, EventsContext, FeedbackContext, FeedbackContextValue, FieldActionsContext, FieldActionsContextValue, FormBuilderContext, FormCallbacksContext, FormFieldPresenceContext, FormValueContext, FreeTrialContext, FullscreenPTEContext, GetFormValueContext, GetFormValueContextValue, HoveredFieldContext, HoveredFieldContextValue, IsLastPaneContext, LiveUserApplicationContext, LiveUserApplicationContextValue, LocaleContext, LocaleContextValue, LoggedOutReason, LoggedOutReasonContext, MediaLibraryIdsContext, MentionUserContext, NavbarContext, PackageVersionInfoContext, PackageVersionInfoContextValue, PaneContext, PaneLayoutContext, PaneRouterContext, ParseErrorsContext, PerspectiveContext, PortableTextEditorElement, PortableTextMarkersContext, PortableTextMemberItemElementRefsContext, PortableTextMemberItemsContext, PortableTextMemberSchemaTypesContext, PresenceContext, PresenceTrackerContextGetSnapshot, PresenceTrackerContextStore, PresentationContext, PresentationDisplayedDocumentContext, PresentationDocumentContext, PresentationNavigateContext, PresentationPanelsContext, PresentationParamsContext, PresentationSharedStateContext, PreviewCardContext, ReferenceInputOptionsContext, ReferenceItemRef, ReferenceItemRefContext, ReleasesMetadataContext, ReleasesUpsellContext, ResolvedPanesContext, ResolvedPanesProvider, ResourceCacheContext, ReviewChangesContext, RouterContext, RouterHistoryContext, SchedulePublishUpsellContext, SchedulePublishUpsellContextValue, ScheduledPublishingEnabledContext, ScheduledPublishingEnabledContextValue, SchedulesContext, ScrollContext, SearchContext, SelectedAnnotationsContext, SelectedAnnotationsContextValue, SetParseError, SingleDocReleaseContext, SingleDocReleaseContextValue, SingleDocReleaseEnabledContext, SingleDocReleaseEnabledContextValue, SingleDocReleaseUpsellContext, SingleDocReleaseUpsellContextValue, SortableItemIdContext, SourceContext, StructureToolContext, StudioAnnouncementContext, StudioErrorHandlerContext, TableContext, TasksContext, TasksEnabledContext, TasksNavigationContext, TasksUpsellContext, UserApplicationCacheContext, UserColorManagerContext, ValidationContext, VirtualizerScrollInstanceContext, VisibleWorkspacesContext, WorkspaceContext, WorkspacesContext, ZIndexContext, zIndexContextDefaults };