Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-drag-event-interactive

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-drag-event-interactive - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

29

lib/index.js

@@ -7,10 +7,14 @@ "use strict";

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {};
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));

@@ -24,3 +28,8 @@

if (key in exports && exports[key] === _utils[key]) return;
exports[key] = _utils[key];
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _utils[key];
}
});
});

@@ -38,3 +47,3 @@

onDown = props.onDown,
reset = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
reset = (0, _objectWithoutProperties2["default"])(props, _excluded);
var container = (0, _react.useRef)(null);

@@ -44,4 +53,5 @@ var hasTouched = (0, _react.useRef)(false);

var _useState = (0, _react.useState)(false),
isDragging = _useState[0],
setDragging = _useState[1];
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
isDragging = _useState2[0],
setDragging = _useState2[1];

@@ -93,5 +103,5 @@ var onMoveCallback = (0, _utils.useEventCallback)(onMove);

}, [onKeyCallback]);
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2["default"])({}, reset, {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset), {}, {
className: [prefixCls, className || ''].filter(Boolean).join(' '),
style: (0, _extends2["default"])({}, reset.style, {
style: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, reset.style), {}, {
touchAction: 'none'

@@ -109,3 +119,2 @@ }),

exports["default"] = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useEventCallback = useEventCallback;

@@ -39,11 +41,5 @@ exports.getRelativePosition = exports.clamp = exports.preventDefaultMove = exports.isTouch = void 0;

var clamp = function clamp(number, min, max) {
if (min === void 0) {
min = 0;
}
if (max === void 0) {
max = 1;
}
var clamp = function clamp(number) {
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
return number > max ? max : number < min ? min : number;

@@ -50,0 +46,0 @@ };

{
"name": "@uiw/react-drag-event-interactive",
"version": "1.0.0",
"version": "1.0.1",
"description": "react drag event interactive",

@@ -31,6 +31,6 @@ "homepage": "https://uiwjs.github.io/react-color/#react-drag-event-interactive",

"dependencies": {
"@babel/runtime": "7.15.3"
"@babel/runtime": "7.15.4"
},
"devDependencies": {
"@types/react": "17.0.19",
"@types/react": "17.0.20",
"@types/react-dom": "17.0.9",

@@ -37,0 +37,0 @@ "@types/react-test-renderer": "17.0.1",

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