@tiptap/starter-kit 3.20.3 → 3.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +127 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +136 -0
- package/dist/index.d.ts +136 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/package.json +25 -25
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
StarterKit: () => StarterKit,
|
|
24
|
+
default: () => index_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/starter-kit.ts
|
|
29
|
+
var import_core = require("@tiptap/core");
|
|
30
|
+
var import_extension_blockquote = require("@tiptap/extension-blockquote");
|
|
31
|
+
var import_extension_bold = require("@tiptap/extension-bold");
|
|
32
|
+
var import_extension_code = require("@tiptap/extension-code");
|
|
33
|
+
var import_extension_code_block = require("@tiptap/extension-code-block");
|
|
34
|
+
var import_extension_document = require("@tiptap/extension-document");
|
|
35
|
+
var import_extension_hard_break = require("@tiptap/extension-hard-break");
|
|
36
|
+
var import_extension_heading = require("@tiptap/extension-heading");
|
|
37
|
+
var import_extension_horizontal_rule = require("@tiptap/extension-horizontal-rule");
|
|
38
|
+
var import_extension_italic = require("@tiptap/extension-italic");
|
|
39
|
+
var import_extension_link = require("@tiptap/extension-link");
|
|
40
|
+
var import_extension_list = require("@tiptap/extension-list");
|
|
41
|
+
var import_extension_paragraph = require("@tiptap/extension-paragraph");
|
|
42
|
+
var import_extension_strike = require("@tiptap/extension-strike");
|
|
43
|
+
var import_extension_text = require("@tiptap/extension-text");
|
|
44
|
+
var import_extension_underline = require("@tiptap/extension-underline");
|
|
45
|
+
var import_extensions = require("@tiptap/extensions");
|
|
46
|
+
var StarterKit = import_core.Extension.create({
|
|
47
|
+
name: "starterKit",
|
|
48
|
+
addExtensions() {
|
|
49
|
+
var _a, _b, _c, _d;
|
|
50
|
+
const extensions = [];
|
|
51
|
+
if (this.options.bold !== false) {
|
|
52
|
+
extensions.push(import_extension_bold.Bold.configure(this.options.bold));
|
|
53
|
+
}
|
|
54
|
+
if (this.options.blockquote !== false) {
|
|
55
|
+
extensions.push(import_extension_blockquote.Blockquote.configure(this.options.blockquote));
|
|
56
|
+
}
|
|
57
|
+
if (this.options.bulletList !== false) {
|
|
58
|
+
extensions.push(import_extension_list.BulletList.configure(this.options.bulletList));
|
|
59
|
+
}
|
|
60
|
+
if (this.options.code !== false) {
|
|
61
|
+
extensions.push(import_extension_code.Code.configure(this.options.code));
|
|
62
|
+
}
|
|
63
|
+
if (this.options.codeBlock !== false) {
|
|
64
|
+
extensions.push(import_extension_code_block.CodeBlock.configure(this.options.codeBlock));
|
|
65
|
+
}
|
|
66
|
+
if (this.options.document !== false) {
|
|
67
|
+
extensions.push(import_extension_document.Document.configure(this.options.document));
|
|
68
|
+
}
|
|
69
|
+
if (this.options.dropcursor !== false) {
|
|
70
|
+
extensions.push(import_extensions.Dropcursor.configure(this.options.dropcursor));
|
|
71
|
+
}
|
|
72
|
+
if (this.options.gapcursor !== false) {
|
|
73
|
+
extensions.push(import_extensions.Gapcursor.configure(this.options.gapcursor));
|
|
74
|
+
}
|
|
75
|
+
if (this.options.hardBreak !== false) {
|
|
76
|
+
extensions.push(import_extension_hard_break.HardBreak.configure(this.options.hardBreak));
|
|
77
|
+
}
|
|
78
|
+
if (this.options.heading !== false) {
|
|
79
|
+
extensions.push(import_extension_heading.Heading.configure(this.options.heading));
|
|
80
|
+
}
|
|
81
|
+
if (this.options.undoRedo !== false) {
|
|
82
|
+
extensions.push(import_extensions.UndoRedo.configure(this.options.undoRedo));
|
|
83
|
+
}
|
|
84
|
+
if (this.options.horizontalRule !== false) {
|
|
85
|
+
extensions.push(import_extension_horizontal_rule.HorizontalRule.configure(this.options.horizontalRule));
|
|
86
|
+
}
|
|
87
|
+
if (this.options.italic !== false) {
|
|
88
|
+
extensions.push(import_extension_italic.Italic.configure(this.options.italic));
|
|
89
|
+
}
|
|
90
|
+
if (this.options.listItem !== false) {
|
|
91
|
+
extensions.push(import_extension_list.ListItem.configure(this.options.listItem));
|
|
92
|
+
}
|
|
93
|
+
if (this.options.listKeymap !== false) {
|
|
94
|
+
extensions.push(import_extension_list.ListKeymap.configure((_a = this.options) == null ? void 0 : _a.listKeymap));
|
|
95
|
+
}
|
|
96
|
+
if (this.options.link !== false) {
|
|
97
|
+
extensions.push(import_extension_link.Link.configure((_b = this.options) == null ? void 0 : _b.link));
|
|
98
|
+
}
|
|
99
|
+
if (this.options.orderedList !== false) {
|
|
100
|
+
extensions.push(import_extension_list.OrderedList.configure(this.options.orderedList));
|
|
101
|
+
}
|
|
102
|
+
if (this.options.paragraph !== false) {
|
|
103
|
+
extensions.push(import_extension_paragraph.Paragraph.configure(this.options.paragraph));
|
|
104
|
+
}
|
|
105
|
+
if (this.options.strike !== false) {
|
|
106
|
+
extensions.push(import_extension_strike.Strike.configure(this.options.strike));
|
|
107
|
+
}
|
|
108
|
+
if (this.options.text !== false) {
|
|
109
|
+
extensions.push(import_extension_text.Text.configure(this.options.text));
|
|
110
|
+
}
|
|
111
|
+
if (this.options.underline !== false) {
|
|
112
|
+
extensions.push(import_extension_underline.Underline.configure((_c = this.options) == null ? void 0 : _c.underline));
|
|
113
|
+
}
|
|
114
|
+
if (this.options.trailingNode !== false) {
|
|
115
|
+
extensions.push(import_extensions.TrailingNode.configure((_d = this.options) == null ? void 0 : _d.trailingNode));
|
|
116
|
+
}
|
|
117
|
+
return extensions;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// src/index.ts
|
|
122
|
+
var index_default = StarterKit;
|
|
123
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
124
|
+
0 && (module.exports = {
|
|
125
|
+
StarterKit
|
|
126
|
+
});
|
|
127
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/starter-kit.ts"],"sourcesContent":["import { StarterKit } from './starter-kit.js'\n\nexport type { StarterKitOptions } from './starter-kit.js'\nexport * from './starter-kit.js'\n\nexport default StarterKit\n","import { Extension } from '@tiptap/core'\nimport type { BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Blockquote } from '@tiptap/extension-blockquote'\nimport type { BoldOptions } from '@tiptap/extension-bold'\nimport { Bold } from '@tiptap/extension-bold'\nimport type { CodeOptions } from '@tiptap/extension-code'\nimport { Code } from '@tiptap/extension-code'\nimport type { CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { CodeBlock } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport type { HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { HardBreak } from '@tiptap/extension-hard-break'\nimport type { HeadingOptions } from '@tiptap/extension-heading'\nimport { Heading } from '@tiptap/extension-heading'\nimport type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { HorizontalRule } from '@tiptap/extension-horizontal-rule'\nimport type { ItalicOptions } from '@tiptap/extension-italic'\nimport { Italic } from '@tiptap/extension-italic'\nimport type { LinkOptions } from '@tiptap/extension-link'\nimport { Link } from '@tiptap/extension-link'\nimport type { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from '@tiptap/extension-list'\nimport { BulletList, ListItem, ListKeymap, OrderedList } from '@tiptap/extension-list'\nimport type { ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Paragraph } from '@tiptap/extension-paragraph'\nimport type { StrikeOptions } from '@tiptap/extension-strike'\nimport { Strike } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport type { UnderlineOptions } from '@tiptap/extension-underline'\nimport { Underline } from '@tiptap/extension-underline'\nimport type { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from '@tiptap/extensions'\nimport { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from '@tiptap/extensions'\n\nexport interface StarterKitOptions {\n /**\n * If set to false, the blockquote extension will not be registered\n * @example blockquote: false\n */\n blockquote: Partial<BlockquoteOptions> | false\n\n /**\n * If set to false, the bold extension will not be registered\n * @example bold: false\n */\n bold: Partial<BoldOptions> | false\n\n /**\n * If set to false, the bulletList extension will not be registered\n * @example bulletList: false\n */\n bulletList: Partial<BulletListOptions> | false\n\n /**\n * If set to false, the code extension will not be registered\n * @example code: false\n */\n code: Partial<CodeOptions> | false\n\n /**\n * If set to false, the codeBlock extension will not be registered\n * @example codeBlock: false\n */\n codeBlock: Partial<CodeBlockOptions> | false\n\n /**\n * If set to false, the document extension will not be registered\n * @example document: false\n */\n document: false\n\n /**\n * If set to false, the dropcursor extension will not be registered\n * @example dropcursor: false\n */\n dropcursor: Partial<DropcursorOptions> | false\n\n /**\n * If set to false, the gapcursor extension will not be registered\n * @example gapcursor: false\n */\n gapcursor: false\n\n /**\n * If set to false, the hardBreak extension will not be registered\n * @example hardBreak: false\n */\n hardBreak: Partial<HardBreakOptions> | false\n\n /**\n * If set to false, the heading extension will not be registered\n * @example heading: false\n */\n heading: Partial<HeadingOptions> | false\n\n /**\n * If set to false, the undo-redo extension will not be registered\n * @example undoRedo: false\n */\n undoRedo: Partial<UndoRedoOptions> | false\n\n /**\n * If set to false, the horizontalRule extension will not be registered\n * @example horizontalRule: false\n */\n horizontalRule: Partial<HorizontalRuleOptions> | false\n\n /**\n * If set to false, the italic extension will not be registered\n * @example italic: false\n */\n italic: Partial<ItalicOptions> | false\n\n /**\n * If set to false, the listItem extension will not be registered\n * @example listItem: false\n */\n listItem: Partial<ListItemOptions> | false\n\n /**\n * If set to false, the listItemKeymap extension will not be registered\n * @example listKeymap: false\n */\n listKeymap: Partial<ListKeymapOptions> | false\n\n /**\n * If set to false, the link extension will not be registered\n * @example link: false\n */\n link: Partial<LinkOptions> | false\n\n /**\n * If set to false, the orderedList extension will not be registered\n * @example orderedList: false\n */\n orderedList: Partial<OrderedListOptions> | false\n\n /**\n * If set to false, the paragraph extension will not be registered\n * @example paragraph: false\n */\n paragraph: Partial<ParagraphOptions> | false\n\n /**\n * If set to false, the strike extension will not be registered\n * @example strike: false\n */\n strike: Partial<StrikeOptions> | false\n\n /**\n * If set to false, the text extension will not be registered\n * @example text: false\n */\n text: false\n\n /**\n * If set to false, the underline extension will not be registered\n * @example underline: false\n */\n underline: Partial<UnderlineOptions> | false\n\n /**\n * If set to false, the trailingNode extension will not be registered\n * @example trailingNode: false\n */\n trailingNode: Partial<TrailingNodeOptions> | false\n}\n\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */\nexport const StarterKit = Extension.create<StarterKitOptions>({\n name: 'starterKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bold !== false) {\n extensions.push(Bold.configure(this.options.bold))\n }\n\n if (this.options.blockquote !== false) {\n extensions.push(Blockquote.configure(this.options.blockquote))\n }\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.code !== false) {\n extensions.push(Code.configure(this.options.code))\n }\n\n if (this.options.codeBlock !== false) {\n extensions.push(CodeBlock.configure(this.options.codeBlock))\n }\n\n if (this.options.document !== false) {\n extensions.push(Document.configure(this.options.document))\n }\n\n if (this.options.dropcursor !== false) {\n extensions.push(Dropcursor.configure(this.options.dropcursor))\n }\n\n if (this.options.gapcursor !== false) {\n extensions.push(Gapcursor.configure(this.options.gapcursor))\n }\n\n if (this.options.hardBreak !== false) {\n extensions.push(HardBreak.configure(this.options.hardBreak))\n }\n\n if (this.options.heading !== false) {\n extensions.push(Heading.configure(this.options.heading))\n }\n\n if (this.options.undoRedo !== false) {\n extensions.push(UndoRedo.configure(this.options.undoRedo))\n }\n\n if (this.options.horizontalRule !== false) {\n extensions.push(HorizontalRule.configure(this.options.horizontalRule))\n }\n\n if (this.options.italic !== false) {\n extensions.push(Italic.configure(this.options.italic))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options?.listKeymap))\n }\n\n if (this.options.link !== false) {\n extensions.push(Link.configure(this.options?.link))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.paragraph !== false) {\n extensions.push(Paragraph.configure(this.options.paragraph))\n }\n\n if (this.options.strike !== false) {\n extensions.push(Strike.configure(this.options.strike))\n }\n\n if (this.options.text !== false) {\n extensions.push(Text.configure(this.options.text))\n }\n\n if (this.options.underline !== false) {\n extensions.push(Underline.configure(this.options?.underline))\n }\n\n if (this.options.trailingNode !== false) {\n extensions.push(TrailingNode.configure(this.options?.trailingNode))\n }\n\n return extensions\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,2BAAK,UAAU,KAAK,QAAQ,IAAI,CAAC;AAAA,IACnD;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,qCAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,iBAAiB,OAAO;AACvC,iBAAW,KAAK,+BAAa,WAAU,UAAK,YAAL,mBAAc,YAAY,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;ADtQD,IAAO,gBAAQ;","names":[]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { BlockquoteOptions } from '@tiptap/extension-blockquote';
|
|
3
|
+
import { BoldOptions } from '@tiptap/extension-bold';
|
|
4
|
+
import { CodeOptions } from '@tiptap/extension-code';
|
|
5
|
+
import { CodeBlockOptions } from '@tiptap/extension-code-block';
|
|
6
|
+
import { HardBreakOptions } from '@tiptap/extension-hard-break';
|
|
7
|
+
import { HeadingOptions } from '@tiptap/extension-heading';
|
|
8
|
+
import { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
|
|
9
|
+
import { ItalicOptions } from '@tiptap/extension-italic';
|
|
10
|
+
import { LinkOptions } from '@tiptap/extension-link';
|
|
11
|
+
import { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from '@tiptap/extension-list';
|
|
12
|
+
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
13
|
+
import { StrikeOptions } from '@tiptap/extension-strike';
|
|
14
|
+
import { UnderlineOptions } from '@tiptap/extension-underline';
|
|
15
|
+
import { DropcursorOptions, UndoRedoOptions, TrailingNodeOptions } from '@tiptap/extensions';
|
|
16
|
+
|
|
17
|
+
interface StarterKitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* If set to false, the blockquote extension will not be registered
|
|
20
|
+
* @example blockquote: false
|
|
21
|
+
*/
|
|
22
|
+
blockquote: Partial<BlockquoteOptions> | false;
|
|
23
|
+
/**
|
|
24
|
+
* If set to false, the bold extension will not be registered
|
|
25
|
+
* @example bold: false
|
|
26
|
+
*/
|
|
27
|
+
bold: Partial<BoldOptions> | false;
|
|
28
|
+
/**
|
|
29
|
+
* If set to false, the bulletList extension will not be registered
|
|
30
|
+
* @example bulletList: false
|
|
31
|
+
*/
|
|
32
|
+
bulletList: Partial<BulletListOptions> | false;
|
|
33
|
+
/**
|
|
34
|
+
* If set to false, the code extension will not be registered
|
|
35
|
+
* @example code: false
|
|
36
|
+
*/
|
|
37
|
+
code: Partial<CodeOptions> | false;
|
|
38
|
+
/**
|
|
39
|
+
* If set to false, the codeBlock extension will not be registered
|
|
40
|
+
* @example codeBlock: false
|
|
41
|
+
*/
|
|
42
|
+
codeBlock: Partial<CodeBlockOptions> | false;
|
|
43
|
+
/**
|
|
44
|
+
* If set to false, the document extension will not be registered
|
|
45
|
+
* @example document: false
|
|
46
|
+
*/
|
|
47
|
+
document: false;
|
|
48
|
+
/**
|
|
49
|
+
* If set to false, the dropcursor extension will not be registered
|
|
50
|
+
* @example dropcursor: false
|
|
51
|
+
*/
|
|
52
|
+
dropcursor: Partial<DropcursorOptions> | false;
|
|
53
|
+
/**
|
|
54
|
+
* If set to false, the gapcursor extension will not be registered
|
|
55
|
+
* @example gapcursor: false
|
|
56
|
+
*/
|
|
57
|
+
gapcursor: false;
|
|
58
|
+
/**
|
|
59
|
+
* If set to false, the hardBreak extension will not be registered
|
|
60
|
+
* @example hardBreak: false
|
|
61
|
+
*/
|
|
62
|
+
hardBreak: Partial<HardBreakOptions> | false;
|
|
63
|
+
/**
|
|
64
|
+
* If set to false, the heading extension will not be registered
|
|
65
|
+
* @example heading: false
|
|
66
|
+
*/
|
|
67
|
+
heading: Partial<HeadingOptions> | false;
|
|
68
|
+
/**
|
|
69
|
+
* If set to false, the undo-redo extension will not be registered
|
|
70
|
+
* @example undoRedo: false
|
|
71
|
+
*/
|
|
72
|
+
undoRedo: Partial<UndoRedoOptions> | false;
|
|
73
|
+
/**
|
|
74
|
+
* If set to false, the horizontalRule extension will not be registered
|
|
75
|
+
* @example horizontalRule: false
|
|
76
|
+
*/
|
|
77
|
+
horizontalRule: Partial<HorizontalRuleOptions> | false;
|
|
78
|
+
/**
|
|
79
|
+
* If set to false, the italic extension will not be registered
|
|
80
|
+
* @example italic: false
|
|
81
|
+
*/
|
|
82
|
+
italic: Partial<ItalicOptions> | false;
|
|
83
|
+
/**
|
|
84
|
+
* If set to false, the listItem extension will not be registered
|
|
85
|
+
* @example listItem: false
|
|
86
|
+
*/
|
|
87
|
+
listItem: Partial<ListItemOptions> | false;
|
|
88
|
+
/**
|
|
89
|
+
* If set to false, the listItemKeymap extension will not be registered
|
|
90
|
+
* @example listKeymap: false
|
|
91
|
+
*/
|
|
92
|
+
listKeymap: Partial<ListKeymapOptions> | false;
|
|
93
|
+
/**
|
|
94
|
+
* If set to false, the link extension will not be registered
|
|
95
|
+
* @example link: false
|
|
96
|
+
*/
|
|
97
|
+
link: Partial<LinkOptions> | false;
|
|
98
|
+
/**
|
|
99
|
+
* If set to false, the orderedList extension will not be registered
|
|
100
|
+
* @example orderedList: false
|
|
101
|
+
*/
|
|
102
|
+
orderedList: Partial<OrderedListOptions> | false;
|
|
103
|
+
/**
|
|
104
|
+
* If set to false, the paragraph extension will not be registered
|
|
105
|
+
* @example paragraph: false
|
|
106
|
+
*/
|
|
107
|
+
paragraph: Partial<ParagraphOptions> | false;
|
|
108
|
+
/**
|
|
109
|
+
* If set to false, the strike extension will not be registered
|
|
110
|
+
* @example strike: false
|
|
111
|
+
*/
|
|
112
|
+
strike: Partial<StrikeOptions> | false;
|
|
113
|
+
/**
|
|
114
|
+
* If set to false, the text extension will not be registered
|
|
115
|
+
* @example text: false
|
|
116
|
+
*/
|
|
117
|
+
text: false;
|
|
118
|
+
/**
|
|
119
|
+
* If set to false, the underline extension will not be registered
|
|
120
|
+
* @example underline: false
|
|
121
|
+
*/
|
|
122
|
+
underline: Partial<UnderlineOptions> | false;
|
|
123
|
+
/**
|
|
124
|
+
* If set to false, the trailingNode extension will not be registered
|
|
125
|
+
* @example trailingNode: false
|
|
126
|
+
*/
|
|
127
|
+
trailingNode: Partial<TrailingNodeOptions> | false;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The starter kit is a collection of essential editor extensions.
|
|
131
|
+
*
|
|
132
|
+
* It’s a good starting point for building your own editor.
|
|
133
|
+
*/
|
|
134
|
+
declare const StarterKit: Extension<StarterKitOptions, any>;
|
|
135
|
+
|
|
136
|
+
export { StarterKit, type StarterKitOptions, StarterKit as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { BlockquoteOptions } from '@tiptap/extension-blockquote';
|
|
3
|
+
import { BoldOptions } from '@tiptap/extension-bold';
|
|
4
|
+
import { CodeOptions } from '@tiptap/extension-code';
|
|
5
|
+
import { CodeBlockOptions } from '@tiptap/extension-code-block';
|
|
6
|
+
import { HardBreakOptions } from '@tiptap/extension-hard-break';
|
|
7
|
+
import { HeadingOptions } from '@tiptap/extension-heading';
|
|
8
|
+
import { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
|
|
9
|
+
import { ItalicOptions } from '@tiptap/extension-italic';
|
|
10
|
+
import { LinkOptions } from '@tiptap/extension-link';
|
|
11
|
+
import { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from '@tiptap/extension-list';
|
|
12
|
+
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
13
|
+
import { StrikeOptions } from '@tiptap/extension-strike';
|
|
14
|
+
import { UnderlineOptions } from '@tiptap/extension-underline';
|
|
15
|
+
import { DropcursorOptions, UndoRedoOptions, TrailingNodeOptions } from '@tiptap/extensions';
|
|
16
|
+
|
|
17
|
+
interface StarterKitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* If set to false, the blockquote extension will not be registered
|
|
20
|
+
* @example blockquote: false
|
|
21
|
+
*/
|
|
22
|
+
blockquote: Partial<BlockquoteOptions> | false;
|
|
23
|
+
/**
|
|
24
|
+
* If set to false, the bold extension will not be registered
|
|
25
|
+
* @example bold: false
|
|
26
|
+
*/
|
|
27
|
+
bold: Partial<BoldOptions> | false;
|
|
28
|
+
/**
|
|
29
|
+
* If set to false, the bulletList extension will not be registered
|
|
30
|
+
* @example bulletList: false
|
|
31
|
+
*/
|
|
32
|
+
bulletList: Partial<BulletListOptions> | false;
|
|
33
|
+
/**
|
|
34
|
+
* If set to false, the code extension will not be registered
|
|
35
|
+
* @example code: false
|
|
36
|
+
*/
|
|
37
|
+
code: Partial<CodeOptions> | false;
|
|
38
|
+
/**
|
|
39
|
+
* If set to false, the codeBlock extension will not be registered
|
|
40
|
+
* @example codeBlock: false
|
|
41
|
+
*/
|
|
42
|
+
codeBlock: Partial<CodeBlockOptions> | false;
|
|
43
|
+
/**
|
|
44
|
+
* If set to false, the document extension will not be registered
|
|
45
|
+
* @example document: false
|
|
46
|
+
*/
|
|
47
|
+
document: false;
|
|
48
|
+
/**
|
|
49
|
+
* If set to false, the dropcursor extension will not be registered
|
|
50
|
+
* @example dropcursor: false
|
|
51
|
+
*/
|
|
52
|
+
dropcursor: Partial<DropcursorOptions> | false;
|
|
53
|
+
/**
|
|
54
|
+
* If set to false, the gapcursor extension will not be registered
|
|
55
|
+
* @example gapcursor: false
|
|
56
|
+
*/
|
|
57
|
+
gapcursor: false;
|
|
58
|
+
/**
|
|
59
|
+
* If set to false, the hardBreak extension will not be registered
|
|
60
|
+
* @example hardBreak: false
|
|
61
|
+
*/
|
|
62
|
+
hardBreak: Partial<HardBreakOptions> | false;
|
|
63
|
+
/**
|
|
64
|
+
* If set to false, the heading extension will not be registered
|
|
65
|
+
* @example heading: false
|
|
66
|
+
*/
|
|
67
|
+
heading: Partial<HeadingOptions> | false;
|
|
68
|
+
/**
|
|
69
|
+
* If set to false, the undo-redo extension will not be registered
|
|
70
|
+
* @example undoRedo: false
|
|
71
|
+
*/
|
|
72
|
+
undoRedo: Partial<UndoRedoOptions> | false;
|
|
73
|
+
/**
|
|
74
|
+
* If set to false, the horizontalRule extension will not be registered
|
|
75
|
+
* @example horizontalRule: false
|
|
76
|
+
*/
|
|
77
|
+
horizontalRule: Partial<HorizontalRuleOptions> | false;
|
|
78
|
+
/**
|
|
79
|
+
* If set to false, the italic extension will not be registered
|
|
80
|
+
* @example italic: false
|
|
81
|
+
*/
|
|
82
|
+
italic: Partial<ItalicOptions> | false;
|
|
83
|
+
/**
|
|
84
|
+
* If set to false, the listItem extension will not be registered
|
|
85
|
+
* @example listItem: false
|
|
86
|
+
*/
|
|
87
|
+
listItem: Partial<ListItemOptions> | false;
|
|
88
|
+
/**
|
|
89
|
+
* If set to false, the listItemKeymap extension will not be registered
|
|
90
|
+
* @example listKeymap: false
|
|
91
|
+
*/
|
|
92
|
+
listKeymap: Partial<ListKeymapOptions> | false;
|
|
93
|
+
/**
|
|
94
|
+
* If set to false, the link extension will not be registered
|
|
95
|
+
* @example link: false
|
|
96
|
+
*/
|
|
97
|
+
link: Partial<LinkOptions> | false;
|
|
98
|
+
/**
|
|
99
|
+
* If set to false, the orderedList extension will not be registered
|
|
100
|
+
* @example orderedList: false
|
|
101
|
+
*/
|
|
102
|
+
orderedList: Partial<OrderedListOptions> | false;
|
|
103
|
+
/**
|
|
104
|
+
* If set to false, the paragraph extension will not be registered
|
|
105
|
+
* @example paragraph: false
|
|
106
|
+
*/
|
|
107
|
+
paragraph: Partial<ParagraphOptions> | false;
|
|
108
|
+
/**
|
|
109
|
+
* If set to false, the strike extension will not be registered
|
|
110
|
+
* @example strike: false
|
|
111
|
+
*/
|
|
112
|
+
strike: Partial<StrikeOptions> | false;
|
|
113
|
+
/**
|
|
114
|
+
* If set to false, the text extension will not be registered
|
|
115
|
+
* @example text: false
|
|
116
|
+
*/
|
|
117
|
+
text: false;
|
|
118
|
+
/**
|
|
119
|
+
* If set to false, the underline extension will not be registered
|
|
120
|
+
* @example underline: false
|
|
121
|
+
*/
|
|
122
|
+
underline: Partial<UnderlineOptions> | false;
|
|
123
|
+
/**
|
|
124
|
+
* If set to false, the trailingNode extension will not be registered
|
|
125
|
+
* @example trailingNode: false
|
|
126
|
+
*/
|
|
127
|
+
trailingNode: Partial<TrailingNodeOptions> | false;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The starter kit is a collection of essential editor extensions.
|
|
131
|
+
*
|
|
132
|
+
* It’s a good starting point for building your own editor.
|
|
133
|
+
*/
|
|
134
|
+
declare const StarterKit: Extension<StarterKitOptions, any>;
|
|
135
|
+
|
|
136
|
+
export { StarterKit, type StarterKitOptions, StarterKit as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// src/starter-kit.ts
|
|
2
|
+
import { Extension } from "@tiptap/core";
|
|
3
|
+
import { Blockquote } from "@tiptap/extension-blockquote";
|
|
4
|
+
import { Bold } from "@tiptap/extension-bold";
|
|
5
|
+
import { Code } from "@tiptap/extension-code";
|
|
6
|
+
import { CodeBlock } from "@tiptap/extension-code-block";
|
|
7
|
+
import { Document } from "@tiptap/extension-document";
|
|
8
|
+
import { HardBreak } from "@tiptap/extension-hard-break";
|
|
9
|
+
import { Heading } from "@tiptap/extension-heading";
|
|
10
|
+
import { HorizontalRule } from "@tiptap/extension-horizontal-rule";
|
|
11
|
+
import { Italic } from "@tiptap/extension-italic";
|
|
12
|
+
import { Link } from "@tiptap/extension-link";
|
|
13
|
+
import { BulletList, ListItem, ListKeymap, OrderedList } from "@tiptap/extension-list";
|
|
14
|
+
import { Paragraph } from "@tiptap/extension-paragraph";
|
|
15
|
+
import { Strike } from "@tiptap/extension-strike";
|
|
16
|
+
import { Text } from "@tiptap/extension-text";
|
|
17
|
+
import { Underline } from "@tiptap/extension-underline";
|
|
18
|
+
import { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from "@tiptap/extensions";
|
|
19
|
+
var StarterKit = Extension.create({
|
|
20
|
+
name: "starterKit",
|
|
21
|
+
addExtensions() {
|
|
22
|
+
var _a, _b, _c, _d;
|
|
23
|
+
const extensions = [];
|
|
24
|
+
if (this.options.bold !== false) {
|
|
25
|
+
extensions.push(Bold.configure(this.options.bold));
|
|
26
|
+
}
|
|
27
|
+
if (this.options.blockquote !== false) {
|
|
28
|
+
extensions.push(Blockquote.configure(this.options.blockquote));
|
|
29
|
+
}
|
|
30
|
+
if (this.options.bulletList !== false) {
|
|
31
|
+
extensions.push(BulletList.configure(this.options.bulletList));
|
|
32
|
+
}
|
|
33
|
+
if (this.options.code !== false) {
|
|
34
|
+
extensions.push(Code.configure(this.options.code));
|
|
35
|
+
}
|
|
36
|
+
if (this.options.codeBlock !== false) {
|
|
37
|
+
extensions.push(CodeBlock.configure(this.options.codeBlock));
|
|
38
|
+
}
|
|
39
|
+
if (this.options.document !== false) {
|
|
40
|
+
extensions.push(Document.configure(this.options.document));
|
|
41
|
+
}
|
|
42
|
+
if (this.options.dropcursor !== false) {
|
|
43
|
+
extensions.push(Dropcursor.configure(this.options.dropcursor));
|
|
44
|
+
}
|
|
45
|
+
if (this.options.gapcursor !== false) {
|
|
46
|
+
extensions.push(Gapcursor.configure(this.options.gapcursor));
|
|
47
|
+
}
|
|
48
|
+
if (this.options.hardBreak !== false) {
|
|
49
|
+
extensions.push(HardBreak.configure(this.options.hardBreak));
|
|
50
|
+
}
|
|
51
|
+
if (this.options.heading !== false) {
|
|
52
|
+
extensions.push(Heading.configure(this.options.heading));
|
|
53
|
+
}
|
|
54
|
+
if (this.options.undoRedo !== false) {
|
|
55
|
+
extensions.push(UndoRedo.configure(this.options.undoRedo));
|
|
56
|
+
}
|
|
57
|
+
if (this.options.horizontalRule !== false) {
|
|
58
|
+
extensions.push(HorizontalRule.configure(this.options.horizontalRule));
|
|
59
|
+
}
|
|
60
|
+
if (this.options.italic !== false) {
|
|
61
|
+
extensions.push(Italic.configure(this.options.italic));
|
|
62
|
+
}
|
|
63
|
+
if (this.options.listItem !== false) {
|
|
64
|
+
extensions.push(ListItem.configure(this.options.listItem));
|
|
65
|
+
}
|
|
66
|
+
if (this.options.listKeymap !== false) {
|
|
67
|
+
extensions.push(ListKeymap.configure((_a = this.options) == null ? void 0 : _a.listKeymap));
|
|
68
|
+
}
|
|
69
|
+
if (this.options.link !== false) {
|
|
70
|
+
extensions.push(Link.configure((_b = this.options) == null ? void 0 : _b.link));
|
|
71
|
+
}
|
|
72
|
+
if (this.options.orderedList !== false) {
|
|
73
|
+
extensions.push(OrderedList.configure(this.options.orderedList));
|
|
74
|
+
}
|
|
75
|
+
if (this.options.paragraph !== false) {
|
|
76
|
+
extensions.push(Paragraph.configure(this.options.paragraph));
|
|
77
|
+
}
|
|
78
|
+
if (this.options.strike !== false) {
|
|
79
|
+
extensions.push(Strike.configure(this.options.strike));
|
|
80
|
+
}
|
|
81
|
+
if (this.options.text !== false) {
|
|
82
|
+
extensions.push(Text.configure(this.options.text));
|
|
83
|
+
}
|
|
84
|
+
if (this.options.underline !== false) {
|
|
85
|
+
extensions.push(Underline.configure((_c = this.options) == null ? void 0 : _c.underline));
|
|
86
|
+
}
|
|
87
|
+
if (this.options.trailingNode !== false) {
|
|
88
|
+
extensions.push(TrailingNode.configure((_d = this.options) == null ? void 0 : _d.trailingNode));
|
|
89
|
+
}
|
|
90
|
+
return extensions;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// src/index.ts
|
|
95
|
+
var index_default = StarterKit;
|
|
96
|
+
export {
|
|
97
|
+
StarterKit,
|
|
98
|
+
index_default as default
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/starter-kit.ts","../src/index.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport type { BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Blockquote } from '@tiptap/extension-blockquote'\nimport type { BoldOptions } from '@tiptap/extension-bold'\nimport { Bold } from '@tiptap/extension-bold'\nimport type { CodeOptions } from '@tiptap/extension-code'\nimport { Code } from '@tiptap/extension-code'\nimport type { CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { CodeBlock } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport type { HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { HardBreak } from '@tiptap/extension-hard-break'\nimport type { HeadingOptions } from '@tiptap/extension-heading'\nimport { Heading } from '@tiptap/extension-heading'\nimport type { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { HorizontalRule } from '@tiptap/extension-horizontal-rule'\nimport type { ItalicOptions } from '@tiptap/extension-italic'\nimport { Italic } from '@tiptap/extension-italic'\nimport type { LinkOptions } from '@tiptap/extension-link'\nimport { Link } from '@tiptap/extension-link'\nimport type { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from '@tiptap/extension-list'\nimport { BulletList, ListItem, ListKeymap, OrderedList } from '@tiptap/extension-list'\nimport type { ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Paragraph } from '@tiptap/extension-paragraph'\nimport type { StrikeOptions } from '@tiptap/extension-strike'\nimport { Strike } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport type { UnderlineOptions } from '@tiptap/extension-underline'\nimport { Underline } from '@tiptap/extension-underline'\nimport type { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from '@tiptap/extensions'\nimport { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from '@tiptap/extensions'\n\nexport interface StarterKitOptions {\n /**\n * If set to false, the blockquote extension will not be registered\n * @example blockquote: false\n */\n blockquote: Partial<BlockquoteOptions> | false\n\n /**\n * If set to false, the bold extension will not be registered\n * @example bold: false\n */\n bold: Partial<BoldOptions> | false\n\n /**\n * If set to false, the bulletList extension will not be registered\n * @example bulletList: false\n */\n bulletList: Partial<BulletListOptions> | false\n\n /**\n * If set to false, the code extension will not be registered\n * @example code: false\n */\n code: Partial<CodeOptions> | false\n\n /**\n * If set to false, the codeBlock extension will not be registered\n * @example codeBlock: false\n */\n codeBlock: Partial<CodeBlockOptions> | false\n\n /**\n * If set to false, the document extension will not be registered\n * @example document: false\n */\n document: false\n\n /**\n * If set to false, the dropcursor extension will not be registered\n * @example dropcursor: false\n */\n dropcursor: Partial<DropcursorOptions> | false\n\n /**\n * If set to false, the gapcursor extension will not be registered\n * @example gapcursor: false\n */\n gapcursor: false\n\n /**\n * If set to false, the hardBreak extension will not be registered\n * @example hardBreak: false\n */\n hardBreak: Partial<HardBreakOptions> | false\n\n /**\n * If set to false, the heading extension will not be registered\n * @example heading: false\n */\n heading: Partial<HeadingOptions> | false\n\n /**\n * If set to false, the undo-redo extension will not be registered\n * @example undoRedo: false\n */\n undoRedo: Partial<UndoRedoOptions> | false\n\n /**\n * If set to false, the horizontalRule extension will not be registered\n * @example horizontalRule: false\n */\n horizontalRule: Partial<HorizontalRuleOptions> | false\n\n /**\n * If set to false, the italic extension will not be registered\n * @example italic: false\n */\n italic: Partial<ItalicOptions> | false\n\n /**\n * If set to false, the listItem extension will not be registered\n * @example listItem: false\n */\n listItem: Partial<ListItemOptions> | false\n\n /**\n * If set to false, the listItemKeymap extension will not be registered\n * @example listKeymap: false\n */\n listKeymap: Partial<ListKeymapOptions> | false\n\n /**\n * If set to false, the link extension will not be registered\n * @example link: false\n */\n link: Partial<LinkOptions> | false\n\n /**\n * If set to false, the orderedList extension will not be registered\n * @example orderedList: false\n */\n orderedList: Partial<OrderedListOptions> | false\n\n /**\n * If set to false, the paragraph extension will not be registered\n * @example paragraph: false\n */\n paragraph: Partial<ParagraphOptions> | false\n\n /**\n * If set to false, the strike extension will not be registered\n * @example strike: false\n */\n strike: Partial<StrikeOptions> | false\n\n /**\n * If set to false, the text extension will not be registered\n * @example text: false\n */\n text: false\n\n /**\n * If set to false, the underline extension will not be registered\n * @example underline: false\n */\n underline: Partial<UnderlineOptions> | false\n\n /**\n * If set to false, the trailingNode extension will not be registered\n * @example trailingNode: false\n */\n trailingNode: Partial<TrailingNodeOptions> | false\n}\n\n/**\n * The starter kit is a collection of essential editor extensions.\n *\n * It’s a good starting point for building your own editor.\n */\nexport const StarterKit = Extension.create<StarterKitOptions>({\n name: 'starterKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.bold !== false) {\n extensions.push(Bold.configure(this.options.bold))\n }\n\n if (this.options.blockquote !== false) {\n extensions.push(Blockquote.configure(this.options.blockquote))\n }\n\n if (this.options.bulletList !== false) {\n extensions.push(BulletList.configure(this.options.bulletList))\n }\n\n if (this.options.code !== false) {\n extensions.push(Code.configure(this.options.code))\n }\n\n if (this.options.codeBlock !== false) {\n extensions.push(CodeBlock.configure(this.options.codeBlock))\n }\n\n if (this.options.document !== false) {\n extensions.push(Document.configure(this.options.document))\n }\n\n if (this.options.dropcursor !== false) {\n extensions.push(Dropcursor.configure(this.options.dropcursor))\n }\n\n if (this.options.gapcursor !== false) {\n extensions.push(Gapcursor.configure(this.options.gapcursor))\n }\n\n if (this.options.hardBreak !== false) {\n extensions.push(HardBreak.configure(this.options.hardBreak))\n }\n\n if (this.options.heading !== false) {\n extensions.push(Heading.configure(this.options.heading))\n }\n\n if (this.options.undoRedo !== false) {\n extensions.push(UndoRedo.configure(this.options.undoRedo))\n }\n\n if (this.options.horizontalRule !== false) {\n extensions.push(HorizontalRule.configure(this.options.horizontalRule))\n }\n\n if (this.options.italic !== false) {\n extensions.push(Italic.configure(this.options.italic))\n }\n\n if (this.options.listItem !== false) {\n extensions.push(ListItem.configure(this.options.listItem))\n }\n\n if (this.options.listKeymap !== false) {\n extensions.push(ListKeymap.configure(this.options?.listKeymap))\n }\n\n if (this.options.link !== false) {\n extensions.push(Link.configure(this.options?.link))\n }\n\n if (this.options.orderedList !== false) {\n extensions.push(OrderedList.configure(this.options.orderedList))\n }\n\n if (this.options.paragraph !== false) {\n extensions.push(Paragraph.configure(this.options.paragraph))\n }\n\n if (this.options.strike !== false) {\n extensions.push(Strike.configure(this.options.strike))\n }\n\n if (this.options.text !== false) {\n extensions.push(Text.configure(this.options.text))\n }\n\n if (this.options.underline !== false) {\n extensions.push(Underline.configure(this.options?.underline))\n }\n\n if (this.options.trailingNode !== false) {\n extensions.push(TrailingNode.configure(this.options?.trailingNode))\n }\n\n return extensions\n },\n})\n","import { StarterKit } from './starter-kit.js'\n\nexport type { StarterKitOptions } from './starter-kit.js'\nexport * from './starter-kit.js'\n\nexport default StarterKit\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AAErB,SAAS,YAAY;AAErB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AAEzB,SAAS,iBAAiB;AAE1B,SAAS,eAAe;AAExB,SAAS,sBAAsB;AAE/B,SAAS,cAAc;AAEvB,SAAS,YAAY;AAErB,SAAS,YAAY,UAAU,YAAY,mBAAmB;AAE9D,SAAS,iBAAiB;AAE1B,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,iBAAiB;AAE1B,SAAS,YAAY,WAAW,cAAc,gBAAgB;AA6IvD,IAAM,aAAa,UAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,gBAAgB;AA9KlB;AA+KI,UAAM,aAAa,CAAC;AAEpB,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,UAAU,KAAK,QAAQ,IAAI,CAAC;AAAA,IACnD;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,UAAU,KAAK,QAAQ,UAAU,CAAC;AAAA,IAC/D;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,UAAU,KAAK,QAAQ,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Q,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;AAEA,QAAI,KAAK,QAAQ,gBAAgB,OAAO;AACtC,iBAAW,KAAK,YAAY,UAAU,KAAK,QAAQ,WAAW,CAAC;AAAA,IACjE;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,UAAU,UAAU,KAAK,QAAQ,SAAS,CAAC;AAAA,IAC7D;AAEA,QAAI,KAAK,QAAQ,WAAW,OAAO;AACjC,iBAAW,KAAK,OAAO,UAAU,KAAK,QAAQ,MAAM,CAAC;AAAA,IACvD;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,UAAU,KAAK,QAAQ,IAAI,CAAC;AAAA,IACnD;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,UAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,iBAAiB,OAAO;AACvC,iBAAW,KAAK,aAAa,WAAU,UAAK,YAAL,mBAAc,YAAY,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;ACtQD,IAAO,gBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/starter-kit",
|
|
3
3
|
"description": "starter kit for tiptap",
|
|
4
|
-
"version": "3.20.
|
|
4
|
+
"version": "3.20.4",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -31,30 +31,30 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@tiptap/
|
|
35
|
-
"@tiptap/extension-
|
|
36
|
-
"@tiptap/extension-
|
|
37
|
-
"@tiptap/extension-
|
|
38
|
-
"@tiptap/
|
|
39
|
-
"@tiptap/extension-
|
|
40
|
-
"@tiptap/extension-
|
|
41
|
-
"@tiptap/extension-
|
|
42
|
-
"@tiptap/extension-
|
|
43
|
-
"@tiptap/extension-
|
|
44
|
-
"@tiptap/extension-
|
|
45
|
-
"@tiptap/extension-
|
|
46
|
-
"@tiptap/extension-
|
|
47
|
-
"@tiptap/extension-
|
|
48
|
-
"@tiptap/extension-
|
|
49
|
-
"@tiptap/extension-list-
|
|
50
|
-
"@tiptap/extension-list
|
|
51
|
-
"@tiptap/extension-
|
|
52
|
-
"@tiptap/extension-
|
|
53
|
-
"@tiptap/extension-strike": "^3.20.
|
|
54
|
-
"@tiptap/extension-
|
|
55
|
-
"@tiptap/
|
|
56
|
-
"@tiptap/
|
|
57
|
-
"@tiptap/
|
|
34
|
+
"@tiptap/core": "^3.20.4",
|
|
35
|
+
"@tiptap/extension-blockquote": "^3.20.4",
|
|
36
|
+
"@tiptap/extension-bold": "^3.20.4",
|
|
37
|
+
"@tiptap/extension-bullet-list": "^3.20.4",
|
|
38
|
+
"@tiptap/extension-code": "^3.20.4",
|
|
39
|
+
"@tiptap/extension-code-block": "^3.20.4",
|
|
40
|
+
"@tiptap/extension-document": "^3.20.4",
|
|
41
|
+
"@tiptap/extension-dropcursor": "^3.20.4",
|
|
42
|
+
"@tiptap/extension-gapcursor": "^3.20.4",
|
|
43
|
+
"@tiptap/extension-hard-break": "^3.20.4",
|
|
44
|
+
"@tiptap/extension-horizontal-rule": "^3.20.4",
|
|
45
|
+
"@tiptap/extension-link": "^3.20.4",
|
|
46
|
+
"@tiptap/extension-list": "^3.20.4",
|
|
47
|
+
"@tiptap/extension-list-item": "^3.20.4",
|
|
48
|
+
"@tiptap/extension-italic": "^3.20.4",
|
|
49
|
+
"@tiptap/extension-list-keymap": "^3.20.4",
|
|
50
|
+
"@tiptap/extension-ordered-list": "^3.20.4",
|
|
51
|
+
"@tiptap/extension-paragraph": "^3.20.4",
|
|
52
|
+
"@tiptap/extension-text": "^3.20.4",
|
|
53
|
+
"@tiptap/extension-strike": "^3.20.4",
|
|
54
|
+
"@tiptap/extension-underline": "^3.20.4",
|
|
55
|
+
"@tiptap/extensions": "^3.20.4",
|
|
56
|
+
"@tiptap/pm": "^3.20.4",
|
|
57
|
+
"@tiptap/extension-heading": "^3.20.4"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|