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

@beyonk/svelte-carousel

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beyonk/svelte-carousel - npm Package Compare versions

Comparing version 2.7.1 to 2.8.0

232

dist/index.js

@@ -174,2 +174,13 @@ (function (global, factory) {

let outros;
function group_outros() {
outros = {
remaining: 0,
callbacks: []
};
}
function check_outros() {
if (!outros.remaining) {
run_all(outros.callbacks);
}
}
function transition_in(block, local) {

@@ -332,5 +343,2 @@ if (block && block.i) {

const get_right_control_slot_changes = ({}) => ({});
const get_right_control_slot_context = ({}) => ({});
function get_each_context(ctx, list, i) {

@@ -343,6 +351,105 @@ const child_ctx = Object.create(ctx);

const get_right_control_slot_changes = ({}) => ({});
const get_right_control_slot_context = ({}) => ({});
const get_left_control_slot_changes = ({}) => ({});
const get_left_control_slot_context = ({}) => ({});
// (9:4) {#if dots}
// (6:1) {#if controls}
function create_if_block_1(ctx) {
var button0, t, button1, current, dispose;
const left_control_slot_1 = ctx.$$slots["left-control"];
const left_control_slot = create_slot(left_control_slot_1, ctx, get_left_control_slot_context);
const right_control_slot_1 = ctx.$$slots["right-control"];
const right_control_slot = create_slot(right_control_slot_1, ctx, get_right_control_slot_context);
return {
c() {
button0 = element("button");
if (left_control_slot) left_control_slot.c();
t = space();
button1 = element("button");
if (right_control_slot) right_control_slot.c();
attr(button0, "class", "left svelte-1ppqxio");
attr(button0, "aria-label", "left");
attr(button1, "class", "right svelte-1ppqxio");
attr(button1, "aria-label", "right");
dispose = [
listen(button0, "click", ctx.left),
listen(button1, "click", ctx.right)
];
},
l(nodes) {
if (left_control_slot) left_control_slot.l(button0_nodes);
if (right_control_slot) right_control_slot.l(button1_nodes);
},
m(target, anchor) {
insert(target, button0, anchor);
if (left_control_slot) {
left_control_slot.m(button0, null);
}
insert(target, t, anchor);
insert(target, button1, anchor);
if (right_control_slot) {
right_control_slot.m(button1, null);
}
current = true;
},
p(changed, ctx) {
if (left_control_slot && left_control_slot.p && changed.$$scope) {
left_control_slot.p(get_slot_changes(left_control_slot_1, ctx, changed, get_left_control_slot_changes), get_slot_context(left_control_slot_1, ctx, get_left_control_slot_context));
}
if (right_control_slot && right_control_slot.p && changed.$$scope) {
right_control_slot.p(get_slot_changes(right_control_slot_1, ctx, changed, get_right_control_slot_changes), get_slot_context(right_control_slot_1, ctx, get_right_control_slot_context));
}
},
i(local) {
if (current) return;
transition_in(left_control_slot, local);
transition_in(right_control_slot, local);
current = true;
},
o(local) {
transition_out(left_control_slot, local);
transition_out(right_control_slot, local);
current = false;
},
d(detaching) {
if (detaching) {
detach(button0);
}
if (left_control_slot) left_control_slot.d(detaching);
if (detaching) {
detach(t);
detach(button1);
}
if (right_control_slot) right_control_slot.d(detaching);
run_all(dispose);
}
};
}
// (14:4) {#if dots}
function create_if_block(ctx) {

@@ -410,3 +517,3 @@ var ul;

// (11:2) {#each {length: totalDots} as _, i}
// (16:2) {#each {length: totalDots} as _, i}
function create_each_block(ctx) {

@@ -448,14 +555,10 @@ var li, li_class_value, dispose;

function create_fragment(ctx) {
var div1, button0, t0, div0, t1, t2, button1, current, dispose;
var div1, div0, t0, t1, current;
const left_control_slot_1 = ctx.$$slots["left-control"];
const left_control_slot = create_slot(left_control_slot_1, ctx, get_left_control_slot_context);
const default_slot_1 = ctx.$$slots.default;
const default_slot = create_slot(default_slot_1, ctx, null);
var if_block = (ctx.dots) && create_if_block(ctx);
var if_block0 = (ctx.controls) && create_if_block_1(ctx);
const right_control_slot_1 = ctx.$$slots["right-control"];
const right_control_slot = create_slot(right_control_slot_1, ctx, get_right_control_slot_context);
var if_block1 = (ctx.dots) && create_if_block(ctx);

@@ -465,37 +568,16 @@ return {

div1 = element("div");
button0 = element("button");
if (left_control_slot) left_control_slot.c();
t0 = space();
div0 = element("div");
if (default_slot) default_slot.c();
t0 = space();
if (if_block0) if_block0.c();
t1 = space();
if (if_block) if_block.c();
t2 = space();
button1 = element("button");
if (if_block1) if_block1.c();
if (right_control_slot) right_control_slot.c();
attr(button0, "class", "left svelte-1ppqxio");
attr(button0, "aria-label", "left");
attr(div0, "class", "slides");
attr(button1, "class", "right svelte-1ppqxio");
attr(button1, "aria-label", "right");
attr(div1, "class", "carousel svelte-1ppqxio");
dispose = [
listen(button0, "click", ctx.left),
listen(button1, "click", ctx.right)
];
},
l(nodes) {
if (left_control_slot) left_control_slot.l(button0_nodes);
if (default_slot) default_slot.l(div0_nodes);
if (right_control_slot) right_control_slot.l(button1_nodes);
},

@@ -505,9 +587,2 @@

insert(target, div1, anchor);
append(div1, button0);
if (left_control_slot) {
left_control_slot.m(button0, null);
}
append(div1, t0);
append(div1, div0);

@@ -520,11 +595,6 @@

add_binding_callback(() => ctx.div0_binding(div0, null));
append(div1, t0);
if (if_block0) if_block0.m(div1, null);
append(div1, t1);
if (if_block) if_block.m(div1, null);
append(div1, t2);
append(div1, button1);
if (right_control_slot) {
right_control_slot.m(button1, null);
}
if (if_block1) if_block1.m(div1, null);
current = true;

@@ -534,6 +604,2 @@ },

p(changed, ctx) {
if (left_control_slot && left_control_slot.p && changed.$$scope) {
left_control_slot.p(get_slot_changes(left_control_slot_1, ctx, changed, get_left_control_slot_changes), get_slot_context(left_control_slot_1, ctx, get_left_control_slot_context));
}
if (default_slot && default_slot.p && changed.$$scope) {

@@ -548,17 +614,31 @@ default_slot.p(get_slot_changes(default_slot_1, ctx, changed, null), get_slot_context(default_slot_1, ctx, null));

if (ctx.dots) {
if (if_block) {
if_block.p(changed, ctx);
if (ctx.controls) {
if (if_block0) {
if_block0.p(changed, ctx);
transition_in(if_block0, 1);
} else {
if_block = create_if_block(ctx);
if_block.c();
if_block.m(div1, t2);
if_block0 = create_if_block_1(ctx);
if_block0.c();
transition_in(if_block0, 1);
if_block0.m(div1, t1);
}
} else if (if_block) {
if_block.d(1);
if_block = null;
} else if (if_block0) {
group_outros();
transition_out(if_block0, 1, () => {
if_block0 = null;
});
check_outros();
}
if (right_control_slot && right_control_slot.p && changed.$$scope) {
right_control_slot.p(get_slot_changes(right_control_slot_1, ctx, changed, get_right_control_slot_changes), get_slot_context(right_control_slot_1, ctx, get_right_control_slot_context));
if (ctx.dots) {
if (if_block1) {
if_block1.p(changed, ctx);
} else {
if_block1 = create_if_block(ctx);
if_block1.c();
if_block1.m(div1, null);
}
} else if (if_block1) {
if_block1.d(1);
if_block1 = null;
}

@@ -569,5 +649,4 @@ },

if (current) return;
transition_in(left_control_slot, local);
transition_in(default_slot, local);
transition_in(right_control_slot, local);
transition_in(if_block0);
current = true;

@@ -577,5 +656,4 @@ },

o(local) {
transition_out(left_control_slot, local);
transition_out(default_slot, local);
transition_out(right_control_slot, local);
transition_out(if_block0);
current = false;

@@ -589,10 +667,6 @@ },

if (left_control_slot) left_control_slot.d(detaching);
if (default_slot) default_slot.d(detaching);
ctx.div0_binding(null, div0);
if (if_block) if_block.d();
if (right_control_slot) right_control_slot.d(detaching);
run_all(dispose);
if (if_block0) if_block0.d();
if (if_block1) if_block1.d();
}

@@ -605,3 +679,3 @@ };

let { perPage = 3, loop = true, autoplay = 0, duration = 200, easing = 'ease-out', startIndex = 0, draggable = true, multipleDrag = true, dots = true, threshold = 20, rtl = false } = $$props;
let { perPage = 3, loop = true, autoplay = 0, duration = 200, easing = 'ease-out', startIndex = 0, draggable = true, multipleDrag = true, dots = true, controls = true, threshold = 20, rtl = false } = $$props;
let currentIndex = startIndex;

@@ -697,2 +771,3 @@

if ('dots' in $$props) $$invalidate('dots', dots = $$props.dots);
if ('controls' in $$props) $$invalidate('controls', controls = $$props.controls);
if ('threshold' in $$props) $$invalidate('threshold', threshold = $$props.threshold);

@@ -721,2 +796,3 @@ if ('rtl' in $$props) $$invalidate('rtl', rtl = $$props.rtl);

dots,
controls,
threshold,

@@ -745,3 +821,3 @@ rtl,

if (!document.getElementById("svelte-1ppqxio-style")) add_css();
init(this, options, instance, create_fragment, safe_not_equal, ["perPage", "loop", "autoplay", "duration", "easing", "startIndex", "draggable", "multipleDrag", "dots", "threshold", "rtl", "isDotActive", "left", "right", "go", "pause", "resume"]);
init(this, options, instance, create_fragment, safe_not_equal, ["perPage", "loop", "autoplay", "duration", "easing", "startIndex", "draggable", "multipleDrag", "dots", "controls", "threshold", "rtl", "isDotActive", "left", "right", "go", "pause", "resume"]);
}

@@ -748,0 +824,0 @@

@@ -6,3 +6,3 @@ {

"main": "dist/index.js",
"version": "2.7.1",
"version": "2.8.0",
"scripts": {

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

@@ -103,3 +103,4 @@ <p align="center">

| multipleDrag | boolean | true | Allow dragging to move multiple slides. |
| dots | boolean | true | Toggles visibility of slider dots. |
| dots | boolean | true | Toggles visibility of slider dots.
| controls | boolean | true | Toggles visibility of slider controls. dots. |
| threshold | number | 20 | Touch and mouse dragging threshold (in px). |

@@ -106,0 +107,0 @@ | rtl | boolean | false | Enables layout for languages written from right to left (like Hebrew or Arabic). |

Sorry, the diff of this file is not supported yet

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