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
849
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-987f174ba-241015 to 3.0.0-nightly-993de98ad-241210

2

dist/textSelection.main.js

@@ -29,3 +29,2 @@ var $20aJV$reactariautils = require("@react-aria/utils");

if ($f7e14e656343df57$var$state === 'default') {
// eslint-disable-next-line no-restricted-globals
const documentObject = (0, $20aJV$reactariautils.getOwnerDocument)(target);

@@ -57,3 +56,2 @@ $f7e14e656343df57$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;

if ($f7e14e656343df57$var$state === 'restoring') {
// eslint-disable-next-line no-restricted-globals
const documentObject = (0, $20aJV$reactariautils.getOwnerDocument)(target);

@@ -60,0 +58,0 @@ if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $f7e14e656343df57$var$savedUserSelect || '';

@@ -22,3 +22,2 @@ import {isIOS as $7R18e$isIOS, getOwnerDocument as $7R18e$getOwnerDocument, runAfterTransition as $7R18e$runAfterTransition} from "@react-aria/utils";

if ($14c0b72509d70225$var$state === 'default') {
// eslint-disable-next-line no-restricted-globals
const documentObject = (0, $7R18e$getOwnerDocument)(target);

@@ -50,3 +49,2 @@ $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;

if ($14c0b72509d70225$var$state === 'restoring') {
// eslint-disable-next-line no-restricted-globals
const documentObject = (0, $7R18e$getOwnerDocument)(target);

@@ -53,0 +51,0 @@ if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';

31

dist/usePress.main.js

@@ -282,3 +282,6 @@ var $f7e14e656343df57$exports = require("./textSelection.main.js");

shouldStopPropagation = triggerPressStart(e, state.pointerType);
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'pointermove', onPointerMove, false);
// Release pointer capture so that touch interactions can leave the original target.
// This enables onPointerLeave and onPointerEnter to fire.
let target = e.target;
if ('releasePointerCapture' in target) target.releasePointerCapture(e.pointerId);
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'pointerup', onPointerUp, false);

@@ -303,17 +306,12 @@ addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'pointercancel', onPointerCancel, false);

// Only handle left clicks
// Safari on iOS sometimes fires pointerup events, even
// when the touch isn't over the target, so double check.
if (e.button === 0 && $0294ea432cd92340$var$isOverTarget(e, e.currentTarget)) triggerPressUp(e, state.pointerType || e.pointerType);
if (e.button === 0) triggerPressUp(e, state.pointerType || e.pointerType);
};
// Safari on iOS < 13.2 does not implement pointerenter/pointerleave events correctly.
// Use pointer move events instead to implement our own hit testing.
// See https://bugs.webkit.org/show_bug.cgi?id=199803
let onPointerMove = (e)=>{
if (e.pointerId !== state.activePointerId) return;
if (state.target && $0294ea432cd92340$var$isOverTarget(e, state.target)) {
if (!state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType);
}
} else if (state.target && state.isOverTarget && state.pointerType != null) {
pressProps.onPointerEnter = (e)=>{
if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType);
}
};
pressProps.onPointerLeave = (e)=>{
if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
state.isOverTarget = false;

@@ -326,3 +324,3 @@ triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType, false);

if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
if ($0294ea432cd92340$var$isOverTarget(e, state.target) && state.pointerType != null) triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType);
if (state.target.contains(e.target) && state.pointerType != null) triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType);
else if (state.isOverTarget && state.pointerType != null) triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType, false);

@@ -507,3 +505,2 @@ state.isPressed = false;

// Remove user-select: none in case component unmounts immediately after pressStart
// eslint-disable-next-line arrow-body-style
(0, $bBqCQ$react.useEffect)(()=>{

@@ -510,0 +507,0 @@ return ()=>{

@@ -276,3 +276,6 @@ import {disableTextSelection as $14c0b72509d70225$export$16a4697467175487, restoreTextSelection as $14c0b72509d70225$export$b0d6fa1ab32e3295} from "./textSelection.module.js";

shouldStopPropagation = triggerPressStart(e, state.pointerType);
addGlobalListener((0, $7mdmh$getOwnerDocument)(e.currentTarget), 'pointermove', onPointerMove, false);
// Release pointer capture so that touch interactions can leave the original target.
// This enables onPointerLeave and onPointerEnter to fire.
let target = e.target;
if ('releasePointerCapture' in target) target.releasePointerCapture(e.pointerId);
addGlobalListener((0, $7mdmh$getOwnerDocument)(e.currentTarget), 'pointerup', onPointerUp, false);

@@ -297,17 +300,12 @@ addGlobalListener((0, $7mdmh$getOwnerDocument)(e.currentTarget), 'pointercancel', onPointerCancel, false);

// Only handle left clicks
// Safari on iOS sometimes fires pointerup events, even
// when the touch isn't over the target, so double check.
if (e.button === 0 && $f6c31cce2adf654f$var$isOverTarget(e, e.currentTarget)) triggerPressUp(e, state.pointerType || e.pointerType);
if (e.button === 0) triggerPressUp(e, state.pointerType || e.pointerType);
};
// Safari on iOS < 13.2 does not implement pointerenter/pointerleave events correctly.
// Use pointer move events instead to implement our own hit testing.
// See https://bugs.webkit.org/show_bug.cgi?id=199803
let onPointerMove = (e)=>{
if (e.pointerId !== state.activePointerId) return;
if (state.target && $f6c31cce2adf654f$var$isOverTarget(e, state.target)) {
if (!state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
}
} else if (state.target && state.isOverTarget && state.pointerType != null) {
pressProps.onPointerEnter = (e)=>{
if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
}
};
pressProps.onPointerLeave = (e)=>{
if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
state.isOverTarget = false;

@@ -320,3 +318,3 @@ triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);

if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
if ($f6c31cce2adf654f$var$isOverTarget(e, state.target) && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
if (state.target.contains(e.target) && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType);
else if (state.isOverTarget && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);

@@ -501,3 +499,2 @@ state.isPressed = false;

// Remove user-select: none in case component unmounts immediately after pressStart
// eslint-disable-next-line arrow-body-style
(0, $7mdmh$useEffect)(()=>{

@@ -504,0 +501,0 @@ return ()=>{

@@ -58,3 +58,2 @@ var $iJhOP$react = require("react");

// Clean up MutationObserver on unmount. See below.
// eslint-disable-next-line arrow-body-style
(0, $iJhOP$reactariautils.useLayoutEffect)(()=>{

@@ -61,0 +60,0 @@ const state = stateRef.current;

@@ -52,3 +52,2 @@ import {useRef as $6dfIe$useRef, useCallback as $6dfIe$useCallback} from "react";

// Clean up MutationObserver on unmount. See below.
// eslint-disable-next-line arrow-body-style
(0, $6dfIe$useLayoutEffect)(()=>{

@@ -55,0 +54,0 @@ const state = stateRef.current;

{
"name": "@react-aria/interactions",
"version": "3.0.0-nightly-987f174ba-241015",
"version": "3.0.0-nightly-993de98ad-241210",
"description": "Spectrum UI components in React",

@@ -25,9 +25,9 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/ssr": "^3.0.0-nightly-987f174ba-241015",
"@react-aria/utils": "^3.0.0-nightly-987f174ba-241015",
"@react-types/shared": "^3.0.0-nightly-987f174ba-241015",
"@react-aria/ssr": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/utils": "^3.0.0-nightly-993de98ad-241210",
"@react-types/shared": "^3.0.0-nightly-993de98ad-241210",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},

@@ -37,3 +37,3 @@ "publishConfig": {

},
"stableVersion": "3.22.4"
"stableVersion": "3.22.5"
}

@@ -39,3 +39,3 @@ /*

if (state === 'default') {
// eslint-disable-next-line no-restricted-globals
const documentObject = getOwnerDocument(target);

@@ -73,3 +73,3 @@ savedUserSelect = documentObject.documentElement.style.webkitUserSelect;

if (state === 'restoring') {
// eslint-disable-next-line no-restricted-globals
const documentObject = getOwnerDocument(target);

@@ -76,0 +76,0 @@ if (documentObject.documentElement.style.webkitUserSelect === 'none') {

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

addGlobalListener(getOwnerDocument(e.currentTarget), 'pointermove', onPointerMove, false);
// Release pointer capture so that touch interactions can leave the original target.
// This enables onPointerLeave and onPointerEnter to fire.
let target = e.target as Element;
if ('releasePointerCapture' in target) {
target.releasePointerCapture(e.pointerId);
}
addGlobalListener(getOwnerDocument(e.currentTarget), 'pointerup', onPointerUp, false);

@@ -471,5 +477,3 @@ addGlobalListener(getOwnerDocument(e.currentTarget), 'pointercancel', onPointerCancel, false);

// Only handle left clicks
// Safari on iOS sometimes fires pointerup events, even
// when the touch isn't over the target, so double check.
if (e.button === 0 && isOverTarget(e, e.currentTarget)) {
if (e.button === 0) {
triggerPressUp(e, state.pointerType || e.pointerType);

@@ -479,16 +483,11 @@ }

// Safari on iOS < 13.2 does not implement pointerenter/pointerleave events correctly.
// Use pointer move events instead to implement our own hit testing.
// See https://bugs.webkit.org/show_bug.cgi?id=199803
let onPointerMove = (e: PointerEvent) => {
if (e.pointerId !== state.activePointerId) {
return;
pressProps.onPointerEnter = (e) => {
if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart(createEvent(state.target, e), state.pointerType);
}
};
if (state.target && isOverTarget(e, state.target)) {
if (!state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart(createEvent(state.target, e), state.pointerType);
}
} else if (state.target && state.isOverTarget && state.pointerType != null) {
pressProps.onPointerLeave = (e) => {
if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
state.isOverTarget = false;

@@ -502,3 +501,3 @@ triggerPressEnd(createEvent(state.target, e), state.pointerType, false);

if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
if (isOverTarget(e, state.target) && state.pointerType != null) {
if (state.target.contains(e.target as Element) && state.pointerType != null) {
triggerPressEnd(createEvent(state.target, e), state.pointerType);

@@ -794,3 +793,3 @@ } else if (state.isOverTarget && state.pointerType != null) {

// Remove user-select: none in case component unmounts immediately after pressStart
// eslint-disable-next-line arrow-body-style
useEffect(() => {

@@ -797,0 +796,0 @@ return () => {

@@ -71,3 +71,3 @@ /*

// Clean up MutationObserver on unmount. See below.
// eslint-disable-next-line arrow-body-style
useLayoutEffect(() => {

@@ -74,0 +74,0 @@ const state = stateRef.current;

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