import "./index-WjMpTx9m.js"; import { t as RenderEquationEditorFn } from "./index-DsfL3aA6.js"; import { t as RenderEquationNodeFn } from "./index-CRyjk-hB.js"; import { Plugin, PluginKey } from "prosemirror-state"; import { InputRule } from "prosemirror-inputrules"; import { NodeSpec } from "prosemirror-model"; //#region src/constants.d.ts declare const BLOCK_EQUATION_NAME = "block_equation"; declare const INLINE_EQUATION_NAME = "inline_equation"; //#endregion //#region src/equation.d.ts type EquationPluginState = { docChangedInLastTr: boolean; requestOpenEditor: boolean; }; interface EquationOptions { /** * A function that renders equation editor to HTML document and returns a * clean-up function to execute when closing editor. */ renderEditor: RenderEquationEditorFn; /** * A function that renders equation node to HTML document. */ renderNode: RenderEquationNodeFn; } /** * Create a ProseMirror plugin that adds equation NodeViews and manages * them. */ declare function equation({ renderEditor, renderNode }: EquationOptions): Plugin; //#endregion //#region src/equationInputRules.d.ts declare function inlineEquationInputRule(): InputRule; //#endregion //#region src/schema.d.ts interface EquationNodesOptions { blockEquationGroup?: string; inlineEquationGroup?: string; } type EquationNodes = Record; /** * This function creates a set of [node * specs](http://prosemirror.net/docs/ref/#model.SchemaSpec.nodes) for * `block_equation` and `inline_equation` nodes types as used by this * module. The result can then be added to the set of nodes when creating a * schema. * * @example * ```ts * new Schema({ * nodes: { * ...equationNodes({ * blockEquationGroup: 'block', * inlineEquationGroup: 'inline', * }) * }, * }) * ``` * * @public */ declare function equationNodes(options: EquationNodesOptions): EquationNodes; //#endregion export { BLOCK_EQUATION_NAME, INLINE_EQUATION_NAME, equation, equationNodes, inlineEquationInputRule }; //# sourceMappingURL=index.d.ts.map