Skip to content

Commit 1853e68

Browse files
committed
3.1.3 release.
- Brought in PR #62. - Bumped version. - Tweaked build process to remove rollup-plugin-copy. - Updated packages.
1 parent 7d93c4d commit 1853e68

File tree

5 files changed

+351
-446
lines changed

5 files changed

+351
-446
lines changed

dist/yall.min.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default function(e){const t=(e=e||{}).lazyClass||"lazy",o=e.lazyBackgroundClass||"lazy-bg",n="idleLoadTimeout"in e?e.idleLoadTimeout:200,i=e.observeChanges||!1,s=e.events||{},r=window,a="requestIdleCallback",l="IntersectionObserver",d=["srcset","src","poster"],c=[],u=(e,n)=>c.slice.call((n||document).querySelectorAll(e||"img."+t+",video."+t+",iframe."+t+",."+o)),b=t=>{const n=t.parentNode;let i,s=[];"PICTURE"==n.nodeName&&(i=n),"VIDEO"==t.nodeName&&(i=t),s=u("source",i);for(let e in s)f(s[e]);f(t),t.autoplay&&t.load();const r=t.classList;r.contains(o)&&(r.remove(o),r.add(e.lazyBackgroundLoaded||"lazy-bg-loaded"))},v=e=>{for(let t in s)e.addEventListener(t,s[t].listener||s[t],s[t].options||void 0);m.observe(e)},f=e=>{d.forEach(t=>{t in e.dataset&&r.requestAnimationFrame(()=>{e[t]=e.dataset[t]})})};let g=u();if(/baidu|(?:google|bing|yandex|duckduck)bot/i.test(navigator.userAgent))for(let e in g)b(g[e]);else if(l in r&&l+"Entry"in r){var m=new r[l]((e,o)=>{e.forEach(e=>{if(e.isIntersecting||e.intersectionRatio){const s=e.target;a in r&&n?r[a](()=>{b(s)},{timeout:n}):b(s),s.classList.remove(t),o.unobserve(s),(g=g.filter(e=>e!=s)).length||i||m.disconnect()}})},{rootMargin:("threshold"in e?e.threshold:200)+"px 0%"});for(let e in g)v(g[e]);i&&new MutationObserver(()=>{u().forEach(e=>{g.indexOf(e)<0&&(g.push(e),v(e))})}).observe(u(e.observeRootSelector||"body")[0],e.mutationObserverOptions||{childList:!0,subtree:!0})}}
1+
export default function(e){var o=(e=e||{}).lazyClass||"lazy",r=e.lazyBackgroundClass||"lazy-bg",a="idleLoadTimeout"in e?e.idleLoadTimeout:200,t=e.observeChanges||!1,i=e.events||{},n=window,s="requestIdleCallback",d="IntersectionObserver",l=["srcset","src","poster"],c=[],v=(e,a)=>c.slice.call((a||document).querySelectorAll(e||"img."+o+",video."+o+",iframe."+o+",."+r)),u=o=>{var a,t,i=o.parentNode;for(var n in"PICTURE"==i.nodeName&&(t=i),"VIDEO"==o.nodeName&&(t=o),a=v("source",t))f(a[n]);f(o),o.autoplay&&o.load();var s=o.classList;s.contains(r)&&(s.remove(r),s.add(e.lazyBackgroundLoaded||"lazy-bg-loaded"))},b=e=>{for(var o in i)e.addEventListener(o,i[o].listener||i[o],i[o].options||void 0);h.observe(e)},f=e=>{l.forEach(o=>{o in e.dataset&&n.requestAnimationFrame(()=>{e[o]=e.dataset[o]})})},g=v();if(/baidu|(?:google|bing|yandex|duckduck)bot/i.test(navigator.userAgent))for(var m in g)u(g[m]);else if(d in n&&d+"Entry"in n){var h=new n[d]((e,r)=>{e.forEach(e=>{if(e.isIntersecting||e.intersectionRatio){var i=e.target;s in n&&a?n[s](()=>{u(i)},{timeout:a}):u(i),i.classList.remove(o),r.unobserve(i),(g=g.filter(e=>e!=i)).length||t||h.disconnect()}})},{rootMargin:("threshold"in e?e.threshold:200)+"px 0%"});for(var y in g)b(g[y]);t&&new MutationObserver(()=>{v().forEach(e=>{g.indexOf(e)<0&&(g.push(e),b(e))})}).observe(v(e.observeRootSelector||"body")[0],e.mutationObserverOptions||{childList:!0,subtree:!0})}}

0 commit comments

Comments
 (0)