import type { CrepeBuilder } from '@milkdown/crepe/builder' import type { Editor } from '@milkdown/kit/core' import type { Dispatch, RefObject, SetStateAction } from 'react' export type GetEditor = ( container: HTMLElement ) => Editor | CrepeBuilder | undefined export interface UseEditorReturn { readonly loading: boolean readonly get: () => Editor | undefined } export interface EditorInfoCtx { loading: boolean setLoading: Dispatch> dom: RefObject editor: RefObject editorFactory: GetEditor | undefined setEditorFactory: Dispatch> }