Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tiptap-commands

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiptap-commands - npm Package Compare versions

Comparing version 1.14.3 to 1.14.4

4

dist/commands.common.js
/*!
* tiptap-commands v1.14.2
* (c) 2020 überdosis GbR (limited liability)
* tiptap-commands v1.14.0
* (c) 2020 Scrumpy UG (limited liability)
* @license MIT

@@ -6,0 +6,0 @@ */

/*!
* tiptap-commands v1.14.2
* (c) 2020 überdosis GbR (limited liability)
* tiptap-commands v1.14.0
* (c) 2020 Scrumpy UG (limited liability)
* @license MIT

@@ -6,0 +6,0 @@ */

/*!
* tiptap-commands v1.14.2
* (c) 2020 überdosis GbR (limited liability)
* tiptap-commands v1.14.0
* (c) 2020 Scrumpy UG (limited liability)
* @license MIT

@@ -6,0 +6,0 @@ */

/*!
* tiptap-commands v1.14.2
* (c) 2020 überdosis GbR (limited liability)
* tiptap-commands v1.14.0
* (c) 2020 Scrumpy UG (limited liability)
* @license MIT

@@ -10,6 +10,6 @@ */

/*!
* tiptap-commands v1.14.2
* (c) 2020 überdosis GbR (limited liability)
* tiptap-commands v1.14.0
* (c) 2020 Scrumpy UG (limited liability)
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prosemirror-commands"),require("prosemirror-schema-list"),require("prosemirror-inputrules"),require("prosemirror-state"),require("prosemirror-model"),require("tiptap-utils"),require("prosemirror-utils")):"function"==typeof define&&define.amd?define(["exports","prosemirror-commands","prosemirror-schema-list","prosemirror-inputrules","prosemirror-state","prosemirror-model","tiptap-utils","prosemirror-utils"],t):t((e=e||self).tiptapCommands={},e.prosemirrorCommands,e.prosemirrorSchemaList,e.prosemirrorInputrules,e.prosemirrorState,e.prosemirrorModel,e.tiptapUtils,e.prosemirrorUtils)}(this,(function(e,t,r,n,o,i,u,a){"use strict";function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list||e.type===t.nodes.todo_list}Object.defineProperty(e,"autoJoin",{enumerable:!0,get:function(){return t.autoJoin}}),Object.defineProperty(e,"baseKeymap",{enumerable:!0,get:function(){return t.baseKeymap}}),Object.defineProperty(e,"chainCommands",{enumerable:!0,get:function(){return t.chainCommands}}),Object.defineProperty(e,"createParagraphNear",{enumerable:!0,get:function(){return t.createParagraphNear}}),Object.defineProperty(e,"deleteSelection",{enumerable:!0,get:function(){return t.deleteSelection}}),Object.defineProperty(e,"exitCode",{enumerable:!0,get:function(){return t.exitCode}}),Object.defineProperty(e,"joinBackward",{enumerable:!0,get:function(){return t.joinBackward}}),Object.defineProperty(e,"joinDown",{enumerable:!0,get:function(){return t.joinDown}}),Object.defineProperty(e,"joinForward",{enumerable:!0,get:function(){return t.joinForward}}),Object.defineProperty(e,"joinUp",{enumerable:!0,get:function(){return t.joinUp}}),Object.defineProperty(e,"lift",{enumerable:!0,get:function(){return t.lift}}),Object.defineProperty(e,"liftEmptyBlock",{enumerable:!0,get:function(){return t.liftEmptyBlock}}),Object.defineProperty(e,"macBaseKeymap",{enumerable:!0,get:function(){return t.macBaseKeymap}}),Object.defineProperty(e,"newlineInCode",{enumerable:!0,get:function(){return t.newlineInCode}}),Object.defineProperty(e,"pcBaseKeymap",{enumerable:!0,get:function(){return t.pcBaseKeymap}}),Object.defineProperty(e,"selectAll",{enumerable:!0,get:function(){return t.selectAll}}),Object.defineProperty(e,"selectNodeBackward",{enumerable:!0,get:function(){return t.selectNodeBackward}}),Object.defineProperty(e,"selectNodeForward",{enumerable:!0,get:function(){return t.selectNodeForward}}),Object.defineProperty(e,"selectParentNode",{enumerable:!0,get:function(){return t.selectParentNode}}),Object.defineProperty(e,"setBlockType",{enumerable:!0,get:function(){return t.setBlockType}}),Object.defineProperty(e,"splitBlock",{enumerable:!0,get:function(){return t.splitBlock}}),Object.defineProperty(e,"splitBlockKeepMarks",{enumerable:!0,get:function(){return t.splitBlockKeepMarks}}),Object.defineProperty(e,"toggleMark",{enumerable:!0,get:function(){return t.toggleMark}}),Object.defineProperty(e,"wrapIn",{enumerable:!0,get:function(){return t.wrapIn}}),Object.defineProperty(e,"addListNodes",{enumerable:!0,get:function(){return r.addListNodes}}),Object.defineProperty(e,"liftListItem",{enumerable:!0,get:function(){return r.liftListItem}}),Object.defineProperty(e,"sinkListItem",{enumerable:!0,get:function(){return r.sinkListItem}}),Object.defineProperty(e,"splitListItem",{enumerable:!0,get:function(){return r.splitListItem}}),Object.defineProperty(e,"wrapInList",{enumerable:!0,get:function(){return r.wrapInList}}),Object.defineProperty(e,"textblockTypeInputRule",{enumerable:!0,get:function(){return n.textblockTypeInputRule}}),Object.defineProperty(e,"wrappingInputRule",{enumerable:!0,get:function(){return n.wrappingInputRule}}),e.insertText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(t,r){var n=t.selection.$from.pos.pos;return r(t.tr.insertText(e,n)),!0}},e.markInputRule=function(e,t,r){return new n.InputRule(e,(function(e,n,o,i){var u=r instanceof Function?r(n):r,a=e.tr,l=n.length-1,p=i,f=o;if(n[l]){var s=o+n[0].indexOf(n[l-1]),d=s+n[l-1].length-1,m=s+n[l-1].lastIndexOf(n[l]),y=m+n[l].length;if(function(e,t,r){var n=[];return r.doc.nodesBetween(e,t,(function(e,t){n=[].concat(c(n),c(e.marks.map((function(r){return{start:t,end:t+e.nodeSize,mark:r}}))))})),n}(o,i,e).filter((function(e){return e.mark.type.excluded.find((function(e){return e.name===t.name}))})).filter((function(e){return e.end>s})).length)return!1;y<d&&a.delete(y,d),m>s&&a.delete(s,m),p=(f=s)+n[l].length}return a.addMark(f,p,t.create(u)),a.removeStoredMark(t),a}))},e.markPasteRule=function(e,t,r){return new o.Plugin({props:{transformPasted:function(n){return new i.Slice(function n(o,u){var a=[];return o.forEach((function(o){if(o.isText){for(var i,c=o.text,l=0,p=!!o.marks.filter((function(e){return"link"===e.type.name}))[0];!p&&null!==(i=e.exec(c));)if(u&&u.type.allowsMarkType(t)&&i[1]){var f=i.index,s=f+i[0].length,d=f+i[0].indexOf(i[1]),m=d+i[1].length,y=r instanceof Function?r(i):r;f>0&&a.push(o.cut(l,f)),a.push(o.cut(d,m).mark(t.create(y).addToSet(o.marks))),l=s}l<c.length&&a.push(o.cut(l))}else a.push(o.copy(n(o.content,o)))})),i.Fragment.fromArray(a)}(n.content),n.openStart,n.openEnd)}}})},e.nodeInputRule=function(e,t,r){return new n.InputRule(e,(function(e,n,o,i){var u=r instanceof Function?r(n):r,a=e.tr;return n[0]&&a.replaceWith(o-1,i,t.create(u)),a}))},e.pasteRule=function(e,t,r){return new o.Plugin({props:{transformPasted:function(n){return new i.Slice(function n(o){var u=[];return o.forEach((function(o){if(o.isText){var i,a=o.text,c=0;do{if(i=e.exec(a)){var l=i.index,p=l+i[0].length,f=r instanceof Function?r(i[0]):r;l>0&&u.push(o.cut(c,l)),u.push(o.cut(l,p).mark(t.create(f).addToSet(o.marks))),c=p}}while(i);c<a.length&&u.push(o.cut(c))}else u.push(o.copy(n(o.content)))})),i.Fragment.fromArray(u)}(n.content),n.openStart,n.openEnd)}}})},e.removeMark=function(e){return function(t,r){var n=t.tr,o=t.selection,i=o.from,a=o.to,c=o.$from;if(o.empty){var l=u.getMarkRange(c,e);i=l.from,a=l.to}return n.removeMark(i,a,e),r(n)}},e.replaceText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(n,o){var i=n.selection,u=i.$from,a=i.$to,c=u.index(),l=e?e.from:u.pos,p=e?e.to:a.pos;return!!u.parent.canReplaceWith(c,c,t)&&(o&&o(n.tr.replaceWith(l,p,t.create(r))),!0)}},e.setInlineBlockType=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r,n){var o=r.selection.$from,i=o.index();return!!o.parent.canReplaceWith(i,i,e)&&(n&&n(r.tr.replaceSelectionWith(e.create(t))),!0)}},e.splitToDefaultListItem=function(e){return function(t,r){var n=t.selection,o=n.$from,u=n.$to,a=n.node;if(a&&a.isBlock||o.depth<2||!o.sameParent(u))return!1;var c=o.node(-1);if(c.type!=e)return!1;if(0==o.parent.content.size){if(2==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(r){for(var l=i.Fragment.empty,p=o.index(-1)>0,f=o.depth-(p?1:2);f>=o.depth-3;f--)l=i.Fragment.from(o.node(f).copy(l));l=l.append(i.Fragment.from(e.createAndFill()));var s=t.tr.replace(o.before(p?null:-1),o.after(-3),new i.Slice(l,p?3:2,2));s.setSelection(t.selection.constructor.near(s.doc.resolve(o.pos+(p?3:2)))),r(s.scrollIntoView())}return!0}var d=u.pos==o.end()?c.contentMatchAt(o.indexAfter(-1)).defaultType:null,m=t.tr.delete(o.pos,u.pos),y=d&&[{type:e},{type:d}];return y||(y=[{type:e},null]),!!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-r,u=n&&n[n.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!u.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var a=o.depth-1,c=r-2;a>i;a--,c--){var l=o.node(a),p=o.index(a);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(p,l.childCount),s=n&&n[c]||l;if(s!=l&&(f=f.replaceChild(0,s.type.create(s.attrs))),!l.canReplace(p+1,l.childCount))return!1}var d=o.indexAfter(i),m=n&&n[0];return o.node(i).canReplaceWith(d,d,m?m.type:o.node(i+1).type)}(m.doc,o.pos,2,y)&&(r&&r(m.split(o.pos,2,y).scrollIntoView()),!0)}},e.toggleBlockType=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o,i,a){return u.nodeIsActive(o,e,n)?t.setBlockType(r)(o,i,a):t.setBlockType(e,n)(o,i,a)}},e.toggleList=function(e,t){return function(n,o,i){var u=n.schema,c=n.selection,l=c.$from,f=c.$to,s=l.blockRange(f);if(!s)return!1;var d=a.findParentNode((function(e){return p(e,u)}))(c);if(s.depth>=1&&d&&s.depth-d.depth<=1){if(d.node.type===e)return r.liftListItem(t)(n,o,i);if(p(d.node,u)&&e.validContent(d.node.content)){var m=n.tr;return m.setNodeMarkup(d.pos,e),o&&o(m),!1}}return r.wrapInList(e)(n,o,i)}},e.toggleWrap=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n,o,i){return u.nodeIsActive(n,e,r)?t.lift(n,o):t.wrapIn(e,r)(n,o,i)}},e.updateMark=function(e,t){return function(r,n){var o=r.tr,i=r.selection,a=r.doc,c=i.from,l=i.to,p=i.$from;if(i.empty){var f=u.getMarkRange(p,e);c=f.from,l=f.to}return a.rangeHasMark(c,l,e)&&o.removeMark(c,l,e),o.addMark(c,l,e.create(t)),n(o)}},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "tiptap-commands",
"version": "1.14.3",
"version": "1.14.4",
"description": "Commands for tiptap",

@@ -25,10 +25,10 @@ "homepage": "https://tiptap.dev",

"prosemirror-inputrules": "^1.1.2",
"prosemirror-model": "^1.10.0",
"prosemirror-schema-list": "^1.1.2",
"prosemirror-model": "^1.11.0",
"prosemirror-schema-list": "^1.1.3",
"prosemirror-state": "^1.3.3",
"prosemirror-tables": "^1.1.0",
"prosemirror-tables": "^1.1.1",
"prosemirror-utils": "^0.9.6",
"tiptap-utils": "^1.10.3"
"tiptap-utils": "^1.10.4"
},
"gitHead": "c99bfb2bee1f63b98ae63df6d9eb3b4bbdb553af"
"gitHead": "a031370f4cdbf990311373bbe14ba80cd7deae5f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc