Comparing version 2.13.2 to 2.13.3
@@ -1,1 +0,1 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.DragDrop=e()}}(function(){return function e(n,t,r){function o(u,a){if(!t[u]){if(!n[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var l=t[u]={exports:{}};n[u][0].call(l.exports,function(e){var t=n[u][1][e];return o(t?t:e)},l,l.exports,e,n,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,n,t){n.exports=function(e,n){function t(e,r){return e.reduce(function(e,o){return Array.isArray(o)&&r<n?e.concat(t(o,r+1)):e.concat(o)},[])}return n="number"==typeof n?n:1/0,n?t(e,1):Array.isArray(e)?e.map(function(e){return e}):e}},{}],2:[function(e,n,t){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(s===setTimeout)return setTimeout(e,0);if((s===r||!s)&&setTimeout)return s=setTimeout,setTimeout(e,0);try{return s(e,0)}catch(n){try{return s.call(null,e,0)}catch(n){return s.call(this,e,0)}}}function u(e){if(d===clearTimeout)return clearTimeout(e);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(n){try{return d.call(null,e)}catch(n){return d.call(this,e)}}}function a(){g&&v&&(g=!1,v.length?h=v.concat(h):m=-1,h.length&&f())}function f(){if(!g){var e=i(a);g=!0;for(var n=h.length;n;){for(v=h,h=[];++m<n;)v&&v[m].run();m=-1,n=h.length}v=null,g=!1,u(e)}}function c(e,n){this.fun=e,this.array=n}function l(){}var s,d,p=n.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:r}catch(e){s=r}try{d="function"==typeof clearTimeout?clearTimeout:o}catch(e){d=o}}();var v,h=[],g=!1,m=-1;p.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];h.push(new c(e,n)),1!==h.length||g||i(f)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],3:[function(e,n,t){(function(e){n.exports=function(n,t){function r(n){function r(){t&&t(n,i),t=null}f?e.nextTick(r):r()}function o(e,n,t){i[e]=t,(0===--u||n)&&r(n)}var i,u,a,f=!0;Array.isArray(n)?(i=[],u=n.length):(a=Object.keys(n),i={},u=a.length),u?a?a.forEach(function(e){n[e](function(n,t){o(e,n,t)})}):n.forEach(function(e,n){e(function(e,t){o(n,e,t)})}):r(null),f=!1}}).call(this,e("_process"))},{_process:2}],"/":[function(e,n,t){function r(e,n){function t(e){return n.onDragEnter&&n.onDragEnter(e),e.stopPropagation(),e.preventDefault(),!1}function r(t){if(t.stopPropagation(),t.preventDefault(),t.dataTransfer.items){var r=i(t.dataTransfer.items),o=r.filter(function(e){return"file"===e.kind}),u=r.filter(function(e){return"string"===e.kind});if(0===o.length&&!n.onDropText)return;if(0===u.length&&!n.onDrop)return;if(0===o.length&&0===u.length)return}return e.classList.add("drag"),clearTimeout(d),n.onDragOver&&n.onDragOver(t),t.dataTransfer.dropEffect="copy",!1}function f(e){return e.stopPropagation(),e.preventDefault(),n.onDragLeave&&n.onDragLeave(e),clearTimeout(d),d=setTimeout(l,50),!1}function c(e){e.stopPropagation(),e.preventDefault(),n.onDragLeave&&n.onDragLeave(e),clearTimeout(d),l();var t={x:e.clientX,y:e.clientY},r=e.dataTransfer.getData("text");if(r&&n.onDropText&&n.onDropText(r,t),e.dataTransfer.items){var f=i(e.dataTransfer.items).filter(function(e){return"file"===e.kind});if(0===f.length)return;a(f.map(function(e){return function(n){o(e.webkitGetAsEntry(),n)}}),function(e,r){if(e)throw e;n.onDrop&&n.onDrop(u(r),t)})}else{var c=i(e.dataTransfer.files);if(0===c.length)return;c.forEach(function(e){e.fullPath="/"+e.name}),n.onDrop&&n.onDrop(c,t)}return!1}function l(){e.classList.remove("drag")}if("string"==typeof e){var s=e;if(e=window.document.querySelector(e),!e)throw new Error('"'+s+'" does not match any HTML elements')}if(!e)throw new Error('"'+e+'" is not a valid HTML element');"function"==typeof n&&(n={onDrop:n});var d;return e.addEventListener("dragenter",t,!1),e.addEventListener("dragover",r,!1),e.addEventListener("dragleave",f,!1),e.addEventListener("drop",c,!1),function(){l(),e.removeEventListener("dragenter",t,!1),e.removeEventListener("dragover",r,!1),e.removeEventListener("dragleave",f,!1),e.removeEventListener("drop",c,!1)}}function o(e,n){function t(){f.readEntries(function(e){e.length>0?(u=u.concat(i(e)),t()):r()})}function r(){a(u.map(function(e){return function(n){o(e,n)}}),n)}var u=[];if(e.isFile)e.file(function(t){t.fullPath=e.fullPath,n(null,t)},function(e){n(e)});else if(e.isDirectory){var f=e.createReader();t()}}function i(e){return Array.prototype.slice.call(e||[],0)}n.exports=r;var u=e("flatten"),a=e("run-parallel")},{flatten:1,"run-parallel":3}]},{},[])("/")}); | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).DragDrop=e()}}(function(){return function i(u,a,f){function c(n,e){if(!a[n]){if(!u[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(l)return l(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[n]={exports:{}};u[n][0].call(o.exports,function(e){return c(u[n][1][e]||e)},o,o.exports,i,u,a,f)}return a[n].exports}for(var l="function"==typeof require&&require,e=0;e<f.length;e++)c(f[e]);return c}({1:[function(e,n,t){n.exports=function(e,o){return(o="number"==typeof o?o:1/0)?function t(e,r){return e.reduce(function(e,n){return Array.isArray(n)&&r<o?e.concat(t(n,r+1)):e.concat(n)},[])}(e,1):Array.isArray(e)?e.map(function(e){return e}):e}},{}],2:[function(e,n,t){var r,o,i=n.exports={};function u(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function f(n){if(r===setTimeout)return setTimeout(n,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(e){try{return r.call(null,n,0)}catch(e){return r.call(this,n,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:u}catch(e){r=u}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var c,l=[],s=!1,d=-1;function p(){s&&c&&(s=!1,c.length?l=c.concat(l):d=-1,l.length&&v())}function v(){if(!s){var e=f(p);s=!0;for(var n=l.length;n;){for(c=l,l=[];++d<n;)c&&c[d].run();d=-1,n=l.length}c=null,s=!1,function(n){if(o===clearTimeout)return clearTimeout(n);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(n);try{o(n)}catch(e){try{return o.call(null,n)}catch(e){return o.call(this,n)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function g(){}i.nextTick=function(e){var n=new Array(arguments.length-1);if(1<arguments.length)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];l.push(new h(e,n)),1!==l.length||s||f(v)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],3:[function(e,n,t){(function(f){n.exports=function(e,t){var r,o,n,i=!0;function u(e){function n(){t&&t(e,r),t=null}i?f.nextTick(n):n()}function a(e,n,t){r[e]=t,(0==--o||n)&&u(n)}Array.isArray(e)?(r=[],o=e.length):(n=Object.keys(e),r={},o=n.length),o?n?n.forEach(function(t){e[t](function(e,n){a(t,e,n)})}):e.forEach(function(e,t){e(function(e,n){a(t,e,n)})}):u(null),i=!1}}).call(this,e("_process"))},{_process:2}],"/":[function(e,n,t){n.exports=function(o,i){if("string"==typeof o){var e=o;if(!(o=window.document.querySelector(o)))throw new Error('"'+e+'" does not match any HTML elements')}if(!o)throw new Error('"'+o+'" is not a valid HTML element');"function"==typeof i&&(i={onDrop:i});var u;return o.addEventListener("dragenter",n,!1),o.addEventListener("dragover",t,!1),o.addEventListener("dragleave",r,!1),o.addEventListener("drop",a,!1),function(){f(),o.removeEventListener("dragenter",n,!1),o.removeEventListener("dragover",t,!1),o.removeEventListener("dragleave",r,!1),o.removeEventListener("drop",a,!1)};function n(e){return i.onDragEnter&&i.onDragEnter(e),e.stopPropagation(),e.preventDefault(),!1}function t(e){if(e.stopPropagation(),e.preventDefault(),e.dataTransfer.items){var n=d(e.dataTransfer.items),t=n.filter(function(e){return"file"===e.kind}),r=n.filter(function(e){return"string"===e.kind});if(0===t.length&&!i.onDropText)return;if(0===r.length&&!i.onDrop)return;if(0===t.length&&0===r.length)return}return o.classList.add("drag"),clearTimeout(u),i.onDragOver&&i.onDragOver(e),!(e.dataTransfer.dropEffect="copy")}function r(e){return e.stopPropagation(),e.preventDefault(),i.onDragLeave&&i.onDragLeave(e),clearTimeout(u),u=setTimeout(f,50),!1}function a(e){e.stopPropagation(),e.preventDefault(),i.onDragLeave&&i.onDragLeave(e),clearTimeout(u),f();var t={x:e.clientX,y:e.clientY},n=e.dataTransfer.getData("text");if(n&&i.onDropText&&i.onDropText(n,t),e.dataTransfer.items){var r=d(e.dataTransfer.items).filter(function(e){return"file"===e.kind});if(0===r.length)return;l(r.map(function(n){return function(e){!function(n,t){var r=[];if(n.isFile)n.file(function(e){e.fullPath=n.fullPath,t(null,e)},function(e){t(e)});else if(n.isDirectory){var e=n.createReader();!function n(){e.readEntries(function(e){0<e.length?(r=r.concat(d(e)),n()):l(r.map(function(n){return function(e){s(n,e)}}),t)})}()}}(n.webkitGetAsEntry(),e)}}),function(e,n){if(e)throw e;i.onDrop&&i.onDrop(c(n),t)})}else{var o=d(e.dataTransfer.files);if(0===o.length)return;o.forEach(function(e){e.fullPath="/"+e.name}),i.onDrop&&i.onDrop(o,t)}return!1}function f(){o.classList.remove("drag")}};var c=e("flatten"),l=e("run-parallel");function s(n,t){var r=[];if(n.isFile){n.file(function(e){e.fullPath=n.fullPath;t(null,e)},function(e){t(e)})}else if(n.isDirectory){var e=n.createReader();o()}function o(){e.readEntries(function(e){if(e.length>0){r=r.concat(d(e));o()}else{i()}})}function i(){l(r.map(function(n){return function(e){s(n,e)}}),t)}}function d(e){return Array.prototype.slice.call(e||[],0)}},{flatten:1,"run-parallel":3}]},{},[])("/")}); |
@@ -160,3 +160,3 @@ module.exports = dragDrop | ||
entry.file(function (file) { | ||
file.fullPath = entry.fullPath // preserve pathing for consumer | ||
file.fullPath = entry.fullPath // preserve pathing for consumer | ||
cb(null, file) | ||
@@ -163,0 +163,0 @@ }, function (err) { |
{ | ||
"name": "drag-drop", | ||
"description": "HTML5 drag & drop for humans", | ||
"version": "2.13.2", | ||
"version": "2.13.3", | ||
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)", | ||
@@ -15,8 +15,8 @@ "bugs": { | ||
"devDependencies": { | ||
"browserify": "^14.0.0", | ||
"ecstatic": "^2.1.0", | ||
"browserify": "^16.1.0", | ||
"ecstatic": "^3.2.0", | ||
"html-inline": "^1.2.0", | ||
"standard": "*", | ||
"tape": "^4.0.0", | ||
"uglify-js": "^2.4.15" | ||
"uglify-js": "^3.3.12" | ||
}, | ||
@@ -23,0 +23,0 @@ "homepage": "https://github.com/feross/drag-drop", |
@@ -1,3 +0,12 @@ | ||
# drag-drop [![travis](https://img.shields.io/travis/feross/drag-drop/master.svg)](https://travis-ci.org/feross/drag-drop) [![npm](https://img.shields.io/npm/v/drag-drop.svg)](https://npmjs.org/package/drag-drop) [![downloads](https://img.shields.io/npm/dm/drag-drop.svg)](https://npmjs.org/package/drag-drop) | ||
# drag-drop [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] | ||
[travis-image]: https://img.shields.io/travis/feross/drag-drop/master.svg | ||
[travis-url]: https://travis-ci.org/feross/drag-drop | ||
[npm-image]: https://img.shields.io/npm/v/drag-drop.svg | ||
[npm-url]: https://npmjs.org/package/drag-drop | ||
[downloads-image]: https://img.shields.io/npm/dm/drag-drop.svg | ||
[downloads-url]: https://npmjs.org/package/drag-drop | ||
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg | ||
[standard-url]: https://standardjs.com | ||
### HTML5 drag & drop for humans | ||
@@ -62,3 +71,4 @@ | ||
console.log(file.lastModifiedData) | ||
console.log(file.fullPath) | ||
console.log(file.fullPath) // not real full path due to browser security restrictions | ||
console.log(file.path) // in Electron, this contains the actual full path | ||
@@ -65,0 +75,0 @@ // convert the file to a Buffer that we can use! |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20037
212
177