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

embla-carousel-svelte

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embla-carousel-svelte - npm Package Compare versions

Comparing version 8.0.0-rc10 to 8.0.0-rc11

18

embla-carousel-svelte.umd.js

@@ -328,8 +328,6 @@ (function (global, factory) {

const diff = dragTracker.pointerMove(evt);
const directionDiff = direction.apply(diff);
if (diffScroll > dragThreshold) preventClick = true;
scrollBody.useFriction(0.3).useDuration(1);
if (directionDiff) scrollBody.useDirection(directionDiff);
animation.start();
target.add(directionDiff);
target.add(direction.apply(diff));
evt.preventDefault();

@@ -471,13 +469,21 @@ }

let scrollFriction = baseFriction;
let rawLocation = location.get();
let rawLocationPrevious = 0;
function seek() {
const diff = target.get() - location.get();
const isInstant = !scrollDuration;
let directionDiff = 0;
if (isInstant) {
bodyVelocity = 0;
location.set(target);
directionDiff = diff;
} else {
bodyVelocity += diff / scrollDuration;
bodyVelocity *= scrollFriction;
rawLocation += bodyVelocity;
location.add(bodyVelocity);
directionDiff = rawLocation - rawLocationPrevious;
}
scrollDirection = mathSign(directionDiff);
rawLocationPrevious = rawLocation;
hasSettled = mathAbs(diff) < 0.001;

@@ -512,6 +518,2 @@ return self;

}
function useDirection(n) {
scrollDirection = mathSign(n);
return self;
}
const self = {

@@ -525,3 +527,2 @@ direction,

useBaseDuration,
useDirection,
useFriction,

@@ -739,3 +740,2 @@ useDuration

const indexDiff = target.index !== indexCurrent.get();
scrollBody.useDirection(distanceDiff);
targetVector.add(distanceDiff);

@@ -742,0 +742,0 @@ if (distanceDiff) {

{
"name": "embla-carousel-svelte",
"version": "8.0.0-rc10",
"version": "8.0.0-rc11",
"author": "David Jerleke",

@@ -59,4 +59,4 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision",

"dependencies": {
"embla-carousel": "8.0.0-rc10",
"embla-carousel-reactive-utils": "8.0.0-rc10"
"embla-carousel": "8.0.0-rc11",
"embla-carousel-reactive-utils": "8.0.0-rc11"
},

@@ -63,0 +63,0 @@ "peerDependencies": {

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