tiptap-utils
Advanced tools
Comparing version 1.3.0 to 1.4.0
/*! | ||
* tiptap-utils v1.2.0 | ||
* tiptap-utils v1.3.0 | ||
* (c) 2019 Scrumpy UG (limited liability) | ||
@@ -40,3 +40,3 @@ * @license MIT | ||
state.doc.nodesBetween(from, to, function (node) { | ||
marks = _toConsumableArray(marks).concat(_toConsumableArray(node.marks)); | ||
marks = [].concat(_toConsumableArray(marks), _toConsumableArray(node.marks)); | ||
}); | ||
@@ -43,0 +43,0 @@ var mark = marks.find(function (markItem) { |
/*! | ||
* tiptap-utils v1.2.0 | ||
* tiptap-utils v1.3.0 | ||
* (c) 2019 Scrumpy UG (limited liability) | ||
@@ -36,3 +36,3 @@ * @license MIT | ||
state.doc.nodesBetween(from, to, function (node) { | ||
marks = _toConsumableArray(marks).concat(_toConsumableArray(node.marks)); | ||
marks = [].concat(_toConsumableArray(marks), _toConsumableArray(node.marks)); | ||
}); | ||
@@ -39,0 +39,0 @@ var mark = marks.find(function (markItem) { |
/*! | ||
* tiptap-utils v1.2.0 | ||
* tiptap-utils v1.3.0 | ||
* (c) 2019 Scrumpy UG (limited liability) | ||
@@ -11,3 +11,3 @@ * @license MIT | ||
typeof define === 'function' && define.amd ? define(['exports', 'prosemirror-utils'], factory) : | ||
(global = global || self, factory(global.tiptap = {}, global.prosemirrorUtils)); | ||
(global = global || self, factory(global.tiptapUtils = {}, global.prosemirrorUtils)); | ||
}(this, function (exports, prosemirrorUtils) { 'use strict'; | ||
@@ -41,3 +41,3 @@ | ||
state.doc.nodesBetween(from, to, function (node) { | ||
marks = _toConsumableArray(marks).concat(_toConsumableArray(node.marks)); | ||
marks = [].concat(_toConsumableArray(marks), _toConsumableArray(node.marks)); | ||
}); | ||
@@ -44,0 +44,0 @@ var mark = marks.find(function (markItem) { |
/*! | ||
* tiptap-utils v1.2.0 | ||
* tiptap-utils v1.3.0 | ||
* (c) 2019 Scrumpy UG (limited liability) | ||
@@ -9,2 +9,2 @@ * @license MIT | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("prosemirror-utils")):"function"==typeof define&&define.amd?define(["exports","prosemirror-utils"],r):r((e=e||self).tiptap={},e.prosemirrorUtils)}(this,function(e,o){"use strict";function f(e){return function(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e.getMarkAttrs=function(e,r){var t=e.selection,n=t.from,o=t.to,i=[];e.doc.nodesBetween(n,o,function(e){i=f(i).concat(f(e.marks))});var a=i.find(function(e){return e.type.name===r.name});return a?a.attrs:{}},e.getMarkRange=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(!e||!r)return!1;var t=e.parent.childAfter(e.parentOffset);if(!t.node)return!1;var n=t.node.marks.find(function(e){return e.type===r});if(!n)return!1;for(var o=e.index(),i=e.start()+t.offset;0<o&&n.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;return{from:i,to:i+t.node.nodeSize}},e.markIsActive=function(e,r){var t=e.selection,n=t.from,o=t.$from,i=t.to;return t.empty?!!r.isInSet(e.storedMarks||o.marks()):!!e.doc.rangeHasMark(n,i,r)},e.nodeIsActive=function(e,r){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=o.findParentNode(function(e){return e.type===r})(e.selection);return Object.keys(t).length&&n?n.node.hasMarkup(r,t):!!n},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prosemirror-utils")):"function"==typeof define&&define.amd?define(["exports","prosemirror-utils"],t):t((e=e||self).tiptapUtils={},e.prosemirrorUtils)}(this,function(e,t){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e.getMarkAttrs=function(e,t){var n=e.selection,o=n.from,i=n.to,a=[];e.doc.nodesBetween(o,i,function(e){a=[].concat(r(a),r(e.marks))});var f=a.find(function(e){return e.type.name===t.name});return f?f.attrs:{}},e.getMarkRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||!t)return!1;var r=e.parent.childAfter(e.parentOffset);if(!r.node)return!1;var n=r.node.marks.find(function(e){return e.type===t});if(!n)return!1;for(var o=e.index(),i=e.start()+r.offset;o>0&&n.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;return{from:i,to:i+r.node.nodeSize}},e.markIsActive=function(e,t){var r=e.selection,n=r.from,o=r.$from,i=r.to;return r.empty?!!t.isInSet(e.storedMarks||o.marks()):!!e.doc.rangeHasMark(n,i,t)},e.nodeIsActive=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.findParentNode(function(e){return e.type===r})(e.selection);return Object.keys(n).length&&o?o.node.hasMarkup(r,n):!!o},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "tiptap-utils", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Utility functions for tiptap", | ||
@@ -25,6 +25,6 @@ "homepage": "https://tiptap.scrumpy.io", | ||
"prosemirror-state": "^1.2.2", | ||
"prosemirror-tables": "^0.7.9", | ||
"prosemirror-tables": "^0.7.11", | ||
"prosemirror-utils": "^0.7.6" | ||
}, | ||
"gitHead": "93ceec111dadb99ffa19eb6a86796a279e2ed860" | ||
"gitHead": "0e59e0cc0c2b4f0be5c46ebf2a698c674bfda821" | ||
} |
16399
Updatedprosemirror-tables@^0.7.11