Socket
Socket
Sign inDemoInstall

svelte-lazy

Package Overview
Dependencies
1
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.11 to 1.0.12

44

index.js

@@ -143,2 +143,5 @@ (function (global, factory) {

}
function set_style(node, key, value, important) {
node.style.setProperty(key, value, important ? 'important' : '');
}
function custom_event(type, detail) {

@@ -881,4 +884,4 @@ const e = document.createEvent('CustomEvent');

let current;
const default_slot_template = /*$$slots*/ ctx[14].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[13], null);
const default_slot_template = /*$$slots*/ ctx[15].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[14], null);
const default_slot_or_fallback = default_slot || fallback_block();

@@ -911,4 +914,4 @@ let if_block = /*contentDisplay*/ ctx[4] === "hide" && /*placeholder*/ ctx[1] && create_if_block_1$1(ctx);

if (default_slot) {
if (default_slot.p && dirty & /*$$scope*/ 8192) {
update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[13], dirty, null, null);
if (default_slot.p && dirty & /*$$scope*/ 16384) {
update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[14], dirty, null, null);
}

@@ -1057,2 +1060,3 @@ }

attr(div, "class", /*rootClass*/ ctx[6]);
set_style(div, "height", /*rootInitialHeight*/ ctx[7]);
},

@@ -1069,3 +1073,3 @@ m(target, anchor) {

if (!mounted) {
dispose = action_destroyer(load_action = /*load*/ ctx[7].call(null, div));
dispose = action_destroyer(load_action = /*load*/ ctx[8].call(null, div));
mounted = true;

@@ -1188,2 +1192,3 @@ }

const rootClass = "svelte-lazy" + (className ? " " + className : "");
const rootInitialHeight = getStyleHeight();
let loaded = false;

@@ -1230,5 +1235,9 @@ let contentDisplay = "";

function getStyleHeight() {
return typeof height === "number" ? height + "px" : height;
}
function setHeight(node) {
if (height) {
node.style.height = typeof height === "number" ? height + "px" : height;
node.style.height = getStyleHeight();
}

@@ -1287,11 +1296,11 @@ }

$$self.$$set = $$props => {
if ("height" in $$props) $$invalidate(8, height = $$props.height);
if ("offset" in $$props) $$invalidate(9, offset = $$props.offset);
if ("height" in $$props) $$invalidate(9, height = $$props.height);
if ("offset" in $$props) $$invalidate(10, offset = $$props.offset);
if ("fadeOption" in $$props) $$invalidate(0, fadeOption = $$props.fadeOption);
if ("resetHeightDelay" in $$props) $$invalidate(10, resetHeightDelay = $$props.resetHeightDelay);
if ("onload" in $$props) $$invalidate(11, onload = $$props.onload);
if ("resetHeightDelay" in $$props) $$invalidate(11, resetHeightDelay = $$props.resetHeightDelay);
if ("onload" in $$props) $$invalidate(12, onload = $$props.onload);
if ("placeholder" in $$props) $$invalidate(1, placeholder = $$props.placeholder);
if ("placeholderProps" in $$props) $$invalidate(2, placeholderProps = $$props.placeholderProps);
if ("class" in $$props) $$invalidate(12, className = $$props.class);
if ("$$scope" in $$props) $$invalidate(13, $$scope = $$props.$$scope);
if ("class" in $$props) $$invalidate(13, className = $$props.class);
if ("$$scope" in $$props) $$invalidate(14, $$scope = $$props.$$scope);
};

@@ -1315,2 +1324,3 @@

rootClass,
rootInitialHeight,
load,

@@ -1332,10 +1342,10 @@ height,

init(this, options, instance$1, create_fragment$1, safe_not_equal, {
height: 8,
offset: 9,
height: 9,
offset: 10,
fadeOption: 0,
resetHeightDelay: 10,
onload: 11,
resetHeightDelay: 11,
onload: 12,
placeholder: 1,
placeholderProps: 2,
class: 12
class: 13
});

@@ -1342,0 +1352,0 @@ }

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

"main": "index.js",
"version": "1.0.11",
"version": "1.0.12",
"types": "index.d.ts",

@@ -9,0 +9,0 @@ "repository": "leafOfTree/svelte-lazy",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc