Socket
Socket
Sign inDemoInstall

@tiptap/starter-kit

Package Overview
Dependencies
Maintainers
5
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/starter-kit - npm Package Compare versions

Comparing version 3.0.0-next.0 to 3.0.0-next.1

dist/index.d.cts

188

dist/index.js

@@ -1,90 +0,102 @@

import { Extension } from '@tiptap/core';
import { Blockquote } from '@tiptap/extension-blockquote';
import { Bold } from '@tiptap/extension-bold';
import { BulletList } from '@tiptap/extension-bullet-list';
import { Code } from '@tiptap/extension-code';
import { CodeBlock } from '@tiptap/extension-code-block';
import { Document } from '@tiptap/extension-document';
import { Dropcursor } from '@tiptap/extension-dropcursor';
import { Gapcursor } from '@tiptap/extension-gapcursor';
import { HardBreak } from '@tiptap/extension-hard-break';
import { Heading } from '@tiptap/extension-heading';
import { History } from '@tiptap/extension-history';
import { HorizontalRule } from '@tiptap/extension-horizontal-rule';
import { Italic } from '@tiptap/extension-italic';
import { ListItem } from '@tiptap/extension-list-item';
import { OrderedList } from '@tiptap/extension-ordered-list';
import { Paragraph } from '@tiptap/extension-paragraph';
import { Strike } from '@tiptap/extension-strike';
import { Text } from '@tiptap/extension-text';
/**
* The starter kit is a collection of essential editor extensions.
*
* It’s a good starting point for building your own editor.
*/
const StarterKit = Extension.create({
name: 'starterKit',
addExtensions() {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
const extensions = [];
if (this.options.bold !== false) {
extensions.push(Bold.configure((_a = this.options) === null || _a === void 0 ? void 0 : _a.bold));
}
if (this.options.blockquote !== false) {
extensions.push(Blockquote.configure((_b = this.options) === null || _b === void 0 ? void 0 : _b.blockquote));
}
if (this.options.bulletList !== false) {
extensions.push(BulletList.configure((_c = this.options) === null || _c === void 0 ? void 0 : _c.bulletList));
}
if (this.options.code !== false) {
extensions.push(Code.configure((_d = this.options) === null || _d === void 0 ? void 0 : _d.code));
}
if (this.options.codeBlock !== false) {
extensions.push(CodeBlock.configure((_e = this.options) === null || _e === void 0 ? void 0 : _e.codeBlock));
}
if (this.options.document !== false) {
extensions.push(Document.configure((_f = this.options) === null || _f === void 0 ? void 0 : _f.document));
}
if (this.options.dropcursor !== false) {
extensions.push(Dropcursor.configure((_g = this.options) === null || _g === void 0 ? void 0 : _g.dropcursor));
}
if (this.options.gapcursor !== false) {
extensions.push(Gapcursor.configure((_h = this.options) === null || _h === void 0 ? void 0 : _h.gapcursor));
}
if (this.options.hardBreak !== false) {
extensions.push(HardBreak.configure((_j = this.options) === null || _j === void 0 ? void 0 : _j.hardBreak));
}
if (this.options.heading !== false) {
extensions.push(Heading.configure((_k = this.options) === null || _k === void 0 ? void 0 : _k.heading));
}
if (this.options.history !== false) {
extensions.push(History.configure((_l = this.options) === null || _l === void 0 ? void 0 : _l.history));
}
if (this.options.horizontalRule !== false) {
extensions.push(HorizontalRule.configure((_m = this.options) === null || _m === void 0 ? void 0 : _m.horizontalRule));
}
if (this.options.italic !== false) {
extensions.push(Italic.configure((_o = this.options) === null || _o === void 0 ? void 0 : _o.italic));
}
if (this.options.listItem !== false) {
extensions.push(ListItem.configure((_p = this.options) === null || _p === void 0 ? void 0 : _p.listItem));
}
if (this.options.orderedList !== false) {
extensions.push(OrderedList.configure((_q = this.options) === null || _q === void 0 ? void 0 : _q.orderedList));
}
if (this.options.paragraph !== false) {
extensions.push(Paragraph.configure((_r = this.options) === null || _r === void 0 ? void 0 : _r.paragraph));
}
if (this.options.strike !== false) {
extensions.push(Strike.configure((_s = this.options) === null || _s === void 0 ? void 0 : _s.strike));
}
if (this.options.text !== false) {
extensions.push(Text.configure((_t = this.options) === null || _t === void 0 ? void 0 : _t.text));
}
return extensions;
},
// src/starter-kit.ts
import { Extension } from "@tiptap/core";
import { Blockquote } from "@tiptap/extension-blockquote";
import { Bold } from "@tiptap/extension-bold";
import { BulletList } from "@tiptap/extension-bullet-list";
import { Code } from "@tiptap/extension-code";
import { CodeBlock } from "@tiptap/extension-code-block";
import { Document } from "@tiptap/extension-document";
import { Dropcursor } from "@tiptap/extension-dropcursor";
import { Gapcursor } from "@tiptap/extension-gapcursor";
import { HardBreak } from "@tiptap/extension-hard-break";
import { Heading } from "@tiptap/extension-heading";
import { History } from "@tiptap/extension-history";
import { HorizontalRule } from "@tiptap/extension-horizontal-rule";
import { Italic } from "@tiptap/extension-italic";
import { Link } from "@tiptap/extension-link";
import { ListItem } from "@tiptap/extension-list-item";
import { ListKeymap } from "@tiptap/extension-list-keymap";
import { OrderedList } from "@tiptap/extension-ordered-list";
import { Paragraph } from "@tiptap/extension-paragraph";
import { Strike } from "@tiptap/extension-strike";
import { Text } from "@tiptap/extension-text";
import { Underline } from "@tiptap/extension-underline";
var StarterKit = Extension.create({
name: "starterKit",
addExtensions() {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
const extensions = [];
if (this.options.bold !== false) {
extensions.push(Bold.configure((_a = this.options) == null ? void 0 : _a.bold));
}
if (this.options.blockquote !== false) {
extensions.push(Blockquote.configure((_b = this.options) == null ? void 0 : _b.blockquote));
}
if (this.options.bulletList !== false) {
extensions.push(BulletList.configure((_c = this.options) == null ? void 0 : _c.bulletList));
}
if (this.options.code !== false) {
extensions.push(Code.configure((_d = this.options) == null ? void 0 : _d.code));
}
if (this.options.codeBlock !== false) {
extensions.push(CodeBlock.configure((_e = this.options) == null ? void 0 : _e.codeBlock));
}
if (this.options.document !== false) {
extensions.push(Document.configure((_f = this.options) == null ? void 0 : _f.document));
}
if (this.options.dropcursor !== false) {
extensions.push(Dropcursor.configure((_g = this.options) == null ? void 0 : _g.dropcursor));
}
if (this.options.gapcursor !== false) {
extensions.push(Gapcursor.configure((_h = this.options) == null ? void 0 : _h.gapcursor));
}
if (this.options.hardBreak !== false) {
extensions.push(HardBreak.configure((_i = this.options) == null ? void 0 : _i.hardBreak));
}
if (this.options.heading !== false) {
extensions.push(Heading.configure((_j = this.options) == null ? void 0 : _j.heading));
}
if (this.options.history !== false) {
extensions.push(History.configure((_k = this.options) == null ? void 0 : _k.history));
}
if (this.options.horizontalRule !== false) {
extensions.push(HorizontalRule.configure((_l = this.options) == null ? void 0 : _l.horizontalRule));
}
if (this.options.italic !== false) {
extensions.push(Italic.configure((_m = this.options) == null ? void 0 : _m.italic));
}
if (this.options.listItem !== false) {
extensions.push(ListItem.configure((_n = this.options) == null ? void 0 : _n.listItem));
}
if (this.options.listKeymap !== false) {
extensions.push(ListKeymap.configure((_o = this.options) == null ? void 0 : _o.listKeymap));
}
if (this.options.link !== false) {
extensions.push(Link.configure((_p = this.options) == null ? void 0 : _p.link));
}
if (this.options.orderedList !== false) {
extensions.push(OrderedList.configure((_q = this.options) == null ? void 0 : _q.orderedList));
}
if (this.options.paragraph !== false) {
extensions.push(Paragraph.configure((_r = this.options) == null ? void 0 : _r.paragraph));
}
if (this.options.strike !== false) {
extensions.push(Strike.configure((_s = this.options) == null ? void 0 : _s.strike));
}
if (this.options.text !== false) {
extensions.push(Text.configure((_t = this.options) == null ? void 0 : _t.text));
}
if (this.options.underline !== false) {
extensions.push(Underline.configure((_u = this.options) == null ? void 0 : _u.underline));
}
return extensions;
}
});
export { StarterKit, StarterKit as default };
//# sourceMappingURL=index.js.map
// src/index.ts
var src_default = StarterKit;
export {
StarterKit,
src_default as default
};
//# sourceMappingURL=index.js.map
{
"name": "@tiptap/starter-kit",
"description": "starter kit for tiptap",
"version": "3.0.0-next.0",
"version": "3.0.0-next.1",
"homepage": "https://tiptap.dev",

@@ -17,3 +17,3 @@ "keywords": [

".": {
"types": "./dist/packages/starter-kit/src/index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.js",

@@ -25,4 +25,3 @@ "require": "./dist/index.cjs"

"module": "dist/index.js",
"umd": "dist/index.umd.js",
"types": "dist/packages/starter-kit/src/index.d.ts",
"types": "dist/index.d.ts",
"type": "module",

@@ -34,21 +33,25 @@ "files": [

"dependencies": {
"@tiptap/core": "^3.0.0-next.0",
"@tiptap/extension-blockquote": "^3.0.0-next.0",
"@tiptap/extension-bold": "^3.0.0-next.0",
"@tiptap/extension-bullet-list": "^3.0.0-next.0",
"@tiptap/extension-code": "^3.0.0-next.0",
"@tiptap/extension-code-block": "^3.0.0-next.0",
"@tiptap/extension-document": "^3.0.0-next.0",
"@tiptap/extension-dropcursor": "^3.0.0-next.0",
"@tiptap/extension-gapcursor": "^3.0.0-next.0",
"@tiptap/extension-hard-break": "^3.0.0-next.0",
"@tiptap/extension-heading": "^3.0.0-next.0",
"@tiptap/extension-history": "^3.0.0-next.0",
"@tiptap/extension-horizontal-rule": "^3.0.0-next.0",
"@tiptap/extension-italic": "^3.0.0-next.0",
"@tiptap/extension-list-item": "^3.0.0-next.0",
"@tiptap/extension-ordered-list": "^3.0.0-next.0",
"@tiptap/extension-paragraph": "^3.0.0-next.0",
"@tiptap/extension-strike": "^3.0.0-next.0",
"@tiptap/extension-text": "^3.0.0-next.0"
"@tiptap/core": "^3.0.0-next.1",
"@tiptap/extension-blockquote": "^3.0.0-next.1",
"@tiptap/extension-bold": "^3.0.0-next.1",
"@tiptap/extension-bullet-list": "^3.0.0-next.1",
"@tiptap/extension-code": "^3.0.0-next.1",
"@tiptap/extension-code-block": "^3.0.0-next.1",
"@tiptap/extension-document": "^3.0.0-next.1",
"@tiptap/extension-dropcursor": "^3.0.0-next.1",
"@tiptap/extension-gapcursor": "^3.0.0-next.1",
"@tiptap/extension-hard-break": "^3.0.0-next.1",
"@tiptap/extension-heading": "^3.0.0-next.1",
"@tiptap/extension-history": "^3.0.0-next.1",
"@tiptap/extension-horizontal-rule": "^3.0.0-next.1",
"@tiptap/extension-italic": "^3.0.0-next.1",
"@tiptap/extension-list-item": "^3.0.0-next.1",
"@tiptap/extension-list-keymap": "^3.0.0-next.1",
"@tiptap/extension-link": "^3.0.0-next.1",
"@tiptap/extension-ordered-list": "^3.0.0-next.1",
"@tiptap/extension-paragraph": "^3.0.0-next.1",
"@tiptap/extension-strike": "^3.0.0-next.1",
"@tiptap/extension-underline": "^3.0.0-next.1",
"@tiptap/extension-text": "^3.0.0-next.1",
"@tiptap/pm": "^3.0.0-next.1"
},

@@ -61,5 +64,4 @@ "repository": {

"scripts": {
"clean": "rm -rf dist",
"build": "npm run clean && rollup -c"
"build": "tsup"
}
}

@@ -15,3 +15,5 @@ import { Extension } from '@tiptap/core'

import { Italic, ItalicOptions } from '@tiptap/extension-italic'
import { Link, LinkOptions } from '@tiptap/extension-link'
import { ListItem, ListItemOptions } from '@tiptap/extension-list-item'
import { ListKeymap, ListKeymapOptions } from '@tiptap/extension-list-keymap'
import { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list'

@@ -21,2 +23,3 @@ import { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph'

import { Text } from '@tiptap/extension-text'
import { Underline, UnderlineOptions } from '@tiptap/extension-underline'

@@ -109,2 +112,14 @@ export interface StarterKitOptions {

/**
* If set to false, the listItemKeymap extension will not be registered
* @example listKeymap: false
*/
listKeymap: Partial<ListKeymapOptions> | false,
/**
* If set to false, the link extension will not be registered
* @example link: false
*/
link: Partial<LinkOptions> | false,
/**
* If set to false, the orderedList extension will not be registered

@@ -132,2 +147,8 @@ * @example orderedList: false

text: false,
/**
* If set to false, the underline extension will not be registered
* @example underline: false
*/
underline: Partial<UnderlineOptions> | false,
}

@@ -202,2 +223,10 @@

if (this.options.listKeymap !== false) {
extensions.push(ListKeymap.configure(this.options?.listKeymap))
}
if (this.options.link !== false) {
extensions.push(Link.configure(this.options?.link))
}
if (this.options.orderedList !== false) {

@@ -219,4 +248,8 @@ extensions.push(OrderedList.configure(this.options?.orderedList))

if (this.options.underline !== false) {
extensions.push(Underline.configure(this.options?.underline))
}
return extensions
},
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc