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

@react-aria/interactions

Package Overview
Dependencies
Maintainers
2
Versions
817
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/interactions - npm Package Compare versions

Comparing version 3.0.0-nightly.1164 to 3.0.0-nightly.1171

46

dist/main.js

@@ -1378,14 +1378,18 @@ var _react2 = require("react");

isPointerDown: false,
ignoreEmulatedMouseEvents: false
ignoreEmulatedMouseEvents: false,
onInteractOutside,
onInteractOutsideStart
});
let state = stateRef.current;
state.onInteractOutside = onInteractOutside;
state.onInteractOutsideStart = onInteractOutsideStart;
useEffect(() => {
if (isDisabled) {
return;
}
let onPointerDown = e => {
if (isDisabled) {
return;
}
if ($f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref) && onInteractOutside) {
if (onInteractOutsideStart) {
onInteractOutsideStart(e);
if ($f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref) && state.onInteractOutside) {
if (state.onInteractOutsideStart) {
state.onInteractOutsideStart(e);
}

@@ -1400,9 +1404,5 @@

let onPointerUp = e => {
if (isDisabled) {
return;
}
if (state.isPointerDown && onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
if (state.isPointerDown && state.onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -1420,11 +1420,7 @@ }; // changing these to capture phase fixed combobox

let onMouseUp = e => {
if (isDisabled) {
return;
}
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
} else if (state.isPointerDown && state.onInteractOutside && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -1434,11 +1430,7 @@ };

let onTouchEnd = e => {
if (isDisabled) {
return;
}
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
if (state.onInteractOutside && state.isPointerDown && $f07e167670fb16f6a9d7f8a0eda7e156$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -1458,3 +1450,3 @@ };

}
}, [onInteractOutside, ref, state.ignoreEmulatedMouseEvents, state.isPointerDown, isDisabled]);
}, [ref, state, isDisabled]);
}

@@ -1461,0 +1453,0 @@

@@ -1321,14 +1321,18 @@ import _react, { useContext, useEffect, useMemo, useRef, useState, useCallback } from "react";

isPointerDown: false,
ignoreEmulatedMouseEvents: false
ignoreEmulatedMouseEvents: false,
onInteractOutside,
onInteractOutsideStart
});
let state = stateRef.current;
state.onInteractOutside = onInteractOutside;
state.onInteractOutsideStart = onInteractOutsideStart;
useEffect(() => {
if (isDisabled) {
return;
}
let onPointerDown = e => {
if (isDisabled) {
return;
}
if ($e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref) && onInteractOutside) {
if (onInteractOutsideStart) {
onInteractOutsideStart(e);
if ($e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref) && state.onInteractOutside) {
if (state.onInteractOutsideStart) {
state.onInteractOutsideStart(e);
}

@@ -1343,9 +1347,5 @@

let onPointerUp = e => {
if (isDisabled) {
return;
}
if (state.isPointerDown && onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
if (state.isPointerDown && state.onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -1363,11 +1363,7 @@ }; // changing these to capture phase fixed combobox

let onMouseUp = e => {
if (isDisabled) {
return;
}
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
} else if (state.isPointerDown && state.onInteractOutside && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -1377,11 +1373,7 @@ };

let onTouchEnd = e => {
if (isDisabled) {
return;
}
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
if (state.onInteractOutside && state.isPointerDown && $e415bb64ab27cb8fbfac2f417412022f$var$isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -1401,3 +1393,3 @@ };

}
}, [onInteractOutside, ref, state.ignoreEmulatedMouseEvents, state.isPointerDown, isDisabled]);
}, [ref, state, isDisabled]);
}

@@ -1404,0 +1396,0 @@

{
"name": "@react-aria/interactions",
"version": "3.0.0-nightly.1164+4a5dfdbc6",
"version": "3.0.0-nightly.1171+cadea8ddc",
"description": "Spectrum UI components in React",

@@ -21,4 +21,4 @@ "license": "Apache-2.0",

"@babel/runtime": "^7.6.2",
"@react-aria/utils": "3.0.0-nightly.1164+4a5dfdbc6",
"@react-types/shared": "3.0.0-nightly.1164+4a5dfdbc6"
"@react-aria/utils": "3.0.0-nightly.1171+cadea8ddc",
"@react-types/shared": "3.0.0-nightly.1171+cadea8ddc"
},

@@ -31,3 +31,3 @@ "peerDependencies": {

},
"gitHead": "4a5dfdbc62c240fe1ae1b73208fab57b8c7fa7d5"
"gitHead": "cadea8ddcd36d90803e2960f1943c0ea278fade2"
}

@@ -36,14 +36,19 @@ /*

isPointerDown: false,
ignoreEmulatedMouseEvents: false
ignoreEmulatedMouseEvents: false,
onInteractOutside,
onInteractOutsideStart
});
let state = stateRef.current;
state.onInteractOutside = onInteractOutside;
state.onInteractOutsideStart = onInteractOutsideStart;
useEffect(() => {
if (isDisabled) {
return;
}
let onPointerDown = (e) => {
if (isDisabled) {
return;
}
if (isValidEvent(e, ref) && onInteractOutside) {
if (onInteractOutsideStart) {
onInteractOutsideStart(e);
if (isValidEvent(e, ref) && state.onInteractOutside) {
if (state.onInteractOutsideStart) {
state.onInteractOutsideStart(e);
}

@@ -57,8 +62,5 @@ state.isPointerDown = true;

let onPointerUp = (e) => {
if (isDisabled) {
return;
}
if (state.isPointerDown && onInteractOutside && isValidEvent(e, ref)) {
if (state.isPointerDown && state.onInteractOutside && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -77,10 +79,7 @@ };

let onMouseUp = (e) => {
if (isDisabled) {
return;
}
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
} else if (state.isPointerDown && onInteractOutside && isValidEvent(e, ref)) {
} else if (state.isPointerDown && state.onInteractOutside && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -90,9 +89,6 @@ };

let onTouchEnd = (e) => {
if (isDisabled) {
return;
}
state.ignoreEmulatedMouseEvents = true;
if (onInteractOutside && state.isPointerDown && isValidEvent(e, ref)) {
if (state.onInteractOutside && state.isPointerDown && isValidEvent(e, ref)) {
state.isPointerDown = false;
onInteractOutside(e);
state.onInteractOutside(e);
}

@@ -113,3 +109,3 @@ };

}
}, [onInteractOutside, ref, state.ignoreEmulatedMouseEvents, state.isPointerDown, isDisabled]);
}, [ref, state, isDisabled]);
}

@@ -116,0 +112,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