@tiptap/starter-kit 3.0.0 → 3.0.1

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 (212) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +5 -1
  3. package/dist/index.cjs +123 -91
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/{packages/starter-kit/src/starter-kit.d.ts → index.d.cts} +32 -10
  6. package/dist/index.d.ts +136 -0
  7. package/dist/index.js +98 -88
  8. package/dist/index.js.map +1 -1
  9. package/package.json +33 -26
  10. package/src/starter-kit.ts +107 -55
  11. package/dist/index.umd.js +0 -81
  12. package/dist/index.umd.js.map +0 -1
  13. package/dist/packages/core/src/CommandManager.d.ts +0 -20
  14. package/dist/packages/core/src/Editor.d.ts +0 -161
  15. package/dist/packages/core/src/EventEmitter.d.ts +0 -11
  16. package/dist/packages/core/src/Extension.d.ts +0 -343
  17. package/dist/packages/core/src/ExtensionManager.d.ts +0 -55
  18. package/dist/packages/core/src/InputRule.d.ts +0 -42
  19. package/dist/packages/core/src/Mark.d.ts +0 -451
  20. package/dist/packages/core/src/Node.d.ts +0 -611
  21. package/dist/packages/core/src/NodePos.d.ts +0 -44
  22. package/dist/packages/core/src/NodeView.d.ts +0 -31
  23. package/dist/packages/core/src/PasteRule.d.ts +0 -50
  24. package/dist/packages/core/src/Tracker.d.ts +0 -11
  25. package/dist/packages/core/src/commands/blur.d.ts +0 -13
  26. package/dist/packages/core/src/commands/clearContent.d.ts +0 -14
  27. package/dist/packages/core/src/commands/clearNodes.d.ts +0 -13
  28. package/dist/packages/core/src/commands/command.d.ts +0 -18
  29. package/dist/packages/core/src/commands/createParagraphNear.d.ts +0 -13
  30. package/dist/packages/core/src/commands/cut.d.ts +0 -20
  31. package/dist/packages/core/src/commands/deleteCurrentNode.d.ts +0 -13
  32. package/dist/packages/core/src/commands/deleteNode.d.ts +0 -15
  33. package/dist/packages/core/src/commands/deleteRange.d.ts +0 -14
  34. package/dist/packages/core/src/commands/deleteSelection.d.ts +0 -13
  35. package/dist/packages/core/src/commands/enter.d.ts +0 -13
  36. package/dist/packages/core/src/commands/exitCode.d.ts +0 -13
  37. package/dist/packages/core/src/commands/extendMarkRange.d.ts +0 -25
  38. package/dist/packages/core/src/commands/first.d.ts +0 -14
  39. package/dist/packages/core/src/commands/focus.d.ts +0 -27
  40. package/dist/packages/core/src/commands/forEach.d.ts +0 -14
  41. package/dist/packages/core/src/commands/index.d.ts +0 -55
  42. package/dist/packages/core/src/commands/insertContent.d.ts +0 -34
  43. package/dist/packages/core/src/commands/insertContentAt.d.ts +0 -47
  44. package/dist/packages/core/src/commands/join.d.ts +0 -41
  45. package/dist/packages/core/src/commands/joinItemBackward.d.ts +0 -13
  46. package/dist/packages/core/src/commands/joinItemForward.d.ts +0 -13
  47. package/dist/packages/core/src/commands/joinTextblockBackward.d.ts +0 -12
  48. package/dist/packages/core/src/commands/joinTextblockForward.d.ts +0 -12
  49. package/dist/packages/core/src/commands/keyboardShortcut.d.ts +0 -14
  50. package/dist/packages/core/src/commands/lift.d.ts +0 -17
  51. package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +0 -13
  52. package/dist/packages/core/src/commands/liftListItem.d.ts +0 -15
  53. package/dist/packages/core/src/commands/newlineInCode.d.ts +0 -13
  54. package/dist/packages/core/src/commands/resetAttributes.d.ts +0 -16
  55. package/dist/packages/core/src/commands/scrollIntoView.d.ts +0 -13
  56. package/dist/packages/core/src/commands/selectAll.d.ts +0 -13
  57. package/dist/packages/core/src/commands/selectNodeBackward.d.ts +0 -13
  58. package/dist/packages/core/src/commands/selectNodeForward.d.ts +0 -13
  59. package/dist/packages/core/src/commands/selectParentNode.d.ts +0 -13
  60. package/dist/packages/core/src/commands/selectTextblockEnd.d.ts +0 -13
  61. package/dist/packages/core/src/commands/selectTextblockStart.d.ts +0 -13
  62. package/dist/packages/core/src/commands/setContent.d.ts +0 -40
  63. package/dist/packages/core/src/commands/setMark.d.ts +0 -15
  64. package/dist/packages/core/src/commands/setMeta.d.ts +0 -15
  65. package/dist/packages/core/src/commands/setNode.d.ts +0 -16
  66. package/dist/packages/core/src/commands/setNodeSelection.d.ts +0 -14
  67. package/dist/packages/core/src/commands/setTextSelection.d.ts +0 -14
  68. package/dist/packages/core/src/commands/sinkListItem.d.ts +0 -15
  69. package/dist/packages/core/src/commands/splitBlock.d.ts +0 -17
  70. package/dist/packages/core/src/commands/splitListItem.d.ts +0 -15
  71. package/dist/packages/core/src/commands/toggleList.d.ts +0 -18
  72. package/dist/packages/core/src/commands/toggleMark.d.ts +0 -30
  73. package/dist/packages/core/src/commands/toggleNode.d.ts +0 -17
  74. package/dist/packages/core/src/commands/toggleWrap.d.ts +0 -16
  75. package/dist/packages/core/src/commands/undoInputRule.d.ts +0 -13
  76. package/dist/packages/core/src/commands/unsetAllMarks.d.ts +0 -13
  77. package/dist/packages/core/src/commands/unsetMark.d.ts +0 -25
  78. package/dist/packages/core/src/commands/updateAttributes.d.ts +0 -24
  79. package/dist/packages/core/src/commands/wrapIn.d.ts +0 -16
  80. package/dist/packages/core/src/commands/wrapInList.d.ts +0 -16
  81. package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +0 -5
  82. package/dist/packages/core/src/extensions/commands.d.ts +0 -3
  83. package/dist/packages/core/src/extensions/editable.d.ts +0 -2
  84. package/dist/packages/core/src/extensions/focusEvents.d.ts +0 -2
  85. package/dist/packages/core/src/extensions/index.d.ts +0 -6
  86. package/dist/packages/core/src/extensions/keymap.d.ts +0 -2
  87. package/dist/packages/core/src/extensions/tabindex.d.ts +0 -2
  88. package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +0 -10
  89. package/dist/packages/core/src/helpers/createChainableState.d.ts +0 -10
  90. package/dist/packages/core/src/helpers/createDocument.d.ts +0 -12
  91. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -15
  92. package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +0 -7
  93. package/dist/packages/core/src/helpers/findChildren.d.ts +0 -9
  94. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -10
  95. package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -16
  96. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -17
  97. package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -8
  98. package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -8
  99. package/dist/packages/core/src/helpers/generateText.d.ts +0 -12
  100. package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -9
  101. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
  102. package/dist/packages/core/src/helpers/getChangedRanges.d.ts +0 -11
  103. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
  104. package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -9
  105. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
  106. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
  107. package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
  108. package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
  109. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
  110. package/dist/packages/core/src/helpers/getNodeAtPosition.d.ts +0 -11
  111. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
  112. package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
  113. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
  114. package/dist/packages/core/src/helpers/getSchema.d.ts +0 -4
  115. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -10
  116. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -8
  117. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -8
  118. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -9
  119. package/dist/packages/core/src/helpers/getText.d.ts +0 -15
  120. package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -14
  121. package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +0 -8
  122. package/dist/packages/core/src/helpers/getTextSerializersFromSchema.d.ts +0 -8
  123. package/dist/packages/core/src/helpers/index.d.ts +0 -50
  124. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
  125. package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
  126. package/dist/packages/core/src/helpers/isAtEndOfNode.d.ts +0 -2
  127. package/dist/packages/core/src/helpers/isAtStartOfNode.d.ts +0 -2
  128. package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +0 -2
  129. package/dist/packages/core/src/helpers/isList.d.ts +0 -2
  130. package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
  131. package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
  132. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -2
  133. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
  134. package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
  135. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
  136. package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +0 -4
  137. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
  138. package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
  139. package/dist/packages/core/src/index.d.ts +0 -24
  140. package/dist/packages/core/src/inputRules/index.d.ts +0 -5
  141. package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -13
  142. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -23
  143. package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -10
  144. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -15
  145. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -28
  146. package/dist/packages/core/src/pasteRules/index.d.ts +0 -3
  147. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -13
  148. package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +0 -13
  149. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -10
  150. package/dist/packages/core/src/style.d.ts +0 -1
  151. package/dist/packages/core/src/types.d.ts +0 -255
  152. package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
  153. package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
  154. package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
  155. package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
  156. package/dist/packages/core/src/utilities/escapeForRegEx.d.ts +0 -1
  157. package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
  158. package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
  159. package/dist/packages/core/src/utilities/index.d.ts +0 -20
  160. package/dist/packages/core/src/utilities/isAndroid.d.ts +0 -1
  161. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
  162. package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
  163. package/dist/packages/core/src/utilities/isMacOS.d.ts +0 -1
  164. package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
  165. package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
  166. package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
  167. package/dist/packages/core/src/utilities/isString.d.ts +0 -1
  168. package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
  169. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
  170. package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
  171. package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
  172. package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
  173. package/dist/packages/core/src/utilities/removeDuplicates.d.ts +0 -8
  174. package/dist/packages/extension-blockquote/src/blockquote.d.ts +0 -36
  175. package/dist/packages/extension-blockquote/src/index.d.ts +0 -3
  176. package/dist/packages/extension-bold/src/bold.d.ts +0 -48
  177. package/dist/packages/extension-bold/src/index.d.ts +0 -3
  178. package/dist/packages/extension-bullet-list/src/bullet-list.d.ts +0 -48
  179. package/dist/packages/extension-bullet-list/src/index.d.ts +0 -3
  180. package/dist/packages/extension-code/src/code.d.ts +0 -40
  181. package/dist/packages/extension-code/src/index.d.ts +0 -3
  182. package/dist/packages/extension-code-block/src/code-block.d.ts +0 -59
  183. package/dist/packages/extension-code-block/src/index.d.ts +0 -3
  184. package/dist/packages/extension-document/src/document.d.ts +0 -6
  185. package/dist/packages/extension-document/src/index.d.ts +0 -3
  186. package/dist/packages/extension-dropcursor/src/dropcursor.d.ts +0 -28
  187. package/dist/packages/extension-dropcursor/src/index.d.ts +0 -3
  188. package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +0 -22
  189. package/dist/packages/extension-gapcursor/src/index.d.ts +0 -3
  190. package/dist/packages/extension-hard-break/src/hard-break.d.ts +0 -31
  191. package/dist/packages/extension-hard-break/src/index.d.ts +0 -3
  192. package/dist/packages/extension-heading/src/heading.d.ts +0 -46
  193. package/dist/packages/extension-heading/src/index.d.ts +0 -3
  194. package/dist/packages/extension-history/src/history.d.ts +0 -41
  195. package/dist/packages/extension-history/src/index.d.ts +0 -3
  196. package/dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts +0 -25
  197. package/dist/packages/extension-horizontal-rule/src/index.d.ts +0 -3
  198. package/dist/packages/extension-italic/src/index.d.ts +0 -3
  199. package/dist/packages/extension-italic/src/italic.d.ts +0 -51
  200. package/dist/packages/extension-list-item/src/index.d.ts +0 -3
  201. package/dist/packages/extension-list-item/src/list-item.d.ts +0 -26
  202. package/dist/packages/extension-ordered-list/src/index.d.ts +0 -3
  203. package/dist/packages/extension-ordered-list/src/ordered-list.d.ts +0 -49
  204. package/dist/packages/extension-paragraph/src/index.d.ts +0 -3
  205. package/dist/packages/extension-paragraph/src/paragraph.d.ts +0 -25
  206. package/dist/packages/extension-strike/src/index.d.ts +0 -3
  207. package/dist/packages/extension-strike/src/strike.d.ts +0 -43
  208. package/dist/packages/extension-text/src/index.d.ts +0 -3
  209. package/dist/packages/extension-text/src/text.d.ts +0 -6
  210. package/dist/packages/extension-text-style/src/index.d.ts +0 -3
  211. package/dist/packages/extension-text-style/src/text-style.d.ts +0 -26
  212. package/dist/packages/starter-kit/src/index.d.ts +0 -4
@@ -1,3 +0,0 @@
1
- import { Dropcursor } from './dropcursor.js';
2
- export * from './dropcursor.js';
3
- export default Dropcursor;
@@ -1,22 +0,0 @@
1
- import { Extension, ParentConfig } from '@tiptap/core';
2
- declare module '@tiptap/core' {
3
- interface NodeConfig<Options, Storage> {
4
- /**
5
- * A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.
6
- * @default null
7
- */
8
- allowGapCursor?: boolean | null | ((this: {
9
- name: string;
10
- options: Options;
11
- storage: Storage;
12
- parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'];
13
- }) => boolean | null);
14
- }
15
- }
16
- /**
17
- * This extension allows you to add a gap cursor to your editor.
18
- * A gap cursor is a cursor that appears when you click on a place
19
- * where no content is present, for example inbetween nodes.
20
- * @see https://tiptap.dev/api/extensions/gapcursor
21
- */
22
- export declare const Gapcursor: Extension<any, any>;
@@ -1,3 +0,0 @@
1
- import { Gapcursor } from './gapcursor.js';
2
- export * from './gapcursor.js';
3
- export default Gapcursor;
@@ -1,31 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface HardBreakOptions {
3
- /**
4
- * Controls if marks should be kept after being split by a hard break.
5
- * @default true
6
- * @example false
7
- */
8
- keepMarks: boolean;
9
- /**
10
- * HTML attributes to add to the hard break element.
11
- * @default {}
12
- * @example { class: 'foo' }
13
- */
14
- HTMLAttributes: Record<string, any>;
15
- }
16
- declare module '@tiptap/core' {
17
- interface Commands<ReturnType> {
18
- hardBreak: {
19
- /**
20
- * Add a hard break
21
- * @example editor.commands.setHardBreak()
22
- */
23
- setHardBreak: () => ReturnType;
24
- };
25
- }
26
- }
27
- /**
28
- * This extension allows you to insert hard breaks.
29
- * @see https://www.tiptap.dev/api/nodes/hard-break
30
- */
31
- export declare const HardBreak: Node<HardBreakOptions, any>;
@@ -1,3 +0,0 @@
1
- import { HardBreak } from './hard-break.js';
2
- export * from './hard-break.js';
3
- export default HardBreak;
@@ -1,46 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- /**
3
- * The heading level options.
4
- */
5
- export type Level = 1 | 2 | 3 | 4 | 5 | 6;
6
- export interface HeadingOptions {
7
- /**
8
- * The available heading levels.
9
- * @default [1, 2, 3, 4, 5, 6]
10
- * @example [1, 2, 3]
11
- */
12
- levels: Level[];
13
- /**
14
- * The HTML attributes for a heading node.
15
- * @default {}
16
- * @example { class: 'foo' }
17
- */
18
- HTMLAttributes: Record<string, any>;
19
- }
20
- declare module '@tiptap/core' {
21
- interface Commands<ReturnType> {
22
- heading: {
23
- /**
24
- * Set a heading node
25
- * @param attributes The heading attributes
26
- * @example editor.commands.setHeading({ level: 1 })
27
- */
28
- setHeading: (attributes: {
29
- level: Level;
30
- }) => ReturnType;
31
- /**
32
- * Toggle a heading node
33
- * @param attributes The heading attributes
34
- * @example editor.commands.toggleHeading({ level: 1 })
35
- */
36
- toggleHeading: (attributes: {
37
- level: Level;
38
- }) => ReturnType;
39
- };
40
- }
41
- }
42
- /**
43
- * This extension allows you to create headings.
44
- * @see https://www.tiptap.dev/api/nodes/heading
45
- */
46
- export declare const Heading: Node<HeadingOptions, any>;
@@ -1,3 +0,0 @@
1
- import { Heading } from './heading.js';
2
- export * from './heading.js';
3
- export default Heading;
@@ -1,41 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- export interface HistoryOptions {
3
- /**
4
- * The amount of history events that are collected before the oldest events are discarded.
5
- * @default 100
6
- * @example 50
7
- */
8
- depth: number;
9
- /**
10
- * The delay (in milliseconds) between changes after which a new group should be started.
11
- * @default 500
12
- * @example 1000
13
- */
14
- newGroupDelay: number;
15
- }
16
- declare module '@tiptap/core' {
17
- interface Commands<ReturnType> {
18
- history: {
19
- /**
20
- * Undo recent changes
21
- * @example editor.commands.undo()
22
- */
23
- undo: () => ReturnType;
24
- /**
25
- * Reapply reverted changes
26
- * @example editor.commands.redo()
27
- */
28
- redo: () => ReturnType;
29
- };
30
- }
31
- }
32
- /**
33
- * This extension allows you to undo and redo recent changes.
34
- * @see https://www.tiptap.dev/api/extensions/history
35
- *
36
- * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove
37
- * the `history` extension, as it is not compatible with the `collaboration` extension.
38
- *
39
- * `@tiptap/extension-collaboration` uses its own history implementation.
40
- */
41
- export declare const History: Extension<HistoryOptions, any>;
@@ -1,3 +0,0 @@
1
- import { History } from './history.js';
2
- export * from './history.js';
3
- export default History;
@@ -1,25 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface HorizontalRuleOptions {
3
- /**
4
- * The HTML attributes for a horizontal rule node.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- }
10
- declare module '@tiptap/core' {
11
- interface Commands<ReturnType> {
12
- horizontalRule: {
13
- /**
14
- * Add a horizontal rule
15
- * @example editor.commands.setHorizontalRule()
16
- */
17
- setHorizontalRule: () => ReturnType;
18
- };
19
- }
20
- }
21
- /**
22
- * This extension allows you to insert horizontal rules.
23
- * @see https://www.tiptap.dev/api/nodes/horizontal-rule
24
- */
25
- export declare const HorizontalRule: Node<HorizontalRuleOptions, any>;
@@ -1,3 +0,0 @@
1
- import { HorizontalRule } from './horizontal-rule.js';
2
- export * from './horizontal-rule.js';
3
- export default HorizontalRule;
@@ -1,3 +0,0 @@
1
- import { Italic } from './italic.js';
2
- export * from './italic.js';
3
- export default Italic;
@@ -1,51 +0,0 @@
1
- import { Mark } from '@tiptap/core';
2
- export interface ItalicOptions {
3
- /**
4
- * HTML attributes to add to the italic element.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- }
10
- declare module '@tiptap/core' {
11
- interface Commands<ReturnType> {
12
- italic: {
13
- /**
14
- * Set an italic mark
15
- * @example editor.commands.setItalic()
16
- */
17
- setItalic: () => ReturnType;
18
- /**
19
- * Toggle an italic mark
20
- * @example editor.commands.toggleItalic()
21
- */
22
- toggleItalic: () => ReturnType;
23
- /**
24
- * Unset an italic mark
25
- * @example editor.commands.unsetItalic()
26
- */
27
- unsetItalic: () => ReturnType;
28
- };
29
- }
30
- }
31
- /**
32
- * Matches an italic to a *italic* on input.
33
- */
34
- export declare const starInputRegex: RegExp;
35
- /**
36
- * Matches an italic to a *italic* on paste.
37
- */
38
- export declare const starPasteRegex: RegExp;
39
- /**
40
- * Matches an italic to a _italic_ on input.
41
- */
42
- export declare const underscoreInputRegex: RegExp;
43
- /**
44
- * Matches an italic to a _italic_ on paste.
45
- */
46
- export declare const underscorePasteRegex: RegExp;
47
- /**
48
- * This extension allows you to create italic text.
49
- * @see https://www.tiptap.dev/api/marks/italic
50
- */
51
- export declare const Italic: Mark<ItalicOptions, any>;
@@ -1,3 +0,0 @@
1
- import { ListItem } from './list-item.js';
2
- export * from './list-item.js';
3
- export default ListItem;
@@ -1,26 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface ListItemOptions {
3
- /**
4
- * The HTML attributes for a list item node.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- /**
10
- * The node type for bulletList nodes
11
- * @default 'bulletList'
12
- * @example 'myCustomBulletList'
13
- */
14
- bulletListTypeName: string;
15
- /**
16
- * The node type for orderedList nodes
17
- * @default 'orderedList'
18
- * @example 'myCustomOrderedList'
19
- */
20
- orderedListTypeName: string;
21
- }
22
- /**
23
- * This extension allows you to create list items.
24
- * @see https://www.tiptap.dev/api/nodes/list-item
25
- */
26
- export declare const ListItem: Node<ListItemOptions, any>;
@@ -1,3 +0,0 @@
1
- import { OrderedList } from './ordered-list.js';
2
- export * from './ordered-list.js';
3
- export default OrderedList;
@@ -1,49 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface OrderedListOptions {
3
- /**
4
- * The node type name for list items.
5
- * @default 'listItem'
6
- * @example 'myListItem'
7
- */
8
- itemTypeName: string;
9
- /**
10
- * The HTML attributes for an ordered list node.
11
- * @default {}
12
- * @example { class: 'foo' }
13
- */
14
- HTMLAttributes: Record<string, any>;
15
- /**
16
- * Keep the marks when splitting a list item.
17
- * @default false
18
- * @example true
19
- */
20
- keepMarks: boolean;
21
- /**
22
- * Keep the attributes when splitting a list item.
23
- * @default false
24
- * @example true
25
- */
26
- keepAttributes: boolean;
27
- }
28
- declare module '@tiptap/core' {
29
- interface Commands<ReturnType> {
30
- orderedList: {
31
- /**
32
- * Toggle an ordered list
33
- * @example editor.commands.toggleOrderedList()
34
- */
35
- toggleOrderedList: () => ReturnType;
36
- };
37
- }
38
- }
39
- /**
40
- * Matches an ordered list to a 1. on input (or any number followed by a dot).
41
- */
42
- export declare const inputRegex: RegExp;
43
- /**
44
- * This extension allows you to create ordered lists.
45
- * This requires the ListItem extension
46
- * @see https://www.tiptap.dev/api/nodes/ordered-list
47
- * @see https://www.tiptap.dev/api/nodes/list-item
48
- */
49
- export declare const OrderedList: Node<OrderedListOptions, any>;
@@ -1,3 +0,0 @@
1
- import { Paragraph } from './paragraph.js';
2
- export * from './paragraph.js';
3
- export default Paragraph;
@@ -1,25 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface ParagraphOptions {
3
- /**
4
- * The HTML attributes for a paragraph node.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- }
10
- declare module '@tiptap/core' {
11
- interface Commands<ReturnType> {
12
- paragraph: {
13
- /**
14
- * Toggle a paragraph
15
- * @example editor.commands.toggleParagraph()
16
- */
17
- setParagraph: () => ReturnType;
18
- };
19
- }
20
- }
21
- /**
22
- * This extension allows you to create paragraphs.
23
- * @see https://www.tiptap.dev/api/nodes/paragraph
24
- */
25
- export declare const Paragraph: Node<ParagraphOptions, any>;
@@ -1,3 +0,0 @@
1
- import { Strike } from './strike.js';
2
- export * from './strike.js';
3
- export default Strike;
@@ -1,43 +0,0 @@
1
- import { Mark } from '@tiptap/core';
2
- export interface StrikeOptions {
3
- /**
4
- * HTML attributes to add to the strike element.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- }
10
- declare module '@tiptap/core' {
11
- interface Commands<ReturnType> {
12
- strike: {
13
- /**
14
- * Set a strike mark
15
- * @example editor.commands.setStrike()
16
- */
17
- setStrike: () => ReturnType;
18
- /**
19
- * Toggle a strike mark
20
- * @example editor.commands.toggleStrike()
21
- */
22
- toggleStrike: () => ReturnType;
23
- /**
24
- * Unset a strike mark
25
- * @example editor.commands.unsetStrike()
26
- */
27
- unsetStrike: () => ReturnType;
28
- };
29
- }
30
- }
31
- /**
32
- * Matches a strike to a ~~strike~~ on input.
33
- */
34
- export declare const inputRegex: RegExp;
35
- /**
36
- * Matches a strike to a ~~strike~~ on paste.
37
- */
38
- export declare const pasteRegex: RegExp;
39
- /**
40
- * This extension allows you to create strike text.
41
- * @see https://www.tiptap.dev/api/marks/strike
42
- */
43
- export declare const Strike: Mark<StrikeOptions, any>;
@@ -1,3 +0,0 @@
1
- import { Text } from './text.js';
2
- export * from './text.js';
3
- export default Text;
@@ -1,6 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- /**
3
- * This extension allows you to create text nodes.
4
- * @see https://www.tiptap.dev/api/nodes/text
5
- */
6
- export declare const Text: Node<any, any>;
@@ -1,3 +0,0 @@
1
- import { TextStyle } from './text-style.js';
2
- export * from './text-style.js';
3
- export default TextStyle;
@@ -1,26 +0,0 @@
1
- import { Mark } from '@tiptap/core';
2
- export interface TextStyleOptions {
3
- /**
4
- * HTML attributes to add to the span element.
5
- * @default {}
6
- * @example { class: 'foo' }
7
- */
8
- HTMLAttributes: Record<string, any>;
9
- }
10
- declare module '@tiptap/core' {
11
- interface Commands<ReturnType> {
12
- textStyle: {
13
- /**
14
- * Remove spans without inline style attributes.
15
- * @example editor.commands.removeEmptyTextStyle()
16
- */
17
- removeEmptyTextStyle: () => ReturnType;
18
- };
19
- }
20
- }
21
- /**
22
- * This extension allows you to create text styles. It is required by default
23
- * for the `textColor` and `backgroundColor` extensions.
24
- * @see https://www.tiptap.dev/api/marks/text-style
25
- */
26
- export declare const TextStyle: Mark<TextStyleOptions, any>;
@@ -1,4 +0,0 @@
1
- import { StarterKit } from './starter-kit.js';
2
- export type { StarterKitOptions } from './starter-kit.js';
3
- export * from './starter-kit.js';
4
- export default StarterKit;