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

@interactjs/utils

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/utils - npm Package Compare versions

Comparing version 1.10.3 to 1.10.5

center.js

23

domUtils.js

@@ -119,14 +119,17 @@ import browser from "./browser.js";

const parents = [currentNodeParents[commonIndex - 1], currentNodeParents[commonIndex], deepestNodeParents[commonIndex]];
let child = parents[0].lastChild;
while (child) {
if (child === parents[1]) {
deepestNodeIndex = i;
deepestNodeParents = currentNodeParents;
break;
} else if (child === parents[2]) {
break;
if (parents[0]) {
let child = parents[0].lastChild;
while (child) {
if (child === parents[1]) {
deepestNodeIndex = i;
deepestNodeParents = currentNodeParents;
break;
} else if (child === parents[2]) {
break;
}
child = child.previousSibling;
}
child = child.previousSibling;
}

@@ -133,0 +136,0 @@ }

@@ -1,2 +0,2 @@

import e from"./browser.prod.js";import t from"./domObjects.prod.js";import n from"./is.prod.js";import*as o from"./window.prod.js";export function nodeContains(e,t){if(e.contains)return e.contains(t);for(;t;){if(t===e)return!0;t=t.parentNode}return!1}export function closest(e,t){for(;n.element(e);){if(matchesSelector(e,t))return e;e=parentNode(e)}return null}export function parentNode(e){let t=e.parentNode;if(n.docFrag(t)){for(;(t=t.host)&&n.docFrag(t););return t}return t}export function matchesSelector(t,n){return o.window!==o.realWindow&&(n=n.replace(/\/deep\//g," ")),t[e.prefixedMatchesSelector](n)}const r=e=>e.parentNode||e.host;export function indexOfDeepestElement(e){let n,c=[];for(let f=0;f<e.length;f++){const s=e[f],m=e[n];if(!s||f===n)continue;if(!m){n=f;continue}const p=r(s),d=r(m);if(p===s.ownerDocument)continue;if(d===s.ownerDocument){n=f;continue}if(p===d){l=s,u=m,(parseInt(o.getWindow(l).getComputedStyle(l).zIndex,10)||0)>=(parseInt(o.getWindow(u).getComputedStyle(u).zIndex,10)||0)&&(n=f);continue}let a;if(c=c.length?c:i(m),m instanceof t.HTMLElement&&s instanceof t.SVGElement&&!(s instanceof t.SVGSVGElement)){if(s===d)continue;a=s.ownerSVGElement}else a=s;const g=i(a,m.ownerDocument);let h=0;for(;g[h]&&g[h]===c[h];)h++;const x=[g[h-1],g[h],c[h]];let w=x[0].lastChild;for(;w;){if(w===x[1]){n=f,c=g;break}if(w===x[2])break;w=w.previousSibling}}var l,u;return n}function i(e,t){const n=[];let o,i=e;for(;(o=r(i))&&i!==t&&o!==i.ownerDocument;)n.unshift(i),i=o;return n}export function matchesUpTo(e,t,o){for(;n.element(e);){if(matchesSelector(e,t))return!0;if((e=parentNode(e))===o)return matchesSelector(e,t)}return!1}export function getActualElement(e){return e.correspondingUseElement||e}export function getScrollXY(e){return{x:(e=e||o.window).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop}}export function getElementClientRect(e){const n=e instanceof t.SVGElement?e.getBoundingClientRect():e.getClientRects()[0];return n&&{left:n.left,right:n.right,top:n.top,bottom:n.bottom,width:n.width||n.right-n.left,height:n.height||n.bottom-n.top}}export function getElementRect(t){const n=getElementClientRect(t);if(!e.isIOS7&&n){const e=getScrollXY(o.getWindow(t));n.left+=e.x,n.right+=e.x,n.top+=e.y,n.bottom+=e.y}return n}export function getPath(e){const t=[];for(;e;)t.push(e),e=parentNode(e);return t}export function trySelector(e){return!!n.string(e)&&(t.document.querySelector(e),!0)}
import e from"./browser.prod.js";import t from"./domObjects.prod.js";import n from"./is.prod.js";import*as o from"./window.prod.js";export function nodeContains(e,t){if(e.contains)return e.contains(t);for(;t;){if(t===e)return!0;t=t.parentNode}return!1}export function closest(e,t){for(;n.element(e);){if(matchesSelector(e,t))return e;e=parentNode(e)}return null}export function parentNode(e){let t=e.parentNode;if(n.docFrag(t)){for(;(t=t.host)&&n.docFrag(t););return t}return t}export function matchesSelector(t,n){return o.window!==o.realWindow&&(n=n.replace(/\/deep\//g," ")),t[e.prefixedMatchesSelector](n)}const r=e=>e.parentNode||e.host;export function indexOfDeepestElement(e){let n,c=[];for(let f=0;f<e.length;f++){const s=e[f],m=e[n];if(!s||f===n)continue;if(!m){n=f;continue}const p=r(s),d=r(m);if(p===s.ownerDocument)continue;if(d===s.ownerDocument){n=f;continue}if(p===d){l=s,u=m,(parseInt(o.getWindow(l).getComputedStyle(l).zIndex,10)||0)>=(parseInt(o.getWindow(u).getComputedStyle(u).zIndex,10)||0)&&(n=f);continue}let a;if(c=c.length?c:i(m),m instanceof t.HTMLElement&&s instanceof t.SVGElement&&!(s instanceof t.SVGSVGElement)){if(s===d)continue;a=s.ownerSVGElement}else a=s;const g=i(a,m.ownerDocument);let h=0;for(;g[h]&&g[h]===c[h];)h++;const x=[g[h-1],g[h],c[h]];if(x[0]){let e=x[0].lastChild;for(;e;){if(e===x[1]){n=f,c=g;break}if(e===x[2])break;e=e.previousSibling}}}var l,u;return n}function i(e,t){const n=[];let o,i=e;for(;(o=r(i))&&i!==t&&o!==i.ownerDocument;)n.unshift(i),i=o;return n}export function matchesUpTo(e,t,o){for(;n.element(e);){if(matchesSelector(e,t))return!0;if((e=parentNode(e))===o)return matchesSelector(e,t)}return!1}export function getActualElement(e){return e.correspondingUseElement||e}export function getScrollXY(e){return{x:(e=e||o.window).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop}}export function getElementClientRect(e){const n=e instanceof t.SVGElement?e.getBoundingClientRect():e.getClientRects()[0];return n&&{left:n.left,right:n.right,top:n.top,bottom:n.bottom,width:n.width||n.right-n.left,height:n.height||n.bottom-n.top}}export function getElementRect(t){const n=getElementClientRect(t);if(!e.isIOS7&&n){const e=getScrollXY(o.getWindow(t));n.left+=e.x,n.right+=e.x,n.top+=e.y,n.bottom+=e.y}return n}export function getPath(e){const t=[];for(;e;)t.push(e),e=parentNode(e);return t}export function trySelector(e){return!!n.string(e)&&(t.document.querySelector(e),!0)}
//# sourceMappingURL=domUtils.prod.js.map

@@ -20,2 +20,3 @@ import { window } from "./window.js";

}
export const sign = n => n >= 0 ? 1 : -1;
//# sourceMappingURL=misc.js.map

@@ -1,2 +0,2 @@

import{window as n}from"./window.prod.js";export function warnOnce(e,o){let r=!1;return function(){return r||(n.console.warn(o),r=!0),e.apply(this,arguments)}}export function copyAction(n,e){return n.name=e.name,n.axis=e.axis,n.edges=e.edges,n}
import{window as n}from"./window.prod.js";export function warnOnce(e,o){let r=!1;return function(){return r||(n.console.warn(o),r=!0),e.apply(this,arguments)}}export function copyAction(n,e){return n.name=e.name,n.axis=e.axis,n.edges=e.edges,n}export const sign=n=>n>=0?1:-1;
//# sourceMappingURL=misc.prod.js.map
{
"name": "@interactjs/utils",
"version": "1.10.3",
"license": "MIT",
"version": "1.10.5",
"peerDependencies": {
"@interactjs/feedback": "1.10.5",
"@interactjs/symbol-tree": "1.10.5"
},
"publishConfig": {

@@ -11,3 +14,4 @@ "access": "public"

"**/index.prod.js"
]
],
"license": "MIT"
}

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

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

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

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

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