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

vue3-carousel

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-carousel - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

38

dist/carousel.es.js
/**
* Vue 3 Carousel 0.1.9
* Vue 3 Carousel 0.1.10
* (c) 2021

@@ -8,16 +8,18 @@ * @license MIT

var slidesCounter = new Proxy({ value: 0, read: 0 }, {
get(obj, prop) {
if (!(prop in obj))
return 0;
if (prop === 'read') {
return obj[prop];
}
return obj[prop]++;
},
set(obj, prop, value) {
obj[prop] = Math.max(value, 0);
return true;
},
});
function counterFactory() {
return new Proxy({ value: 0, read: 0 }, {
get(obj, prop) {
if (!(prop in obj))
return 0;
if (prop === 'read') {
return obj[prop];
}
return obj[prop]++;
},
set(obj, prop, value) {
obj[prop] = Math.max(value, 0);
return true;
},
});
}

@@ -108,2 +110,3 @@ /**

const slidesCount = ref(1);
const slidesCounter = counterFactory();
// generate carousel configs

@@ -125,2 +128,3 @@ const defaultConfig = Object.assign(Object.assign({}, props), props.settings);

provide('currentSlide', currentSlide);
provide('slidesCounter', slidesCounter);
const { default: slotDefault, slides: slotSlides, addons: slotAddons } = slots;

@@ -228,3 +232,4 @@ const slidesElements = (slotSlides === null || slotSlides === void 0 ? void 0 : slotSlides()) || (slotDefault === null || slotDefault === void 0 ? void 0 : slotDefault()) || [];

isDragging.value = false;
const draggedSlides = Math.round(dragged.x / slideWidth.value);
const tolerance = Math.sign(dragged.x) * 0.4;
const draggedSlides = Math.round(dragged.x / slideWidth.value + tolerance);
slideTo(currentSlide.value - draggedSlides);

@@ -372,2 +377,3 @@ dragged.x = 0;

const slidesBuffer = inject('slidesBuffer', ref([]));
const slidesCounter = inject('slidesCounter');
const slideOrder = slidesCounter.value;

@@ -374,0 +380,0 @@ const wrapOrder = ref(slideOrder);

/**
* Vue 3 Carousel 0.1.9
* Vue 3 Carousel 0.1.10
* (c) 2021

@@ -12,16 +12,18 @@ * @license MIT

var slidesCounter = new Proxy({ value: 0, read: 0 }, {
get(obj, prop) {
if (!(prop in obj))
return 0;
if (prop === 'read') {
return obj[prop];
}
return obj[prop]++;
},
set(obj, prop, value) {
obj[prop] = Math.max(value, 0);
return true;
},
});
function counterFactory() {
return new Proxy({ value: 0, read: 0 }, {
get(obj, prop) {
if (!(prop in obj))
return 0;
if (prop === 'read') {
return obj[prop];
}
return obj[prop]++;
},
set(obj, prop, value) {
obj[prop] = Math.max(value, 0);
return true;
},
});
}

@@ -112,2 +114,3 @@ /**

const slidesCount = vue.ref(1);
const slidesCounter = counterFactory();
// generate carousel configs

@@ -129,2 +132,3 @@ const defaultConfig = Object.assign(Object.assign({}, props), props.settings);

vue.provide('currentSlide', currentSlide);
vue.provide('slidesCounter', slidesCounter);
const { default: slotDefault, slides: slotSlides, addons: slotAddons } = slots;

@@ -232,3 +236,4 @@ const slidesElements = (slotSlides === null || slotSlides === void 0 ? void 0 : slotSlides()) || (slotDefault === null || slotDefault === void 0 ? void 0 : slotDefault()) || [];

isDragging.value = false;
const draggedSlides = Math.round(dragged.x / slideWidth.value);
const tolerance = Math.sign(dragged.x) * 0.4;
const draggedSlides = Math.round(dragged.x / slideWidth.value + tolerance);
slideTo(currentSlide.value - draggedSlides);

@@ -376,2 +381,3 @@ dragged.x = 0;

const slidesBuffer = vue.inject('slidesBuffer', vue.ref([]));
const slidesCounter = vue.inject('slidesCounter');
const slideOrder = slidesCounter.value;

@@ -378,0 +384,0 @@ const wrapOrder = vue.ref(slideOrder);

@@ -1,6 +0,6 @@

interface Counter {
export interface Counter {
value: number;
[name: string]: any;
}
declare const _default: Counter;
export default _default;
declare function counterFactory(): Counter;
export default counterFactory;
{
"name": "vue3-carousel",
"version": "0.1.9",
"version": "0.1.10",
"scripts": {

@@ -5,0 +5,0 @@ "build": "rollup -c",

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