import type { Theme } from '@material-ui/core'; import type { EditorState, Transaction } from 'prosemirror-state'; import type { Node, Schema, Slice } from 'prosemirror-model'; import { Fragment } from 'prosemirror-model'; import type { EditorView, DirectEditorProps } from 'prosemirror-view'; import type { Nodes } from '@curvenote/schema'; import type { Store } from './store/types'; import type { LinkResult } from './store/suggestion/types'; export declare type SearchContext = { search: (query?: string) => LinkResult[]; }; export declare type UploadImageState = string; export declare type Options = { transformKeyToId: (key: any) => string | null; handlePaste?: (view: EditorView, event: ClipboardEvent, slice: Slice) => boolean; uploadImage: (file: File, node: Node | null) => Promise; modifyTransaction?: (stateKey: any, viewId: string, state: EditorState, transaction: Transaction) => Transaction; getDocId: () => string; addComment?: (stateKey: any, state: EditorState) => boolean; onDoubleClick?: (stateKey: any, viewId: string | null, view: EditorView, pos: number, event: MouseEvent) => boolean; theme: Theme; citationPrompt: () => Promise; createLinkSearch: () => Promise; nodeViews?: DirectEditorProps['nodeViews']; getCaptionFragment?: (schema: Schema, src: string) => Fragment; }; declare type Ref = { store: () => T; _store?: T; opts: () => Options; _opts?: Options; }; export declare const ref: Ref; export declare function setup(store: Store, opts: Options, options?: { setupComponents: boolean; setupSidenotes: boolean; }): void; export declare const store: Pick; export declare const opts: Required; export {};