@tiptap/extension-bullet-list 2.0.0-beta.19 → 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-bullet-list/src/bullet-list.d.ts +0 -16
- package/dist/packages/extension-bullet-list/src/index.d.ts +0 -3
- package/dist/tiptap-extension-bullet-list.cjs.js +0 -50
- package/dist/tiptap-extension-bullet-list.cjs.js.map +0 -1
- package/dist/tiptap-extension-bullet-list.esm.js +0 -44
- package/dist/tiptap-extension-bullet-list.esm.js.map +0 -1
- package/dist/tiptap-extension-bullet-list.umd.js +0 -54
- package/dist/tiptap-extension-bullet-list.umd.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/extension-bullet-list",
|
|
3
3
|
"description": "bullet 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-bullet-list"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "fce16e805824972834d5a8ce8d60e3ff41d63c7e"
|
|
32
32
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface BulletListOptions {
|
|
3
|
-
HTMLAttributes: Record<string, any>;
|
|
4
|
-
}
|
|
5
|
-
declare module '@tiptap/core' {
|
|
6
|
-
interface Commands<ReturnType> {
|
|
7
|
-
bulletList: {
|
|
8
|
-
/**
|
|
9
|
-
* Toggle a bullet list
|
|
10
|
-
*/
|
|
11
|
-
toggleBulletList: () => ReturnType;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export declare const inputRegex: RegExp;
|
|
16
|
-
export declare const BulletList: Node<BulletListOptions, any>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var core = require('@tiptap/core');
|
|
6
|
-
|
|
7
|
-
const inputRegex = /^\s*([-+*])\s$/;
|
|
8
|
-
const BulletList = core.Node.create({
|
|
9
|
-
name: 'bulletList',
|
|
10
|
-
addOptions() {
|
|
11
|
-
return {
|
|
12
|
-
HTMLAttributes: {},
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
group: 'block list',
|
|
16
|
-
content: 'listItem+',
|
|
17
|
-
parseHTML() {
|
|
18
|
-
return [
|
|
19
|
-
{ tag: 'ul' },
|
|
20
|
-
];
|
|
21
|
-
},
|
|
22
|
-
renderHTML({ HTMLAttributes }) {
|
|
23
|
-
return ['ul', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
24
|
-
},
|
|
25
|
-
addCommands() {
|
|
26
|
-
return {
|
|
27
|
-
toggleBulletList: () => ({ commands }) => {
|
|
28
|
-
return commands.toggleList('bulletList', 'listItem');
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
addKeyboardShortcuts() {
|
|
33
|
-
return {
|
|
34
|
-
'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
addInputRules() {
|
|
38
|
-
return [
|
|
39
|
-
core.wrappingInputRule({
|
|
40
|
-
find: inputRegex,
|
|
41
|
-
type: this.type,
|
|
42
|
-
}),
|
|
43
|
-
];
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
exports.BulletList = BulletList;
|
|
48
|
-
exports["default"] = BulletList;
|
|
49
|
-
exports.inputRegex = inputRegex;
|
|
50
|
-
//# sourceMappingURL=tiptap-extension-bullet-list.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-bullet-list.cjs.js","sources":["../src/bullet-list.ts"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core'\n\nexport interface BulletListOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType,\n }\n }\n}\n\nexport const inputRegex = /^\\s*([-+*])\\s$/\n\nexport const BulletList = Node.create<BulletListOptions>({\n name: 'bulletList',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content: 'listItem+',\n\n parseHTML() {\n return [\n { tag: 'ul' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n toggleBulletList: () => ({ commands }) => {\n return commands.toggleList('bulletList', 'listItem')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n})\n"],"names":["Node","mergeAttributes","wrappingInputRule"],"mappings":";;;;;;MAiBa,UAAU,GAAG,iBAAgB;MAE7B,UAAU,GAAGA,SAAI,CAAC,MAAM,CAAoB;IACvD,IAAI,EAAE,YAAY;IAElB,UAAU;QACR,OAAO;YACL,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;IAED,KAAK,EAAE,YAAY;IAEnB,OAAO,EAAE,WAAW;IAEpB,SAAS;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;IAED,WAAW;QACT,OAAO;YACL,gBAAgB,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;gBACnC,OAAO,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;aACrD;SACF,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE;SAC7D,CAAA;KACF;IAED,aAAa;QACX,OAAO;YACLC,sBAAiB,CAAC;gBAChB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC;SACH,CAAA;KACF;CACF;;;;;;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
const inputRegex = /^\s*([-+*])\s$/;
|
|
4
|
-
const BulletList = Node.create({
|
|
5
|
-
name: 'bulletList',
|
|
6
|
-
addOptions() {
|
|
7
|
-
return {
|
|
8
|
-
HTMLAttributes: {},
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
group: 'block list',
|
|
12
|
-
content: 'listItem+',
|
|
13
|
-
parseHTML() {
|
|
14
|
-
return [
|
|
15
|
-
{ tag: 'ul' },
|
|
16
|
-
];
|
|
17
|
-
},
|
|
18
|
-
renderHTML({ HTMLAttributes }) {
|
|
19
|
-
return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
20
|
-
},
|
|
21
|
-
addCommands() {
|
|
22
|
-
return {
|
|
23
|
-
toggleBulletList: () => ({ commands }) => {
|
|
24
|
-
return commands.toggleList('bulletList', 'listItem');
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
addKeyboardShortcuts() {
|
|
29
|
-
return {
|
|
30
|
-
'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
addInputRules() {
|
|
34
|
-
return [
|
|
35
|
-
wrappingInputRule({
|
|
36
|
-
find: inputRegex,
|
|
37
|
-
type: this.type,
|
|
38
|
-
}),
|
|
39
|
-
];
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export { BulletList, BulletList as default, inputRegex };
|
|
44
|
-
//# sourceMappingURL=tiptap-extension-bullet-list.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-bullet-list.esm.js","sources":["../src/bullet-list.ts"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core'\n\nexport interface BulletListOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType,\n }\n }\n}\n\nexport const inputRegex = /^\\s*([-+*])\\s$/\n\nexport const BulletList = Node.create<BulletListOptions>({\n name: 'bulletList',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content: 'listItem+',\n\n parseHTML() {\n return [\n { tag: 'ul' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n toggleBulletList: () => ({ commands }) => {\n return commands.toggleList('bulletList', 'listItem')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n})\n"],"names":[],"mappings":";;MAiBa,UAAU,GAAG,iBAAgB;MAE7B,UAAU,GAAG,IAAI,CAAC,MAAM,CAAoB;IACvD,IAAI,EAAE,YAAY;IAElB,UAAU;QACR,OAAO;YACL,cAAc,EAAE,EAAE;SACnB,CAAA;KACF;IAED,KAAK,EAAE,YAAY;IAEnB,OAAO,EAAE,WAAW;IAEpB,SAAS;QACP,OAAO;YACL,EAAE,GAAG,EAAE,IAAI,EAAE;SACd,CAAA;KACF;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;KAC/E;IAED,WAAW;QACT,OAAO;YACL,gBAAgB,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;gBACnC,OAAO,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;aACrD;SACF,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE;SAC7D,CAAA;KACF;IAED,aAAa;QACX,OAAO;YACL,iBAAiB,CAAC;gBAChB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC;SACH,CAAA;KACF;CACF;;;;"}
|
|
@@ -1,54 +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-bullet-list"] = {}, global.core));
|
|
5
|
-
})(this, (function (exports, core) { 'use strict';
|
|
6
|
-
|
|
7
|
-
const inputRegex = /^\s*([-+*])\s$/;
|
|
8
|
-
const BulletList = core.Node.create({
|
|
9
|
-
name: 'bulletList',
|
|
10
|
-
addOptions() {
|
|
11
|
-
return {
|
|
12
|
-
HTMLAttributes: {},
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
group: 'block list',
|
|
16
|
-
content: 'listItem+',
|
|
17
|
-
parseHTML() {
|
|
18
|
-
return [
|
|
19
|
-
{ tag: 'ul' },
|
|
20
|
-
];
|
|
21
|
-
},
|
|
22
|
-
renderHTML({ HTMLAttributes }) {
|
|
23
|
-
return ['ul', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
24
|
-
},
|
|
25
|
-
addCommands() {
|
|
26
|
-
return {
|
|
27
|
-
toggleBulletList: () => ({ commands }) => {
|
|
28
|
-
return commands.toggleList('bulletList', 'listItem');
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
addKeyboardShortcuts() {
|
|
33
|
-
return {
|
|
34
|
-
'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
addInputRules() {
|
|
38
|
-
return [
|
|
39
|
-
core.wrappingInputRule({
|
|
40
|
-
find: inputRegex,
|
|
41
|
-
type: this.type,
|
|
42
|
-
}),
|
|
43
|
-
];
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
exports.BulletList = BulletList;
|
|
48
|
-
exports["default"] = BulletList;
|
|
49
|
-
exports.inputRegex = inputRegex;
|
|
50
|
-
|
|
51
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
52
|
-
|
|
53
|
-
}));
|
|
54
|
-
//# sourceMappingURL=tiptap-extension-bullet-list.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-extension-bullet-list.umd.js","sources":["../src/bullet-list.ts"],"sourcesContent":["import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core'\n\nexport interface BulletListOptions {\n HTMLAttributes: Record<string, any>,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n bulletList: {\n /**\n * Toggle a bullet list\n */\n toggleBulletList: () => ReturnType,\n }\n }\n}\n\nexport const inputRegex = /^\\s*([-+*])\\s$/\n\nexport const BulletList = Node.create<BulletListOptions>({\n name: 'bulletList',\n\n addOptions() {\n return {\n HTMLAttributes: {},\n }\n },\n\n group: 'block list',\n\n content: 'listItem+',\n\n parseHTML() {\n return [\n { tag: 'ul' },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['ul', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n toggleBulletList: () => ({ commands }) => {\n return commands.toggleList('bulletList', 'listItem')\n },\n }\n },\n\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-8': () => this.editor.commands.toggleBulletList(),\n }\n },\n\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type,\n }),\n ]\n },\n})\n"],"names":["Node","mergeAttributes","wrappingInputRule"],"mappings":";;;;;;QAiBa,UAAU,GAAG,iBAAgB;QAE7B,UAAU,GAAGA,SAAI,CAAC,MAAM,CAAoB;MACvD,IAAI,EAAE,YAAY;MAElB,UAAU;UACR,OAAO;cACL,cAAc,EAAE,EAAE;WACnB,CAAA;OACF;MAED,KAAK,EAAE,YAAY;MAEnB,OAAO,EAAE,WAAW;MAEpB,SAAS;UACP,OAAO;cACL,EAAE,GAAG,EAAE,IAAI,EAAE;WACd,CAAA;OACF;MAED,UAAU,CAAC,EAAE,cAAc,EAAE;UAC3B,OAAO,CAAC,IAAI,EAAEC,oBAAe,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAA;OAC/E;MAED,WAAW;UACT,OAAO;cACL,gBAAgB,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;kBACnC,OAAO,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;eACrD;WACF,CAAA;OACF;MAED,oBAAoB;UAClB,OAAO;cACL,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE;WAC7D,CAAA;OACF;MAED,aAAa;UACX,OAAO;cACLC,sBAAiB,CAAC;kBAChB,IAAI,EAAE,UAAU;kBAChB,IAAI,EAAE,IAAI,CAAC,IAAI;eAChB,CAAC;WACH,CAAA;OACF;GACF;;;;;;;;;;;;"}
|