Socket
Socket
Sign inDemoInstall

tiptap-utils

Package Overview
Dependencies
9
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.0 to 1.12.0

4

dist/utils.common.js
/*!
* tiptap-utils v1.10.4
* (c) 2020 überdosis GbR (limited liability)
* tiptap-utils v1.11.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT

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

/*!
* tiptap-utils v1.10.4
* (c) 2020 überdosis GbR (limited liability)
* tiptap-utils v1.11.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT

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

/*!
* tiptap-utils v1.10.4
* (c) 2020 überdosis GbR (limited liability)
* tiptap-utils v1.11.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT

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

/*!
* tiptap-utils v1.10.4
* (c) 2020 überdosis GbR (limited liability)
* tiptap-utils v1.11.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT

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

/*!
* tiptap-utils v1.10.4
* (c) 2020 überdosis GbR (limited liability)
* tiptap-utils v1.11.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT
*/
!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";e.getMarkAttrs=function(e,t){const{from:n,to:r}=e.selection;let o=[];e.doc.nodesBetween(n,r,e=>{o=[...o,...e.marks]});const s=o.find(e=>e.type.name===t.name);return s?s.attrs:{}},e.getMarkRange=function(e=null,t=null){if(!e||!t)return!1;const n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;const r=n.node.marks.find(e=>e.type===t);if(!r)return!1;let o=e.index(),s=e.start()+n.offset,i=o+1,d=s+n.node.nodeSize;for(;o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;i<e.parent.childCount&&r.isInSet(e.parent.child(i).marks);)d+=e.parent.child(i).nodeSize,i+=1;return{from:s,to:d}},e.getNodeAttrs=function(e,t){const{from:n,to:r}=e.selection;let o=[];e.doc.nodesBetween(n,r,e=>{o=[...o,e]});const s=o.reverse().find(e=>e.type.name===t.name);return s?s.attrs:{}},e.markIsActive=function(e,t){const{from:n,$from:r,to:o,empty:s}=e.selection;return s?!!t.isInSet(e.storedMarks||r.marks()):!!e.doc.rangeHasMark(n,o,t)},e.nodeEqualsType=function({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e},e.nodeIsActive=function(e,n,r={}){const o=t.findSelectedNodeOfType(n)(e.selection)||t.findParentNode(e=>e.type===n)(e.selection);return Object.keys(r).length&&o?o.node.hasMarkup(n,{...o.node.attrs,...r}):!!o},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "tiptap-utils",
"version": "1.11.0",
"version": "1.12.0",
"description": "Utility functions for tiptap",

@@ -23,3 +23,3 @@ "homepage": "https://tiptap.dev",

"dependencies": {
"prosemirror-model": "^1.11.2",
"prosemirror-model": "^1.13.1",
"prosemirror-state": "^1.3.3",

@@ -29,3 +29,3 @@ "prosemirror-tables": "^1.1.1",

},
"gitHead": "f9fe193db94ac68d14ebd7ae76b3d97bfb141114"
"gitHead": "af65d91ce46ae092baea10e79fe68c0dd7067d67"
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc