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

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 (179) hide show
  1. package/dist/index.cjs +4534 -4538
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +4534 -4536
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.umd.js +4534 -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 +3 -1
  170. package/src/ExtensionManager.ts +1 -1
  171. package/src/Mark.ts +3 -1
  172. package/src/Node.ts +4 -1
  173. package/src/commands/insertContentAt.ts +1 -1
  174. package/src/helpers/getAttributesFromExtensions.ts +2 -3
  175. package/src/helpers/getSchemaByResolvedExtensions.ts +4 -2
  176. package/src/helpers/injectExtensionAttributesToParseRule.ts +4 -4
  177. package/src/helpers/isNodeEmpty.ts +6 -3
  178. package/src/types.ts +6 -0
  179. package/src/utilities/mergeDeep.ts +3 -7
@@ -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
- sinkListItem: {
6
- /**
7
- * Sink the list item down into an inner list.
8
- * @param typeOrName The type or name of the node.
9
- * @example editor.commands.sinkListItem('listItem')
10
- */
11
- sinkListItem: (typeOrName: string | NodeType) => ReturnType;
12
- };
13
- }
14
- }
15
- export declare const sinkListItem: RawCommands['sinkListItem'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ sinkListItem: {
6
+ /**
7
+ * Sink the list item down into an inner list.
8
+ * @param typeOrName The type or name of the node.
9
+ * @example editor.commands.sinkListItem('listItem')
10
+ */
11
+ sinkListItem: (typeOrName: string | NodeType) => ReturnType;
12
+ };
13
+ }
14
+ }
15
+ export declare const sinkListItem: RawCommands['sinkListItem'];
@@ -1,17 +1,17 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- splitBlock: {
5
- /**
6
- * Forks a new node from an existing node.
7
- * @param options.keepMarks Keep marks from the previous node.
8
- * @example editor.commands.splitBlock()
9
- * @example editor.commands.splitBlock({ keepMarks: true })
10
- */
11
- splitBlock: (options?: {
12
- keepMarks?: boolean;
13
- }) => ReturnType;
14
- };
15
- }
16
- }
17
- export declare const splitBlock: RawCommands['splitBlock'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ splitBlock: {
5
+ /**
6
+ * Forks a new node from an existing node.
7
+ * @param options.keepMarks Keep marks from the previous node.
8
+ * @example editor.commands.splitBlock()
9
+ * @example editor.commands.splitBlock({ keepMarks: true })
10
+ */
11
+ splitBlock: (options?: {
12
+ keepMarks?: boolean;
13
+ }) => ReturnType;
14
+ };
15
+ }
16
+ }
17
+ export declare const splitBlock: RawCommands['splitBlock'];
@@ -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
- splitListItem: {
6
- /**
7
- * Splits one list item into two list items.
8
- * @param typeOrName The type or name of the node.
9
- * @example editor.commands.splitListItem('listItem')
10
- */
11
- splitListItem: (typeOrName: string | NodeType) => ReturnType;
12
- };
13
- }
14
- }
15
- export declare const splitListItem: RawCommands['splitListItem'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ splitListItem: {
6
+ /**
7
+ * Splits one list item into two list items.
8
+ * @param typeOrName The type or name of the node.
9
+ * @example editor.commands.splitListItem('listItem')
10
+ */
11
+ splitListItem: (typeOrName: string | NodeType) => ReturnType;
12
+ };
13
+ }
14
+ }
15
+ export declare const splitListItem: RawCommands['splitListItem'];
@@ -1,18 +1,18 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- toggleList: {
6
- /**
7
- * Toggle between different list types.
8
- * @param listTypeOrName The type or name of the list.
9
- * @param itemTypeOrName The type or name of the list item.
10
- * @param keepMarks Keep marks when toggling.
11
- * @param attributes Attributes for the new list.
12
- * @example editor.commands.toggleList('bulletList', 'listItem')
13
- */
14
- toggleList: (listTypeOrName: string | NodeType, itemTypeOrName: string | NodeType, keepMarks?: boolean, attributes?: Record<string, any>) => ReturnType;
15
- };
16
- }
17
- }
18
- export declare const toggleList: RawCommands['toggleList'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ toggleList: {
6
+ /**
7
+ * Toggle between different list types.
8
+ * @param listTypeOrName The type or name of the list.
9
+ * @param itemTypeOrName The type or name of the list item.
10
+ * @param keepMarks Keep marks when toggling.
11
+ * @param attributes Attributes for the new list.
12
+ * @example editor.commands.toggleList('bulletList', 'listItem')
13
+ */
14
+ toggleList: (listTypeOrName: string | NodeType, itemTypeOrName: string | NodeType, keepMarks?: boolean, attributes?: Record<string, any>) => ReturnType;
15
+ };
16
+ }
17
+ }
18
+ export declare const toggleList: RawCommands['toggleList'];
@@ -1,30 +1,30 @@
1
- import { MarkType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- toggleMark: {
6
- /**
7
- * Toggle a mark on and off.
8
- * @param typeOrName The mark type or name.
9
- * @param attributes The attributes of the mark.
10
- * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.
11
- * @example editor.commands.toggleMark('bold')
12
- */
13
- toggleMark: (
14
- /**
15
- * The mark type or name.
16
- */
17
- typeOrName: string | MarkType,
18
- /**
19
- * The attributes of the mark.
20
- */
21
- attributes?: Record<string, any>, options?: {
22
- /**
23
- * Removes the mark even across the current selection. Defaults to `false`.
24
- */
25
- extendEmptyMarkRange?: boolean;
26
- }) => ReturnType;
27
- };
28
- }
29
- }
30
- export declare const toggleMark: RawCommands['toggleMark'];
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ toggleMark: {
6
+ /**
7
+ * Toggle a mark on and off.
8
+ * @param typeOrName The mark type or name.
9
+ * @param attributes The attributes of the mark.
10
+ * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.
11
+ * @example editor.commands.toggleMark('bold')
12
+ */
13
+ toggleMark: (
14
+ /**
15
+ * The mark type or name.
16
+ */
17
+ typeOrName: string | MarkType,
18
+ /**
19
+ * The attributes of the mark.
20
+ */
21
+ attributes?: Record<string, any>, options?: {
22
+ /**
23
+ * Removes the mark even across the current selection. Defaults to `false`.
24
+ */
25
+ extendEmptyMarkRange?: boolean;
26
+ }) => ReturnType;
27
+ };
28
+ }
29
+ }
30
+ export declare const toggleMark: RawCommands['toggleMark'];
@@ -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
- toggleNode: {
6
- /**
7
- * Toggle a node with another node.
8
- * @param typeOrName The type or name of the node.
9
- * @param toggleTypeOrName The type or name of the node to toggle.
10
- * @param attributes The attributes of the node.
11
- * @example editor.commands.toggleNode('heading', 'paragraph')
12
- */
13
- toggleNode: (typeOrName: string | NodeType, toggleTypeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
14
- };
15
- }
16
- }
17
- export declare const toggleNode: RawCommands['toggleNode'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ toggleNode: {
6
+ /**
7
+ * Toggle a node with another node.
8
+ * @param typeOrName The type or name of the node.
9
+ * @param toggleTypeOrName The type or name of the node to toggle.
10
+ * @param attributes The attributes of the node.
11
+ * @example editor.commands.toggleNode('heading', 'paragraph')
12
+ */
13
+ toggleNode: (typeOrName: string | NodeType, toggleTypeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
14
+ };
15
+ }
16
+ }
17
+ export declare const toggleNode: RawCommands['toggleNode'];
@@ -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
- toggleWrap: {
6
- /**
7
- * Wraps nodes in another node, or removes an existing wrap.
8
- * @param typeOrName The type or name of the node.
9
- * @param attributes The attributes of the node.
10
- * @example editor.commands.toggleWrap('blockquote')
11
- */
12
- toggleWrap: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
- };
14
- }
15
- }
16
- export declare const toggleWrap: RawCommands['toggleWrap'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ toggleWrap: {
6
+ /**
7
+ * Wraps nodes in another node, or removes an existing wrap.
8
+ * @param typeOrName The type or name of the node.
9
+ * @param attributes The attributes of the node.
10
+ * @example editor.commands.toggleWrap('blockquote')
11
+ */
12
+ toggleWrap: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
+ };
14
+ }
15
+ }
16
+ export declare const toggleWrap: RawCommands['toggleWrap'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- undoInputRule: {
5
- /**
6
- * Undo an input rule.
7
- * @example editor.commands.undoInputRule()
8
- */
9
- undoInputRule: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const undoInputRule: RawCommands['undoInputRule'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ undoInputRule: {
5
+ /**
6
+ * Undo an input rule.
7
+ * @example editor.commands.undoInputRule()
8
+ */
9
+ undoInputRule: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const undoInputRule: RawCommands['undoInputRule'];
@@ -1,13 +1,13 @@
1
- import { RawCommands } from '../types.js';
2
- declare module '@tiptap/core' {
3
- interface Commands<ReturnType> {
4
- unsetAllMarks: {
5
- /**
6
- * Remove all marks in the current selection.
7
- * @example editor.commands.unsetAllMarks()
8
- */
9
- unsetAllMarks: () => ReturnType;
10
- };
11
- }
12
- }
13
- export declare const unsetAllMarks: RawCommands['unsetAllMarks'];
1
+ import { RawCommands } from '../types.js';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ unsetAllMarks: {
5
+ /**
6
+ * Remove all marks in the current selection.
7
+ * @example editor.commands.unsetAllMarks()
8
+ */
9
+ unsetAllMarks: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const unsetAllMarks: RawCommands['unsetAllMarks'];
@@ -1,25 +1,25 @@
1
- import { MarkType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- unsetMark: {
6
- /**
7
- * Remove all marks in the current selection.
8
- * @param typeOrName The mark type or name.
9
- * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.
10
- * @example editor.commands.unsetMark('bold')
11
- */
12
- unsetMark: (
13
- /**
14
- * The mark type or name.
15
- */
16
- typeOrName: string | MarkType, options?: {
17
- /**
18
- * Removes the mark even across the current selection. Defaults to `false`.
19
- */
20
- extendEmptyMarkRange?: boolean;
21
- }) => ReturnType;
22
- };
23
- }
24
- }
25
- export declare const unsetMark: RawCommands['unsetMark'];
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ unsetMark: {
6
+ /**
7
+ * Remove all marks in the current selection.
8
+ * @param typeOrName The mark type or name.
9
+ * @param options.extendEmptyMarkRange Removes the mark even across the current selection. Defaults to `false`.
10
+ * @example editor.commands.unsetMark('bold')
11
+ */
12
+ unsetMark: (
13
+ /**
14
+ * The mark type or name.
15
+ */
16
+ typeOrName: string | MarkType, options?: {
17
+ /**
18
+ * Removes the mark even across the current selection. Defaults to `false`.
19
+ */
20
+ extendEmptyMarkRange?: boolean;
21
+ }) => ReturnType;
22
+ };
23
+ }
24
+ }
25
+ export declare const unsetMark: RawCommands['unsetMark'];
@@ -1,24 +1,24 @@
1
- import { MarkType, NodeType } from '@tiptap/pm/model';
2
- import { RawCommands } from '../types.js';
3
- declare module '@tiptap/core' {
4
- interface Commands<ReturnType> {
5
- updateAttributes: {
6
- /**
7
- * Update attributes of a node or mark.
8
- * @param typeOrName The type or name of the node or mark.
9
- * @param attributes The attributes of the node or mark.
10
- * @example editor.commands.updateAttributes('mention', { userId: "2" })
11
- */
12
- updateAttributes: (
13
- /**
14
- * The type or name of the node or mark.
15
- */
16
- typeOrName: string | NodeType | MarkType,
17
- /**
18
- * The attributes of the node or mark.
19
- */
20
- attributes: Record<string, any>) => ReturnType;
21
- };
22
- }
23
- }
24
- export declare const updateAttributes: RawCommands['updateAttributes'];
1
+ import { MarkType, NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ updateAttributes: {
6
+ /**
7
+ * Update attributes of a node or mark.
8
+ * @param typeOrName The type or name of the node or mark.
9
+ * @param attributes The attributes of the node or mark.
10
+ * @example editor.commands.updateAttributes('mention', { userId: "2" })
11
+ */
12
+ updateAttributes: (
13
+ /**
14
+ * The type or name of the node or mark.
15
+ */
16
+ typeOrName: string | NodeType | MarkType,
17
+ /**
18
+ * The attributes of the node or mark.
19
+ */
20
+ attributes: Record<string, any>) => ReturnType;
21
+ };
22
+ }
23
+ }
24
+ export declare const updateAttributes: RawCommands['updateAttributes'];
@@ -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
- wrapIn: {
6
- /**
7
- * Wraps nodes in another node.
8
- * @param typeOrName The type or name of the node.
9
- * @param attributes The attributes of the node.
10
- * @example editor.commands.wrapIn('blockquote')
11
- */
12
- wrapIn: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
- };
14
- }
15
- }
16
- export declare const wrapIn: RawCommands['wrapIn'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ wrapIn: {
6
+ /**
7
+ * Wraps nodes in another node.
8
+ * @param typeOrName The type or name of the node.
9
+ * @param attributes The attributes of the node.
10
+ * @example editor.commands.wrapIn('blockquote')
11
+ */
12
+ wrapIn: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
+ };
14
+ }
15
+ }
16
+ export declare const wrapIn: RawCommands['wrapIn'];
@@ -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
- wrapInList: {
6
- /**
7
- * Wrap a node in a list.
8
- * @param typeOrName The type or name of the node.
9
- * @param attributes The attributes of the node.
10
- * @example editor.commands.wrapInList('bulletList')
11
- */
12
- wrapInList: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
- };
14
- }
15
- }
16
- export declare const wrapInList: RawCommands['wrapInList'];
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { RawCommands } from '../types.js';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ wrapInList: {
6
+ /**
7
+ * Wrap a node in a list.
8
+ * @param typeOrName The type or name of the node.
9
+ * @param attributes The attributes of the node.
10
+ * @example editor.commands.wrapInList('bulletList')
11
+ */
12
+ wrapInList: (typeOrName: string | NodeType, attributes?: Record<string, any>) => ReturnType;
13
+ };
14
+ }
15
+ }
16
+ export declare const wrapInList: RawCommands['wrapInList'];
@@ -1,5 +1,5 @@
1
- import { Extension } from '../Extension.js';
2
- export declare type ClipboardTextSerializerOptions = {
3
- blockSeparator?: string;
4
- };
5
- export declare const ClipboardTextSerializer: Extension<ClipboardTextSerializerOptions, any>;
1
+ import { Extension } from '../Extension.js';
2
+ export type ClipboardTextSerializerOptions = {
3
+ blockSeparator?: string;
4
+ };
5
+ export declare const ClipboardTextSerializer: Extension<ClipboardTextSerializerOptions, any>;
@@ -1,3 +1,3 @@
1
- import { Extension } from '../Extension.js';
2
- export * from '../commands/index.js';
3
- export declare const Commands: Extension<any, any>;
1
+ import { Extension } from '../Extension.js';
2
+ export * from '../commands/index.js';
3
+ export declare const Commands: Extension<any, any>;
@@ -1,2 +1,2 @@
1
- import { Extension } from '../Extension.js';
2
- export declare const Editable: Extension<any, any>;
1
+ import { Extension } from '../Extension.js';
2
+ export declare const Editable: Extension<any, any>;
@@ -1,2 +1,2 @@
1
- import { Extension } from '../Extension.js';
2
- export declare const FocusEvents: Extension<any, any>;
1
+ import { Extension } from '../Extension.js';
2
+ export declare const FocusEvents: Extension<any, any>;
@@ -1,6 +1,6 @@
1
- export { ClipboardTextSerializer } from './clipboardTextSerializer.js';
2
- export { Commands } from './commands.js';
3
- export { Editable } from './editable.js';
4
- export { FocusEvents } from './focusEvents.js';
5
- export { Keymap } from './keymap.js';
6
- export { Tabindex } from './tabindex.js';
1
+ export { ClipboardTextSerializer } from './clipboardTextSerializer.js';
2
+ export { Commands } from './commands.js';
3
+ export { Editable } from './editable.js';
4
+ export { FocusEvents } from './focusEvents.js';
5
+ export { Keymap } from './keymap.js';
6
+ export { Tabindex } from './tabindex.js';
@@ -1,2 +1,2 @@
1
- import { Extension } from '../Extension.js';
2
- export declare const Keymap: Extension<any, any>;
1
+ import { Extension } from '../Extension.js';
2
+ export declare const Keymap: Extension<any, any>;
@@ -1,2 +1,2 @@
1
- import { Extension } from '../Extension.js';
2
- export declare const Tabindex: Extension<any, any>;
1
+ import { Extension } from '../Extension.js';
2
+ export declare const Tabindex: Extension<any, any>;
@@ -1,10 +1,10 @@
1
- import { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
- import { Transaction } from '@tiptap/pm/state';
3
- import { Transform } from '@tiptap/pm/transform';
4
- /**
5
- * Returns a new `Transform` based on all steps of the passed transactions.
6
- * @param oldDoc The Prosemirror node to start from
7
- * @param transactions The transactions to combine
8
- * @returns A new `Transform` with all steps of the passed transactions
9
- */
10
- export declare function combineTransactionSteps(oldDoc: ProseMirrorNode, transactions: Transaction[]): Transform;
1
+ import { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
+ import { Transaction } from '@tiptap/pm/state';
3
+ import { Transform } from '@tiptap/pm/transform';
4
+ /**
5
+ * Returns a new `Transform` based on all steps of the passed transactions.
6
+ * @param oldDoc The Prosemirror node to start from
7
+ * @param transactions The transactions to combine
8
+ * @returns A new `Transform` with all steps of the passed transactions
9
+ */
10
+ export declare function combineTransactionSteps(oldDoc: ProseMirrorNode, transactions: Transaction[]): Transform;
@@ -1,10 +1,10 @@
1
- import { EditorState, Transaction } from '@tiptap/pm/state';
2
- /**
3
- * Takes a Transaction & Editor State and turns it into a chainable state object
4
- * @param config The transaction and state to create the chainable state from
5
- * @returns A chainable Editor state object
6
- */
7
- export declare function createChainableState(config: {
8
- transaction: Transaction;
9
- state: EditorState;
10
- }): EditorState;
1
+ import { EditorState, Transaction } from '@tiptap/pm/state';
2
+ /**
3
+ * Takes a Transaction & Editor State and turns it into a chainable state object
4
+ * @param config The transaction and state to create the chainable state from
5
+ * @returns A chainable Editor state object
6
+ */
7
+ export declare function createChainableState(config: {
8
+ transaction: Transaction;
9
+ state: EditorState;
10
+ }): EditorState;
@@ -1,12 +1,12 @@
1
- import { Node as ProseMirrorNode, ParseOptions, Schema } from '@tiptap/pm/model';
2
- import { Content } from '../types.js';
3
- /**
4
- * Create a new Prosemirror document node from content.
5
- * @param content The JSON or HTML content to create the document from
6
- * @param schema The Prosemirror schema to use for the document
7
- * @param parseOptions Options for the parser
8
- * @returns The created Prosemirror document node
9
- */
10
- export declare function createDocument(content: Content, schema: Schema, parseOptions?: ParseOptions, options?: {
11
- errorOnInvalidContent?: boolean;
12
- }): ProseMirrorNode;
1
+ import { Node as ProseMirrorNode, ParseOptions, Schema } from '@tiptap/pm/model';
2
+ import { Content } from '../types.js';
3
+ /**
4
+ * Create a new Prosemirror document node from content.
5
+ * @param content The JSON or HTML content to create the document from
6
+ * @param schema The Prosemirror schema to use for the document
7
+ * @param parseOptions Options for the parser
8
+ * @returns The created Prosemirror document node
9
+ */
10
+ export declare function createDocument(content: Content, schema: Schema, parseOptions?: ParseOptions, options?: {
11
+ errorOnInvalidContent?: boolean;
12
+ }): ProseMirrorNode;