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

@clayui/shared

Package Overview
Dependencies
Maintainers
14
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clayui/shared - npm Package Compare versions

Comparing version 3.65.0 to 3.67.0

2

lib/useMousePosition.d.ts

@@ -9,3 +9,3 @@ /**

*/
export declare const useMousePosition: () => MousePosition;
export declare const useMousePosition: (delay?: number) => MousePosition;
export {};

@@ -40,2 +40,4 @@ "use strict";

var useMousePosition = function useMousePosition() {
var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 200;
var _useState = (0, _react.useState)([0, 0]),

@@ -49,3 +51,3 @@ _useState2 = _slicedToArray(_useState, 2),

return setMousePosition([event.clientX, event.clientY]);
}, 200);
}, delay);
window.addEventListener('mousemove', handleMousePosition);

@@ -55,3 +57,3 @@ return function () {

};
}, []);
}, [delay]);
return mousePosition;

@@ -58,0 +60,0 @@ };

{
"name": "@clayui/shared",
"version": "3.65.0",
"version": "3.67.0",
"description": "ClayShared component",

@@ -44,3 +44,3 @@ "license": "BSD-3-Clause",

],
"gitHead": "603f05c8d617d98e29f0456b5d6618f9a95ce740"
"gitHead": "71e84490088d72afb0240a7ef69cde23a6d5dd19"
}

@@ -28,3 +28,3 @@ /**

*/
export const useMousePosition = () => {
export const useMousePosition = (delay: number = 200) => {
const [mousePosition, setMousePosition] = useState<MousePosition>([0, 0]);

@@ -36,3 +36,3 @@

setMousePosition([event.clientX, event.clientY]),
200
delay
);

@@ -44,5 +44,5 @@

window.removeEventListener('mousemove', handleMousePosition);
}, []);
}, [delay]);
return mousePosition;
};
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