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

@react-pdf-viewer/drop

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf-viewer/drop - npm Package Compare versions

Comparing version 2.7.2 to 2.8.0

7

lib/cjs/drop.js

@@ -105,2 +105,4 @@ 'use strict';

var containerRef = _a.containerRef, openFile = _a.openFile;
var direction = React__namespace.useContext(core.ThemeContext).direction;
var isRtl = direction === core.TextDirection.RightToLeft;
var isDragging = useDrop(containerRef, function (files) {

@@ -114,3 +116,6 @@ if (files.length === 0) {

return (React__namespace.createElement(React__namespace.Fragment, null, isDragging && (React__namespace.createElement("div", { className: "rpv-drop__area" },
React__namespace.createElement("div", { className: "rpv-drop__area-body" }, l10n && l10n.drop ? l10n.drop.dragDropFile : 'Drag and drop a PDF document here')))));
React__namespace.createElement("div", { className: core.classNames({
'rpv-drop__area-body': true,
'rpv-drop__area-body--rtl': isRtl,
}) }, l10n && l10n.drop ? l10n.drop.dragDropFile : 'Drag and drop a PDF document here')))));
};

@@ -117,0 +122,0 @@

2

lib/cjs/drop.min.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@react-pdf-viewer/core");function t(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var n=t(e),a=function(){return(a=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e}).apply(this,arguments)},i=function(e){var t=e.containerRef,a=e.openFile,i=function(e,r){var t=n.useRef(0),a=n.useState(!1),i=a[0],o=a[1],u=function(e){e.preventDefault(),o(!1),t.current=0,e.dataTransfer&&r(e.dataTransfer.files)},c=function(e){e.preventDefault()},l=function(e){e.preventDefault(),t.current+=1,t.current<=1&&o(!0)},s=function(e){e.preventDefault(),t.current-=1,t.current<=0&&o(!1)};return n.useEffect((function(){var r=e.current;if(r)return r.addEventListener("drop",u),r.addEventListener("dragover",c),r.addEventListener("dragenter",l),r.addEventListener("dragleave",s),function(){r.removeEventListener("drop",u),r.removeEventListener("dragover",c),r.removeEventListener("dragenter",l),r.removeEventListener("dragleave",s)}}),[e.current]),{isDragging:i}}(t,(function(e){0!==e.length&&a(e[0])})).isDragging,o=n.useContext(r.LocalizationContext).l10n;return n.createElement(n.Fragment,null,i&&n.createElement("div",{className:"rpv-drop__area"},n.createElement("div",{className:"rpv-drop__area-body"},o&&o.drop?o.drop.dragDropFile:"Drag and drop a PDF document here")))};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@react-pdf-viewer/core");function t(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var n=t(e),a=function(){return(a=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e}).apply(this,arguments)},i=function(e){var t=e.containerRef,a=e.openFile,i=n.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft,o=function(e,r){var t=n.useRef(0),a=n.useState(!1),i=a[0],o=a[1],c=function(e){e.preventDefault(),o(!1),t.current=0,e.dataTransfer&&r(e.dataTransfer.files)},u=function(e){e.preventDefault()},l=function(e){e.preventDefault(),t.current+=1,t.current<=1&&o(!0)},s=function(e){e.preventDefault(),t.current-=1,t.current<=0&&o(!1)};return n.useEffect((function(){var r=e.current;if(r)return r.addEventListener("drop",c),r.addEventListener("dragover",u),r.addEventListener("dragenter",l),r.addEventListener("dragleave",s),function(){r.removeEventListener("drop",c),r.removeEventListener("dragover",u),r.removeEventListener("dragenter",l),r.removeEventListener("dragleave",s)}}),[e.current]),{isDragging:i}}(t,(function(e){0!==e.length&&a(e[0])})).isDragging,c=n.useContext(r.LocalizationContext).l10n;return n.createElement(n.Fragment,null,o&&n.createElement("div",{className:"rpv-drop__area"},n.createElement("div",{className:r.classNames({"rpv-drop__area-body":!0,"rpv-drop__area-body--rtl":i})},c&&c.drop?c.drop.dragDropFile:"Drag and drop a PDF document here")))};
/*! *****************************************************************************

@@ -3,0 +3,0 @@ Copyright (c) Microsoft Corporation.

{
"name": "@react-pdf-viewer/drop",
"version": "2.7.2",
"version": "2.8.0",
"description": "A React component to view a PDF document",

@@ -36,3 +36,3 @@ "license": "https://react-pdf-viewer.dev/license",

"dependencies": {
"@react-pdf-viewer/core": "2.7.2"
"@react-pdf-viewer/core": "2.8.0"
},

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

},
"gitHead": "d5084b21f1e89e11ee45764849b8c61e4e6f4216"
"gitHead": "5a7ff547bbdcf8b51c10907ad706e4edc397fc4f"
}

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