/// import {$Tuple} from 'react-i18next/helpers' import {ArrayDiff as ArrayDiff_2} from '@sanity/diff' import {ArraySchemaType} from '@sanity/types' import {AssetMetadataType} from '@sanity/types' import {AssetSource} from '@sanity/types' import {AssetSourceSpec} from '@sanity/types' import {AvatarPosition} from '@sanity/ui' import {AvatarProps} from '@sanity/ui' import {AvatarSize} from '@sanity/ui' import {AvatarStatus} from '@sanity/ui' import {BadgeProps} from '@sanity/ui' import {BifurClient} from '@sanity/bifur-client' import {BlockDecoratorDefinition} from '@sanity/types' import {BlockListDefinition} from '@sanity/types' import {BlockStyleDefinition} from '@sanity/types' import {BooleanDiff as BooleanDiff_2} from '@sanity/diff' import {BooleanSchemaType} from '@sanity/types' import {BoxProps} from '@sanity/ui' import {BrowserHistory} from 'history' import {ButtonProps as ButtonProps_2} from '@sanity/ui' import {ButtonTone} from '@sanity/ui' import {CardProps} from '@sanity/ui' import {ClientConfig} from '@sanity/client' import {ClientPerspective} from '@sanity/client' import {ColorHueKey} from '@sanity/color' import {ColorTintKey} from '@sanity/color' import {ColorTints} from '@sanity/color' import {Component} from 'react' import {ComponentProps} from 'react' import {ComponentType} from 'react' import {ConditionalProperty} from '@sanity/types' import {Context} from 'react' import {CrossDatasetReferenceSchemaType} from '@sanity/types' import {CrossDatasetReferenceValue} from '@sanity/types' import {CrossDatasetType} from '@sanity/types' import {CSSProperties} from 'react' import {CurrentUser} from '@sanity/types' import {DefinedTelemetryLog} from '@sanity/telemetry' import {DeprecatedProperty} from '@sanity/types' import {DialogProps} from '@sanity/ui' import {Diff as Diff_2} from '@sanity/diff' import {Dispatch} from 'react' import {EditorChange} from '@sanity/portable-text-editor' import {EditorSelection} from '@sanity/portable-text-editor' import {ElementType} from 'react' import {ExecutionProps} from 'styled-components' import {FallbackNs} from 'react-i18next' import {FieldActionsContextValue} from 'sanity/_singletons' import {File as File_2} from '@sanity/types' import {FileAsset} from '@sanity/types' import {FileSchemaType} from '@sanity/types' import {FileValue} from '@sanity/types' import {FlatNamespace} from 'i18next' import {FocusEvent as FocusEvent_2} from 'react' import {FocusEventHandler} from 'react' import {FormEvent} from 'react' import {FormEventHandler} from 'react' import {FormNodeValidation} from '@sanity/types' import {ForwardRefExoticComponent} from 'react' import {GeopointValue} from '@sanity/types' import {HashHistory} from 'history' import {History as History_2} from 'history' import {HotkeyOptions} from '@sanity/portable-text-editor' import {HotkeysProps as HotkeysProps_2} from '@sanity/ui' import {HoveredFieldContextValue} from 'sanity/_singletons' import {HTMLAttributes} from 'react' import {HTMLProps} from 'react' import {i18n} from 'i18next' import {I18nTextRecord} from '@sanity/types' import {Image as Image_2} from '@sanity/types' import {ImageAsset} from '@sanity/types' import {ImageSchemaType} from '@sanity/types' import type imageUrlBuilder from '@sanity/image-url' import {ImageUrlFitMode} from '@sanity/types' import {ImageValue} from '@sanity/types' import {IndexTuple} from '@sanity/types' import {InitialValueProperty} from '@sanity/types' import {InitialValueResolverContext} from '@sanity/types' import {IntentLinkProps} from 'sanity/router' import {IntentParameters} from 'sanity/router' import {IntrinsicTypeName} from '@sanity/types' import {ItemDiff as ItemDiff_2} from '@sanity/diff' import {JSX as JSX_2} from 'react' import {JSXElementConstructor} from 'react' import {KeyboardEvent as KeyboardEvent_2} from 'react' import {KeyedSegment} from '@sanity/types' import {KeyPrefix} from 'i18next' import {LocaleContextValue} from 'sanity/_singletons' import {MemoizedFunction} from 'lodash' import {MemoryHistory} from 'history' import {MendozaEffectPair} from '@sanity/types' import {MenuButtonProps as MenuButtonProps_2} from '@sanity/ui' import {MutableRefObject} from 'react' import {Mutation} from '@sanity/mutator' import {NamedExoticComponent} from 'react' import {Namespace} from 'i18next' import {NullDiff as NullDiff_2} from '@sanity/diff' import {NumberDiff as NumberDiff_2} from '@sanity/diff' import {NumberSchemaType} from '@sanity/types' import {ObjectDiff as ObjectDiff_2} from '@sanity/diff' import {ObjectField} from '@sanity/types' import {ObjectFieldType} from '@sanity/types' import {ObjectSchemaType} from '@sanity/types' import {Observable} from 'rxjs' import {OnCopyFn} from '@sanity/portable-text-editor' import {OnPasteFn} from '@sanity/portable-text-editor' import {OperatorFunction} from 'rxjs' import {PatchOperations} from '@sanity/types' import {Path} from '@sanity/types' import {PathSegment} from '@sanity/types' import {Placement} from '@sanity/ui' import {PopoverProps as PopoverProps_2} from '@sanity/ui' import {PortableTextBlock} from '@sanity/types' import {PortableTextEditor} from '@sanity/portable-text-editor' import {PortableTextObject} from '@sanity/types' import {PortableTextTextBlock} from '@sanity/types' import {PrepareViewOptions} from '@sanity/types' import {PreviewConfig} from '@sanity/types' import {PreviewValue} from '@sanity/types' import {PropsWithChildren} from 'react' import {PureComponent} from 'react' import {RangeDecoration} from '@sanity/portable-text-editor' import {ReactChild} from 'react' import {ReactElement} from 'react' import {ReactNode} from 'react' import {RefAttributes} from 'react' import {Reference} from '@sanity/types' import {ReferenceSchemaType} from '@sanity/types' import {ReferenceValue} from '@sanity/types' import {RenderBlockFunction} from '@sanity/portable-text-editor' import {ResizeObserverEntry as ResizeObserverEntry_2} from '@juggle/resize-observer' import {ResponsivePaddingProps} from '@sanity/ui' import {ResponsiveWidthProps} from '@sanity/ui' import {Role} from '@sanity/types' import {RootTheme} from '@sanity/ui/theme' import {Router} from 'sanity/router' import {RouterState} from 'sanity/router' import {SanityClient} from '@sanity/client' import {SanityDocument} from '@sanity/types' import {SanityDocument as SanityDocument_2} from '@sanity/client' import {SanityDocumentLike} from '@sanity/types' import {Schema} from '@sanity/types' import {SchemaType} from '@sanity/types' import {SchemaTypeDefinition} from '@sanity/types' import {ScrollToOptions as ScrollToOptions_2} from '@tanstack/react-virtual' import {SetStateAction} from 'react' import {SlugSchemaType} from '@sanity/types' import {SlugValue} from '@sanity/types' import {SortOrdering} from '@sanity/types' import {StringDiff as StringDiff_2} from '@sanity/diff' import {StringSchemaType} from '@sanity/types' import {StringSegmentChanged as StringSegmentChanged_2} from '@sanity/diff' import {StringSegmentUnchanged as StringSegmentUnchanged_2} from '@sanity/diff' import {Subject} from 'rxjs' import {Subscriber} from 'nano-pubsub' import {SVGProps} from 'react' import {Text as Text_2} from '@sanity/ui' import {TextProps} from '@sanity/ui' import {TextSchemaType} from '@sanity/types' import {TFunction} from 'i18next' import {ThemeColorSchemeKey} from '@sanity/ui/theme' import {ThemeColorSchemeKey as ThemeColorSchemeKey_2} from '@sanity/ui' import {ThrottleSettings} from 'lodash' import {TooltipProps as TooltipProps_2} from '@sanity/ui' import {TransactionLogEventWithEffects} from '@sanity/types' import {TransactionLogEventWithMutations} from '@sanity/types' import {TypeChangeDiff as TypeChangeDiff_2} from '@sanity/diff' import {UploadState} from '@sanity/types' import {User} from '@sanity/types' import {ValidationMarker} from '@sanity/types' /** @internal */ export declare function __tmp_wrap_presenceStore(context: { bifur: BifurClient connectionStatusStore: ConnectionStatusStore userStore: UserStore }): PresenceStore /** * @hidden * @beta */ export declare interface ActionComponent { (props: ActionProps): DocumentActionDescription | null } /** @internal */ export declare type ActionHook = (args: T) => K | null /** * @hidden * @beta */ export declare interface ActiveToolLayoutProps { renderDefault: (props: ActiveToolLayoutProps) => React.ReactElement activeTool: Tool } /** @internal */ export declare function ActiveWorkspaceMatcher({ children, LoadingComponent, NotFoundComponent, unstable_history: historyProp, }: ActiveWorkspaceMatcherProps): JSX_2.Element /** @internal */ export declare interface ActiveWorkspaceMatcherContextValue { activeWorkspace: WorkspaceSummary setActiveWorkspace: (workspaceName: string) => void } /** @internal */ export declare interface ActiveWorkspaceMatcherProps { children: ReactNode unstable_history?: RouterHistory NotFoundComponent: ComponentType<{ onNavigateToDefaultWorkspace: () => void }> LoadingComponent: ComponentType } /** * @beta * @hidden */ export declare interface AddonDatasetContextValue { /** * Addon dataset client, currently called `comments` dataset. */ client: SanityClient | null isCreatingDataset: boolean /** * Function to create the addon dataset if it does not exist. */ createAddonDataset: () => Promise ready: boolean } /** * 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 */ export declare function AddonDatasetProvider(props: AddonDatasetSetupProviderProps): JSX_2.Element declare interface AddonDatasetSetupProviderProps { children: React.ReactNode } /** * @hidden * @beta */ export declare type Annotation = AnnotationDetails | null /** * Annotation connected to a change * * * @hidden * @beta */ export declare type AnnotationDetails = { chunk: Chunk timestamp: string author: string } /** * @hidden * @beta */ export declare interface ApiConfig { projectId: string dataset: string } /** @internal */ export declare type ArrayDiff = ArrayDiff_2 /** * @hidden * @public */ export declare interface ArrayFieldProps extends BaseFieldProps { schemaType: ArraySchemaType value: unknown[] | undefined collapsed?: boolean collapsible?: boolean onCollapse: () => void onExpand: () => void inputProps: ArrayOfObjectsInputProps } /** * These are the props an implementation of the ArrayFunctions component will receive * * * @hidden * @beta */ export declare interface ArrayInputFunctionsProps { children?: ReactNode onItemAppend: (itemValue: Item) => void onChange: (event: PatchEvent) => void onValueCreate: (type: SchemaType) => Item onItemPrepend: (itemValue: Item) => void readOnly?: boolean schemaType: SchemaType value?: Item[] } /** * @hidden * @beta */ export declare interface ArrayInputInsertEvent { items: Item[] position: 'before' | 'after' referenceItem: KeyedSegment | number skipInitialValue?: boolean open?: boolean } /** * @hidden * @beta */ export declare interface ArrayInputMoveItemEvent { fromIndex: number toIndex: number } /** * @hidden * @beta */ export declare interface ArrayItemError { kind: 'error' key: string index: number error: InvalidItemTypeError } /** * Diff extensions for presentational concerns * * @internal */ export declare interface ArrayItemMetadata { fromType?: SchemaType toType?: SchemaType } /** * @hidden * Array of predefined object options input * Note: this input can handle only object values * * * @hidden * @beta */ export declare function ArrayOfObjectOptionsInput(props: ArrayOfObjectsInputProps): JSX_2.Element /** * * @hidden * @beta */ export declare interface ArrayOfObjectsComponents { annotation?: ComponentType block?: ComponentType diff?: ComponentType field?: ComponentType inlineBlock?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** @public */ export declare interface ArrayOfObjectsFormNode< T extends any[] = unknown[], S extends ArraySchemaType = ArraySchemaType, > extends BaseFormNode { /** The focus path of the form node. */ focusPath: Path /** * @hidden * @beta */ members: ArrayOfObjectsMember[] } /** * @hidden * @beta */ export declare function ArrayOfObjectsFunctions< Item extends ObjectItem, SchemaType extends ArraySchemaType, >(props: ArrayInputFunctionsProps): JSX_2.Element /** * * @hidden * @beta */ export declare function ArrayOfObjectsInput(props: ArrayOfObjectsInputProps): JSX_2.Element /** * Convenience component for rendering an "array of objects"-item * @internal */ export declare function ArrayOfObjectsInputMember( props: ArrayOfObjectsMemberProps, ): JSX_2.Element | null /** * Convenience component for wrapping an array of objects * @internal */ export declare function ArrayOfObjectsInputMembers( props: ArrayOfObjectsInputMembersProps, ): JSX_2.Element /** @internal */ export declare interface ArrayOfObjectsInputMembersProps { members: ArrayOfObjectsMember[] renderAnnotation?: RenderAnnotationCallback renderBlock?: RenderBlockCallback renderInlineBlock?: RenderBlockCallback renderInput: RenderInputCallback renderField: RenderFieldCallback renderItem: RenderArrayOfObjectsItemCallback renderPreview: RenderPreviewCallback } /** * @hidden * @public */ export declare interface ArrayOfObjectsInputProps< T extends { _key: string } = { _key: string }, S extends ArraySchemaType = ArraySchemaType, > extends BaseInputProps, ArrayOfObjectsFormNode { /** * @hidden * @beta */ arrayFunctions?: ComponentType> /** * @hidden * @beta */ onChange: (patch: FormPatch | FormPatch[] | PatchEvent) => void /** * @hidden * @beta */ onItemAppend: (item: T) => void /** * @hidden * @beta */ onItemPrepend: (item: T) => void /** * @hidden * @beta */ onItemRemove: (itemKey: string) => void /** * @hidden * @beta */ onItemMove: (event: ArrayInputMoveItemEvent) => void /** * @hidden * @beta */ onInsert: (event: ArrayInputInsertEvent) => void /** * @hidden * @beta */ resolveInitialValue: (type: SchemaType, params: Record) => Promise /** * @hidden * @beta */ resolveUploader: UploaderResolver /** * @hidden * @beta */ onUpload: (event: UploadEvent) => void /** * @hidden * @beta */ onPathFocus: (path: Path, payload?: OnPathFocusPayload) => void /** * for array inputs using expand/collapse semantics for items * * @hidden * @beta */ onItemCollapse: (itemKey: string) => void /** * @hidden * @beta */ onItemExpand: (itemKey: string) => void /** * for array inputs using modal open/close semantics for items * * @hidden * @beta */ onItemOpen: (path: Path) => void /** * @hidden * @beta */ onItemClose: () => void /** * @hidden * @beta */ renderAnnotation?: RenderAnnotationCallback /** * @hidden * @beta */ renderBlock?: RenderBlockCallback /** * @hidden * @beta */ renderInlineBlock?: RenderBlockCallback /** * @hidden * @beta */ renderField: RenderFieldCallback /** * @hidden * @beta */ renderInput: RenderInputCallback /** * @hidden * @beta */ renderItem: RenderArrayOfObjectsItemCallback /** * @hidden * @beta */ renderPreview: RenderPreviewCallback /** * @hidden * @beta */ elementProps: ComplexElementProps } /** * * @hidden * @beta */ export declare function ArrayOfObjectsItem(props: MemberItemProps): JSX_2.Element /** * @hidden * @beta */ export declare interface ArrayOfObjectsItemMember< Node extends ObjectArrayFormNode = ObjectArrayFormNode, > { kind: 'item' key: string index: number collapsed: boolean | undefined collapsible: boolean | undefined open: boolean parentSchemaType: ArraySchemaType /** * @hidden * @beta */ item: Node } /** * @hidden * @beta */ export declare type ArrayOfObjectsMember = ArrayOfObjectsItemMember | ArrayItemError /** @internal */ export declare interface ArrayOfObjectsMemberProps { member: ArrayOfObjectsMember renderAnnotation?: RenderAnnotationCallback renderBlock?: RenderBlockCallback renderField: RenderFieldCallback renderInlineBlock?: RenderBlockCallback renderInput: RenderInputCallback renderItem: RenderArrayOfObjectsItemCallback renderPreview: RenderPreviewCallback } /** * * @hidden * @beta */ export declare function ArrayOfOptionsInput( props: ArrayOfObjectsInputProps | ArrayOfPrimitivesInputProps, ): JSX_2.Element /** * Array of predefined primitive options input * Note: this input can only handle primitive values * * * @hidden * @beta */ export declare function ArrayOfPrimitiveOptionsInput( props: ArrayOfPrimitivesInputProps, ): JSX_2.Element /** * * @hidden * @beta */ export declare interface ArrayOfPrimitivesComponents { diff?: ComponentType field?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** * @hidden * @beta */ export declare type ArrayOfPrimitivesElementType = T extends (infer K)[] ? K : unknown /** * @hidden * @public */ export declare interface ArrayOfPrimitivesFieldProps extends BaseFieldProps { schemaType: ArraySchemaType value: unknown[] | undefined collapsed?: boolean collapsible?: boolean onCollapse: () => void onExpand: () => void inputProps: ArrayOfPrimitivesInputProps } /** @public */ export declare interface ArrayOfPrimitivesFormNode< T extends (string | number | boolean)[] = (string | number | boolean)[], S extends ArraySchemaType = ArraySchemaType, > extends BaseFormNode { /** The focus path of the form node. */ focusPath: Path /** * @hidden * @beta */ members: ArrayOfPrimitivesMember[] } /** * @hidden * @beta */ export declare function ArrayOfPrimitivesFunctions< MemberType extends string | boolean | number, SchemaType extends ArraySchemaType, >(props: ArrayInputFunctionsProps): JSX_2.Element /** * Note: this should be a class component until React provides support for a hook version of getSnapshotBeforeUpdate * * @hidden * @beta */ export declare class ArrayOfPrimitivesInput extends PureComponent< ArrayOfPrimitivesInputProps, State > { _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: PathSegment restoreSelection: { text: string start: number | null end: number | null value: string } } | { prevFocusedIndex?: undefined restoreSelection?: undefined } | null componentDidUpdate( prevProps: ArrayOfPrimitivesInputProps, prevState: Record, snapshot?: { restoreSelection: { start: number end: number } prevFocusedIndex: number }, ): void renderArrayItem: (props: Omit) => JSX_2.Element render(): JSX_2.Element } /** * @hidden * @public */ export declare interface ArrayOfPrimitivesInputProps< T extends string | boolean | number = string | boolean | number, S extends ArraySchemaType = ArraySchemaType, > extends BaseInputProps, ArrayOfPrimitivesFormNode { /** * @hidden * @beta */ arrayFunctions?: ComponentType> onSetCollapsed: (collapsed: boolean) => void /** * @hidden * @beta */ onChange: (patch: FormPatch | FormPatch[] | PatchEvent) => void /** * @hidden * @beta */ onItemAppend: (item: ArrayOfPrimitivesElementType) => void /** * @hidden * @beta */ onItemPrepend: (item: ArrayOfPrimitivesElementType) => void /** * @hidden * @beta */ onItemRemove: (index: number) => void /** * @hidden * @beta */ onMoveItem: (event: ArrayInputMoveItemEvent) => void /** * @hidden * @beta */ onInsert: (event: {items: T[]; position: 'before' | 'after'; referenceIndex: number}) => void /** * @hidden * @beta */ resolveUploader: UploaderResolver /** * @hidden * @beta */ onUpload: (event: UploadEvent) => void /** * @hidden * @beta */ onIndexFocus: (index: number) => void /** * @hidden * @beta */ renderAnnotation?: RenderAnnotationCallback /** * @hidden * @beta */ renderBlock?: RenderBlockCallback /** * @hidden * @beta */ renderInlineBlock?: RenderBlockCallback /** * @hidden * @beta */ renderInput: RenderInputCallback /** * @hidden * @beta */ renderItem: RenderArrayOfPrimitivesItemCallback /** * @hidden * @beta */ renderPreview: RenderPreviewCallback /** * @hidden * @beta */ elementProps: ComplexElementProps } /** * * @hidden * @beta */ export declare function ArrayOfPrimitivesItem(props: PrimitiveMemberItemProps): JSX_2.Element /** * @hidden * @beta */ export declare interface ArrayOfPrimitivesItemMember< Node extends PrimitiveFormNode = PrimitiveFormNode, > { kind: 'item' key: string index: number open: boolean parentSchemaType: ArraySchemaType /** * @hidden * @beta */ item: Node } /** * @hidden * @beta */ export declare type ArrayOfPrimitivesMember = ArrayOfPrimitivesItemMember | ArrayItemError /** @internal */ export declare function asLoadable(): OperatorFunction> /** * @hidden * @beta */ export declare type AssetSourceResolver = ComposableOption /** * @hidden * @beta */ export declare type AsyncComposableOption = ( prev: TValue, context: TContext, ) => Promise /** @internal */ export declare type AsyncConfigPropertyReducer = ( prev: TValue, config: PluginOptions, context: TContext, ) => TValue | Promise /** * Authentication options * * @public */ export declare interface AuthConfig { /** * Login method to use for the studio. Can be one of: * - `dual` (default) - attempt to use cookies where possible, falling back to * storing authentication token in `localStorage` otherwise * - `cookie` - explicitly disable `localStorage` method, relying only on cookies. May fail due * to cookies being treated as third-party cookies in some browsers, thus the default is `dual`. * - `token` - explicitly disable cookies, relying only on `localStorage` method */ loginMethod?: LoginMethod /** * Whether to append the providers specified in `providers` with the default providers from the * API, or replace the default providers with the ones specified. * * @deprecated Use the function form of `providers` instead for more control */ mode?: 'append' | 'replace' /** * If true, the "Choose login provider" (eg "Google, "GitHub", "E-mail/password") screen * will be skipped if only a single provider is configured in the `providers` array - * instead it will redirect unauthenticated users straight to the authenticatino URL. */ redirectOnSingle?: boolean /** * Array of authentication providers to use, or a function that takes an array of default * authentication providers (fetched from the Sanity API) and should return a new list of * providers. This can be used to selectively replace, add or remove providers from the * list of choices. * * @remarks If a static array of providers is provided, the `mode` property is taken into account * when determining what to do with it - `append` will append the providers to the default set * of providers, while `replace` will replace the default providers with the ones specified. * * If not set, the default providers will be used. */ providers?: AuthProvider[] | ((prev: AuthProvider[]) => AuthProvider[] | Promise) /** * The API hostname for requests. Should usually be left undefined, * but can be set if using custom cname for API domain. */ apiHost?: string } /** * A provider of authentication. * * By default, a list of providers for a project will be fetched from the * {@link https://api.sanity.io/v1/auth/providers | Sanity API}, but you may choose to limit this * list by explicitly defining the providers you want to allow, or add additional custom providers * that conforms to the authentication provider specification outlined in * {@link https://www.sanity.io/docs/third-party-login | the documentation}. * * @public */ export declare interface AuthProvider { /** * URL-friendly identifier/name for the provider, eg `github` */ name: string /** * Human friendly title for the provider, eg `GitHub` */ title: string /** * URL for the authentication endpoint that will trigger the authentication flow */ url: string /** * URL for a logo to display next to the provider in the login screen */ logo?: string } /** * The unit an `AuthStore` emits to determine the user's authentication state. * * @beta * @hidden */ export declare interface AuthState { /** * Similar to a logged-in flag. This state is used in places like the * `AuthBoundary` to determine whether or not it should render the * `NotAuthenticatedComponent`. Implementers may choose to set this to `true` * while also also emitting a `currentUser` of `null` if a `null` user is * accepted (e.g. a project that doesn't require a login) */ authenticated: boolean /** * The value of the user logged in or `null` if none is provided */ currentUser: CurrentUser | null /** * A client that is expected to be pre-configured to allow for any downstream * requests in the Studio */ client: SanityClient } /** * The interface used by the Studio that produces a `SanityClient` and * `CurrentUser` that gets passed to the resulting `Workspace`s and `Source`s. * * NOTE: This interface is primarily for internal use. Refer to * `createAuthStore` instead. * * @beta * @hidden */ export declare interface AuthStore { /** * Emits `AuthState`s. This should update when the user's auth state changes. * E.g. After a login, a new `AuthState` could be emitted with a non-null * `currentUser` and `authenticated: true` * * NOTE: all auth store implementations should emit on subscribe using * something like shareReplay(1) to ensure all new subscribers get an * `AuthState` value on subscribe */ state: Observable /** * Emits auth tokens, or `null` if not configured to use them or they do not exist */ token?: Observable /** * Custom auth stores are expected to implement a UI that initiates the user's * authentication. For the typical case in `createAuthStore`, this means * loading the providers and showing them as options to the user. */ LoginComponent?: ComponentType /** * Custom auth stores can implement a function that runs when the user logs * out. The implementation is expected to remove all credentials both locally * and on the server. */ logout?: () => void /** * Custom auth stores can implement a function that is designated to run when * the Studio loads (e.g. to trade a session ID for a token in cookie-less * mode). Within the Studio, this is called within the `AuthBoundary`. */ handleCallbackUrl?: () => Promise } /** @internal */ export declare interface AuthStoreOptions extends AuthConfig { clientFactory?: (options: ClientConfig) => SanityClient projectId: string dataset: string } /** @internal */ export declare const AutoCollapseMenu: ForwardRefExoticComponent< Omit & { menuOptions: ReactElement[] } & RefAttributes > /** @internal */ export declare type AvailabilityReason = 'READABLE' | 'PERMISSION_DENIED' | 'NOT_FOUND' /** @internal */ export declare interface AvailabilityResponse { omitted: { id: string reason: 'existence' | 'permission' }[] } declare type BaseButtonProps = Pick< ButtonProps_2, | 'as' | 'icon' | 'iconRight' | 'justify' | 'loading' | 'mode' | 'paddingY' | 'selected' | 'tone' | 'type' | 'width' > & { size?: 'default' | 'large' } /** * @hidden * @public */ export declare interface BaseFieldProps { /** @beta */ actions?: DocumentFieldAction[] /** @internal @deprecated DO NOT USE */ __internal_comments?: FieldCommentsProps /** @internal @deprecated ONLY USED BY AI ASSIST PLUGIN */ __internal_slot?: ReactNode schemaType: SchemaType title: string | undefined description: string | undefined /** * @hidden * @beta */ presence: FormNodePresence[] validation: FormNodeValidation[] level: number inputId: string value: unknown | undefined path: Path name: string index: number changed: boolean children: ReactNode renderDefault: (props: FieldProps) => ReactElement } /** * @hidden * @beta */ declare interface BaseFileInputProps extends ObjectInputProps { assetSources: AssetSource[] directUploads?: boolean observeAsset: (documentId: string) => Observable resolveUploader: UploaderResolver client: SanityClient t: (key: string, values?: Record) => string } /** * @hidden * @beta */ declare interface BaseFileInputValue extends Partial { _upload?: UploadState } /** * @hidden * @public */ export declare interface BaseFormNode { /** The unique identifier of the node. */ id: string /** The schema type of the node. */ schemaType: S /** The level of the node in the form hierarchy. */ level: number /** The path of the node in the form hierarchy. */ path: Path /** * @hidden * @beta */ presence: FormNodePresence[] /** The validation markers of the node. */ validation: FormNodeValidation[] /** The value of the node. */ value: T | undefined /** Whether the node is read-only. */ readOnly?: boolean /** Whether the node is focused. */ focused?: boolean /** Whether the node has changes in a draft. */ changed: boolean } /** * @hidden * @beta */ declare interface BaseImageInputProps extends ObjectInputProps { assetSources: AssetSource[] directUploads?: boolean imageUrlBuilder: ImageUrlBuilder observeAsset: (documentId: string) => Observable resolveUploader: UploaderResolver client: SanityClient t: (key: string, values?: Record) => string } /** * @hidden * @beta */ declare interface BaseImageInputValue extends Partial { _upload?: UploadState } /** * @hidden * @public */ export declare interface BaseInputProps { renderDefault: (props: InputProps) => ReactElement } /** * Props for the base item component. * * @public */ export declare interface BaseItemProps { /** The schema type of the item. */ schemaType: SchemaType /** The key of the item. */ key: string /** The index of the item. */ index: number /** The level of the item. */ level: number /** The value of the item. */ value: unknown /** The path of the item. */ path: Path /** The title of the item. */ title: string | undefined /** The description of the item. */ description: string | undefined /** The ID of the input element. */ inputId: string /** The function to call when the item receives focus. */ onFocus: (event: FocusEvent_2) => void /** The function to call when the item loses focus. */ onBlur: (event: FocusEvent_2) => void /** Whether the item is read-only. */ readOnly?: boolean /** Whether the item is focused. */ focused?: boolean /** The function to call when the item is removed. */ onRemove: () => void /** * @hidden * @beta */ onInsert: (event: Omit, 'referenceItem'>) => void /** The children of the item. */ children: ReactNode /** The validation markers for the item. */ validation: FormNodeValidation[] /** * @hidden * @beta */ presence: FormNodePresence[] /** The function to call to render the default item. See {@link ItemProps} */ renderDefault: (props: ItemProps) => ReactElement } /** @internal */ export declare function BetaBadge( props: BetaBadgeProps & Omit, 'ref'>, ): JSX_2.Element /** @internal */ export declare type BetaBadgeProps = Omit /** * Props for rendering a Portable Text annotation * * @public * @remarks If you want to render a mix of the annotated text and non-text content, you have to attribute * the non-text containers with `contentEditable={false}`. See the second example. * @example Simple example of customizing the annotation text to render yellow. * ```ts * (props: BlockAnnotationProps) => * props.renderDefault({ * ...props, * textElement: {props.textElement}, * }) * ``` * @example Simple example of rendering the annotation with a custom modal for editing. * Note that the form content container is attributed as `contentEditable={false}`. * This is to signal to the text editor that this content isn't part of the editable text. * ```ts * (props: BlockAnnotationProps) => { * return ( * <> * // Render the annotated text * * {props.textElement} * * // Render the editing form if the object is opened * {props.open && ( * * * {props.children} * * * )} * * ) * } * ``` * */ export declare interface BlockAnnotationProps { /** * Boundary element of the floating toolbar element. */ __unstable_floatingBoundary: HTMLElement | null /** * Boundary element where the text for this annotation appears. */ __unstable_referenceBoundary: HTMLElement | null /** * DOM element for the annotated text. */ __unstable_referenceElement: HTMLElement | null /** * Wether the annotated text node has editor focus. * @remarks differs from `focused` which is wether the annotation object has form focus. */ __unstable_textElementFocus?: boolean /** * The input form for the annotation object. * @remarks If you wrap this in something, you must make sure to put `contentEditable={false}` on the root container. * Otherwise the editor will think content is part of the editable text and will error. */ children: ReactNode /** * If the editor form for this annotation object currently have form focus. */ focused: boolean /** * Markers (meta data) connected to this annotation. * @deprecated - use `renderBlock` and `renderInlineBlock` interfaces instead */ markers: PortableTextMarker[] /** * Closes the editing form connected to this annotation. */ onClose: () => void /** * Opens the editing form connected to this annotation. */ onOpen: () => void /** * Focus a form node in the object for this annotation. * @param path - the relative path to the form node to put focus on. */ onPathFocus: (path: Path) => void /** * Removes the annotation object from the text. */ onRemove: () => void /** * If the annotation is currently opened for editing. */ open: boolean /** * The parent schema type. For annotations this this the block type. */ parentSchemaType: SchemaType /** * The full form path to this annotation from document root. */ path: Path /** * Form presence for this annotation. */ presence: FormNodePresence[] /** * Is the annotation object read only? */ readOnly: boolean /** * Plugin chain render callback. */ renderAnnotation?: RenderAnnotationCallback /** * Plugin chain render callback. */ renderBlock?: RenderBlockCallback /** * Plugin chain render callback. */ renderDefault: (props: BlockAnnotationProps) => ReactElement /** * Plugin chain render callback. */ renderField: RenderFieldCallback /** * Plugin chain render callback. */ renderInlineBlock?: RenderBlockCallback /** * Plugin chain render callback. */ renderInput: RenderInputCallback /** * Plugin chain render callback. */ renderItem: RenderArrayOfObjectsItemCallback /** * Plugin chain render callback. */ renderPreview: RenderPreviewCallback /** * The schema type for the annotation object. */ schemaType: ObjectSchemaType & { i18nTitleKey?: string } /** * If the annotated text currently is selected by the user. */ selected: boolean /** * React element of the text that is being annotated. */ textElement: ReactElement /** * Form validation for the annotation object. */ validation: FormNodeValidation[] /** * Value of the annotation object. */ value: PortableTextObject } /** * Props for rendering text decorations in Portable Text blocks. * It could be decorations like bold, italic, subscript etc. * * @public */ export declare interface BlockDecoratorProps { /** * The span node as rendered without the decorator. */ children: ReactElement /** * If the span node currently is focused by the user. */ focused: boolean /** * The default render function for this decorator, * some decorators are proved by default and has a default rendering. */ renderDefault: (props: BlockDecoratorProps) => ReactElement /** * The decorator schema type. Icon can be found here. */ schemaType: BlockDecoratorDefinition /** * If the span node text currently is selected by the user. */ selected: boolean /** * The title of the decorator (e.g. 'Underlined text') for UI-representation. */ title: string /** * The value of the decorator (e.g. 'underlined') as it * appears in the child.marks array of the text node. */ value: string } /** * @hidden * @beta */ export declare function BlockImagePreview(props: BlockImagePreviewProps): JSX_2.Element /** * @hidden * @beta */ export declare type BlockImagePreviewProps = Omit, 'renderDefault'> /** * Props for rendering a Portable Text block as a list item. * * @public */ export declare interface BlockListItemProps { /** * The block that is rendered as a list item. */ block: PortableTextTextBlock /** * The block rendered without the list style. */ children: ReactElement /** * If the block currently is focused by the user. */ focused: boolean /** * The nesting level of this list item. */ level: number /** * The default function for rendering this as a list item. Some list types are built in and * will have a default rendering. */ renderDefault: (props: BlockListItemProps) => ReactElement /** * The schema type for this list type. Icon can be found here. */ schemaType: BlockListDefinition /** * If the user currently has a text selection in this block. */ selected: boolean /** * The title of the list item type (e.g. 'Bullet list') for UI-representation. */ title: string /** * The value of the list item type (e.g. 'bullet') as it appears in the block.listItem attribute. */ value: string } /** * @hidden * @beta */ export declare function BlockPreview( props: Omit, 'renderDefault'>, ): JSX_2.Element /** * Props for rendering a Portable Text block * * @public */ export declare interface BlockProps { /** * Boundary element of the floating toolbar element. */ __unstable_floatingBoundary: HTMLElement | null /** * Boundary element for the block. */ __unstable_referenceBoundary: HTMLElement | null /** * DOM element for the block. */ __unstable_referenceElement: HTMLElement | null /** * The default rendering of the block (the text). */ children: ReactNode /** * If the block currently is focused by the user. */ focused: boolean /** * Markers (meta data) connected to this annotation. * @deprecated - use `renderBlock` and `renderInlineBlock` interfaces instead */ markers: PortableTextMarker[] /** * Closes the editing form connected to this block. * For regular text blocks this is not relevant. */ onClose: () => void /** * Opens the editing form connected to this block. * For regular text blocks this is not relevant. */ onOpen: () => void /** * Focus a form node in this block. * @param path - the relative path to the form node to put focus on. */ onPathFocus: (path: Path) => void /** * Removes the block. */ onRemove: () => void /** * If the block is currently opened for editing. */ open: boolean /** * The parent schema type (array type). */ parentSchemaType: ArraySchemaType | ObjectSchemaType /** * The full form path to this block from document root. */ path: Path /** * Form presence for this block. */ presence: FormNodePresence[] /** * Is the block object read only? */ readOnly: boolean /** * Plugin chain render callback. */ renderAnnotation?: RenderAnnotationCallback /** * Plugin chain render callback. */ renderBlock?: RenderBlockCallback /** * Plugin chain render callback (default rendering function of the block). */ renderDefault: (props: BlockProps) => ReactElement /** * Plugin chain render callback. */ renderField: RenderFieldCallback /** * Plugin chain render callback. */ renderInlineBlock?: RenderBlockCallback /** * Plugin chain render callback. */ renderInput: RenderInputCallback /** * Plugin chain render callback. */ renderItem: RenderArrayOfObjectsItemCallback /** * Plugin chain render callback. */ renderPreview: RenderPreviewCallback /** * The schema type for the block. */ schemaType: ObjectSchemaType /** * If the block is in the user's selection. */ selected: boolean /** * Form validation for the block object. */ validation: FormNodeValidation[] /** * Value of the block. */ value: PortableTextBlock } /** * Props for rendering a text block style. * * @public */ export declare interface BlockStyleProps { /** * The value of the block that is rendered style for. */ block: PortableTextTextBlock /** * The block as rendered without this style. */ children: ReactElement /** * If the block currently has focus in the text editor. */ focused: boolean /** * The default rendering function for this style. */ renderDefault: (props: BlockStyleProps) => ReactElement /** * The schema type for this style. */ schemaType: BlockStyleDefinition /** * If the block currently have a text selection. */ selected: boolean /** * The title of the style (e.g. 'Large Heading') for UI-representation. */ title: string /** * The value of the style (e.g. 'h1') as it appears in the block's `.style` property value. */ value: string } /** * * @hidden * @beta */ export declare interface BooleanComponents { diff?: ComponentType field?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** @internal */ export declare type BooleanDiff = BooleanDiff_2 /** * @hidden * @public */ export declare interface BooleanFieldProps extends BaseFieldProps { schemaType: BooleanSchemaType value: boolean | undefined inputProps: BooleanInputProps } /** @public */ export declare type BooleanFormNode = BaseFormNode< boolean, S > /** * * @hidden * @beta */ export declare function BooleanInput(props: BooleanInputProps): JSX_2.Element /** * @hidden * @public */ export declare interface BooleanInputProps extends BaseInputProps, BooleanFormNode { /** * @hidden * @beta */ onChange: (patch: FormPatch | FormPatch[] | PatchEvent) => void /** * A shorthand aggregation of any validation errors the input currently have * Will be falsey if no error. * In the case of multiple errors it will be a newline delimited string of each error message * For advanced use cases use the ´validation´ prop which contains more levels and details */ validationError?: string /** * @hidden * @beta */ elementProps: PrimitiveInputElementProps } /** * @hidden * @beta */ export declare type BufferedDocumentEvent = | SnapshotEvent | DocumentRebaseEvent | DocumentMutationEvent | CommittedEvent /** @internal */ export declare interface BufferedDocumentWrapper { consistency$: Observable remoteSnapshot$: Observable events: Observable commitRequest$: Observable patch: (patches: any[]) => MutationPayload[] create: (document: Partial) => MutationPayload createIfNotExists: (document: SanityDocument) => MutationPayload createOrReplace: (document: SanityDocument) => MutationPayload delete: () => MutationPayload mutate: (mutations: MutationPayload[]) => void commit: () => void } /** * 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 Legacy theming will be deprecated in a future version of Sanity Studio */ export declare function buildLegacyTheme(partialLegacyTheme: Partial): StudioTheme /** @internal */ declare type ButtonProps = BaseButtonProps & (ButtonWithText | IconButton) declare type ButtonWithText = { text: string tooltipProps?: TooltipProps | null icon?: ButtonProps_2['icon'] } /** @internal */ export declare function ChangeBreadcrumb(props: { change?: FieldChangeNode titlePath: ChangeTitlePath }): JSX_2.Element /** @internal */ export declare const ChangeConnectorRoot: typeof EnabledChangeConnectorRoot /** * This is used to draw the bar that wraps the diff components in the changes panel * * @internal */ export declare const ChangeFieldWrapper: (props: { path: Path children: ReactNode hasHover: boolean }) => JSX_2.Element /** @internal */ export declare function ChangeIndicator( props: ChangeIndicatorProps & Omit, 'as'>, ): JSX_2.Element /** @internal */ export declare interface ChangeIndicatorProps { path: Path hasFocus: boolean isChanged: boolean withHoverEffect?: boolean } /** @internal */ export declare function ChangeList({diff, fields, schemaType}: ChangeListProps): ReactElement | null /** @internal */ export declare interface ChangeListProps { schemaType: ObjectSchemaType diff: ObjectDiff fields?: string[] } /** @internal */ export declare type ChangeNode = GroupChangeNode | FieldChangeNode /** @internal */ export declare function ChangeResolver(props: ChangeResolverProps): JSX_2.Element | null /** @internal */ export declare interface ChangeResolverProps { change: ChangeNode readOnly?: ConditionalProperty hidden?: ConditionalProperty } /** @internal */ export declare type ChangeTitlePath = (string | FromToIndex)[] /** @internal */ export declare function ChangeTitleSegment(props: { change?: FieldChangeNode segment: string | FromToIndex }): JSX_2.Element /** @internal */ export declare function checkoutPair( client: SanityClient, idPair: IdPair, serverActionsEnabled: boolean, ): Pair /** * @hidden * @beta */ export declare type Chunk = { index: number id: string type: ChunkType start: number end: number startTimestamp: string endTimestamp: string authors: Set draftState: 'present' | 'missing' | 'unknown' publishedState: 'present' | 'missing' | 'unknown' } /** * History timeline / chunking * * * @hidden * @beta */ export declare type ChunkType = | 'initial' | 'create' | 'editDraft' | 'delete' | 'publish' | 'unpublish' | 'discardDraft' | 'editLive' /** * @hidden * @beta */ export declare function CircularProgress(props: { /** Percentage */ value: number }): JSX_2.Element /** @internal */ export declare const CollapseMenu: ForwardRefExoticComponent> /** @internal */ export declare const CollapseMenuButton: ForwardRefExoticComponent< Omit, 'as' | 'size'>, 'ref'> & RefAttributes > /** @internal */ export declare interface CollapseMenuButtonProps extends CommonProps { collapsedProps?: Omit expandedProps?: CommonProps text: string } /** @internal */ export declare interface CollapseMenuProps { children: ReactNode | ReactNode[] collapsed?: boolean collapseText?: boolean disableRestoreFocusOnClose?: boolean gap?: number | number[] menuButtonProps?: Omit & { id?: string button?: ReactElement } onMenuClose?: () => void } /** @internal */ export declare function collate< T extends { _id: string _type: string }, >(documents: T[]): CollatedHit[] /** * Takes a list of documents and collates draft/published pairs into single entries * `{id: , draft?: , published?: }` * * Note: because Map is ordered by insertion key the resulting array will be ordered by whichever * version appeared first * * @internal */ export declare interface CollatedHit< T extends { _id: string } = { _id: string }, > { id: string type: string draft?: T published?: T } /** * If the `scheme` prop is provided we don't need to setup any logic to handle localStorage * @internal */ export declare function ColorSchemeCustomProvider({ children, onSchemeChange, scheme, }: Pick & { scheme: StudioThemeColorSchemeKey }): JSX_2.Element /** * Uses useSyncExternalStore to ensure that localStorage is accessed in a SSR hydration compatible way * @internal */ export declare function ColorSchemeLocalStorageProvider({ children, onSchemeChange, }: Pick): JSX_2.Element /** @internal */ export declare function ColorSchemeProvider({ children, onSchemeChange, scheme: schemeProp, }: ColorSchemeProviderProps): JSX_2.Element /** @internal */ export declare interface ColorSchemeProviderProps { children: ReactNode onSchemeChange?: (nextScheme: StudioThemeColorSchemeKey) => void scheme?: StudioThemeColorSchemeKey } /** * @hidden * @beta */ export declare interface CombinedDocument { draft: Record | null published: Record | null } /** * 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 */ export declare const CommandList: ForwardRefExoticComponent< CommandListProps & RefAttributes > /** @internal */ export declare type CommandListElementType = 'input' | 'list' /** @internal */ export declare type CommandListGetItemDisabledCallback = (virtualIndex: number) => boolean /** @internal */ export declare type CommandListGetItemKeyCallback = (virtualIndex: number) => number | string /** @internal */ export declare type CommandListGetItemSelectedCallback = (virtualIndex: number) => boolean /** @internal */ export declare interface CommandListHandle { focusInputElement: () => void focusListElement: () => void getTopIndex: () => number scrollToIndex: (index: number) => void } /** @internal */ export declare type CommandListItemContext = { activeIndex: number | null disabled?: boolean selected?: boolean virtualIndex: number } /** @internal */ export declare interface CommandListProps extends ResponsivePaddingProps { /** The data attribute to apply to any active virtual list items */ activeItemDataAttr?: string /** `aria-label` to apply to the virtual list container element */ ariaLabel: string /** Whether `aria-multiselectable` is enabled on the virtual list container element */ ariaMultiselectable?: boolean /** Automatically focus the input or virtual list */ autoFocus?: CommandListElementType /** Whether the virtual list can receive focus */ canReceiveFocus?: boolean /** Pixel offset of the virtual list focus ring. Negative values will cause the focus ring to appear inset */ focusRingOffset?: number /** Force a fixed height for all virtual list children and skip measurement (faster). */ fixedHeight?: boolean /** Custom function to map disabled items */ getItemDisabled?: CommandListGetItemDisabledCallback /** Custom function to map virtual list items to custom keys */ getItemKey?: CommandListGetItemKeyCallback /** Custom function to map selected items */ getItemSelected?: CommandListGetItemSelectedCallback /** Scroll alignment of the initial active index */ initialScrollAlign?: ScrollToOptions_2['align'] /** Initial active index on mount */ initialIndex?: number /** Input element to associate with this virtual list. Associated inputs will receive focus and handle key events */ inputElement?: HTMLInputElement | null /** Estimated height for each list item */ itemHeight: number /** Virtual list item values, accessible to all rendered item components */ items: T[] /** Callback fired when the virtual list is within `onEndReachedIndexThreshold` of rendered content */ onEndReached?: () => void /** Number of items from the end of the virtual list before which `onEndReached` is triggered */ onEndReachedIndexOffset?: number /** Only show selection state when the virtual list is active (is hovered or has focus) */ onlyShowSelectionWhenActive?: boolean /** Number of items to render above and below the visible area*/ overscan?: number /** Rendered component in virtual lists */ renderItem: CommandListRenderItemCallback /** Allow wraparound keyboard navigation between first and last items */ wrapAround?: boolean } /** @internal */ export declare type CommandListRenderItemCallback = ( item: T, context: CommandListItemContext, ) => ReactNode /** * @beta * @hidden */ declare interface CommentContext { tool: string payload?: Record notification?: { documentTitle: string url?: string workspaceTitle: string currentThreadLength?: number subscribers?: string[] } intent?: { title: string name: string params: IntentParameters } } declare interface CommentDiscardDialogController { open: () => void close: () => void } /** * @internal * @hidden */ export declare const CommentInput: ForwardRefExoticComponent< CommentInputProps & RefAttributes > declare interface CommentInputHandle { blur: () => void discardDialogController: CommentDiscardDialogController focus: () => void scrollTo: () => void reset: () => void } declare interface CommentInputProps { currentUser: CurrentUser expandOnFocus?: boolean focusLock?: boolean focusOnMount?: boolean mentionOptions: UserListWithPermissionsHookValue onBlur?: (e: FormEvent) => void onChange: (value: PortableTextBlock[]) => void onDiscardCancel?: () => void onDiscardConfirm: () => void onFocus?: (e: FormEvent) => void onKeyDown?: (e: KeyboardEvent_2) => void onMentionMenuOpenChange?: (open: boolean) => void onSubmit?: () => void placeholder?: ReactNode readOnly?: boolean renderBlock?: RenderBlockFunction value: PortableTextBlock[] | null withAvatar?: boolean avatarSize?: AvatarSize } /** * @beta * @hidden */ export declare type CommentIntentGetter = (comment: { id: string type: string path: string }) => CommentContext['intent'] /** * @internal * @hidden */ export declare const COMMENTS_INSPECTOR_NAME = 'sanity/comments' declare type CommentsEnabledContextValue = | { enabled: false mode: null } | { enabled: true mode: CommentsUIMode } /** * @beta * @hidden */ export declare const CommentsEnabledProvider: NamedExoticComponent declare interface CommentsEnabledProviderProps { children: ReactNode documentId: string documentType: string } /** * @beta * @hidden */ export declare const CommentsIntentProvider: NamedExoticComponent /** * @beta * @hidden */ export declare interface CommentsIntentProviderProps { children: ReactNode getIntent: CommentIntentGetter } /** * @beta */ export declare const CommentsProvider: NamedExoticComponent /** * @beta * @hidden */ declare interface CommentsProviderProps { children: ReactNode documentId: string documentType: string type: CommentsType sortOrder: 'asc' | 'desc' isCommentsOpen?: boolean onCommentsOpen?: () => void getCommentLink?: (id: string) => string selectedCommentId?: string | undefined onClearSelectedComment?: () => void onPathOpen?: (path: Path) => void isConnecting?: boolean } /** * @beta * @hidden */ declare type CommentsType = 'field' | 'task' /** * @beta * @hidden */ declare type CommentsUIMode = 'default' | 'upsell' /** @internal */ export declare type CommitFunction = (mutation: Mutation['params']) => Promise /** * Represents "commit requests" from the mutator. * These are emitted from the BufferedDocument instance's `requestHandler` callback * * @internal */ export declare interface CommitRequest { mutation: Mutation success: () => void failure: (error: Error) => void cancel: (error: Error) => void } /** * @hidden * @beta */ export declare interface CommittedEvent { type: 'committed' } /** @internal */ export declare interface CommonProps extends Omit { as?: ElementType | keyof JSX.IntrinsicElements dividerBefore?: boolean focused?: boolean tooltipProps?: TooltipProps tooltipText?: ReactNode } /** * @hidden * @beta */ export declare function CompactPreview(props: CompactPreviewProps): JSX_2.Element /** * @hidden * @beta */ export declare type CompactPreviewProps = Omit, 'renderDefault'> /** * @hidden * @beta */ export declare interface ComplexElementProps { 'id': string 'onFocus': FocusEventHandler 'onBlur': FocusEventHandler 'ref': MutableRefObject 'aria-describedby': string | undefined } /** @public */ export declare type ComposableOption = (prev: TValue, context: TContext) => TValue /** * @internal */ declare interface ConditionalPropertyCallbackContext { parent?: unknown document?: Record currentUser: Omit | null value: unknown } /** * @hidden * @beta */ export declare type Config = SingleWorkspace | WorkspaceOptions[] /** @public */ export declare interface ConfigContext { /** * The ID of the project. */ projectId: string /** * The name of the dataset. */ dataset: string /** * The schema for this source. */ schema: Schema /** * The current user or `null` if not authenticated. */ currentUser: CurrentUser | null /** * A function that returns a Sanity client with the {@link SourceClientOptions | specified options}. */ getClient: (options: SourceClientOptions) => SanityClient /** * Localization resources */ i18n: LocaleSource } declare type ConfigContext_2 = T extends ConfigPropertyReducer ? TContext : never /** @internal */ export declare class ConfigPropertyError extends Error { propertyName: string path: string[] cause: unknown constructor({propertyName, path, cause}: ConfigPropertyErrorOptions) } /** @internal */ export declare interface ConfigPropertyErrorOptions { propertyName: string path: string[] cause: unknown } /** @internal */ export declare type ConfigPropertyReducer = ( prev: TValue, config: PluginOptions, context: TContext, ) => TValue /** @internal */ export declare class ConfigResolutionError extends Error { name: string type: string causes: unknown[] constructor({causes, name, type}: ConfigResolutionErrorOptions) } /** @internal */ export declare interface ConfigResolutionErrorOptions { name: string type: string causes: Array } /** @internal */ export declare type ConnectedStatus = { type: 'connected' lastHeartbeat: Date } /** @internal */ export declare const CONNECTING: ConnectingStatus /** @internal */ export declare type ConnectingStatus = { type: 'connecting' } /** @internal */ export declare type ConnectionState = 'connecting' | 'reconnecting' | 'connected' /** @internal */ export declare type ConnectionStatus = | ConnectingStatus | ErrorStatus | ConnectedStatus | RetryingStatus /** @internal */ export declare interface ConnectionStatusStore { connectionStatus$: Observable } /** @internal */ export declare interface ConnectionStatusStoreOptions { bifur: BifurClient } /** @internal */ export declare interface ConnectorContextValue { isReviewChangesOpen: boolean onOpenReviewChanges: () => void | undefined onSetFocus: (nextPath: Path) => void | undefined } /** * Simple context menu button (with horizontal ellipsis icon) with shared localization. * * @internal */ export declare const ContextMenuButton: ForwardRefExoticComponent< ContextMenuButtonProps & Pick, 'hidden' | 'disabled' | 'onClick'> & RefAttributes > declare type ContextMenuButtonProps = Pick /** * Login methods that acknowledge cookieless authentication tokens. * * @internal * @hidden */ export declare type CookielessCompatibleLoginMethod = Extract /** @internal */ export declare class CorsOriginError extends Error { projectId?: string constructor({projectId}: CorsOriginErrorOptions) } /** @internal */ export declare interface CorsOriginErrorOptions { projectId?: string } /** * @internal */ export declare const createAuthStore: typeof _createAuthStore & MemoizedFunction /** * @internal */ export declare function _createAuthStore({ clientFactory: clientFactoryOption, projectId, dataset, apiHost, loginMethod, ...providerOptions }: AuthStoreOptions): AuthStore /** @internal */ export declare const createBufferedDocument: ( documentId: string, listenerEvent$: Observable, ) => BufferedDocumentWrapper /** * @deprecated Use `defineConfig` instead * * @hidden * @beta */ export declare function createConfig(config: T): T /** * This is the beginning of what should be the data store tracking connection status in the Sanity studio. * * @internal */ export declare function createConnectionStatusStore({ bifur, }: ConnectionStatusStoreOptions): ConnectionStatusStore /** @internal */ export declare function createDocumentPreviewStore({ client, }: DocumentPreviewStoreOptions): DocumentPreviewStore /** @internal */ export declare function createDocumentStore({ getClient, documentPreviewStore, historyStore, initialValueTemplates, schema, i18n, serverActionsEnabled, }: DocumentStoreOptions): DocumentStore /** @internal */ export declare function createDraftFrom(document: SanityDocument): SanityDocument /** @internal */ export declare function createGrantsStore(opts: GrantsStoreOptions): GrantsStore /** @internal */ export declare function createHistoryStore({client}: HistoryStoreOptions): HistoryStore /** @internal */ export declare function createHookFromObservableFactory( observableFactory: (arg: TArg) => Observable, initialValue: T, ): ReactHook> /** @internal */ export declare function createHookFromObservableFactory( observableFactory: (arg: TArg) => Observable, initialValue?: T, ): ReactHook> /** @internal */ export declare function createKeyValueStore({client}: {client: SanityClient}): KeyValueStore /** * Creates a mock `AuthStore` (for testing) that emits an `AuthState` derived * from the `client` and `currentUser` given. * * @internal */ export declare function createMockAuthStore({client, currentUser}: MockAuthStoreOptions): AuthStore /** @internal */ export declare function createNoopTrackerScope(): { useReportedValues: () => Reported[] Tracker: typeof NoopTracker useReporter: (id: string | null, value: T | (() => T)) => void } /** @internal */ export declare const createObservableBufferedDocument: ( listenerEvent$: Observable, ) => { updates$: Observable consistency$: Observable remoteSnapshot$: Observable commitRequest$: Subject addMutation: (mutation: MutationPayload) => void addMutations: (mutations: MutationPayload[]) => void commit: () => void } /** * @internal */ export declare function createPatchChannel(): PatchChannel /** * @deprecated Use `definePlugin` instead * * @hidden * @beta */ export declare function createPlugin( arg: PluginFactory | PluginOptions, ): Plugin_2 /** @internal */ export declare function createProjectStore(context: {client: SanityClient}): ProjectStore /** @internal */ export declare function createPublishedFrom(document: SanityDocument): SanityDocument /** * @hidden * @beta */ export declare function createSchema(schemaDef: {name: string; types: any[]}): Schema /** @internal */ export declare const createSearch: SearchStrategyFactory /** @internal */ export declare const createSharedResizeObserver: () => SharedResizeObserver /** * 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 */ export declare function createSourceFromConfig( options: CreateWorkspaceFromConfigOptions, ): Promise /** @internal */ export declare function createTrackerScope(): { Tracker: (props: {children: ReactNode}) => JSX_2.Element useReportedValues: () => Reported[] useReporter: ReporterHook useAutoIdReporter: (value: Value | (() => Value), isEqual?: IsEqualFunction) => void } /** @internal */ export declare function createUserColorManager(options: UserColorManagerOptions): UserColorManager /** @internal */ export declare function createUseReporter( Context: Context>, ): ReporterHook /** * Given a `client` and a `currentUser` creates a datastore that handles * fetching, batch fetching, and caching users. * * @internal */ export declare function createUserStore({client: _client, currentUser}: UserStoreOptions): UserStore /** * 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 */ export declare function createWorkspaceFromConfig( options: CreateWorkspaceFromConfigOptions, ): Promise /** @internal */ export declare type CreateWorkspaceFromConfigOptions = | SingleWorkspace | (SingleWorkspace & { currentUser: CurrentUser getClient: (options: {apiVersion: string}) => SanityClient schema?: SchemaPluginOptions }) /** * * @hidden * @beta */ export declare interface CrossDatasetReferenceComponents { annotation?: ComponentType block?: ComponentType diff?: ComponentType field?: ComponentType> inlineBlock?: ComponentType input?: ComponentType item?: ComponentType> preview?: ComponentType } /** * * @hidden * @beta */ export declare function CrossDatasetReferenceInput( props: CrossDatasetReferenceInputProps, ): JSX_2.Element /** * * @hidden * @beta */ export declare type CrossDatasetReferenceInputProps = ObjectInputProps< CrossDatasetReferenceValue, CrossDatasetReferenceSchemaType > /** * * @hidden * @beta */ export declare interface DateComponents { diff?: ComponentType field?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** * @hidden * @beta */ export declare function DateInput(props: DateInputProps): JSX_2.Element /** * @hidden * @beta */ export declare type DateInputProps = StringInputProps /** * * @hidden * @beta */ export declare interface DatetimeComponents { diff?: ComponentType field?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** * @hidden * @beta */ export declare function DateTimeInput(props: DateTimeInputProps): JSX_2.Element /** * @hidden * @beta */ export declare type DateTimeInputProps = StringInputProps /** * @hidden * @beta */ export declare function dec(amount?: number, path?: Path): FormDecPatch /** * @internal */ export declare function decodePath(gradientPath: string): Path /** @internal */ export declare const DEFAULT_MAX_RECURSION_DEPTH = 10 /** * 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 */ export declare const DEFAULT_STUDIO_CLIENT_OPTIONS: SourceClientOptions /** * @hidden * @beta */ export declare function DefaultDocument(props: DefaultDocumentProps): ReactElement /** * @hidden * @beta */ export declare interface DefaultDocumentProps { entryPath: string css?: string[] basePath?: string } /** * The default locale for the studio. * * @internal * @hidden */ export declare const defaultLocale: LocaleDefinition declare type DefaultOperators = typeof searchOperators /** @beta */ export declare type DefaultPluginsWorkspaceOptions = { tasks: { enabled: boolean } scheduledPublishing: ScheduledPublishingPluginOptions } /** * @hidden * @beta */ export declare function DefaultPreview(props: DefaultPreviewProps): JSX_2.Element /** * @hidden * @beta */ export declare interface DefaultPreviewProps extends Omit, 'renderDefault'> { styles?: { root?: string placeholder?: string media?: string heading?: string title?: string subtitle?: string hasSubtitle?: string mediaString?: string status?: string children?: string } } /** @internal */ export declare const defaultRenderAnnotation: RenderAnnotationCallback /** @internal */ export declare const defaultRenderBlock: RenderBlockCallback /** @internal */ export declare const defaultRenderField: RenderFieldCallback /** @internal */ export declare const defaultRenderInlineBlock: RenderBlockCallback /** @internal */ export declare const defaultRenderInput: RenderInputCallback /** @internal */ export declare const defaultRenderItem: RenderItemCallback /** @internal */ export declare const defaultRenderPreview: RenderPreviewCallback /** @internal */ export declare function defaultTemplateForType(schemaType: SchemaType): Template /** @internal */ export declare function defaultTemplatesForSchema(schema: Schema): Template[] /** @internal */ export declare const defaultTheme: RootTheme /** * @hidden * @beta */ export declare function defineConfig(config: T): T /** @internal */ export declare function defineDocumentFieldAction( fieldAction: DocumentFieldAction, ): DocumentFieldAction /** * Define a document inspector to be used in Sanity configuration. * * @example * * ```ts * // sanity.config.ts * * import {RocketIcon} from '@sanity/icons' * import {defineConfig, defineDocumentInspector} from 'sanity' * * const customInspector = defineDocumentInspector({ * name: 'custom', * useMenuItem: () => ({ * icon: RocketIcon, * showAsAction: true, * title: 'Custom' * }), * component: lazy(() => import('./inspectors/custom')), * }) * * export default defineConfig({ * // ... * * document: { * inspectors: (prev) => [customInspector, ...prev], * }, * }) * ``` * * @hidden @beta * */ export declare function defineDocumentInspector(inspector: DocumentInspector): DocumentInspector /** * 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 */ export declare function defineLocale(locale: LocaleDefinition): LocaleDefinition /** * 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 */ export declare function defineLocaleResourceBundle( bundle: LocaleResourceBundle, ): LocaleResourceBundle /** * 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 */ export declare function defineLocalesResources>( namespace: string, resources: R, ): R /** * @hidden * @beta */ export declare function definePlugin( arg: PluginFactory | PluginOptions, ): Plugin_2 /** * @alpha */ export declare function defineSearchFilter( filterDef: SearchFilterDefinition, ): typeof filterDef /** * @alpha */ export declare function defineSearchFilterOperators( operators: Operator[], ): typeof operators /** * @alpha */ export declare function defineSearchOperator< TType extends string, TValue extends unknown | never, TOperatorSnippet extends | { type: TType inputComponent?: never } | { type: TType inputComponent: SearchOperatorInput }, >( definition: (TOperatorSnippet extends { type: TType inputComponent: SearchOperatorInput } ? SearchOperatorBuilder : ValuelessSearchOperatorBuilder) & TOperatorSnippet, ): typeof definition declare interface DescriptionSerializerProps { blocks: PortableTextBlock[] } declare interface DescriptionSerializerProps { blocks: PortableTextBlock[] } /** * @hidden * @beta */ export declare function DetailPreview(props: DetailPreviewProps): JSX_2.Element /** * @hidden * @beta */ export declare type DetailPreviewProps = PreviewProps<'detail'> /** @internal */ export declare type Diff> = | ArrayDiff | BooleanDiff | NullDiff | NumberDiff | ObjectDiff | StringDiff | TypeChangeDiff /** @internal */ export declare const DiffCard: ForwardRefExoticComponent< Omit, 'height' | 'as'>, 'ref'> & RefAttributes > /** @internal */ export declare interface DiffCardProps { annotation?: Annotation as?: ElementType | keyof JSX.IntrinsicElements diff?: Diff disableHoverEffect?: boolean path?: Path | string tooltip?: | { description?: ReactNode } | boolean } /** * Diff components * * @internal */ export declare type DiffComponent = ComponentType> /** @internal */ export declare type DiffComponentOptions = { component: DiffComponent showHeader?: boolean } /** * Resolvers * * @internal */ export declare type DiffComponentResolver = (options: { schemaType: SchemaType parentSchemaType?: ArraySchemaType | ObjectSchemaType }) => ComponentType | DiffComponentOptions | undefined /** @internal */ export declare class DiffErrorBoundary extends Component< DiffErrorBoundaryProps, DiffErrorBoundaryState > { static getDerivedStateFromError(error: Error): { error: Error } state: DiffErrorBoundaryState componentDidCatch(error: Error): void render(): string | number | boolean | Iterable | JSX_2.Element | null | undefined } /** @internal */ export declare interface DiffErrorBoundaryProps { children: ReactNode t: TFunction } /** @internal */ export declare interface DiffErrorBoundaryState { error?: Error } /** @internal */ export declare function DiffFromTo(props: DiffFromToProps): JSX_2.Element /** @internal */ export declare interface DiffFromToProps { align?: 'top' | 'center' | 'bottom' cardClassName?: string diff: Diff layout?: 'grid' | 'inline' path?: Path | string previewComponent: FieldPreviewComponent schemaType: SchemaType } /** @internal */ export declare function DiffInspectWrapper(props: DiffInspectWrapperProps & BoxProps): ReactElement /** @internal */ export declare interface DiffInspectWrapperProps { children: ReactNode change: FieldChangeNode as?: ExecutionProps['as'] } /** * @hidden * @beta */ export declare function diffMatchPatch(value: string, path?: Path): FormDiffMatchPatch /** @internal */ export declare type DiffProps = { diff: T schemaType: T extends ObjectDiff ? ObjectSchemaType : T extends ArrayDiff ? ArraySchemaType : T extends BooleanDiff ? BooleanSchemaType : T extends StringDiff ? StringSchemaType : T extends NumberDiff ? NumberSchemaType : SchemaType } /** @internal */ export declare const diffResolver: DiffComponentResolver /** @internal */ export declare function DiffString(props: {diff: StringDiff}): JSX_2.Element /** @internal */ export declare function DiffStringSegment(props: {segment: StringDiffSegment}): ReactElement /** @internal */ export declare function DiffTooltip( props: DiffTooltipProps | DiffTooltipWithAnnotationsProps, ): JSX_2.Element /** @internal */ export declare interface DiffTooltipProps extends TooltipProps { children: ReactElement description?: ReactNode diff: Diff path?: Path | string } /** @internal */ export declare interface DiffTooltipWithAnnotationsProps extends TooltipProps { annotations: AnnotationDetails[] children: ReactElement description?: ReactNode } /** @internal */ export declare type DiffVisitor = (diff: Diff | StringDiffSegment, path: Path) => boolean /** @internal */ export declare function DisabledChangeConnectorRoot({ children, className, }: DisabledChangeConnectorRootProps): JSX_2.Element /** @internal */ export declare interface DisabledChangeConnectorRootProps { className?: string children: ReactNode } /** * @hidden * @beta */ export declare interface DocumentActionComponent extends ActionComponent { /** * An optional meta property that can used to replace this document action * with another. E.g.: * * ```js * import {defineConfig} from 'sanity' * import {MyPublishAction} from '...' * * export default defineConfig({ * document: { * actions: (prev) => * prev.map((previousAction) => * previousAction.action === 'publish' ? MyPublishAction : previousAction * ), * }, * }) * ``` */ action?: 'delete' | 'discardChanges' | 'duplicate' | 'restore' | 'publish' | 'unpublish' } /** * @hidden * @beta */ export declare interface DocumentActionConfirmDialogProps { type: 'confirm' tone?: ButtonTone message: ReactNode onConfirm: () => void onCancel: () => void cancelButtonIcon?: ComponentType | ReactNode cancelButtonText?: string confirmButtonIcon?: ComponentType | ReactNode confirmButtonText?: string } /** * @hidden * @beta */ export declare interface DocumentActionCustomDialogComponentProps { type: 'custom' component: ReactNode } /** * @hidden * @beta */ export declare interface DocumentActionDescription { tone?: ButtonTone dialog?: DocumentActionDialogProps | false | null disabled?: boolean icon?: ReactNode | ComponentType label: string onHandle?: () => void shortcut?: string | null title?: ReactNode /** * @beta */ group?: DocumentActionGroup[] } /** * @hidden * @beta */ export declare type DocumentActionDialogProps = | DocumentActionConfirmDialogProps | DocumentActionPopoverDialogProps | DocumentActionModalDialogProps | DocumentActionCustomDialogComponentProps /** * @hidden * @beta */ export declare type DocumentActionGroup = 'default' | 'paneActions' /** * @hidden * @beta */ export declare interface DocumentActionModalDialogProps { type?: 'dialog' content: ReactNode /** * * @hidden * @beta */ footer?: DialogProps['footer'] /** * * @hidden * @beta */ header?: ReactNode onClose: () => void showCloseButton?: boolean /** * * @hidden * @beta */ width?: 'small' | 'medium' | 'large' | 'full' } /** * @hidden * @beta */ export declare interface DocumentActionPopoverDialogProps { type: 'popover' content: ReactNode onClose: () => void } /** * @hidden * @beta */ export declare interface DocumentActionProps extends EditStateFor { revision?: string onComplete: () => void } /** * @hidden * @beta */ export declare interface DocumentActionsContext extends ConfigContext { documentId?: string schemaType: string } /** * @hidden * @beta */ export declare type DocumentActionsResolver = ComposableOption< DocumentActionComponent[], DocumentActionsContext > /** * @hidden * @beta */ export declare type DocumentAvailability = | { available: true reason: 'READABLE' } | { available: false reason: 'PERMISSION_DENIED' | 'NOT_FOUND' } /** * @hidden * @beta */ export declare interface DocumentBadgeComponent { (props: DocumentBadgeProps): DocumentBadgeDescription | null } /** * @hidden * @beta */ export declare interface DocumentBadgeDescription { title?: string label?: string | undefined color?: 'primary' | 'success' | 'warning' | 'danger' icon?: ReactNode | ComponentType } /** * @hidden * @beta */ export declare interface DocumentBadgeProps extends EditStateFor {} /** * @hidden * @beta */ export declare interface DocumentBadgesContext extends ConfigContext { documentId?: string schemaType: string } /** * @hidden * @beta */ export declare type DocumentBadgesResolver = ComposableOption< DocumentBadgeComponent[], DocumentBadgesContext > /** @internal */ export declare type DocumentChangeContextInstance = { documentId: string schemaType: SchemaType rootDiff: ObjectDiff | null isComparingCurrent: boolean FieldWrapper: ComponentType<{ path: Path children: ReactNode hasHover: boolean }> value: Partial } /** @hidden @beta */ export declare interface DocumentCommentsEnabledContext { documentId?: string documentType: string } /** * * @hidden * @beta */ export declare interface DocumentComponents { diff?: ComponentType field?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } declare interface DocumentComponents_2 { /** @internal */ unstable_layout?: ComponentType } /** * @hidden * @beta */ export declare interface DocumentFieldAction { name: string useAction: DocumentFieldActionHook } /** * @hidden * @beta */ export declare interface DocumentFieldActionDivider { type: 'divider' } /** * @hidden * @beta */ export declare interface DocumentFieldActionGroup { type: 'group' children: DocumentFieldActionNode[] disabled?: | boolean | { reason: ReactNode } expanded?: boolean hidden?: boolean icon?: ComponentType renderAsButton?: boolean status?: DocumentFieldActionStatus title: string i18n?: I18nTextRecord<'title'> tone?: DocumentFieldActionTone } /** * @hidden * @beta */ export declare interface DocumentFieldActionHook { (props: DocumentFieldActionProps): DocumentFieldActionItem | DocumentFieldActionGroup } /** * @hidden * @beta */ export declare interface DocumentFieldActionItem { type: 'action' disabled?: | boolean | { reason: ReactNode } hidden?: boolean icon?: ComponentType iconRight?: ComponentType onAction: () => void renderAsButton?: boolean selected?: boolean status?: DocumentFieldActionStatus title: string i18n?: I18nTextRecord<'title'> tone?: DocumentFieldActionTone } /** * @hidden * @beta */ export declare type DocumentFieldActionNode = | DocumentFieldActionItem | DocumentFieldActionGroup | DocumentFieldActionDivider /** * @hidden * @beta */ export declare interface DocumentFieldActionProps { documentId: string documentType: string path: Path schemaType: SchemaType } /** @internal */ export declare const documentFieldActionsReducer: ConfigPropertyReducer< DocumentFieldAction[], DocumentFieldActionsResolverContext > /** * @hidden * @beta */ export declare type DocumentFieldActionsResolver = ComposableOption< DocumentFieldAction[], DocumentFieldActionsResolverContext > /** * @hidden * @beta */ export declare interface DocumentFieldActionsResolverContext extends ConfigContext { documentId: string documentType: string schemaType: SchemaType } /** * @hidden * @beta */ export declare type DocumentFieldActionStatus = 'info' | 'success' | 'warning' | 'error' /** * @hidden * @beta */ export declare type DocumentFieldActionTone = 'primary' | 'positive' | 'caution' | 'critical' /** @internal */ export declare type DocumentFormNode< T extends { [key in string]: unknown } = { [key in string]: unknown }, S extends ObjectSchemaType = ObjectSchemaType, > = ObjectFormNode /** * * Checks if the document ID `documentId` has the same ID as `equalsDocumentId`, * ignoring the draft prefix. * * @public * * @param documentId - The document ID to check * @param equalsDocumentId - The document ID to check against * * @example * Draft vs published document ID, but representing the same document: * ``` * // Prints "true": * console.log(documentIdEquals('drafts.agot', 'agot')); * ``` * @example * Different documents: * ``` * // Prints "false": * console.log(documentIdEquals('hp-tcos', 'hp-hbp')); * ``` * * @returns `true` if the document IDs are equal, `false` otherwise */ export declare function documentIdEquals(documentId: string, equalsDocumentId: string): boolean /** @hidden @beta */ export declare interface DocumentInspector { name: string component: DocumentInspectorComponent /** * Hook for defining a menu item for the inspector. */ useMenuItem?: (props: DocumentInspectorUseMenuItemProps) => DocumentInspectorMenuItem /** * Callback for when the inspector is closed, which can be used to clean up custom document pane * parameters. */ onClose?: (ctx: {params: Record}) => { params: Record } /** * Callback for when the inspector is opened, which can be used to set custom document pane * parameters. */ onOpen?: (ctx: {params: Record}) => { params: Record } } /** @hidden @beta */ export declare type DocumentInspectorComponent = ComponentType /** @hidden @beta */ export declare interface DocumentInspectorContext extends ConfigContext { documentId?: string documentType: string } /** @hidden @beta */ export declare interface DocumentInspectorMenuItem { hidden?: boolean hotkeys?: string[] icon?: ComponentType showAsAction?: boolean status?: ButtonTone title: string tone?: ButtonTone } /** @hidden @beta */ export declare interface DocumentInspectorProps { documentId: string documentType: string onClose: () => void } /** @hidden @beta */ export declare type DocumentInspectorsResolver = ComposableOption< DocumentInspector[], DocumentInspectorContext > /** @hidden @beta */ export declare interface DocumentInspectorUseMenuItemProps { documentId: string documentType: string } /** * * @hidden * @beta */ export declare type DocumentLanguageFilterComponent = ComponentType<{ schemaType: ObjectSchemaType }> /** * * @hidden * @beta */ export declare interface DocumentLanguageFilterContext extends ConfigContext { documentId?: string schemaType: string } /** * * @hidden * @beta */ export declare type DocumentLanguageFilterResolver = ComposableOption< DocumentLanguageFilterComponent[], DocumentLanguageFilterContext > /** @internal*/ export declare interface DocumentLayoutProps { /** * The ID of the document. This is a read-only property and changing it will have no effect. */ documentId: string /** * The type of the document. This is a read-only property and changing it will have no effect. */ documentType: string renderDefault: (props: DocumentLayoutProps) => React.ReactElement } /** * @hidden * @beta */ export declare interface DocumentMutationEvent { type: 'mutation' document: SanityDocument mutations: MutationPayload[] origin: 'local' | 'remote' } /** @internal */ export declare interface DocumentPairPermissionsOptions { client: SanityClient schema: Schema grantsStore: GrantsStore id: string type: string permission: DocumentPermission serverActionsEnabled: boolean } /** @internal */ export declare type DocumentPermission = | 'delete' | 'discardDraft' | 'publish' | 'unpublish' | 'update' | 'duplicate' /** * @hidden * @beta */ export declare interface DocumentPluginOptions { badges?: DocumentBadgeComponent[] | DocumentBadgesResolver actions?: DocumentActionComponent[] | DocumentActionsResolver /** * Components for the document. * @internal */ components?: DocumentComponents_2 /** @internal */ unstable_fieldActions?: DocumentFieldAction[] | DocumentFieldActionsResolver /** @hidden @beta */ inspectors?: DocumentInspector[] | DocumentInspectorsResolver /** * @hidden * @beta */ productionUrl?: AsyncComposableOption /** * @hidden * @beta */ unstable_languageFilter?: DocumentLanguageFilterResolver /** * @hidden * @beta */ newDocumentOptions?: NewDocumentOptionsResolver /** @deprecated Use `comments` instead */ unstable_comments?: { enabled: boolean | ((context: DocumentCommentsEnabledContext) => boolean) } /** @internal */ comments?: { enabled: boolean | ((context: DocumentCommentsEnabledContext) => boolean) } } /** @internal */ export declare interface DocumentPresence { user: User path: Path sessionId: string lastActiveAt: string } /** @internal */ export declare function DocumentPreviewPresence(props: DocumentPreviewPresenceProps): JSX_2.Element /** @internal */ export declare interface DocumentPreviewPresenceProps { presence: Omit[] } /** * @hidden * @beta */ export declare interface DocumentPreviewStore { observePaths: ObservePathsFn observeForPreview: ObserveForPreviewFn observeDocumentTypeFromId: (id: string, apiConfig?: ApiConfig) => Observable /** * * @hidden * @beta */ unstable_observeDocumentPairAvailability: ( id: string, ) => Observable unstable_observePathsDocumentPair: ( id: string, paths: PreviewPath[], ) => Observable> } /** @internal */ export declare interface DocumentPreviewStoreOptions { client: SanityClient } /** * @hidden * @beta */ export declare interface DocumentRebaseEvent { type: 'rebase' document: SanityDocument remoteMutations: MutationPayload[] localMutations: MutationPayload[] } /** * @hidden * @beta */ export declare interface DocumentRemoteMutationEvent { type: 'remoteMutation' head: SanityDocument transactionId: string author: string timestamp: Date effects: { apply: unknown revert: unknown } } /** * @hidden * @beta */ export declare type DocumentRemoteMutationVersionEvent = Exclude< RemoteSnapshotVersionEvent, { type: 'snapshot' } > /** * 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` * * @internal */ export declare function DocumentStatus({ absoluteDate, draft, published, singleLine, }: DocumentStatusProps): JSX_2.Element /** * Renders a dot indicating the current document status. * * - Yellow (caution) for published documents with edits * - Gray (default) for unpublished documents (with or without edits) * * No dot will be displayed for published documents without edits. * * @internal */ export declare function DocumentStatusIndicator({ draft, published, }: DocumentStatusProps_2): JSX_2.Element | null declare interface DocumentStatusProps { absoluteDate?: boolean draft?: PreviewValue | Partial | null published?: PreviewValue | Partial | null singleLine?: boolean } declare interface DocumentStatusProps_2 { draft?: PreviewValue | Partial | null published?: PreviewValue | Partial | null } /** * @hidden * @beta */ export declare interface DocumentStore { /** @internal */ checkoutPair: (idPair: IdPair) => Pair initialValue: ( opts: InitialValueOptions, context: InitialValueResolverContext, ) => Observable listenQuery: ( query: | string | { fetch: string listen: string }, params: QueryParams, options: ListenQueryOptions, ) => Observable resolveTypeForDocument: (id: string, specifiedType?: string) => Observable pair: { consistencyStatus: (publishedId: string, type: string) => Observable /** @internal */ documentEvents: (publishedId: string, type: string) => Observable /** @internal */ editOperations: (publishedId: string, type: string) => Observable editState: (publishedId: string, type: string) => Observable operationEvents: ( publishedId: string, type: string, ) => Observable validation: (publishedId: string, type: string) => Observable } } /** @internal */ export declare interface DocumentStoreOptions { getClient: (options: SourceClientOptions) => SanityClient documentPreviewStore: DocumentPreviewStore historyStore: HistoryStore schema: Schema initialValueTemplates: Template[] i18n: LocaleSource serverActionsEnabled: boolean } /** @internal */ export declare interface DocumentTypeResolveState { isLoaded: boolean documentType: string | undefined } /** * @hidden * @beta */ export declare type DocumentValuePermission = | 'read' | 'create' | 'update' | 'history' | 'editHistory' /** @internal */ export declare interface DocumentValuePermissionsOptions { grantsStore: GrantsStore document: Record permission: DocumentValuePermission } /** * @hidden * @beta */ export declare interface DocumentVersion { consistency$: Observable remoteSnapshot$: Observable events: Observable patch: (patches: any[]) => MutationPayload[] create: (document: Partial) => MutationPayload createIfNotExists: (document: SanityDocument) => MutationPayload createOrReplace: (document: SanityDocument) => MutationPayload delete: () => MutationPayload mutate: (mutations: MutationPayload[]) => void commit: () => void } /** * @hidden * @beta */ export declare type DocumentVersionEvent = WithVersion /** @internal */ export declare interface DocumentVersionSnapshots { snapshots$: Observable patch: (patches: any[]) => MutationPayload[] create: (document: any) => MutationPayload createIfNotExists: (document: any) => MutationPayload createOrReplace: (document: any) => MutationPayload delete: () => MutationPayload mutate: (mutations: MutationPayload[]) => void commit: () => void } /** @internal */ export declare type DraftId = Opaque /** @internal */ export declare const DRAFTS_FOLDER = 'drafts' /** * @hidden * @beta */ export declare interface DraftsModelDocument { id: string type: string | null draft: { availability: DocumentAvailability snapshot: T | undefined } published: { availability: DocumentAvailability snapshot: T | undefined } } /** * @hidden * @beta */ export declare interface DraftsModelDocumentAvailability { /** * document readability for the published document */ published: DocumentAvailability /** * document readability for the draft document */ draft: DocumentAvailability } /** * This error may happen for arrays of objects where one or more of the members are having duplicate keys * * @public */ export declare type DuplicateKeysError = { type: 'DUPLICATE_KEYS' schemaType: ArraySchemaType duplicates: [index: number, key: string][] } /** @internal */ export declare interface EditReferenceLinkComponentProps { documentId: string documentType: string parentRefPath: Path template?: TemplateOption children: ReactNode } /** * @internal */ export declare interface EditReferenceOptions { id: string type: string parentRefPath: Path template: TemplateOption } /** @internal */ export declare const editState: ( arg1: { client: SanityClient schema: Schema serverActionsEnabled: boolean }, arg2: IdPair, arg3: string, ) => Observable /** * @hidden * @beta */ export declare interface EditStateFor { id: string type: string transactionSyncLock: TransactionSyncLockState | null draft: SanityDocument | null published: SanityDocument | null liveEdit: boolean ready: boolean } /** * * @hidden * @beta */ export declare interface EmailComponents { diff?: ComponentType field?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** * * @hidden * @beta */ export declare function EmailInput(props: EmailInputProps): JSX_2.Element /** * * @hidden * @beta */ export declare type EmailInputProps = StringInputProps /** @internal */ export declare function emitOperation( operationName: keyof OperationsAPI, idPair: IdPair, typeName: string, extraArgs: any[], ): void /** @internal */ export declare const EMPTY_ARRAY: never[] /** @internal */ export declare const EMPTY_OBJECT: Record /** @internal */ export declare function EnabledChangeConnectorRoot({ children, className, isReviewChangesOpen, onOpenReviewChanges, onSetFocus, ...restProps }: EnabledChangeConnectorRootProps): JSX_2.Element /** @internal */ export declare interface EnabledChangeConnectorRootProps { children: ReactNode className?: string isReviewChangesOpen: boolean onOpenReviewChanges: () => void onSetFocus: (path: Path) => void } /** * @internal */ export declare function encodePath(formBuilderPath: Path): string /** * @internal */ export declare function ErrorMessage({ error, message, path, stack, }: ErrorMessageProps): JSX_2.Element /** * @internal */ export declare interface ErrorMessageProps { message: string stack?: string error: unknown path: Array<{ name: string type: string }> } /** @internal */ export declare interface ErrorState { value: undefined error: Error isLoading: false } /** @internal */ export declare type ErrorStatus = { type: 'error' error: Error attemptNo: number isOffline: boolean retryAt: Date } /** @internal */ export declare const escapeField: (fieldName: string) => string /** @internal */ export declare interface EvaluationParams { identity?: string } declare interface ExecuteArgs { operationName: keyof OperationsAPI idPair: IdPair typeName: string extraArgs: any[] } /** @internal */ export declare interface ExpandFieldSetOperation { type: 'expandFieldSet' path: Path } /** @internal */ export declare type ExpandOperation = | ExpandPathOperation | ExpandFieldSetOperation | SetActiveGroupOperation /** @internal */ export declare interface ExpandPathOperation { type: 'expandPath' path: Path } /** @internal */ export declare const FallbackDiff: DiffComponent>> declare interface Features { enabled: boolean error: Error | null features: string[] isLoading: boolean } /** @internal */ export declare const FieldActionMenu: NamedExoticComponent /** @internal */ export declare interface FieldActionMenuProps { nodes: DocumentFieldActionNode[] onMenuOpenChange: (open: boolean) => void } /** @internal */ export declare interface FieldActionsProps { actions: DocumentFieldAction[] documentId: string documentType: string onActions: (actions: DocumentFieldActionNode[]) => void path: Path schemaType: SchemaType } /** @internal */ export declare function FieldActionsProvider(props: FieldActionsProviderProps): JSX_2.Element declare type FieldActionsProviderProps = PropsWithChildren<{ actions: DocumentFieldActionNode[] focused?: boolean path: Path }> /** * * 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 */ export declare const FieldActionsResolver: NamedExoticComponent /** @internal */ export declare function FieldChange( props: { change: FieldChangeNode readOnly?: boolean hidden?: boolean } & HTMLAttributes, ): JSX_2.Element | null /** @internal */ export declare interface FieldChangeNode { type: 'field' diff: Diff itemDiff?: ItemDiff parentDiff?: ObjectDiff | ArrayDiff key: string path: Path error?: FieldValueError titlePath: ChangeTitlePath schemaType: ObjectFieldType showHeader: boolean showIndex: boolean diffComponent?: DiffComponent parentSchema?: ArraySchemaType | ObjectSchemaType readOnly?: ConditionalProperty hidden?: ConditionalProperty } /** @internal @deprecated DO NOT USE */ export declare interface FieldCommentsProps { hasComments: boolean button: ReactNode isAddingComment: boolean } /** * Represents an error that occurred in a specific field of a data object. * @public * * @remarks * This interface is used to provide detailed information about the error, * including the field name, the error type, and the error message. */ export declare interface FieldError { /** * The type of error that occurred. */ kind: 'error' /** * The unique identifier for the error. */ key: string /** * The name of the field that the error occurred in. */ fieldName: string /** * The specific error that occurred. * * ```md * Possible error types include: * - IncompatibleTypeError * - TypeAnnotationMismatchError * - MissingKeysError * - DuplicateKeysError * - UndeclaredMembersError * - MixedArrayError * ``` * * See {@link IncompatibleTypeError}, * {@link TypeAnnotationMismatchError}, * {@link MissingKeysError}, * {@link DuplicateKeysError}, * {@link UndeclaredMembersError} and * {@link MixedArrayError} for more information. * */ error: | IncompatibleTypeError | TypeAnnotationMismatchError | MissingKeysError | DuplicateKeysError | UndeclaredMembersError | MixedArrayError } /** * Represents a field member in a form. * @public */ export declare interface FieldMember { /** The kind of the form node. */ kind: 'field' /** The key of the field. */ key: string /** The name of the field. */ name: string /** The index of the field. */ index: number /** Whether the field is collapsed. */ collapsed: boolean | undefined /** Whether the field is collapsible. */ collapsible: boolean | undefined /** Whether the field is open. */ open: boolean /** * @internal * Whether this field is in the selected group. */ inSelectedGroup: boolean /** * @internal * Names of the field groups this field is part of. */ groups: string[] /** * @hidden * @beta * The form node that represents this field. */ field: Node } /** * @hidden * @beta */ export declare type FieldName = string /** @internal */ export declare const fieldNeedsEscape: (fieldName: string) => boolean /** @internal */ export declare interface FieldOperationsAPI { patch: { execute: (patches: PatchOperations[]) => void } } /** @internal */ export declare const FieldPresence: typeof FieldPresenceWithoutOverlay /** @internal */ export declare type FieldPresenceData = { element: HTMLElement presence: FormNodePresence[] maxAvatars: number } /** @internal */ export declare const FieldPresenceInner: NamedExoticComponent /** @internal */ export declare interface FieldPresenceInnerProps { maxAvatars?: number presence: FormNodePresence[] stack?: boolean position?: AvatarPosition animateArrowFrom?: AvatarPosition } /** @internal */ export declare interface FieldPresenceProps { presence: FormNodePresence[] maxAvatars: number } /** @internal */ export declare function FieldPresenceWithoutOverlay(props: FieldPresenceProps): JSX_2.Element | null /** @internal */ export declare function FieldPresenceWithOverlay(props: FieldPresenceProps): JSX_2.Element /** @internal */ export declare type FieldPreviewComponent = ComponentType<{ color?: UserColor schemaType: T extends Array ? ArraySchemaType : T extends boolean ? BooleanSchemaType : T extends string ? StringSchemaType : T extends number ? NumberSchemaType : T extends Reference ? ReferenceSchemaType : T extends object ? ObjectSchemaType : any value: T }> /** * @hidden * @public */ export declare type FieldProps = | ObjectFieldProps | ObjectFieldProps | ObjectFieldProps | ObjectFieldProps | ObjectFieldProps | ObjectFieldProps | ObjectFieldProps | ArrayFieldProps | NumberFieldProps | BooleanFieldProps | StringFieldProps /** * Represents a member of a field set. * @public */ export declare interface FieldSetMember { /** The kind of member. */ kind: 'fieldSet' /** The key of the member. */ key: string /** * Indicates whether the member is included in the currently selected group. * If it's hidden and in the currently selected group, it should still be excluded from its group. * @internal */ _inSelectedGroup: boolean /** The names of the field groups the member belongs to. */ groups: string[] /** * @hidden * @beta * The state of the field set. */ fieldSet: FieldsetState } /** * @hidden * @beta */ export declare interface FieldsetState { path: Path name: string level: number title?: string description?: string hidden?: boolean collapsible?: boolean collapsed?: boolean columns?: number | number[] members: (FieldMember | FieldError)[] } /** @internal */ export declare interface FieldStatusProps { children?: ReactNode maxAvatars?: number position?: 'top' | 'bottom' } /** @internal */ export declare interface FieldValueError { /** * i18n key for the error message */ messageKey: StudioLocaleResourceKeys /** * The expected type of the value */ expectedType: string /** * The actual type of the value */ actualType: string /** * The actual value of the field */ value: unknown } /** * * @hidden * @beta */ export declare interface FileComponents { annotation?: ComponentType block?: ComponentType diff?: ComponentType field?: ComponentType> inlineBlock?: ComponentType input?: ComponentType> item?: ComponentType> preview?: ComponentType } /** * @hidden * @beta */ export declare function FileInput(props: FileInputProps): JSX_2.Element /** * @hidden * @beta */ export declare type FileInputProps = Omit< BaseFileInputProps, 'assetSources' | 'directUploads' | 'observeAsset' | 'resolveUploader' | 'client' | 't' > /** * * @hidden * @beta */ export declare interface FileLike { type: string name?: string } declare type FiltersVisibleSet = { type: 'FILTERS_VISIBLE_SET' visible: boolean } /** @internal */ export declare function findIndex(array: unknown[], segment: PathSegment): number /** @internal */ export declare type FIXME = any /** @internal */ export declare type FIXME_SanityDocument = Record /** * @internal * * This function flattens the config tree into a list of configs in the order they should be applied. */ export declare const flattenConfig: ( {plugins, ...currentConfig}: PluginOptions, path: string[], ) => Array<{ config: PluginOptions path: string[] }> /** * Available measurement units * * @public */ export declare 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' /** * The result of the duration formatter * * @public */ export declare 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 } /** * @alpha */ export declare function FormBuilder(props: FormBuilderProps): JSX_2.Element /** @internal */ export declare interface FormBuilderComponentResolverContext extends ConfigContext { schemaType: SchemaType } /** * * @hidden * @beta */ export declare interface FormBuilderContextValue { /** * @deprecated INTERNAL USE ONLY * @internal */ __internal: { components: { CustomMarkers: FormBuilderCustomMarkersComponent Markers: FormBuilderMarkersComponent } file: { assetSources: AssetSource[] directUploads: boolean } filterField: FormBuilderFilterFieldFn image: { assetSources: AssetSource[] directUploads: boolean } patchChannel: PatchChannel } autoFocus?: boolean changesOpen?: boolean collapsedFieldSets: StateTree | undefined collapsedPaths: StateTree | undefined focusPath: Path focused?: boolean groups: FormFieldGroup[] id: string readOnly?: boolean renderAnnotation?: RenderAnnotationCallback renderBlock?: RenderBlockCallback renderField: RenderFieldCallback renderInlineBlock?: RenderBlockCallback renderInput: RenderInputCallback renderItem: RenderItemCallback renderPreview: RenderPreviewCallback schemaType: ObjectSchemaType } /** * Component for rendering custom block markers * * @public * @hidden * @deprecated use `renderBlock`, `renderInlineBlock`, `renderAnnotation` interfaces instead */ export declare type FormBuilderCustomMarkersComponent = ComponentType<{ markers: PortableTextMarker[] }> /** * @internal */ export declare interface FormBuilderFilterFieldFn { (type: ObjectSchemaType, field: ObjectField, selectedLanguageIds: string[]): boolean } /** * * @hidden * @beta */ export declare type FormBuilderInputComponentMap = Record< string, { field?: ComponentType item?: ComponentType input?: ComponentType preview?: ComponentType } > /** * * @hidden * @beta */ export declare type FormBuilderMarkersComponent = ComponentType<{ markers: PortableTextMarker[] renderCustomMarkers?: RenderCustomMarkers validation: FormNodeValidation[] }> /** * @alpha */ export declare interface FormBuilderProps extends Omit { /** @internal */ __internal_fieldActions?: DocumentFieldAction[] /** @internal Considered internal – do not use. */ __internal_patchChannel: PatchChannel autoFocus?: boolean changesOpen?: boolean collapsedFieldSets: StateTree | undefined collapsedPaths: StateTree | undefined focusPath: Path focused: boolean | undefined id: string onChange: (changeEvent: PatchEvent) => void onPathBlur: (path: Path) => void onPathFocus: (path: Path) => void onPathOpen: (path: Path) => void onFieldGroupSelect: (path: Path, groupName: string) => void onSetFieldSetCollapsed: (path: Path, collapsed: boolean) => void onSetPathCollapsed: (path: Path, collapsed: boolean) => void presence: FormNodePresence[] readOnly?: boolean schemaType: ObjectSchemaType validation: ValidationMarker[] value: FormDocumentValue | undefined } /** @internal */ export declare const FormCallbacksProvider: NamedExoticComponent< FormCallbacksValue & { children: ReactNode } > /** @internal */ export declare interface FormCallbacksValue { transformPatches?: (patches: FormPatch[]) => FormPatch[] onChange: (patchEvent: PatchEvent) => void onPathFocus: (path: Path, payload?: OnPathFocusPayload) => void onPathBlur: (path: Path) => void onPathOpen: (path: Path) => void onSetPathCollapsed: (path: Path, collapsed: boolean) => void onSetFieldSetCollapsed: (path: Path, collapsed: boolean) => void onFieldGroupSelect: (path: Path, fieldGroupName: string) => void } /** * @hidden * @beta */ export declare interface FormComponents { annotation?: ComponentType block?: ComponentType field?: ComponentType inlineBlock?: ComponentType input?: ComponentType item?: ComponentType preview?: ComponentType } /** * * @hidden * @beta */ export declare interface FormDecPatch extends FormPatchBase { path: Path type: 'dec' origin?: FormPatchOrigin value: FormPatchJSONValue } /** * * @hidden * @beta */ export declare interface FormDiffMatchPatch extends FormPatchBase { path: Path type: 'diffMatchPatch' origin?: FormPatchOrigin value: string } /** * This represents the shape of the root value sanity forms expect * @hidden * @public */ export declare interface FormDocumentValue { _type: string _id: string [key: string]: unknown } /** @internal */ export declare const FormField: NamedExoticComponent< FormFieldProps & Omit, 'height' | 'as' | 'ref'> > /** * @hidden * @beta */ export declare interface FormFieldGroup { name: string selected?: boolean disabled?: boolean title?: string icon?: ComponentType } /** @internal */ export declare const FormFieldHeaderText: NamedExoticComponent /** @internal */ export declare interface FormFieldHeaderTextProps { /** * * @hidden * @beta */ validation?: FormNodeValidation[] description?: ReactNode /** * The unique ID used to target the actual input element */ inputId?: string title?: ReactNode deprecated?: DeprecatedProperty } /** @internal */ export declare 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 } /** @internal */ export declare const FormFieldSet: ForwardRefExoticComponent< FormFieldSetProps & Omit, 'height' | 'as' | 'ref'> & RefAttributes > /** @internal */ export declare 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 title?: ReactNode /** * * @hidden * @beta */ validation?: FormNodeValidation[] inputId: string deprecated?: DeprecatedProperty } /** @internal */ export declare function FormFieldStatus({ children, maxAvatars, position, }: FieldStatusProps): JSX_2.Element /** @internal */ export declare type FormFieldValidation = | FormFieldValidationWarning | FormFieldValidationError | FormFieldValidationInfo /** @internal */ export declare interface FormFieldValidationError { type: 'error' label: string } /** @internal */ export declare interface FormFieldValidationInfo { type: 'info' label: string } /** @internal */ export declare function FormFieldValidationStatus( props: FormFieldValidationStatusProps, ): JSX_2.Element /** @internal */ export declare interface FormFieldValidationStatusProps { /** * * @hidden * @beta */ validation?: FormNodeValidation[] /** * * @hidden * @beta */ __unstable_showSummary?: boolean fontSize?: number | number placement?: Placement } /** @internal */ export declare interface FormFieldValidationWarning { type: 'warning' label: string } /** * * @hidden * @beta */ export declare interface FormIncPatch extends FormPatchBase { path: Path type: 'inc' origin?: FormPatchOrigin value: FormPatchJSONValue } /** @internal */ export declare const FormInput: NamedExoticComponent< ( | ArrayOfObjectsInputProps< { _key: string }, ArraySchemaType > | ObjectInputProps, ObjectSchemaType> ) & (FormInputRelativePathArg | FormInputAbsolutePathArg) & { /** * Whether to include the field around the input. Defaults to false */ includeField?: boolean | undefined } > /** @internal */ export declare type FormInputAbsolutePathArg = { absolutePath: Path } /** @internal */ export declare type FormInputRelativePathArg = { relativePath: Path } /** * * @hidden * @beta */ export declare interface FormInsertPatch extends FormPatchBase { path: Path origin?: FormPatchOrigin type: 'insert' position: FormInsertPatchPosition items: FormPatchJSONValue[] } /** * * @hidden * @beta */ export declare type FormInsertPatchPosition = 'before' | 'after' /** * @hidden * @public */ export declare interface FormNodePresence { user: User path: Path sessionId: string lastActiveAt: string selection?: EditorSelection } /** * * @hidden * @beta */ export declare type FormPatch = | FormSetPatch | FormSetIfMissingPatch | FormUnsetPatch | FormInsertPatch | FormDiffMatchPatch /** * @hidden * @beta */ export declare interface FormPatchBase { /** * A property used to identify this as a Sanity patch type, eg "set", "unset", "insert", etc. * This allows us to potentially introduce new patch types in the future without breaking * existing code. This is an internal property/implementation detail and should not be used by * consumers. * * @internal */ patchType: symbol } /** * * @hidden * @beta */ export declare type FormPatchJSONValue = | number | string | boolean | { [key: string]: FormPatchJSONValue } | FormPatchJSONValue[] /** * * @hidden * @beta */ export declare type FormPatchOrigin = 'remote' | 'local' | 'internal' /** * Default wiring for `FormBuilderProvider` when used with Sanity * * @alpha This API might change. */ export declare function FormProvider(props: FormProviderProps): JSX_2.Element /** * @alpha This API might change. */ export declare interface FormProviderProps { /** @internal */ __internal_fieldActions?: DocumentFieldAction[] /** @internal Considered internal, do not use. */ __internal_patchChannel: PatchChannel autoFocus?: boolean changesOpen?: boolean children?: ReactNode collapsedFieldSets: StateTree | undefined collapsedPaths: StateTree | undefined 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[] } /** * * @hidden * @beta */ export declare interface FormSetIfMissingPatch extends FormPatchBase { path: Path origin?: FormPatchOrigin type: 'setIfMissing' value: FormPatchJSONValue } /** * * @hidden * @beta */ export declare interface FormSetPatch extends FormPatchBase { path: Path type: 'set' origin?: FormPatchOrigin value: FormPatchJSONValue } /** @internal */ export declare type FormState< T extends { [key in string]: unknown } = { [key in string]: unknown }, S extends ObjectSchemaType = ObjectSchemaType, > = ObjectFormNode /** * * @hidden * @beta */ export declare interface FormUnsetPatch extends FormPatchBase { path: Path origin?: FormPatchOrigin type: 'unset' } /** * @internal * @hidden */ export declare interface FormValueContextValue { value: FormDocumentValue | undefined } /** * * @internal * @hidden */ export declare function FormValueProvider(props: { value: FormDocumentValue | undefined children: ReactNode }): JSX_2.Element /** * @internal */ export declare function fromMutationPatches( origin: FormPatchOrigin, patches: MutationPatch[], ): FormPatch[] /** @internal */ export declare const FromTo: ForwardRefExoticComponent< Omit & RefAttributes > /** @internal */ export declare function FromToArrow( props: { direction?: FromToArrowDirection } & TextProps & Omit, 'children' | 'ref'>, ): JSX_2.Element /** @internal */ export declare type FromToArrowDirection = 'down' | 'right' /** @internal */ export declare interface FromToIndex { hasMoved: boolean fromIndex?: number toIndex?: number annotation?: Annotation } /** @internal */ export declare type FromToProps = { align?: 'top' | 'center' | 'bottom' layout?: 'grid' | 'inline' from?: ReactNode to?: ReactNode } & Omit, 'children' | 'as' | 'height' | 'wrap'> /** * General preview layout key * * @public */ export declare type GeneralPreviewLayoutKey = 'compact' | 'default' | 'media' | 'detail' /** * * @hidden * @beta */ export declare interface GeopointComponents { annotation?: ComponentType block?: ComponentType diff?: ComponentType field?: ComponentType> inlineBlock?: ComponentType input?: ComponentType> item?: ComponentType> preview?: ComponentType } /** @internal */ export declare function getAnnotationAtPath( diff: Diff, diffPath: string | Path, ): Annotation | undefined /** @internal */ export declare function getAnnotationColor( colorManager: UserColorManager, annotation?: Annotation | null, ): UserColor /** * 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 */ export declare function getConfigContextFromSource(source: Source): ConfigContext /** @internal */ export declare function getDiffAtPath(diff: Diff, diffPath: string | Path): Diff | undefined /** * The observable version of `useDocumentPairPermissions` * * @see useDocumentPairPermissions * * @internal */ export declare function getDocumentPairPermissions({ client, grantsStore, schema, id, permission, type, serverActionsEnabled, }: DocumentPairPermissionsOptions): Observable /** * The observable version of `useDocumentValuePermissions` * * @see useDocumentValuePermissions * * @internal */ export declare function getDocumentValuePermissions({ grantsStore, document, permission, }: DocumentValuePermissionsOptions): Observable /** @internal */ export declare function getDraftId(id: string): DraftId /** * This takes a form state and returns a list of operations required to open a node at a particular path * @param node - The base form node (i.e. the form state node for the _document_) * @param path - The path to open * * @internal */ export declare function getExpandOperations(node: BaseFormNode, path: Path): ExpandOperation[] /** @internal */ export declare function GetHookCollectionState( props: GetHookCollectionStateProps, ): JSX_2.Element /** @internal */ export declare interface GetHookCollectionStateProps { /** * Arguments that will be received by the action hooks, `onComplete` will be added by the HookStateContainer component. */ args: T children: (props: {states: K[]}) => ReactNode hooks: ActionHook< T & { onComplete: () => void }, K >[] onReset?: () => void /** * Name for the hook group. If provided, only hooks with the same group name will be included in the collection. */ group?: string } /** @internal */ export declare function getIdPair(id: string): { draftId: DraftId publishedId: PublishedId } /** * @internal */ export declare function getInitialValueStream( schema: Schema, initialValueTemplates: Template[], documentPreviewStore: DocumentPreviewStore, opts: InitialValueOptions, context: InitialValueResolverContext, ): Observable /** @internal */ export declare function getItemKey(arrayItem: unknown): string | undefined /** @internal */ export declare function getItemKeySegment(arrayItem: unknown): KeyedSegment | undefined /** @internal */ export declare function getNamelessWorkspaceIdentifier( title: string | undefined, index: number, ): string /** @internal */ export declare function getPairListener( client: SanityClient, idPair: IdPair, options?: PairListenerOptions, ): Observable /** @internal */ export declare function getPreviewPaths(preview: SchemaType['preview']): PreviewPath[] | undefined /** * Obtain a document's published and draft state, along with loading status. * * @internal */ export declare function getPreviewStateObservable( documentPreviewStore: DocumentPreviewStore, schemaType: SchemaType, documentId: string, title: ReactNode, ): Observable /** * Obtain document preview values used in and components. * Also displays fallback values if the document cannot be found. * * @internal */ export declare const getPreviewValueWithFallback: ({ value, draft, published, }: { value: SanityDocument draft?: Partial | PreviewValue | null published?: Partial | PreviewValue | null }) => | PreviewValue | { title: JSX_2.Element subtitle: JSX_2.Element media: () => JSX_2.Element } /** @internal */ export declare function getProviderTitle(provider?: string): string | undefined /** @internal */ export declare function getPublishedId(id: string): PublishedId /** * 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 */ export declare function getSchemaTypeTitle(type: SchemaType): string /** * @internal */ export declare const getSearchableTypes: (schema: Schema) => ObjectSchemaType[] /** * The observable version of `useTemplatePermissions` * * @internal */ export declare function getTemplatePermissions({ grantsStore, templateItems, templates, schema, context, }: TemplatePermissionsOptions): Observable< Array>> > /** @internal */ export declare function getValueAtPath(rootValue: unknown, path: Path): unknown /** @internal */ export declare function getValueError( value: unknown, schemaType: SchemaType, ): FieldValueError | undefined /** * 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 */ export declare function getWorkspaceIdentifier({name, title}: WorkspaceLike, index: number): string /** @internal */ export declare interface GlobalErrorChannel { subscribe: (subscriber: GlobalErrorSubscriber) => GlobalErrorUnsubscriber } /** @internal */ export declare function GlobalErrorHandler(): JSX_2.Element /** @internal */ export declare interface GlobalErrorMessage { error: Error | null params: { colno: number lineno: number error: Error event: ErrorEvent | string source?: string } } /** @internal */ export declare type GlobalErrorSubscriber = (msg: GlobalErrorMessage) => void /** @internal */ export declare type GlobalErrorUnsubscriber = () => void /** @internal */ export declare type GlobalPresence = { user: User status: Status lastActiveAt: string locations: PresenceLocation[] } /** @internal */ export declare const globalScope: typeof globalThis & { __sanityErrorChannel?: GlobalErrorChannel | undefined } /** @internal */ export declare interface Grant { filter: string permissions: DocumentValuePermission[] } /** * @internal * Takes a grants object, a permission and a document * checks whether the permission is granted for the given document */ export declare function grantsPermissionOn( userId: string | null, grants: Grant[], permission: DocumentValuePermission, document: SanityDocument | null, ): Promise /** * @hidden * @beta */ export declare interface GrantsStore { /** * Returns an observable of `PermissionCheckResult` * * This API is returns an observable (vs a promise) so the consumer can reac * to incoming changes to the user permissions (e.g. for changing _debug_ * roles). * * This API also accepts a `null` document in which it should return * `granted: true` */ checkDocumentPermission( checkPermissionName: DocumentValuePermission, document: Partial | null, ): Observable } /** @internal */ export declare type GrantsStoreOptions = GrantsStoreOptionsCurrentUser | GrantsStoreOptionsUserId declare interface GrantsStoreOptionsCurrentUser { client: SanityClient /** * @deprecated The `currentUser` option is deprecated. Use `userId` instead. */ currentUser: CurrentUser | null } declare interface GrantsStoreOptionsUserId { client: SanityClient userId: string | null } /** @internal */ export declare function GroupChange( props: { change: GroupChangeNode readOnly?: boolean hidden?: boolean } & HTMLAttributes, ): ReactElement | null /** * Schema */ /** * "Changes" (presentation-oriented grouping of diffs) * * @internal */ export declare interface GroupChangeNode { type: 'group' changes: ChangeNode[] key: string path: Path titlePath: ChangeTitlePath schemaType?: SchemaType readOnly?: ConditionalProperty hidden?: ConditionalProperty fieldsetName?: string } declare type GuardedOperation = Operation /** @internal */ export declare type HexColor = string /** @internal */ export declare interface HiddenField { kind: 'hidden' key: string name: string index: number } /** * @hidden * @beta */ export declare interface HistoryStore { getDocumentAtRevision: ( documentId: string, revision: string, ) => Promise getHistory: ( documentIds: string[], options?: { time?: string revision?: string }, ) => Promise<{ documents: SanityDocument[] }> getTransactions: (documentIds: string[]) => Promise restore: (id: string, targetId: string, rev: string) => Observable /** @internal */ getTimelineController: (options: { client: SanityClient documentId: string documentType: string }) => TimelineController } /** @internal */ export declare interface HistoryStoreOptions { client: SanityClient } /** * 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 */ export declare function Hotkeys({ makePlatformAware, keys: hotKeys, ...props }: HotkeysProps): JSX_2.Element /** * Properties for the `Hotkeys` component. * * @public */ export declare type HotkeysProps = HotkeysProps_2 & { /** * Whether to make the keys platform-aware (eg `alt` to `option` on Apple devices). * * @defaultValue true */ makePlatformAware?: boolean } & Omit, 'ref' | 'size' | 'as'> & RefAttributes /** @internal */ export declare function HoveredFieldProvider(props: PropsWithChildren): JSX_2.Element /** * Enforces the shape of an object allowed to be passed into `useI18nText`. * @internal */ export declare 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 } /** * @alpha */ export declare type I18nSearchOperatorDescriptionKey = `search.operator.${Lowercase}.description` /** * @alpha */ export declare type I18nSearchOperatorNameKey = `search.operator.${Lowercase}.name` declare type IconButton = { text?: undefined icon?: ButtonProps_2['icon'] /** * When using a button with an icon, tooltipProps are required to enforce consistency in UI. */ tooltipProps: TooltipProps | null } /** @internal */ export declare type Id = string /** @internal */ export declare interface IdPair { draftId: string publishedId: string } /** * * @hidden * @beta */ export declare interface ImageComponents { annotation?: ComponentType block?: ComponentType diff?: ComponentType field?: ComponentType> inlineBlock?: ComponentType input?: ComponentType> item?: ComponentType> preview?: ComponentType } /** * @hidden * @beta */ export declare function ImageInput(props: ImageInputProps): JSX_2.Element /** * @hidden * @beta */ export declare type ImageInputProps = Omit< BaseImageInputProps, | 'assetSources' | 'directUploads' | 'imageUrlBuilder' | 'observeAsset' | 'client' | 'resolveUploader' > /** * @hidden * @beta */ export declare type ImageUrlBuilder = ReturnType /** @internal */ export declare const ImperativeToast: ForwardRefExoticComponent> /** * A locale resource bundle where the locale is inherited from the parent locale definition. * * @public */ export declare type ImplicitLocaleResourceBundle = Omit /** * @hidden * @beta */ export declare function inc(amount?: number, path?: Path): FormIncPatch /** * This error may happen if the member type is structurally incompatible with the defined schema type. * Some examples: * - the schema type defines an array, but the actual value is an object (or vice versa) * - the schema type defines a number, but the actual value is a string (or vice versa) * - the schema type defines an object, but the actual value is a string (or vice versa) * * @public */ export declare type IncompatibleTypeError = { type: 'INCOMPATIBLE_TYPE' expectedSchemaType: SchemaType resolvedValueType: string value: unknown } /** @internal */ export declare const initialDocumentFieldActions: DocumentFieldAction[] /** @internal */ export declare interface InitialSnapshotEvent { type: 'snapshot' documentId: string document: SanityDocument | null } /** * @hidden * @beta */ export declare interface InitialValueErrorMsg { type: 'error' error: Error } /** * @hidden * @beta */ export declare interface InitialValueLoadingMsg { type: 'loading' } /** * @hidden * @beta */ export declare type InitialValueMsg = | InitialValueLoadingMsg | InitialValueSuccessMsg | InitialValueErrorMsg /** * @hidden * @beta */ export declare interface InitialValueOptions { documentId: string documentType: string templateName?: string templateParams?: Record } /** @internal */ export declare interface InitialValueState { loading: boolean error: Error | null value: SanityDocumentLike } /** * @hidden * @beta */ export declare interface InitialValueSuccessMsg { type: 'success' value: SanityDocumentLike | null } /** * Representation of an initial value template _item_ * Used by the {@link structure.StructureBuilder} class to determine which initial value templates * should be available for a structure node, such as a list pane. * * @public */ export declare interface InitialValueTemplateItem extends TemplateItem { type: 'initialValueTemplateItem' /** ID for this template item */ id: string /** Initial value template schema type */ schemaType: string } /** * @hidden * @beta */ export declare function InlinePreview(props: InlinePreviewProps): JSX_2.Element /** * @hidden * @beta */ export declare type InlinePreviewProps = Omit, 'renderDefault'> /** * @hidden * @public */ export declare type InputProps = | ArrayOfObjectsInputProps | ArrayOfPrimitivesInputProps | BooleanInputProps | NumberInputProps | ObjectInputProps | ObjectInputProps | ObjectInputProps | ObjectInputProps | ObjectInputProps | ObjectInputProps | ObjectInputProps | PortableTextInputProps | StringInputProps /** * @hidden * @beta */ export declare function insert( items: any[], position: FormInsertPatchPosition, path?: Path, ): FormInsertPatch /** @internal */ export declare function InsufficientPermissionsMessage({ currentUser, context, }: InsufficientPermissionsMessageProps): JSX_2.Element /** @internal */ export declare 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' } /** * * @hidden * @beta */ export declare function IntentButton( props: IntentLinkProps & ButtonProps & Omit, 'ref' | 'size' | 'as'>, ): JSX_2.Element declare interface IntermediaryError { type: 'error' args: ExecuteArgs error: any } declare interface IntermediarySuccess { type: 'success' args: ExecuteArgs } /** * This error may happen for arrays (of both objects and primitive values) if we encounter items that are not valid according to the schema definition * * * @hidden * @beta */ export declare type InvalidItemTypeError = { type: 'INVALID_ITEM_TYPE' validTypes: SchemaType[] resolvedValueType: string value: unknown } /** @internal */ export declare function isAddedItemDiff(item: ItemDiff): item is ItemDiff & { diff: Diff & { action: 'added' } } /** @internal */ export declare function isArray(value: unknown): value is unknown[] /** * @hidden * @beta */ export declare function isArrayOfBlocksInputProps( inputProps: InputProps | Omit, ): inputProps is ArrayOfObjectsInputProps /** * @hidden * @beta */ export declare function isArrayOfObjectsInputProps( inputProps: InputProps | Omit, ): inputProps is ArrayOfObjectsInputProps /** * @hidden * @beta */ export declare function isArrayOfPrimitivesInputProps( inputProps: InputProps | Omit, ): inputProps is ArrayOfPrimitivesInputProps /** * 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 */ export declare function isAuthStore(maybeStore: unknown): maybeStore is AuthStore /** * @hidden * @beta */ export declare function isBooleanInputProps( inputProps: InputProps | Omit, ): inputProps is BooleanInputProps /** @internal */ export declare function isBuilder(template: unknown): template is Serializeable