smooth-loader 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/js/index.js +1 -1
- package/lib/js/index.js.map +1 -1
- package/package.json +8 -2
- package/src/index.ts +1 -1
package/CHANGELOG.md
ADDED
package/lib/js/index.js
CHANGED
|
@@ -15,6 +15,6 @@ function getImagesElements(selector) {
|
|
|
15
15
|
return document.querySelectorAll(selector);
|
|
16
16
|
if (selector instanceof NodeList)
|
|
17
17
|
return selector;
|
|
18
|
-
return document.querySelectorAll('.smooth-loader');
|
|
18
|
+
return document.querySelectorAll('.smooth-loader[data-src]');
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
package/lib/js/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAqC;AAGrC,kBAAe,CAAC,QAAyC,EAAQ,EAAE;IAC/D,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IAE1C,IAAI,CAAC,MAAM;QACP,OAAM;IAEV,OAAO,IAAI,oBAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAA;AAC3C,CAAC,CAAA;AAED,SAAS,iBAAiB,CAAC,QAAyC;IAChE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,EAAE;QAC/C,OAAO,QAAQ,CAAC,gBAAgB,CAAY,QAAQ,CAAC,CAAA;IAEzD,IAAI,QAAQ,YAAY,QAAQ;QAC5B,OAAO,QAAQ,CAAA;IAEnB,OAAO,QAAQ,CAAC,gBAAgB,CAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAqC;AAGrC,kBAAe,CAAC,QAAyC,EAAQ,EAAE;IAC/D,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IAE1C,IAAI,CAAC,MAAM;QACP,OAAM;IAEV,OAAO,IAAI,oBAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAA;AAC3C,CAAC,CAAA;AAED,SAAS,iBAAiB,CAAC,QAAyC;IAChE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,EAAE;QAC/C,OAAO,QAAQ,CAAC,gBAAgB,CAAY,QAAQ,CAAC,CAAA;IAEzD,IAAI,QAAQ,YAAY,QAAQ;QAC5B,OAAO,QAAQ,CAAA;IAEnB,OAAO,QAAQ,CAAC,gBAAgB,CAAY,0BAA0B,CAAC,CAAA;AAC3E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smooth-loader",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "This package allows you to lazy load your images using IntersectionObserver technology. It supports loading background images as well as the regular images with img tag.",
|
|
5
5
|
"main": "lib/js/index.js",
|
|
6
6
|
"types": "lib/js",
|
|
@@ -12,7 +12,13 @@
|
|
|
12
12
|
"watch": "tsc --watch",
|
|
13
13
|
"publish": "npm publish"
|
|
14
14
|
},
|
|
15
|
-
"keywords": [
|
|
15
|
+
"keywords": [
|
|
16
|
+
"lazy loader",
|
|
17
|
+
"lazy",
|
|
18
|
+
"image loader",
|
|
19
|
+
"lazy loading",
|
|
20
|
+
"background image"
|
|
21
|
+
],
|
|
16
22
|
"author": "Serhii Cho",
|
|
17
23
|
"license": "MIT",
|
|
18
24
|
"homepage": "https://github.com/SerhiiCho/smooth-loader#readme"
|
package/src/index.ts
CHANGED
|
@@ -17,5 +17,5 @@ function getImagesElements(selector?: NodeListOf<LazyImage> | string): NodeListO
|
|
|
17
17
|
if (selector instanceof NodeList)
|
|
18
18
|
return selector
|
|
19
19
|
|
|
20
|
-
return document.querySelectorAll<LazyImage>('.smooth-loader')
|
|
20
|
+
return document.querySelectorAll<LazyImage>('.smooth-loader[data-src]')
|
|
21
21
|
}
|