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

vue3-carousel

Package Overview
Dependencies
Maintainers
2
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.17 to 0.1.18

14

dist/carousel.es.js
/**
* Vue 3 Carousel 0.1.17
* Vue 3 Carousel 0.1.18
* (c) 2021

@@ -190,2 +190,4 @@ * @license MIT

const handleDrag = throttle((event) => {
if (!isTouch)
event.preventDefault();
endPosition.x = isTouch ? event.touches[0].clientX : event.clientX;

@@ -197,7 +199,5 @@ endPosition.y = isTouch ? event.touches[0].clientY : event.clientY;

dragged.x = deltaX;
if (!isTouch) {
event.preventDefault();
}
}, 16);
function handleDragStart(event) {
event.preventDefault();
isTouch = event.type === 'touchstart';

@@ -364,7 +364,7 @@ if ((!isTouch && event.button !== 0) || isSliding.value) {

const Navigation = (props, { slots }) => {
const Navigation = (props, { slots, attrs }) => {
const { next: slotNext, prev: slotPrev } = slots;
const nav = inject('nav', {});
const prevButton = h('button', { class: 'carousel__prev', onClick: nav.prev }, (slotPrev === null || slotPrev === void 0 ? void 0 : slotPrev()) || h(Icon, { name: 'arrowLeft' }));
const nextButton = h('button', { class: 'carousel__next', onClick: nav.next }, (slotNext === null || slotNext === void 0 ? void 0 : slotNext()) || h(Icon, { name: 'arrowRight' }));
const prevButton = h('button', { class: ['carousel__prev', attrs === null || attrs === void 0 ? void 0 : attrs.class], onClick: nav.prev }, (slotPrev === null || slotPrev === void 0 ? void 0 : slotPrev()) || h(Icon, { name: 'arrowLeft' }));
const nextButton = h('button', { class: ['carousel__next', attrs === null || attrs === void 0 ? void 0 : attrs.class], onClick: nav.next }, (slotNext === null || slotNext === void 0 ? void 0 : slotNext()) || h(Icon, { name: 'arrowRight' }));
return [prevButton, nextButton];

@@ -371,0 +371,0 @@ };

/**
* Vue 3 Carousel 0.1.17
* Vue 3 Carousel 0.1.18
* (c) 2021

@@ -194,2 +194,4 @@ * @license MIT

const handleDrag = throttle((event) => {
if (!isTouch)
event.preventDefault();
endPosition.x = isTouch ? event.touches[0].clientX : event.clientX;

@@ -201,7 +203,5 @@ endPosition.y = isTouch ? event.touches[0].clientY : event.clientY;

dragged.x = deltaX;
if (!isTouch) {
event.preventDefault();
}
}, 16);
function handleDragStart(event) {
event.preventDefault();
isTouch = event.type === 'touchstart';

@@ -368,7 +368,7 @@ if ((!isTouch && event.button !== 0) || isSliding.value) {

const Navigation = (props, { slots }) => {
const Navigation = (props, { slots, attrs }) => {
const { next: slotNext, prev: slotPrev } = slots;
const nav = vue.inject('nav', {});
const prevButton = vue.h('button', { class: 'carousel__prev', onClick: nav.prev }, (slotPrev === null || slotPrev === void 0 ? void 0 : slotPrev()) || vue.h(Icon, { name: 'arrowLeft' }));
const nextButton = vue.h('button', { class: 'carousel__next', onClick: nav.next }, (slotNext === null || slotNext === void 0 ? void 0 : slotNext()) || vue.h(Icon, { name: 'arrowRight' }));
const prevButton = vue.h('button', { class: ['carousel__prev', attrs === null || attrs === void 0 ? void 0 : attrs.class], onClick: nav.prev }, (slotPrev === null || slotPrev === void 0 ? void 0 : slotPrev()) || vue.h(Icon, { name: 'arrowLeft' }));
const nextButton = vue.h('button', { class: ['carousel__next', attrs === null || attrs === void 0 ? void 0 : attrs.class], onClick: nav.next }, (slotNext === null || slotNext === void 0 ? void 0 : slotNext()) || vue.h(Icon, { name: 'arrowRight' }));
return [prevButton, nextButton];

@@ -375,0 +375,0 @@ };

@@ -1,4 +0,4 @@

declare const Navigation: (props: any, { slots }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
declare const Navigation: (props: any, { slots, attrs }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>[];
export default Navigation;
{
"name": "vue3-carousel",
"version": "0.1.17",
"version": "0.1.18",
"scripts": {

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

@@ -19,2 +19,3 @@ # Vue 3 Carousel

- [x] Infinity scroll (wrapping around)
- [ ] Add classes for active and for visible slides
- [ ] Auto play

@@ -21,0 +22,0 @@ - [ ] RTL

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