@tiptap/extension-list-item 2.0.0-beta.209 → 2.0.0-beta.210

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 ADDED
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/list-item.ts
2
+ var _core = require('@tiptap/core');
3
+ var ListItem = _core.Node.create({
4
+ name: "listItem",
5
+ addOptions() {
6
+ return {
7
+ HTMLAttributes: {}
8
+ };
9
+ },
10
+ content: "paragraph block*",
11
+ defining: true,
12
+ parseHTML() {
13
+ return [
14
+ {
15
+ tag: "li"
16
+ }
17
+ ];
18
+ },
19
+ renderHTML({ HTMLAttributes }) {
20
+ return ["li", _core.mergeAttributes.call(void 0, this.options.HTMLAttributes, HTMLAttributes), 0];
21
+ },
22
+ addKeyboardShortcuts() {
23
+ return {
24
+ Enter: () => this.editor.commands.splitListItem(this.name),
25
+ Tab: () => this.editor.commands.sinkListItem(this.name),
26
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
27
+ };
28
+ }
29
+ });
30
+
31
+ // src/index.ts
32
+ var src_default = ListItem;
33
+
34
+
35
+
36
+ exports.ListItem = ListItem; exports.default = src_default;
@@ -0,0 +1,8 @@
1
+ import { Node } from '@tiptap/core';
2
+
3
+ interface ListItemOptions {
4
+ HTMLAttributes: Record<string, any>;
5
+ }
6
+ declare const ListItem: Node<ListItemOptions, any>;
7
+
8
+ export { ListItem, ListItemOptions, ListItem as default };
package/dist/index.js ADDED
@@ -0,0 +1,36 @@
1
+ // src/list-item.ts
2
+ import { mergeAttributes, Node } from "@tiptap/core";
3
+ var ListItem = Node.create({
4
+ name: "listItem",
5
+ addOptions() {
6
+ return {
7
+ HTMLAttributes: {}
8
+ };
9
+ },
10
+ content: "paragraph block*",
11
+ defining: true,
12
+ parseHTML() {
13
+ return [
14
+ {
15
+ tag: "li"
16
+ }
17
+ ];
18
+ },
19
+ renderHTML({ HTMLAttributes }) {
20
+ return ["li", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
21
+ },
22
+ addKeyboardShortcuts() {
23
+ return {
24
+ Enter: () => this.editor.commands.splitListItem(this.name),
25
+ Tab: () => this.editor.commands.sinkListItem(this.name),
26
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
27
+ };
28
+ }
29
+ });
30
+
31
+ // src/index.ts
32
+ var src_default = ListItem;
33
+ export {
34
+ ListItem,
35
+ src_default as default
36
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-list-item",
3
3
  "description": "list item extension for tiptap",
4
- "version": "2.0.0-beta.209",
4
+ "version": "2.0.0-beta.210",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -15,28 +15,41 @@
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/packages/extension-list-item/src/index.d.ts",
19
- "import": "./dist/tiptap-extension-list-item.esm.js",
20
- "require": "./dist/tiptap-extension-list-item.cjs"
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
21
  }
22
22
  },
23
- "main": "dist/tiptap-extension-list-item.cjs",
24
- "umd": "dist/tiptap-extension-list-item.umd.js",
25
- "module": "dist/tiptap-extension-list-item.esm.js",
26
- "types": "dist/packages/extension-list-item/src/index.d.ts",
23
+ "main": "dist/index.cjs",
24
+ "module": "dist/index.js",
25
+ "types": "dist/index.d.ts",
27
26
  "files": [
28
27
  "src",
29
28
  "dist"
30
29
  ],
31
30
  "peerDependencies": {
32
- "@tiptap/core": "^2.0.0-beta.193"
31
+ "@tiptap/core": "^2.0.0-beta.209"
33
32
  },
34
33
  "devDependencies": {
35
- "@tiptap/core": "^2.0.0-beta.209"
34
+ "@tiptap/core": "^2.0.0-beta.210"
36
35
  },
37
36
  "repository": {
38
37
  "type": "git",
39
38
  "url": "https://github.com/ueberdosis/tiptap",
40
39
  "directory": "packages/extension-list-item"
40
+ },
41
+ "scripts": {
42
+ "build": "tsup"
43
+ },
44
+ "tsup": {
45
+ "entry": [
46
+ "src/index.ts"
47
+ ],
48
+ "dts": true,
49
+ "splitting": true,
50
+ "format": [
51
+ "esm",
52
+ "cjs"
53
+ ]
41
54
  }
42
55
  }
@@ -1,3 +0,0 @@
1
- import { ListItem } from './list-item';
2
- export * from './list-item';
3
- export default ListItem;
@@ -1,5 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- export interface ListItemOptions {
3
- HTMLAttributes: Record<string, any>;
4
- }
5
- export declare const ListItem: Node<ListItemOptions, any>;
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var core = require('@tiptap/core');
6
-
7
- const ListItem = core.Node.create({
8
- name: 'listItem',
9
- addOptions() {
10
- return {
11
- HTMLAttributes: {},
12
- };
13
- },
14
- content: 'paragraph block*',
15
- defining: true,
16
- parseHTML() {
17
- return [
18
- {
19
- tag: 'li',
20
- },
21
- ];
22
- },
23
- renderHTML({ HTMLAttributes }) {
24
- return ['li', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
25
- },
26
- addKeyboardShortcuts() {
27
- return {
28
- Enter: () => this.editor.commands.splitListItem(this.name),
29
- Tab: () => this.editor.commands.sinkListItem(this.name),
30
- 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
31
- };
32
- },
33
- });
34
-
35
- exports.ListItem = ListItem;
36
- exports["default"] = ListItem;
37
- //# sourceMappingURL=tiptap-extension-list-item.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-list-item.cjs","sources":["../src/list-item.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ListItemOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const ListItem = Node.create<ListItemOptions>({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAMa,MAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,OAAO,EAAE,kBAAkB;AAE3B,IAAA,QAAQ,EAAE,IAAI;IAEd,SAAS,GAAA;QACP,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,IAAI;AACV,aAAA;SACF,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;AAC3B,QAAA,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;IAED,oBAAoB,GAAA;QAClB,OAAO;AACL,YAAA,KAAK,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1D,YAAA,GAAG,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;AACvD,YAAA,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;SAChE,CAAA;KACF;AACF,CAAA;;;;;"}
@@ -1,32 +0,0 @@
1
- import { Node, mergeAttributes } from '@tiptap/core';
2
-
3
- const ListItem = Node.create({
4
- name: 'listItem',
5
- addOptions() {
6
- return {
7
- HTMLAttributes: {},
8
- };
9
- },
10
- content: 'paragraph block*',
11
- defining: true,
12
- parseHTML() {
13
- return [
14
- {
15
- tag: 'li',
16
- },
17
- ];
18
- },
19
- renderHTML({ HTMLAttributes }) {
20
- return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
21
- },
22
- addKeyboardShortcuts() {
23
- return {
24
- Enter: () => this.editor.commands.splitListItem(this.name),
25
- Tab: () => this.editor.commands.sinkListItem(this.name),
26
- 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
27
- };
28
- },
29
- });
30
-
31
- export { ListItem, ListItem as default };
32
- //# sourceMappingURL=tiptap-extension-list-item.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-list-item.esm.js","sources":["../src/list-item.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ListItemOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const ListItem = Node.create<ListItemOptions>({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n"],"names":[],"mappings":";;AAMa,MAAA,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,OAAO,EAAE,kBAAkB;AAE3B,IAAA,QAAQ,EAAE,IAAI;IAEd,SAAS,GAAA;QACP,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,IAAI;AACV,aAAA;SACF,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;AAC3B,QAAA,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;IAED,oBAAoB,GAAA;QAClB,OAAO;AACL,YAAA,KAAK,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1D,YAAA,GAAG,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;AACvD,YAAA,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;SAChE,CAAA;KACF;AACF,CAAA;;;;"}
@@ -1,41 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-list-item"] = {}, global.core));
5
- })(this, (function (exports, core) { 'use strict';
6
-
7
- const ListItem = core.Node.create({
8
- name: 'listItem',
9
- addOptions() {
10
- return {
11
- HTMLAttributes: {},
12
- };
13
- },
14
- content: 'paragraph block*',
15
- defining: true,
16
- parseHTML() {
17
- return [
18
- {
19
- tag: 'li',
20
- },
21
- ];
22
- },
23
- renderHTML({ HTMLAttributes }) {
24
- return ['li', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
25
- },
26
- addKeyboardShortcuts() {
27
- return {
28
- Enter: () => this.editor.commands.splitListItem(this.name),
29
- Tab: () => this.editor.commands.sinkListItem(this.name),
30
- 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),
31
- };
32
- },
33
- });
34
-
35
- exports.ListItem = ListItem;
36
- exports["default"] = ListItem;
37
-
38
- Object.defineProperty(exports, '__esModule', { value: true });
39
-
40
- }));
41
- //# sourceMappingURL=tiptap-extension-list-item.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-list-item.umd.js","sources":["../src/list-item.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface ListItemOptions {\n HTMLAttributes: Record<string, any>,\n}\n\nexport const ListItem = Node.create<ListItemOptions>({\n name: 'listItem',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n content: 'paragraph block*',\n\n defining: true,\n\n parseHTML() {\n return [\n {\n tag: 'li',\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['li', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => this.editor.commands.splitListItem(this.name),\n Tab: () => this.editor.commands.sinkListItem(this.name),\n 'Shift-Tab': () => this.editor.commands.liftListItem(this.name),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAMa,QAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;EACnD,IAAA,IAAI,EAAE,UAAU;MAEhB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;EAED,IAAA,OAAO,EAAE,kBAAkB;EAE3B,IAAA,QAAQ,EAAE,IAAI;MAEd,SAAS,GAAA;UACP,OAAO;EACL,YAAA;EACE,gBAAA,GAAG,EAAE,IAAI;EACV,aAAA;WACF,CAAA;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;EAC3B,QAAA,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;OAC/E;MAED,oBAAoB,GAAA;UAClB,OAAO;EACL,YAAA,KAAK,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;EAC1D,YAAA,GAAG,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;EACvD,YAAA,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;WAChE,CAAA;OACF;EACF,CAAA;;;;;;;;;;;"}