@tiptap/starter-kit 3.0.0-next.2 → 3.0.0-next.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Tiptap GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # @tiptap/starter-kit
2
+
2
3
  [![Version](https://img.shields.io/npm/v/@tiptap/starter-kit.svg?label=version)](https://www.npmjs.com/package/@tiptap/starter-kit)
3
4
  [![Downloads](https://img.shields.io/npm/dm/@tiptap/starter-kit.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
4
5
  [![License](https://img.shields.io/npm/l/@tiptap/starter-kit.svg)](https://www.npmjs.com/package/@tiptap/starter-kit)
5
6
  [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis)
6
7
 
7
8
  ## Introduction
8
- Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*.
9
+
10
+ Tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as _New York Times_, _The Guardian_ or _Atlassian_.
9
11
 
10
12
  ## Official Documentation
13
+
11
14
  Documentation can be found on the [Tiptap website](https://tiptap.dev).
12
15
 
13
16
  ## License
17
+
14
18
  Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).
package/dist/index.cjs CHANGED
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  StarterKit: () => StarterKit,
24
- default: () => src_default
24
+ default: () => index_default
25
25
  });
26
- module.exports = __toCommonJS(src_exports);
26
+ module.exports = __toCommonJS(index_exports);
27
27
 
28
28
  // src/starter-kit.ts
29
29
  var import_core = require("@tiptap/core");
@@ -33,8 +33,6 @@ var import_extension_bullet_list = require("@tiptap/extension-bullet-list");
33
33
  var import_extension_code = require("@tiptap/extension-code");
34
34
  var import_extension_code_block = require("@tiptap/extension-code-block");
35
35
  var import_extension_document = require("@tiptap/extension-document");
36
- var import_extension_dropcursor = require("@tiptap/extension-dropcursor");
37
- var import_extension_gapcursor = require("@tiptap/extension-gapcursor");
38
36
  var import_extension_hard_break = require("@tiptap/extension-hard-break");
39
37
  var import_extension_heading = require("@tiptap/extension-heading");
40
38
  var import_extension_history = require("@tiptap/extension-history");
@@ -48,10 +46,11 @@ var import_extension_paragraph = require("@tiptap/extension-paragraph");
48
46
  var import_extension_strike = require("@tiptap/extension-strike");
49
47
  var import_extension_text = require("@tiptap/extension-text");
50
48
  var import_extension_underline = require("@tiptap/extension-underline");
49
+ var import_extensions = require("@tiptap/extensions");
51
50
  var StarterKit = import_core.Extension.create({
52
51
  name: "starterKit",
53
52
  addExtensions() {
54
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
53
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
55
54
  const extensions = [];
56
55
  if (this.options.bold !== false) {
57
56
  extensions.push(import_extension_bold.Bold.configure((_a = this.options) == null ? void 0 : _a.bold));
@@ -72,10 +71,10 @@ var StarterKit = import_core.Extension.create({
72
71
  extensions.push(import_extension_document.Document.configure((_f = this.options) == null ? void 0 : _f.document));
73
72
  }
74
73
  if (this.options.dropcursor !== false) {
75
- extensions.push(import_extension_dropcursor.Dropcursor.configure((_g = this.options) == null ? void 0 : _g.dropcursor));
74
+ extensions.push(import_extensions.Dropcursor.configure((_g = this.options) == null ? void 0 : _g.dropcursor));
76
75
  }
77
76
  if (this.options.gapcursor !== false) {
78
- extensions.push(import_extension_gapcursor.Gapcursor.configure((_h = this.options) == null ? void 0 : _h.gapcursor));
77
+ extensions.push(import_extensions.Gapcursor.configure((_h = this.options) == null ? void 0 : _h.gapcursor));
79
78
  }
80
79
  if (this.options.hardBreak !== false) {
81
80
  extensions.push(import_extension_hard_break.HardBreak.configure((_i = this.options) == null ? void 0 : _i.hardBreak));
@@ -116,12 +115,15 @@ var StarterKit = import_core.Extension.create({
116
115
  if (this.options.underline !== false) {
117
116
  extensions.push(import_extension_underline.Underline.configure((_u = this.options) == null ? void 0 : _u.underline));
118
117
  }
118
+ if (this.options.trailingNode !== false) {
119
+ extensions.push(import_extensions.TrailingNode.configure((_v = this.options) == null ? void 0 : _v.trailingNode));
120
+ }
119
121
  return extensions;
120
122
  }
121
123
  });
122
124
 
123
125
  // src/index.ts
124
- var src_default = StarterKit;
126
+ var index_default = StarterKit;
125
127
  // Annotate the CommonJS export names for ESM import in node:
126
128
  0 && (module.exports = {
127
129
  StarterKit
@@ -1 +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 { Blockquote, BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Bold, BoldOptions } from '@tiptap/extension-bold'\nimport { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list'\nimport { Code, CodeOptions } from '@tiptap/extension-code'\nimport { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport { Dropcursor, DropcursorOptions } from '@tiptap/extension-dropcursor'\nimport { Gapcursor } from '@tiptap/extension-gapcursor'\nimport { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { Heading, HeadingOptions } from '@tiptap/extension-heading'\nimport { History, HistoryOptions } from '@tiptap/extension-history'\nimport { HorizontalRule, HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { Italic, ItalicOptions } from '@tiptap/extension-italic'\nimport { Link, LinkOptions } from '@tiptap/extension-link'\nimport { ListItem, ListItemOptions } from '@tiptap/extension-list-item'\nimport { ListKeymap, ListKeymapOptions } from '@tiptap/extension-list-keymap'\nimport { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list'\nimport { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Strike, StrikeOptions } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport { Underline, UnderlineOptions } from '@tiptap/extension-underline'\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 history extension will not be registered\n * @example history: false\n */\n history: Partial<HistoryOptions> | 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/**\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.history !== false) {\n extensions.push(History.configure(this.options?.history))\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 return extensions\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAA0B;AAC1B,kCAA8C;AAC9C,4BAAkC;AAClC,mCAA8C;AAC9C,4BAAkC;AAClC,kCAA4C;AAC5C,gCAAyB;AACzB,kCAA8C;AAC9C,iCAA0B;AAC1B,kCAA4C;AAC5C,+BAAwC;AACxC,+BAAwC;AACxC,uCAAsD;AACtD,8BAAsC;AACtC,4BAAkC;AAClC,iCAA0C;AAC1C,mCAA8C;AAC9C,oCAAgD;AAChD,iCAA4C;AAC5C,8BAAsC;AACtC,4BAAqB;AACrB,iCAA4C;AAuIrC,IAAM,aAAa,sBAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,gBAAgB;AA/JlB;AAgKI,UAAM,aAAa,CAAC;AAEpB,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,2BAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,uCAAW,WAAU,UAAK,YAAL,mBAAc,UAAU,CAAC;AAAA,IAChE;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,wCAAW,WAAU,UAAK,YAAL,mBAAc,UAAU,CAAC;AAAA,IAChE;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,2BAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;AAEA,QAAI,KAAK,QAAQ,cAAc,O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,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,2BAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;AAEA,QAAI,KAAK,QAAQ,gBAAgB,OAAO;AACtC,iBAAW,KAAK,0CAAY,WAAU,UAAK,YAAL,mBAAc,WAAW,CAAC;AAAA,IAClE;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,qCAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,WAAW,OAAO;AACjC,iBAAW,KAAK,+BAAO,WAAU,UAAK,YAAL,mBAAc,MAAM,CAAC;AAAA,IACxD;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,2BAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,qCAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;ADnPD,IAAO,cAAQ;","names":[]}
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 { Blockquote, BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Bold, BoldOptions } from '@tiptap/extension-bold'\nimport { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list'\nimport { Code, CodeOptions } from '@tiptap/extension-code'\nimport { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { Heading, HeadingOptions } from '@tiptap/extension-heading'\nimport { History, HistoryOptions } from '@tiptap/extension-history'\nimport { HorizontalRule, HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { Italic, ItalicOptions } from '@tiptap/extension-italic'\nimport { Link, LinkOptions } from '@tiptap/extension-link'\nimport { ListItem, ListItemOptions } from '@tiptap/extension-list-item'\nimport { ListKeymap, ListKeymapOptions } from '@tiptap/extension-list-keymap'\nimport { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list'\nimport { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Strike, StrikeOptions } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport { Underline, UnderlineOptions } from '@tiptap/extension-underline'\nimport { Dropcursor, DropcursorOptions, Gapcursor, TrailingNode, TrailingNodeOptions } 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 history extension will not be registered\n * @example history: false\n */\n history: Partial<HistoryOptions> | 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.history !== false) {\n extensions.push(History.configure(this.options?.history))\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;AAAA;;;ACAA,kBAA0B;AAC1B,kCAA8C;AAC9C,4BAAkC;AAClC,mCAA8C;AAC9C,4BAAkC;AAClC,kCAA4C;AAC5C,gCAAyB;AACzB,kCAA4C;AAC5C,+BAAwC;AACxC,+BAAwC;AACxC,uCAAsD;AACtD,8BAAsC;AACtC,4BAAkC;AAClC,iCAA0C;AAC1C,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AAc,IAAI,CAAC;AAAA,IACpD;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;;;AD5PD,IAAO,gBAAQ;","names":[]}
package/dist/index.d.cts CHANGED
@@ -4,7 +4,6 @@ import { BoldOptions } from '@tiptap/extension-bold';
4
4
  import { BulletListOptions } from '@tiptap/extension-bullet-list';
5
5
  import { CodeOptions } from '@tiptap/extension-code';
6
6
  import { CodeBlockOptions } from '@tiptap/extension-code-block';
7
- import { DropcursorOptions } from '@tiptap/extension-dropcursor';
8
7
  import { HardBreakOptions } from '@tiptap/extension-hard-break';
9
8
  import { HeadingOptions } from '@tiptap/extension-heading';
10
9
  import { HistoryOptions } from '@tiptap/extension-history';
@@ -17,6 +16,7 @@ import { OrderedListOptions } from '@tiptap/extension-ordered-list';
17
16
  import { ParagraphOptions } from '@tiptap/extension-paragraph';
18
17
  import { StrikeOptions } from '@tiptap/extension-strike';
19
18
  import { UnderlineOptions } from '@tiptap/extension-underline';
19
+ import { DropcursorOptions, TrailingNodeOptions } from '@tiptap/extensions';
20
20
 
21
21
  interface StarterKitOptions {
22
22
  /**
@@ -124,6 +124,11 @@ interface StarterKitOptions {
124
124
  * @example underline: false
125
125
  */
126
126
  underline: Partial<UnderlineOptions> | false;
127
+ /**
128
+ * If set to false, the trailingNode extension will not be registered
129
+ * @example trailingNode: false
130
+ */
131
+ trailingNode: Partial<TrailingNodeOptions> | false;
127
132
  }
128
133
  /**
129
134
  * The starter kit is a collection of essential editor extensions.
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import { BoldOptions } from '@tiptap/extension-bold';
4
4
  import { BulletListOptions } from '@tiptap/extension-bullet-list';
5
5
  import { CodeOptions } from '@tiptap/extension-code';
6
6
  import { CodeBlockOptions } from '@tiptap/extension-code-block';
7
- import { DropcursorOptions } from '@tiptap/extension-dropcursor';
8
7
  import { HardBreakOptions } from '@tiptap/extension-hard-break';
9
8
  import { HeadingOptions } from '@tiptap/extension-heading';
10
9
  import { HistoryOptions } from '@tiptap/extension-history';
@@ -17,6 +16,7 @@ import { OrderedListOptions } from '@tiptap/extension-ordered-list';
17
16
  import { ParagraphOptions } from '@tiptap/extension-paragraph';
18
17
  import { StrikeOptions } from '@tiptap/extension-strike';
19
18
  import { UnderlineOptions } from '@tiptap/extension-underline';
19
+ import { DropcursorOptions, TrailingNodeOptions } from '@tiptap/extensions';
20
20
 
21
21
  interface StarterKitOptions {
22
22
  /**
@@ -124,6 +124,11 @@ interface StarterKitOptions {
124
124
  * @example underline: false
125
125
  */
126
126
  underline: Partial<UnderlineOptions> | false;
127
+ /**
128
+ * If set to false, the trailingNode extension will not be registered
129
+ * @example trailingNode: false
130
+ */
131
+ trailingNode: Partial<TrailingNodeOptions> | false;
127
132
  }
128
133
  /**
129
134
  * The starter kit is a collection of essential editor extensions.
package/dist/index.js CHANGED
@@ -6,8 +6,6 @@ import { BulletList } from "@tiptap/extension-bullet-list";
6
6
  import { Code } from "@tiptap/extension-code";
7
7
  import { CodeBlock } from "@tiptap/extension-code-block";
8
8
  import { Document } from "@tiptap/extension-document";
9
- import { Dropcursor } from "@tiptap/extension-dropcursor";
10
- import { Gapcursor } from "@tiptap/extension-gapcursor";
11
9
  import { HardBreak } from "@tiptap/extension-hard-break";
12
10
  import { Heading } from "@tiptap/extension-heading";
13
11
  import { History } from "@tiptap/extension-history";
@@ -21,10 +19,11 @@ import { Paragraph } from "@tiptap/extension-paragraph";
21
19
  import { Strike } from "@tiptap/extension-strike";
22
20
  import { Text } from "@tiptap/extension-text";
23
21
  import { Underline } from "@tiptap/extension-underline";
22
+ import { Dropcursor, Gapcursor, TrailingNode } from "@tiptap/extensions";
24
23
  var StarterKit = Extension.create({
25
24
  name: "starterKit",
26
25
  addExtensions() {
27
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
28
27
  const extensions = [];
29
28
  if (this.options.bold !== false) {
30
29
  extensions.push(Bold.configure((_a = this.options) == null ? void 0 : _a.bold));
@@ -89,14 +88,17 @@ var StarterKit = Extension.create({
89
88
  if (this.options.underline !== false) {
90
89
  extensions.push(Underline.configure((_u = this.options) == null ? void 0 : _u.underline));
91
90
  }
91
+ if (this.options.trailingNode !== false) {
92
+ extensions.push(TrailingNode.configure((_v = this.options) == null ? void 0 : _v.trailingNode));
93
+ }
92
94
  return extensions;
93
95
  }
94
96
  });
95
97
 
96
98
  // src/index.ts
97
- var src_default = StarterKit;
99
+ var index_default = StarterKit;
98
100
  export {
99
101
  StarterKit,
100
- src_default as default
102
+ index_default as default
101
103
  };
102
104
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/starter-kit.ts","../src/index.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { Blockquote, BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Bold, BoldOptions } from '@tiptap/extension-bold'\nimport { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list'\nimport { Code, CodeOptions } from '@tiptap/extension-code'\nimport { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport { Dropcursor, DropcursorOptions } from '@tiptap/extension-dropcursor'\nimport { Gapcursor } from '@tiptap/extension-gapcursor'\nimport { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { Heading, HeadingOptions } from '@tiptap/extension-heading'\nimport { History, HistoryOptions } from '@tiptap/extension-history'\nimport { HorizontalRule, HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { Italic, ItalicOptions } from '@tiptap/extension-italic'\nimport { Link, LinkOptions } from '@tiptap/extension-link'\nimport { ListItem, ListItemOptions } from '@tiptap/extension-list-item'\nimport { ListKeymap, ListKeymapOptions } from '@tiptap/extension-list-keymap'\nimport { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list'\nimport { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Strike, StrikeOptions } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport { Underline, UnderlineOptions } from '@tiptap/extension-underline'\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 history extension will not be registered\n * @example history: false\n */\n history: Partial<HistoryOptions> | 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/**\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.history !== false) {\n extensions.push(History.configure(this.options?.history))\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 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;AAC1B,SAAS,kBAAqC;AAC9C,SAAS,YAAyB;AAClC,SAAS,kBAAqC;AAC9C,SAAS,YAAyB;AAClC,SAAS,iBAAmC;AAC5C,SAAS,gBAAgB;AACzB,SAAS,kBAAqC;AAC9C,SAAS,iBAAiB;AAC1B,SAAS,iBAAmC;AAC5C,SAAS,eAA+B;AACxC,SAAS,eAA+B;AACxC,SAAS,sBAA6C;AACtD,SAAS,cAA6B;AACtC,SAAS,YAAyB;AAClC,SAAS,gBAAiC;AAC1C,SAAS,kBAAqC;AAC9C,SAAS,mBAAuC;AAChD,SAAS,iBAAmC;AAC5C,S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iBAAW,KAAK,UAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,WAAO;AAAA,EACT;AACF,CAAC;;;ACnPD,IAAO,cAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/starter-kit.ts","../src/index.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { Blockquote, BlockquoteOptions } from '@tiptap/extension-blockquote'\nimport { Bold, BoldOptions } from '@tiptap/extension-bold'\nimport { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list'\nimport { Code, CodeOptions } from '@tiptap/extension-code'\nimport { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block'\nimport { Document } from '@tiptap/extension-document'\nimport { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break'\nimport { Heading, HeadingOptions } from '@tiptap/extension-heading'\nimport { History, HistoryOptions } from '@tiptap/extension-history'\nimport { HorizontalRule, HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule'\nimport { Italic, ItalicOptions } from '@tiptap/extension-italic'\nimport { Link, LinkOptions } from '@tiptap/extension-link'\nimport { ListItem, ListItemOptions } from '@tiptap/extension-list-item'\nimport { ListKeymap, ListKeymapOptions } from '@tiptap/extension-list-keymap'\nimport { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list'\nimport { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'\nimport { Strike, StrikeOptions } from '@tiptap/extension-strike'\nimport { Text } from '@tiptap/extension-text'\nimport { Underline, UnderlineOptions } from '@tiptap/extension-underline'\nimport { Dropcursor, DropcursorOptions, Gapcursor, TrailingNode, TrailingNodeOptions } 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 history extension will not be registered\n * @example history: false\n */\n history: Partial<HistoryOptions> | 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.history !== false) {\n extensions.push(History.configure(this.options?.history))\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;AAC1B,SAAS,kBAAqC;AAC9C,SAAS,YAAyB;AAClC,SAAS,kBAAqC;AAC9C,SAAS,YAAyB;AAClC,SAAS,iBAAmC;AAC5C,SAAS,gBAAgB;AACzB,SAAS,iBAAmC;AAC5C,SAAS,eAA+B;AACxC,SAAS,eAA+B;AACxC,SAAS,sBAA6C;AACtD,SAAS,cAA6B;AACtC,SAAS,YAAyB;AAClC,SAAS,gBAAiC;AAC1C,SAAS,kBAAqC;AAC9C,SAAS,mBAAuC;AAChD,SAAS,iBAAmC;AAC5C,SAAS,cAA6B;AACtC,SAAS,YAAY;AACrB,SAAS,iBAAmC;AAC5C,SAAS,YAA+B,WAAW,oBAAyC;AA6IrF,IAAM,aAAa,UAAU,OAA0B;AAAA,EAC5D,MAAM;AAAA,EAEN,gBAAgB;AApKlB;AAqKI,UAAM,aAAa,CAAC;AAEpB,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,WAAU,UAAK,YAAL,mBAAc,UAAU,CAAC;AAAA,IAChE;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,WAAU,UAAK,YAAL,mBAAc,UAAU,CAAC;AAAA,IAChE;A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;AAAA,IAC5D;AAEA,QAAI,KAAK,QAAQ,eAAe,OAAO;AACrC,iBAAW,KAAK,WAAW,WAAU,UAAK,YAAL,mBAAc,UAAU,CAAC;AAAA,IAChE;AAEA,QAAI,KAAK,QAAQ,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,WAAU,UAAK,YAAL,mBAAc,WAAW,CAAC;AAAA,IAClE;AAEA,QAAI,KAAK,QAAQ,cAAc,OAAO;AACpC,iBAAW,KAAK,UAAU,WAAU,UAAK,YAAL,mBAAc,SAAS,CAAC;AAAA,IAC9D;AAEA,QAAI,KAAK,QAAQ,WAAW,OAAO;AACjC,iBAAW,KAAK,OAAO,WAAU,UAAK,YAAL,mBAAc,MAAM,CAAC;AAAA,IACxD;AAEA,QAAI,KAAK,QAAQ,SAAS,OAAO;AAC/B,iBAAW,KAAK,KAAK,WAAU,UAAK,YAAL,mBAAc,IAAI,CAAC;AAAA,IACpD;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;;;AC5PD,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.0.0-next.2",
4
+ "version": "3.0.0-next.4",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -14,7 +14,10 @@
14
14
  },
15
15
  "exports": {
16
16
  ".": {
17
- "types": "./dist/index.d.ts",
17
+ "types": {
18
+ "import": "./dist/index.d.ts",
19
+ "require": "./dist/index.d.cts"
20
+ },
18
21
  "import": "./dist/index.js",
19
22
  "require": "./dist/index.cjs"
20
23
  }
@@ -28,29 +31,30 @@
28
31
  "dist"
29
32
  ],
30
33
  "dependencies": {
31
- "@tiptap/core": "^3.0.0-next.2",
32
- "@tiptap/extension-blockquote": "^3.0.0-next.2",
33
- "@tiptap/extension-bold": "^3.0.0-next.2",
34
- "@tiptap/extension-bullet-list": "^3.0.0-next.2",
35
- "@tiptap/extension-code": "^3.0.0-next.2",
36
- "@tiptap/extension-code-block": "^3.0.0-next.2",
37
- "@tiptap/extension-document": "^3.0.0-next.2",
38
- "@tiptap/extension-dropcursor": "^3.0.0-next.2",
39
- "@tiptap/extension-gapcursor": "^3.0.0-next.2",
40
- "@tiptap/extension-hard-break": "^3.0.0-next.2",
41
- "@tiptap/extension-heading": "^3.0.0-next.2",
42
- "@tiptap/extension-history": "^3.0.0-next.2",
43
- "@tiptap/extension-horizontal-rule": "^3.0.0-next.2",
44
- "@tiptap/extension-italic": "^3.0.0-next.2",
45
- "@tiptap/extension-list-item": "^3.0.0-next.2",
46
- "@tiptap/extension-list-keymap": "^3.0.0-next.2",
47
- "@tiptap/extension-link": "^3.0.0-next.2",
48
- "@tiptap/extension-ordered-list": "^3.0.0-next.2",
49
- "@tiptap/extension-paragraph": "^3.0.0-next.2",
50
- "@tiptap/extension-strike": "^3.0.0-next.2",
51
- "@tiptap/extension-underline": "^3.0.0-next.2",
52
- "@tiptap/extension-text": "^3.0.0-next.2",
53
- "@tiptap/pm": "^3.0.0-next.2"
34
+ "@tiptap/core": "^3.0.0-next.4",
35
+ "@tiptap/extension-blockquote": "^3.0.0-next.4",
36
+ "@tiptap/extension-bold": "^3.0.0-next.4",
37
+ "@tiptap/extension-bullet-list": "^3.0.0-next.4",
38
+ "@tiptap/extension-code": "^3.0.0-next.4",
39
+ "@tiptap/extension-code-block": "^3.0.0-next.4",
40
+ "@tiptap/extension-document": "^3.0.0-next.4",
41
+ "@tiptap/extension-dropcursor": "^3.0.0-next.4",
42
+ "@tiptap/extension-gapcursor": "^3.0.0-next.4",
43
+ "@tiptap/extension-hard-break": "^3.0.0-next.4",
44
+ "@tiptap/extension-heading": "^3.0.0-next.4",
45
+ "@tiptap/extension-history": "^3.0.0-next.4",
46
+ "@tiptap/extension-horizontal-rule": "^3.0.0-next.4",
47
+ "@tiptap/extension-italic": "^3.0.0-next.4",
48
+ "@tiptap/extension-link": "^3.0.0-next.4",
49
+ "@tiptap/extension-list-item": "^3.0.0-next.4",
50
+ "@tiptap/extension-list-keymap": "^3.0.0-next.4",
51
+ "@tiptap/extension-ordered-list": "^3.0.0-next.4",
52
+ "@tiptap/extension-paragraph": "^3.0.0-next.4",
53
+ "@tiptap/extension-strike": "^3.0.0-next.4",
54
+ "@tiptap/extension-text": "^3.0.0-next.4",
55
+ "@tiptap/extension-underline": "^3.0.0-next.4",
56
+ "@tiptap/extensions": "^3.0.0-next.4",
57
+ "@tiptap/pm": "^3.0.0-next.4"
54
58
  },
55
59
  "repository": {
56
60
  "type": "git",
@@ -58,6 +62,7 @@
58
62
  "directory": "packages/starter-kit"
59
63
  },
60
64
  "scripts": {
61
- "build": "tsup"
65
+ "build": "tsup",
66
+ "lint": "prettier ./src/ --check && eslint --cache --quiet --no-error-on-unmatched-pattern ./src/"
62
67
  }
63
- }
68
+ }
@@ -5,8 +5,6 @@ import { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list'
5
5
  import { Code, CodeOptions } from '@tiptap/extension-code'
6
6
  import { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block'
7
7
  import { Document } from '@tiptap/extension-document'
8
- import { Dropcursor, DropcursorOptions } from '@tiptap/extension-dropcursor'
9
- import { Gapcursor } from '@tiptap/extension-gapcursor'
10
8
  import { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break'
11
9
  import { Heading, HeadingOptions } from '@tiptap/extension-heading'
12
10
  import { History, HistoryOptions } from '@tiptap/extension-history'
@@ -20,133 +18,140 @@ import { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'
20
18
  import { Strike, StrikeOptions } from '@tiptap/extension-strike'
21
19
  import { Text } from '@tiptap/extension-text'
22
20
  import { Underline, UnderlineOptions } from '@tiptap/extension-underline'
21
+ import { Dropcursor, DropcursorOptions, Gapcursor, TrailingNode, TrailingNodeOptions } from '@tiptap/extensions'
23
22
 
24
23
  export interface StarterKitOptions {
25
24
  /**
26
25
  * If set to false, the blockquote extension will not be registered
27
26
  * @example blockquote: false
28
27
  */
29
- blockquote: Partial<BlockquoteOptions> | false,
28
+ blockquote: Partial<BlockquoteOptions> | false
30
29
 
31
30
  /**
32
31
  * If set to false, the bold extension will not be registered
33
32
  * @example bold: false
34
33
  */
35
- bold: Partial<BoldOptions> | false,
34
+ bold: Partial<BoldOptions> | false
36
35
 
37
36
  /**
38
37
  * If set to false, the bulletList extension will not be registered
39
38
  * @example bulletList: false
40
39
  */
41
- bulletList: Partial<BulletListOptions> | false,
40
+ bulletList: Partial<BulletListOptions> | false
42
41
 
43
42
  /**
44
43
  * If set to false, the code extension will not be registered
45
44
  * @example code: false
46
45
  */
47
- code: Partial<CodeOptions> | false,
46
+ code: Partial<CodeOptions> | false
48
47
 
49
48
  /**
50
49
  * If set to false, the codeBlock extension will not be registered
51
50
  * @example codeBlock: false
52
51
  */
53
- codeBlock: Partial<CodeBlockOptions> | false,
52
+ codeBlock: Partial<CodeBlockOptions> | false
54
53
 
55
54
  /**
56
55
  * If set to false, the document extension will not be registered
57
56
  * @example document: false
58
57
  */
59
- document: false,
58
+ document: false
60
59
 
61
60
  /**
62
61
  * If set to false, the dropcursor extension will not be registered
63
62
  * @example dropcursor: false
64
63
  */
65
- dropcursor: Partial<DropcursorOptions> | false,
64
+ dropcursor: Partial<DropcursorOptions> | false
66
65
 
67
66
  /**
68
67
  * If set to false, the gapcursor extension will not be registered
69
68
  * @example gapcursor: false
70
69
  */
71
- gapcursor: false,
70
+ gapcursor: false
72
71
 
73
72
  /**
74
73
  * If set to false, the hardBreak extension will not be registered
75
74
  * @example hardBreak: false
76
75
  */
77
- hardBreak: Partial<HardBreakOptions> | false,
76
+ hardBreak: Partial<HardBreakOptions> | false
78
77
 
79
78
  /**
80
79
  * If set to false, the heading extension will not be registered
81
80
  * @example heading: false
82
81
  */
83
- heading: Partial<HeadingOptions> | false,
82
+ heading: Partial<HeadingOptions> | false
84
83
 
85
84
  /**
86
85
  * If set to false, the history extension will not be registered
87
86
  * @example history: false
88
87
  */
89
- history: Partial<HistoryOptions> | false,
88
+ history: Partial<HistoryOptions> | false
90
89
 
91
90
  /**
92
91
  * If set to false, the horizontalRule extension will not be registered
93
92
  * @example horizontalRule: false
94
93
  */
95
- horizontalRule: Partial<HorizontalRuleOptions> | false,
94
+ horizontalRule: Partial<HorizontalRuleOptions> | false
96
95
 
97
96
  /**
98
97
  * If set to false, the italic extension will not be registered
99
98
  * @example italic: false
100
99
  */
101
- italic: Partial<ItalicOptions> | false,
100
+ italic: Partial<ItalicOptions> | false
102
101
 
103
102
  /**
104
103
  * If set to false, the listItem extension will not be registered
105
104
  * @example listItem: false
106
105
  */
107
- listItem: Partial<ListItemOptions> | false,
106
+ listItem: Partial<ListItemOptions> | false
108
107
 
109
108
  /**
110
109
  * If set to false, the listItemKeymap extension will not be registered
111
110
  * @example listKeymap: false
112
111
  */
113
- listKeymap: Partial<ListKeymapOptions> | false,
112
+ listKeymap: Partial<ListKeymapOptions> | false
114
113
 
115
114
  /**
116
115
  * If set to false, the link extension will not be registered
117
116
  * @example link: false
118
117
  */
119
- link: Partial<LinkOptions> | false,
118
+ link: Partial<LinkOptions> | false
120
119
 
121
120
  /**
122
121
  * If set to false, the orderedList extension will not be registered
123
122
  * @example orderedList: false
124
123
  */
125
- orderedList: Partial<OrderedListOptions> | false,
124
+ orderedList: Partial<OrderedListOptions> | false
126
125
 
127
126
  /**
128
127
  * If set to false, the paragraph extension will not be registered
129
128
  * @example paragraph: false
130
129
  */
131
- paragraph: Partial<ParagraphOptions> | false,
130
+ paragraph: Partial<ParagraphOptions> | false
132
131
 
133
132
  /**
134
133
  * If set to false, the strike extension will not be registered
135
134
  * @example strike: false
136
135
  */
137
- strike: Partial<StrikeOptions> | false,
136
+ strike: Partial<StrikeOptions> | false
138
137
 
139
138
  /**
140
139
  * If set to false, the text extension will not be registered
141
140
  * @example text: false
142
141
  */
143
- text: false,
142
+ text: false
144
143
 
145
144
  /**
146
145
  * If set to false, the underline extension will not be registered
147
146
  * @example underline: false
148
147
  */
149
- underline: Partial<UnderlineOptions> | false,
148
+ underline: Partial<UnderlineOptions> | false
149
+
150
+ /**
151
+ * If set to false, the trailingNode extension will not be registered
152
+ * @example trailingNode: false
153
+ */
154
+ trailingNode: Partial<TrailingNodeOptions> | false
150
155
  }
151
156
 
152
157
  /**
@@ -244,6 +249,10 @@ export const StarterKit = Extension.create<StarterKitOptions>({
244
249
  extensions.push(Underline.configure(this.options?.underline))
245
250
  }
246
251
 
252
+ if (this.options.trailingNode !== false) {
253
+ extensions.push(TrailingNode.configure(this.options?.trailingNode))
254
+ }
255
+
247
256
  return extensions
248
257
  },
249
258
  })