import { fsm2 } from "@heydovetail/ui-components"; import { EditorState, Plugin } from "prosemirror-state"; export interface PluginState { readonly type: "default"; readonly text: string; readonly isBlank: (editorState: EditorState) => boolean; } export interface PlaceholderPluginOptions { isBlank: PluginState["isBlank"]; text: PluginState["text"]; } declare const transition: (state: CurrentStateShape) => CurrentStateShape extends PluginState ? fsm2.Transition) => { isBlank: (editorState: EditorState) => boolean; text: string; type: "default"; }; }; }, { default: { withOptions: (prev: PluginState, options: Partial) => { isBlank: (editorState: EditorState) => boolean; text: string; type: "default"; }; }; } extends { [key in CurrentStateShape["type"]]: infer T; } ? T : never> : never; declare const setPluginState: (env: { state: EditorState>; tr?: import("prosemirror-state").Transaction> | undefined; dispatch?: ((tr: import("prosemirror-state").Transaction>) => void) | undefined; }, newPluginState: PluginState | ((prevPluginState: PluginState) => PluginState)) => void; export { setPluginState, transition }; export declare class PlaceholderPlugin extends Plugin { constructor(options: PlaceholderPluginOptions); }