@tiptap/core 2.5.0-beta.2 → 2.5.0-beta.4

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 (180) hide show
  1. package/dist/index.cjs +4549 -4538
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +4549 -4536
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.umd.js +4549 -4538
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/packages/core/src/CommandManager.d.ts +20 -20
  8. package/dist/packages/core/src/Editor.d.ts +161 -161
  9. package/dist/packages/core/src/EventEmitter.d.ts +11 -11
  10. package/dist/packages/core/src/Extension.d.ts +343 -342
  11. package/dist/packages/core/src/ExtensionManager.d.ts +55 -55
  12. package/dist/packages/core/src/InputRule.d.ts +42 -42
  13. package/dist/packages/core/src/Mark.d.ts +451 -450
  14. package/dist/packages/core/src/Node.d.ts +611 -609
  15. package/dist/packages/core/src/NodePos.d.ts +44 -44
  16. package/dist/packages/core/src/NodeView.d.ts +31 -31
  17. package/dist/packages/core/src/PasteRule.d.ts +50 -50
  18. package/dist/packages/core/src/Tracker.d.ts +11 -11
  19. package/dist/packages/core/src/commands/blur.d.ts +13 -13
  20. package/dist/packages/core/src/commands/clearContent.d.ts +14 -14
  21. package/dist/packages/core/src/commands/clearNodes.d.ts +13 -13
  22. package/dist/packages/core/src/commands/command.d.ts +18 -18
  23. package/dist/packages/core/src/commands/createParagraphNear.d.ts +13 -13
  24. package/dist/packages/core/src/commands/cut.d.ts +20 -20
  25. package/dist/packages/core/src/commands/deleteCurrentNode.d.ts +13 -13
  26. package/dist/packages/core/src/commands/deleteNode.d.ts +15 -15
  27. package/dist/packages/core/src/commands/deleteRange.d.ts +14 -14
  28. package/dist/packages/core/src/commands/deleteSelection.d.ts +13 -13
  29. package/dist/packages/core/src/commands/enter.d.ts +13 -13
  30. package/dist/packages/core/src/commands/exitCode.d.ts +13 -13
  31. package/dist/packages/core/src/commands/extendMarkRange.d.ts +25 -25
  32. package/dist/packages/core/src/commands/first.d.ts +14 -14
  33. package/dist/packages/core/src/commands/focus.d.ts +27 -27
  34. package/dist/packages/core/src/commands/forEach.d.ts +14 -14
  35. package/dist/packages/core/src/commands/index.d.ts +55 -55
  36. package/dist/packages/core/src/commands/insertContent.d.ts +34 -34
  37. package/dist/packages/core/src/commands/insertContentAt.d.ts +47 -47
  38. package/dist/packages/core/src/commands/join.d.ts +41 -41
  39. package/dist/packages/core/src/commands/joinItemBackward.d.ts +13 -13
  40. package/dist/packages/core/src/commands/joinItemForward.d.ts +13 -13
  41. package/dist/packages/core/src/commands/joinTextblockBackward.d.ts +12 -12
  42. package/dist/packages/core/src/commands/joinTextblockForward.d.ts +12 -12
  43. package/dist/packages/core/src/commands/keyboardShortcut.d.ts +14 -14
  44. package/dist/packages/core/src/commands/lift.d.ts +17 -17
  45. package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +13 -13
  46. package/dist/packages/core/src/commands/liftListItem.d.ts +15 -15
  47. package/dist/packages/core/src/commands/newlineInCode.d.ts +13 -13
  48. package/dist/packages/core/src/commands/resetAttributes.d.ts +16 -16
  49. package/dist/packages/core/src/commands/scrollIntoView.d.ts +13 -13
  50. package/dist/packages/core/src/commands/selectAll.d.ts +13 -13
  51. package/dist/packages/core/src/commands/selectNodeBackward.d.ts +13 -13
  52. package/dist/packages/core/src/commands/selectNodeForward.d.ts +13 -13
  53. package/dist/packages/core/src/commands/selectParentNode.d.ts +13 -13
  54. package/dist/packages/core/src/commands/selectTextblockEnd.d.ts +13 -13
  55. package/dist/packages/core/src/commands/selectTextblockStart.d.ts +13 -13
  56. package/dist/packages/core/src/commands/setContent.d.ts +40 -40
  57. package/dist/packages/core/src/commands/setMark.d.ts +15 -15
  58. package/dist/packages/core/src/commands/setMeta.d.ts +15 -15
  59. package/dist/packages/core/src/commands/setNode.d.ts +16 -16
  60. package/dist/packages/core/src/commands/setNodeSelection.d.ts +14 -14
  61. package/dist/packages/core/src/commands/setTextSelection.d.ts +14 -14
  62. package/dist/packages/core/src/commands/sinkListItem.d.ts +15 -15
  63. package/dist/packages/core/src/commands/splitBlock.d.ts +17 -17
  64. package/dist/packages/core/src/commands/splitListItem.d.ts +15 -15
  65. package/dist/packages/core/src/commands/toggleList.d.ts +18 -18
  66. package/dist/packages/core/src/commands/toggleMark.d.ts +30 -30
  67. package/dist/packages/core/src/commands/toggleNode.d.ts +17 -17
  68. package/dist/packages/core/src/commands/toggleWrap.d.ts +16 -16
  69. package/dist/packages/core/src/commands/undoInputRule.d.ts +13 -13
  70. package/dist/packages/core/src/commands/unsetAllMarks.d.ts +13 -13
  71. package/dist/packages/core/src/commands/unsetMark.d.ts +25 -25
  72. package/dist/packages/core/src/commands/updateAttributes.d.ts +24 -24
  73. package/dist/packages/core/src/commands/wrapIn.d.ts +16 -16
  74. package/dist/packages/core/src/commands/wrapInList.d.ts +16 -16
  75. package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +5 -5
  76. package/dist/packages/core/src/extensions/commands.d.ts +3 -3
  77. package/dist/packages/core/src/extensions/editable.d.ts +2 -2
  78. package/dist/packages/core/src/extensions/focusEvents.d.ts +2 -2
  79. package/dist/packages/core/src/extensions/index.d.ts +6 -6
  80. package/dist/packages/core/src/extensions/keymap.d.ts +2 -2
  81. package/dist/packages/core/src/extensions/tabindex.d.ts +2 -2
  82. package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +10 -10
  83. package/dist/packages/core/src/helpers/createChainableState.d.ts +10 -10
  84. package/dist/packages/core/src/helpers/createDocument.d.ts +12 -12
  85. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +15 -15
  86. package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +7 -7
  87. package/dist/packages/core/src/helpers/findChildren.d.ts +9 -9
  88. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +10 -10
  89. package/dist/packages/core/src/helpers/findParentNode.d.ts +16 -16
  90. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +17 -17
  91. package/dist/packages/core/src/helpers/generateHTML.d.ts +8 -8
  92. package/dist/packages/core/src/helpers/generateJSON.d.ts +8 -8
  93. package/dist/packages/core/src/helpers/generateText.d.ts +12 -12
  94. package/dist/packages/core/src/helpers/getAttributes.d.ts +9 -9
  95. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +6 -6
  96. package/dist/packages/core/src/helpers/getChangedRanges.d.ts +11 -11
  97. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +8 -8
  98. package/dist/packages/core/src/helpers/getExtensionField.d.ts +9 -9
  99. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +2 -2
  100. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +3 -3
  101. package/dist/packages/core/src/helpers/getMarkRange.d.ts +3 -3
  102. package/dist/packages/core/src/helpers/getMarkType.d.ts +2 -2
  103. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +3 -3
  104. package/dist/packages/core/src/helpers/getNodeAtPosition.d.ts +11 -11
  105. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +3 -3
  106. package/dist/packages/core/src/helpers/getNodeType.d.ts +2 -2
  107. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +3 -3
  108. package/dist/packages/core/src/helpers/getSchema.d.ts +4 -4
  109. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +10 -10
  110. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +8 -8
  111. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +8 -8
  112. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +9 -9
  113. package/dist/packages/core/src/helpers/getText.d.ts +15 -15
  114. package/dist/packages/core/src/helpers/getTextBetween.d.ts +14 -14
  115. package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +8 -8
  116. package/dist/packages/core/src/helpers/getTextSerializersFromSchema.d.ts +8 -8
  117. package/dist/packages/core/src/helpers/index.d.ts +50 -50
  118. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +9 -9
  119. package/dist/packages/core/src/helpers/isActive.d.ts +2 -2
  120. package/dist/packages/core/src/helpers/isAtEndOfNode.d.ts +2 -2
  121. package/dist/packages/core/src/helpers/isAtStartOfNode.d.ts +2 -2
  122. package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +2 -2
  123. package/dist/packages/core/src/helpers/isList.d.ts +2 -2
  124. package/dist/packages/core/src/helpers/isMarkActive.d.ts +3 -3
  125. package/dist/packages/core/src/helpers/isNodeActive.d.ts +3 -3
  126. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +2 -2
  127. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +2 -2
  128. package/dist/packages/core/src/helpers/isTextSelection.d.ts +2 -2
  129. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +2 -2
  130. package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +4 -4
  131. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +2 -2
  132. package/dist/packages/core/src/helpers/splitExtensions.d.ts +9 -9
  133. package/dist/packages/core/src/index.d.ts +24 -24
  134. package/dist/packages/core/src/inputRules/index.d.ts +5 -5
  135. package/dist/packages/core/src/inputRules/markInputRule.d.ts +13 -13
  136. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +23 -23
  137. package/dist/packages/core/src/inputRules/textInputRule.d.ts +10 -10
  138. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +15 -15
  139. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +28 -28
  140. package/dist/packages/core/src/pasteRules/index.d.ts +3 -3
  141. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +13 -13
  142. package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +13 -13
  143. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +10 -10
  144. package/dist/packages/core/src/style.d.ts +1 -1
  145. package/dist/packages/core/src/types.d.ts +250 -244
  146. package/dist/packages/core/src/utilities/callOrReturn.d.ts +9 -9
  147. package/dist/packages/core/src/utilities/createStyleTag.d.ts +1 -1
  148. package/dist/packages/core/src/utilities/deleteProps.d.ts +6 -6
  149. package/dist/packages/core/src/utilities/elementFromString.d.ts +1 -1
  150. package/dist/packages/core/src/utilities/escapeForRegEx.d.ts +1 -1
  151. package/dist/packages/core/src/utilities/findDuplicates.d.ts +1 -1
  152. package/dist/packages/core/src/utilities/fromString.d.ts +1 -1
  153. package/dist/packages/core/src/utilities/index.d.ts +20 -20
  154. package/dist/packages/core/src/utilities/isAndroid.d.ts +1 -1
  155. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +1 -1
  156. package/dist/packages/core/src/utilities/isFunction.d.ts +1 -1
  157. package/dist/packages/core/src/utilities/isMacOS.d.ts +1 -1
  158. package/dist/packages/core/src/utilities/isNumber.d.ts +1 -1
  159. package/dist/packages/core/src/utilities/isPlainObject.d.ts +1 -1
  160. package/dist/packages/core/src/utilities/isRegExp.d.ts +1 -1
  161. package/dist/packages/core/src/utilities/isString.d.ts +1 -1
  162. package/dist/packages/core/src/utilities/isiOS.d.ts +1 -1
  163. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +1 -1
  164. package/dist/packages/core/src/utilities/mergeDeep.d.ts +1 -1
  165. package/dist/packages/core/src/utilities/minMax.d.ts +1 -1
  166. package/dist/packages/core/src/utilities/objectIncludes.d.ts +8 -8
  167. package/dist/packages/core/src/utilities/removeDuplicates.d.ts +8 -8
  168. package/package.json +2 -2
  169. package/src/Extension.ts +14 -12
  170. package/src/ExtensionManager.ts +2 -2
  171. package/src/Mark.ts +15 -12
  172. package/src/Node.ts +16 -12
  173. package/src/commands/insertContentAt.ts +1 -1
  174. package/src/extensions/tabindex.ts +1 -1
  175. package/src/helpers/getAttributesFromExtensions.ts +2 -3
  176. package/src/helpers/getSchemaByResolvedExtensions.ts +5 -2
  177. package/src/helpers/injectExtensionAttributesToParseRule.ts +4 -4
  178. package/src/helpers/isNodeEmpty.ts +6 -3
  179. package/src/types.ts +6 -0
  180. package/src/utilities/mergeDeep.ts +3 -7
@@ -1,14 +1,14 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- keyboardShortcut: {
5
- /**
6
- * Trigger a keyboard shortcut.
7
- * @param name The name of the keyboard shortcut.
8
- * @example editor.commands.keyboardShortcut('Mod-b')
9
- */
10
- keyboardShortcut: (name: string) => ReturnType;
11
- };
12
- }
13
- }
14
- export declare const keyboardShortcut: RawCommands['keyboardShortcut'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ keyboardShortcut: {
5
+ /**
6
+ * Trigger a keyboard shortcut.
7
+ * @param name The name of the keyboard shortcut.
8
+ * @example editor.commands.keyboardShortcut('Mod-b')
9
+ */
10
+ keyboardShortcut: (name: string) => ReturnType;
11
+ };
12
+ }
13
+ }
14
+ export declare const keyboardShortcut: RawCommands['keyboardShortcut'];
@@ -1,17 +1,17 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- lift: {
6
- /**
7
- * Removes an existing wrap if possible lifting the node out of it
8
- * @param typeOrName The type or name of the node.
9
- * @param attributes The attributes of the node.
10
- * @example editor.commands.lift('paragraph')
11
- * @example editor.commands.lift('heading', { level: 1 })
12
- */
13
- lift: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
14
- };
15
- }
16
- }
17
- export declare const lift: RawCommands['lift'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ lift: {
6
+ /**
7
+ * Removes an existing wrap if possible lifting the node out of it
8
+ * @param typeOrName The type or name of the node.
9
+ * @param attributes The attributes of the node.
10
+ * @example editor.commands.lift('paragraph')
11
+ * @example editor.commands.lift('heading', { level: 1 })
12
+ */
13
+ lift: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
14
+ };
15
+ }
16
+ }
17
+ export declare const lift: RawCommands['lift'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- liftEmptyBlock: {
5
- /**
6
- * If the cursor is in an empty textblock that can be lifted, lift the block.
7
- * @example editor.commands.liftEmptyBlock()
8
- */
9
- liftEmptyBlock: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const liftEmptyBlock: RawCommands['liftEmptyBlock'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ liftEmptyBlock: {
5
+ /**
6
+ * If the cursor is in an empty textblock that can be lifted, lift the block.
7
+ * @example editor.commands.liftEmptyBlock()
8
+ */
9
+ liftEmptyBlock: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const liftEmptyBlock: RawCommands['liftEmptyBlock'];
@@ -1,15 +1,15 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- liftListItem: {
6
- /**
7
- * Create a command to lift the list item around the selection up into a wrapping list.
8
- * @param typeOrName The type or name of the node.
9
- * @example editor.commands.liftListItem('listItem')
10
- */
11
- liftListItem: (typeOrName: string | NodeType) => ReturnType;
12
- };
13
- }
14
- }
15
- export declare const liftListItem: RawCommands['liftListItem'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ liftListItem: {
6
+ /**
7
+ * Create a command to lift the list item around the selection up into a wrapping list.
8
+ * @param typeOrName The type or name of the node.
9
+ * @example editor.commands.liftListItem('listItem')
10
+ */
11
+ liftListItem: (typeOrName: string | NodeType) => ReturnType;
12
+ };
13
+ }
14
+ }
15
+ export declare const liftListItem: RawCommands['liftListItem'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- newlineInCode: {
5
- /**
6
- * Add a newline character in code.
7
- * @example editor.commands.newlineInCode()
8
- */
9
- newlineInCode: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const newlineInCode: RawCommands['newlineInCode'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ newlineInCode: {
5
+ /**
6
+ * Add a newline character in code.
7
+ * @example editor.commands.newlineInCode()
8
+ */
9
+ newlineInCode: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const newlineInCode: RawCommands['newlineInCode'];
@@ -1,16 +1,16 @@
1
- import { MarkType, NodeType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- resetAttributes: {
6
- /**
7
- * Resets some node attributes to the default value.
8
- * @param typeOrName The type or name of the node.
9
- * @param attributes The attributes of the node to reset.
10
- * @example editor.commands.resetAttributes('heading', 'level')
11
- */
12
- resetAttributes: (typeOrName: string | NodeType | MarkType, attributes: string | string[]) => ReturnType;
13
- };
14
- }
15
- }
16
- export declare const resetAttributes: RawCommands['resetAttributes'];
1
+ import { MarkType, NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ resetAttributes: {
6
+ /**
7
+ * Resets some node attributes to the default value.
8
+ * @param typeOrName The type or name of the node.
9
+ * @param attributes The attributes of the node to reset.
10
+ * @example editor.commands.resetAttributes('heading', 'level')
11
+ */
12
+ resetAttributes: (typeOrName: string | NodeType | MarkType, attributes: string | string[]) => ReturnType;
13
+ };
14
+ }
15
+ }
16
+ export declare const resetAttributes: RawCommands['resetAttributes'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- scrollIntoView: {
5
- /**
6
- * Scroll the selection into view.
7
- * @example editor.commands.scrollIntoView()
8
- */
9
- scrollIntoView: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const scrollIntoView: RawCommands['scrollIntoView'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ scrollIntoView: {
5
+ /**
6
+ * Scroll the selection into view.
7
+ * @example editor.commands.scrollIntoView()
8
+ */
9
+ scrollIntoView: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const scrollIntoView: RawCommands['scrollIntoView'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- selectAll: {
5
- /**
6
- * Select the whole document.
7
- * @example editor.commands.selectAll()
8
- */
9
- selectAll: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const selectAll: RawCommands['selectAll'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ selectAll: {
5
+ /**
6
+ * Select the whole document.
7
+ * @example editor.commands.selectAll()
8
+ */
9
+ selectAll: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const selectAll: RawCommands['selectAll'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- selectNodeBackward: {
5
- /**
6
- * Select a node backward.
7
- * @example editor.commands.selectNodeBackward()
8
- */
9
- selectNodeBackward: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const selectNodeBackward: RawCommands['selectNodeBackward'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ selectNodeBackward: {
5
+ /**
6
+ * Select a node backward.
7
+ * @example editor.commands.selectNodeBackward()
8
+ */
9
+ selectNodeBackward: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const selectNodeBackward: RawCommands['selectNodeBackward'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- selectNodeForward: {
5
- /**
6
- * Select a node forward.
7
- * @example editor.commands.selectNodeForward()
8
- */
9
- selectNodeForward: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const selectNodeForward: RawCommands['selectNodeForward'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ selectNodeForward: {
5
+ /**
6
+ * Select a node forward.
7
+ * @example editor.commands.selectNodeForward()
8
+ */
9
+ selectNodeForward: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const selectNodeForward: RawCommands['selectNodeForward'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- selectParentNode: {
5
- /**
6
- * Select the parent node.
7
- * @example editor.commands.selectParentNode()
8
- */
9
- selectParentNode: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const selectParentNode: RawCommands['selectParentNode'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ selectParentNode: {
5
+ /**
6
+ * Select the parent node.
7
+ * @example editor.commands.selectParentNode()
8
+ */
9
+ selectParentNode: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const selectParentNode: RawCommands['selectParentNode'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- selectTextblockEnd: {
5
- /**
6
- * Moves the cursor to the end of current text block.
7
- * @example editor.commands.selectTextblockEnd()
8
- */
9
- selectTextblockEnd: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const selectTextblockEnd: RawCommands['selectTextblockEnd'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ selectTextblockEnd: {
5
+ /**
6
+ * Moves the cursor to the end of current text block.
7
+ * @example editor.commands.selectTextblockEnd()
8
+ */
9
+ selectTextblockEnd: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const selectTextblockEnd: RawCommands['selectTextblockEnd'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- selectTextblockStart: {
5
- /**
6
- * Moves the cursor to the start of current text block.
7
- * @example editor.commands.selectTextblockStart()
8
- */
9
- selectTextblockStart: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const selectTextblockStart: RawCommands['selectTextblockStart'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ selectTextblockStart: {
5
+ /**
6
+ * Moves the cursor to the start of current text block.
7
+ * @example editor.commands.selectTextblockStart()
8
+ */
9
+ selectTextblockStart: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const selectTextblockStart: RawCommands['selectTextblockStart'];
@@ -1,40 +1,40 @@
1
- import { ParseOptions } from '@tiptap/pm/model';
2
- import { Content, RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- setContent: {
6
- /**
7
- * Replace the whole document with new content.
8
- * @param content The new content.
9
- * @param emitUpdate Whether to emit an update event.
10
- * @param parseOptions Options for parsing the content.
11
- * @example editor.commands.setContent('<p>Example text</p>')
12
- */
13
- setContent: (
14
- /**
15
- * The new content.
16
- */
17
- content: Content,
18
- /**
19
- * Whether to emit an update event.
20
- * @default false
21
- */
22
- emitUpdate?: boolean,
23
- /**
24
- * Options for parsing the content.
25
- * @default {}
26
- */
27
- parseOptions?: ParseOptions,
28
- /**
29
- * Options for `setContent`.
30
- */
31
- options?: {
32
- /**
33
- * Whether to throw an error if the content is invalid.
34
- */
35
- errorOnInvalidContent?: boolean;
36
- }) => ReturnType;
37
- };
38
- }
39
- }
40
- export declare const setContent: RawCommands['setContent'];
1
+ import { ParseOptions } from '@tiptap/pm/model';
2
+ import { Content, RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ setContent: {
6
+ /**
7
+ * Replace the whole document with new content.
8
+ * @param content The new content.
9
+ * @param emitUpdate Whether to emit an update event.
10
+ * @param parseOptions Options for parsing the content.
11
+ * @example editor.commands.setContent('<p>Example text</p>')
12
+ */
13
+ setContent: (
14
+ /**
15
+ * The new content.
16
+ */
17
+ content: Content,
18
+ /**
19
+ * Whether to emit an update event.
20
+ * @default false
21
+ */
22
+ emitUpdate?: boolean,
23
+ /**
24
+ * Options for parsing the content.
25
+ * @default {}
26
+ */
27
+ parseOptions?: ParseOptions,
28
+ /**
29
+ * Options for `setContent`.
30
+ */
31
+ options?: {
32
+ /**
33
+ * Whether to throw an error if the content is invalid.
34
+ */
35
+ errorOnInvalidContent?: boolean;
36
+ }) => ReturnType;
37
+ };
38
+ }
39
+ }
40
+ export declare const setContent: RawCommands['setContent'];
@@ -1,15 +1,15 @@
1
- import { MarkType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- setMark: {
6
- /**
7
- * Add a mark with new attributes.
8
- * @param typeOrName The mark type or name.
9
- * @example editor.commands.setMark('bold', { level: 1 })
10
- */
11
- setMark: (typeOrName: string | MarkType, attributes?: Record<string, any>) => ReturnType;
12
- };
13
- }
14
- }
15
- export declare const setMark: RawCommands['setMark'];
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ setMark: {
6
+ /**
7
+ * Add a mark with new attributes.
8
+ * @param typeOrName The mark type or name.
9
+ * @example editor.commands.setMark('bold', { level: 1 })
10
+ */
11
+ setMark: (typeOrName: string | MarkType, attributes?: Record<string, any>) => ReturnType;
12
+ };
13
+ }
14
+ }
15
+ export declare const setMark: RawCommands['setMark'];
@@ -1,15 +1,15 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- setMeta: {
5
- /**
6
- * Store a metadata property in the current transaction.
7
- * @param key The key of the metadata property.
8
- * @param value The value to store.
9
- * @example editor.commands.setMeta('foo', 'bar')
10
- */
11
- setMeta: (key: string, value: any) => ReturnType;
12
- };
13
- }
14
- }
15
- export declare const setMeta: RawCommands['setMeta'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ setMeta: {
5
+ /**
6
+ * Store a metadata property in the current transaction.
7
+ * @param key The key of the metadata property.
8
+ * @param value The value to store.
9
+ * @example editor.commands.setMeta('foo', 'bar')
10
+ */
11
+ setMeta: (key: string, value: any) => ReturnType;
12
+ };
13
+ }
14
+ }
15
+ export declare const setMeta: RawCommands['setMeta'];
@@ -1,16 +1,16 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- setNode: {
6
- /**
7
- * Replace a given range with a node.
8
- * @param typeOrName The type or name of the node
9
- * @param attributes The attributes of the node
10
- * @example editor.commands.setNode('paragraph')
11
- */
12
- setNode: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
- };
14
- }
15
- }
16
- export declare const setNode: RawCommands['setNode'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ setNode: {
6
+ /**
7
+ * Replace a given range with a node.
8
+ * @param typeOrName The type or name of the node
9
+ * @param attributes The attributes of the node
10
+ * @example editor.commands.setNode('paragraph')
11
+ */
12
+ setNode: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
+ };
14
+ }
15
+ }
16
+ export declare const setNode: RawCommands['setNode'];
@@ -1,14 +1,14 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- setNodeSelection: {
5
- /**
6
- * Creates a NodeSelection.
7
- * @param position - Position of the node.
8
- * @example editor.commands.setNodeSelection(10)
9
- */
10
- setNodeSelection: (position: number) => ReturnType;
11
- };
12
- }
13
- }
14
- export declare const setNodeSelection: RawCommands['setNodeSelection'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ setNodeSelection: {
5
+ /**
6
+ * Creates a NodeSelection.
7
+ * @param position - Position of the node.
8
+ * @example editor.commands.setNodeSelection(10)
9
+ */
10
+ setNodeSelection: (position: number) => ReturnType;
11
+ };
12
+ }
13
+ }
14
+ export declare const setNodeSelection: RawCommands['setNodeSelection'];
@@ -1,14 +1,14 @@
1
- import { Range, RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- setTextSelection: {
5
- /**
6
- * Creates a TextSelection.
7
- * @param position The position of the selection.
8
- * @example editor.commands.setTextSelection(10)
9
- */
10
- setTextSelection: (position: number | Range) => ReturnType;
11
- };
12
- }
13
- }
14
- export declare const setTextSelection: RawCommands['setTextSelection'];
1
+ import { Range, RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ setTextSelection: {
5
+ /**
6
+ * Creates a TextSelection.
7
+ * @param position The position of the selection.
8
+ * @example editor.commands.setTextSelection(10)
9
+ */
10
+ setTextSelection: (position: number | Range) => ReturnType;
11
+ };
12
+ }
13
+ }
14
+ export declare const setTextSelection: RawCommands['setTextSelection'];