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

@uppy/drop-target

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/drop-target - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

7

CHANGELOG.md
# @uppy/drop-target
## 3.0.1
Released: 2024-07-15
Included in: Uppy v4.0.1
- @uppy/dashboard,@uppy/drag-drop,@uppy/drop-target: `<Dashboard/>`, `<DragDrop/>`, `drop-target` - new anti-flickering solution (Evgenia Karunus / #5326)
## 3.0.0-beta.5

@@ -4,0 +11,0 @@

1

lib/index.d.ts

@@ -20,3 +20,2 @@ import type { Body, Meta } from '@uppy/utils/lib/UppyFile';

static VERSION: any;
private removeDragOverClassTimeout?;
private nodes?;

@@ -23,0 +22,0 @@ constructor(uppy: Uppy<M, B>, opts?: DropTargetOptions);

@@ -7,3 +7,3 @@ import BasePlugin from '@uppy/core/lib/BasePlugin.js';

const packageJson = {
"version": "3.0.0"
"version": "3.0.1"
};

@@ -53,4 +53,3 @@ // Default options

event.preventDefault();
event.stopPropagation();
clearTimeout(this.removeDragOverClassTimeout)
event.stopPropagation()

@@ -104,5 +103,4 @@ // Remove dragover class

// https://github.com/transloadit/uppy/issues/1978)
event.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign
clearTimeout(this.removeDragOverClassTimeout);
event.dataTransfer.dropEffect = 'copy' // eslint-disable-line no-param-reassign
;
event.currentTarget.classList.add('uppy-is-drag-over');

@@ -115,3 +113,3 @@ this.setPluginState({

this.handleDragLeave = event => {
var _this$opts$onDragLeav, _this$opts3;
var _event$currentTarget2, _this$opts$onDragLeav, _this$opts3;
if (!isFileTransfer(event)) {

@@ -122,15 +120,6 @@ return;

event.stopPropagation();
const {
currentTarget
} = event;
clearTimeout(this.removeDragOverClassTimeout);
// Timeout against flickering, this solution is taken from drag-drop library.
// Solution with 'pointer-events: none' didn't work across browsers.
this.removeDragOverClassTimeout = setTimeout(() => {
;
currentTarget.classList.remove('uppy-is-drag-over');
this.setPluginState({
isDraggingOver: false
});
}, 50);
this.setPluginState({
isDraggingOver: false
});
(_event$currentTarget2 = event.currentTarget) == null || _event$currentTarget2.classList.remove('uppy-is-drag-over');
(_this$opts$onDragLeav = (_this$opts3 = this.opts).onDragLeave) == null || _this$opts$onDragLeav.call(_this$opts3, event);

@@ -137,0 +126,0 @@ };

{
"name": "@uppy/drop-target",
"description": "Lets your users drag and drop files on a DOM element",
"version": "3.0.0",
"version": "3.0.1",
"license": "MIT",

@@ -30,3 +30,3 @@ "main": "lib/index.js",

"peerDependencies": {
"@uppy/core": "^4.0.0"
"@uppy/core": "^4.0.1"
},

@@ -33,0 +33,0 @@ "publishConfig": {

@@ -45,4 +45,2 @@ import type { Body, Meta } from '@uppy/utils/lib/UppyFile'

private removeDragOverClassTimeout?: ReturnType<typeof setTimeout>
private nodes?: Array<HTMLElement>

@@ -83,3 +81,2 @@

event.stopPropagation()
clearTimeout(this.removeDragOverClassTimeout)

@@ -132,4 +129,2 @@ // Remove dragover class

event.dataTransfer.dropEffect = 'copy' // eslint-disable-line no-param-reassign
clearTimeout(this.removeDragOverClassTimeout)
;(event.currentTarget as HTMLElement).classList.add('uppy-is-drag-over')

@@ -148,11 +143,5 @@ this.setPluginState({ isDraggingOver: true })

const { currentTarget } = event
this.setPluginState({ isDraggingOver: false })
;(event.currentTarget as HTMLElement)?.classList.remove('uppy-is-drag-over')
clearTimeout(this.removeDragOverClassTimeout)
// Timeout against flickering, this solution is taken from drag-drop library.
// Solution with 'pointer-events: none' didn't work across browsers.
this.removeDragOverClassTimeout = setTimeout(() => {
;(currentTarget as HTMLElement).classList.remove('uppy-is-drag-over')
this.setPluginState({ isDraggingOver: false })
}, 50)
this.opts.onDragLeave?.(event)

@@ -159,0 +148,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

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