| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 | import { Node, NodeType, Attrs, MarkType } from 'prosemirror-model';import { Command } from 'prosemirror-state';/**Delete the selection, if there is one.*/declare const deleteSelection: Command;/**If the selection is empty and at the start of a textblock, try toreduce the distance between that block and the one before it—ifthere's a block directly before it that can be joined, join them.If not, try to move the selected block closer to the next one inthe document structure by lifting it out of its parent or moving itinto a parent of the previous block. Will use the view for accurate(bidi-aware) start-of-textblock detection if given.*/declare const joinBackward: Command;/**A more limited form of [`joinBackward`]($commands.joinBackward)that only tries to join the current textblock to the one beforeit, if the cursor is at the start of a textblock.*/declare const joinTextblockBackward: Command;/**A more limited form of [`joinForward`]($commands.joinForward)that only tries to join the current textblock to the one afterit, if the cursor is at the end of a textblock.*/declare const joinTextblockForward: Command;/**When the selection is empty and at the start of a textblock, selectthe node before that textblock, if possible. This is intended to bebound to keys like backspace, after[`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward) or other deletingcommands, as a fall-back behavior when the schema doesn't allowdeletion at the selected point.*/declare const selectNodeBackward: Command;/**If the selection is empty and the cursor is at the end of atextblock, try to reduce or remove the boundary between that blockand the one after it, either by joining them or by moving the otherblock closer to this one in the tree structure. Will use the viewfor accurate start-of-textblock detection if given.*/declare const joinForward: Command;/**When the selection is empty and at the end of a textblock, selectthe node coming after that textblock, if possible. This is intendedto be bound to keys like delete, after[`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward) and similar deletingcommands, to provide a fall-back behavior when the schema doesn'tallow deletion at the selected point.*/declare const selectNodeForward: Command;/**Join the selected block or, if there is a text selection, theclosest ancestor block of the selection that can be joined, withthe sibling above it.*/declare const joinUp: Command;/**Join the selected block, or the closest ancestor of the selectionthat can be joined, with the sibling after it.*/declare const joinDown: Command;/**Lift the selected block, or the closest ancestor block of theselection that can be lifted, out of its parent node.*/declare const lift: Command;/**If the selection is in a node whose type has a truthy[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace theselection with a newline character.*/declare const newlineInCode: Command;/**When the selection is in a node with a truthy[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, create adefault block after the code block, and move the cursor there.*/declare const exitCode: Command;/**If a block node is selected, create an empty paragraph before (ifit is its parent's first child) or after it.*/declare const createParagraphNear: Command;/**If the cursor is in an empty textblock that can be lifted, lift theblock.*/declare const liftEmptyBlock: Command;/**Create a variant of [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock) that usesa custom function to determine the type of the newly split off block.*/declare function splitBlockAs(splitNode?: (node: Node, atEnd: boolean) => {    type: NodeType;    attrs?: Attrs;} | null): Command;/**Split the parent block of the selection. If the selection is a textselection, also delete its content.*/declare const splitBlock: Command;/**Acts like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but withoutresetting the set of active marks at the cursor.*/declare const splitBlockKeepMarks: Command;/**Move the selection to the node wrapping the current selection, ifany. (Will not select the document node.)*/declare const selectParentNode: Command;/**Select the whole document.*/declare const selectAll: Command;/**Moves the cursor to the start of current text block.*/declare const selectTextblockStart: Command;/**Moves the cursor to the end of current text block.*/declare const selectTextblockEnd: Command;/**Wrap the selection in a node of the given type with the givenattributes.*/declare function wrapIn(nodeType: NodeType, attrs?: Attrs | null): Command;/**Returns a command that tries to set the selected textblocks to thegiven node type with the given attributes.*/declare function setBlockType(nodeType: NodeType, attrs?: Attrs | null): Command;/**Create a command function that toggles the given mark with thegiven attributes. Will return `false` when the current selectiondoesn't support that mark. This will remove the mark if any marksof that type exist in the selection, or add it otherwise. If theselection is empty, this applies to the [storedmarks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of thedocument.*/declare function toggleMark(markType: MarkType, attrs?: Attrs | null): Command;/**Wrap a command so that, when it produces a transform that causestwo joinable nodes to end up next to each other, those are joined.Nodes are considered joinable when they are of the same type andwhen the `isJoinable` predicate returns true for them or, if anarray of strings was passed, if their node type name is in thatarray.*/declare function autoJoin(command: Command, isJoinable: ((before: Node, after: Node) => boolean) | readonly string[]): Command;/**Combine a number of command functions into a single function (whichcalls them one by one until one returns true).*/declare function chainCommands(...commands: readonly Command[]): Command;/**A basic keymap containing bindings not specific to any schema.Binds the following keys (when multiple commands are listed, theyare chained with [`chainCommands`](https://prosemirror.net/docs/ref/#commands.chainCommands)):* **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`* **Mod-Enter** to `exitCode`* **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`* **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`* **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`* **Mod-a** to `selectAll`*/declare const pcBaseKeymap: {    [key: string]: Command;};/**A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,**Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and**Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** likeCtrl-Delete.*/declare const macBaseKeymap: {    [key: string]: Command;};/**Depending on the detected platform, this will hold[`pcBasekeymap`](https://prosemirror.net/docs/ref/#commands.pcBaseKeymap) or[`macBaseKeymap`](https://prosemirror.net/docs/ref/#commands.macBaseKeymap).*/declare const baseKeymap: {    [key: string]: Command;};export { autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinTextblockBackward, joinTextblockForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, setBlockType, splitBlock, splitBlockAs, splitBlockKeepMarks, toggleMark, wrapIn };
 |