import { NodeType } from "prosemirror-model"; import { Command, EditorState, Transaction } from "prosemirror-state"; /** * Toggles a list. * When the provided list type wrapper (e.g. bullet_list) is inactive then wrap the list with * this type. When it is active then remove the selected line from the list. * * @param listType - the list node type * @param itemType - the list item node type */ export declare function toggleList(listType: NodeType, itemType: NodeType): Command; /** * Wraps the selected content in a list and attempts to join the newly wrapped list * with exisiting list(s) of the same type. * * @param nodeType - the list node type */ export declare function wrapAndMaybeJoinList(nodeType: NodeType): (state: EditorState, dispatch: (tr: Transaction) => void) => boolean; /** * Joins lists when they are of the same type. * Inspired by https://github.com/remirror/remirror/blob/main/packages/remirror__extension-list/src/list-commands.ts#L535 * * @param tr - the transaction */ export declare function maybeJoinList(tr: Transaction): boolean; /** * Checks if the node type is a list type (e.g. "bullet_list", "ordered_list", etc...). * * @param type - the node type */ export declare function isListType(type: NodeType): boolean;