import { $o as PatchEvent, Aa as PrimitiveItemProps, Ac as StudioLocaleResourceKeys, Ai as RenderArrayOfObjectsItemCallback, Al as DocumentPairTarget, At as PreparedConfig, Bc as LocaleSource, Bn as PreviewPath, Bt as SourceClientOptions, C as StateTree, Cc as StringDiff$1, Ci as OnPathFocusPayload, Ct as MissingConfigFile, Da as ItemProps, Eo as FormFieldGroup, Fi as RenderItemCallback, Ft as SchemaPluginOptions, Ga as PerspectiveContextValue, Gc as TFunction$2, Gr as LoginMethod, Gs as Pair, Ha as UploaderResolver, Hl as StoreRequestErrorHandler, Hn as PreviewableType, Ho as DocumentFieldAction, Hr as AuthConfig, Ii as RenderPreviewCallback, Io as DocumentPresence, It as SingleWorkspace, Ja as ReleasesNavMenuItemPropsGetter, Ka as PerspectiveStack, Kr as ArrayInputFunctionsProps, Ks as RemoteSnapshotVersionEvent, Lc as LocaleResourceBundle, Li as RenderPreviewCallbackProps, Lo as GlobalPresence, Mi as RenderBlockCallback, Mn as DraftsModelDocumentAvailability, Ms as SelectionState, Ni as RenderFieldCallback, Ns as TimelineController, Oa as ObjectItem, Oc as FieldValueError, Oi as StringInputProps, Oo as FormNodePresence, Os as HistoryStore, Ot as Plugin, P as DocumentActionComponent, Pc as LocaleDefinition, Pi as RenderInputCallback, Qa as VariantId, Qc as DocumentVersionEventType, Qi as NodeChronologyProps, Qn as DocumentBadgeComponent, Qo as DocumentFieldActionsResolverContext, Qt as Workspace, Ro as PresenceLocation, Rr as AuthState, Sn as DocumentPreviewStore, U as DocumentActionProps, Us as DocumentVersionEvent, Ut as Tool, Vs as CommitError, Wa as PerspectiveBundle, Wn as ObserveDocumentAPIConfig, Wr as CookielessCompatibleLoginMethod, Wt as UnresolvedSingletonDefinition, Xa as TargetPerspective, Za as SystemVariant, Zc as DocumentGroupEvent, _a as ArrayItemError, _c as GroupChangeNode, _s as PreviewLayoutKey, ac as ChangeNode, ai as FieldCommentsProps, an as LogoProps, ao as SystemBundle, ar as StudioTheme, as as FormPatch, b as FormState, bi as NumberInputProps, bl as EditStateFor, ca as ArrayOfPrimitivesItemMember, cs as FormPatchOrigin, ct as DocumentActionsVersionType, da as FieldMember, dc as DiffComponentOptions, di as ArrayOfObjectsInputProps, dn as ToolMenuProps, ec as Annotation, el as EventsStore, f as PatchChannel, fa as FieldSetMember, gc as FromToIndex, hi as BooleanInputProps, it as ConfigPropertyReducer, ji as RenderArrayOfPrimitivesItemCallback, jl as IdPair, ka as ObjectItemProps, ki as RenderAnnotationCallback, kn as DocumentAvailability, kt as PluginOptions, lc as Diff$1, lr as Template, ma as ObjectMember, mc as FieldChangeNode, ms as GeneralPreviewLayoutKey, nn as WorkspaceSummary, nt as Config, oa as ArrayOfObjectsItemMember, oc as ChangeTitlePath, or as StudioThemeColorSchemeKey, pi as ArrayOfPrimitivesInputProps, qa as ReleaseId, qo as DocumentFieldActionNode, rt as ConfigContext$1, sa as ArrayOfObjectsMember, sc as Chunk, sn as NavbarProps, tc as AnnotationDetails, tr as GetHookCollectionStateProps, uc as DiffComponent, vc as ItemDiff$1, vl as DocumentVariantType, vn as ValidationStatus, vs as PreviewMediaDimensions, wc as StringDiffSegment, wl as DocumentStoreExtraOptions, ws as OperationsAPI, xc as ObjectDiff$1, xi as ObjectInputProps, y as FormDocumentValue, ya as FieldError, yi as InputProps, ys as PreviewProps, zr as AuthStore, zt as Source } from "./types-1fG14RfY.js";
import { A as Groq2024SearchResults, At as DynamicFeedbackTags, Cn as CommentUpdatePayload, Ct as DocumentChangeContextInstance, D as WorkspaceAuthStates, Dn as CommentsUIMode, Dt as UserColorManager, E as WorkspacesContextValue, En as CommentsType, Et as UserColorHue, Fn as Grant, Ft as ConsentStatus, G as CommentsType$1, Ht as ZIndexContextValue, I as WeightedSearchResults, In as GrantsStore, J as CommentsContextValue, K as CommentsUIMode$1, Ln as PermissionCheckResult, Nn as DocumentValuePermission, O as ActiveWorkspaceMatcherContextValue, P as SearchStrategyFactory, Pt as TagValue, Qt as CommandListHandle, R as ScheduleFormData, Rn as ConnectorContextValue, Rt as RequestErrorChannel, T as AddonDatasetContextValue, Tn as CommentsTextSelectionItem, Tt as UserColor, Vt as StudioErrorHandler, bn as CommentTextSelection, ct as PartialExcept, d as StudioAnnouncementDocument, dn as CommentMessage, en as CommandListProps, gn as CommentReactionOption, ht as ParseError, in as CommentBaseCreatePayload, k as RouterHistory, kn as UserListWithPermissionsHookValue, kt as BaseFeedbackTags, ln as CommentIntentGetter, lt as LoadingTuple, nn as CommentsSelectedPath, q as CommentsMode$1, rn as CommentsSelectedPathContextValue, sn as CommentDocument, t as VisibleWorkspacesContextValue, u as DialogMode, ut as ReactHook, vn as CommentStatus, w as SearchContextValue, xn as CommentThreadItem, z as FormBuilderContextValue, zt as RequestErrorClaim } from "./VisibleWorkspacesProvider-B6w6Mtxv.js";
import { Dt as RelativeTimeOptions, c as ProjectData, f as ProjectStore, l as ProjectDatasetData, u as ProjectGrants } from "./empty-DsnyO2Bz.js";
import { ToastParams } from "@sanity/ui/toast";
import { CSSProperties, Component, ComponentProps, ComponentType, Dispatch, ElementType, ErrorInfo, FC, FormEvent, HTMLAttributes, HTMLProps, KeyboardEvent, PropsWithChildren, PureComponent, ReactElement, ReactNode, Ref, RefAttributes, RefObject, SVGProps, SetStateAction } from "react";
import { MonoTypeOperatorFunction, Observable, OperatorFunction } from "rxjs";
import { DocumentLimitUpsellContextValue, FeedbackContext as FeedbackContext$1, FieldActionsContextValue, HoveredFieldContextValue, SchedulesContext, SingleDocReleaseContextValue } from "sanity/_singletons";
import { DocumentHandle } from "@sanity/sdk-react";
import QuickLRU from "quick-lru";
import { ArraySchemaType, AssetSource, BooleanSchemaType, ConditionalProperty, CrossDatasetType, CurrentUser, DeprecatedProperty, DocumentSystem, FieldGroup, File, FileAsset, FileSchemaType, FormNodeValidation, I18nTextRecord, Image, ImageAsset, ImageSchemaType, InitialValueProperty, InitialValueResolverContext, NumberSchemaType, ObjectSchemaType, Path, PortableTextBlock, PrepareViewOptions, PreviewValue, Reference, ReferenceSchemaType, Role, SanityDocument, SanityDocumentLike, Schema, SchemaType, SchemaTypeDefinition, SearchStrategy, SlugSchemaType, SlugValue, SortOrdering, StrictVersionLayeringOptions, StringSchemaType, TextSchemaType, UploadState, User, ValidationMarker } from "@sanity/types";
import { ClientConfig, ClientPerspective, ReconnectEvent, ReleaseDocument, ReleaseDocument as ReleaseDocument$1, ReleaseType, RequestHandler, ResetEvent, SanityClient, SanityClient as SanityClient$1, SanityDocument as SanityDocument$1, SanityDocumentStub, SingleActionResult, StackablePerspective, WelcomeBackEvent, WelcomeEvent } from "@sanity/client";
import { Rule as ConcreteRuleClass, ValidationContext as ValidationContext$1 } from "@sanity/validation/_internal";
import { ObjectDiff } from "@sanity/diff";
import { MessageBusConnection } from "@sanity/sdk/dashboard";
import { BoxProps, GapProps, IconProps, PaddingProps, Space, TextAlign } from "ui5";
import { AvatarPosition, AvatarProps, AvatarSize, AvatarStatus, BadgeProps, BadgeTone, Button, ButtonProps, ButtonTone, HotkeysProps, Placement, ResponsiveWidthProps, Skeleton, TextProps, ThemeColorSchemeKey } from "@sanity/ui";
import { TooltipProps } from "@sanity/ui/tooltip";
import { Subscriber } from "nano-pubsub";
import { EditorSelection, RangeDecoration, RangeDecorationOnMovedDetails } from "@portabletext/editor";
import { ExecutionProps } from "styled-components";
import { DEFAULT_ANNOTATIONS, DEFAULT_BLOCK_STYLES, DEFAULT_DECORATORS, DEFAULT_LIST_TYPES } from "@sanity/schema";
import { MenuButtonProps } from "@sanity/ui/menu";
import "@sanity/ui/theme";
import { PopoverProps } from "@sanity/ui/popover";
import { ThrottleSettings } from "lodash-es/throttle.js";
import { ColorHueKey, ColorTintKey } from "@sanity/color";
import { BifurClient } from "@sanity/bifur-client";
import { IntentLinkProps, SearchParam } from "sanity/router";
import { ImageUrlBuilder, ImageUrlBuilder as ImageUrlBuilder$1 } from "@sanity/image-url";
import { TFunction as TFunction$1 } from "i18next";
import { Autocomplete } from "@sanity/ui/autocomplete";
import "@sanity/icons";
import { getProviderTitle as getProviderTitle$1 } from "@sanity/access-ui";
import "@sanity/ui/styles.css";
import "ui5/styles.css";
import { Node } from "@sanity/comlink";
import { CanvasResource, FrameMessages, MediaResource, StudioResource, WindowMessages } from "@sanity/message-protocol";
interface CanvasNavigate {
  /**
   * Whether the organization has Canvas. Only a message bus host knows; standalone and over Comlink
   * it's assumed to be there.
   */
  isAvailable: boolean;
  /** Opens Canvas at a path within it, such as `doc/<id>`. */
  openCanvas: (path: string) => void;
}
/**
 * Opens Canvas through the host rendering Studio, or in the Dashboard without one.
 *
 * @internal
 */
declare function useCanvasNavigate(): CanvasNavigate;
type OpenCanvasOrigin = 'action' | 'banner';
/**
 *
 * @hidden
 * @internal
 */
declare const useNavigateToCanvasDoc: (canvasDocId: string | undefined, origin: OpenCanvasOrigin) => () => void;
/**
 * @internal
 */
declare function getDocumentIdForCanvasLink(actionProps: Omit<DocumentActionProps, 'onComplete'>): string;
/**
 * This is used to draw the bar that wraps the diff components in the changes panel
 *
 * @internal
 */
declare const ChangeFieldWrapper: (props: {
  path: Path;
  children: ReactNode;
  hasRevertHover: boolean;
}) => import("react").JSX.Element;
/** @internal */
interface ChangeIndicatorProps {
  path: Path;
  hasFocus: boolean;
  isChanged: boolean;
  withHoverEffect?: boolean;
}
/** @internal */
declare function ChangeIndicator(props: ChangeIndicatorProps & Omit<HTMLProps<HTMLDivElement>, 'as'>): import("react").JSX.Element;
/** @internal */
interface ChangeConnectorRootProps {
  children: ReactNode;
  className?: string;
  isReviewChangesOpen: boolean;
  onOpenReviewChanges: () => void;
  onSetFocus: (path: Path) => void;
}
/** @internal */
declare function ChangeConnectorRoot({ children, className, isReviewChangesOpen, onOpenReviewChanges, onSetFocus, ...restProps }: ChangeConnectorRootProps): import("react").JSX.Element;
/**
 * @internal
 */
declare function CommentDisabledIcon(props: SVGProps<SVGSVGElement> & RefAttributes<SVGSVGElement>): import("react").JSX.Element;
/**
 * @internal
 */
type CommentInputRenderBlock = (props: {
  children: React.ReactNode;
}) => React.JSX.Element;
/**
 * @internal
 */
interface CommentInputProps {
  currentUser: CurrentUser;
  expandOnFocus?: boolean;
  focusLock?: boolean;
  focusOnMount?: boolean;
  mentionOptions: UserListWithPermissionsHookValue;
  onBlur?: (e: FormEvent<HTMLDivElement>) => void;
  onChange: (value: PortableTextBlock[]) => void;
  onDiscardCancel?: () => void;
  onDiscardConfirm: () => void;
  onFocus?: (e: FormEvent<HTMLDivElement>) => void;
  onKeyDown?: (e: KeyboardEvent) => void;
  onMentionMenuOpenChange?: (open: boolean) => void;
  onSubmit?: (value: PortableTextBlock[]) => void;
  placeholder?: ReactNode;
  readOnly?: boolean;
  renderBlock?: CommentInputRenderBlock;
  value: PortableTextBlock[] | null;
  withAvatar?: boolean;
  avatarSize?: AvatarSize;
}
interface CommentDiscardDialogController {
  open: () => void;
  close: () => void;
}
/**
 * @internal
 */
interface CommentInputHandle {
  blur: () => void;
  discardDialogController: CommentDiscardDialogController;
  focus: () => void;
  scrollTo: () => void;
  reset: () => void;
}
/**
 * @internal
 * @hidden
 */
declare function CommentInput(props: CommentInputProps & RefAttributes<CommentInputHandle>): import("react").JSX.Element;
interface CommentInlineHighlightSpanProps {
  children: React.ReactNode;
  isAdded?: boolean;
  isAuthoring?: boolean;
  isHovered?: boolean;
  isNested?: boolean;
}
/**
 * @internal
 */
declare function CommentInlineHighlightSpan(props: CommentInlineHighlightSpanProps & React.HTMLProps<HTMLSpanElement> & RefAttributes<HTMLSpanElement>): import("react").JSX.Element;
/**
 * @internal
 * @hidden
 */
declare const COMMENTS_INSPECTOR_NAME = "sanity/comments";
interface CommentsSelectedPathProviderProps {
  children: React.ReactNode;
}
/**
 * @internal
 */
declare const CommentsSelectedPathProvider: import("react").MemoExoticComponent<(props: CommentsSelectedPathProviderProps) => import("react").JSX.Element>;
/**
 * @internal
 */
declare function hasCommentMessageValue(value: CommentMessage): boolean;
/**
 * A function that checks whether a comment is a text selection comment
 * @internal
 */
declare function isTextSelectionComment(comment: CommentDocument): boolean;
/**
 * @internal
 */
declare function useCommentsSelectedPath(): CommentsSelectedPathContextValue;
interface CommentsTelemetryHookValue {
  commentLinkCopied: () => void;
  commentListViewChanged: (view: CommentStatus) => void;
  commentViewedFromLink: () => void;
}
/** @internal */
declare function useCommentsTelemetry(): CommentsTelemetryHookValue;
interface BuildRangeDecorationsProps {
  comments: CommentDocument[];
  currentHoveredCommentId: string | null;
  onDecorationClick: (commentId: string) => void;
  onDecorationHoverEnd: (commentId: null) => void;
  onDecorationHoverStart: (commentId: string) => void;
  onDecorationMoved: (details: RangeDecorationOnMovedDetails) => void;
  selectedThreadId: string | null;
  value: PortableTextBlock[] | undefined;
  documentValue?: unknown;
  basePath?: Path;
}
/**
 * @internal
 */
declare function buildCommentRangeDecorations(props: BuildRangeDecorationsProps): RangeDecoration[];
/**
 * @internal
 */
interface BuildCommentsRangeDecorationsProps {
  value: PortableTextBlock[] | undefined;
  comments: CommentDocument[];
  /**
   * Document value the stored `field` paths resolve against. Falls back to a
   * top-level `value.find` on the editor slice when absent.
   */
  documentValue?: unknown;
  /** The editor's own document path. */
  basePath?: Path;
}
/**
 * @internal
 */
interface BuildCommentsRangeDecorationsResultItem {
  selection: RangeDecoration['selection'];
  comment: CommentDocument;
  range: CommentsTextSelectionItem;
}
/**
 * A function that builds range decoration selections from comments and their associated text.
 * @internal
 */
declare function buildRangeDecorationSelectionsFromComments(props: BuildCommentsRangeDecorationsProps): BuildCommentsRangeDecorationsResultItem[];
interface BuildSelectionFromFragmentProps {
  fragment: PortableTextBlock[];
  documentValue: unknown;
  basePath: Path;
  selection: EditorSelection;
}
/**
 * @internal
 */
declare function buildTextSelectionFromFragment(props: BuildSelectionFromFragmentProps): CommentTextSelection;
/** @internal */
type BetaBadgeProps = Omit<BadgeProps, 'mode' | 'tone'>;
/** @internal */
declare function BetaBadge(props: BetaBadgeProps & Omit<HTMLProps<HTMLDivElement>, 'ref'>): import("react").JSX.Element;
/**
 * @internal
 */
type BaseStudioRenderingContext<Name extends string = string, Metadata = Record<PropertyKey, never>> = {
  name: Name;
  metadata: Metadata;
};
/**
 * @internal
 */
type DefaultRenderingContext = BaseStudioRenderingContext<'default'>;
/**
 * @internal
 */
type CoreUiRenderingContext = BaseStudioRenderingContext<'coreUi', {
  environment: string;
}>;
/**
 * @internal
 */
type MessageBusRenderingContext = BaseStudioRenderingContext<'messageBus', {
  connection: MessageBusConnection;
}>;
/**
 * @internal
 */
type StudioRenderingContext = DefaultRenderingContext | CoreUiRenderingContext | MessageBusRenderingContext;
/**
 * @internal
 */
declare const capabilities$1: readonly ["globalUserMenu", "favorites", "history", "globalWorkspaceControl", "comlink", "messageBus", "dashboard"];
/**
 * @internal
 */
type Capability = (typeof capabilities$1)[number];
/**
 * @internal
 */
type CapabilityRecord = Partial<Record<Capability, boolean>>;
/**
 * @internal
 */
type RenderingContextStore = {
  renderingContext: Observable<StudioRenderingContext>;
  capabilities: Observable<CapabilityRecord>;
  /**
   * The rendering context the store resolved when it was created — the value `renderingContext`
   * replays — for reading during render, where nothing may subscribe. `undefined` only while the
   * context is unresolved, which the store's own synchronous pipeline never is.
   */
  getRenderingContext: () => StudioRenderingContext | undefined;
  /**
   * The capabilities of that rendering context — the value `capabilities` replays — for reading
   * during render, on the same terms as `getRenderingContext`.
   */
  getCapabilities: () => CapabilityRecord | undefined;
  /** The connection to a message bus host, or `undefined` for any other rendering context. */
  getMessageBusConnection: () => MessageBusConnection | undefined;
};
type Props$4 = PropsWithChildren<{
  capability: Capability;
  condition?: 'available' | 'unavailable';
}>;
/**
 * `CapabilityGate` only renders its children if the current Studio rendering context does not
 * provide the specified capability.
 *
 * This allows consumers of the component to conveniently mark a portion of the React tree as
 * providing a capability that may be overriden by the Studio rendering context. If the rendering
 * context provides this capability, the local implementation will not be rendered.
 *
 * @internal
 */
declare const CapabilityGate: ComponentType<Props$4>;
/**
 * Points links into applications a message bus host lists at the host's route, like the bridge.
 *
 * @internal
 */
declare function DashboardLink(props: ComponentProps<'a'>): import("react").JSX.Element;
/** @internal */
type MenuButtonProps$1 = Omit<MenuButtonProps, 'popover'> & {
  popover?: Omit<PopoverProps, 'animate' | 'content' | 'open'>;
};
/** @internal */
interface CollapseMenuProps {
  children: ReactNode | ReactNode[];
  collapsed?: boolean;
  collapseText?: boolean;
  disableRestoreFocusOnClose?: boolean;
  gap?: GapProps['gap'];
  menuButtonProps?: Omit<MenuButtonProps$1, 'id' | 'menu' | 'button'> & {
    id?: string;
    button?: React.JSX.Element;
  };
  onMenuClose?: () => void;
}
/** @internal */
declare function CollapseMenu(props: CollapseMenuProps & RefAttributes<any>): import("react").JSX.Element;
/** @internal */
declare function AutoCollapseMenu(props: Omit<CollapseMenuProps, 'children' | 'collapsed'> & {
  menuOptions: React.JSX.Element[];
} & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
/** @internal */
type TooltipProps$1 = Omit<TooltipProps, 'arrow' | 'padding' | 'shadow'> & {
  hotkeys?: HotkeysProps['keys'];
};
type BaseButtonProps = Pick<ButtonProps<ElementType>, 'as' | 'icon' | 'iconRight' | 'justify' | 'loading' | 'mode' | 'paddingY' | 'paddingLeft' | 'selected' | 'tone' | 'type' | 'width'> & {
  size?: 'default' | 'large';
  radius?: 'full';
};
type ButtonWithText = {
  text: string;
  tooltipProps?: TooltipProps$1 | null;
  icon?: ButtonProps['icon'];
};
type IconButton = {
  text?: undefined;
  icon?: ButtonProps['icon'];
  /**
   * When using a button with an icon, tooltipProps are required to enforce consistency in UI.
   */
  tooltipProps: TooltipProps$1 | null;
};
/** @internal */
type ButtonProps$1 = BaseButtonProps & (ButtonWithText | IconButton);
/**
 * Customized Sanity UI <Button> with pre-defined layout options.
 *
 * @internal
 */
declare function Button$1({ ref, size, mode, paddingY, paddingLeft, tone, tooltipProps, ...rest }: ButtonProps$1 & Omit<HTMLProps<HTMLButtonElement>, 'as' | 'size' | 'title'> & RefAttributes<HTMLButtonElement>): import("react").JSX.Element;
/** @internal */
interface CommonProps extends Omit<ButtonProps$1, 'text' | 'iconRight'> {
  as?: ElementType | keyof React.JSX.IntrinsicElements;
  dividerBefore?: boolean;
  focused?: boolean;
  tooltipProps?: TooltipProps$1;
  tooltipText?: ReactNode;
}
/** @internal */
interface CollapseMenuButtonProps extends CommonProps {
  collapsedProps?: Omit<CommonProps, 'text'>;
  expandedProps?: CommonProps;
  text: string;
}
/** @internal */
declare function CollapseMenuButton(props: CollapseMenuButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'as' | 'size'> & RefAttributes<HTMLButtonElement>): import("react").JSX.Element;
declare function CommandListComponent({ ref, activeItemDataAttr, ariaLabel, ariaMultiselectable, autoFocus, canReceiveFocus, className, fixedHeight, focusRingOffset, getItemDisabled, getItemKey, getItemSelected, initialIndex, initialScrollAlign, inputElement, itemHeight, items, onEndReached, onEndReachedIndexOffset, onlyShowSelectionWhenActive, overscan, renderItem, testId, wrapAround, ...paddingProps }: CommandListProps & RefAttributes<CommandListHandle>): import("react").JSX.Element;
/**
 * Renders a Command List with support for the following:
 *
 * - Keyboard navigation (↑ / ↓ / ENTER) to children with a specified container (`childContainerRef`)
 * - Focus redirection when clicking child elements
 * - Pointer blocking when navigating with arrow keys (to ensure that only one active state is visible at any given time)
 * - ARIA attributes to define a `combobox` input that controls a separate `listbox`
 *
 * @internal
 */
declare const CommandList: import("react").MemoExoticComponent<typeof CommandListComponent>;
type ContextMenuButtonProps = Pick<ButtonProps$1, 'mode' | 'selected' | 'size' | 'tone' | 'tooltipProps' | 'loading'>;
/**
 * Simple context menu button (with horizontal ellipsis icon) with shared localization.
 *
 * @internal
 */
declare function ContextMenuButton(props: ContextMenuButtonProps & Pick<HTMLProps<HTMLButtonElement>, 'disabled' | 'hidden' | 'onClick'> & RefAttributes<HTMLButtonElement>): import("react").JSX.Element;
/**
 * Renders its children after the given delay has elapsed.
 *
 * @internal
 */
declare function Delay({ children, ms }: {
  children?: React.JSX.Element | (() => React.JSX.Element);
  ms?: number;
}): React.JSX.Element;
interface BundleDeletedAction {
  id: string;
  currentUserId?: string;
  deletedByUserId: string;
  type: 'BUNDLE_DELETED';
}
interface ReleasesSetAction {
  payload: ReleaseDocument[] | null;
  type: 'RELEASES_SET';
}
interface LoadingStateChangedAction {
  payload: {
    loading: boolean;
    error: Error | undefined;
  };
  type: 'LOADING_STATE_CHANGED';
}
type ReleasesReducerAction = BundleDeletedAction | ReleasesSetAction | LoadingStateChangedAction;
interface ReleasesReducerState {
  releases: Map<string, ReleaseDocument>;
  state: 'initialising' | 'loading' | 'loaded' | 'error';
  error?: Error;
}
/**
 * @internal
 */
declare function isReleaseDocument(doc: unknown): doc is ReleaseDocument;
/**
 * @internal
 */
interface VersionInfoDocumentStub {
  _id: string;
  _rev: string;
  _createdAt: string;
  _updatedAt: string;
  _type: string;
  _system: DocumentSystem;
}
/**
 * Renders the variant rhombus (when the version belongs to a named variant) and the release
 * avatar that matches the version's bundle — published, draft, a release, or an anonymous
 * bundle. Looks up the release document and variant definition from the version stub.
 *
 * @internal
 */
declare function DocumentVersionIcons({ version }: {
  version: VersionInfoDocumentStub;
}): import("react").JSX.Element;
/**
 * Displays document status for all of the versions of a given document.
 *
 *
 * @internal
 */
declare function DocumentVersionsStatus({ documentGroupId }: {
  documentGroupId: string;
}): import("react").JSX.Element;
interface DocumentStatusProps$2 {
  documentVersions: VersionInfoDocumentStub[];
}
/**
 * Renders icons describing the document's status in the selected perspective and variant. The
 * perspective decides what the icons describe, and the selected variant then narrows it. Icons
 * appear in a fixed order: the rhombus (variant), the release icon, the yellow draft ring, then the
 * green published disc. At most three render at once.
 *
 * See `resolveDocumentStatusIcons.ts` for the full decision logic.
 *
 * @internal
 */
declare function DocumentVersionsStatusIndicator({ documentVersions }: DocumentStatusProps$2): import("react").JSX.Element | null;
/**
 * @internal
 */
interface ErrorActionsProps extends Pick<ComponentProps<typeof Button$1>, 'size'> {
  error: unknown;
  eventId?: string | null;
  onRetry?: () => void;
  isRetrying?: boolean;
}
/**
 * @internal
 */
declare const ErrorActions: ComponentType<ErrorActionsProps>;
/**
 * @internal
 */
interface ErrorWithId {
  error: unknown;
  eventId?: string | null;
}
/**
 * @internal
 */
declare function useCopyErrorDetails(error: unknown, eventId?: string | null): () => void;
/**
 * @internal
 */
declare function serializeError(): OperatorFunction<ErrorWithId, string>;
/** @internal */
declare function GetHookCollectionState<Args, State>(props: GetHookCollectionStateProps<Args, State>): import("react").JSX.Element;
/** @internal */
interface InsufficientPermissionsMessageProps {
  currentUser?: CurrentUser | null;
  context: 'create-new-reference' | 'create-document-type' | 'create-any-document' | 'create-document' | 'delete-document' | 'delete-schedules' | 'discard-changes' | 'duplicate-document' | 'edit-schedules' | 'execute-schedules' | 'publish-document' | 'unpublish-document';
}
/** @internal */
declare function InsufficientPermissionsMessage({ currentUser, context }: InsufficientPermissionsMessageProps): import("react").JSX.Element;
interface LoadingTestProps {
  /** Absolutely positions this component when `true`. */
  fill?: boolean;
  /** Optionally show loading title. If `true`, both text and spinner will appear and animate after an initial delay */
  showText?: boolean;
  /**
   * Text to display underneath the spinner.  If omitted, will default to `'Loading'`.
   * If providing a value, avoid using trailing ellipses.
   *
   * @defaultValue `'Loading'`
   */
  title?: string | null;
}
/**
 * A generic loading container which displays a spinner and text.
 * The spinner won't initially be visible and fades in after a short delay.
 *
 * @internal
 */
declare function LoadingBlock({ fill, showText, title }: LoadingTestProps): import("react").JSX.Element;
/** @internal */
type PopoverProps$3 = PopoverProps;
interface PopoverDialogProps {
  children: ReactNode;
  header?: ReactNode;
  onClose: () => void;
  referenceElement: PopoverProps$3['referenceElement'];
  width: ResponsiveWidthProps['width'];
  containerRef?: Dispatch<SetStateAction<HTMLDivElement | null>>;
}
/** @internal */
declare function PopoverDialog(props: PopoverDialogProps): import("react").JSX.Element;
/**
 * Declares the Floating UI boundary for popovers rendered through the portal that the wrapped
 * surface provides. Render it alongside the surface's `PortalProvider`, passing the same
 * `portalElement` and the element whose rect is the visible region for portaled content — for the
 * document pane that is its scroll container, so popovers stay between the sticky pane header and
 * footer.
 *
 * Popovers that are allowed to escape a dialog read this through {@link usePortalBoundary}
 * instead of the ambient `BoundaryElementProvider`, which dialogs shadow with their own scroll
 * container. The boundary is tied to `portalElement`: content that renders into another portal
 * (a custom input's own body-level `PortalProvider`) is not constrained by it.
 *
 * @internal
 */
declare function PortalBoundaryProvider(props: {
  children: ReactNode;
  element: HTMLElement | null;
  portalElement: HTMLElement | null;
}): React.JSX.Element;
/**
 * The boundary declared by the nearest {@link PortalBoundaryProvider}, provided the caller still
 * renders into the portal it was declared for. Returns `null` when no surface has declared a
 * boundary, or when an intermediate `PortalProvider` (a custom input's body-level dialog) has
 * moved the caller's portaled content out of that surface — the boundary then no longer describes
 * where the content is visible. A surface whose portal target has not mounted yet declares
 * nothing.
 *
 * @internal
 */
declare function usePortalBoundary(): HTMLElement | null;
/**
 * @internal
 */
interface RelativeTimeProps extends RelativeTimeOptions {
  time: string | Date;
}
/**
 * @internal
 */
declare function RelativeTime({ time, ...options }: RelativeTimeProps): import("react").JSX.Element;
interface ResizableProps {
  minWidth: number;
  maxWidth: number;
  initialWidth?: number;
  resizerPosition?: 'left' | 'right';
}
/**
 * @internal
 * Provides a resizable container with a resizer handle.
 */
declare function Resizable(props: ResizableProps & Omit<BoxProps<ElementType>, 'maxWidth' | 'minWidth'> & Omit<HTMLProps<HTMLDivElement>, 'as'>): import("react").JSX.Element;
/** @internal */
declare function useOnScroll(callback: Subscriber<Event>): void;
/** @internal */
type ScrollEventHandler = (event: Event) => void;
/** @internal */
interface ScrollContextValue {
  onScroll?: ScrollEventHandler;
}
/** @internal */
type TextWithToneProps = TextProps & {
  tone: ButtonTone;
  dimmed?: boolean;
};
/** @internal */
declare function TextWithTone(props: TextWithToneProps & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
/** @internal */
declare function TooltipOfDisabled({ ref, children, content, disabled, ...restProps }: TooltipProps$1 & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
/** @internal */
interface ToastParams$1 {
  closable?: boolean;
  description?: ReactNode;
  duration?: number;
  onClose?: () => void;
  title?: ReactNode;
  status?: 'error' | 'warning' | 'success' | 'info';
}
/**
 * @internal
 * @deprecated -- Refactor the component so it can call `useToast` instead
 */
declare function ImperativeToast({ ref }: {
  ref?: Ref<{
    push: (params: ToastParams$1) => string;
  }>;
}): null;
/** @internal */
type ZIndexContextValueKey = keyof ZIndexContextValue;
/**
 * This component should only be used by core Sanity packages.
 * @internal
 */
declare function LegacyLayerProvider({ children, zOffset: zOffsetKey }: {
  children: ReactNode;
  zOffset: ZIndexContextValueKey;
}): import("react").JSX.Element;
interface ExecuteArgs {
  operationName: keyof OperationsAPI;
  idPair: IdPair;
  typeName: string;
  storeKey?: string;
  extraArgs: any[];
}
/** @internal */
declare function emitOperation(operationName: keyof OperationsAPI, idPair: IdPair, typeName: string, extraArgs: any[], storeKey?: string): void;
/**
 * @hidden
 * @beta */
interface OperationError {
  type: 'error';
  /** @internal */
  op: keyof OperationsAPI;
  id: string;
  error: Error;
  idPair: IdPair;
}
/**
 * @hidden
 * @beta */
interface OperationSuccess {
  type: 'success';
  /** @internal */
  op: keyof OperationsAPI;
  id: string;
  idPair: IdPair;
}
interface IntermediarySuccess {
  type: 'success';
  args: ExecuteArgs;
}
interface IntermediaryError {
  type: 'error';
  args: ExecuteArgs;
  error: any;
}
/** @internal */
declare const operationEvents: (ctx: {
  client: SanityClient;
  historyStore: HistoryStore;
  schema: Schema;
  /**
   * @deprecated Does nothing. Preserved to avoid breaking changes.
   * Will be removed in the next major version.
   */
  serverActionsEnabled?: Observable<boolean>;
  extraOptions?: DocumentStoreExtraOptions;
}) => Observable<IntermediaryError | IntermediarySuccess>;
/**
 * @hidden
 * @beta */
interface InitialValueLoadingMsg {
  type: 'loading';
}
/**
 * @hidden
 * @beta */
interface InitialValueSuccessMsg {
  type: 'success';
  value: SanityDocumentLike | null;
}
/**
 * @hidden
 * @beta */
interface InitialValueErrorMsg {
  type: 'error';
  error: Error;
}
/**
 * @hidden
 * @beta */
type InitialValueMsg = InitialValueLoadingMsg | InitialValueSuccessMsg | InitialValueErrorMsg;
/** @internal */
interface InitialValueState {
  loading: boolean;
  error: Error | null;
  value: SanityDocumentLike;
}
/**
 * @hidden
 * @beta */
interface InitialValueOptions {
  documentId: string;
  documentType: string;
  templateName?: string;
  templateParams?: Record<string, any>;
}
/**
 * @internal
 */
declare function getInitialValueStream(schema: Schema, initialValueTemplates: Template[], documentPreviewStore: Pick<DocumentPreviewStore, 'observePaths'>, opts: InitialValueOptions, context: InitialValueResolverContext): Observable<InitialValueMsg>;
/** @internal */
type ListenQueryParams = Record<string, string | number | boolean | string[]>;
/**
 * @hidden
 * @beta */
interface ListenQueryOptions {
  tag?: string;
  apiVersion?: string;
  perspective?: ClientPerspective;
  /**
   * The selected editing variant as a bare variant id. When set, documents are resolved as seen
   * through that variant, on top of `perspective`.
   */
  variant?: string;
  throttleTime?: number;
  transitions?: ('update' | 'appear' | 'disappear')[];
}
/** @internal */
declare function listenQuery(client: SanityClient, query: string | {
  fetch: string;
  listen: string;
}, params?: ListenQueryParams, options?: ListenQueryOptions): Observable<any>;
/**
 * @hidden
 * @beta */
type QueryParams$1 = Record<string, string | number | boolean | string[]>;
/**
 * @hidden
 * @beta */
interface DocumentStore {
  /**
   * Checks out a document (with its published and draft version) for real-time editing.
   * Note that every call to this function will open a new listener to the server.
   * It's recommended to use the helper functions on `pair` below which will re-use a single connection.
   *
   * @internal
   **/
  checkoutPair: (idPair: IdPair) => Pair;
  initialValue: (opts: InitialValueOptions, context: InitialValueResolverContext) => Observable<InitialValueMsg>;
  listenQuery: (query: string | {
    fetch: string;
    listen: string;
  }, params: QueryParams$1, options: ListenQueryOptions) => Observable<any>;
  resolveTypeForDocument: (id: string, specifiedType?: string) => Observable<string>;
  pair: {
    /** @internal */
    commitErrorStatus: (publishedId: string, type: string, version?: string) => Observable<CommitError | undefined>;
    consistencyStatus: (publishedId: string, type: string, version?: string) => Observable<boolean>;
    /** @internal */
    documentEvents: (publishedId: string, type: string, version?: string) => Observable<DocumentVersionEvent>;
    /**
     * @internal
     * `version` accepts either a plain version name (release/bundle) or a
     * {@link DocumentPairTarget}. The guarded target kinds (`unresolved`, `target-missing`) emit
     * a disabled operations API without checking out a pair, so operations can never reach the
     * base draft/published pair while a selected target is unresolved or has no document.
     */
    editOperations: (publishedId: string, type: string, version?: string | DocumentPairTarget) => Observable<OperationsAPI>;
    editState: (publishedId: string, type: string, version?: string) => Observable<EditStateFor>;
    operationEvents: (publishedId: string, type: string) => Observable<OperationSuccess | OperationError>;
    validation: (validationTargetId: string, type: string, validatePublishedReferences: boolean) => Observable<ValidationStatus>;
  };
}
/** @internal */
interface DocumentStoreOptions {
  getClient: (options: SourceClientOptions) => SanityClient;
  documentPreviewStore: DocumentPreviewStore;
  historyStore: HistoryStore;
  schema: Schema;
  initialValueTemplates: Template[];
  i18n: LocaleSource;
  /**
   * @deprecated Does nothing. Preserved to avoid breaking changes.
   * Will be removed in the next major version.
   */
  serverActionsEnabled?: Observable<boolean>;
  extraOptions?: DocumentStoreExtraOptions;
  currentUser?: Omit<CurrentUser, 'role'> | null;
}
/** @internal */
declare function createDocumentStore({ getClient, documentPreviewStore, historyStore, initialValueTemplates, schema, i18n, extraOptions, currentUser }: DocumentStoreOptions): DocumentStore;
/**
 * @internal
 * @deprecated - Will be removed in 4.0.0, use the `useReferringDocuments(<documentId>)` hook instead
 */
declare function WithReferringDocuments({ children, id }: {
  children: (props: {
    isLoading: boolean;
    referringDocuments: SanityDocument[];
  }) => React.JSX.Element;
  /**
   * @deprecated - no longer required
   */
  documentStore?: DocumentStore;
  id: string;
}): import("react").JSX.Element;
/**
 * TODO: Rename to `useZOffsets`
 *
 * @internal
 */
declare function useZIndex(): ZIndexContextValue;
/**
 * TODO: Rename to `ZOffsetsProvider`
 *
 * @internal
 */
declare function ZIndexProvider({ children }: {
  children?: ReactNode;
}): React.JSX.Element;
/**
 * @internal
 * This hook returns a component based on the Components API middleware chain.
 *
 * - The `pick` function is used to select a component from the provided plugin options in the configuration.
 * - The `defaultComponent` is the default component that gets rendered with `renderDefault`.
 *   The `renderDefault` function is added to the props of the middleware components so that they can render the default
 *   component and continue the middleware chain.
 *
 * The returned component has no Suspense boundary of its own. Middleware is often `lazy()`, so
 * the render site wraps it in `<Suspense>` with a fallback shaped like the component it stands in
 * for. Form nodes are the exception: no fallback knows their size, so they suspend up to the
 * nearest boundary that does, the Portable Text editor's per-block boundary or the one
 * `FormBuilder` keeps around the whole form.
 *
 * @example
 * Example usage of:
 *
 * ```ts
 *  const StudioLayout = useMiddlewareComponents({
 *   pick: (plugin) => plugin.studio?.components?.layout,
 *   defaultComponent: StudioLayout,
 *  })
 *
 * return (
 *   <Suspense fallback={<LoadingBlock />}>
 *     <StudioLayout />
 *   </Suspense>
 * )
 *```
 */
declare function useMiddlewareComponents<T extends {}>(props: {
  pick: (plugin: PluginOptions) => ComponentType<T>;
  defaultComponent: ComponentType<T>;
}): ComponentType<T>;
/** @internal */
interface ConfigPropertyErrorOptions {
  propertyName: string;
  path: string[];
  cause: unknown;
}
/** @internal */
declare class ConfigPropertyError extends Error {
  propertyName: string;
  path: string[];
  cause: unknown;
  constructor({ propertyName, path, cause }: ConfigPropertyErrorOptions);
}
/** @internal */
interface ConfigResolutionErrorOptions {
  name: string;
  type: string;
  causes: Array<ConfigResolutionError | Error | unknown>;
}
/** @internal */
declare class ConfigResolutionError extends Error {
  name: string;
  type: string;
  causes: unknown[];
  constructor({ causes, name, type }: ConfigResolutionErrorOptions);
}
/**
 * Creates an icon element based on the input title
 * @internal
 */
declare function createDefaultIcon(title: string, subtitle: string): import("react").JSX.Element;
/** @internal */
declare const initialDocumentFieldActions: DocumentFieldAction[];
/** @internal */
declare function defineDocumentFieldAction(fieldAction: DocumentFieldAction): DocumentFieldAction;
/** @internal */
declare const documentFieldActionsReducer: ConfigPropertyReducer<DocumentFieldAction[], DocumentFieldActionsResolverContext>;
/**
 * Resolves the document-actions version type from pane or chip flags.
 *
 * Callers pass `isScheduledDraft`. Do not look the release up here: the chip's
 * `releases` prop is notCurrentReleases and the chip's own release is absent from it.
 *
 * @internal
 */
declare function getDocumentVersionType(options: {
  isRevision?: boolean;
  isScheduledDraft?: boolean;
  isVersionDocument?: boolean;
  perspectiveName?: string;
  draftsEnabled?: boolean;
}): DocumentActionsVersionType;
/**
 * @internal
 *
 * This function flattens the config tree into a list of configs in the order they should be applied.
 */
declare const flattenConfig: ({ plugins, ...currentConfig }: PluginOptions, path: string[]) => Array<{
  config: PluginOptions;
  path: string[];
}>;
/** @internal */
interface WorkspacesProviderProps {
  config: Config;
  children: ReactNode;
  basePath?: string;
  LoadingComponent: ComponentType;
  /**
   * Project ID of the first workspace in the Studio config. Forwarded to
   * `CorsOriginErrorScreen` so it can surface the "Register Studio" option
   * when the failing project matches the studio's primary project.
   */
  primaryProjectId?: string;
}
/**
 * Verdict from `/check/cors` for the current origin against the project's
 * CORS allowlist. Both fields come straight from the endpoint:
 *
 *  - `allowed`: whether the origin is in the allowlist at all.
 *  - `withCredentials`: whether the allowlist entry permits credentialed
 *    requests (the studio always sends them).
 *
 * The studio needs both `true` to function. A `null` probe result means
 * the probe couldn't reach a conclusion (network down, endpoint down, no
 * projectId) — callers should treat that as "not CORS" and let the
 * original error flow to its normal branch.
 *
 * @internal
 */
type CorsCheckResult = {
  allowed: boolean;
  withCredentials: boolean;
};
/**
 * Outcome of the `/check/cors` probe:
 *  - a {@link CorsCheckResult} — the allow/credentials verdict
 *  - `'project-not-found'` — the probe itself 404s because the project
 *    doesn't exist (`errorCode: "SIO-404-PNF"`). This is the one place we
 *    can detect a missing project: the CORS endpoint answers with CORS
 *    headers (so the `fetch` resolves) but a 404 body, whereas the data
 *    API requests fail as opaque network/CORS errors that can't tell us
 *    why.
 *  - `null` — inconclusive (network down, endpoint down, no projectId)
 *
 * @internal
 */
type CorsProbeOutcome = CorsCheckResult | 'project-not-found';
/** @internal */
declare function WorkspacesProvider({ config, children, basePath, LoadingComponent, primaryProjectId }: WorkspacesProviderProps): import("react").JSX.Element;
/**
 * A diagnosed request failure — the reason a request the studio can't recover
 * from locally failed. Produced by {@link RequestFailureProbe} from an
 * otherwise-opaque error.
 *
 *  - `project-not-found` / `dataset-not-found` — a configuration error: the
 *    project or dataset the studio points at doesn't exist. Unrecoverable by
 *    retry; the studio takes over the screen with guidance.
 *  - `cors` — the origin isn't allowed (or can't send credentials) by the
 *    project's CORS allowlist. The studio shows the CORS-origin screen. This
 *    can begin at any time (e.g. an admin editing the allowlist in Manage),
 *    not only at boot.
 *  - `unknown` — couldn't be diagnosed (a transient network error, a timeout,
 *    a CORS-allowed origin, …). The caller falls back to its normal handling
 *    (e.g. the generic network-error dialog).
 *
 * @internal
 */
type RequestFailureResult = {
  type: 'project-not-found';
} | {
  type: 'dataset-not-found';
} | {
  type: 'cors';
  allowed: boolean;
  withCredentials: boolean;
} | {
  type: 'unknown';
};
/**
 * Diagnoses why a request failed. Pure classifier: it inspects the error (and,
 * for opaque network failures, probes `/check/cors`) and returns a
 * {@link RequestFailureResult}. It performs no side effects — the caller
 * decides what to do with the result (take over the screen, re-throw, …).
 *
 * Used in two places that must agree: the studio's request handler (for
 * requests that flow through it) and the auth store's `/users/me` probe (which
 * runs on a client with the request handler stripped, so it needs to diagnose
 * its own failures).
 *
 * @internal
 */
type RequestFailureProbe = (err: unknown) => Promise<RequestFailureResult>;
/** @internal */
interface AuthStoreOptions extends AuthConfig {
  clientFactory?: (options: ClientConfig) => SanityClient;
  projectId: string;
  dataset: string;
  /**
   * Lazily resolves the channel for delegating unrecoverable boot-time
   * request errors (network / 5xx on the initial `/users/me` probe) to the
   * studio's error dialog instead of crashing the boot sequence.
   *
   * @internal
   */
  getRequestErrorHandler?: () => StudioErrorHandler | undefined;
  /**
   * Lazily resolves diagnostics for the `/users/me` probe, so it can detect
   * and report the CORS / missing-project-or-dataset failures the studio
   * request handler would otherwise catch (the probe bypasses that handler).
   * Resolved lazily for the same reason as `getRequestErrorHandler`: it's
   * unhashable runtime wiring that must stay out of the auth-store memo key.
   *
   * @internal
   */
  getRequestFailureDiagnostics?: () => RequestFailureDiagnostics | undefined;
  /**
   * Retrieves the session ID from the URL hash for the auth callback flow.
   * Called by `handleCallbackUrl` to obtain the session ID that is exchanged
   * for a token or cookie.
   * @internal
   */
  getSessionId: () => string | undefined;
  /**
   * Extracts and consumes a `#token=…` fragment from the URL hash.
   * Called at init to pick up hash tokens and on `hashchange` events.
   * @internal
   */
  consumeHashToken: () => string | undefined;
  /**
   * Observes the session token issued by the embedding workbench "OS", if the
   * Studio is running as a federated remote inside it. While it yields a token,
   * that token is authoritative: it takes precedence over `loginMethod` and
   * every other mechanism, is used in-memory only (never persisted), and the
   * auth state tracks it over time — so an OS sign-out (`null`) transitions the
   * Studio to unauthenticated. Returns `undefined` outside the workbench, in
   * which case the normal auth flow runs. Defaults to a no-op.
   * @internal
   */
  observeWorkbenchToken?: () => Observable<string | null> | undefined;
  /**
   * Asks the workbench "OS" to reissue its session token, called when the
   * current one is rejected (a 401 surfaced as forced logout). In the workbench
   * this replaces tearing down the session locally, since the OS owns it — the
   * reissued token flows back through `observeWorkbenchToken`. Defaults to a
   * no-op.
   * @internal
   */
  refreshWorkbenchToken?: () => void;
}
/**
 * Lets the auth store's `/users/me` probe diagnose and report the failures the
 * studio request handler would normally catch — but can't here, because the
 * probe runs on a client with that handler stripped (see {@link getCurrentUser}).
 *
 * - `diagnose` — the shared classifier. The client is passed per call rather
 *   than bound up front, because the auth store builds its own clients
 *   internally (so there's no single client to bind the probe to).
 * - `onRequestFailure` — reports a non-`unknown` result to the studio so it
 *   can take over the screen (CORS / missing project or dataset). Must be
 *   idempotent: the probe runs inside a retryable thunk, so a recurring
 *   failure can report the same result more than once.
 *
 * @internal
 */
interface RequestFailureDiagnostics {
  diagnose: (err: unknown, client: SanityClient) => ReturnType<RequestFailureProbe>;
  onRequestFailure: (result: Exclude<RequestFailureResult, {
    type: 'unknown';
  }>, client: SanityClient) => void;
}
/**
 * @internal
 */
declare function _createAuthStore({ observeWorkbenchToken, refreshWorkbenchToken, ...options }: AuthStoreOptions): AuthStore;
/**
 * Public options for `createAuthStore`. The `getSessionId`, `consumeHashToken`,
 * `observeWorkbenchToken` and `refreshWorkbenchToken` dependencies are wired
 * automatically using the default implementations.
 * @internal
 */
type CreateAuthStoreOptions = Omit<AuthStoreOptions, 'getSessionId' | 'consumeHashToken' | 'observeWorkbenchToken' | 'refreshWorkbenchToken'>;
/**
 * Takes in a config (created from the `defineConfig` function) and returns
 * an array of `WorkspaceSummary`. Note: this only partially resolves a config.
 *
 * For usage inside the Studio, it's preferred to pull the pre-resolved
 * workspaces and sources via `useWorkspace` or `useSource`. For usage outside
 * the Studio or for testing, use `resolveConfig`.
 *
 * @internal
 */
declare function prepareConfig(config: Config | MissingConfigFile, options?: {
  basePath?: string;
  createStudioRequestHandler?: (getClient: () => SanityClient) => RequestHandler;
  requestErrorChannel?: RequestErrorChannel;
  requestFailureDiagnostics?: RequestFailureDiagnostics;
}): PreparedConfig;
/**
 * Fully resolves a configuration including subscribing to all sources and
 * workspaces from a config. Returns an `Observable` that waits till all sources
 * emit once before emitting an array of fully resolved sources and workspaces.
 *
 * @internal
 */
declare function resolveConfig(config: Config): Observable<Workspace[]>;
/** @internal */
type CreateWorkspaceFromConfigOptions = SingleWorkspace | (SingleWorkspace & {
  currentUser: CurrentUser;
  getClient: (options: {
    apiVersion: string;
  }) => SanityClient;
  schema?: SchemaPluginOptions;
});
/**
 * PRIMARILY FOR TESTING PURPOSES.
 *
 * This will create a fully resolved workspace from a config and optionally
 * allows a `client` and `currentUser` override. This exists primarily for
 * testing purposes. If you need to use a workspace, we recommend using the
 * `useWorkspace` hook to grab the fully resolved workspace from the
 * `StudioProvider`
 *
 * @internal
 */
declare function createWorkspaceFromConfig(options: CreateWorkspaceFromConfigOptions): Promise<Workspace>;
/**
 * PRIMARILY FOR TESTING PURPOSES.
 *
 * This will create a fully resolved source from a config and optionally
 * allows a `client` and `currentUser` override. This exists primarily for
 * testing purposes. If you need to use a source, we recommend using the
 * `useSource` hook to grab the fully resolved source from the `StudioProvider`
 *
 * @internal
 */
declare function createSourceFromConfig(options: CreateWorkspaceFromConfigOptions): Promise<Source>;
declare const schemaTypesReducer: ConfigPropertyReducer<SchemaTypeDefinition[], Omit<ConfigContext$1, 'schema' | 'currentUser' | 'client' | 'getClient' | 'i18n'>>;
type ConfigContext<T> = T extends ConfigPropertyReducer<any, infer TContext> ? TContext : never;
type SchemaTypeContext = ConfigContext<typeof schemaTypesReducer>;
interface ResolveSchemaTypesOptions {
  config: PluginOptions;
  context: SchemaTypeContext;
}
/**
 * @internal
 * @hidden
 */
declare function resolveSchemaTypes({ config, context }: ResolveSchemaTypesOptions): SchemaTypeDefinition[];
/**
 * Identifies the workspace and source whose schema failed to compile, so a studio
 * with many workspaces can point at the one that needs fixing.
 *
 * @internal
 */
interface SchemaErrorContext {
  /** The name of the workspace the source belongs to */
  workspaceName: string;
  /** The name of the source, set only when the failing source is a nested one */
  sourceName?: string;
  /** The Sanity project ID */
  projectId: string;
  /** The dataset name */
  dataset: string;
}
/** @internal */
declare class SchemaError extends Error {
  schema: Schema;
  context?: SchemaErrorContext;
  constructor(schema: Schema, context?: SchemaErrorContext);
}
/**
 * Reduce a {@link Source} down to a {@link ConfigContext}, memoizing using `useMemo`
 *
 * @param source - Source to convert
 * @returns A config context containing only the defined properties of that interface
 * @internal
 */
declare function useConfigContextFromSource(source: Source): ConfigContext$1;
/**
 * Reduce a {@link Source} down to a {@link ConfigContext}, without memoization - use for non-react contexts
 *
 * @param source - Source to convert
 * @returns A config context containing only the defined properties of that interface
 * @internal
 */
declare function getConfigContextFromSource(source: Source): ConfigContext$1;
/**
 * @internal
 */
interface IncomingReference {
  _id: string;
  _type: string;
}
/**
 * @internal
 */
interface InternalReferences {
  totalCount: number;
  references: IncomingReference[];
}
/**
 * @internal
 */
interface CrossDatasetReference {
  projectId: string;
  documentId?: string;
  datasetName?: string;
}
/**
 * @internal
 */
interface CrossDatasetReferences {
  totalCount: number;
  references: CrossDatasetReference[];
}
/**
 * @internal
 */
interface ReferringDocuments {
  isLoading: boolean;
  totalCount: number;
  projectIds: string[];
  datasetNames: string[];
  hasUnknownDatasetNames: boolean;
  internalReferences?: InternalReferences;
  crossDatasetReferences?: CrossDatasetReferences;
}
/**
 * Props for the (pane-coupled) reference preview link component injected into
 * the document group inventory.
 *
 * @internal
 */
interface DocumentGroupInventoryReferencePreviewLinkProps {
  onClick?: () => void;
  type: SchemaType & {
    icon?: unknown;
  };
  value: SanityDocument | {
    _id: string;
    _type: string;
  };
}
/**
 * Pane-coupled presentational components injected into the document group
 * inventory. Only required when the inventory can mutate the document group.
 *
 * @internal
 */
interface DocumentGroupInventoryComponents {
  DocTitle: ComponentType<{
    document: SanityDocumentLike;
  }>;
  ReferencePreviewLink: ComponentType<DocumentGroupInventoryReferencePreviewLinkProps>;
  VersionsPreviewList: ComponentType<{
    documentType: string;
    documentVersions: string[];
  }>;
}
/**
 * The subset of the document perspective list state consumed by the document
 * group inventory.
 *
 * @internal
 */
interface DocumentGroupInventoryPerspectiveList {
  filteredReleases: {
    notCurrentReleases: ReleaseDocument[];
  };
  getReleaseChipState: (releaseId: string) => {
    selected: boolean;
    disabled?: boolean;
  };
  clearScheduledDraftPerspective: () => void;
  isDraftSelected: boolean;
  isPublishSelected: boolean;
}
interface DocumentGroupInventoryBaseProps {
  documentId: string;
  documentType: string;
  /**
   * The id of the document version to mark as currently viewed. Defaults to
   * {@link DocumentGroupInventoryBaseProps.documentId}.
   */
  selectedId?: string;
  /**
   * Called when a version's primary action fires. What "picking" a version
   * means is the consumer's decision: switching the studio's perspective,
   * navigating elsewhere, and so on.
   */
  onSelect: (document: VersionInfoDocumentStub) => void;
}
/**
 * Props for the full inventory: the document group's versions plus the actions that mutate
 * them (selection, deletion, variant creation, and the version context menu).
 *
 * @internal
 */
interface DocumentGroupInventoryManageProps extends DocumentGroupInventoryBaseProps {
  mode: 'manage';
  /**
   * The name of the portal element used to render popovers and dialogs (e.g.
   * the document panel portal provided by the structure tool).
   */
  portalElementName: string;
  /**
   * Derived perspective list state for the inventory document.
   */
  perspectiveList: DocumentGroupInventoryPerspectiveList;
  /**
   * Observable describing the documents that refer to the inventory document.
   */
  referringDocuments$: Observable<ReferringDocuments>;
  /**
   * Request the parent to close the document group inventory.
   */
  requestClose?: () => void;
  /**
   * Pane-coupled presentational components injected by the consumer.
   */
  components: DocumentGroupInventoryComponents;
}
/**
 * Props for the selection-only inventory. It renders the same named sets of document versions
 * (variants, releases, draft/published, anonymous bundles), but every mutative action is refused
 * by the machines, so none of the manage-mode wiring is required.
 *
 * @internal
 */
interface DocumentGroupInventoryReadOnlyProps extends DocumentGroupInventoryBaseProps {
  mode: 'readOnly';
}
/**
 * @internal
 */
type DocumentGroupInventoryProps = DocumentGroupInventoryManageProps | DocumentGroupInventoryReadOnlyProps;
/**
 * @internal
 */
declare const DocumentGroupInventory: ComponentType<DocumentGroupInventoryProps>;
/** @internal */
declare const isDev: boolean;
/** @internal */
declare const isProd: boolean;
/** @internal */
interface FeedbackDialogProps {
  onClose: () => void;
  /** Sentry DSN to send feedback to.
   * Format: `https://[key]@[host]/[project-id]`
   */
  dsn: string;
  /** Tracks the tag schema for this feedback source. Bump when tags or larger changes are made.
   * Similar to version in telemetry consent.
   */
  feedbackVersion: string;
  /** Identifies where this feedback was triggered from (e.g. 'studio-help-menu'). */
  source: string;
  /** Extra tags merged with base + dynamic tags. Can override defaults. */
  extraTags?: Record<string, string | number | boolean>;
  /** Override the dialog title. */
  title?: string;
  /** Override the sentiment question (e.g., 'How easy or difficult is PTE to use?'). */
  sentimentLabel?: string;
  /** User's name. Overrides the value from FeedbackContext when provided. */
  userName?: string;
  /** User's email. Overrides the value from FeedbackContext when provided. */
  userEmail?: string;
  /** Called after feedback is submitted successfully. */
  onSuccess?: () => void;
  /** Called when feedback submission fails. */
  onError?: (error: Error) => void;
}
/** @internal */
declare function FeedbackDialog(props: FeedbackDialogProps): import("react").JSX.Element;
/** @internal */
type StudioFeedbackDialogProps = Omit<FeedbackDialogProps, 'onSuccess' | 'onError'>;
/**
 * Studio-aware wrapper around {@link FeedbackDialog}.
 *
 * Wraps the dialog with a {@link StudioFeedbackProvider} so that
 * telemetry consent, user info, and studio tags are supplied
 * automatically from studio context hooks.
 *
 * Shows toast notifications on success/error via the studio's ToastProvider.
 *
 * @internal
 */
declare function StudioFeedbackDialog(props: StudioFeedbackDialogProps): import("react").JSX.Element;
/** Options accepted by the `sendFeedback` function returned from {@link useInStudioFeedback}. */
interface SendFeedbackOptions {
  /** Sentry DSN to send feedback to.
   * Format: `https://[key]@[host]/[project-id]`
   */
  dsn: string;
  /** Tracks the tag schema for this feedback source. Bump when tags change. */
  feedbackVersion: string;
  /** Identifies where this feedback was triggered from (e.g. 'studio-help-menu'). */
  source: string;
  /**
   * The message the user is sending feedback.
   * It's mandatory as without it, Sentry will ignore the feedback upon receiving it.
   * (Mandatory Sentry field)
   */
  message: string;
  /** The tags to send with the feedback. */
  extraTags?: Record<string, TagValue>;
  /** The attachments to send with the feedback. */
  attachments?: {
    filename: string;
    data: Uint8Array;
  }[];
}
/** @internal */
interface UseInStudioFeedbackReturn {
  /** Send feedback. Base and dynamic tags are included automatically. */
  sendFeedback: (opts: SendFeedbackOptions) => Promise<string>;
  telemetryConsent: ConsentStatus;
}
/**
 * Hook that encapsulates tag collection and feedback submission.
 *
 * Consumers only need to provide the fields they control (message, dsn, source, etc.).
 *
 * Base tags (userAgent, studioVersion, plugins, …) and
 * dynamic tags (activeTool, url, …) are gathered automatically.
 *
 * @internal
 */
declare function useInStudioFeedback(): UseInStudioFeedbackReturn;
/** Extends {@link SendFeedbackOptions} with optional user identity for out-of-studio use. */
interface FeedbackOptions extends SendFeedbackOptions {
  /** User's name. Overrides the value from FeedbackContext when provided. */
  userName?: string;
  /** User's email. Overrides the value from FeedbackContext when provided. */
  userEmail?: string;
}
/** @internal */
interface UseFeedbackReturn {
  /** Send feedback. Context-provided tags are included automatically. */
  sendFeedback: (opts: FeedbackOptions) => Promise<string>;
}
/**
 * Context-based hook for feedback submission that works in any environment.
 *
 * When rendered inside a {@link StudioFeedbackProvider} (or any custom provider),
 * feedback is enriched with consent status, user info, and tags from that provider.
 *
 * When no provider is present, falls back to safe defaults:
 * anonymous feedback with consent treated as denied.
 *
 * @internal
 */
declare function useFeedback(): UseFeedbackReturn;
/**
 * Gathers the base (static) and dynamic (navigation-dependent) tags for feedback.
 *
 * @internal
 */
declare function useStudioFeedbackTags(): {
  baseTags: BaseFeedbackTags;
  dynamicTags: DynamicFeedbackTags;
  allTags: BaseFeedbackTags & DynamicFeedbackTags;
  userName: string | undefined;
  userEmail: string | undefined;
  userId: string;
};
/** @internal */
declare function getAnnotationColor(colorManager: UserColorManager, annotation?: Annotation | null): UserColor;
/** @internal */
declare function getAnnotationAtPath(diff: Diff$1, diffPath: string | Path): Annotation | undefined;
/** @internal */
declare function getDiffAtPath(diff: Diff$1, diffPath: string | Path): Diff$1 | undefined;
/** @internal */
type DiffVisitor = (diff: Diff$1 | StringDiffSegment, path: Path) => boolean;
/**
 * Visit all diffs in tree, until visitor returns false
 *
 * @param diff - Diff to visit
 * @param visitor - Visitor function, return false to stop from going deeper
 *
 * @internal
 */
declare function visitDiff(diff: Diff$1 | StringDiffSegment, visitor: DiffVisitor, path?: Path): void;
/** @internal */
declare function useAnnotationColor(annotation?: Annotation | null): UserColor;
/** @internal */
declare function useDiffAnnotationColor(diff: Diff$1, path?: string | Path): UserColor;
/** @internal */
declare function ChangeBreadcrumb(props: {
  change?: FieldChangeNode;
  titlePath: ChangeTitlePath;
}): import("react").JSX.Element;
/** @internal */
interface ChangeListProps {
  schemaType: ObjectSchemaType;
  diff: ObjectDiff$1;
  fields?: string[];
}
/** @internal */
declare function ChangeList({ diff, fields, schemaType }: ChangeListProps): React.JSX.Element | null;
/** @internal */
interface ChangeResolverProps {
  change: ChangeNode;
  readOnly?: ConditionalProperty;
  hidden?: ConditionalProperty;
  addParentWrapper?: boolean;
}
/** @internal */
declare function ChangeResolver(props: ChangeResolverProps): import("react").JSX.Element | null;
/** @internal */
declare function GroupChange(props: {
  change: GroupChangeNode;
  readOnly?: boolean;
  hidden?: boolean;
} & HTMLAttributes<HTMLDivElement>): React.JSX.Element | null;
/**
 * @internal
 * */
declare function ChangesError({ error }: {
  error?: Error | null;
}): import("react").JSX.Element;
/** @internal */
declare function ChangeTitleSegment(props: {
  change?: FieldChangeNode;
  segment: string | FromToIndex;
}): import("react").JSX.Element;
/**
 * @internal
 * mapping of events types with a readable key for translation
 */
declare const TIMELINE_ITEM_I18N_KEY_MAPPING: Record<DocumentVariantType, Record<DocumentVersionEventType, StudioLocaleResourceKeys>>;
/** @internal */
interface DiffCardProps {
  annotation?: Annotation;
  as?: ElementType | keyof React.JSX.IntrinsicElements;
  diff?: Diff$1;
  disableHoverEffect?: boolean;
  path?: Path | string;
  tooltip?: {
    description?: ReactNode;
  } | boolean;
}
/** @internal */
declare function DiffCard(props: DiffCardProps & Omit<HTMLProps<HTMLElement>, 'as' | 'height'>): import("react").JSX.Element;
/** @internal */
interface DiffErrorBoundaryProps {
  children: ReactNode;
  t: TFunction$2;
}
/** @internal */
interface DiffErrorBoundaryState {
  error?: Error;
}
/** @internal */
declare class DiffErrorBoundary extends Component<DiffErrorBoundaryProps, DiffErrorBoundaryState> {
  static getDerivedStateFromError(error: Error): {
    error: Error;
  };
  state: DiffErrorBoundaryState;
  componentDidCatch(error: Error): void;
  render(): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
}
/** @internal */
type FieldPreviewComponent<T = any> = ComponentType<{
  color?: UserColor;
  schemaType: T extends Array<any> ? ArraySchemaType : T extends boolean ? BooleanSchemaType : T extends string ? StringSchemaType : T extends number ? NumberSchemaType : T extends Reference ? ReferenceSchemaType : T extends object ? ObjectSchemaType : any;
  value: T;
}>;
/** @internal */
interface DiffFromToProps {
  align?: 'top' | 'center' | 'bottom';
  cardClassName?: string;
  diff: Diff$1;
  layout?: 'grid' | 'inline';
  path?: Path | string;
  previewComponent: FieldPreviewComponent;
  schemaType: SchemaType;
}
/** @internal */
declare function DiffFromTo(props: DiffFromToProps): import("react").JSX.Element;
/** @internal */
interface DiffInspectWrapperProps {
  children: ReactNode;
  change: FieldChangeNode;
  as?: ExecutionProps['as'];
}
/** @internal */
declare function DiffInspectWrapper(props: DiffInspectWrapperProps & Omit<BoxProps, 'as'>): React.JSX.Element;
/** @internal */
declare function DiffStringSegment(props: {
  segment: StringDiffSegment;
}): React.JSX.Element;
/** @internal */
declare function DiffString(props: {
  diff: StringDiff$1;
}): import("react").JSX.Element;
/** @internal */
interface DiffTooltipProps extends TooltipProps$1 {
  children: React.JSX.Element;
  description?: ReactNode;
  diff: Diff$1;
  path?: Path | string;
}
/** @internal */
interface DiffTooltipWithAnnotationsProps extends TooltipProps$1 {
  annotations: AnnotationDetails[];
  children: React.JSX.Element;
  description?: ReactNode;
}
/** @internal */
declare function DiffTooltip(props: DiffTooltipProps | DiffTooltipWithAnnotationsProps): import("react").JSX.Element;
interface TimelineItemProps {
  event: DocumentGroupEvent;
  showChangesBy: 'tooltip' | 'inline' | 'hidden';
}
/**
 * @internal
 */
declare function Event$1({ event, showChangesBy }: TimelineItemProps): import("react").JSX.Element;
/** @internal */
declare const FallbackDiff: DiffComponent<Diff$1<unknown, Record<string, unknown>>>;
/** @internal */
declare function FieldChange(props: {
  change: FieldChangeNode;
  readOnly?: boolean;
  hidden?: boolean;
  addParentWrapper?: boolean;
} & HTMLAttributes<HTMLDivElement>): import("react").JSX.Element | null;
/** @internal */
type FromToProps = {
  align?: 'top' | 'center' | 'bottom';
  layout?: 'grid' | 'inline';
  from?: ReactNode;
  to?: ReactNode;
} & Omit<HTMLProps<HTMLDivElement>, 'children' | 'as' | 'height' | 'wrap'>;
/** @internal */
declare function FromTo(props: FromToProps & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
/** @internal */
type FromToArrowDirection = 'down' | 'right';
/** @internal */
interface FromToArrowProps {
  direction?: FromToArrowDirection;
  align?: TextAlign;
}
/** @internal */
declare function FromToArrow(props: FromToArrowProps): import("react").JSX.Element;
/** @internal */
interface MetaInfoProps {
  title: string;
  action?: string;
  icon?: ComponentType;
  children?: ReactNode;
  markRemoved?: boolean;
}
/** @internal */
declare function MetaInfo(props: MetaInfoProps): import("react").JSX.Element;
/** @internal */
declare function NoChanges(): import("react").JSX.Element;
/** @internal */
declare function RevertChangesButton(props: Omit<ButtonProps$1, 'tooltipProps'> & Omit<HTMLProps<HTMLButtonElement>, 'ref'> & {
  changeCount: number;
} & RefAttributes<HTMLButtonElement>): import("react").JSX.Element;
interface RevertChangesConfirmDialogProps {
  open: boolean;
  onConfirm: () => void;
  onCancel: () => void;
  changeCount: number;
  referenceElement: HTMLElement | null;
}
/**
 * @internal
 */
declare function RevertChangesConfirmDialog({ open, onConfirm, onCancel, changeCount, referenceElement }: RevertChangesConfirmDialogProps): import("react").JSX.Element;
/** @internal */
declare function ValueError({ error }: {
  error: FieldValueError;
}): import("react").JSX.Element;
/** @internal */
declare function noop(): void;
/** @internal */
declare function isFieldChange(change: ChangeNode): change is FieldChangeNode;
/** @internal */
declare function isGroupChange(change: ChangeNode): change is GroupChangeNode;
/** @internal */
declare function isAddedItemDiff(item: ItemDiff$1): item is ItemDiff$1 & {
  diff: Diff$1 & {
    action: 'added';
  };
};
/** @internal */
declare function isRemovedItemDiff(item: ItemDiff$1): item is ItemDiff$1 & {
  diff: Diff$1 & {
    action: 'removed';
  };
};
/** @internal */
declare function isUnchangedDiff(diff: Diff$1): diff is Diff$1 & {
  action: 'unchanged';
};
/**
 * A map of supported JSON types to valid empty values that may be used for diffing purposes when
 * the node has no underlying value to be compared with.
 *
 * @internal
 */
declare const emptyValuesByType: {
  string: string;
  number: number;
  boolean: boolean;
  array: never[];
  object: {};
};
/** @internal */
declare function useDocumentChange(): DocumentChangeContextInstance;
/** @internal */
declare function resolveDiffComponent<D extends Diff$1 = any>(type: SchemaType, parentSchemaType?: ArraySchemaType | ObjectSchemaType): DiffComponent<D> | DiffComponentOptions | undefined;
/** @internal */
interface FormFieldProps {
  /**
   * @hidden
   * @beta
   */
  __unstable_headerActions?: DocumentFieldActionNode[];
  /**
   * @hidden
   * @beta
   */
  __unstable_presence?: FormNodePresence[];
  /** @internal @deprecated DO NOT USE */
  __internal_comments?: FieldCommentsProps;
  /** @internal @deprecated ONLY USED BY AI ASSIST PLUGIN */
  __internal_slot?: ReactNode;
  children: ReactNode;
  description?: ReactNode;
  /**
   * The unique ID used to target the actual input element
   */
  inputId?: string;
  /**
   * The nesting level of the form field
   */
  level?: number;
  title?: ReactNode;
  /**
   * @beta
   */
  validation?: FormNodeValidation[];
  deprecated?: DeprecatedProperty;
  path: Path;
  /**
   * Whether the value differs to the document's base variant.
   */
  changedFromBaseVariant?: boolean;
}
/** @internal */
declare const FormField: import("react").MemoExoticComponent<(props: FormFieldProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref'>) => import("react").JSX.Element>;
/** @internal */
interface FormFieldSetProps {
  /**
   *
   * @hidden
   * @beta
   */
  __unstable_headerActions?: DocumentFieldActionNode[];
  /**
   * @beta
   */
  __unstable_presence?: FormNodePresence[];
  /** @internal @deprecated DO NOT USE */
  __internal_comments?: FieldCommentsProps;
  /** @internal @deprecated ONLY USED BY AI ASSIST PLUGIN */
  __internal_slot?: ReactNode;
  children: ReactNode | (() => ReactNode);
  collapsed?: boolean;
  collapsible?: boolean;
  columns?: number | number[];
  description?: ReactNode;
  /**
   * The nesting level of the form field set
   */
  level?: number;
  onCollapse?: () => void;
  onExpand?: () => void;
  schemaType?: SchemaType;
  title?: ReactNode;
  /**
   *
   * @hidden
   * @beta
   */
  validation?: FormNodeValidation[];
  inputId: string;
  deprecated?: DeprecatedProperty;
  path: Path;
  readOnly?: boolean;
  /**
   * Whether the value differs to the document's base variant.
   */
  changedFromBaseVariant?: boolean;
}
/** @internal */
declare function FormFieldSet(props: FormFieldSetProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref'> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
/** @internal */
interface FieldStatusProps {
  children?: ReactNode;
  maxAvatars?: number;
  position?: 'top' | 'bottom';
}
/** @internal */
declare function FormFieldStatus({ children, maxAvatars, position }: FieldStatusProps): import("react").JSX.Element;
/** @internal */
interface FormFieldValidationStatusProps {
  /**
   *
   * @hidden
   * @beta
   */
  validation?: FormNodeValidation[];
  /**
   *
   * @hidden
   * @beta
   */
  __unstable_showSummary?: boolean;
  fontSize?: number;
  placement?: Placement;
}
/** @internal */
declare function FormFieldValidationStatus(props: FormFieldValidationStatusProps): import("react").JSX.Element;
/** @internal */
interface FormFieldValidationWarning {
  type: 'warning';
  label: string;
}
/** @internal */
interface FormFieldValidationError {
  type: 'error';
  label: string;
}
/** @internal */
interface FormFieldValidationInfo {
  type: 'info';
  label: string;
}
/** @internal */
type FormFieldValidation = FormFieldValidationWarning | FormFieldValidationError | FormFieldValidationInfo;
declare const areas: readonly ['gutterStart', 'body', 'gutterEnd'];
type FormArea = (typeof areas)[number];
interface FormRowProps extends PropsWithChildren {
  gutterStartCell?: ReactNode;
}
/**
 * @internal
 */
declare const FormRow: ComponentType<FormRowProps>;
interface Props$3 {
  $area: FormArea;
}
/**
 * @internal
 */
declare const FormCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
  style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
}, Props$3>> & string;
/**
 * @internal
 */
declare const FormContainer: ComponentType<ComponentProps<typeof FormContainerRoot>>;
declare const FormContainerRoot: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
  style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
}> & string;
/**
 *
 * @internal
 * @hidden
 */
declare function GetFormValueProvider(props: {
  value: FormDocumentValue | undefined;
  children: ReactNode;
}): import("react").JSX.Element;
/**
 * React hook that returns a function that can be called to look up the value from the current document at the given path.
 * The returned function is stable and never changes identity.
 * NOTE: This hook will *not* trigger a re-render when the value of the document changes, which makes it less suitable for use in render functions.
 * The main use case for using this is to look up values at the current document during an event handler
 * @public
 *
 * @returns A function that can be called to look up the value from the current document at the given path.
 *
 * @example Using the `useGetFormValue` hook
 * ```ts
 * function MyComponent() {
 *    // get value of field 'name' in object 'author'
 *    const getFormValue = useGetFormValue()
 *
 *    const handleClick = useCallback(() => {
 *      console.log(getFormValue(['author', 'name']))
 *    }, [getFormValue])
 * }
 * ```
 */
declare function useGetFormValue(): import("sanity/_singletons").GetFormValueContextValue;
/** @internal */
interface FieldActionMenuProps {
  nodes: DocumentFieldActionNode[];
  onMenuOpenChange: (open: boolean) => void;
}
/** @internal */
declare const FieldActionMenu: import("react").MemoExoticComponent<(props: FieldActionMenuProps) => import("react").JSX.Element>;
type FieldActionsProviderProps = PropsWithChildren<{
  actions: DocumentFieldActionNode[];
  /** @internal @deprecated DO NOT USE */
  __internal_comments?: FieldCommentsProps;
  __internal_slot?: ReactNode;
  focused?: boolean;
  path: Path;
}>;
/** @internal */
declare const FieldActionsProvider: import("react").MemoExoticComponent<(props: FieldActionsProviderProps) => import("react").JSX.Element>;
/** @internal */
interface FieldActionsProps {
  actions: DocumentFieldAction[];
  documentId: string;
  documentType: string;
  onActions: (actions: DocumentFieldActionNode[]) => void;
  path: Path;
  schemaType: SchemaType;
}
/**
 *
 * The `FieldActionsResolver` component is responsible for resolving the actions for a given field.
 *
 * Since each field action is a React hook, they need to be rendered in a component that returns
 * `null` to allow for the hook's return value to be resolved.
 *
 * The way this works:
 *
 * - The parent component (`FieldProvider`) renders the `FieldActionsResolver` component.
 * - The `FieldActionsResolver` component renders each field action as a child component.
 * - Each field action is a React hook that returns a node, and calls `setFieldAction` with its
 *   index and value.
 * - The `FieldActionsResolver` keeps a state with the array of hook values, making sure the array
 *   has the same length as the number of actions.
 * - The `FieldActionsResolver` calls `onActions` with the array of hook values.
 *
 * @internal
 */
declare const FieldActionsResolver: import("react").MemoExoticComponent<(props: FieldActionsProps) => import("react").JSX.Element>;
/** @internal */
declare function useFieldActions(): FieldActionsContextValue;
/** @internal */
declare const HoveredFieldProvider: import("react").MemoExoticComponent<(props: PropsWithChildren) => import("react").JSX.Element>;
/** @internal */
declare function useHoveredField(): HoveredFieldContextValue;
/**
 * Used to preview a referenced type
 * Takes the reference type as props
 *
 * @internal
 */
declare function CrossDatasetReferencePreview(props: {
  availability: DocumentAvailability | null;
  id: string;
  hasStudioUrl?: boolean;
  showStudioUrlIcon?: boolean;
  preview: {
    published: PreviewValue | undefined;
  };
  dataset: string;
  projectId: string;
  refType?: CrossDatasetType;
  showTypeLabel: boolean;
}): import("react").JSX.Element;
interface CalendarLabels {
  ariaLabel: string;
  goToTomorrow: string;
  goToToday: string;
  goToYesterday: string;
  goToPreviousYear: string;
  goToNextYear: string;
  goToPreviousMonth: string;
  goToNextMonth: string;
  selectTime: string;
  setToCurrentTime: string;
  tooltipText: string;
  monthNames: MonthNames;
  weekDayNamesShort: WeekDayNames;
  setToTimePreset: (time: string, date: Date) => string;
}
type WeekDayNames = [mon: string, tue: string, wed: string, thu: string, fri: string, sat: string, sun: string];
type MonthNames = [jan: string, feb: string, mar: string, apr: string, may: string, jun: string, jul: string, aug: string, sep: string, oct: string, nov: string, dec: string];
/**
 * @internal
 */
declare function getCalendarLabels(t: (key: string, values?: Record<string, unknown>) => string): CalendarLabels;
/**
 * @internal
 */
interface PreviewState {
  isLoading?: boolean;
  /**
   * The preview snapshot as seen through the current perspective stack
   */
  snapshot: PreviewValue | Partial<SanityDocument> | null;
  /**
   * The preview snapshot in either a single `version` perspective, or the `drafts` perspective
   * This can be used as a fallback if the document exists in e.g. drafts form, but not in the current perspective
   */
  original: PreviewValue | Partial<SanityDocument> | null;
}
/**
 * Obtain a document's published and draft state, along with loading status.
 *
 * @internal
 */
declare function getPreviewStateObservable(documentPreviewStore: DocumentPreviewStore, schemaType: SchemaType, documentId: string, perspective?: PerspectiveStack, viewOptions?: PrepareViewOptions,
/**
 * The selected editing variant as a bare variant id. When set, both the perspective snapshot and
 * the fallback snapshot are resolved as seen through that variant.
 */
variant?: string): Observable<PreviewState>;
interface ReferenceTemplate {
  id: string;
  params?: Record<string, string | number | boolean>;
}
/**
 * @internal
 */
interface CreateReferenceOption {
  id: string;
  title: string;
  i18n?: I18nTextRecord<'title'>;
  icon?: ReactNode | ComponentType;
  type: string;
  template: ReferenceTemplate;
  permission: {
    granted: boolean;
    reason: string;
  };
}
interface Props$2 extends Omit<HTMLProps<HTMLButtonElement>, 'as' | 'size' | 'width' | 'type' | 'ref'> {
  id: string;
  createOptions: CreateReferenceOption[];
  menuRef?: RefObject<HTMLDivElement | null>;
  onCreate: (option: CreateReferenceOption) => void;
  readOnly?: boolean;
}
/**
 * @internal
 */
declare function CreateButton(props: Props$2): import("react").JSX.Element;
/**
 * @internal
 */
declare function ReferenceAutocomplete(props: ComponentProps<typeof Autocomplete> & {
  path: Path;
  referenceElement: HTMLDivElement | null;
  searchString?: string;
  portalRef?: RefObject<HTMLDivElement | null>;
} & RefAttributes<HTMLInputElement>): import("react").JSX.Element;
/** @internal */
interface ArrayOfObjectsMemberProps {
  member: ArrayOfObjectsMember;
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderField: RenderFieldCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderInput: RenderInputCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderPreview: RenderPreviewCallback;
}
/**
 * Convenience component for rendering an "array of objects"-item
 * @internal
 */
declare function ArrayOfObjectsInputMember(props: ArrayOfObjectsMemberProps): import("react").JSX.Element | null;
/** @internal */
interface ArrayOfObjectsInputMembersProps {
  members: ArrayOfObjectsMember[];
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderInput: RenderInputCallback;
  renderField: RenderFieldCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderPreview: RenderPreviewCallback;
}
/**
 * Convenience component for wrapping an array of objects
 * @internal
 */
declare function ArrayOfObjectsInputMembers(props: ArrayOfObjectsInputMembersProps): import("react").JSX.Element;
/** @internal */
declare function MemberItemError(props: {
  member: ArrayItemError;
}): import("react").JSX.Element;
/** @internal */
interface MemberFieldProps {
  member: FieldMember;
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderField: RenderFieldCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderInput: RenderInputCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderPreview: RenderPreviewCallback;
}
/** @internal */
declare const MemberField: import("react").MemoExoticComponent<(props: MemberFieldProps) => import("react").JSX.Element | null>;
/** @internal */
declare function MemberFieldError(props: {
  member: FieldError;
}): import("react").JSX.Element;
/** @internal */
declare const MemberFieldSet: import("react").MemoExoticComponent<(props: {
  member: FieldSetMember;
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderField: RenderFieldCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderInput: RenderInputCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderPreview: RenderPreviewCallback;
  schemaType?: SchemaType;
}) => import("react").JSX.Element>;
/** @internal */
interface ObjectInputMemberProps {
  member: ObjectMember;
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderField: RenderFieldCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderInput: RenderInputCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderPreview: RenderPreviewCallback;
}
/** @internal */
declare const ObjectInputMember: import("react").MemoExoticComponent<(props: ObjectInputMemberProps) => import("react").JSX.Element | null>;
/** @internal */
interface ObjectMembersProps {
  members: ObjectMember[];
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderInput: RenderInputCallback;
  renderField: RenderFieldCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderPreview: RenderPreviewCallback;
}
/**
 * Convenience component for wrapping an object input
 * @internal
 */
declare function ObjectInputMembers(props: ObjectMembersProps): import("react").JSX.Element;
/**
 * @deprecated Use ObjectInputMembers instead
 * @internal
 * @alias
 */
declare const ObjectMembers: typeof ObjectInputMembers;
/**
 * @internal
 */
interface ConditionalPropertyCallbackContext {
  parent?: unknown;
  document?: Record<string, unknown>;
  currentUser: Omit<CurrentUser, 'role'> | null;
  value: unknown;
  path: Path;
}
/**
 * @internal
 */
declare function resolveConditionalProperty(property: ConditionalProperty, context: ConditionalPropertyCallbackContext): boolean;
/**
 * Owns transient parse-error state for a document subtree and exposes it via
 * {@link ParseErrorsContext}. Inputs report errors with {@link useReportParseError};
 * consumers (field tooltip, validation panel) read the current map with
 * {@link useParseErrors} and merge it locally with their validation. The state
 * intentionally lives outside the form/validation pipeline so writes never
 * feed back into `useDocumentForm`.
 *
 * @internal
 */
declare function ParseErrorsProvider(props: {
  children: ReactNode;
}): import("react").JSX.Element;
/**
 * Returns the current parse-errors map for the surrounding document subtree.
 * Keys are stringified paths produced by `@sanity/util/paths` `toString`.
 *
 * @internal
 */
declare function useParseErrors(): Record<string, ParseError>;
/**
 * Returns the parse-error message reported for `path`, if any. Use this from
 * field-level consumers (e.g. `PrimitiveField`) that only care about a single
 * path.
 *
 * @internal
 */
declare function useParseErrorForPath(path: Path): string | undefined;
/**
 * Hook for primitive inputs that hold malformed text they cannot commit to the
 * document (e.g. a date input whose value does not match `dateFormat`). The
 * reported error is registered against `path` in the parse-errors context, so
 * consumers (field tooltip, validation panel) can surface it. Pass `null` to
 * clear.
 *
 * Outside a `ParseErrorsProvider` (e.g. in isolated component renders) the
 * hook is a no-op.
 *
 * @internal
 */
declare function useReportParseError(path: Path, error: string | null): void;
/** @internal */
declare const defaultRenderAnnotation: RenderAnnotationCallback;
/** @internal */
declare const defaultRenderBlock: RenderBlockCallback;
/** @internal */
declare const defaultRenderInlineBlock: RenderBlockCallback;
/** @internal */
declare const defaultRenderField: RenderFieldCallback;
/** @internal */
declare const defaultRenderInput: RenderInputCallback;
/** @internal */
declare const defaultRenderItem: RenderItemCallback;
/** @internal */
declare const defaultRenderPreview: RenderPreviewCallback;
/** @internal */
type ConnectionState = 'connecting' | 'reconnecting' | 'connected';
/**
 * The realtime connection state for a document, derived from its listener
 * events. Extracted so it can be combined with other document streams
 * (see `useDocumentSyncState`) without re-subscribing through the hook.
 *
 * @internal
 */
declare function connectionState(documentStore: DocumentStore, publishedDocId: string, docTypeName: string, version?: string): Observable<ConnectionState>;
/** @internal */
declare function useConnectionState(publishedDocId: string, docTypeName: string, version?: string): ConnectionState;
/**
 * Staged "is this document syncing?" signal, derived from the document's
 * consistency state combined with the realtime connection state and whether
 * the latest commit attempt actually failed.
 *
 * - `synced`: no pending local mutations, or they're committing normally.
 *   This includes a slow-draining backlog: while the connection is live and
 *   no commit has failed, a document that stays unsynced for a while (e.g.
 *   sustained typing while the request pipeline is saturated) is not an
 *   error condition, and nothing is shown.
 * - `pending`: local mutations have been unsynced for a short while
 *   (`PENDING_AFTER_MS`) and we don't have a live connection. Non-blocking;
 *   the editor stays usable.
 * - `stalled`: still unsynced and disconnected past `STALLED_AFTER_MS` —
 *   the editor goes read-only to stop the user piling more edits onto a
 *   document that isn't reaching the server.
 * - `recovering`: unsynced past the pending floor, the connection is live,
 *   and the latest commit attempt *failed* — the mutator is retrying it on
 *   backoff. This covers both the flush right after a reconnect and a
 *   document-specific 5xx that retries while the listener stays perfectly
 *   connected. Editing stays locked (we're not in sync yet), but the
 *   message reassures the user that we're saving rather than telling them
 *   they're stuck. Entry is debounced by `RECOVERING_DEBOUNCE_MS`, so a
 *   failure whose retry promptly succeeds never shows at all; once shown,
 *   it clears the moment a retry succeeds or the backlog drains.
 *
 *   `recovering` is time-boxed: if we stay unsynced-and-failing for
 *   `RECOVERING_GRACE_MS`, the backlog clearly isn't draining (the mutator
 *   eventually stops retrying after ~200 attempts — see
 *   `BufferedDocument._cycleCommitter`), so we fall back to `stalled`
 *   rather than reassure the user indefinitely while nothing reaches the
 *   server.
 *
 * @internal
 */
type DocumentSyncState = 'synced' | 'pending' | 'stalled' | 'recovering';
/**
 * Maps the consistency stream (`true` = synced, `false` = unsynced local
 * mutations), the connection state, and the commit-failure stream (`true` =
 * the latest commit attempt failed and is being retried) to the staged
 * {@link DocumentSyncState}. Pure — extracted so the timing/combination
 * behavior can be unit-tested without the document store.
 *
 * @internal
 */
declare function deriveDocumentSyncState(consistency$: Observable<boolean>, connectionState$: Observable<ConnectionState>, commitFailed$: Observable<boolean>): Observable<DocumentSyncState>;
/** @internal */
declare function useDocumentSyncState(publishedDocId: string, docTypeName: string, version?: string): DocumentSyncState;
interface DocumentFormOptions {
  documentType: string;
  documentId: string;
  releaseId?: ReleaseId;
  initialValue?: InitialValueState;
  initialFocusPath?: Path;
  selectedPerspectiveName?: ReleaseId | 'published';
  readOnly?: boolean | ((editState: EditStateFor) => boolean);
  /**
   * Usually the historical _rev value selected, if not defined, it will use the current document value
   * so no comparison will be done.
   */
  comparisonValue?: Partial<SanityDocument$1> | ((editState: EditStateFor) => Partial<SanityDocument$1>) | null;
  onFocusPath?: (path: Path) => void;
  changesOpen?: boolean;
  /**
   * Callback that allows to transform the value before it's passed to the form
   * used by the <DocumentPaneProvider > to display the history values.
   */
  getFormDocumentValue?: (value: SanityDocumentLike) => SanityDocumentLike;
  displayInlineChanges?: boolean;
  /**
   * Whether the form is displaying a historical revision (e.g. via "Review
   * changes"). When `true`, the live document's validation markers are not
   * applied, since they describe the editable draft/published document rather
   * than the read-only revision being viewed.
   */
  isOlderRevision?: boolean;
}
interface DocumentFormValue extends NodeChronologyProps {
  /**
   * `EditStateFor` for the displayed document.
   * */
  editState: EditStateFor;
  /**
   *  `EditStateFor` for the displayed document's upstream version.
   */
  upstreamEditState: EditStateFor;
  connectionState: ConnectionState;
  /**
   * Staged signal for whether the document's edits are reaching the
   * server. `pending` warns; `stalled` means editing is locked.
   */
  syncState: DocumentSyncState;
  collapsedFieldSets: StateTree<boolean> | undefined;
  collapsedPaths: StateTree<boolean> | undefined;
  openPath: Path;
  ready: boolean;
  value: SanityDocumentLike;
  formState: FormState | null;
  focusPath: Path;
  validation: ValidationMarker[];
  permissions: PermissionCheckResult | undefined;
  isPermissionsLoading: boolean;
  onBlur: (blurredPath: Path) => void;
  onFocus: (_nextFocusPath: Path, payload?: OnPathFocusPayload) => void;
  onSetCollapsedPath: (path: Path, collapsed: boolean) => void;
  onSetActiveFieldGroup: (path: Path, groupName: string) => void;
  onSetCollapsedFieldSet: (path: Path, collapsed: boolean) => void;
  onChange: (event: PatchEvent) => void;
  onPathOpen: (path: Path) => void;
  onProgrammaticFocus: (nextPath: Path) => void;
  formStateRef: RefObject<FormState | null>;
  schemaType: ObjectSchemaType;
}
/**
 * @internal
 * Hook for creating a form state and combine it with the <FormBuilder>.
 * It will handle the connection state, edit state, validation, and presence.
 *
 * Use this as a base point to create your own form.
 */
declare function useDocumentForm(options: DocumentFormOptions): DocumentFormValue;
/**
 * @internal
 */
type MutationPatch = Record<string, any>;
/**
 * @internal
 */
declare function toMutationPatches(patches: FormPatch[]): MutationPatch[];
/**
 * @internal
 */
declare function fromMutationPatches(origin: FormPatchOrigin, patches: MutationPatch[]): FormPatch[];
/**
 * @internal
 */
declare function encodePath(formBuilderPath: Path): string;
/**
 * @internal
 */
declare function decodePath(gradientPath: string): Path;
/**
 * Workaround to support conditional toast (e.g. a toast that is visible as long as a condition holds true)
 * @hidden
 * @internal
 */
declare function useConditionalToast(params: ToastParams & {
  id: string;
  enabled?: boolean;
  delay?: number;
}): void;
interface Options$2 extends StrictVersionLayeringOptions {
  displayed: Partial<SanityDocument> | null;
  documentId: string;
  editState: EditStateFor | null;
}
/**
 * @internal
 */
interface DocumentIdStack {
  /**
   * The position of the displayed document within the stack.
   */
  position: number;
  /**
   * The id of the previous document in the stack.
   */
  previousId?: string;
  /**
   * The id of the next document in the stack.
   */
  nextId?: string;
  /**
   * An array of document ids comprising the stack the displayed document is a member of, ordered per
   * release layering.
   */
  stack: string[];
}
/**
 * Get a stack of document ids representing existing versions of the provided document with release
 * layering applied.
 *
 * @internal
 */
declare function useDocumentIdStack({ displayed, documentId, editState, strict }: Options$2): DocumentIdStack;
/**
 * @internal
 * `version` accepts either a plain version name (release/bundle) or a {@link DocumentPairTarget}
 * declaring the resolved target of the selected perspective/variant. With the guarded target
 * kinds (`unresolved`, `target-missing`) the returned operations are disabled and throw if
 * executed, instead of silently operating on the base draft/published pair.
 */
declare function useDocumentOperation(publishedDocId: string, docTypeName: string, version?: string | DocumentPairTarget): OperationsAPI;
interface CompanionDoc {
  _id: string;
  canvasDocumentId: string;
  studioDocumentId: string;
  isStudioDocumentEditable?: boolean;
}
/**
 * Given a document id, returns whether it is linked to canvas and the companion doc if it exists.
 * @beta
 */
declare const useCanvasCompanionDoc: (documentId: string) => {
  isLinked: boolean;
  isLockedByCanvas: boolean;
  companionDoc: CompanionDoc | undefined;
  loading: boolean;
};
/**
 * @beta
 * @hidden
 */
interface CommentDeleteDialogProps {
  commentId: string;
  error: Error | null;
  isParent: boolean;
  loading: boolean;
  onClose: () => void;
  onConfirm: (id: string) => void;
}
/**
 * @beta
 * @hidden
 */
declare function CommentDeleteDialog(props: CommentDeleteDialogProps): import("react").JSX.Element;
/**
 * @beta
 * @hidden
 */
interface CommentsListProps {
  beforeListNode?: React.ReactNode;
  comments: CommentThreadItem[];
  currentUser: CurrentUser;
  error: Error | null;
  loading: boolean;
  mentionOptions: UserListWithPermissionsHookValue;
  mode: CommentsUIMode;
  onCopyLink?: (id: string) => void;
  onCreateRetry: (id: string) => void;
  onDelete: (id: string) => void;
  onEdit: (id: string, payload: CommentUpdatePayload) => void;
  onNewThreadCreate: (payload: CommentBaseCreatePayload) => void;
  /**
   * @internal
   */
  onPathSelect?: (nextPath: CommentsSelectedPath) => void;
  onReactionSelect?: (id: string, reaction: CommentReactionOption) => void;
  onReply: (payload: CommentBaseCreatePayload) => void;
  onStatusChange?: (id: string, status: CommentStatus) => void;
  readOnly?: boolean;
  /**
   * @internal
   */
  selectedPath: CommentsSelectedPath | null;
  status: CommentStatus;
}
declare function CommentsListInner(props: CommentsListProps & RefAttributes<HTMLUListElement>): import("react").JSX.Element;
/**
 * @beta
 * @hidden
 */
declare const CommentsList: import("react").MemoExoticComponent<typeof CommentsListInner>;
interface CommentsAuthoringPathProviderProps {
  children: ReactNode;
}
/**
 * @beta
 * @hidden
 * This provider keeps track of the path that the user is currently authoring a comment for.
 * This is needed to make sure that we consistently keep the editor open when the user is
 * authoring a comment. The state is kept in a context to make sure that it is preserved
 * across re-renders. If this state was kept in a component, it would be reset every time
 * the component re-renders, for example, when the form is temporarily set to `readOnly`
 * while reconnecting.
 */
declare function CommentsAuthoringPathProvider(props: CommentsAuthoringPathProviderProps): import("react").JSX.Element;
/**
 * @beta
 * @hidden
 */
interface CommentsProviderProps$1 {
  children: ReactNode;
  documentId: string;
  documentType: string;
  /**
   * This acts as the scopeId for the document.
   */
  releaseId?: ReleaseId;
  type: CommentsType;
  sortOrder: 'asc' | 'desc';
  isCommentsOpen?: boolean;
  onCommentsOpen?: () => void;
  getCommentLink?: (id: string) => string;
  selectedCommentId?: string | undefined;
  onClearSelectedComment?: () => void;
  onPathOpen?: (path: Path) => void;
  isConnecting?: boolean;
  mentionsDisabled?: boolean;
}
/**
 * @beta
 */
declare const CommentsProvider$1: import("react").MemoExoticComponent<(props: CommentsProviderProps$1) => import("react").JSX.Element>;
interface CommentsEnabledProviderProps$1 {
  children: ReactNode;
  documentId: string;
  documentType: string;
}
/**
 * Resolves whether comments are enabled for the document from the workspace's
 * `document.comments.enabled` config. Synchronous: the plan check only decides the mode, which
 * `useCommentsMode()` hands out as a promise from the plugin's `CommentsModePromiseContext`.
 *
 * @beta
 * @hidden
 */
declare const CommentsEnabledProvider$1: import("react").MemoExoticComponent<(props: CommentsEnabledProviderProps$1) => import("react").JSX.Element>;
/**
 * @beta
 * @hidden
 */
interface CommentsIntentProviderProps {
  children: ReactNode;
  getIntent: CommentIntentGetter;
}
/**
 * @beta
 * @hidden
 */
declare const CommentsIntentProvider: import("react").MemoExoticComponent<(props: CommentsIntentProviderProps) => import("react").JSX.Element>;
/**
 * @beta
 * @hidden
 */
declare function useComments(): CommentsContextValue;
/**
 * Whether comments are enabled for the document, from the workspace's `document.comments.enabled`
 * config. Synchronous and plan-independent: whether the plan has the feature only decides the
 * mode, which `useCommentsMode()` hands out as a promise. `false` outside any
 * `CommentsEnabledProvider`, such as a form rendered without the plugin.
 *
 * @beta
 * @hidden
 */
declare function useCommentsEnabled$1(): boolean;
/**
 * The comments mode as a promise: `'default'` when the plan has the feature, `'upsell'` when it
 * does not, `null` when the feature check failed (comments then stay out of the way, as if
 * disabled). Settles once the check has answered. Read it with `use()` in the leaf that renders
 * differently per mode, under a `Suspense` boundary; never on a path whose suspension would hold
 * up a layout, and never awaited in an event handler.
 *
 * @beta
 * @hidden
 */
declare function useCommentsMode$1(): Promise<CommentsMode$1>;
/**
 * @beta
 * @hidden
 */
interface CommentsProviderProps {
  children: ReactNode;
  /**
   * Published / group id. Used for the comments GDR and edit state.
   */
  groupId: string;
  /**
   * Exact document in the editor (draft, published, or version id).
   * Drives listing, create, range ownership, and version edit state.
   */
  versionId: string;
  documentType: string;
  type: CommentsType$1;
  sortOrder: 'asc' | 'desc';
  isCommentsOpen?: boolean;
  onCommentsOpen?: () => void;
  getCommentLink?: (id: string) => string;
  selectedCommentId?: string | undefined;
  onClearSelectedComment?: () => void;
  onPathOpen?: (path: Path) => void;
  isConnecting?: boolean;
  mentionsDisabled?: boolean;
}
/**
 * @beta
 */
declare const CommentsProvider: import("react").MemoExoticComponent<(props: CommentsProviderProps) => import("react").JSX.Element>;
interface CommentsEnabledProviderProps {
  children: ReactNode;
  groupId: string;
  documentType: string;
}
/**
 * Resolves whether comments are enabled for the document from the workspace's
 * `document.comments.enabled` config. Synchronous: the plan check only decides the mode, which
 * `useCommentsMode()` hands out as a promise from the plugin's `CommentsModePromiseContext`.
 *
 * @beta
 * @hidden
 */
declare const CommentsEnabledProvider: import("react").MemoExoticComponent<(props: CommentsEnabledProviderProps) => import("react").JSX.Element>;
/**
 * Whether comments are enabled for the document, from the workspace's `document.comments.enabled`
 * config. Synchronous and plan-independent: whether the plan has the feature only decides the
 * mode, which `useCommentsMode()` hands out as a promise. `false` outside any
 * `CommentsEnabledProvider`, such as a form rendered without the plugin.
 *
 * @beta
 * @hidden
 */
declare function useCommentsEnabled(): boolean;
/**
 * `'default'` when the plan has the comments feature, `'upsell'` when it does not, `null` when
 * the feature check failed.
 * @internal
 */
type CommentsMode = CommentsUIMode$1 | null;
/**
 * The comments mode as a promise: `'default'` when the plan has the feature, `'upsell'` when it
 * does not, `null` when the feature check failed (comments then stay out of the way, as if
 * disabled). Settles once the check has answered. Read it with `use()` in the leaf that renders
 * differently per mode, under a `Suspense` boundary; never on a path whose suspension would hold
 * up a layout, and never awaited in an event handler.
 *
 * @beta
 * @hidden
 */
declare function useCommentsMode(): Promise<CommentsMode>;
interface DocumentStatusProps$1 {
  draft?: PreviewValue | Partial<SanityDocument> | null;
  published?: PreviewValue | Partial<SanityDocument> | null;
  versions?: Record<string, VersionInfoDocumentStub | undefined>;
  singleLine?: boolean;
}
/**
 * Displays document status indicating both last published and edited dates in either relative (the default)
 * or absolute formats.
 *
 * These can be displayed in a single or multi-line (the default) lockups.
 *
 * Example: `**Published Oct 16 2023** Edited 8m ago`
 *
 * @deprecated use DocumentVersionsStatus instead
 */
declare function DocumentStatus({ draft, published, versions, singleLine }: DocumentStatusProps$1): import("react").JSX.Element;
interface DocumentStatusProps {
  draft?: VersionInfoDocumentStub | undefined;
  published?: VersionInfoDocumentStub | undefined;
  versions?: Record<string, VersionInfoDocumentStub | undefined>;
}
/**
 * Renders a dot indicating the current document status.
 *
 * @deprecated Use `DocumentVersionsStatusIndicator` instead.
 */
declare function DocumentStatusIndicator({ draft, published, versions }: DocumentStatusProps): import("react").JSX.Element;
/**
 * Properties for the `Hotkeys` component.
 *
 * @public
 */
type HotkeysProps$1 = HotkeysProps & {
  /**
   * Whether to make the keys platform-aware (eg `alt` to `option` on Apple devices).
   *
   * @defaultValue true
   */
  makePlatformAware?: boolean;
} & Omit<HTMLProps<HTMLElement>, 'ref' | 'size' | 'as'> & RefAttributes<HTMLElement>;
/**
 * Renders given `keys` as "keycaps" visually.
 *
 * This is a wrapper around `@sanity/ui`'s `Hotkeys` component, which allows for altering keys
 * (eg `alt` to `option`) on Apple devices unless `makePlatformAware` is set to `false`.
 *
 * @param props - Properties to render with
 * @returns React element
 * @public
 */
declare function Hotkeys$1({ makePlatformAware, keys: hotKeys, ...props }: HotkeysProps$1): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
declare function IntentButton(props: IntentLinkProps & ButtonProps$1 & Omit<HTMLProps<HTMLButtonElement>, 'ref' | 'size' | 'as'>): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type CompactPreviewProps = Omit<PreviewProps<'compact'>, 'renderDefault'>;
/**
 * @hidden
 * @beta */
declare function CompactPreview(props: CompactPreviewProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
interface DefaultPreviewProps extends Omit<PreviewProps<'default'>, 'renderDefault'> {
  styles?: {
    root?: string;
    placeholder?: string;
    media?: string;
    heading?: string;
    title?: string;
    subtitle?: string;
    hasSubtitle?: string;
    mediaString?: string;
    status?: string;
    children?: string;
  };
}
/**
 * @hidden
 * @beta */
declare function DefaultPreview(props: DefaultPreviewProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type DetailPreviewProps = PreviewProps<'detail'>;
/**
 * @hidden
 * @beta */
declare function DetailPreview(props: DetailPreviewProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type MediaPreviewProps = Omit<PreviewProps<'media'>, 'renderDefault'>;
/**
 * @hidden
 * @beta */
declare function MediaPreview(props: MediaPreviewProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type BlockImagePreviewProps = Omit<PreviewProps<'blockImage'>, 'renderDefault'>;
/**
 * @hidden
 * @beta */
declare function BlockImagePreview(props: BlockImagePreviewProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function BlockPreview(props: Omit<PreviewProps<'block'>, 'renderDefault'>): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type InlinePreviewProps = Omit<PreviewProps<'inline'>, 'renderDefault'>;
/**
 * @hidden
 * @beta */
declare function InlinePreview(props: InlinePreviewProps): import("react").JSX.Element;
interface MediaProps {
  border?: boolean;
  dimensions: PreviewMediaDimensions;
  layout: PreviewLayoutKey;
  media: PreviewProps['media'];
  radius?: number;
  responsive?: boolean;
  styles?: {
    media?: string;
    mediaString?: string;
  };
}
/**
 * @hidden
 * @beta */
interface TemplatePreviewProps {
  description?: ReactNode;
  isPlaceholder?: boolean;
  media?: MediaProps['media'];
  mediaDimensions?: PreviewMediaDimensions;
  subtitle?: ElementType<{
    layout: 'default';
  }> | ReactNode;
  title?: ElementType<{
    layout: 'default';
  }> | ReactNode;
}
/**
 * @hidden
 * @beta */
declare function TemplatePreview(props: TemplatePreviewProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function CircularProgress(props: {
  /** Percentage */
  value: number;
}): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function LinearProgress(props: {
  /** Percentage */
  value: number;
}): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type RovingFocusNavigationType = 'arrows' | 'tab';
/**
 * @hidden
 * @beta */
interface RovingFocusProps {
  direction?: 'horizontal' | 'vertical';
  initialFocus?: 'first' | 'last';
  navigation?: RovingFocusNavigationType[];
  loop?: boolean;
  pause?: boolean;
  rootElement: HTMLElement | HTMLDivElement | null;
}
/**
 * This hook handles focus with the keyboard arrows.
 *
 * @see {@link https://a11y-solutions.stevenwoodson.com/solutions/focus/roving-focus/ | Roving focus definition}
 *
 * @example
 * ```tsx
 * function MyComponent() {
 *   const [rootElement, setRootElement] = setRootElement(null)
 *
 *   useRovingFocus({
 *     rootElement: rootElement,
 *   })
 *
 *   return (
 *     <div ref={setRootElement}>
 *       <button>Button</button>
 *       <button>Button</button>
 *       <button>Button</button>
 *     </div>
 *   )
 * }
 * ```
 *
 *
 * @hidden
 * @beta
 */
declare function useRovingFocus(props: RovingFocusProps): undefined;
/** @hidden @beta */
type StatusButtonProps = ButtonProps$1 & {
  ['aria-label']: HTMLProps<HTMLButtonElement>['aria-label'];
  forwardedAs?: string;
  disabled?: boolean | {
    reason: ReactNode;
  };
  mode?: ButtonProps$1['mode'];
  iconRight?: undefined;
};
/** @hidden @beta */
declare function StatusButton(props: StatusButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'disabled' | 'ref' | 'size' | 'title'> & RefAttributes<HTMLButtonElement>): import("react").JSX.Element;
interface AvatarSkeletonProps {
  $size?: AvatarSize;
}
/**
 * A loading skeleton element representing a user avatar
 * @beta
 */
declare const AvatarSkeleton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("@sanity/ui").SkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "height">, "style"> & {
  style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
}, AvatarSkeletonProps>> & string & Omit<typeof Skeleton, keyof import("react").Component<any, {}, any>>;
/**
 * @hidden
 * @beta */
interface UserAvatarProps {
  __unstable_hideInnerStroke?: AvatarProps['__unstable_hideInnerStroke'];
  animateArrowFrom?: AvatarPosition;
  position?: AvatarPosition;
  size?: AvatarSize;
  status?: AvatarStatus;
  tone?: 'navbar';
  user: User | string;
  withTooltip?: boolean;
}
/**
 * @hidden
 * @beta */
declare function UserAvatar(props: UserAvatarProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function defineConfig<const T extends Config>(config: T): T;
/**
 * @deprecated Use `defineConfig` instead
 *
 * @hidden
 * @beta
 */
declare function createConfig<const T extends Config>(config: T): T;
/**
 * @hidden
 * @beta */
type PluginFactory<TOptions> = (options: TOptions) => PluginOptions;
/**
 * @hidden
 * @beta */
declare function definePlugin<TOptions = void>(arg: PluginFactory<TOptions> | PluginOptions): Plugin<TOptions>;
/**
 * @deprecated Use `definePlugin` instead
 *
 * @hidden
 * @beta
 */
declare function createPlugin<TOptions = void>(arg: PluginFactory<TOptions> | PluginOptions): Plugin<TOptions>;
/**
 * Define a singleton {@link SingletonDefinition | definition} for use in the
 * `document.singletons` configuration.
 *
 * Note that this produces a singleton _definition_—the registry entry binding
 * a singleton definition id to a document id and schema type—**not** a
 * singleton document schema. The schema type the definition references is
 * defined separately, using `defineType`.
 *
 * The definition `id` is optional and inherits the definition's `documentId`
 * if omitted. Set it explicitly to be verbose, to guard against future
 * collisions, or to address a singleton universally when different workspaces
 * or environments map it to different document ids.
 *
 * @example
 * ```ts
 * import {defineConfig, defineSingleton} from 'sanity'
 *
 * const settingsSingleton = defineSingleton({
 *   documentId: 'settings',
 *   schemaType: 'settings',
 * })
 *
 * export default defineConfig({
 *   // ...
 *   document: {
 *     singletons: [settingsSingleton],
 *   },
 * })
 * ```
 *
 * @hidden
 * @beta
 */
declare function defineSingleton<const Type extends Exclude<UnresolvedSingletonDefinition, string>>(definition: Type): Type;
declare const DocumentGroupInventoryAction: ComponentType<PropsWithChildren<{
  documentId: string;
  portalElementName: string;
  isDocumentGroupInventoryActive: boolean;
  setIsDocumentGroupInventoryActive: (active: boolean) => void;
}>>;
/**
 * Returns the version info title, full title, and whether the title is truncated for a given version.
 * It maps the version status to a release and a variant.
 * So for example:
 * - Published default: "All users (Default) · Published"
 * - Published variant: "Variant name · Published"
 * - Draft variant: "Variant name · Draft"
 * - Release default: "All users (Default) · Release name"
 * - Release variant: "Variant name · Release name"
 */
declare function useDocumentVersionTitle({ version }: {
  version: VersionInfoDocumentStub;
}): {
  title: string;
  fullTitle: string;
  isTruncated: boolean;
};
interface SharedProps$1 {
  children?: ReactNode;
  header: string;
  width: ResponsiveWidthProps['width'];
}
interface DialogProps$2 extends SharedProps$1 {
  type: 'dialog';
  id?: string;
  autofocus?: boolean;
  onClose?: () => void;
}
interface PopoverProps$2 extends SharedProps$1 {
  type: 'popover';
  legacy_referenceElement: HTMLElement | null;
  onClose: () => void;
}
/**
 * @beta
 * Creates a dialog or a popover for editing content.
 * Handles presence and virtual scrolling.
 */
declare function EditPortal(props: PopoverProps$2 | DialogProps$2): React.JSX.Element;
interface SharedProps {
  children?: ReactNode;
  header: string;
  width: ResponsiveWidthProps['width'];
}
interface DialogProps$1 extends SharedProps {
  type: 'dialog';
  id?: string;
  autofocus?: boolean;
  onClose?: () => void;
}
interface PopoverProps$1 extends SharedProps {
  type: 'popover';
  id?: string;
  legacy_referenceElement: HTMLElement | null;
  onClose: () => void;
}
/**
 * @beta
 * Creates a dialog or a popover for editing content.
 * Handles presence and virtual scrolling.
 *
 * When multiple dialogs are open, only the top-most dialog is visible.
 * Non-top dialogs are hidden via CSS while preserving their state.
 */
declare function EnhancedObjectDialog(props: PopoverProps$1 | DialogProps$1): React.JSX.Element;
/**
 * A hook for doing side effects as a response to a change in a hook value between renders
 *
 * @example
 * ```ts
 * useDidUpdate(hasFocus, (hadFocus, hasFocus) => {
 *  if (hasFocus) {
 *    scrollIntoView(elementRef.current)
 *   }
 * })
 * ```
 *
 * @beta
 * @hidden
 */
declare function useDidUpdate<T>(
/** The value you want to respond to changes in. */
current: T,
/** Callback to run when the value changes. */
didUpdate: (previous: T | undefined, current: T) => void, compare?: (previous: T | undefined, current: T) => boolean): void;
/**
 * @hidden
 * @beta */
declare function ArrayOfObjectsFunctions<Item extends ObjectItem, TSchemaType extends ArraySchemaType>(props: ArrayInputFunctionsProps<Item, TSchemaType>): import("react").JSX.Element | null;
/**
 *
 * @hidden
 * @beta
 */
declare function ArrayOfObjectsInput(props: ArrayOfObjectsInputProps): import("react").JSX.Element;
/**
 * @hidden
 * Array of predefined object options input
 * Note: this input can handle only object values
 *
 *
 * @hidden
 * @beta
 */
declare function ArrayOfObjectOptionsInput(props: ArrayOfObjectsInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
declare function ArrayOfOptionsInput(props: ArrayOfObjectsInputProps | ArrayOfPrimitivesInputProps): import("react").JSX.Element;
/**
 * Array of predefined primitive options input
 * Note: this input can only handle primitive values
 *
 *
 * @hidden
 * @beta
 */
declare function ArrayOfPrimitiveOptionsInput(props: ArrayOfPrimitivesInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function ArrayOfPrimitivesFunctions<MemberType extends string | boolean | number, SchemaType extends ArraySchemaType>(props: ArrayInputFunctionsProps<MemberType, SchemaType>): import("react").JSX.Element | null;
type PrimitiveValue = string | number | boolean;
interface State$1 {
  disableTransition: boolean;
}
/**
 * Note: this should be a class component until React provides support for a hook version of getSnapshotBeforeUpdate
 *
 * @hidden
 * @beta
 */
declare class ArrayOfPrimitivesInput extends PureComponent<ArrayOfPrimitivesInputProps, State$1> {
  _element: HTMLElement | null;
  constructor(props: ArrayOfPrimitivesInputProps);
  handleAppend: (itemValue: PrimitiveValue) => void;
  handlePrepend: (itemValue: PrimitiveValue) => void;
  handleSortEnd: (event: {
    fromIndex: number;
    toIndex: number;
  }) => void;
  handleItemMoveStart: () => void;
  handleItemMoveEnd: () => void;
  focus(): void;
  getSnapshotBeforeUpdate(prevProps: ArrayOfPrimitivesInputProps): {
    prevFocusedIndex: import("@sanity/types").PathSegment;
    restoreSelection: {
      text: string;
      start: number | null;
      end: number | null;
      value: string;
    };
  } | {
    prevFocusedIndex?: undefined;
    restoreSelection?: undefined;
  } | null;
  componentDidUpdate(prevProps: ArrayOfPrimitivesInputProps, prevState: Record<string, unknown>, snapshot?: {
    restoreSelection: {
      start: number;
      end: number;
    };
    prevFocusedIndex: number;
  }): void;
  renderArrayItem: (props: Omit<PrimitiveItemProps, 'renderDefault'>) => import("react").JSX.Element;
  render(): import("react").JSX.Element;
}
/**
 * Universal array input that will introspect its schemaType and delegate to the right implementation
 * Useful as a fallback/last resort input for an array type
 *
 *
 * @hidden
 * @beta
 */
declare function UniversalArrayInput(props: ArrayOfObjectsInputProps | ArrayOfPrimitivesInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
declare function BooleanInput(props: BooleanInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type DateInputProps = StringInputProps;
/**
 * @hidden
 * @beta */
declare function DateInput$1(props: DateInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
type DateTimeInputProps = StringInputProps;
/**
 * @hidden
 * @beta */
declare function DateTimeInput(props: DateTimeInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
type EmailInputProps = StringInputProps;
/**
 *
 * @hidden
 * @beta
 */
declare function EmailInput(props: EmailInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta
 */
type AssetAccessPolicy = 'checking' | 'private' | 'public' | 'unknown';
/**
 *
 * @hidden
 * @beta
 */
declare function NumberInput(props: NumberInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare const ObjectInput: import("react").MemoExoticComponent<(props: ObjectInputProps) => import("react").JSX.Element | null>;
/**
 *
 * @hidden
 * @beta
 */
declare function SelectInput(props: StringInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
type SlugInputProps = ObjectInputProps<SlugValue, SlugSchemaType>;
/**
 *
 * @hidden
 * @beta
 */
declare function SlugInput(props: SlugInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta
 */
declare function StringInput(props: StringInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
type TagsArrayInputProps = ArrayOfPrimitivesInputProps<string>;
/**
 *
 * @hidden
 * @beta
 */
declare function TagsArrayInput(props: TagsArrayInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
type TelephoneInputProps = StringInputProps;
/**
 *
 * @hidden
 * @beta
 */
declare function TelephoneInput(props: TelephoneInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
type TextInputProps = StringInputProps<TextSchemaType>;
/**
 *
 * @hidden
 * @beta
 */
declare function TextInput$1(props: TextInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
type UrlInputProps = StringInputProps;
/**
 *
 * @hidden
 * @beta
 */
declare function UrlInput(props: UrlInputProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
interface MemberItemProps {
  member: ArrayOfObjectsItemMember;
  renderAnnotation?: RenderAnnotationCallback;
  renderBlock?: RenderBlockCallback;
  renderInlineBlock?: RenderBlockCallback;
  renderItem: RenderArrayOfObjectsItemCallback;
  renderField: RenderFieldCallback;
  renderInput: RenderInputCallback;
  renderPreview: RenderPreviewCallback;
}
/**
 *
 * @hidden
 * @beta
 */
declare function ArrayOfObjectsItem(props: MemberItemProps): import("react").JSX.Element;
/**
 *
 * @hidden
 * @beta
 */
interface PrimitiveMemberItemProps {
  member: ArrayOfPrimitivesItemMember;
  renderItem: RenderArrayOfPrimitivesItemCallback;
  renderInput: RenderInputCallback;
}
/**
 *
 * @hidden
 * @beta
 */
declare function ArrayOfPrimitivesItem(props: PrimitiveMemberItemProps): import("react").JSX.Element;
/**
 * The "all fields" group definition
 * Users can import this to create a custom "all fields" group.
 * Name must be `all-fields` to be considered an "all fields" group.
 *
 * @example hides the all fields group.
 * ```ts
 *
 * const author = defineType({
 *   name: 'author',
 *   title: 'Author',
 *   type: 'document',
 *   groups: [
 *     {
 *       ...ALL_FIELDS_GROUP,
 *       hidden: true,
 *     },
 *   ],
 * })
 * ```
 *
 * @public
 */
declare const ALL_FIELDS_GROUP: FieldGroup;
interface CreateSanityMediaLibrarySourceProps {
  i18nKey?: string;
  icon?: React.ComponentType;
  libraryId: string | null;
  name?: string;
}
/**
 * Create a new image asset source for the Media Library
 *
 * @beta
 */
declare function createSanityMediaLibraryImageSource(props: CreateSanityMediaLibrarySourceProps): AssetSource;
/**
 * Create a new file asset source for the Media Library
 *
 * @beta
 */
declare function createSanityMediaLibraryFileSource(props: CreateSanityMediaLibrarySourceProps): AssetSource;
/**
 * @alpha This API might change.
 */
interface FormProviderProps {
  /** @internal */
  __internal_fieldActions?: DocumentFieldAction[];
  /** @internal Considered internal, do not use. */
  __internal_patchChannel: PatchChannel;
  /** @internal Considered internal, do not use. */
  __internal_inspectOpen?: boolean;
  autoFocus?: boolean;
  changesOpen?: boolean;
  children?: ReactNode;
  collapsedFieldSets: StateTree<boolean> | undefined;
  collapsedPaths: StateTree<boolean> | undefined;
  documentId?: string;
  focusPath: Path;
  focused: boolean | undefined;
  groups: FormFieldGroup[];
  id: string;
  onChange: (changeEvent: PatchEvent) => void;
  onPathBlur: (path: Path) => void;
  onPathFocus: (path: Path) => void;
  onPathOpen: (path: Path) => void;
  onFieldGroupSelect: (path: Path, groupName: string) => void;
  onSetPathCollapsed: (path: Path, collapsed: boolean) => void;
  onSetFieldSetCollapsed: (path: Path, collapsed: boolean) => void;
  presence: FormNodePresence[];
  readOnly?: boolean;
  schemaType: ObjectSchemaType;
  validation: ValidationMarker[];
}
/**
 * Default wiring for `FormBuilderProvider` when used with Sanity
 *
 * The form components this resolves (`renderInput`, `renderField`, ...) carry no Suspense
 * boundary of their own, and neither does this provider. `FormBuilder` wraps its root input in
 * one; a consumer that renders them under this provider directly wraps them in `<Suspense>`
 * itself, since a Components API component may be `lazy()`.
 *
 * @alpha This API might change.
 */
declare function FormProvider(props: FormProviderProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
interface BaseFileInputValue extends Partial<File> {
  _upload?: UploadState;
}
/**
 * @hidden
 * @beta */
interface BaseFileInputProps extends ObjectInputProps<BaseFileInputValue, FileSchemaType> {
  assetSources: AssetSource[];
  directUploads?: boolean;
  observeAsset: (documentId: string) => Observable<FileAsset>;
  resolveUploader: UploaderResolver;
  client: SanityClient;
}
/**
 * @hidden
 * @beta */
type FileInputProps = Omit<BaseFileInputProps, 'assetSources' | 'directUploads' | 'observeAsset' | 'resolveUploader' | 'client' | 't'>;
/**
 * @hidden
 * @beta */
declare function StudioFileInput(props: FileInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta
 */
interface BaseImageInputValue extends Partial<Image> {
  _upload?: UploadState;
}
/**
 * @hidden
 * @beta */
interface BaseImageInputProps extends ObjectInputProps<BaseImageInputValue, ImageSchemaType> {
  assetSources: AssetSource[];
  directUploads?: boolean;
  imageUrlBuilder: ImageUrlBuilder;
  isUploading: boolean;
  observeAsset: (documentId: string) => Observable<ImageAsset>;
  resolveUploader: UploaderResolver;
  client: SanityClient;
  t: (key: string, values?: Record<string, string>) => string;
}
/**
 * @hidden
 * @beta */
type ImageInputProps = Omit<BaseImageInputProps, 'assetSources' | 'directUploads' | 'imageUrlBuilder' | 'observeAsset' | 'client' | 'resolveUploader'>;
/**
 * @hidden
 * @beta */
declare function StudioImageInput(props: ImageInputProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function isObjectItemProps(item: ItemProps | Omit<ItemProps, 'renderDefault'>): item is ObjectItemProps;
/**
 * @hidden
 * @beta */
declare function isObjectInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is ObjectInputProps;
/**
 * @hidden
 * @beta */
declare function isStringInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is StringInputProps;
/**
 * @hidden
 * @beta */
declare function isNumberInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is NumberInputProps;
/**
 * @hidden
 * @beta */
declare function isBooleanInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is BooleanInputProps;
/**
 * @hidden
 * @beta */
declare function isArrayOfObjectsInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is ArrayOfObjectsInputProps;
/**
 * @hidden
 * @beta */
declare function isArrayOfBlocksInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is ArrayOfObjectsInputProps;
/**
 * @hidden
 * @beta */
declare function isArrayOfPrimitivesInputProps(inputProps: InputProps | Omit<InputProps, 'renderDefault'>): inputProps is ArrayOfPrimitivesInputProps;
/**
 *
 * @hidden
 * @beta
 */
declare function useFormBuilder(): FormBuilderContextValue;
/**
 * React hook that returns a configured Sanity client instance based on the given configuration.
 * Automatically uses the correct project and dataset based on the current active workspace.
 *
 * @public
 * @param clientOptions - Options for the client. Specifying
 *   {@link https://www.sanity.io/docs/api-versioning | apiVersion} is required in order to
 *   prevent breaking changes if studio changes the API version used in other places.
 *   See {@link SourceClientOptions}
 * @returns A configured Sanity client instance
 * @remarks The client instance is automatically memoized based on API version
 * @example Instantiating a client
 * ```ts
 * function MyComponent() {
 *   const client = useClient({apiVersion: '2021-06-07'})
 *   // ... do something with client instance ...
 * }
 * ```
 */
declare function useClient(clientOptions: SourceClientOptions): SanityClient;
/**
 *
 * @deprecated Calling `useClient()` without specifying an API version is deprecated - specify a date to prevent breaking changes, e.g. `useClient({apiVersion: "2025-02-07"})`.
 *
 * React hook that returns a configured Sanity client instance based on the given configuration.
 * Automatically uses the correct project and dataset based on the current active workspace.
 *
 * @public
 * @returns A configured Sanity client instance
 * @remarks The client instance is automatically memoized based on API version
 * @remarks The client will fallback to `v2025-02-07` of the API
 * @example Instantiating a client
 * ```ts
 * function MyComponent() {
 *   const client = useClient({apiVersion: '2021-06-07'})
 *   // ... do something with client instance ...
 * }
 * ```
 */
declare function useClient(): SanityClient;
/**
 * React hook that returns the name of the current dataset
 *
 * @public
 * @returns The name of the current dataset
 * @example Using the `useDataset` hook
 * ```ts
 * function MyComponent() {
 *   const dataset = useDataset()
 *   // ... do something with the dataset name ...
 * }
 * ```
 */
declare function useDataset(): string;
/**
 * Hook to register a dialog in the stack and check if it's the top-most one.
 *
 * @beta
 */
declare function useDialogStack({ path }?: {
  path?: Path;
}): {
  /** Unique ID for this dialog instance */
  dialogId: string;
  /** The current top dialog entry */
  topEntry: import("sanity/_singletons").DialogStackEntry | null;
  /** The full stack of dialog entries (each has id and path) */
  stack: import("sanity/_singletons").DialogStackEntry[];
  /** Check if this dialog is on top */
  isTop: boolean;
  /** Close dialogs */
  close: (options?: {
    toParent?: boolean;
  }) => void;
  /** Navigate to a specific path, updating the form path and cleaning up the stack */
  navigateTo: (path: Path) => void;
};
/** @internal */
declare function useEditState(publishedDocId: string, docTypeName: string, priority?: 'default' | 'low', version?: string): EditStateFor;
interface Features {
  enabled: boolean;
  error: Error | null;
  features: string[];
  isLoading: boolean;
}
declare const FEATURES: Record<string, string>;
/** @internal */
declare function useFeatureEnabled(featureKey: keyof typeof FEATURES): Features;
type FilterReleases = {
  notCurrentReleases: ReleaseDocument[];
  currentReleases: ReleaseDocument[];
  inCreation: ReleaseDocument | null;
};
interface Options$1 extends StrictVersionLayeringOptions {
  displayed: Partial<SanityDocument> | null;
  documentId: string;
  historyVersion?: string;
}
/**
 * @internal
 */
declare function useFilteredReleases({ displayed, documentId, strict, historyVersion }: Options$1): FilterReleases;
/**
 * Options for the duration formatter
 *
 * @public
 */
interface UseFormattedDurationOptions {
  /**
   * The formatting style to use in unit and list formatting. The default is "short".
   */
  style?: 'short' | 'long' | 'narrow';
  /**
   * The resolution of the duration. The default is "seconds".
   */
  resolution?: 'seconds' | 'milliseconds';
}
/**
 * The result of the duration formatter
 *
 * @public
 */
interface FormattedDuration {
  /** The human-readable, formatted duration as a string, eg "2 days, 3 hr, and 20 sec" */
  formatted: string;
  /** The machine-readable, formatted ISO-8601 duration string, eg "P2DT3H20S" */
  iso8601: string;
}
/**
 * Formats a duration (in milliseconds) to a more user friendly string eg `1h 30m` or `1t 29m 15s`.
 * Can be configured to output full units, eg `1 hour 30 minutes` or `1 hour 3 minutes 15 seconds`.
 * Uses the current locale, which also applies to the division of units.
 *
 * @example English (en-US) locale formatting
 * ```ts
 * useFormattedDuration(5589000)
 * // {"formatted": "1 hour, 33 minutes, and 9 seconds", "iso8601": "PT1H33M9S"}
 * ```
 *
 * @example Norwegian (no-NB) locale formatting
 * ```ts
 * useFormattedDuration(5589000)
 * // {"formatted": "1 time, 33 minutter og 9 sekunder", "iso8601": "PT1H33M9S"}
 * ```
 *
 * @param options - Optional options for the number formatter
 * @returns An object with `formatted` and `iso8601` properties
 * @public
 */
declare function useFormattedDuration(durationMs: number, options?: UseFormattedDurationOptions): FormattedDuration;
/** @internal */
interface GlobalCopyPasteElementHandler {
  value: FormDocumentValue | undefined;
  element: HTMLElement | null;
  focusPath?: Path;
}
/** @internal */
declare function useGlobalCopyPasteElementHandler({ value, element, focusPath }: GlobalCopyPasteElementHandler): void;
/**
 * Options for the `useListFormat` hook
 *
 * @public
 */
interface UseListFormatOptions {
  /**
   * The format of output message.
   * - `conjunction` (read: "and") - default
   * - `disjunction` (read: "or")
   * - `unit` (just a list)
   */
  type?: Intl.ListFormatType | undefined;
  /**
   * The length of the internationalized message.
   * This obviously varies based on language, but in US English this maps to:
   * - `long`: "a, b and c" - default
   * - `short`: "a, b & c"
   * - `narrow`: `a, b, c`
   */
  style?: Intl.ListFormatStyle | undefined;
}
/**
 * Returns an instance of `Intl.ListFormat` that uses the currently selected locale,
 * and enables language-sensitive list formatting.
 *
 * @param options - Optional options for the list formatter
 * @returns Instance of `Intl.ListFormat`
 * @public
 */
declare function useListFormat(options?: UseListFormatOptions): Intl.ListFormat;
interface ManageFavorite {
  favorite: () => void;
  unfavorite: () => void;
  isFavorited: boolean | undefined;
  /**
   * Whether the initial remote read task has succeeded.
   */
  isReady: boolean;
}
/**
 * @internal
 */
interface UseManageFavoriteProps extends DocumentHandle {
  resourceId?: string;
  resourceType: StudioResource['type'] | MediaResource['type'] | CanvasResource['type'];
  /**
   * The name of the schema collection this document belongs to.
   * Typically is the name of the workspace when used in the context of a studio.
   */
  schemaName?: string;
}
/**
 * IMPORTANT!
 *
 * Loosely based on the `useManageFavorite.ts` from `@sanity/sdk`.
 * This version has been modified to use Studio's Comlink Store.
 *
 * TODO: Adopt `@sanity/sdk`.
 *
 * ---
 *
 * This hook provides functionality to add and remove documents from favorites,
 * and tracks the current favorite status of the document.
 *
 * @internal
 */
declare function useManageFavorite({ documentId, documentType, projectId, dataset, resourceId: paramResourceId, resourceType, schemaName }: UseManageFavoriteProps): ManageFavorite;
/**
 * Options for the `useNumberFormat` hook
 *
 * @public
 */
type UseNumberFormatOptions = Intl.NumberFormatOptions;
/**
 * Returns an instance of `Intl.NumberFormat` that uses the currently selected locale,
 * and enables locale/language-sensitive number formatting.
 *
 * @param options - Optional options for the number formatter
 * @returns Instance of `Intl.NumberFormat`
 * @public
 */
declare function useNumberFormat(options?: UseNumberFormatOptions): Intl.NumberFormat;
/**
 * React hook that returns the current project id
 *
 * @public
 * @returns The current project id
 * @example Using the `useProjectId` hook
 * ```ts
 * function MyComponent() {
 *   const projectId = useProjectId()
 *   // ... do something with the project id ...
 * }
 * ```
 */
declare function useProjectId(): string;
/**
 * Will show a toast telling the user that the Studio is offline and currently reconnecting
 * @internal
 * @hidden
 * @param isReconnecting -
 */
declare const useReconnectingToast: (isReconnecting: boolean) => void;
interface ReferringDocumentsState<Doc> {
  isLoading: boolean;
  referringDocuments: Doc[];
}
/** @beta */
type DocumentField = Exclude<keyof SanityDocument, number>;
/**
 * @beta
 * Subscribe to a live-updating list document referring to the document of the passed ID
 * A new list of document will be emitted every time a document refers or no longer refers to the document of the given ID
 *
 * ## Gotcha
 * The returned list of referring documents is not extensive, will only return the 101 first documents.
 *
 * ## Gotcha
 * For every component that calls this hook, a new listener connection will be made to the backend.
 *
 * Make sure call this hook sparingly
 * @param id - id of document to search for referring documents for
 * @param fields - which root level fields to return for each document (defaults to _id and _type). Pass an empty array to return full documents
 */
declare function useReferringDocuments<DocumentType extends SanityDocument>(id: string, fields?: DocumentField[]): ReferringDocumentsState<never> | ReferringDocumentsState<DocumentType>;
interface ReviewChangesContextValue extends ConnectorContextValue {
  /**
   * @deprecated use `isReviewChangesOpen` instead, this will be removed in the next major version
   */
  changesOpen?: boolean;
}
/**
 * @internal
 */
declare function useReviewChanges(): ReviewChangesContextValue;
type StudioUrlBuilder = (url: string) => string;
type StudioUrlModifier = {
  coreUi?: StudioUrlBuilder;
  studio?: StudioUrlBuilder;
} & ({
  coreUi: StudioUrlBuilder;
} | {
  studio: StudioUrlBuilder;
});
interface UseStudioUrlReturnType {
  studioUrl: string;
  buildStudioUrl: (modifiers: StudioUrlModifier) => string;
  buildIntentUrl: (intentLink: string) => string;
}
/**
 * @internal
 */
declare const useStudioUrl: (defaultUrl?: string) => UseStudioUrlReturnType;
/** @internal */
interface SyncState {
  isSyncing: boolean;
}
/** @internal */
declare function useSyncState(publishedDocId: string, documentType: string, version?: string): SyncState;
/**
 * The id and scope of a missing draft variant that can be created by typing: the id is known
 * ahead of creation because the variant-of-published sibling advertises it (`_system.draft`).
 *
 * @internal
 * @beta
 */
interface CreatableTargetDocument {
  /** The full version id (`versions.<scopeId>.<groupId>`) the draft variant will occupy. */
  id: string;
  /** The bundle segment of {@link CreatableTargetDocument.id}, for pair checkout. */
  scopeId: string;
}
/**
 * The published, draft, and release-scoped documents in the current lane (base pair when no
 * variant is selected, variant siblings when one is). Each field is `undefined` when that
 * document does not exist. Present on every resolved {@link TargetDocumentState}.
 *
 * @internal
 * @beta
 */
interface TargetDocumentSiblings {
  published: VersionInfoDocumentStub | undefined;
  draft: VersionInfoDocumentStub | undefined;
  version: VersionInfoDocumentStub | undefined;
}
/**
 * The resolution state of the document targeted by the selected perspective (bundle) and variant.
 *
 * The union is shaped by what consumers must do, not just by what was observed:
 *
 * - `resolving` — a lookup (variant definitions or version stubs) is still in flight. Consumers
 *   must not fall back to the base draft/published pair; treat the target as not ready.
 * - `ready` — resolution finished. `targetDocument` is the version stub matching the current
 *   bundle (and variant, when one is selected); it is `undefined` only when no variant is
 *   selected and no stub exists for the bundle, in which case base draft/published semantics
 *   legitimately apply. `scopeId` is the bundle segment to thread into version-aware hooks
 *   (release id for release stubs, opaque scope hash for variant stubs, `undefined` for the
 *   base pair). `siblings` always lists the published, draft, and non system bundle scoped documents in
 *   the current lane (base pair or variant), each `undefined` when that document does not exist.
 * - `variant-missing` — a variant is selected but the document has no variant-scoped version
 *   for the current bundle. When `creatableTarget` is set (drafts bundle, non-live-edit,
 *   published variant advertising its draft sibling id), the document is editable: typing
 *   creates the draft variant at the advertised id, seeded from the published sibling.
 *   Live-edit documents pinned to drafts never take this path: they resolve as the published
 *   sibling (`ready`) instead of a creatable draft.
 * - `variant-definition-document-not-found` — the requested variant name matches no
 *   `system.variant` definition. An error state, never silently treated as "no variant".
 *
 * @internal
 * @beta
 */
type TargetDocumentState = {
  status: 'resolving';
} | {
  status: 'ready';
  targetDocument: VersionInfoDocumentStub | undefined;
  scopeId: string | undefined;
  /** The selected variant when the resolved target is a variant-scoped version. */
  variant: SystemVariant | undefined;
  siblings: TargetDocumentSiblings;
} | {
  status: 'variant-missing';
  variant: SystemVariant;
  bundle: PerspectiveBundle;
  siblings: TargetDocumentSiblings;
  /**
   * Present when the missing variant document can be created by typing: the drafts-bundle
   * variant of a published variant whose `_system.draft` weak ref advertises the (stable,
   * server-generated) id the draft will occupy. The pair is checked out at this id with
   * `allowCreate` declared to the store, and the display falls back to `siblings.published`
   * until the document exists.
   */
  creatableTarget?: CreatableTargetDocument;
} | {
  status: 'variant-definition-document-not-found';
  requestedVariantName: string;
};
/**
 * Returns the scope id to thread into version-aware hooks (`useEditState`,
 * `useDocumentOperation`, etc.) for a resolved target, or `undefined` when the target is not
 * ready or the base draft/published pair applies.
 *
 * A `variant-missing` state with a {@link CreatableTargetDocument} yields the creatable draft's
 * scope id: the pair is checked out at the advertised id from the beginning, so typing (and every
 * version-aware read: edit state, sync state, connection) addresses the document being created —
 * never the base pair, and never the published sibling.
 *
 * @internal
 * @beta
 */
declare function getTargetScopeId(state: TargetDocumentState): string | undefined;
/**
 * The creatable draft variant of a `variant-missing` state, or `undefined` for every other
 * state. Present when the missing target can be created by typing at a server-advertised id
 * (see {@link CreatableTargetDocument}); consumers use it to exempt the state from the
 * read-only/banner/footer gating that otherwise applies to unresolved variant targets.
 *
 * @internal
 * @beta
 */
declare function getCreatableVariantTarget(state: TargetDocumentState): CreatableTargetDocument | undefined;
/**
 * The published/draft/release siblings of a resolved target, or `undefined` while the target is
 * still resolving or the selected variant definition was not found.
 *
 * @internal
 * @beta
 */
declare function getTargetSiblings(state: TargetDocumentState): TargetDocumentSiblings | undefined;
/**
 * Maps a {@link TargetDocumentState} to the `target` parameter of `useDocumentOperation` /
 * `pair.editOperations`, preserving the guarded states: `resolving` yields `unresolved`
 * (operations stay `NOT_READY`), and `variant-missing` / `variant-definition-document-not-found`
 * yield `target-missing` (operations disabled with `TARGET_NOT_FOUND`). Both throw if executed,
 * so operations can never silently fall back to the base draft/published pair.
 *
 * A `variant-missing` state with a {@link CreatableTargetDocument} yields a `variant` target with
 * `allowCreate`: the store keeps `patch`/`commit` enabled so typing creates the draft variant at
 * the advertised id, while publish/unpublish/discard stay disabled until the document exists.
 *
 * @internal
 * @beta
 */
declare function getPairTarget(state: TargetDocumentState): DocumentPairTarget | string | undefined;
/**
 * Resolves the document targeted by the selected perspective and variant for a document group,
 * as an explicit {@link TargetDocumentState}.
 *
 * Unlike a plain "target document or undefined" lookup, the returned state distinguishes the
 * in-flight lookups (`resolving`), the definitive absence of a variant-scoped version
 * (`variant-missing`), and an invalid variant selection
 * (`variant-definition-document-not-found`) from the legitimate base draft/published fallback
 * (`ready` without a target document). Consumers must switch on `status` instead of treating
 * `undefined` as "no variant".
 *
 * Live-edit is read from the schema via version stubs (`_type`)
 *
 * @internal
 * @beta
 */
declare function useTargetDocumentState(documentGroupId: string): TargetDocumentState;
/**
 * @internal
 */
interface TargetScopeIdOptions {
  /** The document group id (published id) the pair is checked out for. */
  documentId: string;
  /**
   * The perspective the consumer is displaying, which is not necessarily the
   * globally selected one (e.g. a diff view pane pins its own).
   */
  selectedPerspectiveName?: ReleaseId | 'published';
}
/**
 * The bundle segment for the pair checkout (`useEditState` & co.) of a document
 * group under the given perspective.
 *
 * Variant targets use the stub-resolved opaque scope id exclusively: a
 * missing/unresolved variant target must never fall back to another document
 * (ops stay guarded, the form stays read-only). Non-variant targets keep the
 * deterministic release derivation with its fallbacks — a release version id is
 * derivable, so new documents under a release must check out the version pair
 * for typing to create the release version (not the base draft), and documents
 * that only have versions must check out their first version to display it.
 *
 * @internal
 */
declare function useTargetScopeId(options: TargetScopeIdOptions): string | undefined;
/**
 *
 * @hidden
 * @beta
 */
declare function useTemplates(): Template[];
/** @internal */
interface TimeAgoOpts {
  minimal?: boolean;
  agoSuffix?: boolean;
}
/**
 * @deprecated - Use {@link useRelativeTime} instead
 * @internal
 */
declare function useTimeAgo(time: Date | string, options?: TimeAgoOpts): string;
/**
 *
 * @hidden
 * @beta
 */
declare function useTools(): Tool[];
/**
 * Options for the `useUnitFormatter` hook
 *
 * @public
 */
type UseUnitFormatterOptions = Pick<Intl.NumberFormatOptions, 'notation' | 'signDisplay' | 'unitDisplay' | 'maximumFractionDigits' | 'minimumFractionDigits'>;
/**
 * Available measurement units
 *
 * @public
 */
type FormattableMeasurementUnit = 'acre' | 'bit' | 'byte' | 'celsius' | 'centimeter' | 'day' | 'degree' | 'fahrenheit' | 'fluid-ounce' | 'foot' | 'gallon' | 'gigabit' | 'gigabyte' | 'gram' | 'hectare' | 'hour' | 'inch' | 'kilobit' | 'kilobyte' | 'kilogram' | 'kilometer' | 'liter' | 'megabit' | 'megabyte' | 'meter' | 'mile' | 'mile-scandinavian' | 'milliliter' | 'millimeter' | 'millisecond' | 'minute' | 'month' | 'ounce' | 'percent' | 'petabyte' | 'pound' | 'second' | 'stone' | 'terabit' | 'terabyte' | 'week' | 'yard' | 'year';
/**
 * Formats a number using the specified unit, using the currently active locale.
 *
 * @param value - The number to format
 * @param unit - The unit to format the number as
 * @returns The formatted number
 * @public
 */
type UnitFormatter = (value: number, unit: FormattableMeasurementUnit) => string;
/**
 * Returns a formatter with the given options. Function takes a number and the unit to format as
 * the second argument. The formatter will yield localized output, based on the users' selected
 * locale.
 *
 * This differs from regular `Intl.NumberFormat` in two ways:
 * 1. You do not need to instantiate a new formatter for each unit you want to format
 *    (still happens behind the scenes, but is memoized)
 * 2. The default unit display style (`unitDisplay`) is `long`
 *
 * @example
 * ```ts
 * function MyComponent() {
 *   const format = useUnitFormatter()
 *   return <div>{format(2313, 'meter')}</div>
 *   // en-US -> 2,313 meters
 *   // fr-FR -> 2 313 mètres
 * }
 * ```
 *
 * @param options - Optional options for the unit formatter
 * @returns Formatter function
 * @public
 */
declare function useUnitFormatter(options?: UseUnitFormatterOptions): UnitFormatter;
/** @internal */
declare function useValidationStatus(validationTargetId: string, docTypeName: string, requirePublishedReferences: boolean): ValidationStatus;
type Result = Pick<ReleasesReducerState, 'error' | 'state'> & {
  release: TargetPerspective | undefined;
};
/**
 * Determine the `TargetPerspective` (a release or variant name) that
 * corresponds with the provided document id by looking for its owner in the
 * known list of releases.
 *
 * @internal
 */
declare function useVersionRelease(documentId: string | undefined): Result;
/**
 * @alpha
 * Return the schema id for the current workspace
 */
declare const useWorkspaceSchemaId: () => string;
/**
 * The string resources for validation.
 *
 * @internal
 * @hidden
 */
declare const validationLocaleStrings: {
  /** Array must have exactly "$wantedLength" items, but has more/less */
  readonly 'array.exact-length': 'Must have exactly {{wantedLength}} items';
  /** Portable Text array must have exactly "$wantedLength" blocks, but has more/less */
  readonly 'array.exact-length_blocks': 'Must have exactly {{wantedLength}} blocks';
  /** Array item is a duplicate, but array wants only unique items */
  readonly 'array.item-duplicate': "Can't be a duplicate";
  /** Array has more than the maximum of "$maxLength" items */
  readonly 'array.maximum-length': 'Must have at most {{maxLength}} items';
  /** Portable Text array has more than the maximum of "$maxLength" items */
  readonly 'array.maximum-length_blocks': 'Must have at most {{maxLength}} blocks';
  /** Array has less than the minimum of "$minLength" items */
  readonly 'array.minimum-length': 'Must have at least {{minLength}} items';
  /** Portable Text array has less than the minimum of "$minLength" blocks */
  readonly 'array.minimum-length_blocks': 'Must have at least {{minLength}} blocks';
  /** Date is not valid or not in the correct format (ISO-8601) */
  readonly 'date.invalid-format': 'Must be a valid ISO-8601 formatted date string';
  /** Date is later than the given maximum date "$maxDate" */
  readonly 'date.maximum': 'Must be at or before {{maxDate}}';
  /** Date is earlier than the given minimum date "$minDate" */
  readonly 'date.minimum': 'Must be at or after {{minDate}}';
  /** A value of incorrect type is found, eg found `number` instead of `string` */
  readonly 'generic.incorrect-type': 'Expected type "{{expectedType}}", got "{{actualType}}"';
  /** Value is not one of the values specifically allowed */
  readonly 'generic.not-allowed': 'Value did not match any allowed values';
  /** Value "$givenValue" is not one of the values specifically allowed */
  readonly 'generic.not-allowed_hint': 'Value "{{hint}}" did not match any allowed values';
  /** A value is expected, but none is provided */
  readonly 'generic.required': 'Required';
  /** Number is less than the given minimum threshold value "$threshold" */
  readonly 'number.greater-than': 'Must be greater than {{threshold}}';
  /** Number is greater than the given maximum threshold value "$threshold" */
  readonly 'number.less-than': 'Must be less than {{threshold}}';
  /** Number is higher than the given maximum value "$maxNumber" */
  readonly 'number.maximum': 'Must be lower than or equal to {{maxNumber}}';
  /** Number has more precision (decimals) than the allowed "$limit" */
  readonly 'number.maximum-precision': 'Max precision is {{limit}}';
  /** Number is lower than the given minimum value "$minNumber" */
  readonly 'number.minimum': 'Must be greater than or equal to {{minNumber}}';
  /** Number is not an integer ("whole number") */
  readonly 'number.non-integer': 'Must be an integer';
  /** Object is missing a reference to an asset document in its `asset` field */
  readonly 'object.asset-required': 'Asset is required';
  /** Object is missing a reference to a file asset document in its `asset` field */
  readonly 'object.asset-required_file': 'File is required';
  /** Object is missing a reference to an image asset document in its `asset` field */
  readonly 'object.asset-required_image': 'Image is required';
  /** Media can't be found in the Media Library */
  readonly 'object.media-not-found': 'The asset could not be found in the Media Library';
  /** Media object is missing a reference to a document in its `_ref` field */
  readonly 'object.not-media-library-asset': 'Must be a reference to a Media Library asset';
  /** Object is not a reference to a document (eg `{_ref: 'documentId'}`) */
  readonly 'object.not-reference': 'Must be a reference to a document';
  /** Object references a document which is not published */
  readonly 'object.reference-not-published': 'Referenced document must be published';
  /** Accessibility label for closing the validation panel */
  readonly 'panel.close-button-aria-label': 'Close validation';
  /** Message shown when the validation panel is opened but there are no errors/warnings */
  readonly 'panel.no-errors-message': 'No validation errors';
  /** Title for the actual "Validation" panel/feature */
  readonly 'panel.title': 'Validation';
  /** Message shown when the validation panel is opened but the document is going to unpublish */
  readonly 'panel.unpublish-message': 'Document is going to unpublish, no validation errors are shown';
  /** Slug is an object, but is missing a `current` string property */
  readonly 'slug.missing-current': 'Slug must have a value';
  /** Slug is not an object (eg `{current: 'some-slug'}`) */
  readonly 'slug.not-object': 'Slug must be an object';
  /** Slug is already in use somewhere else, but needs to be unique */
  readonly 'slug.not-unique': 'Slug is already in use';
  /** String is not a valid email address */
  readonly 'string.email': 'Must be a valid email address';
  /** String has a different character length than the exact number "$wantedLength" */
  readonly 'string.exact-length': 'Must be exactly {{wantedLength}} characters long';
  /** String contains characters that are not in lowercase  */
  readonly 'string.lowercase': 'Must be all lowercase characters';
  /** String is longer than the limit of "$maxLength" characters */
  readonly 'string.maximum-length': 'Must be at most {{maxLength}} characters long';
  /** String is shorter than the limit of "$minLength" characters */
  readonly 'string.minimum-length': 'Must be at least {{minLength}} characters long';
  /** String does not match the given regular expression, but should */
  readonly 'string.regex-does-not-match': 'Does not match "{{name}}"-pattern';
  /** String matches the given regular expression, but should not */
  readonly 'string.regex-match': 'Should not match "{{name}}"-pattern';
  /** String contains characters that are not in uppercase */
  readonly 'string.uppercase': 'Must be all uppercase characters';
  /** String contains a protocol/scheme that is not allowed, eg (`ftp`, `mailto`…) */
  readonly 'string.url.disallowed-scheme': 'Does not match allowed protocols/schemes';
  /** String contains a URL with a username or password specified before the host */
  readonly 'string.url.includes-credentials': 'Username/password not allowed';
  /** String is not a valid URL */
  readonly 'string.url.invalid': 'Not a valid URL';
  /** String is not an absolute URL (eg it is missing a protocol/host) */
  readonly 'string.url.not-absolute': 'Relative URLs are not allowed';
  /** String is not a relative URL (eg it contains a protocol/host) */
  readonly 'string.url.not-relative': 'Only relative URLs are allowed';
};
/**
 * The i18n resource keys for the validation.
 *
 * @alpha
 * @hidden
 */
type ValidationLocaleResourceKeys = keyof typeof validationLocaleStrings;
/**
 * Defines a resource bundle for a given locale and namespace.
 *
 * @param bundle - The bundle of resources to define
 * @returns The bundle that was passed, as-is (this is an "identity function")
 * @public
 */
declare function defineLocaleResourceBundle(bundle: LocaleResourceBundle): LocaleResourceBundle;
/**
 * Defines a locale and makes it available for use in the studio.
 *
 * @param locale - The locale to define
 * @returns The locale that was passed, as-is (this is an "identity function")
 * @public
 */
declare function defineLocale(locale: LocaleDefinition): LocaleDefinition;
/**
 * Internal helper for definining resources for a given namespace.
 *
 * Used for automation (finding the officially defined namespaces and keys), and potentially in
 * the future for type safety/helpers.
 *
 * @param resources - Resources to define
 * @returns The resources that was passed, as-is (this is an "identity function")
 * @deprecated Sanity-internal helper, don't use in external code
 * @internal
 * @hidden
 */
declare function defineLocalesResources<R extends Record<string, string>>(namespace: string, resources: R): R;
/**
 * Removes any values that are undefined from the given object.
 *
 * This is used to remove any placeholders from the generated files, while being able to leave them
 * in place to ease spotting the missing translations.
 *
 * @param resources - The resources to remove undefined values from
 * @returns The resources without any undefined values
 * @public
 * @hidden
 */
declare function removeUndefinedLocaleResources<T extends {
  [key: string]: string | undefined;
}>(resources: T): { [K in keyof T]: Exclude<T[K], undefined>; };
/**
 * Enforces the shape of an object allowed to be passed into `useI18nText`.
 * @internal
 */
type I18nNode<TNode extends {
  i18n?: { [TProp in string]: {
    key: string;
    ns: string;
  }; };
}> = {
  i18n?: { [K in keyof TNode['i18n']]: {
    key: string;
    ns: string;
  }; };
} & { [K in keyof TNode['i18n']]: string; };
/**
 * A React hook for localizing strings in a given object (`node`) using the
 * `useTranslation` hook.
 *
 * This hook expects an object (`node`) with top-level keys associated with
 * string values. If an `i18n` property is present within the object, it should
 * contain localization configurations for each top-level key. Each
 * configuration must include a `key` and `ns` (namespace) used for the
 * translation of the corresponding string value.
 *
 * The hook uses a proxy to intercept access to properties of the `node`. For
 * properties defined in the `i18n` object, it returns the translated string
 * using the `t` function. If no translation is found, the original string value
 * is used as a fallback. For properties not defined in the `i18n` object, their
 * original values are returned.
 *
 * @param node - The object containing strings to be localized along with
 *  optional i18n configurations.
 * @returns A proxy of the original `node` object where each property access
 *  returns localized strings.
 * @internal
 */
declare function useI18nText<TNode extends I18nNode<TNode>>(node: TNode): TNode;
/**
 * Similar to `useI18nText` except returns a function that can be called
 * conditionally.
 * @internal
 */
declare function useGetI18nText<TNode extends I18nNode<TNode>>(input: TNode | undefined | Array<TNode | undefined>): (node: TNode) => TNode;
/**
 * @internal
 */
declare const useDocumentLimitsUpsellContext: () => DocumentLimitUpsellContextValue;
/**
 * @internal
 */
declare const isDocumentLimitError: (error: unknown) => boolean;
/**
 * Resolves the sticky variant short id to a variant definition.
 * Returns undefined while loading (empty byId) or when the variant does not exist.
 *
 * @internal
 */
declare function getSelectedVariant(options: {
  selectedVariantName: string | undefined;
  variantsById: Map<string, SystemVariant>;
}): SystemVariant | undefined;
/**
 * @internal
 */
type PerspectiveNotWriteableReason = 'INSUFFICIENT_DATA' | 'RELEASE_NOT_ACTIVE' | 'PUBLISHED_NOT_WRITEABLE' | 'DRAFTS_NOT_WRITEABLE';
/**
 * Check whether the provided schema type can be written to the provided perspective. This depends
 * on factors such as whether the schema type supports live-editing, whether the perspective
 * represents an inactive release, and whether the perspective represents a special group (e.g.
 * published documents).
 *
 * @internal
 */
declare function isPerspectiveWriteable({ selectedPerspective, isDraftModelEnabled, schemaType }: {
  selectedPerspective: TargetPerspective;
  isDraftModelEnabled: boolean;
  schemaType?: ObjectSchemaType;
}): {
  result: true;
} | {
  result: false;
  reason: PerspectiveNotWriteableReason;
};
interface Props$1 {
  withReleasesToolButton?: boolean;
  menuItemProps?: ReleasesNavMenuItemPropsGetter;
  border?: boolean;
}
/**
 * @internal
 */
declare const ReleasesNav: ComponentType<Props$1>;
interface ExcludedPerspectiveValue {
  excludedPerspectives: string[];
  toggleExcludedPerspective: (perspectiveId: string) => void;
  isPerspectiveExcluded: (perspectiveId: string) => boolean;
}
/**
 * Gets the excluded perspectives.

 * @internal
 */
declare function useExcludedPerspective(): ExcludedPerspectiveValue;
/**
 * @beta
 * Exposes the default perspective based on the draft model enabled status.
 * If the user hasn't opt out from draft, the default perspective is `drafts`
 * Otherwise, the default perspective is `published`
 * @returns The default perspective based on the draft model enabled status.
 */
declare function useGetDefaultPerspective(): 'drafts' | 'published';
/**
 * The first sticky selection document editing still uses.
 *
 * Call sites stay here until editing can take more than one variant.
 * Pass `selectedVariantNames` for the id, or `selectedVariants` for the definition.
 *
 * @internal
 */
declare function getDefaultVariant(selectedVariantNames: readonly string[]): string | undefined;
declare function getDefaultVariant(selectedVariants: readonly (SystemVariant | undefined)[]): SystemVariant | undefined;
/**
 * @beta
 *
 * React hook that returns the current studio perspective and perspective stack.
 *
 * This will use the closest PerspectiveContext provider, which is either the global
 * PerspectiveContext or the DocumentPerspectiveProvider.
 *
 * @returns See {@link PerspectiveContextValue}
 * @example Reading the current perspective stack
 * ```ts
 * function MyComponent() {
 *  const {perspectiveStack} = usePerspective()
 *  // ... do something with the perspective stack , like passing it to the client perspective.
 * }
 * ```
 */
declare function usePerspective(): PerspectiveContextValue;
/**
 * @internal
 */
declare function useSetPerspective(): (releaseId: SystemBundle | ReleaseId | undefined) => void;
/**
 * @internal
 */
type SetVariant = (options: {
  variantId: SystemVariant['_id'] | undefined;
  /** Variant type to update. Defaults to `variant`, preserving other types. */
  type?: string;
  perspective?: SystemBundle | ReleaseId;
} | {
  variantId?: SystemVariant['_id'];
  type?: string;
  perspective: SystemBundle | ReleaseId;
}) => void;
/**
 * React hook to set the variant in the router.
 * Optionally sets the perspective in the same navigation, so both sticky params
 * are updated atomically (a single history entry, no intermediate render).
 * Do not use in production, this can change in any release.
 * @internal
 * @beta
 */
declare function useSetVariant(): SetVariant;
/** @internal */
interface DocumentPreviewPresenceProps {
  presence: Omit<DocumentPresence, 'path'>[];
}
/** @internal */
declare function DocumentPreviewPresence(props: DocumentPreviewPresenceProps): import("react").JSX.Element;
/** @internal */
interface PresenceScopeProps {
  readOnly?: boolean;
  path: Path;
  children: ReactNode;
}
/** @internal */
declare function PresenceScope(props: PresenceScopeProps): import("react").JSX.Element;
/**
 * @internal
 */
declare function Preview(props: RenderPreviewCallbackProps & {
  perspectiveStack?: PerspectiveStack;
  variant?: string;
}): import("react").JSX.Element;
/**
 * This component is responsible for converting renderPreview() calls into an element.
 * It:
 * - subscribes to "prepared" preview value as long as the element is visible on screen
 * - resolves the configured preview component for the schema type
 * - prepares "preview"-props and passes this to the configured preview component
 * @internal
 * */
declare function PreviewLoader(props: RenderPreviewCallbackProps & {
  component: ComponentType<Omit<PreviewProps, 'renderDefault'>>;
  perspectiveStack?: PerspectiveStack;
  variant?: string;
}): React.JSX.Element;
/** @internal */
interface SanityDefaultPreviewProps extends Omit<PreviewProps, 'renderDefault'> {
  error?: Error | null;
  icon?: ElementType | false;
  tooltip?: ReactNode;
}
/**
 * Used in cases where no custom preview component is provided
 * @internal
 * */
declare const SanityDefaultPreview: import("react").MemoExoticComponent<(props: SanityDefaultPreviewProps) => React.JSX.Element>;
/**
 * @internal
 * @beta
 *
 * Observes a document by its ID and returns the document and loading state
 * it will listen to the document changes.
 */
declare function useUnstableObserveDocument<T extends SanityDocument>(documentId: string, apiConfig?: ObserveDocumentAPIConfig): {
  document: T | null;
  loading: boolean;
  error: unknown;
};
/**
 * @deprecated Use `useUnstableObserveDocument` instead
 * @internal
 * @beta
 */
declare const unstable_useObserveDocument: (args: Parameters<typeof useUnstableObserveDocument>) => {
  document: SanityDocument | null;
  loading: boolean;
  error: unknown;
};
/**
 * @internal
 * @deprecated use useValuePreview instead
 */
declare const unstable_useValuePreview: typeof useValuePreview;
interface State {
  isLoading: boolean;
  error?: Error;
  value?: PreviewValue;
}
/**
 * @internal
 */
declare function useValuePreview(props: {
  enabled?: boolean;
  ordering?: SortOrdering;
  schemaType?: SchemaType;
  value: unknown | undefined;
  perspectiveStack?: PerspectiveStack;
  /**
   * The variant to preview the value as seen through, as a bare variant id.
   *
   * The variant travels with the perspective: when no `perspectiveStack` is given, both default to
   * the current selection in the perspective context. When a `perspectiveStack` is given, the
   * caller is previewing a specific document version and only the variant it passes here is used.
   */
  variant?: string;
}): State;
/** @internal */
declare function getPreviewPaths(preview: PreviewableType['preview']): PreviewPath[] | undefined;
/**
 * @internal
 */
type Sources = {
  /**
   * Preview snapshot with current perspective applied
   * This takes priority of original and fallback
   */
  snapshot?: Partial<SanityDocument> | PreviewValue | null | undefined;
  /**
   * Preview of the original document (e.g. without current perspective applied)
   */
  original?: Partial<SanityDocument> | PreviewValue | null | undefined;
  /**
   * last resort fallback in case we don't have anything to preview
   * this can be a hard-coded preview value, or a document stub
   */
  fallback?: Partial<SanityDocument> | PreviewValue;
};
/**
 * Obtain document preview values used in <SanityPreview> and <SanityDefaultPreview> components.
 * Also displays fallback values if the document cannot be found.
 *
 * @internal
 */
declare function getPreviewValueWithFallback({ snapshot, original, fallback }: Sources): Partial<SanityDocument> | PreviewValue | {
  title: import("react").JSX.Element;
  subtitle: import("react").JSX.Element;
  media: () => import("react").JSX.Element;
};
/** @internal */
declare function prepareForPreview(rawValue: unknown, type: PreviewableType, viewOptions?: PrepareViewOptions): PreviewValue & {
  _createdAt?: string;
  _updatedAt?: string;
};
/**
 * @internal
 */
declare function Chip(props: ComponentProps<typeof Button>): import("react").JSX.Element;
/**
 * @internal
 */
declare const VersionChip: import("react").MemoExoticComponent<(props: {
  disabled?: boolean;
  selected: boolean;
  tooltipContent?: ReactNode;
  onClick: () => void;
  text: string;
  contextMenuPortal?: boolean;
  tone: BadgeTone;
  locked?: boolean;
  onCopyToDraftsComplete?: () => void;
  contextValues: {
    documentGroupId: string;
    versionId: string;
    documentType: string;
    releases: ReleaseDocument[];
    releasesLoading: boolean;
    bundleId: string;
    isVersion: boolean;
    disabled?: boolean;
    isGoingToUnpublish?: boolean;
    release?: ReleaseDocument;
  };
}) => import("react").JSX.Element>;
type IconSize = 'default' | 'small';
/** @internal */
type ReleaseAvatarIconProps = {
  release: TargetPerspective;
  tone?: never;
  releaseType?: never;
  size?: IconSize;
  fontSize?: IconProps['size'];
} | {
  releaseType: ReleaseType;
  tone?: never;
  release?: never;
  size?: IconSize;
  fontSize?: IconProps['size'];
} | {
  /**
   * @deprecated - Prefer `release` or `releaseType`.
   */
  tone: BadgeTone;
  release?: never;
  releaseType?: never;
  size?: IconSize;
  fontSize?: IconProps['size'];
};
declare const ReleaseAvatarIcon: ({ tone, release, releaseType, size, fontSize }: ReleaseAvatarIconProps) => import("react").JSX.Element;
declare function ReleaseAvatar({ padding, ...iconProps }: ReleaseAvatarIconProps & {
  padding?: Space;
}): React.JSX.Element;
/** @internal */
interface ReleaseTitleDetails {
  displayTitle: string;
  fullTitle: string;
  isTruncated: boolean;
}
/** @internal */
interface ReleaseTitleProps {
  title: string | undefined;
  fallback: string;
  enableTooltip?: boolean;
  tooltipMaxWidth?: string;
  children?: (details: ReleaseTitleDetails) => ReactElement;
  textProps?: Omit<TextProps, 'children'> & {
    style?: CSSProperties;
  };
}
/** @internal */
declare function ReleaseTitle(props: ReleaseTitleProps): ReactNode;
/**
 * @internal
 */
declare function VersionInlineBadge(props: ComponentProps<'span'> & {
  $tone?: BadgeTone;
}): import("react").JSX.Element;
/**
 * @internal
 */
declare const getVersionInlineBadge: (release?: TargetPerspective) => FC<{
  children?: import("react").ReactNode | undefined;
}>;
interface DocumentPerspectiveProps {
  documentId: string;
}
interface DocumentPerspectiveState {
  data: string[];
  versions: VersionInfoDocumentStub[];
  error?: unknown;
  loading: boolean;
}
/**
 * Fetches the document versions for a given document
 *
 * @param props - document Id of the document (might include release id)
 * @returns - data: document versions, loading, errors
 * @hidden
 * @beta
 */
declare function useDocumentVersions(props: DocumentPerspectiveProps): DocumentPerspectiveState;
interface useDocumentVersionTypeSortedListState {
  sortedDocumentList: ReleaseDocument[];
}
/**
 * Fetches the document versions for a given document and sorts them by release type
 *
 * @param documentId - document id related to the document version list
 * @returns object with sortedDocumentList
 *
 * @beta
 */
declare const useDocumentVersionTypeSortedList: ({ documentId }: {
  documentId: string;
}) => useDocumentVersionTypeSortedListState;
/**
 * Returns a function that formats a release's publish date in the studio's
 * selected content-releases timezone (e.g. "today at 10:20 AM"). The returned
 * function is safe to call inside conditional JSX.
 *
 * @internal
 */
declare function useFormatRelativeLocalePublishDate(): (release: ReleaseDocument) => string;
/** @internal */
declare const useIsReleaseActive: () => boolean;
/**
 * Returns a boolean if the document has only versions
 *
 * @param documentId - document id related to the document version list
 * @returns if the document has only versions
 *
 * @beta
 */
declare const useOnlyHasVersions: ({ documentId }: {
  documentId: string;
}) => boolean;
interface CreateVersionOptions {
  /**
   * Whether to navigate to the created version's perspective after creation.
   * Defaults to `true`. Callers that handle navigation themselves (e.g. to
   * also update the variant sticky param) should pass `false`.
   */
  navigate?: boolean;
}
interface VersionOperationsValue {
  createVersion: (releaseId: ReleaseId, documentId: string, options?: CreateVersionOptions) => Promise<void>;
  /**
   * @deprecated use `useDocumentOperation(publishedId, type, releaseId).discardChanges` instead
   * which routes release versions through the same operation pipeline as draft and published edits.
   *
   * Kept for backwards compatibility
   */
  discardVersion: (releaseId: string, documentId: string) => Promise<SingleActionResult>;
  /**
   * @deprecated use `useDocumentOperation(publishedId, type, releaseId).unpublish` instead
   * which routes release versions through the same operation pipeline as draft and published edits.
   *
   * Kept for backwards compatibility
   */
  unpublishVersion: (documentId: string) => Promise<SingleActionResult>;
  revertUnpublishVersion: (documentId: string) => Promise<SingleActionResult>;
}
/** @internal */
declare function useVersionOperations(): VersionOperationsValue;
/**
 * Sorts releases by their release type and created date.
 * @internal
 */
declare function sortReleases(releases?: ReleaseDocument[]): ReleaseDocument[];
/**
 * @internal
 */
declare const RELEASES_INTENT = "release";
interface ReleasesState {
  /**
   * Sorted array of releases, excluding archived releases
   */
  data: ReleaseDocument[];
  error?: Error;
  loading: boolean;
  dispatch: (event: ReleasesReducerAction) => void;
  byId: Map<string, ReleaseDocument>;
}
/**
 * Hook to get the (non archived, non published) active releases
 * @internal
 */
declare function useActiveReleases(): ReleasesState;
/**
 * Gets all releases including archived and published releases
 * @internal
 */
declare function useAllReleases(): {
  data: ReleaseDocument[];
  error?: Error;
  loading: boolean;
  map: Map<string, ReleaseDocument>;
};
/**
 * @internal
 */
declare function useArchivedReleases(): {
  data: ReleaseDocument[];
  error?: Error;
  loading: boolean;
};
/**
 * Takes a document id, and returns information about what other versions of the document currently exists.
 *
 * @param documentId - The document id. Should be the published id
 * @deprecated Use {@link useDocumentVersions} instead.
 */
declare function useDocumentVersionInfo(documentId: string): {
  isLoading: boolean;
  draft: VersionInfoDocumentStub | undefined;
  published: VersionInfoDocumentStub | undefined;
  versions: Record<string, VersionInfoDocumentStub | undefined>;
};
/**
 * Gets all the releases ids
 * @internal
 */
declare function useReleasesIds(releases: ReleaseDocument[]): {
  releasesIds: string[];
};
/**
 * @internal
 */
declare const LATEST: 'drafts';
/**
 * @internal
 */
declare const PUBLISHED: 'published';
/**
 * Builds the release document id (`_.releases.<releaseId>`) from a release id.
 *
 * @internal
 */
declare function getReleaseDocumentIdFromReleaseId(releaseId: string): string;
/**
 * @internal
 * @param releaseDocumentId - the document id of the release
 */
declare function getReleaseIdFromReleaseDocumentId(releaseDocumentId: string): ReleaseId;
/** @internal */
declare function getReleaseTone(release: TargetPerspective): BadgeTone;
/**
 * checks if the document has been set for unpublishing
 * @internal
 *
 * @param document - sanity document
 * @returns boolean if the system delete is set
 */
declare function isGoingToUnpublish(document: SanityDocument$1 | SanityDocumentLike): boolean;
/**
 * @internal This is the client options used for the releases studio client, using the `X` API version for now
 * Will change to a specific version soon.
 * TODO: Remove after API version is stable and support releases
 */
declare const RELEASES_STUDIO_CLIENT_OPTIONS: SourceClientOptions;
/**
 * @internal Checks if the perspective is a release perspective
 * TODO: Remove after API version is stable and support releases
 */
declare const isReleasePerspective: (perspective: ClientPerspective | undefined | string | string[]) => boolean;
/**
 * @beta
 * @param documentId - The document id, e.g. `my-document-id` or `drafts.my-document-id` or `summer.my-document-id`
 * @param perspective - The current perspective, e.g. `release.summer` or undefined, it can be obtained from `useRouter().stickyParams.perspective`
 * @returns boolean - `true` if the document is in the current perspective.
 * e.g:
 * - document: `summer.my-document-id`, perspective: `release.summer` : **true**
 * - document: `my-document-id`, perspective: `release.summer` : **false**
 * - document: `summer.my-document-id`perspective: `release.winter` : **false**
 * - document: `summer.my-document-id`, perspective: `undefined` : **false**
 * - document: `my-document-id`, perspective: `undefined` : **true**
 * - document: `drafts.my-document-id`, perspective: `undefined` : **true**
 */
declare function getDocumentIsInPerspective(documentId: string, perspective: string | undefined): boolean;
/**
 * Formats a release's publish date as a locale-aware relative string. `timeZone`
 * defaults to the host runtime's TZ; inside React components, prefer
 * `useFormatRelativeLocalePublishDate` to bind the studio's selected timezone.
 *
 * @internal
 */
declare function formatRelativeLocalePublishDate(release: ReleaseDocument, timeZone?: string): string;
/** @internal */
declare function isPublishedPerspective(perspective: TargetPerspective | string): perspective is 'published';
/** @internal */
declare function isDraftPerspective(perspective: TargetPerspective | string): perspective is 'drafts';
/** @internal */
declare function isReleaseScheduledOrScheduling(release: ReleaseDocument): boolean;
interface Props {
  onChange?: (formData: ScheduleFormData) => void;
  value?: ScheduleFormData | null;
}
/**
 * Form for editing a schedule for a document when scheduled publishing is enabled.
 * @deprecated we will be dropping support for scheduled publishing on a future major version
 * @internal
 */
declare function EditScheduleForm(props: PropsWithChildren<Props>): import("react").JSX.Element;
/**
 * @deprecated we will be dropping support for scheduled publishing on a future major version
 * @beta
 */
declare const useScheduleAction: DocumentActionComponent;
/**
 * @deprecated we will be dropping support for scheduled publishing on a future major version
 * @beta
 */
declare const ScheduledBadge: DocumentBadgeComponent;
/**
 * @hidden
 * @beta */
declare function createSchema(schemaDef: {
  name: string;
  types: any[];
}): Schema;
/**
 * Get the most specific defined title of a schema type
 * If not set directly on the given type, it will traverse up the tree until it
 * finds one, falling back to the _name_ of the type.
 *
 * @param type - The schema type to get the title of
 * @returns A title, alternatively the schema type _name_
 * @internal
 */
declare function getSchemaTypeTitle(type: SchemaType): string;
/**
 * @internal
 *
 * Options controlling error reporting behaviour while walking a sort
 * field path against the schema.
 */
interface CompileFieldPathOptions {
  /**
   * When `true`, unknown fields / unsupported path shapes throw. When
   * `false`, they `console.warn` (deduplicated) and the partial result
   * is returned.
   */
  strict?: boolean;
  /**
   * Optional human-readable name of the ordering, used in error
   * messages to help developers locate the misconfigured ordering.
   */
  orderingName?: string;
  /**
   * Internal flag used while probing multi-target references. When
   * `true`, resolution failures are silent — neither thrown nor
   * warned. Callers use this to try multiple reference targets
   * without surfacing per-target failures.
   *
   * @internal
   */
  silent?: boolean;
}
/**
 * @internal
 *
 * Compiles a single sort field path against the given schema type
 * into a GROQ expression that can be used inside a projection.
 *
 * Returns the schema-aware GROQ expression as a plain string. Every
 * compiled expression is intended to be projected into the
 * top-level `orderings[N]` array and addressed via that positional
 * index.
 *
 * Examples:
 * - `title` → `title`
 * - `author.name` (where `author` is a reference) → `author->name`
 * - `items[0].value` (where `items[]` is an array of references) →
 *   `items[0]->value`
 * - `items[_key=="abc"].value` → `items[_key=="abc"]->value`
 * - `translations.se` (where `translations` is an object) →
 *   `translations.se`
 * - `string::length(title)` → `string::length(title)` (treated as
 *   literal GROQ since it isn't a schema-walkable path)
 *
 * If `schemaType` is `undefined` (e.g. cross-dataset, or the field
 * is a built-in like `_id`), the path is treated as a literal GROQ
 * expression — no inference is performed.
 *
 * If a path segment cannot be resolved against the schema, the
 * function reports an error via `reportError` (throwing in strict
 * mode, warning otherwise) and returns the input `fieldPath` as-is.
 */
declare function compileFieldPath(schemaType: SchemaType | CrossDatasetType | undefined, fieldPath: string, options?: CompileFieldPathOptions): string;
/**
 * Get all defined document types from the schema that are searchable
 *
 * @param schema - The schema to get searchable types from
 * @param explicitlyAllowedTypes - Array of type names to explicitly allow, even if they are otherwise ignored. This is useful for cases where you want to allow say `sanity.imageAsset` explicitly, or an object type that was _previously_ defined as a document type, and thus still have documents.
 *
 * @internal
 */
declare const getSearchableTypes: (schema: Schema, explicitlyAllowedTypes?: string[]) => ObjectSchemaType[];
/**
 * Check if a perspective is 'raw'
 *
 * @param perspective - the list with perspective ids or a simple perspective id
 * @returns true if the perspective is 'raw'
 * @deprecated – use perspective === 'raw' instead
 * @internal
 */
declare function isPerspectiveRaw(perspective: string[] | string | undefined): boolean;
/** @internal */
declare const createSearch: SearchStrategyFactory<WeightedSearchResults | Groq2024SearchResults>;
/**
 * @internal
 * @hidden
 */
interface SearchMachineContext<TQuery, TResult> {
  debounceMs: number;
  error: Error | null;
  query: TQuery | null;
  result: TResult | null;
  /** Whether the currently debounced query interrupted a running search. */
  searchInterrupted: boolean;
  /** The query of the last search that settled (succeeded, failed, or was skipped). */
  settledQuery: TQuery | null;
}
/**
 * @internal
 * @hidden
 */
type SearchMachineEvent<TQuery> = {
  type: 'search';
  query: TQuery;
};
/**
 * @internal
 * @hidden
 */
type SearchMachineEmitted<TResult> = {
  type: 'search started';
} | {
  type: 'search completed';
  result: TResult;
} | {
  type: 'search failed';
  error: Error;
} | {
  type: 'search skipped';
};
/**
 * @internal
 * @hidden
 */
interface SearchMachineInput {
  debounceMs?: number;
}
/**
 * A state machine for query-driven searches: accept a query, optionally
 * dedupe and debounce it, run one search at a time, and expose the outcome.
 *
 * Cancellation is structural: a new `search` event exits the `searching`
 * state, which stops the invoked actor and unsubscribes its observable, so
 * only the latest query's result can ever land. Search observables do not
 * have to complete: the first emission moves `searching.pending` to
 * `searching.streaming` while the subscription stays open, so live sources
 * keep updating `result` until the next query replaces them. Consumers
 * parameterize behavior through implementations rather than configuration:
 *
 * - `search` (actor): the fetch, given `{query}`. Provided per consumer, and
 *   `@xstate/react` keeps provided implementations render-fresh, so closures
 *   over props such as `onSearch` always call the latest render's version.
 * - `is same query` (guard): when true, the event is swallowed. Defaults to
 *   never, which matches consumers without `distinctUntilChanged` semantics.
 * - `should search` (guard): gates the fetch after the debounce. When false
 *   the machine reports `skipped` instead of invoking the actor.
 * - `debounce` (delay): defaults to `debounceMs` from input; consumers with
 *   per-event debounce read it from context.
 *
 * @internal
 * @hidden
 */
declare function defineSearchMachine<TQuery, TResult>(): import("xstate").StateMachine<SearchMachineContext<TQuery, TResult>, SearchMachineEvent<TQuery>, {
  [x: string]: import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<TResult, {
    query: TQuery;
  }, import("xstate").EventObject>> | undefined;
}, {
  src: "search";
  logic: import("xstate").ObservableActorLogic<TResult, {
    query: TQuery;
  }, import("xstate").EventObject>;
  id: string | undefined;
}, never, {
  type: "is same query";
  params: unknown;
} | {
  type: "should search";
  params: unknown;
}, "debounce", "debouncing" | "failure" | "idle" | "skipped" | "success" | {
  searching: "pending" | "streaming";
}, string, SearchMachineInput, import("xstate").NonReducibleUnknown, {
  type: 'search started';
} | {
  type: 'search completed';
  result: TResult;
} | {
  type: 'search failed';
  error: Error;
} | {
  type: 'search skipped';
}, import("xstate").MetaObject, {
  states: {
    readonly idle: {};
    readonly debouncing: {};
    readonly searching: {
      states: {
        pending: {};
        streaming: {};
      };
    };
    readonly success: {};
    readonly failure: {};
    readonly skipped: {};
  };
}, import("xstate").MetaObject>;
/**
 * @internal
 * @hidden
 */
interface SearchMachineState<THit> {
  hits: THit[];
  isLoading: boolean;
  searchString?: string;
}
/**
 * @internal
 * @hidden
 */
interface UseSearchMachineOptions<THit> {
  search: (query: string) => Observable<THit[]>;
  /** Swallow a query identical to the previously accepted one. */
  distinct?: boolean;
  debounceMs?: number;
  onSearchFailed?: (error: Error) => void;
}
/**
 * Binds {@link defineSearchMachine} to the string-query search inputs.
 *
 * `search` and `onSearchFailed` may change identity every render: provided
 * actor implementations are kept render-fresh by `@xstate/react`, and the
 * failure callback is read through an effect event.
 *
 * @internal
 * @hidden
 */
declare function useSearchMachine<THit>(options: UseSearchMachineOptions<THit>): {
  searchState: SearchMachineState<THit>;
  handleQueryChange: (query: string | null) => void;
};
interface SingleDocReleaseProviderProps {
  children: React.ReactNode;
  onSetScheduledDraftPerspective: (releaseId: string) => void;
}
/**
 * Provider for the single doc release context.
 * @internal
 */
declare function SingleDocReleaseProvider({ children, onSetScheduledDraftPerspective }: SingleDocReleaseProviderProps): import("react").JSX.Element;
/**
 * Hook to get the single doc release context
 * @internal
 */
declare function useSingleDocRelease(): SingleDocReleaseContextValue;
/**
 * Hook to check if the current perspective is viewing a paused scheduled draft.
 *
 * @returns Object containing isPaused boolean and the current release document (if any)
 * @internal
 */
declare function usePausedScheduledDraft(): {
  isPaused: boolean;
  currentRelease: ReleaseDocument | undefined;
};
interface UsePauseToEditScheduledDraftOptions {
  release: ReleaseDocument | undefined;
  documentTitle?: string;
  onComplete?: () => void;
}
interface UsePauseToEditScheduledDraftValue {
  pauseToEdit: () => Promise<void>;
  isPausing: boolean;
}
/**
 * Hook that pauses a scheduled draft so it can be edited.
 *
 * @internal
 */
declare function usePauseToEditScheduledDraft(options: UsePauseToEditScheduledDraftOptions): UsePauseToEditScheduledDraftValue;
/**
 * Hook to get the first document from a scheduled draft release bundle.
 *
 * @internal
 */
declare function useScheduledDraftDocument(releaseDocumentId: string | undefined, options?: {
  includePreview?: boolean;
}): {
  firstDocument: SanityDocument$1 | undefined;
  firstDocumentPreview: PreviewValue | undefined;
  firstDocumentValidation: ValidationMarker[] | undefined;
  documentsCount: number;
  loading: boolean;
  error: Error | null;
  previewLoading: boolean;
};
/**
 * @internal
 * @returns boolean indicating if the scheduled drafts feature is enabled
 */
declare function useScheduledDraftsEnabled(): boolean;
/**
 * Returns whether the given version name (e.g. from `getVersionFromId`) is an
 * agent bundle name (starts with `agent-`).
 *
 * @internal
 */
declare function isAgentBundleName(versionName: unknown): boolean;
/**
 * Display overrides for an agent bundle version chip.
 *
 * @internal
 */
type AgentVersionDisplay = {
  displayName: string;
  tone: BadgeTone;
};
/**
 * Filters a list of version document IDs and provides display metadata for
 * agent bundles.
 *
 * - Other users' `agent-*` versions are removed from the returned list.
 * - The current user's `agent-*` versions are kept and can be resolved to
 *   display overrides via `getVersionDisplay`.
 * - Non-agent versions pass through unchanged.
 * - While the SSE connection is loading, only the currently active agent
 *   bundle (if any) is kept; all others are hidden until ownership is confirmed.
 *
 * Call this hook once and thread the results down — don't call it per-item.
 *
 * @internal
 */
declare function useAgentVersionDisplay(versionIds: string[], activeBundleId?: string): {
  /** Version IDs with other users' agent bundles removed. */
  filteredVersionIds: string[];
  /**
   * Returns display overrides for a version document ID if it's the current
   * user's agent bundle, or `null` for all other versions.
   */
  getVersionDisplay: (versionDocumentId: string) => AgentVersionDisplay | null;
};
/** @internal */
interface MockAuthStoreOptions {
  currentUser: CurrentUser | null;
  client: SanityClient;
}
/**
 * Creates a mock `AuthStore` (for testing) that emits an `AuthState` derived
 * from the `client` and `currentUser` given.
 *
 * @internal
 */
declare function createMockAuthStore({ client, currentUser }: MockAuthStoreOptions): AuthStore;
/**
 * Duck-type check for whether or not this looks like an auth store
 *
 * @param maybeStore - Item to check if matches the AuthStore interface
 * @returns True if auth store, false otherwise
 * @internal
 */
declare function isAuthStore(maybeStore: unknown): maybeStore is AuthStore;
/**
 * Check whether the provided login method is compatible with cookieless auth, e.g. whether any
 * authentication token found in localStorage should be acknowledged.
 *
 * @internal
 */
declare function isCookielessCompatibleLoginMethod(loginMethod: LoginMethod): loginMethod is CookielessCompatibleLoginMethod;
/** @internal */
interface ConnectionStatusStore {
  connectionStatus$: Observable<ConnectionStatus>;
}
/** @internal */
type ConnectingStatus = {
  type: 'connecting';
};
/** @internal */
type ErrorStatus = {
  type: 'error';
  error: Error;
  attemptNo: number;
  isOffline: boolean;
  retryAt: Date;
};
/** @internal */
type RetryingStatus = {
  type: 'retrying';
};
/** @internal */
type ConnectedStatus = {
  type: 'connected';
  lastHeartbeat: Date;
};
/** @internal */
declare const CONNECTING: ConnectingStatus;
/** @internal */
type ConnectionStatus = ConnectingStatus | ErrorStatus | ConnectedStatus | RetryingStatus;
/** @internal */
declare const onRetry: () => void;
/** @internal */
interface ConnectionStatusStoreOptions {
  bifur: BifurClient;
}
/**
 * This is the beginning of what should be the data store tracking connection status in the Sanity studio.
 *
 * @internal
 */
declare function createConnectionStatusStore({ bifur }: ConnectionStatusStoreOptions): ConnectionStatusStore;
interface ComlinkStore {
  node?: Node<FrameMessages, WindowMessages>;
  /** Idempotent. Call it from an effect: a render React abandons must not leave the node held. */
  start: () => void;
}
type JsonObject = { [Key in string]: KeyValueStoreValue; } & { [Key in string]?: KeyValueStoreValue | undefined; };
type JsonArray = KeyValueStoreValue[] | readonly KeyValueStoreValue[];
type JsonPrimitive = string | number | boolean | null;
/** @internal */
type KeyValueStoreValue = JsonPrimitive | JsonObject | JsonArray;
/** @internal */
interface KeyValueStore {
  getKey(key: string): Observable<KeyValueStoreValue | null>;
  setKey(key: string, value: KeyValueStoreValue): Promise<KeyValueStoreValue>;
}
/** @internal */
interface UserStoreOptions {
  client: SanityClient;
  currentUser: CurrentUser | null;
}
/**
 * @hidden
 * @beta */
interface UserStore {
  getUser(userId: string): Promise<User | null>;
  getUsers(userIds: string[]): Promise<User[]>;
}
/**
 * Given a `client` and a `currentUser` creates a datastore that handles
 * fetching, batch fetching, and caching users.
 *
 * @internal
 */
declare function createUserStore({ client: _client, currentUser }: UserStoreOptions): UserStore;
/**
 * @hidden
 * @beta */
interface PresenceStore {
  /**
   * @internal
   */
  documentPresence: (documentId: string, options?: {
    excludeVersions?: boolean;
  }) => Observable<DocumentPresence[]>;
  /**
   * @internal
   */
  globalPresence$: Observable<GlobalPresence[]>;
  /**
   * @internal
   */
  reportLocations: (locations: PresenceLocation[]) => Observable<void>;
  /**
   * @internal
   */
  setLocation: (nextLocation: PresenceLocation[]) => void;
  /**
   * @internal
   */
  debugPresenceParam$: Observable<string[]>;
  /**
   * Debug helpers for exercising presence from a single browser. Fake sessions go through the
   * same code path as real ones (user lookup, document presence, form routing, overlay).
   * @internal
   */
  debug: PresenceDebugApi;
}
/** @internal */
interface PresenceDebugApi {
  /** The locations this session currently reports as its own, including any editor selection */
  ownLocation$: Observable<PresenceLocation[]>;
  /** Shows `userId` as present at `locations`; calling it again for the same user moves them */
  fakePresence: (userId: string, locations: PresenceLocation[]) => void;
  /** Removes the fake presence of `userId`, or of every faked user when omitted */
  removeFakePresence: (userId?: string) => void;
}
/** @internal */
declare const SESSION_ID: string;
/** @internal */
declare function createPresenceStore(context: {
  bifur: BifurClient;
  connectionStatusStore: ConnectionStatusStore;
  userStore: UserStore;
}): PresenceStore;
/**
 * @hidden
 * @beta */
declare function useUserStore(): UserStore;
/**
 * @hidden
 * @beta */
declare function useGrantsStore(): GrantsStore;
/**
 * @hidden
 * @beta */
declare function useHistoryStore(): HistoryStore;
/**
 * @hidden
 * @beta */
declare function useDocumentPreviewStore(): DocumentPreviewStore;
/**
 * @hidden
 * @beta */
declare function useDocumentStore(): DocumentStore;
/** @internal */
declare function useConnectionStatusStore(): ConnectionStatusStore;
/**
 * @hidden
 * @beta */
declare function usePresenceStore(): PresenceStore;
/**
 * @hidden
 * @beta */
declare function useProjectStore(): ProjectStore;
/**
 * Returns a KeyValueStore instance for storing user preferences.
 *
 * The store is cached by project identity (projectId + apiHost) rather than
 * workspace, because the /users/me/keyvalue endpoint is project-scoped -
 * user preferences are shared across all datasets within a project.
 *
 * @internal
 */
declare function useKeyValueStore(): KeyValueStore;
/** @internal */
declare function useRenderingContextStore(): RenderingContextStore;
/** @internal */
declare function useComlinkStore(): ComlinkStore;
/** @internal */
declare const remoteSnapshots: (client: SanityClient, idPair: IdPair, typeName: string, _serverActionsEnabled?: Observable<boolean>, pairListenerOptions?: DocumentStoreExtraOptions) => Observable<RemoteSnapshotVersionEvent>;
/** @internal */
declare const validation: (ctx: {
  client: SanityClient;
  getClient: (options: SourceClientOptions) => SanityClient;
  observeDocumentPairAvailability: (id: string) => Observable<DraftsModelDocumentAvailability>;
  schema: Schema;
  i18n: LocaleSource;
  /**
   * @deprecated Does nothing. Preserved to avoid breaking changes.
   * Will be removed in the next major version.
   */
  serverActionsEnabled?: Observable<boolean>;
  pairListenerOptions?: DocumentStoreExtraOptions;
  currentUser?: Omit<CurrentUser, 'role'> | null;
}, { draftId, publishedId, versionId }: IdPair, typeName: string, validationTarget: DocumentVariantType, validatePublishedReferences: boolean) => Observable<ValidationStatus>;
/** @internal */
interface DocumentTypeResolveState {
  isLoaded: boolean;
  documentType: string | undefined;
}
/** @internal */
declare function useDocumentType(documentId: string, specifiedType?: string): DocumentTypeResolveState;
/** @internal */
type LoadableState<T> = LoadingState | LoadedState<T> | ErrorState;
/** @internal */
interface LoadingState {
  value: undefined;
  error: null;
  isLoading: true;
}
/** @internal */
interface LoadedState<T> {
  value: T;
  error: null;
  isLoading: false;
}
/** @internal */
interface ErrorState {
  value: undefined;
  error: Error;
  isLoading: false;
}
/** @internal */
declare function useLoadable<T>(value$: Observable<T>): LoadableState<T | undefined>;
/** @internal */
declare function useLoadable<T>(value$: Observable<T>, initialValue: T): LoadableState<T>;
/** @internal */
declare function asLoadable<T>(): OperatorFunction<T, LoadableState<T>>;
/** @internal */
declare function useDocumentValues<T = Record<string, unknown>>(documentId: string, paths: string[]): LoadableState<T | undefined>;
/**
 * Determine whether the document represented by the provided `EditState` object has any existing
 * snapshot, meaning a version of the document has been written to the dataset.
 *
 * This is `true` when a document is first created in Studio, but no user action (e.g. editing its
 * value) has caused it to be written to the dataset.
 *
 * This is `undefined` while loading.
 *
 * @returns A boolean reflecting whether any version of the document exists in the dataset, and `undefined` while loading.
 * @internal
 */
declare function isNewDocument(editState: Pick<EditStateFor, 'ready' | 'draft' | 'published' | 'version'> | null): boolean | undefined;
/**
 * Given an `EditState` object targeting the upstream version, select the first relevant document
 * that exists.
 *
 * - This is the version document itself if it exists.
 * - Otherwise, it is the published document.
 * - If neither documents exist, there is no existent upstream version.
 *
 * Unlike in other parts of the codebase, draft versions are never relevant here, because they
 * cannot be the upstream version of another document.
 *
 * @internal
 */
declare function selectUpstreamVersion(upstreamEditState: EditStateFor): SanityDocument | null;
/**
 * @internal
 */
declare function useInitialValue(props: {
  documentId: string;
  documentType: string;
  templateName?: string;
  templateParams?: Record<string, unknown>;
  version?: string;
}): InitialValueState;
/**
 * @internal
 */
declare function useInitialValueResolverContext(): InitialValueResolverContext;
/** @internal */
declare function useResolveInitialValueForType<Params extends Record<string, unknown>>(): (
/**
 * This is the name of the document.
 */
type: SchemaType,
/**
 * Params is a sanity context object passed to every initial value function.
 */
params: Params) => Promise<any>;
interface EventsProviderProps {
  value: EventsStore;
  children: React.ReactNode;
}
/**
 * @internal
 */
declare function EventsProvider({ value, children }: EventsProviderProps): import("react").JSX.Element;
/**
 * @internal
 */
declare function useEvents(): EventsStore;
/**
 * React entry point of the events store: creates a `createEventsStore` instance for the document
 * (recreated when client/document/liveEdit change), subscribes the remote-transactions
 * listener for the component lifetime, and resolves the `rev`/`since` selection against the
 * loaded events.
 *
 * The resolution logic lives in `resolveRevisions.ts`:
 * - `rev` → `revisionId` via {@link resolveRevisionId}, which receives `loadMoreEvents` as its
 *   `onLoadMore` callback: unresolved `@release:` revs keep paginating until the release's
 *   publish event is loaded — with no termination if it never appears (known issue).
 * - `since` → `sinceId` via {@link resolveSinceId}, only meaningful with a revision to compare
 *   against.
 * - `findRangeForRevision(nextRev)` / `findRangeForSince(nextSince)` compute the `[since, rev]`
 *   pair to write to the URL when the user picks a new revision/since in the timeline, clearing
 *   whichever side would make the range inverted (since must be older than rev).
 *
 * Also exposes per-revision document fetching (`getDocumentAtRevision`, plus resolved `revision` /
 * `sinceRevision` snapshots), `getChangesList` (diff between the resolved revisions),
 * `expandEvent`, `loadMoreEvents` and `lastNonDeletedRevId` (newest event that isn't a delete —
 * used to restore deleted documents).
 *
 * @internal
 */
declare function useEventsStore({ documentId, documentType, rev, since }: {
  documentId: string | undefined;
  documentType: string;
  rev?: string | '@lastEdited' | '@lastPublished';
  since?: string | '@lastPublished';
}): EventsStore;
/** @internal */
type DocumentPermission = 'delete' | 'discardDraft' | 'discardVersion' | 'publish' | 'unpublish' | 'update' | 'duplicate';
/** @internal */
interface DocumentPairPermissionsOptions {
  client: SanityClient;
  schema: Schema;
  grantsStore: GrantsStore;
  id: string;
  type: string;
  version?: string;
  permission: DocumentPermission;
  /**
   * Identity of the current user. Included in the memoization key so that an
   * in-place user switch (same project, no reload) does not replay a previous
   * user's grants from the module-level memo cache.
   */
  userId?: string;
  /**
   * @deprecated Does nothing. Preserved to avoid breaking changes.
   * Will be removed in the next major version.
   */
  serverActionsEnabled?: Observable<boolean>;
  pairListenerOptions?: DocumentStoreExtraOptions;
}
declare const getDocumentPairPermissions: (options: DocumentPairPermissionsOptions) => Observable<PermissionCheckResult>;
/**
 * Gets document pair permissions based on a document ID and a type.
 *
 * This permissions API is a high-level permissions API that is draft-model
 * aware. In order to determine whether or not the user has the given
 * permission, both the draft and published documents are pulled and run through
 * all of the user's grants. If any pre or post conditions fail a permissions
 * checks, the operations will not be granted.
 *
 * The operations this hook accepts are only relevant to document pairs. E.g.
 * `'create'` is not included as an operation because it's not possible to tell
 * if a document can be created by only using the initial ID and type because an
 * initial template value may not have a matching grant (e.g. locked-document
 * pattern `!locked`). In contrast, the operation `'duplicate'` is supported
 * because the draft value of the document can be live queried and checked for
 * matching grants.
 *
 * Note: for live-edit documents, non-applicable operations (e.g. publish) will
 * return as true.
 *
 * @see useDocumentValuePermissions
 *
 * @internal
 */
declare const useDocumentPairPermissionsFromHookFactory: ReactHook<DocumentPairPermissionsOptions, LoadingTuple<PermissionCheckResult | undefined>>;
/** @internal */
declare function useDocumentPairPermissions({ id, type, version, permission, client: overrideClient, schema: overrideSchema, grantsStore: overrideGrantsStore, pairListenerOptions }: PartialExcept<DocumentPairPermissionsOptions, 'id' | 'type' | 'permission'>): ReturnType<typeof useDocumentPairPermissionsFromHookFactory>;
/** @internal */
interface DocumentValuePermissionsOptions {
  grantsStore: GrantsStore;
  document: Record<string, unknown>;
  permission: DocumentValuePermission;
}
/**
 * Gets permissions based on the value of the document passed into the hook
 * (stateless).
 *
 * Note: this is a lower-level API (compared to `useDocumentPairPermissions`)
 * that is _not_ draft-model aware.
 *
 * As a consequence, the operations it accepts are also low-level. (e.g.
 * `'publish'` permissions can't be determined with this API). This is because
 * it's not possible to tell if a user can do high-level document pair
 * operations on document using only one document value.
 *
 * For example, in order to determine if a user can publish, the current value
 * of the published document needs to be pulled and checked against the user's
 * grants. If there are no matching grants, then it fails the pre-condition and
 * no operation is allowed regardless of the given document.
 *
 * @see useDocumentPairPermissions
 *
 * @internal
 */
declare function getDocumentValuePermissions({ grantsStore, document, permission }: DocumentValuePermissionsOptions): Observable<PermissionCheckResult>;
/** @internal */
declare function useDocumentValuePermissions({ document, permission, grantsStore: specifiedGrantsStore }: PartialExcept<DocumentValuePermissionsOptions, 'permission' | 'document'>): LoadingTuple<PermissionCheckResult | undefined>;
interface GrantsStoreOptionsCurrentUser {
  client: SanityClient;
  /**
   * Optional handler for failures of requests made by the store. When
   * omitted, request failures propagate to the permission streams.
   */
  errorHandler?: StoreRequestErrorHandler;
  /**
   * @deprecated The `currentUser` option is deprecated. Use `userId` instead.
   */
  currentUser: CurrentUser | null;
}
interface GrantsStoreOptionsUserId {
  client: SanityClient;
  /**
   * Optional handler for failures of requests made by the store. When
   * omitted, request failures propagate to the permission streams.
   */
  errorHandler?: StoreRequestErrorHandler;
  userId: string | null;
}
/** @internal */
type GrantsStoreOptions = GrantsStoreOptionsCurrentUser | GrantsStoreOptionsUserId;
/** @internal */
declare function createGrantsStore(opts: GrantsStoreOptions): GrantsStore;
/**
 * @internal
 * Takes a grants object, a permission and a document
 * checks whether the permission is granted for the given document
 */
declare function grantsPermissionOn(userId: string | null, grants: Grant[], permission: DocumentValuePermission, document: SanityDocument | null): Promise<PermissionCheckResult>;
interface UseTimelineControllerOpts {
  documentId: string;
  documentType: string;
  onError?: (err: Error) => void;
  rev?: string;
  since?: string;
}
/**
 * @deprecated Use the events API instead. The legacy document timeline will be removed in the next major version.
 * @internal
 */
interface TimelineState {
  chunks: Chunk[];
  diff: ObjectDiff<Annotation> | null;
  /** null is used here when the chunks hasn't loaded / is not known */
  hasMoreChunks: boolean | null;
  isLoading: boolean;
  /**
   * Whether this timeline is fully loaded and completely empty (true for new documents)
   * It can be `null` when the chunks hasn't loaded / is not known
   */
  isPristine: boolean | null;
  lastNonDeletedRevId: string | null;
  onOlderRevision: boolean;
  realRevChunk: Chunk | null;
  revTime: Chunk | null;
  selectionState: SelectionState;
  sinceAttributes: Record<string, unknown> | null;
  sinceTime: Chunk | null;
  timelineDisplayed: Record<string, unknown> | null;
  timelineReady: boolean;
}
/**
 * @deprecated Use the events API instead. The legacy document timeline will be removed in the next major version.
 * @internal
 */
interface TimelineStore {
  findRangeForRev: TimelineController['findRangeForNewRev'];
  findRangeForSince: TimelineController['findRangeForNewSince'];
  loadMore: () => void;
  getSnapshot: () => TimelineState;
  subscribe: (callback: () => void) => () => void;
}
/**
 * Creates a store which handles the creation of a document Timeline,
 * TimelineController and also fetches pre-requisite document snapshots.
 *
 * `TimelineStore` exposes select TimelineController methods used to query
 * ranges and fetch more transactions. It can also be used with
 * `useSyncExternalStore` to subscribe to selected state changes.
 *
 * @deprecated Use the events API instead. The legacy document timeline will be removed in the next major version.
 * @internal
 * */
declare function useTimelineStore({ documentId, documentType, onError, rev, since }: UseTimelineControllerOpts): TimelineStore;
/**
 * Custom hook which wraps around `useSyncExternalStore`.
 * Accepts a selector function which can be used to opt-in to specific timelineStore updates.
 *
 * @deprecated Use the events API instead. The legacy document timeline will be removed in the next major version.
 * @internal
 */
declare function useTimelineSelector<ReturnValue>(timelineStore: TimelineStore | undefined, selector: (timelineState: TimelineState) => ReturnValue): ReturnValue;
/** @internal */
declare function createKeyValueStore(options: {
  client: SanityClient;
}): KeyValueStore;
/** @internal */
declare function useDocumentPresence(documentId: string): DocumentPresence[];
type GlobalPresenceEntry = Pick<GlobalPresence, 'user' | 'locations'>;
/** @internal */
declare function useGlobalPresence(): GlobalPresenceEntry[];
/**
 * Fetches the project grants for the current user, shared and replayed so all
 * permission checks reuse a single request. Memoized so callers outside the
 * project store (e.g. the schema/manifest upload gate) hit the same cached
 * observable instead of issuing a duplicate `/grants` request.
 *
 * Keyed by project/dataset **and credential** (see `projectRequestKey`),
 * matching the other memoized requests in this module, so a client for a
 * different project/dataset — or a new post-re-auth token — never reuses
 * another's grants.
 *
 * @internal
 */
declare const getProjectGrants: (client: SanityClient) => Observable<ProjectGrants>;
/** @internal */
declare function createProjectStore(context: {
  client: SanityClient;
}): ProjectStore;
/** @internal */
declare function useProject(): ProjectData | null;
/** @internal */
declare function useProjectDatasets(): {
  value: ProjectDatasetData[] | null;
};
/** @internal */
declare function useUser(userId: string): LoadingTuple<User | null | undefined>;
/**
 * Retrieves information about the currently authenticated user.
 *
 * @returns The current user or null if not available.
 *
 * @public
 *
 * @example
 * ```ts
 * const currentUser = useCurrentUser()
 *
 * if (currentUser) {
 *  console.log('Logged in as', currentUser.name)
 *  const department = currentUser.attributes?.find((attr) => attr.key === 'department')
 * }
 * ```
 */
declare function useCurrentUser(): CurrentUser | null;
/** @internal */
interface ActiveWorkspaceMatcherProps {
  children: ReactNode;
  unstable_history?: RouterHistory;
  NotFoundComponent: ComponentType<{
    onNavigateToDefaultWorkspace: () => void;
  }>;
  LoadingComponent: ComponentType;
}
/** @internal */
declare function ActiveWorkspaceMatcher({ children, LoadingComponent, NotFoundComponent, unstable_history: historyProp }: ActiveWorkspaceMatcherProps): import("react").JSX.Element;
/** @internal */
type NormalizedWorkspace = {
  workspace: WorkspacesContextValue[number];
  name?: string | undefined;
  basePath: string;
  basePathRegex: RegExp;
};
/** @internal */
interface MatchWorkspaceOptions {
  workspaces: NormalizedWorkspace[];
  pathname: string;
  basePathRegex: RegExp;
  workspaceAuthStates: WorkspaceAuthStates;
}
/** @internal */
type MatchWorkspaceResult = {
  type: 'match';
  workspace: WorkspacesContextValue[number];
} | {
  type: 'redirect';
  pathname: string;
} | {
  type: 'not-found';
} | {
  type: 'loading';
};
/**
 * Resolves a pathname against the configured workspaces. Returns a match for a
 * known workspace path, a redirect to the first visible workspace when the
 * pathname is the common base path, or not-found otherwise.
 *
 * A pathname that points at a workspace hidden for the current user also
 * redirects to the first visible workspace — the auth flow can return the
 * browser to a URL that was resolved before the user was known (e.g. a hosted
 * studio's `redirectTo`), and that URL may name a workspace the user cannot
 * see. When every workspace is hidden, the hidden match is returned as-is so
 * the caller can render its not-found screen.
 *
 * @internal
 */
declare function matchWorkspace({ pathname, workspaces, basePathRegex, workspaceAuthStates }: MatchWorkspaceOptions): MatchWorkspaceResult;
/** @internal */
declare function useActiveWorkspace(): ActiveWorkspaceMatcherContextValue;
interface AddonDatasetSetupProviderProps {
  children: React.ReactNode;
}
/**
 * This provider sets the addon dataset client, currently called `comments` dataset.
 * It also exposes a `createAddonDataset` function that can be used to create the addon dataset if it does not exist.
 * @beta
 * @hidden
 */
declare function AddonDatasetProvider(props: AddonDatasetSetupProviderProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
/**
 * @beta
 * @hidden
 */
declare function useAddonDataset(): AddonDatasetContextValue;
/** @internal */
interface ColorSchemeProviderProps {
  children: ReactNode;
  onSchemeChange?: (nextScheme: StudioThemeColorSchemeKey) => void;
  scheme?: StudioThemeColorSchemeKey;
}
/** @internal */
declare function ColorSchemeProvider({ children, onSchemeChange, scheme: schemeProp }: ColorSchemeProviderProps): import("react").JSX.Element;
/**
 * Uses useSyncExternalStore to ensure that localStorage is accessed in a SSR hydration compatible way
 * @internal
 */
declare function ColorSchemeLocalStorageProvider({ children, onSchemeChange }: Pick<ColorSchemeProviderProps, 'children' | 'onSchemeChange'>): import("react").JSX.Element;
/**
 * If the `scheme` prop is provided we don't need to setup any logic to handle localStorage
 * @internal
 */
declare function ColorSchemeCustomProvider({ children, onSchemeChange, scheme }: Pick<ColorSchemeProviderProps, 'children' | 'onSchemeChange'> & {
  scheme: StudioThemeColorSchemeKey;
}): React.JSX.Element;
/** @alpha */
declare function useColorSchemeSetValue(): false | ((nextScheme: StudioThemeColorSchemeKey) => void);
/** @internal */
declare function useColorSchemeInternalValue(): StudioThemeColorSchemeKey;
/** @alpha */
declare function useColorSchemeValue(): ThemeColorSchemeKey;
/**
 * @deprecated Use `useColorSchemeValue` or `useColorSchemeSetValue` instead
 * @internal
 */
declare function useColorScheme(): {
  scheme: "dark" | "light";
  setScheme: false | ((nextScheme: StudioThemeColorSchemeKey) => void);
};
interface ColorSchemeOption {
  icon: ComponentType;
  label: string;
  name: StudioThemeColorSchemeKey;
  onSelect: () => void;
  selected: boolean;
  title: string;
}
/**
 * @internal
 */
declare function useColorSchemeOptions(setScheme: (nextScheme: StudioThemeColorSchemeKey) => void, t: TFunction$2<'studio'>): ColorSchemeOption[];
/** @internal */
interface ApiNetworkResourceTiming {
  connectionMs: number;
  decodedBodySizeBytes: number;
  dnsMs: number;
  durationMs: number;
  encodedBodySizeBytes: number;
  initiatorType: string;
  redirectMs: number;
  requestToFirstByteMs: number;
  responseTransferMs: number;
  secureConnectionMs: number;
  serverTiming: {
    description: string;
    durationMs: number;
    name: string;
  }[];
  startTimeMs: number;
  transferSizeBytes: number;
}
/** @internal */
interface ApiNetworkDiagnostic {
  durationMs: number;
  error?: string;
  protocol: string;
  resourceTiming?: ApiNetworkResourceTiming;
  responseOk?: boolean;
  responseStatus?: number;
  status: 'success' | 'timeout' | 'error' | 'unsupported';
  timedOut: boolean;
}
/** @internal */
interface SchemaDiagnostics {
  documentTypes: number;
  objectTypes: number;
  primitiveTypes: number;
}
/** @internal */
interface StyleSheetDiagnostic {
  /** `sheet.cssRules.length` of a `<style data-styled>` element; 0 when the sheet is unavailable */
  ruleCount: number;
  /** UTF-8 byte length of the generated CSS, as it would be in an external stylesheet */
  sizeBytes?: number;
  /** The element's `data-styled-version` attribute, the version of the runtime that owns it */
  version?: string;
}
/** @internal */
interface StylesDiagnostics {
  /**
   * One entry per `style[data-styled]` element in the document. More than one means several
   * styled-components runtimes are injecting styles (for example a plugin bundling its own copy).
   * Empty when nothing on the page uses styled-components.
   */
  styledComponents: StyleSheetDiagnostic[];
}
/** @internal */
interface RequestPerformanceTarget {
  dataset: string;
  projectId: string;
}
/** @internal */
interface RequestPerformanceEntry extends RequestPerformanceTarget {
  apiVersion: string;
  bucket: string;
  durationMs: number;
  startedAt: string;
  status: 'success' | 'error' | 'aborted';
}
/** @internal */
interface RequestPerformanceBucketSummary {
  bucket: string;
  count: number;
  maxMs: number;
  medianMs: number;
  p95Ms: number;
}
/** @internal */
interface RequestPerformanceSessionSummary {
  buckets: RequestPerformanceBucketSummary[];
  startedAt: string;
  totalRequests: number;
}
/** @internal */
interface RequestPerformanceSnapshot extends RequestPerformanceTarget {
  entries: RequestPerformanceEntry[];
  maxEntries: number;
  sessionSummary: RequestPerformanceSessionSummary;
  totalRequests: number;
  truncated: boolean;
}
/** @internal */
interface RequestPerformanceTracker {
  getSnapshot: (target: RequestPerformanceTarget) => RequestPerformanceSnapshot;
  record: (entry: RequestPerformanceEntry) => void;
}
/** @internal */
interface StudioDiagnosticsOptions {
  client: SanityClient;
  getRequestHistory?: RequestPerformanceTracker['getSnapshot'];
  requestTimeout?: number;
  schema: SchemaDiagnostics;
  studio: {
    basePath?: string;
    dataset: string;
    projectId: string;
    reactVersion: string;
    uniqueTargetCount: number;
    version: string;
    workspaceCount: number;
    workspaceName?: string;
    workspaceTitle?: string;
  };
  user: CurrentUser | null;
}
/** @internal */
interface ListenDiagnostic {
  durationMs: number;
  error?: string;
  openMs?: number;
  path: '/listen?query=*';
  status: 'success' | 'timeout' | 'error';
  timedOut: boolean;
  welcomeMs?: number;
}
/** @internal */
interface RequestDiagnostic {
  detail?: string;
  durationMs: number;
  error?: string;
  path: string;
  shard?: string;
  status: 'success' | 'timeout' | 'error';
  timedOut: boolean;
}
/** @internal */
interface StudioDiagnostics {
  browser: {
    colorDepth?: number;
    connection?: {
      downlinkMbps?: number;
      effectiveType?: string;
      roundtripTimeMs?: number;
      saveData?: boolean;
    };
    cookieEnabled?: boolean;
    deviceMemoryGb?: number;
    devicePixelRatio?: number;
    hardwareConcurrency?: number;
    language?: string;
    languages?: readonly string[];
    localStorage?: {
      error?: string;
      status: 'success' | 'error' | 'unsupported';
    };
    maxTouchPoints?: number;
    online?: boolean;
    screen?: {
      availableHeight: number;
      availableWidth: number;
      height: number;
      width: number;
    };
    timezone?: string;
    userAgent?: string;
    viewport?: {
      height: number;
      width: number;
    };
  };
  diagnosticVersion: 1;
  durationMs: number;
  generatedAt: string;
  network: {
    geoIpCountry?: string | null;
    listen: {
      first: ListenDiagnostic;
      secondWhileFirstOpen: ListenDiagnostic;
    };
    protocol: ApiNetworkDiagnostic;
    requestHistory: RequestPerformanceSnapshot;
    requests: RequestDiagnostic[];
    shard?: string;
  };
  schema: SchemaDiagnostics;
  startedAt: string;
  studio: StudioDiagnosticsOptions['studio'] & {
    apiHost?: string;
    /**
     * Whether a `sanity` entry exists in an import map, the auto-updating studio signal.
     * Undefined in reports from older studios and when the import map cannot be parsed.
     */
    autoUpdates?: boolean;
    location?: string;
  };
  /**
   * Always set by {@link gatherStudioDiagnostics}; optional only because reports from older
   * studios lack it.
   */
  styles?: StylesDiagnostics;
  user: {
    id?: string;
    provider?: string;
    roles: {
      name: string;
      title: string;
    }[];
  };
}
/** @internal */
interface DiagnosticsReportProps {
  diagnostics: StudioDiagnostics;
  onRunAgain: () => void;
  runAgainLabel?: string;
}
/** @internal */
declare function DiagnosticsReport({ diagnostics, onRunAgain, runAgainLabel }: DiagnosticsReportProps): import("react").JSX.Element;
/**
 * @internal
 */
declare function Filters({ showTypeFilter }: {
  showTypeFilter?: boolean;
}): import("react").JSX.Element;
interface SearchHeaderProps {
  ariaInputLabel?: string;
  onClose?: () => void;
}
/**
 * @internal
 */
declare function SearchHeader({ ref, ariaInputLabel, onClose }: SearchHeaderProps & RefAttributes<HTMLInputElement>): import("react").JSX.Element;
type ItemSelectHandler = (item: Pick<SanityDocumentLike, '_id' | '_type' | 'title'>) => void;
/**
 * @internal
 */
interface SearchPopoverProps {
  disableFocusLock?: boolean;
  disableIntentLink?: boolean;
  onClose: () => void;
  onItemSelect?: ItemSelectHandler;
  previewPerspective?: StackablePerspective[];
  /**
   * The variant the result previews are resolved in, as a bare variant id.
   */
  previewVariant?: string;
  /**
   * If provided, will trigger to open the search popover when user types hotkey + k
   */
  onOpen?: () => void;
  open: boolean;
}
/**
 * @internal
 */
declare function SearchPopover({ disableFocusLock, disableIntentLink, onClose, onItemSelect, onOpen, previewPerspective, previewVariant, open }: SearchPopoverProps): import("react").JSX.Element;
interface SearchResultItemPreviewProps {
  documentId: string;
  documentType: string;
  layout?: GeneralPreviewLayoutKey;
  presence?: DocumentPresence[];
  perspective?: PerspectiveStack;
  /**
   * The variant the preview is resolved in, as a bare variant id. Travels with `perspective`.
   */
  variant?: string;
  schemaType: SchemaType;
  showBadge?: boolean;
}
/**
 * @internal
 */
declare function SearchResultItemPreview({ documentId, documentType, layout, presence, schemaType, showBadge, perspective, variant }: SearchResultItemPreviewProps): import("react").JSX.Element;
interface SearchProviderProps {
  children?: ReactNode;
  fullscreen?: boolean;
  /**
   * list of perspective ids
   * if provided, then it means that the search is being done using a specific list of perspectives
   */
  /**
   * list of document ids that should be be disabled in the search
   * if they are found to exist in the search results
   * if provided, then ids should be checked against this list
   */
  disabledDocumentIds?: string[];
  /**
   * If true, the search action (such as adding a document to a release list, for example) should be allowed to disable under the right conditions
   */
  canDisableAction?: boolean;
}
/**
 * @internal
 */
declare function SearchProvider({ children, fullscreen, disabledDocumentIds, canDisableAction }: SearchProviderProps): import("react").JSX.Element;
/**
 * @internal
 */
declare function useSearchState(): SearchContextValue;
/**
 * @internal
 * @hidden
 */
interface PartialIndexSettings {
  partialIndexSettings: {
    maxFieldDepth: number;
  };
}
/**
 * @internal
 * @hidden
 */
declare function useSearchMaxFieldDepth(overrideClient?: SanityClient): number;
interface SearchButtonProps {
  onClick: () => void;
}
/**
 * @internal
 */
declare function SearchButton({ ref, onClick }: SearchButtonProps & RefAttributes<HTMLButtonElement>): import("react").JSX.Element;
interface SearchDialogProps {
  onClose: () => void;
  onOpen: () => void;
  open: boolean;
  previewPerspective?: StackablePerspective[];
  /**
   * The variant the result previews are resolved in, as a bare variant id.
   */
  previewVariant?: string;
}
/**
 * @internal
 */
declare function SearchDialog({ onClose, onOpen, open, previewPerspective, previewVariant }: SearchDialogProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function StudioLogo(props: LogoProps): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function StudioNavbar(props: Omit<NavbarProps, 'renderDefault'>): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
declare function StudioToolMenu(props: ToolMenuProps): import("react").JSX.Element | null;
/**
 * @hidden
 * @beta */
interface ToolLinkProps {
  children: ReactNode;
  name: string;
}
/**
 * @hidden
 * @beta */
declare function ToolLink(props: ToolLinkProps & Omit<HTMLProps<HTMLAnchorElement>, 'href' | 'name'> & RefAttributes<HTMLAnchorElement>): import("react").JSX.Element;
/**
 * Parse and validate JSON copied from the studio diagnostics panel — the
 * counterpart to {@link gatherStudioDiagnostics} for viewers that receive the
 * report as pasted text (dev/studio-diagnostics-viewer, Studio Radar).
 *
 * @internal
 */
declare function parseStudioDiagnostics(input: string): StudioDiagnostics;
/** @internal */
interface StudioDiagnosticsBridgeApi {
  gather: (options?: {
    requestTimeout?: number;
  }) => Promise<StudioDiagnostics>;
}
/**
 * Headless component that exposes {@link gatherStudioDiagnostics} on
 * `window.__sanityStudioDiagnostics`, wired to the active workspace exactly like the
 * help-menu Diagnostics dialog. Automated tooling — e.g. the e2e suite capturing a
 * diagnostics report when a test fails — mounts it to gather the report without having
 * to drive the navbar UI, which may not be operable in the failure states the report is
 * meant to explain. The reports it produces are `parseStudioDiagnostics`-compatible.
 *
 * @internal
 */
declare function StudioDiagnosticsBridge(): null;
/** @internal */
declare function StudioFeedbackProvider({ children }: {
  children: ReactNode;
}): import("react").JSX.Element;
/**
 * Minimal workspace properties needed for studio manifest generation.
 * Both Workspace and WorkspaceSummary satisfy this type.
 * @internal
 */
type ManifestWorkspaceInput = Pick<Workspace, 'name' | 'projectId' | 'dataset' | 'basePath' | 'title' | 'subtitle' | 'icon' | 'mediaLibrary'>;
/**
 * Workspace configuration for the Studio manifest.
 * Used when registering a Studio with the Content Operating System.
 * @internal
 */
interface StudioWorkspaceManifest {
  name: string;
  projectId: string;
  dataset: string;
  schemaDescriptorId: string;
  basePath?: string;
  title?: string;
  subtitle?: string;
  icon?: string;
  mediaLibraryId?: string;
  apiHost?: string;
}
/**
 * Studio configuration manifest that gets registered with the Content Operating System.
 * @internal
 */
interface StudioManifest {
  version?: string;
  buildId?: string;
  bundleVersion?: string;
  workspaces: StudioWorkspaceManifest[];
}
/**
 * Options for generating a studio manifest.
 * @internal
 */
interface GenerateStudioManifestOptions<W extends ManifestWorkspaceInput> {
  /** The workspaces to include in the manifest */
  workspaces: W[];
  /**
   * Function to resolve the schema descriptor ID for a workspace.
   * Return undefined to skip the workspace in the manifest.
   */
  resolveSchemaDescriptorId: (workspace: W) => string | undefined | Promise<string | undefined>;
  /**
   * Function to resolve the icon HTML string for a workspace.
   * Return undefined if the icon cannot be resolved.
   */
  resolveIcon: (workspace: W) => string | undefined | Promise<string | undefined>;
  /** The Sanity version string */
  bundleVersion: string;
  /** Optional build ID */
  buildId?: string;
}
/**
 * Generates a StudioManifest from workspaces.
 * This is a shared utility used by both CLI deployment and live manifest registration.
 * @internal
 */
declare function generateStudioManifest<W extends ManifestWorkspaceInput>(options: GenerateStudioManifestOptions<W>): Promise<StudioManifest>;
/**
 * Provider that automatically uploads the studio manifest when the Studio loads.
 * This runs once when all workspaces are available and includes all workspace information.
 *
 * @internal
 */
declare function LiveManifestRegisterProvider(): null;
/**
 * Uploads the schema to Content Lake, returning a schema descriptor ID.
 * @internal
 */
declare function uploadSchema(schema: Schema, client: SanityClient): Promise<string | undefined>;
interface RenderStudioOptions {
  basePath?: string;
  reactStrictMode?: boolean;
}
/**
 * @internal
 * @deprecated Use `renderStudio(rootElement, config, {reactStrictMode: true})` instead
 */
declare function renderStudio(rootElement: HTMLElement | null, config: Config, options: boolean): () => void;
/** @internal */
declare function renderStudio(rootElement: HTMLElement | null, config: Config): () => void;
/** @internal */
declare function renderStudio(rootElement: HTMLElement | null, config: Config, options: RenderStudioOptions): () => void;
/**
 * Create the studio's request-error channel. Framework-free — the React
 * side (context provider, dialog rendering) lives in `WorkspacesProvider`.
 *
 * See {@link StudioErrorHandler} for the call-site API and semantics.
 *
 * @internal
 */
declare function createRequestErrorChannel(): RequestErrorChannel;
/**
 * The {@link StudioErrorHandler} used when there is no studio error UI to
 * delegate to — outside a `WorkspacesProvider`, or in a standalone render
 * of a component that normally lives in a Studio.
 *
 * It has no dialog and no retry, so it just runs the work and lets the
 * caller's own error handling take over:
 *  - `attempt()` runs the thunk once and resolves/rejects with its result
 *    (an observable is drained to its last value, same as the real
 *    channel).
 *  - `handle()` re-throws, so the next `.catch` in the chain still sees the
 *    error.
 *
 * This lets call sites use `useStudioErrorHandler()` unconditionally
 * instead of branching on whether a Studio is present.
 *
 * @internal
 */
declare const passthroughErrorHandler: StudioErrorHandler;
/**
 * Ticks down from `claim.retryAfterSeconds` to 0, once per second.
 * Resets whenever a new claim object arrives — a retried request that
 * gets rate-limited again produces a fresh claim, and the countdown must
 * restart from the new Retry-After rather than staying at 0 with an
 * enabled button.
 *
 * @internal
 */
declare function useRetryCountdown(claim: {
  retryAfterSeconds?: number;
}): number;
/**
 * Studio dialog for claimed request errors (network / 5xx / 429).
 *
 * Button policy is driven by the caller's `retryable` assertion — the
 * call site knows whether re-running its request is safe; the studio
 * doesn't guess:
 *  - `retryable: true` → "Try again" re-runs the parked request(s),
 *    plus "Reload Studio" as an escape hatch.
 *  - `retryable: false` → only "Reload Studio", with conservative copy
 *    warning that the last change may not have been applied.
 *  - 429 additionally gates "Try again" behind a live Retry-After
 *    countdown.
 *
 * @internal
 */
declare function RequestErrorDialog(props: {
  claim: Exclude<RequestErrorClaim, {
    type: 'unauthorized';
  }>;
  onRetry: () => void;
}): import("react").JSX.Element;
/**
 * Access the studio's request-error reporter — the call-site API for
 * delegating unrecoverable request errors (network failures, 5xx, 429)
 * to the studio's built-in error UI.
 *
 * The studio never intercepts requests on its own: plugins and
 * customizations handle their own errors by default (inline errors,
 * toasts, fallbacks). Use this reporter for the failures your code
 * cannot recover from locally.
 *
 * Always returns a handler, so call sites never have to branch on whether
 * a Studio is present. Outside a `WorkspacesProvider` (e.g. a standalone
 * render of a component that normally lives in a Studio) it returns a
 * passthrough handler with no dialog and no retry: `attempt()` just runs
 * the work, and `handle()` re-throws to the caller's own `.catch`.
 *
 * @example
 * ```tsx
 * function MyPluginComponent() {
 *   const client = useClient({apiVersion: '2025-02-19'})
 *   const {attempt, handle} = useStudioErrorHandler()
 *
 *   const loadSettings = useCallback(async () => {
 *     // Retryable read: "Try again" in the studio dialog re-runs the thunk.
 *     const settings = await attempt(
 *       () => client.fetch('*[_id == "myPlugin.settings"][0]'),
 *       {retryable: true},
 *     )
 *     return settings
 *   }, [client, attempt])
 *
 *   const save = useCallback(
 *     (doc: SanityDocument) =>
 *       client
 *         .createOrReplace(doc)
 *         // Fire-and-surface: a network/5xx failure shows the studio
 *         // dialog (reload-only, conservative copy). Caller-domain errors
 *         // (validation, permissions) are re-thrown to the next .catch.
 *         .catch(handle)
 *         .catch(showInlineValidationError),
 *     [client, handle],
 *   )
 *   // ...
 * }
 * ```
 *
 * @beta
 */
declare function useStudioErrorHandler(): StudioErrorHandler;
/**
 * @hidden
 * @beta */
interface StudioProps {
  config: Config;
  basePath?: string;
  /**
   * Useful for scenarios where the Studio is embedded in another app,
   * and the surrounding app also implements light and dark color schemes.
   *
   * The callback is fired whenever the user selects a new color scheme in the "Appearance" menu in the top-right dropdown.
   * It also fires on first render with its initial value if you don't provide a `scheme` prop.
   *
   * If the user selects "System" in the "Appearance" menu, the callback will be fired with `"system"` as the scheme.
   * To resolve `"system"` to the same color scheme as the Studio use the `usePrefersDark` hook from `@sanity/ui`:
   *
   * ```tsx
   * import {usePrefersDark} from '@sanity/ui'
   * import {Studio} from 'sanity'
   *
   * export default function StudioPage() {
   *   const prefersDark = usePrefersDark()
   *   const [_scheme, setScheme] = useState('system')
   *   const prefersScheme = prefersDark ? 'dark' : 'light'
   *   const scheme = _scheme === 'system' ? prefersScheme : _scheme
   *
   *   return (
   *     <AppLayout scheme={scheme}>
   *       <Studio config={config} onSchemeChange={setScheme} />
   *     </AppLayout>
   *   )
   * }
   * ```
   *
   *
   * @hidden
   * @beta
   */
  onSchemeChange?: (nextScheme: StudioThemeColorSchemeKey) => void;
  /**
   * By default the Studio handles the color scheme itself, but you can provide a color scheme to use.
   * If you only define `scheme` then the top-right "Appearance" dropdown menu will be hidden,
   * and the Studio will stay in sync with the `scheme` prop.
   *
   * You may setup two-way sync and re-enable the "Appearance" dropdown menu by also providing an `onSchemeChange` callback:
   * ```tsx
   * import {Studio} from 'sanity'
   * import {useSession} from 'your-app'
   *
   * export default function StudioPage() {
   *   const session = useSession()
   *   // Overrides the default scheme to be what's in the app user session
   *   const [_scheme, setScheme] = useState(session.scheme)
   *   const scheme = _scheme === 'system' ? session.scheme : _scheme
   *
   *   return (
   *     <AppLayout scheme={scheme}>
   *       <Studio config={config} scheme={scheme} onSchemeChange={setScheme} />
   *     </AppLayout>
   *   )
   * }
   * ```
   *
   *
   * @hidden
   * @beta
   */
  scheme?: StudioThemeColorSchemeKey;
  /**
   * @hidden
   * @beta */
  unstable_history?: RouterHistory;
  /**
   * @hidden
   * @beta */
  unstable_globalStyles?: boolean;
  /**
   * @hidden
   * @beta */
  unstable_noAuthBoundary?: boolean;
}
/**
 * @hidden
 * @beta */
declare function Studio(props: StudioProps): React.JSX.Element;
interface StudioAnnouncementCardProps {
  title: string;
  id: string;
  name: string;
  isOpen: boolean;
  preHeader: string;
  onCardClick: () => void;
  onCardDismiss: () => void;
}
/**
 * @internal
 * @hidden
 */
declare function StudioAnnouncementsCard({ title, id, isOpen, name, preHeader, onCardClick, onCardDismiss }: StudioAnnouncementCardProps): import("react").JSX.Element;
interface StudioAnnouncementDialogProps {
  announcements: StudioAnnouncementDocument[];
  onClose: () => void;
  mode: DialogMode;
}
/**
 * Renders the studio announcement dialog displaying unseen announcements.
 * @internal
 * @hidden
 */
declare function StudioAnnouncementsDialog({ announcements, onClose, mode }: StudioAnnouncementDialogProps): import("react").JSX.Element;
/**
 * @internal
 * @hidden
 */
declare function isValidAnnouncementAudience(document: {
  audience: StudioAnnouncementDocument['audience'];
  studioVersion: StudioAnnouncementDocument['studioVersion'];
}, sanityVersion: string): boolean;
/**
 * @internal
 * @hidden
 */
declare function isValidAnnouncementRole(audience: StudioAnnouncementDocument['audienceRole'] | undefined, userRoles: Role[] | undefined): boolean;
/**
 * @internal
 * The default Studio Layout component
 * */
declare function StudioLayoutComponent(): import("react").JSX.Element;
/**
 * @hidden
 * @beta */
interface StudioProviderProps extends StudioProps {
  children: ReactNode;
}
/**
 * @hidden
 * @beta */
declare function StudioProvider({ children, config, basePath, onSchemeChange, scheme, unstable_history: history, unstable_noAuthBoundary: noAuthBoundary }: StudioProviderProps): import("react").JSX.Element;
/**
 * Returns the current user's telemetry consent status.
 * The underlying API call is cached — multiple components using this hook
 * share a single request.
 *
 * @internal
 */
declare function useTelemetryConsent(): ConsentStatus;
/** @internal */
type InterpolationProp = {
  [key: string]: string | number;
};
interface DescriptionSerializerProps {
  blocks: PortableTextBlock[];
  onLinkClick?: ({ url, linkTitle }: {
    url: string;
    linkTitle: string;
  }) => void;
  interpolation?: InterpolationProp;
}
/**
 * Portable text serializer for the description text for upsell elements.
 * Not meant for public consumption.
 * @internal
 */
declare function UpsellDescriptionSerializer(props: DescriptionSerializerProps): import("react").JSX.Element;
/**
 * @internal
 */
interface ErrorMessageProps {
  message: string;
  stack?: string;
  error: unknown;
  path: Array<{
    name: string;
    type: string;
  }>;
}
/**
 * @internal
 */
declare function ErrorMessage({ error, message, path, stack }: ErrorMessageProps): import("react").JSX.Element;
interface WorkspaceLoaderProps {
  children: ReactNode;
  ConfigErrorsComponent: ComponentType;
  LoadingComponent: ComponentType;
}
/**
 * @internal
 */
declare function useWorkspaceLoader(activeWorkspace: WorkspaceSummary): Workspace | null;
/**
 * @internal
 */
declare function WorkspaceLoaderBoundary({ ConfigErrorsComponent, ...props }: WorkspaceLoaderProps): import("react").JSX.Element;
/**
 * Renders the config-error takeover ({@link ConfigErrorScreen}) when
 * `WorkspacesProvider` has detected a missing project/dataset, otherwise
 * renders its children.
 *
 * It sits below `ActiveWorkspaceMatcher` (the error is surfaced up through
 * `ConfigErrorContext`) precisely so the screen can use the same
 * workspace-switcher hooks the auth screens use — `useVisibleWorkspaces`
 * and `useActiveWorkspace` are only available here.
 *
 * The error is shown only while the active workspace is the one that
 * failed. `WorkspacesProvider` latches `configError` for the lifetime of
 * the mount, so without this check switching to a healthy workspace (via
 * the screen's "Choose another workspace" button, which is a router push,
 * not a reload) would keep the error up.
 *
 * @internal
 */
declare function ConfigErrorGate({ children }: {
  children: ReactNode;
}): ReactNode;
interface CorsOriginErrorScreenProps {
  projectId?: string;
  isStaging: boolean;
  /**
   * The project ID of the first workspace in the Studio config.
   * Used to show the "Register Studio" option when it matches the CORS error's project ID.
   */
  primaryProjectId?: string;
  /**
   * The origin to register / add as a CORS entry. Passed in (rather than
   * read from `window` here) so the screen stays pure — the live flow
   * passes `window.location.origin`, and the error playground can preview
   * the screen for other origins (e.g. a custom domain, which shows the
   * "Register Studio" option that a localhost dev origin does not).
   */
  origin: string;
  /**
   * Mirrors `/check/cors`'s `result.allowed` — whether the origin is in
   * the project's CORS allowlist.
   */
  allowed?: boolean;
  /**
   * Mirrors `/check/cors`'s `result.withCredentials` — whether the
   * allowlist entry permits credentialed requests. When `allowed: true`
   * and `withCredentials: false`, the screen shows the "re-add with
   * credentials" branch.
   */
  withCredentials?: boolean;
}
/** @internal */
declare function CorsOriginErrorScreen(props: CorsOriginErrorScreenProps): import("react").JSX.Element;
/** @internal */
interface WorkspaceLike {
  name?: string;
  title?: string;
  basePath?: string;
}
/**
 * Gets a printable identifer for the workspace - either the name, or the index
 * and any potential title set for it
 *
 * @param workspace - The workspace to get the indentifier for
 * @param index - The index at which the workspace appeared in the source array
 * @returns Printable string (eg `intranet`, or `at index 5 (titled "Intranet")`)
 * @internal
 */
declare function getWorkspaceIdentifier({ name, title }: WorkspaceLike, index: number): string;
/** @internal */
declare function getNamelessWorkspaceIdentifier(title: string | undefined, index: number): string;
/**
 * Evaluates a workspace's `hidden` property against the given auth state.
 * Falls open (returns `false`) when auth state is unavailable or the callback throws.
 *
 * @internal
 */
declare function evaluateWorkspaceHidden(workspace: WorkspaceSummary, authState: AuthState | undefined): boolean;
/**
 * Returns visible workspaces and auth states from the nearest
 * `VisibleWorkspacesProvider`.
 *
 * @internal
 */
declare function useVisibleWorkspaces(): VisibleWorkspacesContextValue;
/** @internal */
declare function useWorkspaces(): WorkspaceSummary[];
/** @internal */
interface ValidateWorkspaceOptions {
  workspaces: WorkspaceLike[];
}
/**
 * Validates workspace configuration, throwing if:
 *
 * - Workspaces do not all have base paths and names (if multiple given)
 * - Base paths or names are invalid
 * - Base paths or names are not unique
 *
 * @internal
 */
declare function validateWorkspaces({ workspaces }: ValidateWorkspaceOptions): void;
/**
 * Validates the workspace names of every workspace
 * Only exported for testing purposes
 *
 * @param workspaces - An array of workspaces
 * @internal
 */
declare function validateNames(workspaces: WorkspaceLike[]): void;
/**
 * Validates the base paths of every workspace
 * Only exported for testing purposes
 *
 * @param workspaces - An array of workspaces
 * @internal
 */
declare function validateBasePaths(workspaces: WorkspaceLike[]): void;
/**
 * Unless otherwise specified, this is the API version we use for controlled
 * requests on internal studio APIs. The user should always ask for a specific
 * API version when using the client - this way we can upgrade which version we
 * use internally without having the users code break unexpectedly. It also
 * means the user can easily upgrade to newer versions of GROQ when it arrives.
 *
 * @internal
 */
declare const DEFAULT_STUDIO_CLIENT_OPTIONS: SourceClientOptions;
interface IsLastPaneProviderProps {
  isLastPane: boolean;
  children: React.ReactNode;
}
/**
 * @internal
 * @hidden
 */
declare function IsLastPaneProvider({ children, isLastPane }: IsLastPaneProviderProps): React.JSX.Element;
interface PreviewHookOptions {
  documentId: string;
  documentType: string;
  perspectiveStack: string[];
  /**
   * The variant to resolve the preview values in, as a bare variant id. Like `perspectiveStack`,
   * this is explicit: callers that want the variant currently selected in the studio pass
   * `getDefaultVariant(usePerspective().selectedVariantNames)`.
   */
  variant?: string;
}
interface PreviewHookValue {
  isLoading: boolean;
  value: Partial<PreviewValue> | null;
}
/** @internal */
declare function useDocumentPreviewValues(options: PreviewHookOptions): PreviewHookValue;
/** @internal */
declare function prepareTemplates(schema: Schema, initialValueTemplates: Template[]): Template[];
/** @internal */
declare function defaultTemplateForType(schemaType: SchemaType): Template;
/** @internal */
declare function defaultTemplatesForSchema(schema: Schema): Template[];
/** @internal */
type Serializeable<T> = {
  serialize(): T;
};
interface Options {
  useCache?: boolean;
}
/** @internal */
declare function isBuilder(template: unknown): template is Serializeable<Template>;
/** @internal */
declare function resolveInitialValue(schema: Schema, template: Template, params: {
  [key: string]: any;
} | undefined, context: InitialValueResolverContext, options?: Options): Promise<{
  [key: string]: any;
}>;
/** @internal */
declare const DEFAULT_MAX_RECURSION_DEPTH = 10;
/**
 * Backstop for an initial-value resolver whose request never settles — e.g.
 * a `client.fetch` parked by the studio's network/CORS error handling.
 * Without it the editor hangs in a loading state and the create-document menu
 * loads forever instead of surfacing the failure. Both call sites
 * (`getInitialValueStream`, `getTemplatePermissions`) time out on this bound.
 *
 * @internal
 */
declare const RESOLVE_INITIAL_VALUE_TIMEOUT_MS = 10000;
type ResolveInitialValueForType = <TParams extends Record<string, unknown>>( /**
 * This is the name of the document.
 */ type: SchemaType,
/**
 * Params is a sanity context object passed to every initial value function.
 */
params: TParams,
/**
 * Maximum recursion depth (default 9).
 */
maxDepth: number, context: InitialValueResolverContext, options?: Options) => Promise<any>;
/**
 * Resolve initial value for the given schema type (recursively)
 *
 * @internal
 */
declare const resolveInitialValueForType: ResolveInitialValueForType;
/** @internal */
declare function resolveInitialObjectValue<Params extends Record<string, unknown>>(type: ObjectSchemaType, params: Params, maxDepth: number, context: InitialValueResolverContext, options?: Options): Promise<any>;
/**
 * @internal
 * @deprecated – Will be removed in upcoming major version
 */
type LegacyThemeTints = { [key in ColorTintKey]: string; };
/**
 * Properties that can be used to override the default theme.
 *
 * @public
 * @deprecated – Will be removed in upcoming major version
 */
interface LegacyThemeProps {
  '--font-family-monospace': string;
  '--font-family-base': string;
  '--black': string;
  '--white': string;
  '--brand-primary': string;
  '--component-bg': string;
  '--component-text-color': string;
  '--default-button-color': string;
  '--default-button-primary-color': string;
  '--default-button-success-color': string;
  '--default-button-warning-color': string;
  '--default-button-danger-color': string;
  '--focus-color': string;
  '--gray-base': string;
  '--gray': string;
  '--main-navigation-color': string;
  '--main-navigation-color--inverted': string;
  '--state-info-color': string;
  '--state-success-color': string;
  '--state-warning-color': string;
  '--state-danger-color': string;
  /**
   * @deprecated this theme property is not configurable within the studio
   */
  '--screen-medium-break': string;
  /**
   * @deprecated this theme property is not configurable within the studio
   */
  '--screen-default-break': string;
  /**
   * @deprecated this theme property is not configurable within the studio
   */
  '--screen-large-break': string;
  /**
   * @deprecated this theme property is not configurable within the studio
   */
  '--screen-xlarge-break': string;
}
/**
 * Build a Sanity UI theme from legacy CSS properties.
 *
 * @example
 * ```tsx
 * import {buildLegacyTheme, defineConfig} from 'sanity'
 *
 * export default defineConfig({
 *   // project configuration ...
 *
 *   // Customize theming
 *   theme: buildLegacyTheme({
 *     '--black': '#000',
 *     '--gray': '#777',
 *     '--focus-color': '#00f',
 *   })
 * })
 * ```
 *
 * @param partialLegacyTheme - Properties to override the theme with. See {@link LegacyThemeProps}
 * @public
 * @deprecated – Will be removed in upcoming major version
 */
declare function buildLegacyTheme(partialLegacyTheme: Partial<LegacyThemeProps>): StudioTheme;
/** @internal */
declare function useUserColorManager(): UserColorManager;
/** @internal */
declare function useUserColor(userId: string | null): UserColor;
/** @internal */
interface UserColorManagerOptions {
  anonymousColor?: UserColor;
  userStore?: {
    me: Observable<{
      id: string;
    } | null>;
  };
  colors?: Record<UserColorHue, UserColor>;
  currentUserColor?: UserColorHue;
  scheme: ThemeColorSchemeKey;
}
/** @internal */
declare function createUserColorManager(options: UserColorManagerOptions): UserColorManager;
/** @internal */
interface UserColorManagerProviderProps {
  children: ReactNode;
  manager?: UserColorManager;
}
/** @internal */
declare function UserColorManagerProvider({ children, manager: managerFromProps }: UserColorManagerProviderProps): React.JSX.Element;
type Selector<T, K> = (error: unknown, attemptNo: number, caught: Observable<T>) => Observable<K>;
/**
 * Like catchError, but passes the number of successive errors as the second argument to the selector function
 * @internal
 * @hidden
 */
declare function catchWithCount<T, K = T>(selector: Selector<T, K>): OperatorFunction<T, K>;
type DateInput = Date | number | string;
/**
 * Renders `date` relative to `baseDate` in `timeZone`. Replaces date-fns's en-US
 * `MM/dd/yyyy` fallback (used for dates more than ~6 days out) with the browser's
 * locale date format, so non-en-US users don't see American-style dates.
 *
 * `timeZone` defaults to the host runtime's TZ. Pass an explicit IANA zone for
 * non-browser contexts or to render in the user's selected studio timezone (e.g.
 * via a hook that wraps `useTimeZone`).
 *
 * @internal
 */
declare const formatRelativeLocale: (date: DateInput, baseDate: DateInput, timeZone?: string) => string;
/**
 * The variant document id (`_.variants.<name>`) a document belongs to, read from `_system`.
 *
 * Content Lake stores the variant a document belongs to in `_system.variants` (an array that
 * currently holds at most one reference). Documents that have not been migrated yet still carry
 * the legacy single reference in `_system.variant`, so that field is used as a fallback. Base
 * (non-variant) documents may carry `null` or an empty array in either field.
 *
 * Kept dependency-free so it can be imported from the document store's operations graph.
 *
 * @internal
 */
declare function getDocumentVersionVariantId(document: {
  _system?: Partial<DocumentSystem> | null;
} | null | undefined): VariantId | undefined;
/**
 * Safely extracts an error message from an unknown value that was thrown.
 * JavaScript allows throwing any value, not just Error instances.
 *
 * @param error - The unknown value that was thrown
 * @returns A string representation of the error
 * @internal
 */
declare function getErrorMessage(error: unknown): string;
/**
 * @beta
 * Given a document and a reference ID, returns the paths in which the reference is used within the document.
 *
 * For example:
 * ```ts
 * const document = {
 *   _type: 'test',
 *   _id: 'test',
 *   _createdAt: '2021-01-01',
 *   _updatedAt: '2021-01-01',
 *   _rev: 'test',
 *   rootReference: {
 *     _ref: 'foo-bar',
 *     _type: 'reference',
 *   },
 * }
 * const referencePaths = getReferencePaths(document, 'foo-bar')
 * expect(referencePaths).toEqual([['rootReference']])
 * ```
 */
declare function getReferencePaths(document: SanityDocument, referenceToId: string): Path[];
/**
 * Finds the document version whose _system metadata matches the selected bundle and variant.
 *
 * `bundle` must be the canonical bundle id (`published`, `drafts` or a release id), matching
 * `_system.bundleId` exactly. For example, `bundle: 'published'` and `variant: undefined` matches
 * a version with no `bundleId` and no variant reference (`variants` empty or `null`).
 *
 * @internal
 */
declare function getTargetDocument({ bundle, documentVersions, variant }: {
  variant: VariantId | undefined;
  bundle: PerspectiveBundle;
  documentVersions: DocumentPerspectiveState['versions'];
}): VersionInfoDocumentStub | undefined;
/**
 * Finds the variant-of-published sibling for a variant: the version stub carrying the same
 * `_system.variants[0]` reference but no `_system.bundleId` (i.e. the published variant document).
 *
 * This is the document that publish-state gating must read for variant targets — the base
 * `published` document says nothing about whether the *variant* is published. `undefined` means
 * the variant has never been published.
 *
 * @internal
 */
declare function getVariantPublishedSibling({ documentVersions, variant }: {
  variant: VariantId;
  documentVersions: DocumentPerspectiveState['versions'];
}): VersionInfoDocumentStub | undefined;
interface GlobalErrorChannelEvent {
  type: 'error' | 'rejection';
  error?: unknown;
  lineno?: number;
  colno?: number;
  filename?: string;
}
interface GlobalErrorChannel {
  subscribe: (callback: (event: GlobalErrorChannelEvent) => void) => () => void;
}
/** @internal */
declare const globalScope: typeof globalThis & {
  __sanityErrorChannel?: GlobalErrorChannel;
};
/** @internal */
declare function isArray(value: unknown): value is unknown[];
/**
 * @internal
 */
declare function isNonNullable<T>(value: T): value is NonNullable<T>;
/**
 * @internal
 */
declare function isRecord(value: unknown): value is Record<string, unknown>;
/** @internal */
declare function isString(value: unknown): value is string;
/** @internal */
declare function isTruthy<T>(value: T | false): value is T;
/**
 * RxJS operator that measures the time from subscription to the first emission.
 * Calls `onMeasured` once with the elapsed duration in milliseconds and the emitted value.
 * Uses `tap()` internally so data flow is unchanged.
 *
 * Re-subscriptions (e.g. navigating between documents) naturally produce fresh measurements.
 *
 * @param onMeasured - Callback receiving the duration in ms and the first emitted value
 * @returns An RxJS operator
 * @internal
 */
declare function measureFirstEmission<T>(onMeasured: (durationMs: number, value: T) => void): MonoTypeOperatorFunction<T>;
/**
 * RxJS operator that measures the time from subscription to the first emission
 * where the given predicate returns `true`.
 * Calls `onMeasured` once with the elapsed duration in milliseconds and the matching value.
 * Uses `tap()` internally so data flow is unchanged.
 *
 * @param predicate - Function that determines if the emitted value is a match
 * @param onMeasured - Callback receiving the duration in ms and the first matching value
 * @returns An RxJS operator
 * @internal
 */
declare function measureFirstMatch<T>(predicate: (value: T) => boolean, onMeasured: (durationMs: number, value: T) => void): MonoTypeOperatorFunction<T>;
/**
 * A release document with cardinality 'one'
 *
 * @internal
 */
type CardinalityOneRelease = ReleaseDocument & {
  metadata: ReleaseDocument['metadata'] & {
    cardinality: 'one';
  };
};
/**
 * Check if the release is a cardinality one release
 *
 * @internal
 */
declare function isCardinalityOneRelease(release: ReleaseDocument): release is CardinalityOneRelease;
/**
 * Check if perspective represents a cardinality one release
 *
 * @internal
 */
declare function isCardinalityOnePerspective(perspective: unknown): perspective is CardinalityOneRelease;
/**
 * Checks if a release is a paused cardinality one release (scheduled draft).
 *
 * @internal
 */
declare function isPausedCardinalityOneRelease(release: ReleaseDocument | undefined): boolean;
/**
 *
 * Create an SWR (Stale While Revalidate) rxjs operator that will store the latest value in a cache and emit the last know value upon observable subscription
 * @param options - Options
 * @internal
 */
declare function createSWR<T>(options: {
  maxSize: number;
}): (key: string) => OperatorFunction<T, {
  fromCache: boolean;
  value: T;
}>;
/**
 * @internal
 */
declare function _isSanityDocumentTypeDefinition(def: SchemaTypeDefinition): def is SchemaTypeDefinition<'document'>;
/**
 * @internal
 */
declare function _isCustomDocumentTypeDefinition(def: SchemaTypeDefinition): def is SchemaTypeDefinition<'document'>;
/**
 * Test if the given schema type or any of its ancestors matches the given type name.
 * @internal
 */
declare function _isType(schemaType: SchemaType, typeName: string): boolean;
type SearchPathSegment = string | number | [];
/** @internal */
declare const fieldNeedsEscape: (fieldName: string) => boolean;
/** @internal */
declare const escapeField: (fieldName: string) => string;
/** @internal */
declare const joinPath: (pathArray: SearchPathSegment[]) => string;
/** @internal */
declare const supportsTouch: boolean;
/** @internal */
declare const uncaughtErrorHandler: () => string;
/**
 * Truncates a string to a given length, taking into account surrogate pairs and grapheme clusters
 * (using zero-width joiners). This means the resulting string may be longer in number of bytes,
 * but will be shorter in number of "characters". Should only be used for display purposes -
 * not for truncating strings for storage or similar.
 *
 * Examples of differences between `String.prototype.slice` and this function:
 *
 * - '👨‍👨‍👧‍👧'.slice(0, 1) === '�'  vs sliceString('👨‍👨‍👧‍👧', 0, 1) === '👨‍👨‍👧‍👧'
 * - '👨‍👨‍👧‍👧'.slice(0, 2) === '👨' vs sliceString('👨‍👨‍👧‍👧', 0, 2) === '👨‍👨‍👧‍👧'
 *
 * @param str - String to slice
 * @param start - Start index
 * @param end - End index (exclusive)
 * @returns The sliced string
 * @internal
 */
declare function sliceString(str: string, start: number, end: number): string;
/**
 * Truncates a string to a given length, taking into account surrogate pairs and grapheme clusters
 * (using zero-width joiners). This means the resulting string may be longer in number of bytes,
 * but will be shorter in number of "characters". Should only be used for display purposes -
 * not for truncating strings for storage or similar.
 *
 * @param str - String to truncate
 * @param maxLength - Maximum length in "characters"
 * @returns The truncated string
 * @internal
 */
declare function truncateString(str: string, maxLength: number): string;
/**
 * Checks whether or not the given user has the role with the given ID
 *
 * @param user - The user to check (currently only the current user is supported)
 *   If `null` is passed, this function always returns `false`.
 * @param roleId - The ID of the role to check for
 *
 * @returns true if the user has the role, false otherwise
 *
 * @example
 * Fetch the current user and check if they have the role "administrator":
 * ```ts
 * import {userHasRole, useCurrentUser} from 'sanity'
 *
 * export function MyComponent() {
 *   const user = useCurrentUser()
 *   const hasAdminRole = userHasRole(user, 'administrator')
 *   return <div>Is administrator: {hasAdminRole ? 'Yes' : 'No'}</div>
 * }
 * ```
 * @public
 */
declare function userHasRole(user: (Omit<CurrentUser, 'role'> & {
  role?: string;
}) | null, roleId: string): boolean;
/**
 * Returns the previous value whenever the next one is shallow-equal to it, so
 * derived values (e.g. freshly built arrays with unchanged contents) keep a
 * stable identity across renders and don't cascade into memo invalidation or
 * subscription teardown downstream.
 *
 * @internal
 */
declare function useShallowUnique<ValueType>(value: ValueType): ValueType;
/**
 * @internal
 *
 * @example
 * ```tsx
 * // First create a callback using React’s `useCallback` hook
 * const myCallback = useCallback(() => {
 *   // this is not throttled
 * }, [])
 *
 * // Then make a throttled version using the `useThrottledCallback` hook
 * const myThrottledCallback = useThrottledCallback(myCallback, 100)
 *
 * // Call the throttled callback
 * <Button onClick={myThrottledCallback} />
 * ```
 */
declare function useThrottledCallback(callback: (...args: any[]) => any, wait: number, options: ThrottleSettings): (...args: any[]) => any;
/**
 * This React hook should be considered an escape hatch – to make sure that a value is the same
 * on every render. SHOULD NOT BE USED IN MOST CASES.
 *
 * Compares with react-fast-compare because callers pass plugin-provided values (menu items,
 * field actions, views) that can contain React elements.
 * @deprecated please use `useMemo` and `useCallback` strategies instead to make deps stable, this hook runs comparisons on every single render and while each comparison can be fast, it quickly adds up
 *
 * @internal
 */
declare function useUnique<ValueType>(value: ValueType): ValueType;
/**
 * The outcome of validating a Structure Tool node id. Invalid results carry a
 * `reason` and the details needed to build a message, leaving it to the caller
 * to decide whether to throw, aggregate, or reword the problem.
 *
 * @internal
 */
type StructureNodeIdValidationResult = {
  isValid: true;
} | {
  isValid: false;
  reason: 'invalidType';
  type: string;
} | {
  isValid: false;
  reason: 'disallowedCharacter';
  character: string;
} | {
  isValid: false;
  reason: 'reservedPrefix';
  prefix: string;
};
/**
 * Validates that `id` can be used as a Structure Tool node id: a string using
 * only `[A-Za-z0-9-_.]` that does not start with the reserved `__edit__` prefix.
 *
 * @internal
 */
declare function validateStructureNodeId(id: unknown): StructureNodeIdValidationResult;
type VariantConstraint = {
  /**
   * Match only the provided variant id.
   *
   * This value **must** be the bare variant id ("x", rather than "_.variants.x").
   */
  variant: string;
  baseVariant?: never;
  anyVariant?: never;
} | {
  variant?: never;
  /**
   * Match only the base variant.
   */
  baseVariant: true;
  anyVariant?: never;
} | {
  variant?: never;
  baseVariant?: never;
  /**
   * Match any variant.
   */
  anyVariant: true;
};
/** @beta */
type VersionType = 'draft' | 'published' | 'release' | 'agent';
/**
 * Uses the `_system` field to check if a version is a published version.
 *
 * By default, any published variant will match. Use the constraint options to
 * limit matching to the base variant, or to a particular variant id.
 *
 * @beta
 */
declare function isPublishedVersion(version: VersionInfoDocumentStub, options?: {
  constraint: VariantConstraint;
}): boolean;
/**
 * Uses the `_system` field to check if a version is a draft version.
 *
 * By default, any draft variant will match. Use the constraint options to
 * limit matching to the base variant, or to a particular variant id.
 *
 * @beta
 */
declare function isDraftVersion(version: VersionInfoDocumentStub, options?: {
  constraint: VariantConstraint;
}): boolean;
/**
 * Uses the _system field to check if a version is a variant version
 * @beta
 */
declare function isVariantVersion(version: VersionInfoDocumentStub): boolean;
/**
 * Uses the _system field to check if a version is a release version
 * @beta
 */
declare function isReleaseVersion(version: VersionInfoDocumentStub): boolean;
/**
 * Uses the _system field to determine the version type of a document.
 * @beta
 */
declare function readVersionType(version: VersionInfoDocumentStub | undefined): VersionType | undefined;
/**
 * @internal
 */
interface IsDocumentInSelectedVariantOptions {
  /** The currently selected variant. */
  selectedVariant: SystemVariant;
  /** The canonical bundle id (`published`, `drafts` or release id) of the current perspective. */
  bundle: PerspectiveBundle;
  /** Document versions (with `system` metadata) from `useDocumentVersions`. */
  documentVersions: DocumentPerspectiveState['versions'];
}
/**
 * Determines whether the open document has a variant-scoped version for the selected variant in
 * the current perspective's bundle.
 *
 *
 * @internal
 */
declare function isDocumentInSelectedVariant({ selectedVariant, bundle, documentVersions }: IsDocumentInSelectedVariantOptions): boolean;
/**
 * Resolves the {@link InitialValueState} for the document form: for a creatable missing draft
 * variant (see `getCreatableVariantTarget`), the published sibling is observed live and served as
 * the initial value via {@link buildCreatableVariantInitialValue}; every other state passes
 * `fallback` (the template-resolved initial value) through untouched.
 *
 * Loading is honest: the state stays `loading` until the sibling document arrives, so the form
 * never flashes an empty document where the published variant content belongs. If the sibling is
 * concurrently unpublished, the target state flips away from creatable and `fallback` applies
 * again.
 *
 * @internal
 * @beta
 */
declare function useCreatableVariantInitialValue(targetDocumentState: TargetDocumentState, fallback: InitialValueState): InitialValueState;
type BaseOptions = {
  client: SanityClient;
  variant: Pick<SystemVariant, '_id'>;
  selectedPerspective: TargetPerspective;
  documentGroupId: string;
  signal?: AbortSignal;
};
/**
 * @internal
 */
type CreateVariantScopedDocumentOptions = BaseOptions & ({
  document: SanityDocumentStub;
} | {
  baseId: string;
  ifBaseRevisionId?: string;
});
type DistributiveOmit<Type, Key extends PropertyKey> = Type extends unknown ? Omit<Type, Key> : never;
/**
 * @internal
 */
declare function useVariantDocumentOperations(): {
  createVariantDocument: (options: DistributiveOmit<CreateVariantScopedDocumentOptions, 'client'>) => Promise<SingleActionResult>;
};
/**
 * Gets all variants.
 * @internal
 */
declare function useAllVariants(): {
  data: SystemVariant[];
  byId: Map<string, SystemVariant>;
  error?: Error;
  loading: boolean;
};
/**
 * Encodes one variant id for a link or sticky param: `<type>:<shortId>`.
 * Omitted `type` is {@link DEFAULT_VARIANT_TYPE_KEY}.
 *
 * @internal
 */
declare function encodeVariantLinkParam(variantId: string, type?: string): string;
/**
 * @internal
 */
declare function getVariantTitle(variant: SystemVariant): string;
declare global {
  /**
   * Replaced with the published package version by tsdown at build time (see the `define` option
   * in `tsdown.config.ts`); undefined when running from source, e.g. in dev or test environments
   */
  var __PKG_VERSION__: string | undefined;
}
/**
 * @hidden
 * @beta
 */
declare const SANITY_VERSION: string;
/**
 * @internal
 * @deprecated Use the `auth` config key with an `AuthConfig` object instead. Deprecated since Studio v3.15.0.
 */
declare const createAuthStore: (options: CreateAuthStoreOptions) => AuthStore;
/** @internal */
declare function useDocumentOperationEvent(publishedDocId: string, docTypeName: string): OperationError | OperationSuccess | undefined;
export { measureFirstMatch as $, usePerspective as $a, useComments as $c, prepareConfig as $d, usePortalBoundary as $f, SchedulesContext as $i, getPreviewStateObservable as $l, useColorSchemeValue as $n, FormattedDuration as $o, useDocumentPreviewStore as $r, ArrayOfPrimitivesInput as $s, useTelemetryConsent as $t, DiffStringSegment as $u, readVersionType as A, getVersionInlineBadge as Aa, InlinePreviewProps as Ac, SendFeedbackOptions as Ad, getInitialValueStream as Af, AgentVersionDisplay as Ai, defaultRenderPreview as Al, StudioLogo as An, CreatableTargetDocument as Ao, buildRangeDecorationSelectionsFromComments as Ap, useDocumentPairPermissions as Ar, UrlInput as As, defaultTemplatesForSchema as At, isAddedItemDiff as Au, supportsTouch as B, useValuePreview as Ba, CompactPreview as Bc, DocumentGroupInventoryProps as Bd, LegacyLayerProvider as Bf, UseSearchMachineOptions as Bi, ObjectInputMemberProps as Bl, SearchHeader as Bn, useReviewChanges as Bo, CommentInputHandle as Bp, useDocumentValues as Br, SlugInputProps as Bs, evaluateWorkspaceHidden as Bt, MetaInfo as Bu, useCreatableVariantInitialValue as C, useVersionOperations as Ca, RovingFocusNavigationType as Cc, getAnnotationColor as Cd, DocumentStoreOptions as Cf, RetryingStatus as Ci, useConnectionState as Cl, StudioDiagnosticsBridge as Cn, useUnitFormatter as Co, CollapseMenu as Cp, grantsPermissionOn as Cr, createSanityMediaLibraryFileSource as Cs, RESOLVE_INITIAL_VALUE_TIMEOUT_MS as Ct, FormFieldSet as Cu, isPublishedVersion as D, useDocumentVersionTypeSortedList as Da, TemplatePreview as Dc, FeedbackContext$1 as Dd, ListenQueryParams as Df, isCookielessCompatibleLoginMethod as Di, defaultRenderInlineBlock as Dl, ToolLinkProps as Dn, useTemplates as Do, BetaBadge as Dp, DocumentPairPermissionsOptions as Dr, PrimitiveMemberItemProps as Ds, resolveInitialValue as Dt, resolveDiffComponent as Du, isDraftVersion as E, useFormatRelativeLocalePublishDate as Ea, CircularProgress as Ec, useStudioFeedbackTags as Ed, ListenQueryOptions as Ef, isAuthStore as Ei, defaultRenderField as El, ToolLink as En, useTimeAgo as Eo, CapabilityGate as Ep, useDocumentValuePermissions as Er, ArrayOfPrimitivesItem as Es, resolveInitialObjectValue as Et, FormFieldProps as Eu, useShallowUnique as F, Chip as Fa, MediaPreviewProps as Fc, FeedbackDialog as Fd, InitialValueSuccessMsg as Ff, usePauseToEditScheduledDraft as Fi, resolveConditionalProperty as Fl, useSearchState as Fn, getTargetSiblings as Fo, isTextSelectionComment as Fp, useResolveInitialValueForType as Fr, TelephoneInputProps as Fs, ValidateWorkspaceOptions as Ft, noop as Fu, _isSanityDocumentTypeDefinition as G, PreviewLoader as Ga, DocumentStatusIndicator as Gc, useConfigContextFromSource as Gd, TextWithTone as Gf, SearchMachineInput as Gi, MemberItemError as Gl, ColorSchemeCustomProvider as Gn, UseNumberFormatOptions as Go, ChangeIndicator as Gp, asLoadable as Gr, EmailInput as Gs, CorsOriginErrorScreen as Gt, FromToProps as Gu, fieldNeedsEscape as H, useUnstableObserveDocument as Ha, IntentButton as Hc, DocumentGroupInventoryPerspectiveList as Hd, ImperativeToast as Hf, SearchMachineContext as Hi, MemberFieldError as Hl, DiagnosticsReport as Hn, useReferringDocuments as Ho, CommentDisabledIcon as Hp, LoadableState as Hr, ObjectInput as Hs, getNamelessWorkspaceIdentifier as Ht, FromToArrow as Hu, userHasRole as I, prepareForPreview as Ia, DetailPreview as Ic, type FeedbackDialogProps as Id, OperationError as If, usePausedScheduledDraft as Ii, ObjectInputMembers as Il, SearchProvider as In, useTargetDocumentState as Io, CommentsSelectedPathProvider as Ip, useInitialValue as Ir, TagsArrayInput as Is, validateBasePaths as It, ValueError as Iu, CardinalityOneRelease as J, PresenceScopeProps as Ja, useCommentsEnabled as Jc, resolveSchemaTypes as Jd, ScrollEventHandler as Jf, isPerspectiveRaw as Ji, ArrayOfObjectsInputMember as Jl, ColorSchemeProviderProps as Jn, useManageFavorite as Jo, getDocumentIdForCanvasLink as Jp, useDocumentType as Jr, DateTimeInputProps as Js, useWorkspaceLoader as Jt, Event$1 as Ju, _isType as K, Preview as Ka, DocumentStatus as Kc, SchemaError as Kd, TextWithToneProps as Kf, defineSearchMachine as Ki, ArrayOfObjectsInputMembers as Kl, ColorSchemeLocalStorageProvider as Kn, useNumberFormat as Ko, ChangeIndicatorProps as Kp, useLoadable as Kr, EmailInputProps as Ks, ConfigErrorGate as Kt, FieldChange as Ku, sliceString as L, getPreviewValueWithFallback as La, DetailPreviewProps as Lc, isDev as Ld, OperationSuccess as Lf, SingleDocReleaseProvider as Li, ObjectMembers as Ll, SearchResultItemPreview as Ln, SyncState as Lo, COMMENTS_INSPECTOR_NAME as Lp, useInitialValueResolverContext as Lr, TagsArrayInputProps as Ls, validateNames as Lt, RevertChangesConfirmDialog as Lu, validateStructureNodeId as M, ReleaseAvatar as Ma, BlockImagePreview as Mc, useInStudioFeedback as Md, InitialValueLoadingMsg as Mf, isAgentBundleName as Mi, useParseErrorForPath as Ml, SearchButton as Mn, getCreatableVariantTarget as Mo, useCommentsTelemetry as Mp, useEventsStore as Mr, TextInput$1 as Ms, useDocumentPreviewValues as Mt, isGroupChange as Mu, useUnique as N, ReleaseAvatarIcon as Na, BlockImagePreviewProps as Nc, StudioFeedbackDialog as Nd, InitialValueMsg as Nf, useScheduledDraftsEnabled as Ni, useParseErrors as Nl, PartialIndexSettings as Nn, getPairTarget as No, useCommentsSelectedPath as Np, EventsProvider as Nr, TextInputProps as Ns, IsLastPaneProvider as Nt, isRemovedItemDiff as Nu, isReleaseVersion as O, useDocumentVersions as Oa, TemplatePreviewProps as Oc, UseFeedbackReturn as Od, listenQuery as Of, MockAuthStoreOptions as Oi, defaultRenderInput as Ol, StudioToolMenu as On, TargetScopeIdOptions as Oo, BetaBadgeProps as Op, DocumentPermission as Or, ArrayOfObjectsItem as Os, resolveInitialValueForType as Ot, useDocumentChange as Ou, useThrottledCallback as P, VersionChip as Pa, MediaPreview as Pc, StudioFeedbackDialogProps as Pd, InitialValueState as Pf, useScheduledDraftDocument as Pi, useReportParseError as Pl, useSearchMaxFieldDepth as Pn, getTargetScopeId as Po, hasCommentMessageValue as Pp, useEvents as Pr, TelephoneInput as Ps, DEFAULT_STUDIO_CLIENT_OPTIONS as Pt, isUnchangedDiff as Pu, measureFirstEmission as Q, useSetPerspective as Qa, useCommentsEnabled$1 as Qc, resolveConfig as Qd, RelativeTimeProps as Qf, createSchema as Qi, CreateReferenceOption as Ql, useColorSchemeSetValue as Qn, useGlobalCopyPasteElementHandler as Qo, useConnectionStatusStore as Qr, UniversalArrayInput as Qs, UpsellDescriptionSerializer as Qt, DiffString as Qu, truncateString as R, getPreviewPaths as Ra, DefaultPreview as Rc, isProd as Rd, emitOperation as Rf, useSingleDocRelease as Ri, ObjectMembersProps as Rl, SearchPopover as Rn, useSyncState as Ro, CommentInlineHighlightSpan as Rp, selectUpstreamVersion as Rr, StringInput as Rs, validateWorkspaces as Rt, RevertChangesButton as Ru, useVariantDocumentOperations as S, sortReleases as Sa, useRovingFocus as Sc, getAnnotationAtPath as Sd, DocumentStore as Sf, ErrorStatus as Si, connectionState as Sl, StudioFeedbackProvider as Sn, UseUnitFormatterOptions as So, AutoCollapseMenu as Sp, createGrantsStore as Sr, FormProviderProps as Ss, DEFAULT_MAX_RECURSION_DEPTH as St, FormFieldStatus as Su, VersionType as T, useIsReleaseActive as Ta, LinearProgress as Tc, visitDiff as Td, createDocumentStore as Tf, onRetry as Ti, defaultRenderBlock as Tl, parseStudioDiagnostics as Tn, TimeAgoOpts as To, DashboardLink as Tp, getDocumentValuePermissions as Tr, ALL_FIELDS_GROUP as Ts, isBuilder as Tt, FormField as Tu, joinPath as U, SanityDefaultPreview as Ua, Hotkeys$1 as Uc, DocumentGroupInventoryReferencePreviewLinkProps as Ud, ToastParams$1 as Uf, SearchMachineEmitted as Ui, MemberField as Ul, DiagnosticsReportProps as Un, useReconnectingToast as Uo, ChangeConnectorRoot as Up, LoadedState as Ur, NumberInput as Us, getWorkspaceIdentifier as Ut, FromToArrowDirection as Uu, escapeField as V, unstable_useObserveDocument as Va, CompactPreviewProps as Vc, DocumentGroupInventoryComponents as Vd, ZIndexContextValueKey as Vf, useSearchMachine as Vi, MemberFieldSet as Vl, Filters as Vn, DocumentField as Vo, CommentInputProps as Vp, ErrorState as Vr, SelectInput as Vs, useVisibleWorkspaces as Vt, MetaInfoProps as Vu, _isCustomDocumentTypeDefinition as W, SanityDefaultPreviewProps as Wa, HotkeysProps$1 as Wc, getConfigContextFromSource as Wd, TooltipOfDisabled as Wf, SearchMachineEvent as Wi, MemberFieldProps as Wl, StudioDiagnostics as Wn, useProjectId as Wo, ChangeConnectorRootProps as Wp, LoadingState as Wr, AssetAccessPolicy as Ws, WorkspaceLike as Wt, FromTo as Wu, isCardinalityOneRelease as X, DocumentPreviewPresenceProps as Xa, CommentsProvider as Xc, createSourceFromConfig as Xd, Resizable as Xf, compileFieldPath as Xi, ReferenceAutocomplete as Xl, useColorSchemeInternalValue as Xn, useListFormat as Xo, useCanvasNavigate as Xp, remoteSnapshots as Xr, DateInputProps as Xs, ErrorMessageProps as Xt, DiffTooltipProps as Xu, isCardinalityOnePerspective as Y, DocumentPreviewPresence as Ya, CommentsEnabledProvider as Yc, CreateWorkspaceFromConfigOptions as Yd, useOnScroll as Yf, getSearchableTypes as Yi, ArrayOfObjectsMemberProps as Yl, useColorScheme as Yn, UseListFormatOptions as Yo, useNavigateToCanvasDoc as Yp, validation as Yr, DateInput$1 as Ys, ErrorMessage as Yt, DiffTooltip as Yu, isPausedCardinalityOneRelease as Z, useSetVariant as Za, useCommentsMode$1 as Zc, createWorkspaceFromConfig as Zd, RelativeTime as Zf, getSchemaTypeTitle as Zi, CreateButton as Zl, useColorSchemeOptions as Zn, GlobalCopyPasteElementHandler as Zo, useComlinkStore as Zr, BooleanInput as Zs, InterpolationProp as Zt, DiffTooltipWithAnnotationsProps as Zu, getProviderTitle$1 as _, useDocumentVersionInfo as _a, AvatarSkeleton as _c, ChangeListProps as _d, ConfigPropertyErrorOptions as _f, ConnectedStatus as _i, useDocumentForm as _l, GenerateStudioManifestOptions as _n, useWorkspaceSchemaId as _o, ContextMenuButton as _p, useTimelineSelector as _r, ImageInputProps as _s, useUserColor as _t, FormFieldValidationInfo as _u, DEFAULT_DECORATORS as a, isDraftPerspective as aa, ArrayOfObjectsFunctions as ac, DiffErrorBoundary as ad, CorsProbeOutcome as af, useProjectStore as ai, CommentsList as al, StudioAnnouncementsDialog as an, isPerspectiveWriteable as ao, GetHookCollectionState as ap, matchWorkspace as ar, useDialogStack as as, globalScope as at, FieldActionsProps as au, encodeVariantLinkParam as b, useActiveReleases as ba, StatusButton as bc, useDiffAnnotationColor as bd, useZIndex as bf, ConnectionStatusStore as bi, useDocumentSyncState as bl, StudioManifest as bn, FormattableMeasurementUnit as bo, CollapseMenuButtonProps as bp, useTimelineStore as br, StudioFileInput as bs, LegacyThemeProps as bt, FormFieldValidationStatusProps as bu, ReconnectEvent as c, RELEASES_STUDIO_CLIENT_OPTIONS as ca, EditPortal as cc, DiffCard as cd, flattenConfig as cf, PresenceStore as ci, useDocumentOperation as cl, StudioProps as cn, useDocumentLimitsUpsellContext as co, ErrorWithId as cp, useCurrentUser as cr, useFormBuilder as cs, getReferencePaths as ct, FieldActionMenu as cu, SanityClient$1 as d, getReleaseTone as da, defineSingleton as dc, ChangeTitleSegment as dd, defineDocumentFieldAction as df, UserStore as di, useConditionalToast as dl, useRetryCountdown as dn, useI18nText as do, DocumentVersionsStatusIndicator as dp, useProject as dr, isArrayOfPrimitivesInputProps as ds, formatRelativeLocale as dt, useGetFormValue as du, ScheduledBadge as ea, ArrayOfPrimitivesFunctions as ec, DiffInspectWrapper as ed, AuthStoreOptions as ef, useDocumentStore as ei, CommentsIntentProvider as el, StudioProvider as en, getDefaultVariant as eo, PortalBoundaryProvider as ep, useAddonDataset as er, UseFormattedDurationOptions as es, isTruthy as et, getCalendarLabels as eu, TFunction$1 as f, getReleaseIdFromReleaseDocumentId as fa, PluginFactory as fc, ChangesError as fd, initialDocumentFieldActions as ff, UserStoreOptions as fi, decodePath as fl, createRequestErrorChannel as fn, defineLocale as fo, DocumentVersionsStatus as fp, createProjectStore as fr, isBooleanInputProps as fs, catchWithCount as ft, FormContainer as fu, createAuthStore as g, useReleasesIds as ga, defineConfig as gc, ChangeList as gd, ConfigPropertyError as gf, CONNECTING as gi, toMutationPatches as gl, LiveManifestRegisterProvider as gn, ValidationLocaleResourceKeys as go, Delay as gp, createKeyValueStore as gr, isStringInputProps as gs, createUserColorManager as gt, FormFieldValidationError as gu, WelcomeEvent as h, PUBLISHED as ha, createConfig as hc, GroupChange as hd, ConfigResolutionErrorOptions as hf, KeyValueStoreValue as hi, fromMutationPatches as hl, uploadSchema as hn, removeUndefinedLocaleResources as ho, isReleaseDocument as hp, useDocumentPresence as hr, isObjectItemProps as hs, UserColorManagerOptions as ht, FormFieldValidation as hu, DEFAULT_BLOCK_STYLES as i, getDocumentIsInPerspective as ia, ArrayOfObjectsInput as ic, FieldPreviewComponent as id, CorsCheckResult as if, usePresenceStore as ii, CommentsAuthoringPathProvider as il, isValidAnnouncementRole as in, PerspectiveNotWriteableReason as io, InsufficientPermissionsMessageProps as ip, MatchWorkspaceResult as ir, useEditState as is, isArray as it, useFieldActions as iu, StructureNodeIdValidationResult as j, ReleaseTitle as ja, BlockPreview as jc, UseInStudioFeedbackReturn as jd, InitialValueErrorMsg as jf, useAgentVersionDisplay as ji, ParseErrorsProvider as jl, SearchDialog as jn, TargetDocumentState as jo, buildCommentRangeDecorations as jp, useDocumentPairPermissionsFromHookFactory as jr, UrlInputProps as js, prepareTemplates as jt, isFieldChange as ju, isVariantVersion as k, VersionInlineBadge as ka, InlinePreview as kc, useFeedback as kd, InitialValueOptions as kf, createMockAuthStore as ki, defaultRenderItem as kl, StudioNavbar as kn, useTargetScopeId as ko, buildTextSelectionFromFragment as kp, getDocumentPairPermissions as kr, MemberItemProps as ks, defaultTemplateForType as kt, emptyValuesByType as ku, ReleaseDocument$1 as l, isReleasePerspective as la, useDocumentVersionTitle as lc, DiffCardProps as ld, getDocumentVersionType as lf, SESSION_ID as li, DocumentIdStack as ll, useStudioErrorHandler as ln, useGetI18nText as lo, ErrorActions as lp, useUser as lr, isArrayOfBlocksInputProps as ls, getErrorMessage as lt, FieldActionMenuProps as lu, WelcomeBackEvent as m, LATEST as ma, definePlugin as mc, ChangeResolverProps as md, ConfigResolutionError as mf, KeyValueStore as mi, MutationPatch as ml, renderStudio as mn, defineLocalesResources as mo, VersionInfoDocumentStub as mp, useGlobalPresence as mr, isObjectInputProps as ms, UserColorManagerProviderProps as mt, FormRow as mu, ConcreteRuleClass as n, EditScheduleForm as na, ArrayOfOptionsInput as nc, DiffFromTo as nd, RequestFailureDiagnostics as nf, useHistoryStore as ni, CommentsEnabledProvider$1 as nl, StudioLayoutComponent as nn, useExcludedPerspective as no, LoadingBlock as np, useActiveWorkspace as nr, useFilteredReleases as ns, isRecord as nt, useHoveredField as nu, DEFAULT_LIST_TYPES as o, isPublishedPerspective as oa, useDidUpdate as oc, DiffErrorBoundaryProps as od, WorkspacesProvider as of, useRenderingContextStore as oi, CommentDeleteDialog as ol, StudioAnnouncementsCard as on, getSelectedVariant as oo, serializeError as op, ActiveWorkspaceMatcher as or, useDataset as os, getTargetDocument as ot, FieldActionsResolver as ou, ValidationContext$1 as p, getReleaseDocumentIdFromReleaseId as pa, createPlugin as pc, ChangeResolver as pd, createDefaultIcon as pf, createUserStore as pi, encodePath as pl, passthroughErrorHandler as pn, defineLocaleResourceBundle as po, DocumentVersionIcons as pp, getProjectGrants as pr, isNumberInputProps as ps, UserColorManagerProvider as pt, FormCell as pu, createSWR as q, PresenceScope as qa, useCommentsMode as qc, SchemaErrorContext as qd, ScrollContextValue as qf, createSearch as qi, ArrayOfObjectsInputMembersProps as ql, ColorSchemeProvider as qn, UseManageFavoriteProps as qo, ChangeFieldWrapper as qp, DocumentTypeResolveState as qr, DateTimeInput as qs, WorkspaceLoaderBoundary as qt, FallbackDiff as qu, DEFAULT_ANNOTATIONS as r, formatRelativeLocalePublishDate as ra, ArrayOfObjectOptionsInput as rc, DiffFromToProps as rd, _createAuthStore as rf, useKeyValueStore as ri, CommentsProvider$1 as rl, isValidAnnouncementAudience as rn, ReleasesNav as ro, InsufficientPermissionsMessage as rp, MatchWorkspaceOptions as rr, useFeatureEnabled as rs, isNonNullable as rt, HoveredFieldProvider as ru, ImageUrlBuilder$1 as s, isReleaseScheduledOrScheduling as sa, EnhancedObjectDialog as sc, DiffErrorBoundaryState as sd, WorkspacesProviderProps as sf, useUserStore as si, useCanvasCompanionDoc as sl, Studio as sn, isDocumentLimitError as so, useCopyErrorDetails as sp, ActiveWorkspaceMatcherProps as sr, useClient as ss, getVariantPublishedSibling as st, FieldActionsProvider as su, useDocumentOperationEvent as t, useScheduleAction as ta, ArrayOfPrimitiveOptionsInput as tc, DiffInspectWrapperProps as td, CreateAuthStoreOptions as tf, useGrantsStore as ti, CommentsIntentProviderProps as tl, StudioProviderProps as tn, useGetDefaultPerspective as to, PopoverDialog as tp, AddonDatasetProvider as tr, useFormattedDuration as ts, isString as tt, CrossDatasetReferencePreview as tu, ResetEvent as u, isGoingToUnpublish as ua, DocumentGroupInventoryAction as uc, TIMELINE_ITEM_I18N_KEY_MAPPING as ud, documentFieldActionsReducer as uf, createPresenceStore as ui, useDocumentIdStack as ul, RequestErrorDialog as un, I18nNode as uo, ErrorActionsProps as up, useProjectDatasets as ur, isArrayOfObjectsInputProps as us, getDocumentVersionVariantId as ut, GetFormValueProvider as uu, SANITY_VERSION as v, useArchivedReleases as va, UserAvatar as vc, ChangeBreadcrumb as vd, useMiddlewareComponents as vf, ConnectingStatus as vi, DocumentSyncState as vl, generateStudioManifest as vn, useVersionRelease as vo, CommandList as vp, TimelineState as vr, StudioImageInput as vs, useUserColorManager as vt, FormFieldValidationWarning as vu, isDocumentInSelectedVariant as w, useOnlyHasVersions as wa, RovingFocusProps as wc, getDiffAtPath as wd, QueryParams$1 as wf, createConnectionStatusStore as wi, defaultRenderAnnotation as wl, StudioDiagnosticsBridgeApi as wn, useTools as wo, CollapseMenuProps as wp, DocumentValuePermissionsOptions as wr, createSanityMediaLibraryImageSource as ws, Serializeable as wt, FormFieldSetProps as wu, useAllVariants as x, RELEASES_INTENT as xa, StatusButtonProps as xc, DiffVisitor as xd, WithReferringDocuments as xf, ConnectionStatusStoreOptions as xi, ConnectionState as xl, StudioWorkspaceManifest as xn, UnitFormatter as xo, CommonProps as xp, GrantsStoreOptions as xr, FormProvider as xs, LegacyThemeTints as xt, FieldStatusProps as xu, getVariantTitle as y, useAllReleases as ya, UserAvatarProps as yc, useAnnotationColor as yd, ZIndexProvider as yf, ConnectionStatus as yi, deriveDocumentSyncState as yl, ManifestWorkspaceInput as yn, useValidationStatus as yo, CollapseMenuButton as yp, TimelineStore as yr, FileInputProps as ys, buildLegacyTheme as yt, FormFieldValidationStatus as yu, uncaughtErrorHandler as z, unstable_useValuePreview as za, DefaultPreviewProps as zc, DocumentGroupInventory as zd, operationEvents as zf, SearchMachineState as zi, ObjectInputMember as zl, SearchPopoverProps as zn, useStudioUrl as zo, CommentInput as zp, isNewDocument as zr, SlugInput as zs, useWorkspaces as zt, NoChanges as zu };
//# sourceMappingURL=useDocumentOperationEvent-CBElS3ik.d.ts.map