@tiptap/react 2.0.0-beta.87 → 2.0.0-beta.91

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 (279) hide show
  1. package/package.json +7 -7
  2. package/dist/packages/core/src/CommandManager.d.ts +0 -20
  3. package/dist/packages/core/src/Editor.d.ts +0 -145
  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 -388
  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 -12
  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/createChainableState.d.ts +0 -5
  69. package/dist/packages/core/src/helpers/createDocument.d.ts +0 -3
  70. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -7
  71. package/dist/packages/core/src/helpers/findChildren.d.ts +0 -3
  72. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -6
  73. package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -9
  74. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -8
  75. package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -2
  76. package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -2
  77. package/dist/packages/core/src/helpers/generateText.d.ts +0 -5
  78. package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -3
  79. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
  80. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
  81. package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -2
  82. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
  83. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
  84. package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
  85. package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
  86. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
  87. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
  88. package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
  89. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
  90. package/dist/packages/core/src/helpers/getSchema.d.ts +0 -3
  91. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -3
  92. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -2
  93. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -2
  94. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -2
  95. package/dist/packages/core/src/helpers/getText.d.ts +0 -6
  96. package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -6
  97. package/dist/packages/core/src/helpers/getTextSeralizersFromSchema.d.ts +0 -3
  98. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
  99. package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
  100. package/dist/packages/core/src/helpers/isList.d.ts +0 -2
  101. package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
  102. package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
  103. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -2
  104. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
  105. package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
  106. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
  107. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
  108. package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
  109. package/dist/packages/core/src/index.d.ts +0 -57
  110. package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -12
  111. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -12
  112. package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -9
  113. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -14
  114. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -23
  115. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -12
  116. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -9
  117. package/dist/packages/core/src/style.d.ts +0 -2
  118. package/dist/packages/core/src/types.d.ts +0 -209
  119. package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
  120. package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
  121. package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
  122. package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
  123. package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
  124. package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
  125. package/dist/packages/core/src/utilities/isClass.d.ts +0 -1
  126. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
  127. package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
  128. package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
  129. package/dist/packages/core/src/utilities/isObject.d.ts +0 -1
  130. package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
  131. package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
  132. package/dist/packages/core/src/utilities/isString.d.ts +0 -1
  133. package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
  134. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
  135. package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
  136. package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
  137. package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
  138. package/dist/packages/core/src/utilities/removeElement.d.ts +0 -1
  139. package/dist/packages/extension-blockquote/src/blockquote.d.ts +0 -24
  140. package/dist/packages/extension-blockquote/src/index.d.ts +0 -3
  141. package/dist/packages/extension-bold/src/bold.d.ts +0 -27
  142. package/dist/packages/extension-bold/src/index.d.ts +0 -3
  143. package/dist/packages/extension-bubble-menu/src/bubble-menu-plugin.d.ts +0 -43
  144. package/dist/packages/extension-bubble-menu/src/bubble-menu.d.ts +0 -6
  145. package/dist/packages/extension-bubble-menu/src/index.d.ts +0 -4
  146. package/dist/packages/extension-bullet-list/src/bullet-list.d.ts +0 -16
  147. package/dist/packages/extension-bullet-list/src/index.d.ts +0 -3
  148. package/dist/packages/extension-character-count/src/character-count.d.ts +0 -7
  149. package/dist/packages/extension-character-count/src/index.d.ts +0 -3
  150. package/dist/packages/extension-code/src/code.d.ts +0 -25
  151. package/dist/packages/extension-code/src/index.d.ts +0 -3
  152. package/dist/packages/extension-code-block/src/code-block.d.ts +0 -26
  153. package/dist/packages/extension-code-block/src/index.d.ts +0 -3
  154. package/dist/packages/extension-code-block-lowlight/src/code-block-lowlight.d.ts +0 -5
  155. package/dist/packages/extension-code-block-lowlight/src/index.d.ts +0 -3
  156. package/dist/packages/extension-code-block-lowlight/src/lowlight-plugin.d.ts +0 -5
  157. package/dist/packages/extension-collaboration/src/collaboration.d.ts +0 -30
  158. package/dist/packages/extension-collaboration/src/helpers/isChangeOrigin.d.ts +0 -2
  159. package/dist/packages/extension-collaboration/src/index.d.ts +0 -4
  160. package/dist/packages/extension-collaboration-cursor/src/collaboration-cursor.d.ts +0 -37
  161. package/dist/packages/extension-collaboration-cursor/src/index.d.ts +0 -3
  162. package/dist/packages/extension-color/src/color.d.ts +0 -21
  163. package/dist/packages/extension-color/src/index.d.ts +0 -3
  164. package/dist/packages/extension-document/src/document.d.ts +0 -2
  165. package/dist/packages/extension-document/src/index.d.ts +0 -3
  166. package/dist/packages/extension-dropcursor/src/dropcursor.d.ts +0 -7
  167. package/dist/packages/extension-dropcursor/src/index.d.ts +0 -3
  168. package/dist/packages/extension-floating-menu/src/floating-menu-plugin.d.ts +0 -40
  169. package/dist/packages/extension-floating-menu/src/floating-menu.d.ts +0 -6
  170. package/dist/packages/extension-floating-menu/src/index.d.ts +0 -4
  171. package/dist/packages/extension-focus/src/focus.d.ts +0 -6
  172. package/dist/packages/extension-focus/src/index.d.ts +0 -3
  173. package/dist/packages/extension-font-family/src/font-family.d.ts +0 -21
  174. package/dist/packages/extension-font-family/src/index.d.ts +0 -3
  175. package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +0 -15
  176. package/dist/packages/extension-gapcursor/src/index.d.ts +0 -3
  177. package/dist/packages/extension-hard-break/src/hard-break.d.ts +0 -16
  178. package/dist/packages/extension-hard-break/src/index.d.ts +0 -3
  179. package/dist/packages/extension-heading/src/heading.d.ts +0 -26
  180. package/dist/packages/extension-heading/src/index.d.ts +0 -3
  181. package/dist/packages/extension-highlight/src/highlight.d.ts +0 -30
  182. package/dist/packages/extension-highlight/src/index.d.ts +0 -3
  183. package/dist/packages/extension-history/src/history.d.ts +0 -20
  184. package/dist/packages/extension-history/src/index.d.ts +0 -3
  185. package/dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts +0 -15
  186. package/dist/packages/extension-horizontal-rule/src/index.d.ts +0 -3
  187. package/dist/packages/extension-image/src/image.d.ts +0 -21
  188. package/dist/packages/extension-image/src/index.d.ts +0 -3
  189. package/dist/packages/extension-italic/src/index.d.ts +0 -3
  190. package/dist/packages/extension-italic/src/italic.d.ts +0 -27
  191. package/dist/packages/extension-link/src/index.d.ts +0 -3
  192. package/dist/packages/extension-link/src/link.d.ts +0 -40
  193. package/dist/packages/extension-list-item/src/index.d.ts +0 -3
  194. package/dist/packages/extension-list-item/src/list-item.d.ts +0 -5
  195. package/dist/packages/extension-mention/src/index.d.ts +0 -3
  196. package/dist/packages/extension-mention/src/mention.d.ts +0 -14
  197. package/dist/packages/extension-ordered-list/src/index.d.ts +0 -3
  198. package/dist/packages/extension-ordered-list/src/ordered-list.d.ts +0 -16
  199. package/dist/packages/extension-paragraph/src/index.d.ts +0 -3
  200. package/dist/packages/extension-paragraph/src/paragraph.d.ts +0 -15
  201. package/dist/packages/extension-placeholder/src/index.d.ts +0 -3
  202. package/dist/packages/extension-placeholder/src/placeholder.d.ts +0 -15
  203. package/dist/packages/extension-strike/src/index.d.ts +0 -3
  204. package/dist/packages/extension-strike/src/strike.d.ts +0 -25
  205. package/dist/packages/extension-subscript/src/index.d.ts +0 -3
  206. package/dist/packages/extension-subscript/src/subscript.d.ts +0 -23
  207. package/dist/packages/extension-superscript/src/index.d.ts +0 -3
  208. package/dist/packages/extension-superscript/src/superscript.d.ts +0 -23
  209. package/dist/packages/extension-table/src/TableView.d.ts +0 -17
  210. package/dist/packages/extension-table/src/index.d.ts +0 -4
  211. package/dist/packages/extension-table/src/table.d.ts +0 -55
  212. package/dist/packages/extension-table/src/utilities/createCell.d.ts +0 -2
  213. package/dist/packages/extension-table/src/utilities/createTable.d.ts +0 -2
  214. package/dist/packages/extension-table/src/utilities/deleteTableWhenAllCellsSelected.d.ts +0 -2
  215. package/dist/packages/extension-table/src/utilities/getTableNodeTypes.d.ts +0 -4
  216. package/dist/packages/extension-table/src/utilities/isCellSelection.d.ts +0 -2
  217. package/dist/packages/extension-table-cell/src/index.d.ts +0 -3
  218. package/dist/packages/extension-table-cell/src/table-cell.d.ts +0 -5
  219. package/dist/packages/extension-table-header/src/index.d.ts +0 -3
  220. package/dist/packages/extension-table-header/src/table-header.d.ts +0 -5
  221. package/dist/packages/extension-table-row/src/index.d.ts +0 -3
  222. package/dist/packages/extension-table-row/src/table-row.d.ts +0 -5
  223. package/dist/packages/extension-task-item/src/index.d.ts +0 -3
  224. package/dist/packages/extension-task-item/src/task-item.d.ts +0 -7
  225. package/dist/packages/extension-task-list/src/index.d.ts +0 -3
  226. package/dist/packages/extension-task-list/src/task-list.d.ts +0 -15
  227. package/dist/packages/extension-text/src/index.d.ts +0 -3
  228. package/dist/packages/extension-text/src/text.d.ts +0 -2
  229. package/dist/packages/extension-text-align/src/index.d.ts +0 -3
  230. package/dist/packages/extension-text-align/src/text-align.d.ts +0 -21
  231. package/dist/packages/extension-text-style/src/index.d.ts +0 -3
  232. package/dist/packages/extension-text-style/src/text-style.d.ts +0 -15
  233. package/dist/packages/extension-typography/src/index.d.ts +0 -3
  234. package/dist/packages/extension-typography/src/typography.d.ts +0 -23
  235. package/dist/packages/extension-underline/src/index.d.ts +0 -3
  236. package/dist/packages/extension-underline/src/underline.d.ts +0 -23
  237. package/dist/packages/html/src/generateHTML.d.ts +0 -2
  238. package/dist/packages/html/src/generateJSON.d.ts +0 -2
  239. package/dist/packages/html/src/getHTMLFromFragment.d.ts +0 -2
  240. package/dist/packages/html/src/index.d.ts +0 -2
  241. package/dist/packages/react/src/BubbleMenu.d.ts +0 -8
  242. package/dist/packages/react/src/Editor.d.ts +0 -6
  243. package/dist/packages/react/src/EditorContent.d.ts +0 -19
  244. package/dist/packages/react/src/FloatingMenu.d.ts +0 -8
  245. package/dist/packages/react/src/NodeViewContent.d.ts +0 -6
  246. package/dist/packages/react/src/NodeViewWrapper.d.ts +0 -6
  247. package/dist/packages/react/src/ReactNodeViewRenderer.d.ts +0 -13
  248. package/dist/packages/react/src/ReactRenderer.d.ts +0 -26
  249. package/dist/packages/react/src/index.d.ts +0 -10
  250. package/dist/packages/react/src/useEditor.d.ts +0 -4
  251. package/dist/packages/react/src/useReactNodeView.d.ts +0 -7
  252. package/dist/packages/starter-kit/src/index.d.ts +0 -3
  253. package/dist/packages/starter-kit/src/starter-kit.d.ts +0 -37
  254. package/dist/packages/suggestion/src/findSuggestionMatch.d.ts +0 -15
  255. package/dist/packages/suggestion/src/index.d.ts +0 -4
  256. package/dist/packages/suggestion/src/suggestion.d.ts +0 -49
  257. package/dist/tests/cypress/integration/core/can.spec.d.ts +0 -1
  258. package/dist/tests/cypress/integration/core/editorProps.spec.d.ts +0 -1
  259. package/dist/tests/cypress/integration/core/extendExtensions.spec.d.ts +0 -1
  260. package/dist/tests/cypress/integration/core/extendMarkRange.spec.d.ts +0 -1
  261. package/dist/tests/cypress/integration/core/extensionOptions.spec.d.ts +0 -1
  262. package/dist/tests/cypress/integration/core/fromString.spec.d.ts +0 -1
  263. package/dist/tests/cypress/integration/core/generateHTML.spec.d.ts +0 -1
  264. package/dist/tests/cypress/integration/core/generateJSON.spec.d.ts +0 -1
  265. package/dist/tests/cypress/integration/core/isActive.spec.d.ts +0 -1
  266. package/dist/tests/cypress/integration/core/isClass.spec.d.ts +0 -1
  267. package/dist/tests/cypress/integration/core/mergeAttributes.spec.d.ts +0 -1
  268. package/dist/tests/cypress/integration/core/mergeDeep.spec.d.ts +0 -1
  269. package/dist/tests/cypress/integration/core/pluginOrder.spec.d.ts +0 -1
  270. package/dist/tests/cypress/integration/extensions/bold.spec.d.ts +0 -1
  271. package/dist/tests/cypress/integration/extensions/codeBlockLowlight.spec.d.ts +0 -1
  272. package/dist/tests/cypress/integration/html/generateHTML.spec.d.ts +0 -1
  273. package/dist/tests/cypress/integration/html/generateJSON.spec.d.ts +0 -1
  274. package/dist/tiptap-react.cjs.js +0 -371
  275. package/dist/tiptap-react.cjs.js.map +0 -1
  276. package/dist/tiptap-react.esm.js +0 -348
  277. package/dist/tiptap-react.esm.js.map +0 -1
  278. package/dist/tiptap-react.umd.js +0 -371
  279. package/dist/tiptap-react.umd.js.map +0 -1
@@ -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 default 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 default 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 default 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 default function textPasteRule(config: {
7
- find: PasteRuleFinder;
8
- replace: string;
9
- }): PasteRule;
@@ -1,2 +0,0 @@
1
- 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}\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}";
2
- export default style;
@@ -1,209 +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 interface EditorOptions {
51
- element: Element;
52
- content: Content;
53
- extensions: Extensions;
54
- injectCSS: boolean;
55
- autofocus: FocusPosition;
56
- editable: boolean;
57
- editorProps: EditorProps;
58
- parseOptions: ParseOptions;
59
- enableInputRules: boolean;
60
- enablePasteRules: boolean;
61
- enableCoreExtensions: boolean;
62
- onBeforeCreate: (props: EditorEvents['beforeCreate']) => void;
63
- onCreate: (props: EditorEvents['create']) => void;
64
- onUpdate: (props: EditorEvents['update']) => void;
65
- onSelectionUpdate: (props: EditorEvents['selectionUpdate']) => void;
66
- onTransaction: (props: EditorEvents['transaction']) => void;
67
- onFocus: (props: EditorEvents['focus']) => void;
68
- onBlur: (props: EditorEvents['blur']) => void;
69
- onDestroy: (props: EditorEvents['destroy']) => void;
70
- }
71
- export declare type HTMLContent = string;
72
- export declare type JSONContent = {
73
- type: string;
74
- attrs?: Record<string, any>;
75
- content?: JSONContent[];
76
- marks?: {
77
- type: string;
78
- attrs?: Record<string, any>;
79
- [key: string]: any;
80
- }[];
81
- text?: string;
82
- [key: string]: any;
83
- };
84
- export declare type Content = HTMLContent | JSONContent | JSONContent[] | null;
85
- export declare type CommandProps = {
86
- editor: Editor;
87
- tr: Transaction;
88
- commands: SingleCommands;
89
- can: () => CanCommands;
90
- chain: () => ChainedCommands;
91
- state: EditorState;
92
- view: EditorView;
93
- dispatch: ((args?: any) => any) | undefined;
94
- };
95
- export declare type Command = (props: CommandProps) => boolean;
96
- export declare type CommandSpec = (...args: any[]) => Command;
97
- export declare type KeyboardShortcutCommand = (props: {
98
- editor: Editor;
99
- }) => boolean;
100
- export declare type Attribute = {
101
- default: any;
102
- rendered?: boolean;
103
- renderHTML?: ((attributes: Record<string, any>) => Record<string, any> | null) | null;
104
- parseHTML?: ((element: HTMLElement) => any | null) | null;
105
- keepOnSplit: boolean;
106
- };
107
- export declare type Attributes = {
108
- [key: string]: Attribute;
109
- };
110
- export declare type ExtensionAttribute = {
111
- type: string;
112
- name: string;
113
- attribute: Required<Attribute>;
114
- };
115
- export declare type GlobalAttributes = {
116
- types: string[];
117
- attributes: {
118
- [key: string]: Attribute;
119
- };
120
- }[];
121
- export declare type PickValue<T, K extends keyof T> = T[K];
122
- export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
123
- export declare type Diff<T extends keyof any, U extends keyof any> = ({
124
- [P in T]: P;
125
- } & {
126
- [P in U]: never;
127
- } & {
128
- [x: string]: never;
129
- })[T];
130
- export declare type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
131
- export declare type ValuesOf<T> = T[keyof T];
132
- export declare type KeysWithTypeOf<T, Type> = ({
133
- [P in keyof T]: T[P] extends Type ? P : never;
134
- })[keyof T];
135
- export declare type NodeViewProps = {
136
- editor: Editor;
137
- node: ProseMirrorNode;
138
- decorations: Decoration[];
139
- selected: boolean;
140
- extension: Node;
141
- getPos: () => number;
142
- updateAttributes: (attributes: Record<string, any>) => void;
143
- deleteNode: () => void;
144
- };
145
- export interface NodeViewRendererOptions {
146
- stopEvent: ((props: {
147
- event: Event;
148
- }) => boolean) | null;
149
- ignoreMutation: ((props: {
150
- mutation: MutationRecord | {
151
- type: 'selection';
152
- target: Element;
153
- };
154
- }) => boolean) | null;
155
- }
156
- export declare type NodeViewRendererProps = {
157
- editor: Editor;
158
- node: ProseMirrorNode;
159
- getPos: (() => number) | boolean;
160
- HTMLAttributes: Record<string, any>;
161
- decorations: Decoration[];
162
- extension: Node;
163
- };
164
- export declare type NodeViewRenderer = (props: NodeViewRendererProps) => (NodeView | {});
165
- export declare type AnyCommands = Record<string, (...args: any[]) => Command>;
166
- export declare type UnionCommands<T = Command> = UnionToIntersection<ValuesOf<Pick<Commands<T>, KeysWithTypeOf<Commands<T>, {}>>>>;
167
- export declare type RawCommands = {
168
- [Item in keyof UnionCommands]: UnionCommands<Command>[Item];
169
- };
170
- export declare type SingleCommands = {
171
- [Item in keyof UnionCommands]: UnionCommands<boolean>[Item];
172
- };
173
- export declare type ChainedCommands = {
174
- [Item in keyof UnionCommands]: UnionCommands<ChainedCommands>[Item];
175
- } & {
176
- run: () => boolean;
177
- };
178
- export declare type CanCommands = SingleCommands & {
179
- chain: () => ChainedCommands;
180
- };
181
- export declare type FocusPosition = 'start' | 'end' | number | boolean | null;
182
- export declare type Range = {
183
- from: number;
184
- to: number;
185
- };
186
- export declare type NodeRange = {
187
- node: ProseMirrorNode;
188
- from: number;
189
- to: number;
190
- };
191
- export declare type MarkRange = {
192
- mark: ProseMirrorMark;
193
- from: number;
194
- to: number;
195
- };
196
- export declare type Predicate = (node: ProseMirrorNode) => boolean;
197
- export declare type NodeWithPos = {
198
- node: ProseMirrorNode;
199
- pos: number;
200
- };
201
- export declare type TextSerializer = (props: {
202
- node: ProseMirrorNode;
203
- pos: number;
204
- parent: ProseMirrorNode;
205
- index: number;
206
- }) => string;
207
- export declare type ExtendedRegExpMatchArray = RegExpMatchArray & {
208
- data?: Record<string, any>;
209
- };
@@ -1,9 +0,0 @@
1
- import { MaybeReturnType } from '../types';
2
- /**
3
- * Optionally calls `value` as a function.
4
- * Otherwise it is returned directly.
5
- * @param value Function or any value.
6
- * @param context Optional context to bind to function.
7
- * @param props Optional props to pass to function.
8
- */
9
- export default function callOrReturn<T>(value: T, context?: any, ...props: any[]): MaybeReturnType<T>;
@@ -1 +0,0 @@
1
- export default function createStyleTag(style: string): HTMLStyleElement;
@@ -1,6 +0,0 @@
1
- /**
2
- * Remove a property or an array of properties from an object
3
- * @param obj Object
4
- * @param key Key to remove
5
- */
6
- export default function deleteProps(obj: Record<string, any>, propOrProps: string | string[]): Record<string, any>;
@@ -1 +0,0 @@
1
- export default function elementFromString(value: string): HTMLElement;
@@ -1 +0,0 @@
1
- export default function findDuplicates(items: any[]): any[];
@@ -1 +0,0 @@
1
- export default function fromString(value: any): any;
@@ -1 +0,0 @@
1
- export default function isClass(value: any): boolean;
@@ -1 +0,0 @@
1
- export default function isEmptyObject(value?: {}): boolean;
@@ -1 +0,0 @@
1
- export default function isObject(value: any): value is Function;
@@ -1 +0,0 @@
1
- export default function isNumber(value: any): value is number;
@@ -1 +0,0 @@
1
- export default function isObject(value: any): boolean;
@@ -1 +0,0 @@
1
- export default function isPlainObject(value: any): value is Record<string, any>;
@@ -1 +0,0 @@
1
- export default function isRegExp(value: any): value is RegExp;
@@ -1 +0,0 @@
1
- export default function isString(value: any): value is string;
@@ -1 +0,0 @@
1
- export default function isiOS(): boolean;
@@ -1 +0,0 @@
1
- export default function mergeAttributes(...objects: Record<string, any>[]): Record<string, any>;
@@ -1 +0,0 @@
1
- export default function mergeDeep(target: Record<string, any>, source: Record<string, any>): Record<string, any>;
@@ -1 +0,0 @@
1
- export default function minMax(value?: number, min?: number, max?: number): number;
@@ -1,8 +0,0 @@
1
- /**
2
- * Check if object1 includes object2
3
- * @param object1 Object
4
- * @param object2 Object
5
- */
6
- export default function objectIncludes(object1: Record<string, any>, object2: Record<string, any>, options?: {
7
- strict: boolean;
8
- }): boolean;
@@ -1 +0,0 @@
1
- export default function removeElement(element: HTMLElement): void;
@@ -1,24 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface BlockquoteOptions {
3
- HTMLAttributes: Record<string, any>;
4
- }
5
- declare module '@tiptap/core' {
6
- interface Commands<ReturnType> {
7
- blockQuote: {
8
- /**
9
- * Set a blockquote node
10
- */
11
- setBlockquote: () => ReturnType;
12
- /**
13
- * Toggle a blockquote node
14
- */
15
- toggleBlockquote: () => ReturnType;
16
- /**
17
- * Unset a blockquote node
18
- */
19
- unsetBlockquote: () => ReturnType;
20
- };
21
- }
22
- }
23
- export declare const inputRegex: RegExp;
24
- export declare const Blockquote: Node<BlockquoteOptions, unknown>;
@@ -1,3 +0,0 @@
1
- import { Blockquote } from './blockquote';
2
- export * from './blockquote';
3
- export default Blockquote;
@@ -1,27 +0,0 @@
1
- import { Mark } from '@tiptap/core';
2
- export interface BoldOptions {
3
- HTMLAttributes: Record<string, any>;
4
- }
5
- declare module '@tiptap/core' {
6
- interface Commands<ReturnType> {
7
- bold: {
8
- /**
9
- * Set a bold mark
10
- */
11
- setBold: () => ReturnType;
12
- /**
13
- * Toggle a bold mark
14
- */
15
- toggleBold: () => ReturnType;
16
- /**
17
- * Unset a bold mark
18
- */
19
- unsetBold: () => ReturnType;
20
- };
21
- }
22
- }
23
- export declare const starInputRegex: RegExp;
24
- export declare const starPasteRegex: RegExp;
25
- export declare const underscoreInputRegex: RegExp;
26
- export declare const underscorePasteRegex: RegExp;
27
- export declare const Bold: Mark<BoldOptions, unknown>;
@@ -1,3 +0,0 @@
1
- import { Bold } from './bold';
2
- export * from './bold';
3
- export default Bold;
@@ -1,43 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- import { EditorState, Plugin, PluginKey } from 'prosemirror-state';
3
- import { EditorView } from 'prosemirror-view';
4
- import { Instance, Props } from 'tippy.js';
5
- export interface BubbleMenuPluginProps {
6
- pluginKey: PluginKey | string;
7
- editor: Editor;
8
- element: HTMLElement;
9
- tippyOptions?: Partial<Props>;
10
- shouldShow?: ((props: {
11
- editor: Editor;
12
- view: EditorView;
13
- state: EditorState;
14
- oldState?: EditorState;
15
- from: number;
16
- to: number;
17
- }) => boolean) | null;
18
- }
19
- export declare type BubbleMenuViewProps = BubbleMenuPluginProps & {
20
- view: EditorView;
21
- };
22
- export declare class BubbleMenuView {
23
- editor: Editor;
24
- element: HTMLElement;
25
- view: EditorView;
26
- preventHide: boolean;
27
- tippy: Instance | undefined;
28
- tippyOptions?: Partial<Props>;
29
- shouldShow: Exclude<BubbleMenuPluginProps['shouldShow'], null>;
30
- constructor({ editor, element, view, tippyOptions, shouldShow, }: BubbleMenuViewProps);
31
- mousedownHandler: () => void;
32
- dragstartHandler: () => void;
33
- focusHandler: () => void;
34
- blurHandler: ({ event }: {
35
- event: FocusEvent;
36
- }) => void;
37
- createTooltip(): void;
38
- update(view: EditorView, oldState?: EditorState): void;
39
- show(): void;
40
- hide(): void;
41
- destroy(): void;
42
- }
43
- export declare const BubbleMenuPlugin: (options: BubbleMenuPluginProps) => Plugin<any, any>;
@@ -1,6 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { BubbleMenuPluginProps } from './bubble-menu-plugin';
3
- export declare type BubbleMenuOptions = Omit<BubbleMenuPluginProps, 'editor' | 'element'> & {
4
- element: HTMLElement | null;
5
- };
6
- export declare const BubbleMenu: Extension<BubbleMenuOptions, any>;
@@ -1,4 +0,0 @@
1
- import { BubbleMenu } from './bubble-menu';
2
- export * from './bubble-menu';
3
- export * from './bubble-menu-plugin';
4
- export default BubbleMenu;
@@ -1,16 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface BulletListOptions {
3
- HTMLAttributes: Record<string, any>;
4
- }
5
- declare module '@tiptap/core' {
6
- interface Commands<ReturnType> {
7
- bulletList: {
8
- /**
9
- * Toggle a bullet list
10
- */
11
- toggleBulletList: () => ReturnType;
12
- };
13
- }
14
- }
15
- export declare const inputRegex: RegExp;
16
- export declare const BulletList: Node<BulletListOptions, unknown>;
@@ -1,3 +0,0 @@
1
- import { BulletList } from './bullet-list';
2
- export * from './bullet-list';
3
- export default BulletList;
@@ -1,7 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { PluginKey } from 'prosemirror-state';
3
- export declare const pluginKey: PluginKey<any, any>;
4
- export interface CharacterCountOptions {
5
- limit?: number;
6
- }
7
- export declare const CharacterCount: Extension<CharacterCountOptions, any>;
@@ -1,3 +0,0 @@
1
- import { CharacterCount } from './character-count';
2
- export * from './character-count';
3
- export default CharacterCount;
@@ -1,25 +0,0 @@
1
- import { Mark } from '@tiptap/core';
2
- export interface CodeOptions {
3
- HTMLAttributes: Record<string, any>;
4
- }
5
- declare module '@tiptap/core' {
6
- interface Commands<ReturnType> {
7
- code: {
8
- /**
9
- * Set a code mark
10
- */
11
- setCode: () => ReturnType;
12
- /**
13
- * Toggle inline code
14
- */
15
- toggleCode: () => ReturnType;
16
- /**
17
- * Unset a code mark
18
- */
19
- unsetCode: () => ReturnType;
20
- };
21
- }
22
- }
23
- export declare const inputRegex: RegExp;
24
- export declare const pasteRegex: RegExp;
25
- export declare const Code: Mark<CodeOptions, unknown>;
@@ -1,3 +0,0 @@
1
- import { Code } from './code';
2
- export * from './code';
3
- export default Code;
@@ -1,26 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface CodeBlockOptions {
3
- languageClassPrefix: string;
4
- HTMLAttributes: Record<string, any>;
5
- }
6
- declare module '@tiptap/core' {
7
- interface Commands<ReturnType> {
8
- codeBlock: {
9
- /**
10
- * Set a code block
11
- */
12
- setCodeBlock: (attributes?: {
13
- language: string;
14
- }) => ReturnType;
15
- /**
16
- * Toggle a code block
17
- */
18
- toggleCodeBlock: (attributes?: {
19
- language: string;
20
- }) => ReturnType;
21
- };
22
- }
23
- }
24
- export declare const backtickInputRegex: RegExp;
25
- export declare const tildeInputRegex: RegExp;
26
- export declare const CodeBlock: Node<CodeBlockOptions, unknown>;
@@ -1,3 +0,0 @@
1
- import { CodeBlock } from './code-block';
2
- export * from './code-block';
3
- export default CodeBlock;
@@ -1,5 +0,0 @@
1
- import { CodeBlockOptions } from '@tiptap/extension-code-block';
2
- export interface CodeBlockLowlightOptions extends CodeBlockOptions {
3
- lowlight: any;
4
- }
5
- export declare const CodeBlockLowlight: import("@tiptap/core").Node<CodeBlockLowlightOptions, unknown>;
@@ -1,3 +0,0 @@
1
- import { CodeBlockLowlight } from './code-block-lowlight';
2
- export * from './code-block-lowlight';
3
- export default CodeBlockLowlight;
@@ -1,5 +0,0 @@
1
- import { Plugin } from 'prosemirror-state';
2
- export declare function LowlightPlugin({ name, lowlight }: {
3
- name: string;
4
- lowlight: any;
5
- }): Plugin<any, any>;
@@ -1,30 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- collaboration: {
5
- /**
6
- * Undo recent changes
7
- */
8
- undo: () => ReturnType;
9
- /**
10
- * Reapply reverted changes
11
- */
12
- redo: () => ReturnType;
13
- };
14
- }
15
- }
16
- export interface CollaborationOptions {
17
- /**
18
- * An initialized Y.js document.
19
- */
20
- document: any;
21
- /**
22
- * Name of a Y.js fragment, can be changed to sync multiple fields with one Y.js document.
23
- */
24
- field: string;
25
- /**
26
- * A raw Y.js fragment, can be used instead of `document` and `field`.
27
- */
28
- fragment: any;
29
- }
30
- export declare const Collaboration: Extension<CollaborationOptions, any>;
@@ -1,2 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- export declare function isChangeOrigin(transaction: Transaction): boolean;
@@ -1,4 +0,0 @@
1
- import { Collaboration } from './collaboration';
2
- export * from './collaboration';
3
- export * from './helpers/isChangeOrigin';
4
- export default Collaboration;