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

pietile-carousel

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pietile-carousel - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

4

dist/Slider/Slider.js

@@ -59,3 +59,5 @@ "use strict";

});
var containerStyle = __assign(__assign({}, style), { overflow: 'hidden' });
var containerStyle = __assign(__assign({}, style), { overflow: 'hidden',
// https://github.com/framer/motion/issues/281
touchAction: 'pan-y' });
var transform = framer_motion_1.useMotionTemplate(templateObject_1 || (templateObject_1 = __makeTemplateObject(["translateX(-", "%)"], ["translateX(-", "%)"])), translate);

@@ -62,0 +64,0 @@ var sliderStyle = {

@@ -20,2 +20,6 @@ "use strict";

}); })[0];
var onTouchMove = react_1.useCallback(function (event) {
// Prevent vertical scroll on mobile
event.preventDefault();
}, []);
var onPanStart = react_1.useCallback(function () {

@@ -25,3 +29,4 @@ initial.dragging = true;

initial.itemWidth = calcItemWidth(ref, count, margin);
}, [ref, count, index, initial, margin]);
document.documentElement.addEventListener('touchmove', onTouchMove, { passive: false });
}, [ref, count, index, initial, margin, onTouchMove]);
var onPan = react_1.useCallback(function (_, info) {

@@ -52,3 +57,4 @@ var newIndex = initial.index - info.offset.x / initial.itemWidth;

utils_1.animateSpring(index, newIndex);
}, [index, initial]);
document.documentElement.removeEventListener('touchmove', onTouchMove);
}, [index, initial, onTouchMove]);
return react_1.useMemo(function () { return ({

@@ -55,0 +61,0 @@ onPanStart: onPanStart,

{
"name": "pietile-carousel",
"version": "3.0.1",
"version": "3.1.0",
"description": "React Carousel",

@@ -30,5 +30,5 @@ "keywords": [

"@typescript-eslint/parser": "^4.0.0",
"eslint": "~7.23.0",
"eslint": "~7.28.0",
"eslint-config-airbnb": "~18.2.0",
"eslint-config-prettier": "~8.1.0",
"eslint-config-prettier": "~8.3.0",
"eslint-plugin-import": "^2.18.0",

@@ -43,5 +43,4 @@ "eslint-plugin-jsx-a11y": "^6.2.3",

"import-sort-style-pietile": "~1.2.0",
"microbundle": "~0.13.0",
"rimraf": "~3.0.0",
"typescript": "~4.2.0"
"typescript": "~4.3.0"
},

@@ -48,0 +47,0 @@ "repository": {

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