@tiptap/extension-task-list 2.0.0-beta.21 → 2.0.0-beta.22
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/package.json +2 -2
- package/dist/packages/extension-task-list/src/index.d.ts +0 -3
- package/dist/packages/extension-task-list/src/task-list.d.ts +0 -15
- package/dist/tiptap-extension-task-list.cjs.js +0 -43
- package/dist/tiptap-extension-task-list.cjs.js.map +0 -1
- package/dist/tiptap-extension-task-list.esm.js +0 -38
- package/dist/tiptap-extension-task-list.esm.js.map +0 -1
- package/dist/tiptap-extension-task-list.umd.js +0 -47
- package/dist/tiptap-extension-task-list.umd.js.map +0 -1
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.
|
|
4
|
+
"version": "2.0.0-beta.22",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"url": "https://github.com/ueberdosis/tiptap",
|
|
29
29
|
"directory": "packages/extension-task-list"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "fce16e805824972834d5a8ce8d60e3ff41d63c7e"
|
|
32
32
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface TaskListOptions {
|
|
3
|
-
HTMLAttributes: Record<string, any>;
|
|
4
|
-
}
|
|
5
|
-
declare module '@tiptap/core' {
|
|
6
|
-
interface Commands<ReturnType> {
|
|
7
|
-
taskList: {
|
|
8
|
-
/**
|
|
9
|
-
* Toggle a task list
|
|
10
|
-
*/
|
|
11
|
-
toggleTaskList: () => ReturnType;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export declare const TaskList: Node<TaskListOptions, any>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var core = require('@tiptap/core');
|
|
6
|
-
|
|
7
|
-
const TaskList = core.Node.create({
|
|
8
|
-
name: 'taskList',
|
|
9
|
-
addOptions() {
|
|
10
|
-
return {
|
|
11
|
-
HTMLAttributes: {},
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
group: 'block list',
|
|
15
|
-
content: 'taskItem+',
|
|
16
|
-
parseHTML() {
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
tag: 'ul[data-type="taskList"]',
|
|
20
|
-
priority: 51,
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
},
|
|
24
|
-
renderHTML({ HTMLAttributes }) {
|
|
25
|
-
return ['ul', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': 'taskList' }), 0];
|
|
26
|
-
},
|
|
27
|
-
addCommands() {
|
|
28
|
-
return {
|
|
29
|
-
toggleTaskList: () => ({ commands }) => {
|
|
30
|
-
return commands.toggleList('taskList', 'taskItem');
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
addKeyboardShortcuts() {
|
|
35
|
-
return {
|
|
36
|
-
'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
exports.TaskList = TaskList;
|
|
42
|
-
exports["default"] = TaskList;
|
|
43
|
-
//# sourceMappingURL=tiptap-extension-task-list.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-task-list.cjs.js","sources":["../src/task-list.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TaskListOptions {\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 HTMLAttributes: {},\n }\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(this.options.HTMLAttributes, 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,UAAU;QACR,OAAO;YACL,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;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,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KAC5G;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,38 +0,0 @@
|
|
|
1
|
-
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
const TaskList = Node.create({
|
|
4
|
-
name: 'taskList',
|
|
5
|
-
addOptions() {
|
|
6
|
-
return {
|
|
7
|
-
HTMLAttributes: {},
|
|
8
|
-
};
|
|
9
|
-
},
|
|
10
|
-
group: 'block list',
|
|
11
|
-
content: 'taskItem+',
|
|
12
|
-
parseHTML() {
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
tag: 'ul[data-type="taskList"]',
|
|
16
|
-
priority: 51,
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
},
|
|
20
|
-
renderHTML({ HTMLAttributes }) {
|
|
21
|
-
return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': 'taskList' }), 0];
|
|
22
|
-
},
|
|
23
|
-
addCommands() {
|
|
24
|
-
return {
|
|
25
|
-
toggleTaskList: () => ({ commands }) => {
|
|
26
|
-
return commands.toggleList('taskList', 'taskItem');
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
addKeyboardShortcuts() {
|
|
31
|
-
return {
|
|
32
|
-
'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export { TaskList, TaskList as default };
|
|
38
|
-
//# sourceMappingURL=tiptap-extension-task-list.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-task-list.esm.js","sources":["../src/task-list.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TaskListOptions {\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 HTMLAttributes: {},\n }\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(this.options.HTMLAttributes, 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,UAAU;QACR,OAAO;YACL,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;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,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KAC5G;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,47 +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-task-list"] = {}, global.core));
|
|
5
|
-
})(this, (function (exports, core) { 'use strict';
|
|
6
|
-
|
|
7
|
-
const TaskList = core.Node.create({
|
|
8
|
-
name: 'taskList',
|
|
9
|
-
addOptions() {
|
|
10
|
-
return {
|
|
11
|
-
HTMLAttributes: {},
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
group: 'block list',
|
|
15
|
-
content: 'taskItem+',
|
|
16
|
-
parseHTML() {
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
tag: 'ul[data-type="taskList"]',
|
|
20
|
-
priority: 51,
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
},
|
|
24
|
-
renderHTML({ HTMLAttributes }) {
|
|
25
|
-
return ['ul', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, { 'data-type': 'taskList' }), 0];
|
|
26
|
-
},
|
|
27
|
-
addCommands() {
|
|
28
|
-
return {
|
|
29
|
-
toggleTaskList: () => ({ commands }) => {
|
|
30
|
-
return commands.toggleList('taskList', 'taskItem');
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
addKeyboardShortcuts() {
|
|
35
|
-
return {
|
|
36
|
-
'Mod-Shift-9': () => this.editor.commands.toggleTaskList(),
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
exports.TaskList = TaskList;
|
|
42
|
-
exports["default"] = TaskList;
|
|
43
|
-
|
|
44
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
45
|
-
|
|
46
|
-
}));
|
|
47
|
-
//# sourceMappingURL=tiptap-extension-task-list.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-task-list.umd.js","sources":["../src/task-list.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core'\n\nexport interface TaskListOptions {\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 HTMLAttributes: {},\n }\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(this.options.HTMLAttributes, 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,UAAU;UACR,OAAO;cACL,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;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,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;OAC5G;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;;;;;;;;;;;"}
|