@tiptap/extension-list-item 2.0.0-beta.213 → 2.0.0-beta.215

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 CHANGED
@@ -1,36 +1,37 @@
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
- });
1
+ 'use strict';
30
2
 
31
- // src/index.ts
32
- var src_default = ListItem;
3
+ Object.defineProperty(exports, '__esModule', { value: true });
33
4
 
5
+ var core = require('@tiptap/core');
34
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
+ });
35
34
 
36
- exports.ListItem = ListItem; exports.default = src_default;
35
+ exports.ListItem = ListItem;
36
+ exports["default"] = ListItem;
37
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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;;;;;"}
package/dist/index.js CHANGED
@@ -1,36 +1,32 @@
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
- }
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
29
  });
30
30
 
31
- // src/index.ts
32
- var src_default = ListItem;
33
- export {
34
- ListItem,
35
- src_default as default
36
- };
31
+ export { ListItem, ListItem as default };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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;;;;"}
@@ -0,0 +1,41 @@
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=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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;;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ import { ListItem } from './list-item';
2
+ export * from './list-item';
3
+ export default ListItem;
@@ -0,0 +1,5 @@
1
+ import { Node } from '@tiptap/core';
2
+ export interface ListItemOptions {
3
+ HTMLAttributes: Record<string, any>;
4
+ }
5
+ export declare const ListItem: Node<ListItemOptions, any>;
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.213",
4
+ "version": "2.0.0-beta.215",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -15,14 +15,15 @@
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/index.d.ts",
18
+ "types": "./dist/packages/extension-list-item/src/index.d.ts",
19
19
  "import": "./dist/index.js",
20
20
  "require": "./dist/index.cjs"
21
21
  }
22
22
  },
23
23
  "main": "dist/index.cjs",
24
24
  "module": "dist/index.js",
25
- "types": "dist/index.d.ts",
25
+ "umd": "dist/index.umd.js",
26
+ "types": "dist/packages/extension-list-item/src/index.d.ts",
26
27
  "files": [
27
28
  "src",
28
29
  "dist"
@@ -31,7 +32,7 @@
31
32
  "@tiptap/core": "^2.0.0-beta.209"
32
33
  },
33
34
  "devDependencies": {
34
- "@tiptap/core": "^2.0.0-beta.213"
35
+ "@tiptap/core": "^2.0.0-beta.215"
35
36
  },
36
37
  "repository": {
37
38
  "type": "git",
@@ -39,17 +40,7 @@
39
40
  "directory": "packages/extension-list-item"
40
41
  },
41
42
  "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
- ]
43
+ "clean": "rm -rf dist",
44
+ "build": "npm run clean && rollup -c"
54
45
  }
55
46
  }
package/dist/index.d.ts DELETED
@@ -1,8 +0,0 @@
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 };