@tiptap/react 2.0.0-beta.104 → 2.0.0-beta.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/package.json +3 -2
  2. package/dist/packages/core/src/CommandManager.d.ts +0 -20
  3. package/dist/packages/core/src/Editor.d.ts +0 -147
  4. package/dist/packages/core/src/EventEmitter.d.ts +0 -11
  5. package/dist/packages/core/src/Extension.d.ts +0 -227
  6. package/dist/packages/core/src/ExtensionManager.d.ts +0 -18
  7. package/dist/packages/core/src/InputRule.d.ts +0 -42
  8. package/dist/packages/core/src/Mark.d.ts +0 -319
  9. package/dist/packages/core/src/Node.d.ts +0 -397
  10. package/dist/packages/core/src/NodeView.d.ts +0 -27
  11. package/dist/packages/core/src/PasteRule.d.ts +0 -42
  12. package/dist/packages/core/src/Tracker.d.ts +0 -11
  13. package/dist/packages/core/src/commands/blur.d.ts +0 -12
  14. package/dist/packages/core/src/commands/clearContent.d.ts +0 -12
  15. package/dist/packages/core/src/commands/clearNodes.d.ts +0 -12
  16. package/dist/packages/core/src/commands/command.d.ts +0 -12
  17. package/dist/packages/core/src/commands/createParagraphNear.d.ts +0 -12
  18. package/dist/packages/core/src/commands/deleteNode.d.ts +0 -13
  19. package/dist/packages/core/src/commands/deleteRange.d.ts +0 -12
  20. package/dist/packages/core/src/commands/deleteSelection.d.ts +0 -12
  21. package/dist/packages/core/src/commands/enter.d.ts +0 -12
  22. package/dist/packages/core/src/commands/exitCode.d.ts +0 -12
  23. package/dist/packages/core/src/commands/extendMarkRange.d.ts +0 -13
  24. package/dist/packages/core/src/commands/first.d.ts +0 -12
  25. package/dist/packages/core/src/commands/focus.d.ts +0 -14
  26. package/dist/packages/core/src/commands/forEach.d.ts +0 -14
  27. package/dist/packages/core/src/commands/insertContent.d.ts +0 -16
  28. package/dist/packages/core/src/commands/insertContentAt.d.ts +0 -16
  29. package/dist/packages/core/src/commands/joinBackward.d.ts +0 -12
  30. package/dist/packages/core/src/commands/joinForward.d.ts +0 -12
  31. package/dist/packages/core/src/commands/keyboardShortcut.d.ts +0 -12
  32. package/dist/packages/core/src/commands/lift.d.ts +0 -13
  33. package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +0 -12
  34. package/dist/packages/core/src/commands/liftListItem.d.ts +0 -13
  35. package/dist/packages/core/src/commands/newlineInCode.d.ts +0 -12
  36. package/dist/packages/core/src/commands/resetAttributes.d.ts +0 -13
  37. package/dist/packages/core/src/commands/scrollIntoView.d.ts +0 -12
  38. package/dist/packages/core/src/commands/selectAll.d.ts +0 -12
  39. package/dist/packages/core/src/commands/selectNodeBackward.d.ts +0 -12
  40. package/dist/packages/core/src/commands/selectNodeForward.d.ts +0 -12
  41. package/dist/packages/core/src/commands/selectParentNode.d.ts +0 -12
  42. package/dist/packages/core/src/commands/setContent.d.ts +0 -13
  43. package/dist/packages/core/src/commands/setMark.d.ts +0 -13
  44. package/dist/packages/core/src/commands/setMeta.d.ts +0 -12
  45. package/dist/packages/core/src/commands/setNode.d.ts +0 -13
  46. package/dist/packages/core/src/commands/setNodeSelection.d.ts +0 -12
  47. package/dist/packages/core/src/commands/setTextSelection.d.ts +0 -12
  48. package/dist/packages/core/src/commands/sinkListItem.d.ts +0 -13
  49. package/dist/packages/core/src/commands/splitBlock.d.ts +0 -14
  50. package/dist/packages/core/src/commands/splitListItem.d.ts +0 -13
  51. package/dist/packages/core/src/commands/toggleList.d.ts +0 -13
  52. package/dist/packages/core/src/commands/toggleMark.d.ts +0 -18
  53. package/dist/packages/core/src/commands/toggleNode.d.ts +0 -13
  54. package/dist/packages/core/src/commands/toggleWrap.d.ts +0 -13
  55. package/dist/packages/core/src/commands/undoInputRule.d.ts +0 -12
  56. package/dist/packages/core/src/commands/unsetAllMarks.d.ts +0 -12
  57. package/dist/packages/core/src/commands/unsetMark.d.ts +0 -18
  58. package/dist/packages/core/src/commands/updateAttributes.d.ts +0 -13
  59. package/dist/packages/core/src/commands/wrapIn.d.ts +0 -13
  60. package/dist/packages/core/src/commands/wrapInList.d.ts +0 -13
  61. package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +0 -2
  62. package/dist/packages/core/src/extensions/commands.d.ts +0 -98
  63. package/dist/packages/core/src/extensions/editable.d.ts +0 -2
  64. package/dist/packages/core/src/extensions/focusEvents.d.ts +0 -2
  65. package/dist/packages/core/src/extensions/index.d.ts +0 -6
  66. package/dist/packages/core/src/extensions/keymap.d.ts +0 -2
  67. package/dist/packages/core/src/extensions/tabindex.d.ts +0 -2
  68. package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +0 -7
  69. package/dist/packages/core/src/helpers/createChainableState.d.ts +0 -5
  70. package/dist/packages/core/src/helpers/createDocument.d.ts +0 -3
  71. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -7
  72. package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +0 -2
  73. package/dist/packages/core/src/helpers/findChildren.d.ts +0 -3
  74. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -6
  75. package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -9
  76. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -8
  77. package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -2
  78. package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -2
  79. package/dist/packages/core/src/helpers/generateText.d.ts +0 -5
  80. package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -3
  81. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
  82. package/dist/packages/core/src/helpers/getChangedRanges.d.ts +0 -11
  83. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
  84. package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -2
  85. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
  86. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
  87. package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
  88. package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
  89. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
  90. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
  91. package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
  92. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
  93. package/dist/packages/core/src/helpers/getSchema.d.ts +0 -3
  94. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -3
  95. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -2
  96. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -2
  97. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -2
  98. package/dist/packages/core/src/helpers/getText.d.ts +0 -6
  99. package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -6
  100. package/dist/packages/core/src/helpers/getTextSeralizersFromSchema.d.ts +0 -3
  101. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
  102. package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
  103. package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +0 -2
  104. package/dist/packages/core/src/helpers/isList.d.ts +0 -2
  105. package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
  106. package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
  107. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -2
  108. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
  109. package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
  110. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
  111. package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +0 -4
  112. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
  113. package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
  114. package/dist/packages/core/src/index.d.ts +0 -60
  115. package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -12
  116. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -12
  117. package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -9
  118. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -14
  119. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -23
  120. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -12
  121. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -9
  122. package/dist/packages/core/src/style.d.ts +0 -1
  123. package/dist/packages/core/src/types.d.ts +0 -210
  124. package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
  125. package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
  126. package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
  127. package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
  128. package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
  129. package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
  130. package/dist/packages/core/src/utilities/isClass.d.ts +0 -1
  131. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
  132. package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
  133. package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
  134. package/dist/packages/core/src/utilities/isObject.d.ts +0 -1
  135. package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
  136. package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
  137. package/dist/packages/core/src/utilities/isString.d.ts +0 -1
  138. package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
  139. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
  140. package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
  141. package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
  142. package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
  143. package/dist/packages/core/src/utilities/removeDuplicates.d.ts +0 -8
  144. package/dist/packages/extension-blockquote/src/blockquote.d.ts +0 -24
  145. package/dist/packages/extension-blockquote/src/index.d.ts +0 -3
  146. package/dist/packages/extension-bold/src/bold.d.ts +0 -27
  147. package/dist/packages/extension-bold/src/index.d.ts +0 -3
  148. package/dist/packages/extension-bubble-menu/src/bubble-menu-plugin.d.ts +0 -43
  149. package/dist/packages/extension-bubble-menu/src/bubble-menu.d.ts +0 -6
  150. package/dist/packages/extension-bubble-menu/src/index.d.ts +0 -4
  151. package/dist/packages/extension-bullet-list/src/bullet-list.d.ts +0 -17
  152. package/dist/packages/extension-bullet-list/src/index.d.ts +0 -3
  153. package/dist/packages/extension-character-count/src/character-count.d.ts +0 -28
  154. package/dist/packages/extension-character-count/src/index.d.ts +0 -3
  155. package/dist/packages/extension-code/src/code.d.ts +0 -25
  156. package/dist/packages/extension-code/src/index.d.ts +0 -3
  157. package/dist/packages/extension-code-block/src/code-block.d.ts +0 -26
  158. package/dist/packages/extension-code-block/src/index.d.ts +0 -3
  159. package/dist/packages/extension-code-block-lowlight/src/code-block-lowlight.d.ts +0 -6
  160. package/dist/packages/extension-code-block-lowlight/src/index.d.ts +0 -3
  161. package/dist/packages/extension-code-block-lowlight/src/lowlight-plugin.d.ts +0 -6
  162. package/dist/packages/extension-collaboration/src/collaboration.d.ts +0 -30
  163. package/dist/packages/extension-collaboration/src/helpers/isChangeOrigin.d.ts +0 -2
  164. package/dist/packages/extension-collaboration/src/index.d.ts +0 -4
  165. package/dist/packages/extension-collaboration-cursor/src/collaboration-cursor.d.ts +0 -37
  166. package/dist/packages/extension-collaboration-cursor/src/index.d.ts +0 -3
  167. package/dist/packages/extension-color/src/color.d.ts +0 -20
  168. package/dist/packages/extension-color/src/index.d.ts +0 -3
  169. package/dist/packages/extension-document/src/document.d.ts +0 -2
  170. package/dist/packages/extension-document/src/index.d.ts +0 -3
  171. package/dist/packages/extension-dropcursor/src/dropcursor.d.ts +0 -7
  172. package/dist/packages/extension-dropcursor/src/index.d.ts +0 -3
  173. package/dist/packages/extension-floating-menu/src/floating-menu-plugin.d.ts +0 -40
  174. package/dist/packages/extension-floating-menu/src/floating-menu.d.ts +0 -6
  175. package/dist/packages/extension-floating-menu/src/index.d.ts +0 -4
  176. package/dist/packages/extension-focus/src/focus.d.ts +0 -6
  177. package/dist/packages/extension-focus/src/index.d.ts +0 -3
  178. package/dist/packages/extension-font-family/src/font-family.d.ts +0 -20
  179. package/dist/packages/extension-font-family/src/index.d.ts +0 -3
  180. package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +0 -15
  181. package/dist/packages/extension-gapcursor/src/index.d.ts +0 -3
  182. package/dist/packages/extension-hard-break/src/hard-break.d.ts +0 -16
  183. package/dist/packages/extension-hard-break/src/index.d.ts +0 -3
  184. package/dist/packages/extension-heading/src/heading.d.ts +0 -26
  185. package/dist/packages/extension-heading/src/index.d.ts +0 -3
  186. package/dist/packages/extension-highlight/src/highlight.d.ts +0 -30
  187. package/dist/packages/extension-highlight/src/index.d.ts +0 -3
  188. package/dist/packages/extension-history/src/history.d.ts +0 -20
  189. package/dist/packages/extension-history/src/index.d.ts +0 -3
  190. package/dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts +0 -15
  191. package/dist/packages/extension-horizontal-rule/src/index.d.ts +0 -3
  192. package/dist/packages/extension-image/src/image.d.ts +0 -21
  193. package/dist/packages/extension-image/src/index.d.ts +0 -3
  194. package/dist/packages/extension-italic/src/index.d.ts +0 -3
  195. package/dist/packages/extension-italic/src/italic.d.ts +0 -27
  196. package/dist/packages/extension-link/src/helpers/autolink.d.ts +0 -7
  197. package/dist/packages/extension-link/src/helpers/clickHandler.d.ts +0 -7
  198. package/dist/packages/extension-link/src/helpers/pasteHandler.d.ts +0 -9
  199. package/dist/packages/extension-link/src/index.d.ts +0 -3
  200. package/dist/packages/extension-link/src/link.d.ts +0 -44
  201. package/dist/packages/extension-list-item/src/index.d.ts +0 -3
  202. package/dist/packages/extension-list-item/src/list-item.d.ts +0 -5
  203. package/dist/packages/extension-mention/src/index.d.ts +0 -3
  204. package/dist/packages/extension-mention/src/mention.d.ts +0 -14
  205. package/dist/packages/extension-ordered-list/src/index.d.ts +0 -3
  206. package/dist/packages/extension-ordered-list/src/ordered-list.d.ts +0 -17
  207. package/dist/packages/extension-paragraph/src/index.d.ts +0 -3
  208. package/dist/packages/extension-paragraph/src/paragraph.d.ts +0 -15
  209. package/dist/packages/extension-placeholder/src/index.d.ts +0 -3
  210. package/dist/packages/extension-placeholder/src/placeholder.d.ts +0 -15
  211. package/dist/packages/extension-strike/src/index.d.ts +0 -3
  212. package/dist/packages/extension-strike/src/strike.d.ts +0 -25
  213. package/dist/packages/extension-subscript/src/index.d.ts +0 -3
  214. package/dist/packages/extension-subscript/src/subscript.d.ts +0 -23
  215. package/dist/packages/extension-superscript/src/index.d.ts +0 -3
  216. package/dist/packages/extension-superscript/src/superscript.d.ts +0 -23
  217. package/dist/packages/extension-table/src/TableView.d.ts +0 -17
  218. package/dist/packages/extension-table/src/index.d.ts +0 -4
  219. package/dist/packages/extension-table/src/table.d.ts +0 -55
  220. package/dist/packages/extension-table/src/utilities/createCell.d.ts +0 -2
  221. package/dist/packages/extension-table/src/utilities/createTable.d.ts +0 -2
  222. package/dist/packages/extension-table/src/utilities/deleteTableWhenAllCellsSelected.d.ts +0 -2
  223. package/dist/packages/extension-table/src/utilities/getTableNodeTypes.d.ts +0 -4
  224. package/dist/packages/extension-table/src/utilities/isCellSelection.d.ts +0 -2
  225. package/dist/packages/extension-table-cell/src/index.d.ts +0 -3
  226. package/dist/packages/extension-table-cell/src/table-cell.d.ts +0 -5
  227. package/dist/packages/extension-table-header/src/index.d.ts +0 -3
  228. package/dist/packages/extension-table-header/src/table-header.d.ts +0 -5
  229. package/dist/packages/extension-table-row/src/index.d.ts +0 -3
  230. package/dist/packages/extension-table-row/src/table-row.d.ts +0 -5
  231. package/dist/packages/extension-task-item/src/index.d.ts +0 -3
  232. package/dist/packages/extension-task-item/src/task-item.d.ts +0 -7
  233. package/dist/packages/extension-task-list/src/index.d.ts +0 -3
  234. package/dist/packages/extension-task-list/src/task-list.d.ts +0 -16
  235. package/dist/packages/extension-text/src/index.d.ts +0 -3
  236. package/dist/packages/extension-text/src/text.d.ts +0 -2
  237. package/dist/packages/extension-text-align/src/index.d.ts +0 -3
  238. package/dist/packages/extension-text-align/src/text-align.d.ts +0 -21
  239. package/dist/packages/extension-text-style/src/index.d.ts +0 -3
  240. package/dist/packages/extension-text-style/src/text-style.d.ts +0 -15
  241. package/dist/packages/extension-typography/src/index.d.ts +0 -3
  242. package/dist/packages/extension-typography/src/typography.d.ts +0 -23
  243. package/dist/packages/extension-underline/src/index.d.ts +0 -3
  244. package/dist/packages/extension-underline/src/underline.d.ts +0 -23
  245. package/dist/packages/html/src/generateHTML.d.ts +0 -2
  246. package/dist/packages/html/src/generateJSON.d.ts +0 -2
  247. package/dist/packages/html/src/getHTMLFromFragment.d.ts +0 -2
  248. package/dist/packages/html/src/index.d.ts +0 -2
  249. package/dist/packages/starter-kit/src/index.d.ts +0 -3
  250. package/dist/packages/starter-kit/src/starter-kit.d.ts +0 -37
  251. package/dist/packages/suggestion/src/findSuggestionMatch.d.ts +0 -15
  252. package/dist/packages/suggestion/src/index.d.ts +0 -4
  253. package/dist/packages/suggestion/src/suggestion.d.ts +0 -49
  254. package/dist/tests/cypress/integration/core/can.spec.d.ts +0 -1
  255. package/dist/tests/cypress/integration/core/editorProps.spec.d.ts +0 -1
  256. package/dist/tests/cypress/integration/core/extendExtensions.spec.d.ts +0 -1
  257. package/dist/tests/cypress/integration/core/extendMarkRange.spec.d.ts +0 -1
  258. package/dist/tests/cypress/integration/core/extensionOptions.spec.d.ts +0 -1
  259. package/dist/tests/cypress/integration/core/fromString.spec.d.ts +0 -1
  260. package/dist/tests/cypress/integration/core/generateHTML.spec.d.ts +0 -1
  261. package/dist/tests/cypress/integration/core/generateJSON.spec.d.ts +0 -1
  262. package/dist/tests/cypress/integration/core/isActive.spec.d.ts +0 -1
  263. package/dist/tests/cypress/integration/core/isClass.spec.d.ts +0 -1
  264. package/dist/tests/cypress/integration/core/mergeAttributes.spec.d.ts +0 -1
  265. package/dist/tests/cypress/integration/core/mergeDeep.spec.d.ts +0 -1
  266. package/dist/tests/cypress/integration/core/pluginOrder.spec.d.ts +0 -1
  267. package/dist/tests/cypress/integration/extensions/bold.spec.d.ts +0 -1
  268. package/dist/tests/cypress/integration/extensions/codeBlockLowlight.spec.d.ts +0 -1
  269. package/dist/tests/cypress/integration/html/generateHTML.spec.d.ts +0 -1
  270. package/dist/tests/cypress/integration/html/generateJSON.spec.d.ts +0 -1
@@ -1,7 +0,0 @@
1
- import { Schema, Node as ProseMirrorNode, Fragment, ParseOptions } from 'prosemirror-model';
2
- import { Content } from '../types';
3
- export declare type CreateNodeFromContentOptions = {
4
- slice?: boolean;
5
- parseOptions?: ParseOptions;
6
- };
7
- export declare function createNodeFromContent(content: Content, schema: Schema, options?: CreateNodeFromContentOptions): ProseMirrorNode | Fragment;
@@ -1,2 +0,0 @@
1
- import { ContentMatch, NodeType } from 'prosemirror-model';
2
- export declare function defaultBlockAt(match: ContentMatch): NodeType | null;
@@ -1,3 +0,0 @@
1
- import { Node as ProseMirrorNode } from 'prosemirror-model';
2
- import { Predicate, NodeWithPos } from '../types';
3
- export declare function findChildren(node: ProseMirrorNode, predicate: Predicate): NodeWithPos[];
@@ -1,6 +0,0 @@
1
- import { Node as ProseMirrorNode } from 'prosemirror-model';
2
- import { Predicate, Range, NodeWithPos } from '../types';
3
- /**
4
- * Same as `findChildren` but searches only within a `range`.
5
- */
6
- export declare function findChildrenInRange(node: ProseMirrorNode, range: Range, predicate: Predicate): NodeWithPos[];
@@ -1,9 +0,0 @@
1
- /// <reference types="prosemirror-model" />
2
- import { Selection } from 'prosemirror-state';
3
- import { Predicate } from '../types';
4
- export declare function findParentNode(predicate: Predicate): (selection: Selection) => {
5
- pos: number;
6
- start: number;
7
- depth: number;
8
- node: import("prosemirror-model").Node<any>;
9
- } | undefined;
@@ -1,8 +0,0 @@
1
- import { ResolvedPos, Node as ProseMirrorNode } from 'prosemirror-model';
2
- import { Predicate } from '../types';
3
- export declare function findParentNodeClosestToPos($pos: ResolvedPos, predicate: Predicate): ({
4
- pos: number;
5
- start: number;
6
- depth: number;
7
- node: ProseMirrorNode;
8
- } | undefined);
@@ -1,2 +0,0 @@
1
- import { Extensions, JSONContent } from '../types';
2
- export declare function generateHTML(doc: JSONContent, extensions: Extensions): string;
@@ -1,2 +0,0 @@
1
- import { Extensions } from '../types';
2
- export declare function generateJSON(html: string, extensions: Extensions): Record<string, any>;
@@ -1,5 +0,0 @@
1
- import { Extensions, JSONContent, TextSerializer } from '../types';
2
- export declare function generateText(doc: JSONContent, extensions: Extensions, options?: {
3
- blockSeparator?: string;
4
- textSerializers?: Record<string, TextSerializer>;
5
- }): string;
@@ -1,3 +0,0 @@
1
- import { MarkType, NodeType } from 'prosemirror-model';
2
- import { EditorState } from 'prosemirror-state';
3
- export declare function getAttributes(state: EditorState, typeOrName: string | NodeType | MarkType): Record<string, any>;
@@ -1,6 +0,0 @@
1
- import { Extensions, ExtensionAttribute } from '../types';
2
- /**
3
- * Get a list of all extension attributes defined in `addAttribute` and `addGlobalAttribute`.
4
- * @param extensions List of extensions
5
- */
6
- export declare function getAttributesFromExtensions(extensions: Extensions): ExtensionAttribute[];
@@ -1,11 +0,0 @@
1
- import { Transform } from 'prosemirror-transform';
2
- import { Range } from '../types';
3
- export declare type ChangedRange = {
4
- oldRange: Range;
5
- newRange: Range;
6
- };
7
- /**
8
- * Returns a list of changed ranges
9
- * based on the first and last state of all steps.
10
- */
11
- export declare function getChangedRanges(transform: Transform): ChangedRange[];
@@ -1,8 +0,0 @@
1
- import { Node as ProseMirrorNode } from 'prosemirror-model';
2
- import { JSONContent } from '../types';
3
- interface DebugJSONContent extends JSONContent {
4
- from: number;
5
- to: number;
6
- }
7
- export declare function getDebugJSON(node: ProseMirrorNode, startOffset?: number): DebugJSONContent;
8
- export {};
@@ -1,2 +0,0 @@
1
- import { AnyExtension, RemoveThis, MaybeThisParameterType } from '../types';
2
- export declare function getExtensionField<T = any>(extension: AnyExtension, field: string, context?: Omit<MaybeThisParameterType<T>, 'parent'>): RemoveThis<T>;
@@ -1,2 +0,0 @@
1
- import { Schema, Fragment } from 'prosemirror-model';
2
- export declare function getHTMLFromFragment(fragment: Fragment, schema: Schema): string;
@@ -1,3 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { MarkType } from 'prosemirror-model';
3
- export declare function getMarkAttributes(state: EditorState, typeOrName: string | MarkType): Record<string, any>;
@@ -1,3 +0,0 @@
1
- import { MarkType, ResolvedPos } from 'prosemirror-model';
2
- import { Range } from '../types';
3
- export declare function getMarkRange($pos: ResolvedPos, type: MarkType, attributes?: Record<string, any>): Range | void;
@@ -1,2 +0,0 @@
1
- import { MarkType, Schema } from 'prosemirror-model';
2
- export declare function getMarkType(nameOrType: string | MarkType, schema: Schema): MarkType;
@@ -1,3 +0,0 @@
1
- import { Node as ProseMirrorNode } from 'prosemirror-model';
2
- import { MarkRange } from '../types';
3
- export declare function getMarksBetween(from: number, to: number, doc: ProseMirrorNode): MarkRange[];
@@ -1,3 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { NodeType } from 'prosemirror-model';
3
- export declare function getNodeAttributes(state: EditorState, typeOrName: string | NodeType): Record<string, any>;
@@ -1,2 +0,0 @@
1
- import { NodeType, Schema } from 'prosemirror-model';
2
- export declare function getNodeType(nameOrType: string | NodeType, schema: Schema): NodeType;
@@ -1,3 +0,0 @@
1
- import { Node, Mark } from 'prosemirror-model';
2
- import { ExtensionAttribute } from '../types';
3
- export declare function getRenderedAttributes(nodeOrMark: Node | Mark, extensionAttributes: ExtensionAttribute[]): Record<string, any>;
@@ -1,3 +0,0 @@
1
- import { Schema } from 'prosemirror-model';
2
- import { Extensions } from '../types';
3
- export declare function getSchema(extensions: Extensions): Schema;
@@ -1,3 +0,0 @@
1
- import { Schema } from 'prosemirror-model';
2
- import { Extensions } from '../types';
3
- export declare function getSchemaByResolvedExtensions(extensions: Extensions): Schema;
@@ -1,2 +0,0 @@
1
- import { MarkType, NodeType, Schema } from 'prosemirror-model';
2
- export declare function getSchemaTypeByName(name: string, schema: Schema): NodeType | MarkType | null;
@@ -1,2 +0,0 @@
1
- import { Schema } from 'prosemirror-model';
2
- export declare function getSchemaTypeNameByName(name: string, schema: Schema): 'node' | 'mark' | null;
@@ -1,2 +0,0 @@
1
- import { ExtensionAttribute } from '../types';
2
- export declare function getSplittedAttributes(extensionAttributes: ExtensionAttribute[], typeName: string, attributes: Record<string, any>): Record<string, any>;
@@ -1,6 +0,0 @@
1
- import { TextSerializer } from '../types';
2
- import { Node as ProseMirrorNode } from 'prosemirror-model';
3
- export declare function getText(node: ProseMirrorNode, options?: {
4
- blockSeparator?: string;
5
- textSerializers?: Record<string, TextSerializer>;
6
- }): string;
@@ -1,6 +0,0 @@
1
- import { Range, TextSerializer } from '../types';
2
- import { Node as ProseMirrorNode } from 'prosemirror-model';
3
- export declare function getTextBetween(startNode: ProseMirrorNode, range: Range, options?: {
4
- blockSeparator?: string;
5
- textSerializers?: Record<string, TextSerializer>;
6
- }): string;
@@ -1,3 +0,0 @@
1
- import { Schema } from 'prosemirror-model';
2
- import { TextSerializer } from '../types';
3
- export declare function getTextSeralizersFromSchema(schema: Schema): Record<string, TextSerializer>;
@@ -1,9 +0,0 @@
1
- import { ParseRule } from 'prosemirror-model';
2
- import { ExtensionAttribute } from '../types';
3
- /**
4
- * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).
5
- * Cancels when `getAttrs` returned `false`.
6
- * @param parseRule ProseMirror ParseRule
7
- * @param extensionAttributes List of attributes to inject
8
- */
9
- export declare function injectExtensionAttributesToParseRule(parseRule: ParseRule, extensionAttributes: ExtensionAttribute[]): ParseRule;
@@ -1,2 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- export declare function isActive(state: EditorState, name: string | null, attributes?: Record<string, any>): boolean;
@@ -1,2 +0,0 @@
1
- import { AnyExtension, EnableRules } from '../types';
2
- export declare function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean;
@@ -1,2 +0,0 @@
1
- import { Extensions } from '../types';
2
- export declare function isList(name: string, extensions: Extensions): boolean;
@@ -1,3 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { MarkType } from 'prosemirror-model';
3
- export declare function isMarkActive(state: EditorState, typeOrName: MarkType | string | null, attributes?: Record<string, any>): boolean;
@@ -1,3 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { NodeType } from 'prosemirror-model';
3
- export declare function isNodeActive(state: EditorState, typeOrName: NodeType | string | null, attributes?: Record<string, any>): boolean;
@@ -1,2 +0,0 @@
1
- import { Node as ProseMirrorNode } from 'prosemirror-model';
2
- export declare function isNodeEmpty(node: ProseMirrorNode): boolean;
@@ -1,2 +0,0 @@
1
- import { NodeSelection } from 'prosemirror-state';
2
- export declare function isNodeSelection(value: unknown): value is NodeSelection;
@@ -1,2 +0,0 @@
1
- import { TextSelection } from 'prosemirror-state';
2
- export declare function isTextSelection(value: unknown): value is TextSelection;
@@ -1,2 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- export declare function posToDOMRect(view: EditorView, from: number, to: number): DOMRect;
@@ -1,4 +0,0 @@
1
- import { Node as ProseMirrorNode } from 'prosemirror-model';
2
- import { Selection } from 'prosemirror-state';
3
- import { FocusPosition } from '../types';
4
- export declare function resolveFocusPosition(doc: ProseMirrorNode, position?: FocusPosition): Selection | null;
@@ -1,2 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number): void;
@@ -1,9 +0,0 @@
1
- import { Extensions } from '../types';
2
- import { Extension } from '../Extension';
3
- import { Node } from '../Node';
4
- import { Mark } from '../Mark';
5
- export declare function splitExtensions(extensions: Extensions): {
6
- baseExtensions: Extension<any, any>[];
7
- nodeExtensions: Node<any, any>[];
8
- markExtensions: Mark<any, any>[];
9
- };
@@ -1,60 +0,0 @@
1
- import * as extensions from './extensions';
2
- export { extensions };
3
- export * from './Editor';
4
- export * from './Extension';
5
- export * from './Node';
6
- export * from './Mark';
7
- export * from './NodeView';
8
- export * from './Tracker';
9
- export * from './InputRule';
10
- export * from './PasteRule';
11
- export * from './CommandManager';
12
- export * from './types';
13
- export * from './inputRules/nodeInputRule';
14
- export * from './inputRules/markInputRule';
15
- export * from './inputRules/textblockTypeInputRule';
16
- export * from './inputRules/textInputRule';
17
- export * from './inputRules/wrappingInputRule';
18
- export * from './pasteRules/markPasteRule';
19
- export * from './pasteRules/textPasteRule';
20
- export * from './utilities/callOrReturn';
21
- export * from './utilities/mergeAttributes';
22
- export * from './helpers/combineTransactionSteps';
23
- export * from './helpers/defaultBlockAt';
24
- export * from './helpers/getExtensionField';
25
- export * from './helpers/findChildren';
26
- export * from './helpers/findChildrenInRange';
27
- export * from './helpers/findParentNode';
28
- export * from './helpers/findParentNodeClosestToPos';
29
- export * from './helpers/generateHTML';
30
- export * from './helpers/generateJSON';
31
- export * from './helpers/generateText';
32
- export * from './helpers/getChangedRanges';
33
- export * from './helpers/getSchema';
34
- export * from './helpers/getHTMLFromFragment';
35
- export * from './helpers/getDebugJSON';
36
- export * from './helpers/getAttributes';
37
- export * from './helpers/getMarkAttributes';
38
- export * from './helpers/getMarkRange';
39
- export * from './helpers/getMarkType';
40
- export * from './helpers/getMarksBetween';
41
- export * from './helpers/getNodeAttributes';
42
- export * from './helpers/getNodeType';
43
- export * from './helpers/getText';
44
- export * from './helpers/getTextBetween';
45
- export * from './helpers/isActive';
46
- export * from './helpers/isList';
47
- export * from './helpers/isMarkActive';
48
- export * from './helpers/isNodeActive';
49
- export * from './helpers/isNodeEmpty';
50
- export * from './helpers/isNodeSelection';
51
- export * from './helpers/isTextSelection';
52
- export * from './helpers/posToDOMRect';
53
- export interface Commands<ReturnType = any> {
54
- }
55
- export interface ExtensionConfig<Options = any, Storage = any> {
56
- }
57
- export interface NodeConfig<Options = any, Storage = any> {
58
- }
59
- export interface MarkConfig<Options = any, Storage = any> {
60
- }
@@ -1,12 +0,0 @@
1
- import { InputRule, InputRuleFinder } from '../InputRule';
2
- import { MarkType } from 'prosemirror-model';
3
- import { ExtendedRegExpMatchArray } from '../types';
4
- /**
5
- * Build an input rule that adds a mark when the
6
- * matched text is typed into it.
7
- */
8
- export declare function markInputRule(config: {
9
- find: InputRuleFinder;
10
- type: MarkType;
11
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
12
- }): InputRule;
@@ -1,12 +0,0 @@
1
- import { NodeType } from 'prosemirror-model';
2
- import { InputRule, InputRuleFinder } from '../InputRule';
3
- import { ExtendedRegExpMatchArray } from '../types';
4
- /**
5
- * Build an input rule that adds a node when the
6
- * matched text is typed into it.
7
- */
8
- export declare function nodeInputRule(config: {
9
- find: InputRuleFinder;
10
- type: NodeType;
11
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
12
- }): InputRule;
@@ -1,9 +0,0 @@
1
- import { InputRule, InputRuleFinder } from '../InputRule';
2
- /**
3
- * Build an input rule that replaces text when the
4
- * matched text is typed into it.
5
- */
6
- export declare function textInputRule(config: {
7
- find: InputRuleFinder;
8
- replace: string;
9
- }): InputRule;
@@ -1,14 +0,0 @@
1
- import { InputRule, InputRuleFinder } from '../InputRule';
2
- import { NodeType } from 'prosemirror-model';
3
- import { ExtendedRegExpMatchArray } from '../types';
4
- /**
5
- * Build an input rule that changes the type of a textblock when the
6
- * matched text is typed into it. When using a regular expresion you’ll
7
- * probably want the regexp to start with `^`, so that the pattern can
8
- * only occur at the start of a textblock.
9
- */
10
- export declare function textblockTypeInputRule(config: {
11
- find: InputRuleFinder;
12
- type: NodeType;
13
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
14
- }): InputRule;
@@ -1,23 +0,0 @@
1
- import { InputRule, InputRuleFinder } from '../InputRule';
2
- import { NodeType, Node as ProseMirrorNode } from 'prosemirror-model';
3
- import { ExtendedRegExpMatchArray } from '../types';
4
- /**
5
- * Build an input rule for automatically wrapping a textblock when a
6
- * given string is typed. When using a regular expresion you’ll
7
- * probably want the regexp to start with `^`, so that the pattern can
8
- * only occur at the start of a textblock.
9
- *
10
- * `type` is the type of node to wrap in.
11
- *
12
- * By default, if there’s a node with the same type above the newly
13
- * wrapped node, the rule will try to join those
14
- * two nodes. You can pass a join predicate, which takes a regular
15
- * expression match and the node before the wrapped node, and can
16
- * return a boolean to indicate whether a join should happen.
17
- */
18
- export declare function wrappingInputRule(config: {
19
- find: InputRuleFinder;
20
- type: NodeType;
21
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
22
- joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean;
23
- }): InputRule;
@@ -1,12 +0,0 @@
1
- import { PasteRule, PasteRuleFinder } from '../PasteRule';
2
- import { MarkType } from 'prosemirror-model';
3
- import { ExtendedRegExpMatchArray } from '../types';
4
- /**
5
- * Build an paste rule that adds a mark when the
6
- * matched text is pasted into it.
7
- */
8
- export declare function markPasteRule(config: {
9
- find: PasteRuleFinder;
10
- type: MarkType;
11
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
12
- }): PasteRule;
@@ -1,9 +0,0 @@
1
- import { PasteRule, PasteRuleFinder } from '../PasteRule';
2
- /**
3
- * Build an paste rule that replaces text when the
4
- * matched text is pasted into it.
5
- */
6
- export declare function textPasteRule(config: {
7
- find: PasteRuleFinder;
8
- replace: string;
9
- }): PasteRule;
@@ -1 +0,0 @@
1
- export declare const style = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}";
@@ -1,210 +0,0 @@
1
- import { Node as ProseMirrorNode, Mark as ProseMirrorMark, ParseOptions } from 'prosemirror-model';
2
- import { EditorView, Decoration, NodeView, EditorProps } from 'prosemirror-view';
3
- import { EditorState, Transaction } from 'prosemirror-state';
4
- import { Extension } from './Extension';
5
- import { Node } from './Node';
6
- import { Mark } from './Mark';
7
- import { Editor } from './Editor';
8
- import { Commands, ExtensionConfig, NodeConfig, MarkConfig } from '.';
9
- export declare type AnyConfig = ExtensionConfig | NodeConfig | MarkConfig;
10
- export declare type AnyExtension = Extension | Node | Mark;
11
- export declare type Extensions = AnyExtension[];
12
- export declare type ParentConfig<T> = Partial<{
13
- [P in keyof T]: Required<T>[P] extends (...args: any) => any ? (...args: Parameters<Required<T>[P]>) => ReturnType<Required<T>[P]> : T[P];
14
- }>;
15
- export declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
16
- export declare type RemoveThis<T> = T extends (...args: any) => any ? (...args: Parameters<T>) => ReturnType<T> : T;
17
- export declare type MaybeReturnType<T> = T extends (...args: any) => any ? ReturnType<T> : T;
18
- export declare type MaybeThisParameterType<T> = Exclude<T, Primitive> extends (...args: any) => any ? ThisParameterType<Exclude<T, Primitive>> : any;
19
- export interface EditorEvents {
20
- beforeCreate: {
21
- editor: Editor;
22
- };
23
- create: {
24
- editor: Editor;
25
- };
26
- update: {
27
- editor: Editor;
28
- transaction: Transaction;
29
- };
30
- selectionUpdate: {
31
- editor: Editor;
32
- transaction: Transaction;
33
- };
34
- transaction: {
35
- editor: Editor;
36
- transaction: Transaction;
37
- };
38
- focus: {
39
- editor: Editor;
40
- event: FocusEvent;
41
- transaction: Transaction;
42
- };
43
- blur: {
44
- editor: Editor;
45
- event: FocusEvent;
46
- transaction: Transaction;
47
- };
48
- destroy: void;
49
- }
50
- export declare type EnableRules = (AnyExtension | string)[] | boolean;
51
- export interface EditorOptions {
52
- element: Element;
53
- content: Content;
54
- extensions: Extensions;
55
- injectCSS: boolean;
56
- autofocus: FocusPosition;
57
- editable: boolean;
58
- editorProps: EditorProps;
59
- parseOptions: ParseOptions;
60
- enableInputRules: EnableRules;
61
- enablePasteRules: EnableRules;
62
- enableCoreExtensions: boolean;
63
- onBeforeCreate: (props: EditorEvents['beforeCreate']) => void;
64
- onCreate: (props: EditorEvents['create']) => void;
65
- onUpdate: (props: EditorEvents['update']) => void;
66
- onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void;
67
- onTransaction: (props: EditorEvents['transaction']) => void;
68
- onFocus: (props: EditorEvents['focus']) => void;
69
- onBlur: (props: EditorEvents['blur']) => void;
70
- onDestroy: (props: EditorEvents['destroy']) => void;
71
- }
72
- export declare type HTMLContent = string;
73
- export declare type JSONContent = {
74
- type?: string;
75
- attrs?: Record<string, any>;
76
- content?: JSONContent[];
77
- marks?: {
78
- type: string;
79
- attrs?: Record<string, any>;
80
- [key: string]: any;
81
- }[];
82
- text?: string;
83
- [key: string]: any;
84
- };
85
- export declare type Content = HTMLContent | JSONContent | JSONContent[] | null;
86
- export declare type CommandProps = {
87
- editor: Editor;
88
- tr: Transaction;
89
- commands: SingleCommands;
90
- can: () => CanCommands;
91
- chain: () => ChainedCommands;
92
- state: EditorState;
93
- view: EditorView;
94
- dispatch: ((args?: any) => any) | undefined;
95
- };
96
- export declare type Command = (props: CommandProps) => boolean;
97
- export declare type CommandSpec = (...args: any[]) => Command;
98
- export declare type KeyboardShortcutCommand = (props: {
99
- editor: Editor;
100
- }) => boolean;
101
- export declare type Attribute = {
102
- default: any;
103
- rendered?: boolean;
104
- renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null;
105
- parseHTML?: ((element: HTMLElement) => any | null) | null;
106
- keepOnSplit: boolean;
107
- };
108
- export declare type Attributes = {
109
- [key: string]: Attribute;
110
- };
111
- export declare type ExtensionAttribute = {
112
- type: string;
113
- name: string;
114
- attribute: Required<Attribute>;
115
- };
116
- export declare type GlobalAttributes = {
117
- types: string[];
118
- attributes: {
119
- [key: string]: Attribute;
120
- };
121
- }[];
122
- export declare type PickValue<T, K extends keyof T> = T[K];
123
- export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
124
- export declare type Diff<T extends keyof any, U extends keyof any> = ({
125
- [P in T]: P;
126
- } & {
127
- [P in U]: never;
128
- } & {
129
- [x: string]: never;
130
- })[T];
131
- export declare type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
132
- export declare type ValuesOf<T> = T[keyof T];
133
- export declare type KeysWithTypeOf<T, Type> = ({
134
- [P in keyof T]: T[P] extends Type ? P : never;
135
- })[keyof T];
136
- export declare type NodeViewProps = {
137
- editor: Editor;
138
- node: ProseMirrorNode;
139
- decorations: Decoration[];
140
- selected: boolean;
141
- extension: Node;
142
- getPos: () => number;
143
- updateAttributes: (attributes: Record<string, any>) => void;
144
- deleteNode: () => void;
145
- };
146
- export interface NodeViewRendererOptions {
147
- stopEvent: ((props: {
148
- event: Event;
149
- }) => boolean) | null;
150
- ignoreMutation: ((props: {
151
- mutation: MutationRecord | {
152
- type: 'selection';
153
- target: Element;
154
- };
155
- }) => boolean) | null;
156
- }
157
- export declare type NodeViewRendererProps = {
158
- editor: Editor;
159
- node: ProseMirrorNode;
160
- getPos: (() => number) | boolean;
161
- HTMLAttributes: Record<string, any>;
162
- decorations: Decoration[];
163
- extension: Node;
164
- };
165
- export declare type NodeViewRenderer = (props: NodeViewRendererProps) => (NodeView | {});
166
- export declare type AnyCommands = Record<string, (...args: any[]) => Command>;
167
- export declare type UnionCommands<T = Command> = UnionToIntersection<ValuesOf<Pick<Commands<T>, KeysWithTypeOf<Commands<T>, {}>>>>;
168
- export declare type RawCommands = {
169
- [Item in keyof UnionCommands]: UnionCommands<Command>[Item];
170
- };
171
- export declare type SingleCommands = {
172
- [Item in keyof UnionCommands]: UnionCommands<boolean>[Item];
173
- };
174
- export declare type ChainedCommands = {
175
- [Item in keyof UnionCommands]: UnionCommands<ChainedCommands>[Item];
176
- } & {
177
- run: () => boolean;
178
- };
179
- export declare type CanCommands = SingleCommands & {
180
- chain: () => ChainedCommands;
181
- };
182
- export declare type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null;
183
- export declare type Range = {
184
- from: number;
185
- to: number;
186
- };
187
- export declare type NodeRange = {
188
- node: ProseMirrorNode;
189
- from: number;
190
- to: number;
191
- };
192
- export declare type MarkRange = {
193
- mark: ProseMirrorMark;
194
- from: number;
195
- to: number;
196
- };
197
- export declare type Predicate = (node: ProseMirrorNode) => boolean;
198
- export declare type NodeWithPos = {
199
- node: ProseMirrorNode;
200
- pos: number;
201
- };
202
- export declare type TextSerializer = (props: {
203
- node: ProseMirrorNode;
204
- pos: number;
205
- parent: ProseMirrorNode;
206
- index: number;
207
- }) => string;
208
- export declare type ExtendedRegExpMatchArray = RegExpMatchArray & {
209
- data?: Record<string, any>;
210
- };