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

nuka-carousel

Package Overview
Dependencies
Maintainers
30
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuka-carousel - npm Package Compare versions

Comparing version 4.7.5 to 4.7.7

6

CHANGELOG.md
# Nuka Changelog
## 4.7.5 (2020-12-30)
- [#746](https://github.com/FormidableLabs/nuka-carousel/pull/746) Fixes #705 - allow peeking slides when slide count is less than 3, and using Zoom animation
- [#747](https://github.com/FormidableLabs/nuka-carousel/pull/747) Set proper offset on first render for slider-list
- [#750](https://github.com/FormidableLabs/nuka-carousel/pull/750) Fixes #749 - Updates to `setDimensions` method to fix video height bug
## 4.7.4 (2020-11-30)

@@ -4,0 +10,0 @@

5

es/index.js

@@ -384,7 +384,2 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

var direction = swipeDirection(_this5.touchObject.startX, e.touches[0].pageX, _this5.touchObject.startY, e.touches[0].pageY, _this5.props.vertical);
if (direction !== 0) {
e.preventDefault();
}
var length = _this5.props.vertical ? Math.round(Math.sqrt(Math.pow(e.touches[0].pageY - _this5.touchObject.startY, 2))) : Math.round(Math.sqrt(Math.pow(e.touches[0].pageX - _this5.touchObject.startX, 2)));

@@ -391,0 +386,0 @@

2

es/utilities/utilities.js

@@ -177,3 +177,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

var frameHeight = slideHeight + props.cellSpacing * (slidesToShow - 1);
var frameWidth = props.vertical ? frameHeight : '100%';
var frameWidth = props.vertical ? frameHeight : null;
return {

@@ -180,0 +180,0 @@ slideWidth: slideWidth,

@@ -426,7 +426,2 @@ "use strict";

var direction = (0, _utilities.swipeDirection)(_this5.touchObject.startX, e.touches[0].pageX, _this5.touchObject.startY, e.touches[0].pageY, _this5.props.vertical);
if (direction !== 0) {
e.preventDefault();
}
var length = _this5.props.vertical ? Math.round(Math.sqrt(Math.pow(e.touches[0].pageY - _this5.touchObject.startY, 2))) : Math.round(Math.sqrt(Math.pow(e.touches[0].pageX - _this5.touchObject.startX, 2)));

@@ -433,0 +428,0 @@

@@ -212,3 +212,3 @@ "use strict";

var frameHeight = slideHeight + props.cellSpacing * (slidesToShow - 1);
var frameWidth = props.vertical ? frameHeight : '100%';
var frameWidth = props.vertical ? frameHeight : null;
return {

@@ -215,0 +215,0 @@ slideWidth: slideWidth,

{
"name": "nuka-carousel",
"version": "4.7.5",
"version": "4.7.7",
"description": "Pure React Carousel",

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

"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "^4.8.0",

@@ -33,0 +33,0 @@ "eslint-config-formidable": "^3.0.0",

@@ -7,4 +7,2 @@ [![Maintenance Status][maintenance-image]](#maintenance-status)

Maintained by [@sarmeyer](https://twitter.com/sarmeyer)
![Nuka Carousel Animated Example](https://i.imgur.com/UwP5gle.gif)

@@ -19,2 +17,6 @@

```
OR
```bash
$ npm install nuka-carousel
```

@@ -45,3 +47,3 @@ ### Example

The demo can be launched on your local machine via `webpack-dev-server`. Make sure you are running node version 9.11 or earlier. Once you have cloned this repo locally, run the following:
The demo can be launched on your local machine via `webpack-dev-server`. Once you have cloned this repo locally, run the following:

@@ -56,3 +58,3 @@ ```bash

Or on CodeSandBox: [![Edit currying-smoke-c8v2n](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/currying-smoke-c8v2n?fontsize=14&hidenavigation=1&theme=dark)
Or on CodeSandBox: [![Edit silly-rhodes-5pr2i](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/silly-rhodes-5pr2i?fontsize=14&hidenavigation=1&theme=dark)

@@ -145,5 +147,5 @@ ### Keyboard Controls

- The function returns the props for `goToSlide`, `nextSlide` and `previousSlide` functions in addition to `slideCount` and `currentSlide` values. Can also remove all render controls using `withoutControls`.
- The function returns the props for `goToSlide`, `nextSlide` and `previousSlide` functions, in addition to `slideCount` and `currentSlide` values. You can also remove all render controls using `withoutControls`.
- NOTE: The className `slide-visible` is added to the currently visible slide or slides (when slidesToShow > 1). The className `slide-current` is added to the currently "active" slide.
- NOTE: The className `slide-visible` is added to the currently visible slide or slides (when `slidesToShow` > 1). The className `slide-current` is added to the currently "active" slide.

@@ -215,3 +217,3 @@ #### renderAnnounceSlideMessage

Example, you can change the text of the `Previous` and `Next` buttons, and change the paging dots to red by passing in the following configuration:
For example, you can change the text of the `Previous` and `Next` buttons, and change the paging dots to red by passing in the following configuration:

@@ -269,3 +271,3 @@ ```

- Width: `initialSlidewidth` || `slideWidth` || (`slidesToShow` / width of container)
- Width: `initialSlideWidth` || `slideWidth` || (`slidesToShow` / width of container)
- Height: `initialSlideHeight`

@@ -272,0 +274,0 @@

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