import { Editor as Editor_2 } from '@tiptap/react';
import { Extension } from '@tiptap/core';
import { JSX } from 'react/jsx-runtime';
import { Mark } from '@tiptap/core';
import { Node as Node_2 } from '@tiptap/core';
import { NodeViewProps } from '@tiptap/react';
import { ReactNode } from 'react';

export declare const AxiomLike: Extension<any, any>;

export declare const Blocks: Extension<any, any>;

export declare function cleanPtx(origXml: string): string;

declare interface CursorPosition {
    pos: () => number;
    depth: () => number;
    inTextNode: () => boolean;
    prevNodeIsText: () => boolean;
    nextNodeIsText: () => boolean;
    parentType: () => string;
    anchor: () => any;
    nextNodeSize: () => number;
    prevNodeSize: () => number;
}

export declare const Definition: Node_2<any, any>;

export declare const Divisions: Extension<any, any>;

declare interface Editor {
    $pos: (pos: number) => any;
    state: {
        selection: {
            $anchor: {
                pos: number;
                depth: number;
                parent: {
                    firstChild: {
                        isText: boolean;
                    } | null;
                    type: {
                        name: string;
                    };
                };
                nodeBefore: {
                    isText: boolean;
                    nodeSize: number;
                } | null;
                nodeAfter: {
                    type: {
                        name: string;
                    };
                    nodeSize: number;
                } | null;
            };
        };
    };
}

export declare const Emph: Node_2<any, any>;

export declare const ExampleLike: Extension<any, any>;

export declare const getCursorPos: (editor: Editor) => CursorPosition;

export declare const Inline: Extension<any, any>;

export declare function json2ptx(json: JsonNode): string;

declare interface JsonNode {
    type: string;
    content?: JsonNode[];
    attrs?: Record<string, string | null>;
    text?: string;
    marks?: Array<{
        type: string;
    }>;
}

export declare const KeyboardCommands: Extension<any, any>;

export declare const KNOWN_TAGS: string[];

export declare const MathDisplay: Node_2<any, any>;

export declare const MathEquation: Node_2<any, any>;

export declare const MathInline: Node_2<any, any>;

export declare const MenuBar: (props: MenuBarProps) => JSX.Element;

export declare interface MenuBarProps {
    isChecked: boolean;
    onChange: () => void;
    title?: string;
    onTitleChange?: (value: string) => void;
    onSaveButton?: () => void;
    saveButtonLabel?: string;
    onCancelButton?: () => void;
    cancelButtonLabel?: string;
    showPreviewModeToggle?: boolean;
    feedbackControl?: ReactNode;
}

export declare const ProofComponent: () => JSX.Element;

export declare const PtxBubbleMenu: ({ editor }: {
    editor: Editor_2;
}) => JSX.Element;

export declare const PtxFloatingMenu: ({ editor }: {
    editor: Editor_2;
}) => JSX.Element;

export declare const RawPtx: Node_2<any, any>;

export declare const Statement: Node_2<any, any>;

export declare const TheoremLikeComponent: (props: NodeViewProps) => JSX.Element;

export declare const TheoremLikeExtension: Extension<any, any>;

export declare const Title: Node_2<any, any>;

export declare const UnknownMark: Mark<any, any>;

export declare const Url: Node_2<any, any>;

export declare const VisualEditor: ({ content, onChange, canEdit, editDisabledReason, }: VisualEditorProps) => JSX.Element;

declare interface VisualEditorProps {
    /** PreTeXt XML string to render and (optionally) edit. */
    content: string;
    /**
     * Called (debounced 500 ms) with updated PreTeXt XML whenever the user edits
     * content. Only fired when editing is enabled.
     */
    onChange: (html: string) => void;
    /**
     * Whether editing is allowed. Defaults to `true`.
     * When `false`, the editor stays read-only and the "Edit" toggle is hidden.
     */
    canEdit?: boolean;
    /**
     * Message shown when editing is disabled.
     */
    editDisabledReason?: string;
}

export { }
