@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,50 +1,50 @@
1
- export * from './combineTransactionSteps.js';
2
- export * from './createChainableState.js';
3
- export * from './createDocument.js';
4
- export * from './createNodeFromContent.js';
5
- export * from './defaultBlockAt.js';
6
- export * from './findChildren.js';
7
- export * from './findChildrenInRange.js';
8
- export * from './findParentNode.js';
9
- export * from './findParentNodeClosestToPos.js';
10
- export * from './generateHTML.js';
11
- export * from './generateJSON.js';
12
- export * from './generateText.js';
13
- export * from './getAttributes.js';
14
- export * from './getAttributesFromExtensions.js';
15
- export * from './getChangedRanges.js';
16
- export * from './getDebugJSON.js';
17
- export * from './getExtensionField.js';
18
- export * from './getHTMLFromFragment.js';
19
- export * from './getMarkAttributes.js';
20
- export * from './getMarkRange.js';
21
- export * from './getMarksBetween.js';
22
- export * from './getMarkType.js';
23
- export * from './getNodeAtPosition.js';
24
- export * from './getNodeAttributes.js';
25
- export * from './getNodeType.js';
26
- export * from './getRenderedAttributes.js';
27
- export * from './getSchema.js';
28
- export * from './getSchemaByResolvedExtensions.js';
29
- export * from './getSchemaTypeByName.js';
30
- export * from './getSchemaTypeNameByName.js';
31
- export * from './getSplittedAttributes.js';
32
- export * from './getText.js';
33
- export * from './getTextBetween.js';
34
- export * from './getTextContentFromNodes.js';
35
- export * from './getTextSerializersFromSchema.js';
36
- export * from './injectExtensionAttributesToParseRule.js';
37
- export * from './isActive.js';
38
- export * from './isAtEndOfNode.js';
39
- export * from './isAtStartOfNode.js';
40
- export * from './isExtensionRulesEnabled.js';
41
- export * from './isList.js';
42
- export * from './isMarkActive.js';
43
- export * from './isNodeActive.js';
44
- export * from './isNodeEmpty.js';
45
- export * from './isNodeSelection.js';
46
- export * from './isTextSelection.js';
47
- export * from './posToDOMRect.js';
48
- export * from './resolveFocusPosition.js';
49
- export * from './selectionToInsertionEnd.js';
50
- export * from './splitExtensions.js';
1
+ export * from './combineTransactionSteps.js';
2
+ export * from './createChainableState.js';
3
+ export * from './createDocument.js';
4
+ export * from './createNodeFromContent.js';
5
+ export * from './defaultBlockAt.js';
6
+ export * from './findChildren.js';
7
+ export * from './findChildrenInRange.js';
8
+ export * from './findParentNode.js';
9
+ export * from './findParentNodeClosestToPos.js';
10
+ export * from './generateHTML.js';
11
+ export * from './generateJSON.js';
12
+ export * from './generateText.js';
13
+ export * from './getAttributes.js';
14
+ export * from './getAttributesFromExtensions.js';
15
+ export * from './getChangedRanges.js';
16
+ export * from './getDebugJSON.js';
17
+ export * from './getExtensionField.js';
18
+ export * from './getHTMLFromFragment.js';
19
+ export * from './getMarkAttributes.js';
20
+ export * from './getMarkRange.js';
21
+ export * from './getMarksBetween.js';
22
+ export * from './getMarkType.js';
23
+ export * from './getNodeAtPosition.js';
24
+ export * from './getNodeAttributes.js';
25
+ export * from './getNodeType.js';
26
+ export * from './getRenderedAttributes.js';
27
+ export * from './getSchema.js';
28
+ export * from './getSchemaByResolvedExtensions.js';
29
+ export * from './getSchemaTypeByName.js';
30
+ export * from './getSchemaTypeNameByName.js';
31
+ export * from './getSplittedAttributes.js';
32
+ export * from './getText.js';
33
+ export * from './getTextBetween.js';
34
+ export * from './getTextContentFromNodes.js';
35
+ export * from './getTextSerializersFromSchema.js';
36
+ export * from './injectExtensionAttributesToParseRule.js';
37
+ export * from './isActive.js';
38
+ export * from './isAtEndOfNode.js';
39
+ export * from './isAtStartOfNode.js';
40
+ export * from './isExtensionRulesEnabled.js';
41
+ export * from './isList.js';
42
+ export * from './isMarkActive.js';
43
+ export * from './isNodeActive.js';
44
+ export * from './isNodeEmpty.js';
45
+ export * from './isNodeSelection.js';
46
+ export * from './isTextSelection.js';
47
+ export * from './posToDOMRect.js';
48
+ export * from './resolveFocusPosition.js';
49
+ export * from './selectionToInsertionEnd.js';
50
+ export * from './splitExtensions.js';
@@ -1,9 +1,9 @@
1
- import { ParseRule } from '@tiptap/pm/model';
2
- import { ExtensionAttribute } from '../types.js';
3
- /**
4
- * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).
5
- * Cancels when `getAttrs` returned `false`.
6
- * @param parseRule ProseMirror ParseRule
7
- * @param extensionAttributes List of attributes to inject
8
- */
9
- export declare function injectExtensionAttributesToParseRule(parseRule: ParseRule, extensionAttributes: ExtensionAttribute[]): ParseRule;
1
+ import { ParseRule } from '@tiptap/pm/model';
2
+ import { ExtensionAttribute } from '../types.js';
3
+ /**
4
+ * This function merges extension attributes into parserule attributes (`attrs` or `getAttrs`).
5
+ * Cancels when `getAttrs` returned `false`.
6
+ * @param parseRule ProseMirror ParseRule
7
+ * @param extensionAttributes List of attributes to inject
8
+ */
9
+ export declare function injectExtensionAttributesToParseRule(parseRule: ParseRule, extensionAttributes: ExtensionAttribute[]): ParseRule;
@@ -1,2 +1,2 @@
1
- import { EditorState } from '@tiptap/pm/state';
2
- export declare function isActive(state: EditorState, name: string | null, attributes?: Record<string, any>): boolean;
1
+ import { EditorState } from '@tiptap/pm/state';
2
+ export declare function isActive(state: EditorState, name: string | null, attributes?: Record<string, any>): boolean;
@@ -1,2 +1,2 @@
1
- import { EditorState } from '@tiptap/pm/state';
2
- export declare const isAtEndOfNode: (state: EditorState, nodeType?: string) => boolean;
1
+ import { EditorState } from '@tiptap/pm/state';
2
+ export declare const isAtEndOfNode: (state: EditorState, nodeType?: string) => boolean;
@@ -1,2 +1,2 @@
1
- import { EditorState } from '@tiptap/pm/state';
2
- export declare const isAtStartOfNode: (state: EditorState) => boolean;
1
+ import { EditorState } from '@tiptap/pm/state';
2
+ export declare const isAtStartOfNode: (state: EditorState) => boolean;
@@ -1,2 +1,2 @@
1
- import { AnyExtension, EnableRules } from '../types.js';
2
- export declare function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean;
1
+ import { AnyExtension, EnableRules } from '../types.js';
2
+ export declare function isExtensionRulesEnabled(extension: AnyExtension, enabled: EnableRules): boolean;
@@ -1,2 +1,2 @@
1
- import { Extensions } from '../types.js';
2
- export declare function isList(name: string, extensions: Extensions): boolean;
1
+ import { Extensions } from '../types.js';
2
+ export declare function isList(name: string, extensions: Extensions): boolean;
@@ -1,3 +1,3 @@
1
- import { MarkType } from '@tiptap/pm/model';
2
- import { EditorState } from '@tiptap/pm/state';
3
- export declare function isMarkActive(state: EditorState, typeOrName: MarkType | string | null, attributes?: Record<string, any>): boolean;
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { EditorState } from '@tiptap/pm/state';
3
+ export declare function isMarkActive(state: EditorState, typeOrName: MarkType | string | null, attributes?: Record<string, any>): boolean;
@@ -1,3 +1,3 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { EditorState } from '@tiptap/pm/state';
3
- export declare function isNodeActive(state: EditorState, typeOrName: NodeType | string | null, attributes?: Record<string, any>): boolean;
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { EditorState } from '@tiptap/pm/state';
3
+ export declare function isNodeActive(state: EditorState, typeOrName: NodeType | string | null, attributes?: Record<string, any>): boolean;
@@ -1,2 +1,2 @@
1
- import { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
- export declare function isNodeEmpty(node: ProseMirrorNode): boolean;
1
+ import { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
+ export declare function isNodeEmpty(node: ProseMirrorNode): boolean;
@@ -1,2 +1,2 @@
1
- import { NodeSelection } from '@tiptap/pm/state';
2
- export declare function isNodeSelection(value: unknown): value is NodeSelection;
1
+ import { NodeSelection } from '@tiptap/pm/state';
2
+ export declare function isNodeSelection(value: unknown): value is NodeSelection;
@@ -1,2 +1,2 @@
1
- import { TextSelection } from '@tiptap/pm/state';
2
- export declare function isTextSelection(value: unknown): value is TextSelection;
1
+ import { TextSelection } from '@tiptap/pm/state';
2
+ export declare function isTextSelection(value: unknown): value is TextSelection;
@@ -1,2 +1,2 @@
1
- import { EditorView } from '@tiptap/pm/view';
2
- export declare function posToDOMRect(view: EditorView, from: number, to: number): DOMRect;
1
+ import { EditorView } from '@tiptap/pm/view';
2
+ export declare function posToDOMRect(view: EditorView, from: number, to: number): DOMRect;
@@ -1,4 +1,4 @@
1
- import { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
- import { Selection } from '@tiptap/pm/state';
3
- import { FocusPosition } from '../types.js';
4
- export declare function resolveFocusPosition(doc: ProseMirrorNode, position?: FocusPosition): Selection | null;
1
+ import { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
+ import { Selection } from '@tiptap/pm/state';
3
+ import { FocusPosition } from '../types.js';
4
+ export declare function resolveFocusPosition(doc: ProseMirrorNode, position?: FocusPosition): Selection | null;
@@ -1,2 +1,2 @@
1
- import { Transaction } from '@tiptap/pm/state';
2
- export declare function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number): void;
1
+ import { Transaction } from '@tiptap/pm/state';
2
+ export declare function selectionToInsertionEnd(tr: Transaction, startLen: number, bias: number): void;
@@ -1,9 +1,9 @@
1
- import { Extension } from '../Extension.js';
2
- import { Mark } from '../Mark.js';
3
- import { Node } from '../Node.js';
4
- import { Extensions } from '../types.js';
5
- export declare function splitExtensions(extensions: Extensions): {
6
- baseExtensions: Extension<any, any>[];
7
- nodeExtensions: Node<any, any>[];
8
- markExtensions: Mark<any, any>[];
9
- };
1
+ import { Extension } from '../Extension.js';
2
+ import { Mark } from '../Mark.js';
3
+ import { Node } from '../Node.js';
4
+ import { Extensions } from '../types.js';
5
+ export declare function splitExtensions(extensions: Extensions): {
6
+ baseExtensions: Extension<any, any>[];
7
+ nodeExtensions: Node<any, any>[];
8
+ markExtensions: Mark<any, any>[];
9
+ };
@@ -1,24 +1,24 @@
1
- export * from './CommandManager.js';
2
- export * from './Editor.js';
3
- export * from './Extension.js';
4
- export * as extensions from './extensions/index.js';
5
- export * from './helpers/index.js';
6
- export * from './InputRule.js';
7
- export * from './inputRules/index.js';
8
- export * from './Mark.js';
9
- export * from './Node.js';
10
- export * from './NodePos.js';
11
- export * from './NodeView.js';
12
- export * from './PasteRule.js';
13
- export * from './pasteRules/index.js';
14
- export * from './Tracker.js';
15
- export * from './types.js';
16
- export * from './utilities/index.js';
17
- export interface Commands<ReturnType = any> {
18
- }
19
- export interface ExtensionConfig<Options = any, Storage = any> {
20
- }
21
- export interface NodeConfig<Options = any, Storage = any> {
22
- }
23
- export interface MarkConfig<Options = any, Storage = any> {
24
- }
1
+ export * from './CommandManager.js';
2
+ export * from './Editor.js';
3
+ export * from './Extension.js';
4
+ export * as extensions from './extensions/index.js';
5
+ export * from './helpers/index.js';
6
+ export * from './InputRule.js';
7
+ export * from './inputRules/index.js';
8
+ export * from './Mark.js';
9
+ export * from './Node.js';
10
+ export * from './NodePos.js';
11
+ export * from './NodeView.js';
12
+ export * from './PasteRule.js';
13
+ export * from './pasteRules/index.js';
14
+ export * from './Tracker.js';
15
+ export * from './types.js';
16
+ export * from './utilities/index.js';
17
+ export interface Commands<ReturnType = any> {
18
+ }
19
+ export interface ExtensionConfig<Options = any, Storage = any> {
20
+ }
21
+ export interface NodeConfig<Options = any, Storage = any> {
22
+ }
23
+ export interface MarkConfig<Options = any, Storage = any> {
24
+ }
@@ -1,5 +1,5 @@
1
- export * from './markInputRule.js';
2
- export * from './nodeInputRule.js';
3
- export * from './textblockTypeInputRule.js';
4
- export * from './textInputRule.js';
5
- export * from './wrappingInputRule.js';
1
+ export * from './markInputRule.js';
2
+ export * from './nodeInputRule.js';
3
+ export * from './textblockTypeInputRule.js';
4
+ export * from './textInputRule.js';
5
+ export * from './wrappingInputRule.js';
@@ -1,13 +1,13 @@
1
- import { MarkType } from '@tiptap/pm/model';
2
- import { InputRule, InputRuleFinder } from '../InputRule.js';
3
- import { ExtendedRegExpMatchArray } from '../types.js';
4
- /**
5
- * Build an input rule that adds a mark when the
6
- * matched text is typed into it.
7
- * @see https://tiptap.dev/guide/custom-extensions/#input-rules
8
- */
9
- export declare function markInputRule(config: {
10
- find: InputRuleFinder;
11
- type: MarkType;
12
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
13
- }): InputRule;
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { InputRule, InputRuleFinder } from '../InputRule.js';
3
+ import { ExtendedRegExpMatchArray } from '../types.js';
4
+ /**
5
+ * Build an input rule that adds a mark when the
6
+ * matched text is typed into it.
7
+ * @see https://tiptap.dev/guide/custom-extensions/#input-rules
8
+ */
9
+ export declare function markInputRule(config: {
10
+ find: InputRuleFinder;
11
+ type: MarkType;
12
+ getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
13
+ }): InputRule;
@@ -1,23 +1,23 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { InputRule, InputRuleFinder } from '../InputRule.js';
3
- import { ExtendedRegExpMatchArray } from '../types.js';
4
- /**
5
- * Build an input rule that adds a node when the
6
- * matched text is typed into it.
7
- * @see https://tiptap.dev/guide/custom-extensions/#input-rules
8
- */
9
- export declare function nodeInputRule(config: {
10
- /**
11
- * The regex to match.
12
- */
13
- find: InputRuleFinder;
14
- /**
15
- * The node type to add.
16
- */
17
- type: NodeType;
18
- /**
19
- * A function that returns the attributes for the node
20
- * can also be an object of attributes
21
- */
22
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
23
- }): InputRule;
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { InputRule, InputRuleFinder } from '../InputRule.js';
3
+ import { ExtendedRegExpMatchArray } from '../types.js';
4
+ /**
5
+ * Build an input rule that adds a node when the
6
+ * matched text is typed into it.
7
+ * @see https://tiptap.dev/guide/custom-extensions/#input-rules
8
+ */
9
+ export declare function nodeInputRule(config: {
10
+ /**
11
+ * The regex to match.
12
+ */
13
+ find: InputRuleFinder;
14
+ /**
15
+ * The node type to add.
16
+ */
17
+ type: NodeType;
18
+ /**
19
+ * A function that returns the attributes for the node
20
+ * can also be an object of attributes
21
+ */
22
+ getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
23
+ }): InputRule;
@@ -1,10 +1,10 @@
1
- import { InputRule, InputRuleFinder } from '../InputRule.js';
2
- /**
3
- * Build an input rule that replaces text when the
4
- * matched text is typed into it.
5
- * @see https://tiptap.dev/guide/custom-extensions/#input-rules
6
- */
7
- export declare function textInputRule(config: {
8
- find: InputRuleFinder;
9
- replace: string;
10
- }): InputRule;
1
+ import { InputRule, InputRuleFinder } from '../InputRule.js';
2
+ /**
3
+ * Build an input rule that replaces text when the
4
+ * matched text is typed into it.
5
+ * @see https://tiptap.dev/guide/custom-extensions/#input-rules
6
+ */
7
+ export declare function textInputRule(config: {
8
+ find: InputRuleFinder;
9
+ replace: string;
10
+ }): InputRule;
@@ -1,15 +1,15 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { InputRule, InputRuleFinder } from '../InputRule.js';
3
- import { ExtendedRegExpMatchArray } from '../types.js';
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
- * @see https://tiptap.dev/guide/custom-extensions/#input-rules
10
- */
11
- export declare function textblockTypeInputRule(config: {
12
- find: InputRuleFinder;
13
- type: NodeType;
14
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
15
- }): InputRule;
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { InputRule, InputRuleFinder } from '../InputRule.js';
3
+ import { ExtendedRegExpMatchArray } from '../types.js';
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
+ * @see https://tiptap.dev/guide/custom-extensions/#input-rules
10
+ */
11
+ export declare function textblockTypeInputRule(config: {
12
+ find: InputRuleFinder;
13
+ type: NodeType;
14
+ getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
15
+ }): InputRule;
@@ -1,28 +1,28 @@
1
- import { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model';
2
- import { Editor } from '../Editor.js';
3
- import { InputRule, InputRuleFinder } from '../InputRule.js';
4
- import { ExtendedRegExpMatchArray } from '../types.js';
5
- /**
6
- * Build an input rule for automatically wrapping a textblock when a
7
- * given string is typed. When using a regular expresion you’ll
8
- * probably want the regexp to start with `^`, so that the pattern can
9
- * only occur at the start of a textblock.
10
- *
11
- * `type` is the type of node to wrap in.
12
- *
13
- * By default, if there’s a node with the same type above the newly
14
- * wrapped node, the rule will try to join those
15
- * two nodes. You can pass a join predicate, which takes a regular
16
- * expression match and the node before the wrapped node, and can
17
- * return a boolean to indicate whether a join should happen.
18
- * @see https://tiptap.dev/guide/custom-extensions/#input-rules
19
- */
20
- export declare function wrappingInputRule(config: {
21
- find: InputRuleFinder;
22
- type: NodeType;
23
- keepMarks?: boolean;
24
- keepAttributes?: boolean;
25
- editor?: Editor;
26
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
27
- joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean;
28
- }): InputRule;
1
+ import { Node as ProseMirrorNode, NodeType } from '@tiptap/pm/model';
2
+ import { Editor } from '../Editor.js';
3
+ import { InputRule, InputRuleFinder } from '../InputRule.js';
4
+ import { ExtendedRegExpMatchArray } from '../types.js';
5
+ /**
6
+ * Build an input rule for automatically wrapping a textblock when a
7
+ * given string is typed. When using a regular expresion you’ll
8
+ * probably want the regexp to start with `^`, so that the pattern can
9
+ * only occur at the start of a textblock.
10
+ *
11
+ * `type` is the type of node to wrap in.
12
+ *
13
+ * By default, if there’s a node with the same type above the newly
14
+ * wrapped node, the rule will try to join those
15
+ * two nodes. You can pass a join predicate, which takes a regular
16
+ * expression match and the node before the wrapped node, and can
17
+ * return a boolean to indicate whether a join should happen.
18
+ * @see https://tiptap.dev/guide/custom-extensions/#input-rules
19
+ */
20
+ export declare function wrappingInputRule(config: {
21
+ find: InputRuleFinder;
22
+ type: NodeType;
23
+ keepMarks?: boolean;
24
+ keepAttributes?: boolean;
25
+ editor?: Editor;
26
+ getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray) => Record<string, any>) | false | null;
27
+ joinPredicate?: (match: ExtendedRegExpMatchArray, node: ProseMirrorNode) => boolean;
28
+ }): InputRule;
@@ -1,3 +1,3 @@
1
- export * from './markPasteRule.js';
2
- export * from './nodePasteRule.js';
3
- export * from './textPasteRule.js';
1
+ export * from './markPasteRule.js';
2
+ export * from './nodePasteRule.js';
3
+ export * from './textPasteRule.js';
@@ -1,13 +1,13 @@
1
- import { MarkType } from '@tiptap/pm/model';
2
- import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
3
- import { ExtendedRegExpMatchArray } from '../types.js';
4
- /**
5
- * Build an paste rule that adds a mark when the
6
- * matched text is pasted into it.
7
- * @see https://tiptap.dev/guide/custom-extensions/#paste-rules
8
- */
9
- export declare function markPasteRule(config: {
10
- find: PasteRuleFinder;
11
- type: MarkType;
12
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null;
13
- }): PasteRule;
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
3
+ import { ExtendedRegExpMatchArray } from '../types.js';
4
+ /**
5
+ * Build an paste rule that adds a mark when the
6
+ * matched text is pasted into it.
7
+ * @see https://tiptap.dev/guide/custom-extensions/#paste-rules
8
+ */
9
+ export declare function markPasteRule(config: {
10
+ find: PasteRuleFinder;
11
+ type: MarkType;
12
+ getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null;
13
+ }): PasteRule;
@@ -1,13 +1,13 @@
1
- import { NodeType } from '@tiptap/pm/model';
2
- import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
3
- import { ExtendedRegExpMatchArray } from '../types.js';
4
- /**
5
- * Build an paste rule that adds a node when the
6
- * matched text is pasted into it.
7
- * @see https://tiptap.dev/guide/custom-extensions/#paste-rules
8
- */
9
- export declare function nodePasteRule(config: {
10
- find: PasteRuleFinder;
11
- type: NodeType;
12
- getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null;
13
- }): PasteRule;
1
+ import { NodeType } from '@tiptap/pm/model';
2
+ import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
3
+ import { ExtendedRegExpMatchArray } from '../types.js';
4
+ /**
5
+ * Build an paste rule that adds a node when the
6
+ * matched text is pasted into it.
7
+ * @see https://tiptap.dev/guide/custom-extensions/#paste-rules
8
+ */
9
+ export declare function nodePasteRule(config: {
10
+ find: PasteRuleFinder;
11
+ type: NodeType;
12
+ getAttributes?: Record<string, any> | ((match: ExtendedRegExpMatchArray, event: ClipboardEvent) => Record<string, any>) | false | null;
13
+ }): PasteRule;
@@ -1,10 +1,10 @@
1
- import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
2
- /**
3
- * Build an paste rule that replaces text when the
4
- * matched text is pasted into it.
5
- * @see https://tiptap.dev/guide/custom-extensions/#paste-rules
6
- */
7
- export declare function textPasteRule(config: {
8
- find: PasteRuleFinder;
9
- replace: string;
10
- }): PasteRule;
1
+ import { PasteRule, PasteRuleFinder } from '../PasteRule.js';
2
+ /**
3
+ * Build an paste rule that replaces text when the
4
+ * matched text is pasted into it.
5
+ * @see https://tiptap.dev/guide/custom-extensions/#paste-rules
6
+ */
7
+ export declare function textPasteRule(config: {
8
+ find: PasteRuleFinder;
9
+ replace: string;
10
+ }): PasteRule;
@@ -1 +1 @@
1
- export declare const style = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}";
1
+ export declare const style = ".ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable=\"false\"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable=\"false\"] [contenteditable=\"true\"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}";