@tiptap/extension-task-list 2.0.0-beta.9 → 2.0.0-rc.2

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/README.md CHANGED
@@ -5,10 +5,10 @@
5
5
  [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis)
6
6
 
7
7
  ## 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*.
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
9
 
10
- ## Offical Documentation
11
- Documentation can be found on the [tiptap website](https://tiptap.dev).
10
+ ## Official Documentation
11
+ Documentation can be found on the [Tiptap website](https://tiptap.dev).
12
12
 
13
13
  ## License
14
- tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).
14
+ Tiptap is open sourced software licensed under the [MIT license](https://github.com/ueberdosis/tiptap/blob/main/LICENSE.md).
@@ -6,26 +6,31 @@ var core = require('@tiptap/core');
6
6
 
7
7
  const TaskList = core.Node.create({
8
8
  name: 'taskList',
9
- defaultOptions: {
10
- HTMLAttributes: {},
9
+ addOptions() {
10
+ return {
11
+ itemTypeName: 'taskItem',
12
+ HTMLAttributes: {},
13
+ };
11
14
  },
12
15
  group: 'block list',
13
- content: 'taskItem+',
16
+ content() {
17
+ return `${this.options.itemTypeName}+`;
18
+ },
14
19
  parseHTML() {
15
20
  return [
16
21
  {
17
- tag: 'ul[data-type="taskList"]',
22
+ tag: `ul[data-type="${this.name}"]`,
18
23
  priority: 51,
19
24
  },
20
25
  ];
21
26
  },
22
27
  renderHTML({ HTMLAttributes }) {
23
- return ['ul', core.mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0];
28
+ return ['ul', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0];
24
29
  },
25
30
  addCommands() {
26
31
  return {
27
32
  toggleTaskList: () => ({ commands }) => {
28
- return commands.toggleList('taskList', 'taskItem');
33
+ return commands.toggleList(this.name, this.options.itemTypeName);
29
34
  },
30
35
  };
31
36
  },
@@ -37,5 +42,5 @@ const TaskList = core.Node.create({
37
42
  });
38
43
 
39
44
  exports.TaskList = TaskList;
40
- exports.default = TaskList;
41
- //# sourceMappingURL=tiptap-extension-task-list.cjs.js.map
45
+ exports["default"] = TaskList;
46
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/task-list.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TaskListOptions {\n itemTypeName: string,\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n taskList: {\n /**\n * Toggle a task list\n */\n toggleTaskList: () => ReturnType,\n }\n }\n}\n\nexport const TaskList = Node.create<TaskListOptions>({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0]\n },\n\n addCommands() {\n return {\n toggleTaskList: () => ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAkBa,MAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,YAAY,EAAE,UAAU;AACxB,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,KAAK,EAAE,YAAY;IAEnB,OAAO,GAAA;AACL,QAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,CAAA;KACvC;IAED,SAAS,GAAA;QACP,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,IAAI,CAAC,IAAI,CAAI,EAAA,CAAA;AACnC,gBAAA,QAAQ,EAAE,EAAE;AACb,aAAA;SACF,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;QAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KAC3G;IAED,WAAW,GAAA;QACT,OAAO;YACL,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAI;AACrC,gBAAA,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;aACjE;SACF,CAAA;KACF;IAED,oBAAoB,GAAA;QAClB,OAAO;YACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;SAC3D,CAAA;KACF;AACF,CAAA;;;;;"}
@@ -2,26 +2,31 @@ import { Node, mergeAttributes } from '@tiptap/core';
2
2
 
3
3
  const TaskList = Node.create({
4
4
  name: 'taskList',
5
- defaultOptions: {
6
- HTMLAttributes: {},
5
+ addOptions() {
6
+ return {
7
+ itemTypeName: 'taskItem',
8
+ HTMLAttributes: {},
9
+ };
7
10
  },
8
11
  group: 'block list',
9
- content: 'taskItem+',
12
+ content() {
13
+ return `${this.options.itemTypeName}+`;
14
+ },
10
15
  parseHTML() {
11
16
  return [
12
17
  {
13
- tag: 'ul[data-type="taskList"]',
18
+ tag: `ul[data-type="${this.name}"]`,
14
19
  priority: 51,
15
20
  },
16
21
  ];
17
22
  },
18
23
  renderHTML({ HTMLAttributes }) {
19
- return ['ul', mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0];
24
+ return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0];
20
25
  },
21
26
  addCommands() {
22
27
  return {
23
28
  toggleTaskList: () => ({ commands }) => {
24
- return commands.toggleList('taskList', 'taskItem');
29
+ return commands.toggleList(this.name, this.options.itemTypeName);
25
30
  },
26
31
  };
27
32
  },
@@ -32,6 +37,5 @@ const TaskList = Node.create({
32
37
  },
33
38
  });
34
39
 
35
- export default TaskList;
36
- export { TaskList };
37
- //# sourceMappingURL=tiptap-extension-task-list.esm.js.map
40
+ export { TaskList, TaskList as default };
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/task-list.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TaskListOptions {\n itemTypeName: string,\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n taskList: {\n /**\n * Toggle a task list\n */\n toggleTaskList: () => ReturnType,\n }\n }\n}\n\nexport const TaskList = Node.create<TaskListOptions>({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0]\n },\n\n addCommands() {\n return {\n toggleTaskList: () => ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"names":[],"mappings":";;AAkBa,MAAA,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAkB;AACnD,IAAA,IAAI,EAAE,UAAU;IAEhB,UAAU,GAAA;QACR,OAAO;AACL,YAAA,YAAY,EAAE,UAAU;AACxB,YAAA,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;AAED,IAAA,KAAK,EAAE,YAAY;IAEnB,OAAO,GAAA;AACL,QAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,CAAA;KACvC;IAED,SAAS,GAAA;QACP,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,IAAI,CAAC,IAAI,CAAI,EAAA,CAAA;AACnC,gBAAA,QAAQ,EAAE,EAAE;AACb,aAAA;SACF,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;QAC3B,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KAC3G;IAED,WAAW,GAAA;QACT,OAAO;YACL,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAI;AACrC,gBAAA,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;aACjE;SACF,CAAA;KACF;IAED,oBAAoB,GAAA;QAClB,OAAO;YACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;SAC3D,CAAA;KACF;AACF,CAAA;;;;"}
@@ -1,31 +1,36 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) :
3
3
  typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@tiptap/extension-task-list'] = {}, global.core));
5
- }(this, (function (exports, core) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-task-list"] = {}, global.core));
5
+ })(this, (function (exports, core) { 'use strict';
6
6
 
7
7
  const TaskList = core.Node.create({
8
8
  name: 'taskList',
9
- defaultOptions: {
10
- HTMLAttributes: {},
9
+ addOptions() {
10
+ return {
11
+ itemTypeName: 'taskItem',
12
+ HTMLAttributes: {},
13
+ };
11
14
  },
12
15
  group: 'block list',
13
- content: 'taskItem+',
16
+ content() {
17
+ return `${this.options.itemTypeName}+`;
18
+ },
14
19
  parseHTML() {
15
20
  return [
16
21
  {
17
- tag: 'ul[data-type="taskList"]',
22
+ tag: `ul[data-type="${this.name}"]`,
18
23
  priority: 51,
19
24
  },
20
25
  ];
21
26
  },
22
27
  renderHTML({ HTMLAttributes }) {
23
- return ['ul', core.mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0];
28
+ return ['ul', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0];
24
29
  },
25
30
  addCommands() {
26
31
  return {
27
32
  toggleTaskList: () => ({ commands }) => {
28
- return commands.toggleList('taskList', 'taskItem');
33
+ return commands.toggleList(this.name, this.options.itemTypeName);
29
34
  },
30
35
  };
31
36
  },
@@ -37,9 +42,9 @@
37
42
  });
38
43
 
39
44
  exports.TaskList = TaskList;
40
- exports.default = TaskList;
45
+ exports["default"] = TaskList;
41
46
 
42
47
  Object.defineProperty(exports, '__esModule', { value: true });
43
48
 
44
- })));
45
- //# sourceMappingURL=tiptap-extension-task-list.umd.js.map
49
+ }));
50
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../src/task-list.ts"],"sourcesContent":["import { mergeAttributes, Node } from '@tiptap/core'\n\nexport interface TaskListOptions {\n itemTypeName: string,\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n taskList: {\n /**\n * Toggle a task list\n */\n toggleTaskList: () => ReturnType,\n }\n }\n}\n\nexport const TaskList = Node.create<TaskListOptions>({\n name: 'taskList',\n\n addOptions() {\n return {\n itemTypeName: 'taskItem',\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content() {\n return `${this.options.itemTypeName}+`\n },\n\n parseHTML() {\n return [\n {\n tag: `ul[data-type=\"${this.name}\"]`,\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0]\n },\n\n addCommands() {\n return {\n toggleTaskList: () => ({ commands }) => {\n return commands.toggleList(this.name, this.options.itemTypeName)\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;AAkBa,QAAA,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;EACnD,IAAA,IAAI,EAAE,UAAU;MAEhB,UAAU,GAAA;UACR,OAAO;EACL,YAAA,YAAY,EAAE,UAAU;EACxB,YAAA,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;EAED,IAAA,KAAK,EAAE,YAAY;MAEnB,OAAO,GAAA;EACL,QAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,CAAA;OACvC;MAED,SAAS,GAAA;UACP,OAAO;EACL,YAAA;EACE,gBAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,IAAI,CAAC,IAAI,CAAI,EAAA,CAAA;EACnC,gBAAA,QAAQ,EAAE,EAAE;EACb,aAAA;WACF,CAAA;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE,EAAA;UAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;OAC3G;MAED,WAAW,GAAA;UACT,OAAO;cACL,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAI;EACrC,gBAAA,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;eACjE;WACF,CAAA;OACF;MAED,oBAAoB,GAAA;UAClB,OAAO;cACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;WAC3D,CAAA;OACF;EACF,CAAA;;;;;;;;;;;"}
@@ -1,15 +1,16 @@
1
- import { Command, Node } from '@tiptap/core';
1
+ import { Node } from '@tiptap/core';
2
2
  export interface TaskListOptions {
3
+ itemTypeName: string;
3
4
  HTMLAttributes: Record<string, any>;
4
5
  }
5
6
  declare module '@tiptap/core' {
6
- interface Commands {
7
+ interface Commands<ReturnType> {
7
8
  taskList: {
8
9
  /**
9
10
  * Toggle a task list
10
11
  */
11
- toggleTaskList: () => Command;
12
+ toggleTaskList: () => ReturnType;
12
13
  };
13
14
  }
14
15
  }
15
- export declare const TaskList: Node<TaskListOptions>;
16
+ export declare const TaskList: Node<TaskListOptions, any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-task-list",
3
3
  "description": "task list extension for tiptap",
4
- "version": "2.0.0-beta.9",
4
+ "version": "2.0.0-rc.2",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -12,16 +12,35 @@
12
12
  "type": "github",
13
13
  "url": "https://github.com/sponsors/ueberdosis"
14
14
  },
15
- "main": "dist/tiptap-extension-task-list.cjs.js",
16
- "umd": "dist/tiptap-extension-task-list.umd.js",
17
- "module": "dist/tiptap-extension-task-list.esm.js",
15
+ "type": "module",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/packages/extension-task-list/src/index.d.ts",
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
+ }
22
+ },
23
+ "main": "dist/index.cjs",
24
+ "module": "dist/index.js",
25
+ "umd": "dist/index.umd.js",
18
26
  "types": "dist/packages/extension-task-list/src/index.d.ts",
19
27
  "files": [
20
28
  "src",
21
29
  "dist"
22
30
  ],
23
31
  "peerDependencies": {
24
- "@tiptap/core": "^2.0.0-beta.1"
32
+ "@tiptap/core": "^2.0.0-rc.1"
33
+ },
34
+ "devDependencies": {
35
+ "@tiptap/core": "^2.0.0-rc.1"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/ueberdosis/tiptap",
40
+ "directory": "packages/extension-task-list"
25
41
  },
26
- "gitHead": "c64520b74dab6b127c78960c1bd0af237b1f68fb"
27
- }
42
+ "scripts": {
43
+ "clean": "rm -rf dist",
44
+ "build": "npm run clean && rollup -c"
45
+ }
46
+ }
package/src/task-list.ts CHANGED
@@ -1,16 +1,17 @@
1
- import { Command, Node, mergeAttributes } from '@tiptap/core'
1
+ import { mergeAttributes, Node } from '@tiptap/core'
2
2
 
3
3
  export interface TaskListOptions {
4
+ itemTypeName: string,
4
5
  HTMLAttributes: Record<string, any>,
5
6
  }
6
7
 
7
8
  declare module '@tiptap/core' {
8
- interface Commands {
9
+ interface Commands<ReturnType> {
9
10
  taskList: {
10
11
  /**
11
12
  * Toggle a task list
12
13
  */
13
- toggleTaskList: () => Command,
14
+ toggleTaskList: () => ReturnType,
14
15
  }
15
16
  }
16
17
  }
@@ -18,31 +19,36 @@ declare module '@tiptap/core' {
18
19
  export const TaskList = Node.create<TaskListOptions>({
19
20
  name: 'taskList',
20
21
 
21
- defaultOptions: {
22
- HTMLAttributes: {},
22
+ addOptions() {
23
+ return {
24
+ itemTypeName: 'taskItem',
25
+ HTMLAttributes: {},
26
+ }
23
27
  },
24
28
 
25
29
  group: 'block list',
26
30
 
27
- content: 'taskItem+',
31
+ content() {
32
+ return `${this.options.itemTypeName}+`
33
+ },
28
34
 
29
35
  parseHTML() {
30
36
  return [
31
37
  {
32
- tag: 'ul[data-type="taskList"]',
38
+ tag: `ul[data-type="${this.name}"]`,
33
39
  priority: 51,
34
40
  },
35
41
  ]
36
42
  },
37
43
 
38
44
  renderHTML({ HTMLAttributes }) {
39
- return ['ul', mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0]
45
+ return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': this.name }), 0]
40
46
  },
41
47
 
42
48
  addCommands() {
43
49
  return {
44
50
  toggleTaskList: () => ({ commands }) => {
45
- return commands.toggleList('taskList', 'taskItem')
51
+ return commands.toggleList(this.name, this.options.itemTypeName)
46
52
  },
47
53
  }
48
54
  },
package/CHANGELOG.md DELETED
@@ -1,179 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [2.0.0-beta.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.8...@tiptap/extension-task-list@2.0.0-beta.9) (2021-05-05)
7
-
8
- **Note:** Version bump only for package @tiptap/extension-task-list
9
-
10
-
11
-
12
-
13
-
14
- # [2.0.0-beta.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.7...@tiptap/extension-task-list@2.0.0-beta.8) (2021-04-23)
15
-
16
- **Note:** Version bump only for package @tiptap/extension-task-list
17
-
18
-
19
-
20
-
21
-
22
- # [2.0.0-beta.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.6...@tiptap/extension-task-list@2.0.0-beta.7) (2021-04-22)
23
-
24
- **Note:** Version bump only for package @tiptap/extension-task-list
25
-
26
-
27
-
28
-
29
-
30
- # [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.5...@tiptap/extension-task-list@2.0.0-beta.6) (2021-04-21)
31
-
32
- **Note:** Version bump only for package @tiptap/extension-task-list
33
-
34
-
35
-
36
-
37
-
38
- # [2.0.0-beta.5](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.4...@tiptap/extension-task-list@2.0.0-beta.5) (2021-04-16)
39
-
40
- **Note:** Version bump only for package @tiptap/extension-task-list
41
-
42
-
43
-
44
-
45
-
46
- # [2.0.0-beta.4](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.3...@tiptap/extension-task-list@2.0.0-beta.4) (2021-04-15)
47
-
48
- **Note:** Version bump only for package @tiptap/extension-task-list
49
-
50
-
51
-
52
-
53
-
54
- # [2.0.0-beta.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.2...@tiptap/extension-task-list@2.0.0-beta.3) (2021-03-31)
55
-
56
- **Note:** Version bump only for package @tiptap/extension-task-list
57
-
58
-
59
-
60
-
61
-
62
- # [2.0.0-beta.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-beta.1...@tiptap/extension-task-list@2.0.0-beta.2) (2021-03-28)
63
-
64
- **Note:** Version bump only for package @tiptap/extension-task-list
65
-
66
-
67
-
68
-
69
-
70
- # [2.0.0-beta.1](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.11...@tiptap/extension-task-list@2.0.0-beta.1) (2021-03-05)
71
-
72
- **Note:** Version bump only for package @tiptap/extension-task-list
73
-
74
-
75
-
76
-
77
-
78
- # [2.0.0-alpha.11](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.10...@tiptap/extension-task-list@2.0.0-alpha.11) (2021-02-16)
79
-
80
- **Note:** Version bump only for package @tiptap/extension-task-list
81
-
82
-
83
-
84
-
85
-
86
- # [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.9...@tiptap/extension-task-list@2.0.0-alpha.10) (2021-02-07)
87
-
88
- **Note:** Version bump only for package @tiptap/extension-task-list
89
-
90
-
91
-
92
-
93
-
94
- # [2.0.0-alpha.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.8...@tiptap/extension-task-list@2.0.0-alpha.9) (2021-02-05)
95
-
96
- **Note:** Version bump only for package @tiptap/extension-task-list
97
-
98
-
99
-
100
-
101
-
102
- # [2.0.0-alpha.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.7...@tiptap/extension-task-list@2.0.0-alpha.8) (2021-01-29)
103
-
104
- **Note:** Version bump only for package @tiptap/extension-task-list
105
-
106
-
107
-
108
-
109
-
110
- # [2.0.0-alpha.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.6...@tiptap/extension-task-list@2.0.0-alpha.7) (2021-01-29)
111
-
112
- **Note:** Version bump only for package @tiptap/extension-task-list
113
-
114
-
115
-
116
-
117
-
118
- # [2.0.0-alpha.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.5...@tiptap/extension-task-list@2.0.0-alpha.6) (2021-01-28)
119
-
120
- **Note:** Version bump only for package @tiptap/extension-task-list
121
-
122
-
123
-
124
-
125
-
126
- # [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.4...@tiptap/extension-task-list@2.0.0-alpha.5) (2020-12-18)
127
-
128
- **Note:** Version bump only for package @tiptap/extension-task-list
129
-
130
-
131
-
132
-
133
-
134
- # [2.0.0-alpha.4](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.3...@tiptap/extension-task-list@2.0.0-alpha.4) (2020-12-02)
135
-
136
- **Note:** Version bump only for package @tiptap/extension-task-list
137
-
138
-
139
-
140
-
141
-
142
- # [2.0.0-alpha.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.2...@tiptap/extension-task-list@2.0.0-alpha.3) (2020-11-19)
143
-
144
- **Note:** Version bump only for package @tiptap/extension-task-list
145
-
146
-
147
-
148
-
149
-
150
- # [2.0.0-alpha.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@2.0.0-alpha.1...@tiptap/extension-task-list@2.0.0-alpha.2) (2020-11-19)
151
-
152
- **Note:** Version bump only for package @tiptap/extension-task-list
153
-
154
-
155
-
156
-
157
-
158
- # [2.0.0-alpha.1](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@1.0.0-alpha.2...@tiptap/extension-task-list@2.0.0-alpha.1) (2020-11-18)
159
-
160
- **Note:** Version bump only for package @tiptap/extension-task-list
161
-
162
-
163
-
164
-
165
-
166
- # [1.0.0-alpha.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-list@1.0.0-alpha.1...@tiptap/extension-task-list@1.0.0-alpha.2) (2020-11-16)
167
-
168
- **Note:** Version bump only for package @tiptap/extension-task-list
169
-
170
-
171
-
172
-
173
-
174
- # 1.0.0-alpha.1 (2020-11-16)
175
-
176
-
177
- ### Reverts
178
-
179
- * Revert "use global namespace" ([0c9ce26](https://github.com/ueberdosis/tiptap/commit/0c9ce26c02c07d88a757c01b0a9d7f9e2b0b7502))
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021, überdosis GbR
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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-task-list.cjs.js","sources":["../src/task-list.ts"],"sourcesContent":["import { Command, Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TaskListOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n */\n toggleTaskList: () => Command,\n }\n }\n}\n\nexport const TaskList = Node.create<TaskListOptions>({\n name: 'taskList',\n\n defaultOptions: {\n HTMLAttributes: {},\n },\n\n group: 'block list',\n\n content: 'taskItem+',\n\n parseHTML() {\n return [\n {\n tag: 'ul[data-type=\"taskList\"]',\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0]\n },\n\n addCommands() {\n return {\n toggleTaskList: () => ({ commands }) => {\n return commands.toggleList('taskList', 'taskItem')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;MAiBa,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;IACnD,IAAI,EAAE,UAAU;IAEhB,cAAc,EAAE;QACd,cAAc,EAAE,EAAE;KACnB;IAED,KAAK,EAAE,YAAY;IAEnB,OAAO,EAAE,WAAW;IAEpB,SAAS;QACP,OAAO;YACL;gBACE,GAAG,EAAE,0BAA0B;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,cAAc,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;IAED,WAAW;QACT,OAAO;YACL,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;gBACjC,OAAO,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;aACnD;SACF,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;SAC3D,CAAA;KACF;CACF;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-task-list.esm.js","sources":["../src/task-list.ts"],"sourcesContent":["import { Command, Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TaskListOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n */\n toggleTaskList: () => Command,\n }\n }\n}\n\nexport const TaskList = Node.create<TaskListOptions>({\n name: 'taskList',\n\n defaultOptions: {\n HTMLAttributes: {},\n },\n\n group: 'block list',\n\n content: 'taskItem+',\n\n parseHTML() {\n return [\n {\n tag: 'ul[data-type=\"taskList\"]',\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0]\n },\n\n addCommands() {\n return {\n toggleTaskList: () => ({ commands }) => {\n return commands.toggleList('taskList', 'taskItem')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"names":[],"mappings":";;MAiBa,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAkB;IACnD,IAAI,EAAE,UAAU;IAEhB,cAAc,EAAE;QACd,cAAc,EAAE,EAAE;KACnB;IAED,KAAK,EAAE,YAAY;IAEnB,OAAO,EAAE,WAAW;IAEpB,SAAS;QACP,OAAO;YACL;gBACE,GAAG,EAAE,0BAA0B;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,cAAc,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;IAED,WAAW;QACT,OAAO;YACL,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;gBACjC,OAAO,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;aACnD;SACF,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;SAC3D,CAAA;KACF;CACF;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiptap-extension-task-list.umd.js","sources":["../src/task-list.ts"],"sourcesContent":["import { Command, Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TaskListOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n taskList: {\n /**\n * Toggle a task list\n */\n toggleTaskList: () => Command,\n }\n }\n}\n\nexport const TaskList = Node.create<TaskListOptions>({\n name: 'taskList',\n\n defaultOptions: {\n HTMLAttributes: {},\n },\n\n group: 'block list',\n\n content: 'taskItem+',\n\n parseHTML() {\n return [\n {\n tag: 'ul[data-type=\"taskList\"]',\n priority: 51,\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(HTMLAttributes, { 'data-type': 'taskList' }), 0]\n },\n\n addCommands() {\n return {\n toggleTaskList: () => ({ commands }) => {\n return commands.toggleList('taskList', 'taskItem')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),\n }\n },\n})\n"],"names":["Node","mergeAttributes"],"mappings":";;;;;;QAiBa,QAAQ,GAAGA,SAAI,CAAC,MAAM,CAAkB;MACnD,IAAI,EAAE,UAAU;MAEhB,cAAc,EAAE;UACd,cAAc,EAAE,EAAE;OACnB;MAED,KAAK,EAAE,YAAY;MAEnB,OAAO,EAAE,WAAW;MAEpB,SAAS;UACP,OAAO;cACL;kBACE,GAAG,EAAE,0BAA0B;kBAC/B,QAAQ,EAAE,EAAE;eACb;WACF,CAAA;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE;UAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,cAAc,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;OAC/E;MAED,WAAW;UACT,OAAO;cACL,cAAc,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;kBACjC,OAAO,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;eACnD;WACF,CAAA;OACF;MAED,oBAAoB;UAClB,OAAO;cACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;WAC3D,CAAA;OACF;GACF;;;;;;;;;;;"}