UNPKG

@curvenote/schema

Version:

Schema and markdown parser for @curvenote/editor

11 lines (10 loc) 656 B
import type { Node as ProsemirrorNode, Schema } from 'prosemirror-model'; import type { GenericNode } from 'mystjs'; import type { Root } from '../../spec'; import type { Text } from './document'; import { Node } from './document'; import type { MdastOptions } from '../types'; export declare function nodeToMdast(fragment: (Node | Text)[], schema: Schema, opts: MdastOptions): GenericNode[]; export declare function convertToMdast(node: ProsemirrorNode, opts: MdastOptions): Root; export declare function convertToMdastSnippet(node: ProsemirrorNode, opts: MdastOptions): GenericNode; export declare function transformNumericalFootnotes(root: Root): Root;