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

svelte-fast-marquee

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-fast-marquee - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

83

dist/index.js

@@ -68,20 +68,2 @@ (function (global, factory) {

}
function exclude_internal_props(props) {
const result = {};
for (const k in props)
if (k[0] !== '$')
result[k] = props[k];
return result;
}
function compute_rest_props(props, keys) {
const rest = {};
keys = new Set(keys);
for (const k in props)
if (!keys.has(k) && k[0] !== '$')
rest[k] = props[k];
return rest;
}
function null_to_empty(value) {
return value == null ? '' : value;
}
function append(target, node) {

@@ -418,3 +400,3 @@ target.appendChild(node);

// (61:1) {#if gradient}
// (70:1) {#if gradient}
function create_if_block(ctx) {

@@ -464,8 +446,8 @@ let div;

attr(div0, "class", "marquee svelte-nbo9dd");
attr(div0, "style", /*_marqueeStyle*/ ctx[3]);
attr(div0, "style", /*_marqueeStyle*/ ctx[4]);
add_render_callback(() => /*div0_elementresize_handler*/ ctx[14].call(div0));
attr(div1, "class", "marquee svelte-nbo9dd");
attr(div1, "style", /*_marqueeStyle*/ ctx[3]);
attr(div2, "class", div2_class_value = "" + (null_to_empty(`marquee-container ${/*$$restProps*/ ctx[5].class ?? ""}`) + " svelte-nbo9dd"));
attr(div2, "style", /*_style*/ ctx[4]);
attr(div1, "style", /*_marqueeStyle*/ ctx[4]);
attr(div2, "class", div2_class_value = "marquee-container " + /*className*/ ctx[1] + " svelte-nbo9dd");
attr(div2, "style", /*_style*/ ctx[5]);
add_render_callback(() => /*div2_elementresize_handler*/ ctx[15].call(div2));

@@ -512,4 +494,4 @@ },

if (!current || dirty & /*_marqueeStyle*/ 8) {
attr(div0, "style", /*_marqueeStyle*/ ctx[3]);
if (!current || dirty & /*_marqueeStyle*/ 16) {
attr(div0, "style", /*_marqueeStyle*/ ctx[4]);
}

@@ -523,12 +505,12 @@

if (!current || dirty & /*_marqueeStyle*/ 8) {
attr(div1, "style", /*_marqueeStyle*/ ctx[3]);
if (!current || dirty & /*_marqueeStyle*/ 16) {
attr(div1, "style", /*_marqueeStyle*/ ctx[4]);
}
if (!current || dirty & /*$$restProps*/ 32 && div2_class_value !== (div2_class_value = "" + (null_to_empty(`marquee-container ${/*$$restProps*/ ctx[5].class ?? ""}`) + " svelte-nbo9dd"))) {
if (!current || dirty & /*className*/ 2 && div2_class_value !== (div2_class_value = "marquee-container " + /*className*/ ctx[1] + " svelte-nbo9dd")) {
attr(div2, "class", div2_class_value);
}
if (!current || dirty & /*_style*/ 16) {
attr(div2, "style", /*_style*/ ctx[4]);
if (!current || dirty & /*_style*/ 32) {
attr(div2, "style", /*_style*/ ctx[5]);
}

@@ -562,4 +544,2 @@ },

let _marqueeStyle;
const omit_props_names = ["pauseOnHover","pauseOnClick","direction","speed","play","gradient"];
let $$restProps = compute_rest_props($$props, omit_props_names);
let { $$slots: slots = {}, $$scope } = $$props;

@@ -572,2 +552,3 @@ let { pauseOnHover = false } = $$props;

let { gradient = false } = $$props;
let { class: className = "" } = $$props;
let containerWidth;

@@ -578,3 +559,3 @@ let marqueeWidth;

marqueeWidth = this.clientWidth;
$$invalidate(2, marqueeWidth);
$$invalidate(3, marqueeWidth);
}

@@ -584,19 +565,18 @@

containerWidth = this.clientWidth;
$$invalidate(1, containerWidth);
$$invalidate(2, containerWidth);
}
$$self.$$set = $$new_props => {
$$props = assign(assign({}, $$props), exclude_internal_props($$new_props));
$$invalidate(5, $$restProps = compute_rest_props($$props, omit_props_names));
if ('pauseOnHover' in $$new_props) $$invalidate(6, pauseOnHover = $$new_props.pauseOnHover);
if ('pauseOnClick' in $$new_props) $$invalidate(7, pauseOnClick = $$new_props.pauseOnClick);
if ('direction' in $$new_props) $$invalidate(8, direction = $$new_props.direction);
if ('speed' in $$new_props) $$invalidate(9, speed = $$new_props.speed);
if ('play' in $$new_props) $$invalidate(10, play = $$new_props.play);
if ('gradient' in $$new_props) $$invalidate(0, gradient = $$new_props.gradient);
if ('$$scope' in $$new_props) $$invalidate(12, $$scope = $$new_props.$$scope);
$$self.$$set = $$props => {
if ('pauseOnHover' in $$props) $$invalidate(6, pauseOnHover = $$props.pauseOnHover);
if ('pauseOnClick' in $$props) $$invalidate(7, pauseOnClick = $$props.pauseOnClick);
if ('direction' in $$props) $$invalidate(8, direction = $$props.direction);
if ('speed' in $$props) $$invalidate(9, speed = $$props.speed);
if ('play' in $$props) $$invalidate(10, play = $$props.play);
if ('gradient' in $$props) $$invalidate(0, gradient = $$props.gradient);
if ('class' in $$props) $$invalidate(1, className = $$props.class);
if ('$$scope' in $$props) $$invalidate(12, $$scope = $$props.$$scope);
};
$$self.$$.update = () => {
if ($$self.$$.dirty & /*marqueeWidth, containerWidth, speed*/ 518) {
if ($$self.$$.dirty & /*marqueeWidth, containerWidth, speed*/ 524) {
$$invalidate(11, duration = marqueeWidth < containerWidth

@@ -608,3 +588,3 @@ ? containerWidth / speed

if ($$self.$$.dirty & /*pauseOnHover, pauseOnClick*/ 192) {
$$invalidate(4, _style = `
$$invalidate(5, _style = `
--pause-on-hover: ${pauseOnHover ? "paused" : "running"};

@@ -616,3 +596,3 @@ --pause-on-click: ${pauseOnClick ? "paused" : "running"};

if ($$self.$$.dirty & /*play, direction, duration*/ 3328) {
$$invalidate(3, _marqueeStyle = `
$$invalidate(4, _marqueeStyle = `
--play: ${play ? "running" : "paused"};

@@ -623,2 +603,6 @@ --direction: ${direction === "left" ? "normal" : "reverse"};

}
if ($$self.$$.dirty & /*className*/ 2) {
console.log(className);
}
};

@@ -628,2 +612,3 @@

gradient,
className,
containerWidth,

@@ -633,3 +618,2 @@ marqueeWidth,

_style,
$$restProps,
pauseOnHover,

@@ -664,3 +648,4 @@ pauseOnClick,

play: 10,
gradient: 0
gradient: 0,
class: 1
},

@@ -667,0 +652,0 @@ add_css

{
"name": "svelte-fast-marquee",
"version": "0.5.0",
"version": "0.5.1",
"description": "A Marquee component for Svelte inspired by react-fast-marquee.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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