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

@react-stately/dnd

Package Overview
Dependencies
Maintainers
2
Versions
780
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-stately/dnd - npm Package Compare versions

Comparing version 3.0.0-nightly.3111 to 3.0.0-nightly.3113

32

dist/main.js

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

var $4zSno$react = require("react");
var $1IdlX$react = require("react");

@@ -22,8 +22,8 @@ function $parcel$exportWildcard(dest, source) {

}
var $97a0ee2d5f702098$exports = {};
var $481a240e3d51b276$exports = {};
$parcel$export($97a0ee2d5f702098$exports, "useDraggableCollectionState", () => $97a0ee2d5f702098$export$29efd034f1d79f81);
$parcel$export($481a240e3d51b276$exports, "useDraggableCollectionState", () => $481a240e3d51b276$export$29efd034f1d79f81);
function $97a0ee2d5f702098$export$29efd034f1d79f81(props) {
let [draggingKeys, setDraggingKeys] = $4zSno$react.useState(new Set());
function $481a240e3d51b276$export$29efd034f1d79f81(props) {
let [draggingKeys, setDraggingKeys] = $1IdlX$react.useState(new Set());
let getKeys = (key)=>{

@@ -76,8 +76,8 @@ // The clicked item is always added to the drag. If it is selected, then all of the

var $493c7e7e2c1a0cd7$exports = {};
var $6ce4cbfbe5e354f1$exports = {};
$parcel$export($493c7e7e2c1a0cd7$exports, "useDroppableCollectionState", () => $493c7e7e2c1a0cd7$export$926850f6ecef79d0);
$parcel$export($6ce4cbfbe5e354f1$exports, "useDroppableCollectionState", () => $6ce4cbfbe5e354f1$export$926850f6ecef79d0);
function $493c7e7e2c1a0cd7$export$926850f6ecef79d0(props) {
let [target1, setTarget] = $4zSno$react.useState(null);
function $6ce4cbfbe5e354f1$export$926850f6ecef79d0(props) {
let [target1, setTarget] = $1IdlX$react.useState(null);
let getOppositeTarget = (target)=>{

@@ -121,5 +121,5 @@ if (target.dropPosition === 'before') {

isDropTarget (dropTarget) {
if ($493c7e7e2c1a0cd7$var$isEqualDropTarget(dropTarget, target1)) return true;
if ($6ce4cbfbe5e354f1$var$isEqualDropTarget(dropTarget, target1)) return true;
// Check if the targets point at the same point between two items, one referring before, and the other after.
if (dropTarget?.type === 'item' && target1?.type === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $493c7e7e2c1a0cd7$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $493c7e7e2c1a0cd7$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1));
if ((dropTarget === null || dropTarget === void 0 ? void 0 : dropTarget.type) === 'item' && (target1 === null || target1 === void 0 ? void 0 : target1.type) === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $6ce4cbfbe5e354f1$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $6ce4cbfbe5e354f1$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1));
return false;

@@ -132,9 +132,9 @@ },

}
function $493c7e7e2c1a0cd7$var$isEqualDropTarget(a, b) {
function $6ce4cbfbe5e354f1$var$isEqualDropTarget(a, b) {
if (!a) return !b;
switch(a.type){
case 'root':
return b?.type === 'root';
return (b === null || b === void 0 ? void 0 : b.type) === 'root';
case 'item':
return b?.type === 'item' && b?.key === a.key && b?.dropPosition === a.dropPosition;
return (b === null || b === void 0 ? void 0 : b.type) === 'item' && (b === null || b === void 0 ? void 0 : b.key) === a.key && (b === null || b === void 0 ? void 0 : b.dropPosition) === a.dropPosition;
}

@@ -144,6 +144,6 @@ }

$parcel$exportWildcard(module.exports, $97a0ee2d5f702098$exports);
$parcel$exportWildcard(module.exports, $493c7e7e2c1a0cd7$exports);
$parcel$exportWildcard(module.exports, $481a240e3d51b276$exports);
$parcel$exportWildcard(module.exports, $6ce4cbfbe5e354f1$exports);
//# sourceMappingURL=main.js.map

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

import {useState as $gjNPF$useState} from "react";
import {useState as $bBNwq$useState} from "react";

@@ -6,8 +6,8 @@ function $parcel$export(e, n, v, s) {

}
var $cfde1c3ca5456981$exports = {};
var $b45bbbaf0c3785df$exports = {};
$parcel$export($cfde1c3ca5456981$exports, "useDraggableCollectionState", () => $cfde1c3ca5456981$export$29efd034f1d79f81);
$parcel$export($b45bbbaf0c3785df$exports, "useDraggableCollectionState", () => $b45bbbaf0c3785df$export$29efd034f1d79f81);
function $cfde1c3ca5456981$export$29efd034f1d79f81(props) {
let [draggingKeys, setDraggingKeys] = $gjNPF$useState(new Set());
function $b45bbbaf0c3785df$export$29efd034f1d79f81(props) {
let [draggingKeys, setDraggingKeys] = $bBNwq$useState(new Set());
let getKeys = (key)=>{

@@ -60,8 +60,8 @@ // The clicked item is always added to the drag. If it is selected, then all of the

var $dabc5ba65f76be17$exports = {};
var $e672e8bc247525d1$exports = {};
$parcel$export($dabc5ba65f76be17$exports, "useDroppableCollectionState", () => $dabc5ba65f76be17$export$926850f6ecef79d0);
$parcel$export($e672e8bc247525d1$exports, "useDroppableCollectionState", () => $e672e8bc247525d1$export$926850f6ecef79d0);
function $dabc5ba65f76be17$export$926850f6ecef79d0(props) {
let [target1, setTarget] = $gjNPF$useState(null);
function $e672e8bc247525d1$export$926850f6ecef79d0(props) {
let [target1, setTarget] = $bBNwq$useState(null);
let getOppositeTarget = (target)=>{

@@ -105,5 +105,5 @@ if (target.dropPosition === 'before') {

isDropTarget (dropTarget) {
if ($dabc5ba65f76be17$var$isEqualDropTarget(dropTarget, target1)) return true;
if ($e672e8bc247525d1$var$isEqualDropTarget(dropTarget, target1)) return true;
// Check if the targets point at the same point between two items, one referring before, and the other after.
if (dropTarget?.type === 'item' && target1?.type === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $dabc5ba65f76be17$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $dabc5ba65f76be17$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1));
if ((dropTarget === null || dropTarget === void 0 ? void 0 : dropTarget.type) === 'item' && (target1 === null || target1 === void 0 ? void 0 : target1.type) === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $e672e8bc247525d1$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $e672e8bc247525d1$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1));
return false;

@@ -116,9 +116,9 @@ },

}
function $dabc5ba65f76be17$var$isEqualDropTarget(a, b) {
function $e672e8bc247525d1$var$isEqualDropTarget(a, b) {
if (!a) return !b;
switch(a.type){
case 'root':
return b?.type === 'root';
return (b === null || b === void 0 ? void 0 : b.type) === 'root';
case 'item':
return b?.type === 'item' && b?.key === a.key && b?.dropPosition === a.dropPosition;
return (b === null || b === void 0 ? void 0 : b.type) === 'item' && (b === null || b === void 0 ? void 0 : b.key) === a.key && (b === null || b === void 0 ? void 0 : b.dropPosition) === a.dropPosition;
}

@@ -130,3 +130,3 @@ }

export {$cfde1c3ca5456981$export$29efd034f1d79f81 as useDraggableCollectionState, $dabc5ba65f76be17$export$926850f6ecef79d0 as useDroppableCollectionState};
export {$b45bbbaf0c3785df$export$29efd034f1d79f81 as useDraggableCollectionState, $e672e8bc247525d1$export$926850f6ecef79d0 as useDroppableCollectionState};
//# sourceMappingURL=module.js.map
{
"name": "@react-stately/dnd",
"version": "3.0.0-nightly.3111+d6ded0736",
"version": "3.0.0-nightly.3113+404d41859",
"description": "Spectrum UI components in React",

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

"@babel/runtime": "^7.6.2",
"@react-stately/selection": "3.0.0-nightly.1415+d6ded0736",
"@react-stately/utils": "3.0.0-nightly.1415+d6ded0736",
"@react-types/shared": "3.0.0-nightly.1415+d6ded0736"
"@react-stately/selection": "3.0.0-nightly.1417+404d41859",
"@react-stately/utils": "3.0.0-nightly.1417+404d41859",
"@react-types/shared": "3.0.0-nightly.1417+404d41859"
},

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

},
"gitHead": "d6ded0736edd4c36d0abeb1ae615cacfa90ea8ff"
"gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
}

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