New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.7.1 to 1.8.0

2

dist/commands.common.js
/*!
* tiptap-commands v1.7.0
* tiptap-commands v1.7.1
* (c) 2019 Scrumpy UG (limited liability)

@@ -5,0 +5,0 @@ * @license MIT

/*!
* tiptap-commands v1.7.0
* tiptap-commands v1.7.1
* (c) 2019 Scrumpy UG (limited liability)

@@ -5,0 +5,0 @@ * @license MIT

/*!
* tiptap-commands v1.7.0
* tiptap-commands v1.7.1
* (c) 2019 Scrumpy UG (limited liability)

@@ -11,3 +11,3 @@ * @license MIT

typeof define === 'function' && define.amd ? define(['exports', 'prosemirror-commands', 'prosemirror-schema-list', 'prosemirror-inputrules', 'prosemirror-state', 'prosemirror-model', 'tiptap-utils'], factory) :
(global = global || self, factory(global.tiptap = {}, global.prosemirrorCommands, global.prosemirrorSchemaList, global.prosemirrorInputrules, global.prosemirrorState, global.prosemirrorModel, global.tiptapUtils));
(global = global || self, factory(global.tiptapCommands = {}, global.prosemirrorCommands, global.prosemirrorSchemaList, global.prosemirrorInputrules, global.prosemirrorState, global.prosemirrorModel, global.tiptapUtils));
}(this, function (exports, prosemirrorCommands, prosemirrorSchemaList, prosemirrorInputrules, prosemirrorState, prosemirrorModel, tiptapUtils) { 'use strict';

@@ -14,0 +14,0 @@

/*!
* tiptap-commands v1.7.0
* tiptap-commands v1.7.1
* (c) 2019 Scrumpy UG (limited liability)

@@ -9,2 +9,2 @@ * @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")):"function"==typeof define&&define.amd?define(["exports","prosemirror-commands","prosemirror-schema-list","prosemirror-inputrules","prosemirror-state","prosemirror-model","tiptap-utils"],t):t((e=e||self).tiptap={},e.prosemirrorCommands,e.prosemirrorSchemaList,e.prosemirrorInputrules,e.prosemirrorState,e.prosemirrorModel,e.tiptapUtils)}(this,function(e,u,i,t,r,n,c){"use strict";Object.defineProperty(e,"autoJoin",{enumerable:!0,get:function(){return u.autoJoin}}),Object.defineProperty(e,"baseKeymap",{enumerable:!0,get:function(){return u.baseKeymap}}),Object.defineProperty(e,"chainCommands",{enumerable:!0,get:function(){return u.chainCommands}}),Object.defineProperty(e,"createParagraphNear",{enumerable:!0,get:function(){return u.createParagraphNear}}),Object.defineProperty(e,"deleteSelection",{enumerable:!0,get:function(){return u.deleteSelection}}),Object.defineProperty(e,"exitCode",{enumerable:!0,get:function(){return u.exitCode}}),Object.defineProperty(e,"joinBackward",{enumerable:!0,get:function(){return u.joinBackward}}),Object.defineProperty(e,"joinDown",{enumerable:!0,get:function(){return u.joinDown}}),Object.defineProperty(e,"joinForward",{enumerable:!0,get:function(){return u.joinForward}}),Object.defineProperty(e,"joinUp",{enumerable:!0,get:function(){return u.joinUp}}),Object.defineProperty(e,"lift",{enumerable:!0,get:function(){return u.lift}}),Object.defineProperty(e,"liftEmptyBlock",{enumerable:!0,get:function(){return u.liftEmptyBlock}}),Object.defineProperty(e,"macBaseKeymap",{enumerable:!0,get:function(){return u.macBaseKeymap}}),Object.defineProperty(e,"newlineInCode",{enumerable:!0,get:function(){return u.newlineInCode}}),Object.defineProperty(e,"pcBaseKeymap",{enumerable:!0,get:function(){return u.pcBaseKeymap}}),Object.defineProperty(e,"selectAll",{enumerable:!0,get:function(){return u.selectAll}}),Object.defineProperty(e,"selectNodeBackward",{enumerable:!0,get:function(){return u.selectNodeBackward}}),Object.defineProperty(e,"selectNodeForward",{enumerable:!0,get:function(){return u.selectNodeForward}}),Object.defineProperty(e,"selectParentNode",{enumerable:!0,get:function(){return u.selectParentNode}}),Object.defineProperty(e,"setBlockType",{enumerable:!0,get:function(){return u.setBlockType}}),Object.defineProperty(e,"splitBlock",{enumerable:!0,get:function(){return u.splitBlock}}),Object.defineProperty(e,"splitBlockKeepMarks",{enumerable:!0,get:function(){return u.splitBlockKeepMarks}}),Object.defineProperty(e,"toggleMark",{enumerable:!0,get:function(){return u.toggleMark}}),Object.defineProperty(e,"wrapIn",{enumerable:!0,get:function(){return u.wrapIn}}),Object.defineProperty(e,"addListNodes",{enumerable:!0,get:function(){return i.addListNodes}}),Object.defineProperty(e,"liftListItem",{enumerable:!0,get:function(){return i.liftListItem}}),Object.defineProperty(e,"sinkListItem",{enumerable:!0,get:function(){return i.sinkListItem}}),Object.defineProperty(e,"splitListItem",{enumerable:!0,get:function(){return i.splitListItem}}),Object.defineProperty(e,"wrapInList",{enumerable:!0,get:function(){return i.wrapInList}}),Object.defineProperty(e,"textblockTypeInputRule",{enumerable:!0,get:function(){return t.textblockTypeInputRule}}),Object.defineProperty(e,"wrappingInputRule",{enumerable:!0,get:function(){return t.wrappingInputRule}}),e.insertText=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return function(e,t){var r=e.selection.$from.pos.pos;return t(e.tr.insertText(n,r)),!0}},e.markInputRule=function(e,l,f){return new t.InputRule(e,function(e,t,r,n){var o=f instanceof Function?f(t):f,i=e.tr,u=n;if(t[1]){var c=t[0].search(/\S/),a=r+t[0].indexOf(t[1]),p=a+t[1].length;p<n&&i.delete(p,n),r<a&&i.delete(r+c,a),u=r+c+t[1].length}return i.addMark(r,u,l.create(o)),i.removeStoredMark(l),i})},e.markPasteRule=function(f,s,d){return new r.Plugin({props:{transformPasted:function(e){return new n.Slice(function p(e){var l=[];return e.forEach(function(e){if(e.isText){for(var t,r=e.text,n=0;null!==(t=f.exec(r));)if(t[1]){var o=t.index,i=o+t[0].length,u=o+t[0].indexOf(t[1]),c=u+t[1].length,a=d instanceof Function?d(t):d;0<o&&l.push(e.cut(n,o)),l.push(e.cut(u,c).mark(s.create(a).addToSet(e.marks))),n=i}n<r.length&&l.push(e.cut(n))}else l.push(e.copy(p(e.content)))}),n.Fragment.fromArray(l)}(e.content),e.openStart,e.openEnd)}}})},e.nodeInputRule=function(e,u,c){return new t.InputRule(e,function(e,t,r,n){var o=c instanceof Function?c(t):c,i=e.tr;return t[0]&&i.replaceWith(r-1,n,u.create(o)),i})},e.pasteRule=function(p,l,f){return new r.Plugin({props:{transformPasted:function(e){return new n.Slice(function c(e){var a=[];return e.forEach(function(e){if(e.isText){var t,r=e.text,n=0;do{if(t=p.exec(r)){var o=t.index,i=o+t[0].length,u=f instanceof Function?f(t[0]):f;0<o&&a.push(e.cut(n,o)),a.push(e.cut(o,i).mark(l.create(u).addToSet(e.marks))),n=i}}while(t);n<r.length&&a.push(e.cut(n))}else a.push(e.copy(c(e.content)))}),n.Fragment.fromArray(a)}(e.content),e.openStart,e.openEnd)}}})},e.removeMark=function(i){return function(e,t){var r=e.selection,n=r.from,o=r.to;return t(e.tr.removeMark(n,o,i))}},e.replaceText=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,p=1<arguments.length?arguments[1]:void 0,l=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return function(e,t){var r=e.selection,n=r.$from,o=r.$to,i=n.index(),u=a?a.from:n.pos,c=a?a.to:o.pos;return!!n.parent.canReplaceWith(i,i,p)&&(t&&t(e.tr.replaceWith(u,c,p.create(l))),!0)}},e.setInlineBlockType=function(o){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){var r=e.selection.$from,n=r.index();return!!r.parent.canReplaceWith(n,n,o)&&(t&&t(e.tr.replaceSelectionWith(o.create(i))),!0)}},e.splitToDefaultListItem=function(m){return function(e,t){var r=e.selection,n=r.$from,o=r.$to,i=r.node;if(i&&i.isBlock||n.depth<2||!n.sameParent(o))return!1;var u=n.node(-1);if(u.type!=m)return!1;if(0==n.parent.content.size){if(2==n.depth||n.node(-3).type!=m||n.index(-2)!=n.node(-2).childCount-1)return!1;if(t){for(var c=Fragment.empty,a=0<n.index(-1),p=n.depth-(a?1:2);p>=n.depth-3;p--)c=Fragment.from(n.node(p).copy(c));c=c.append(Fragment.from(m.createAndFill()));var l=e.tr.replace(n.before(a?null:-1),n.after(-3),new Slice(c,a?3:2,2));l.setSelection(e.selection.constructor.near(l.doc.resolve(n.pos+(a?3:2)))),t(l.scrollIntoView())}return!0}var f=o.pos==n.end()?u.contentMatchAt(n.indexAfter(-1)).defaultType:null,s=e.tr.delete(n.pos,o.pos),d=f&&[{type:m},{type:f}];return d||(d=[{type:m},null]),!!function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=3<arguments.length?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 c=o.depth-1,a=r-2;i<c;c--,a--){var p=o.node(c),l=o.index(c);if(p.type.spec.isolating)return!1;var f=p.content.cutByIndex(l,p.childCount),s=n&&n[a]||p;if(s!=p&&(f=f.replaceChild(0,s.type.create(s.attrs))),!p.canReplace(l+1,p.childCount))return!1}var d=o.indexAfter(i),m=n&&n[0];return o.node(i).canReplaceWith(d,d,m?m.type:o.node(1+i).type)}(s.doc,n.pos,2,d)&&(t&&t(s.split(n.pos,2,d).scrollIntoView()),!0)}},e.toggleBlockType=function(n,o){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return function(e,t,r){return c.nodeIsActive(e,n,i)?u.setBlockType(o)(e,t,r):u.setBlockType(n,i)(e,t,r)}},e.toggleList=function(n,o){return function(e,t,r){return c.nodeIsActive(e,n)?i.liftListItem(o)(e,t,r):i.wrapInList(n)(e,t,r)}},e.toggleWrap=function(n){return function(e,t,r){return c.nodeIsActive(e,n)?u.lift(e,t):u.wrapIn(n)(e,t,r)}},e.updateMark=function(i,u){return function(e,t){var r=e.selection,n=r.from,o=r.to;return t(e.tr.addMark(n,o,i.create(u)))}},Object.defineProperty(e,"__esModule",{value:!0})});
!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")):"function"==typeof define&&define.amd?define(["exports","prosemirror-commands","prosemirror-schema-list","prosemirror-inputrules","prosemirror-state","prosemirror-model","tiptap-utils"],t):t((e=e||self).tiptapCommands={},e.prosemirrorCommands,e.prosemirrorSchemaList,e.prosemirrorInputrules,e.prosemirrorState,e.prosemirrorModel,e.tiptapUtils)}(this,function(e,t,r,n,o,i,u){"use strict";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,c=e.tr,a=i;if(n[1]){var p=n[0].search(/\S/),l=o+n[0].indexOf(n[1]),f=l+n[1].length;f<i&&c.delete(f,i),l>o&&c.delete(o+p,l),a=o+p+n[1].length}return c.addMark(o,a,t.create(u)),c.removeStoredMark(t),c})},e.markPasteRule=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){for(var i,c=o.text,a=0;null!==(i=e.exec(c));)if(i[1]){var p=i.index,l=p+i[0].length,f=p+i[0].indexOf(i[1]),s=f+i[1].length,d=r instanceof Function?r(i):r;p>0&&u.push(o.cut(a,p)),u.push(o.cut(f,s).mark(t.create(d).addToSet(o.marks))),a=l}a<c.length&&u.push(o.cut(a))}else u.push(o.copy(n(o.content)))}),i.Fragment.fromArray(u)}(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,c=e.tr;return n[0]&&c.replaceWith(o-1,i,t.create(u)),c})},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,c=o.text,a=0;do{if(i=e.exec(c)){var p=i.index,l=p+i[0].length,f=r instanceof Function?r(i[0]):r;p>0&&u.push(o.cut(a,p)),u.push(o.cut(p,l).mark(t.create(f).addToSet(o.marks))),a=l}}while(i);a<c.length&&u.push(o.cut(a))}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.selection,o=n.from,i=n.to;return r(t.tr.removeMark(o,i,e))}},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,c=i.$to,a=u.index(),p=e?e.from:u.pos,l=e?e.to:c.pos;return!!u.parent.canReplaceWith(a,a,t)&&(o&&o(n.tr.replaceWith(p,l,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,i=n.$to,u=n.node;if(u&&u.isBlock||o.depth<2||!o.sameParent(i))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 a=Fragment.empty,p=o.index(-1)>0,l=o.depth-(p?1:2);l>=o.depth-3;l--)a=Fragment.from(o.node(l).copy(a));a=a.append(Fragment.from(e.createAndFill()));var f=t.tr.replace(o.before(p?null:-1),o.after(-3),new Slice(a,p?3:2,2));f.setSelection(t.selection.constructor.near(f.doc.resolve(o.pos+(p?3:2)))),r(f.scrollIntoView())}return!0}var s=i.pos==o.end()?c.contentMatchAt(o.indexAfter(-1)).defaultType:null,d=t.tr.delete(o.pos,i.pos),m=s&&[{type:e},{type:s}];return m||(m=[{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 c=o.depth-1,a=r-2;c>i;c--,a--){var p=o.node(c),l=o.index(c);if(p.type.spec.isolating)return!1;var f=p.content.cutByIndex(l,p.childCount),s=n&&n[a]||p;if(s!=p&&(f=f.replaceChild(0,s.type.create(s.attrs))),!p.canReplace(l+1,p.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)}(d.doc,o.pos,2,m)&&(r&&r(d.split(o.pos,2,m).scrollIntoView()),!0)}},e.toggleBlockType=function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o,i,c){return u.nodeIsActive(o,e,n)?t.setBlockType(r)(o,i,c):t.setBlockType(e,n)(o,i,c)}},e.toggleList=function(e,t){return function(n,o,i){return u.nodeIsActive(n,e)?r.liftListItem(t)(n,o,i):r.wrapInList(e)(n,o,i)}},e.toggleWrap=function(e){return function(r,n,o){return u.nodeIsActive(r,e)?t.lift(r,n):t.wrapIn(e)(r,n,o)}},e.updateMark=function(e,t){return function(r,n){var o=r.selection,i=o.from,u=o.to;return n(r.tr.addMark(i,u,e.create(t)))}},Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "tiptap-commands",
"version": "1.7.1",
"version": "1.8.0",
"description": "Commands for tiptap",

@@ -25,7 +25,7 @@ "homepage": "https://tiptap.scrumpy.io",

"prosemirror-inputrules": "^1.0.1",
"prosemirror-schema-list": "^1.0.2",
"prosemirror-schema-list": "^1.0.3",
"prosemirror-state": "^1.2.2",
"tiptap-utils": "^1.3.0"
"tiptap-utils": "^1.4.0"
},
"gitHead": "6bd44103fb8e176c288ea0110a0d50dd6fd979b8"
"gitHead": "0e59e0cc0c2b4f0be5c46ebf2a698c674bfda821"
}
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