New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pointerify

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pointerify - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/Pointerify/Interfaces/IPointerifyFactory.js

2

dist/Events/handlers/handleMousemove.d.ts
import Pointerify from '../../Pointerify/Pointerify';
declare const handleMousemove: (pointerify: Pointerify, e: MouseEvent) => void;
declare function handleMousemove(pointerify: Pointerify, e: MouseEvent): void;
export default handleMousemove;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var EventType_1 = require("../../Shared/Constants/EventType");
var handleMousemove = function (pointerify, e) {
var closestParent_1 = require("../../Shared/Util/closestParent");
function handleMousemove(pointerify, e) {
var mouse = pointerify.mouse;
if (e.target !== window && mouse && !mouse.isStopping) {
var target = e.target;
var isWithinRoot = Boolean(closestParent_1.default(target, pointerify.refs.root, true));
if (mouse && !mouse.isStopping) {
pointerify.movePointer(mouse, e, e);
}
else if (e.target === window && !mouse) {
else if (!mouse && isWithinRoot) {
pointerify.emitStatic(e, EventType_1.default.POINTER_INSPECT);
}
};
}
exports.default = handleMousemove;
//# sourceMappingURL=handleMousemove.js.map

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

/**
* Returns the closest parent of a given element matching the
* provided selector, optionally including the element itself.
*/
declare function closestParent(el: HTMLElement, selector: string, includeSelf?: boolean): HTMLElement;
declare function closestParent(el: Element, selectorOrParent: string | Element, includeSelf?: boolean): Element;
export default closestParent;

@@ -7,10 +7,16 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
function closestParent(el, selector, includeSelf) {
function isTarget(target, selectorOrParent) {
if (typeof selectorOrParent === 'string') {
return target.matches(selectorOrParent);
}
return target === selectorOrParent;
}
function closestParent(el, selectorOrParent, includeSelf) {
if (includeSelf === void 0) { includeSelf = false; }
var parent = el.parentNode;
if (includeSelf && el.matches(selector)) {
if (includeSelf && isTarget(el, selectorOrParent)) {
return el;
}
while (parent && parent !== document.body) {
if (parent.matches && parent.matches(selector)) {
if (parent.matches && isTarget(parent, selectorOrParent)) {
return parent;

@@ -17,0 +23,0 @@ }

{
"name": "pointerify",
"version": "1.1.0",
"version": "1.1.1",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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