@tiptap/extension-task-item
Advanced tools
Comparing version 2.0.0-beta.18 to 2.0.0-beta.19
@@ -6,3 +6,2 @@ 'use strict'; | ||
var core = require('@tiptap/core'); | ||
var prosemirrorInputrules = require('prosemirror-inputrules'); | ||
@@ -118,5 +117,9 @@ const inputRegex = /^\s*(\[([ |x])\])\s$/; | ||
return [ | ||
prosemirrorInputrules.wrappingInputRule(inputRegex, this.type, match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
})), | ||
core.wrappingInputRule({ | ||
find: inputRegex, | ||
type: this.type, | ||
getAttributes: match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
}), | ||
}), | ||
]; | ||
@@ -127,4 +130,4 @@ }, | ||
exports.TaskItem = TaskItem; | ||
exports['default'] = TaskItem; | ||
exports["default"] = TaskItem; | ||
exports.inputRegex = inputRegex; | ||
//# sourceMappingURL=tiptap-extension-task-item.cjs.js.map |
@@ -1,3 +0,2 @@ | ||
import { Node, mergeAttributes } from '@tiptap/core'; | ||
import { wrappingInputRule } from 'prosemirror-inputrules'; | ||
import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core'; | ||
@@ -113,5 +112,9 @@ const inputRegex = /^\s*(\[([ |x])\])\s$/; | ||
return [ | ||
wrappingInputRule(inputRegex, this.type, match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
})), | ||
wrappingInputRule({ | ||
find: inputRegex, | ||
type: this.type, | ||
getAttributes: match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
}), | ||
}), | ||
]; | ||
@@ -118,0 +121,0 @@ }, |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core'), require('prosemirror-inputrules')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core', 'prosemirror-inputrules'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@tiptap/extension-task-item'] = {}, global.core, global.prosemirrorInputrules)); | ||
}(this, (function (exports, core, prosemirrorInputrules) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-task-item"] = {}, global.core)); | ||
})(this, (function (exports, core) { 'use strict'; | ||
@@ -116,5 +116,9 @@ const inputRegex = /^\s*(\[([ |x])\])\s$/; | ||
return [ | ||
prosemirrorInputrules.wrappingInputRule(inputRegex, this.type, match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
})), | ||
core.wrappingInputRule({ | ||
find: inputRegex, | ||
type: this.type, | ||
getAttributes: match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
}), | ||
}), | ||
]; | ||
@@ -125,3 +129,3 @@ }, | ||
exports.TaskItem = TaskItem; | ||
exports['default'] = TaskItem; | ||
exports["default"] = TaskItem; | ||
exports.inputRegex = inputRegex; | ||
@@ -131,3 +135,3 @@ | ||
}))); | ||
})); | ||
//# sourceMappingURL=tiptap-extension-task-item.umd.js.map |
{ | ||
"name": "@tiptap/extension-task-item", | ||
"description": "task item extension for tiptap", | ||
"version": "2.0.0-beta.18", | ||
"version": "2.0.0-beta.19", | ||
"homepage": "https://tiptap.dev", | ||
@@ -26,5 +26,2 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"prosemirror-inputrules": "^1.1.3" | ||
}, | ||
"repository": { | ||
@@ -35,3 +32,3 @@ "type": "git", | ||
}, | ||
"gitHead": "42e8755d87b37506d537152dbae4b0c8d497fd48" | ||
"gitHead": "ed00dbbe56d7a31dbfcf02594c4ce5f54c7bc27a" | ||
} |
@@ -1,3 +0,2 @@ | ||
import { Node, mergeAttributes } from '@tiptap/core' | ||
import { wrappingInputRule } from 'prosemirror-inputrules' | ||
import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core' | ||
@@ -149,11 +148,11 @@ export interface TaskItemOptions { | ||
return [ | ||
wrappingInputRule( | ||
inputRegex, | ||
this.type, | ||
match => ({ | ||
wrappingInputRule({ | ||
find: inputRegex, | ||
type: this.type, | ||
getAttributes: match => ({ | ||
checked: match[match.length - 1] === 'x', | ||
}), | ||
), | ||
}), | ||
] | ||
}, | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
523
42456
13
- Removedprosemirror-inputrules@^1.1.3