Socket
Socket
Sign inDemoInstall

embla-carousel-autoplay

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embla-carousel-autoplay - npm Package Compare versions

Comparing version 8.0.0-rc14 to 8.0.0-rc15

cjs/components/Autoplay.d.ts

7

components/Autoplay.d.ts

@@ -8,2 +8,8 @@ import { OptionsType } from './Options';

}
declare module 'embla-carousel/components/EventHandler' {
interface EmblaEventListType {
autoplayPlay: 'autoplay:play';
autoplayStop: 'autoplay:stop';
}
}
export type AutoplayType = CreatePluginType<{

@@ -13,2 +19,3 @@ play: (jump?: boolean) => void;

reset: () => void;
isPlaying: () => boolean;
}, OptionsType>;

@@ -15,0 +22,0 @@ export type AutoplayOptionsType = AutoplayType['options'];

1

components/Options.d.ts

@@ -6,2 +6,3 @@ import { CreateOptionsType } from 'embla-carousel/components/Options';

playOnInit: boolean;
stopOnFocusIn: boolean;
stopOnInteraction: boolean;

@@ -8,0 +9,0 @@ stopOnMouseEnter: boolean;

2

embla-carousel-autoplay.umd.js

@@ -1,1 +0,1 @@

!function(n,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselAutoplay=o()}(this,(function(){"use strict";const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function o(t={}){let e,i,s,r=0,a=!1;function p(){i.off("pointerDown",s),e.stopOnInteraction||i.off("pointerUp",u),d(),r=0}function l(n){d(),void 0!==n&&(a=n),r=window.setTimeout(c,e.delay)}function d(){r&&window.clearTimeout(r)}function u(){r&&(d(),l())}function c(){const{index:n}=i.internalEngine(),o=i.scrollSnapList().length-1;if(e.stopOnLastSnap&&n.get()===o)return p();i.canScrollNext()?i.scrollNext(a):i.scrollTo(0,a),l()}return{name:"autoplay",options:t,init:function(r,c){i=r;const{mergeOptions:f,optionsAtMedia:y}=c,O=f(n,o.globalOptions),m=f(O,t);e=y(m),a=e.jump,s=e.stopOnInteraction?p:d;const{eventStore:g,ownerDocument:b,ownerWindow:w}=i.internalEngine(),h=i.rootNode(),v=e.rootNode&&e.rootNode(h)||h;i.on("pointerDown",s),e.stopOnInteraction||i.on("pointerUp",u),e.stopOnMouseEnter&&(g.add(v,"mouseenter",s),e.stopOnInteraction||g.add(v,"mouseleave",u)),g.add(b,"visibilitychange",(()=>{if("hidden"===b.visibilityState)return d();u()})),g.add(w,"pagehide",(n=>{n.persisted&&d()})),e.playOnInit&&l()},destroy:p,play:l,stop:d,reset:u}}return o.globalOptions=void 0,o}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselAutoplay=t()}(this,(function(){"use strict";const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function t(o={}){let e,i,r,a=!1,s=!1,l=!1,p=0,c=0;function u(){if(r)return;a||i.emit("autoplay:play");const{ownerWindow:n}=i.internalEngine();n.clearInterval(c),c=n.setInterval(y,e.delay),a=!0}function d(){if(r)return;a&&i.emit("autoplay:stop");const{ownerWindow:n}=i.internalEngine();n.clearInterval(c),c=0,a=!1}function f(n){void 0!==n&&(l=n),u()}function y(){p=requestAnimationFrame((()=>{const{index:n}=i.internalEngine(),t=n.clone().add(1).get(),o=i.scrollSnapList().length-1;e.stopOnLastSnap&&t===o&&d(),i.canScrollNext()?i.scrollNext(l):i.scrollTo(0,l)}))}return{name:"autoplay",options:o,init:function(p,c){if(i=p,i.scrollSnapList().length<=1)return;const{mergeOptions:f,optionsAtMedia:y}=c,m=f(n,t.globalOptions),O=f(m,o);e=y(O),l=e.jump,r=!1;const{eventStore:g,ownerDocument:I}=i.internalEngine(),v=i.rootNode(),b=e.rootNode&&e.rootNode(v)||v;i.on("pointerDown",d),e.stopOnInteraction||i.on("pointerUp",u),e.stopOnMouseEnter&&(g.add(b,"mouseenter",d),e.stopOnInteraction||g.add(b,"mouseleave",u)),e.stopOnFocusIn&&(g.add(b,"focusin",d),e.stopOnInteraction||g.add(b,"focusout",u)),g.add(I,"visibilitychange",(()=>{if("hidden"===I.visibilityState)return s=a,d();s&&u()})),e.playOnInit&&i.on("init",u).on("reInit",u)},destroy:function(){r=!0,a=!1,i.off("init",u).off("reInit",u),i.off("pointerDown",d),e.stopOnInteraction||i.off("pointerUp",u),d(),cancelAnimationFrame(p),p=0},play:f,stop:function(){a&&d()},reset:function(){a&&f()},isPlaying:function(){return a}}}return t.globalOptions=void 0,t}));
export { AutoplayType, AutoplayOptionsType } from './components/Autoplay';
export { default } from './components/Autoplay';
{
"name": "embla-carousel-autoplay",
"version": "8.0.0-rc14",
"version": "8.0.0-rc15",
"author": "David Jerleke",

@@ -36,26 +36,42 @@ "description": "An autoplay plugin for Embla Carousel",

"components/**/*",
"index.d.ts"
"index.d.ts",
"esm/**/*",
"cjs/**/*"
],
"scripts": {
"test": "echo \"Info: no tests specified\" && exit 0",
"build": "rollup -c",
"start": "rollup -c --watch",
"build": "rollup --bundleConfigAsCjs -c",
"start": "rollup --bundleConfigAsCjs -c --watch",
"eslint:report": "eslint \"src/**/*.{js,tsx,ts}\""
},
"devDependencies": {
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"@types/jest": "^29.5.6",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.5.0",
"prettier": "2.5.1",
"rollup": "^2.68.0",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5"
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "2.8.8",
"rollup": "^4.1.5",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
"peerDependencies": {
"embla-carousel": "8.0.0-rc14"
"embla-carousel": "8.0.0-rc15"
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/embla-carousel-autoplay.esm.js"
},
"require": {
"types": "./cjs/index.d.ts",
"default": "./cjs/embla-carousel-autoplay.cjs.js"
}
}
}
}

@@ -68,2 +68,3 @@ <br />

<img src="https://www.embla-carousel.com/vue-logo.svg" width="40" height="40" />
</a>
&nbsp;

@@ -86,26 +87,47 @@ <a href="https://www.embla-carousel.com/get-started/svelte/">

<p align="center">
<a href="https://github.com/nikrowell"><img src="https://avatars2.githubusercontent.com/u/260039?s=120&v=4" title="nikrowell" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/michaelrambeau"><img src="https://avatars0.githubusercontent.com/u/5546996?s=120&v=4" title="michaelrambeau" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/ehellman"><img src="https://avatars3.githubusercontent.com/u/586152?s=120&v=4" title="ehellman" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/afilp"><img src="https://avatars0.githubusercontent.com/u/7850073?s=120&v=4" title="afilp" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/mrksmts"><img src="https://avatars1.githubusercontent.com/u/437794?s=120&v=4" title="mrksmts" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/SLMNBJ"><img src="https://avatars2.githubusercontent.com/u/30017004?s=120&v=4" title="SLMNBJ" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/readeral"><img src="https://avatars0.githubusercontent.com/u/15904136?s=120&v=4" title="readeral" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/romellem"><img src="https://avatars2.githubusercontent.com/u/8504000?s=120&v=4" title="romellem" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/niubsta"><img src="https://avatars0.githubusercontent.com/u/270320?s=120&v=4" title="niubsta" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/allen-garvey"><img src="https://avatars1.githubusercontent.com/u/9314727?s=120s&v=4" title="allen-garvey" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/sedlukha"><img src="https://avatars3.githubusercontent.com/u/14075940?s=120&v=4" title="sedlukha" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/wopian"><img src="https://avatars3.githubusercontent.com/u/3440094?s=120&v=4" title="wopian" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/msallent"><img src="https://avatars3.githubusercontent.com/u/8879212?s=120&v=4" title="msallent" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/omarkhatibco"><img src="https://avatars1.githubusercontent.com/u/9054278?s=120&v=4" title="omarkhatibco" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/ppromerojr"><img src="https://avatars1.githubusercontent.com/u/15343254?s=120&v=4" title="ppromerojr" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/openscript"><img src="https://avatars3.githubusercontent.com/u/1105080?s=120&v=4" title="openscript" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/pipisasa"><img src="https://avatars.githubusercontent.com/u/54534600?s=120&v=4" title="pipisasa" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/silllli"><img src="https://avatars.githubusercontent.com/u/9334305?s=120&v=4" title="silllli" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/JoshuaCrewe"><img src="https://avatars.githubusercontent.com/u/12238901?s=120&v=4" title="JoshuaCrewe" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/th-km"><img src="https://avatars.githubusercontent.com/u/35410212?s=120&v=4" title="th-km" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/rojadesign"><img src="https://avatars.githubusercontent.com/u/35687281?s=120&v=4" title="th-km"" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/SaizFerri"><img src="https://avatars.githubusercontent.com/u/19834971?s=120&v=4" title="SaizFerri" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/horseeyephil"><img src="https://avatars.githubusercontent.com/u/32337092?s=120&v=4" title="horseeyephil" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/hamidrezahanafi"><img src="https://avatars.githubusercontent.com/u/91487491?s=120&v=4" title="hamidrezahanafi" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/davidjerleke">
<img src="https://avatars2.githubusercontent.com/u/11529148?s=120&v=4" title="davidjerleke" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/Ronit-gurjar">
<img src="https://avatars2.githubusercontent.com/u/92150685?s=120&v=4" title="Ronit-gurjar" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/xiel">
<img src="https://avatars2.githubusercontent.com/u/615522?s=120&v=4" title="xiel" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/javiergonzalezGenially">
<img src="https://avatars2.githubusercontent.com/u/78730098?s=120&v=4" title="javiergonzalezGenially" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/hamidrezahanafi">
<img src="https://avatars2.githubusercontent.com/u/91487491?s=120&v=4" title="hamidrezahanafi" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/wopian">
<img src="https://avatars2.githubusercontent.com/u/3440094?s=120&v=4" title="wopian" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/nwidynski">
<img src="https://avatars2.githubusercontent.com/u/25958801?s=120&v=4" title="nwidynski" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/openscript">
<img src="https://avatars2.githubusercontent.com/u/1105080?s=120&v=4" title="openscript" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/th-km">
<img src="https://avatars2.githubusercontent.com/u/35410212?s=120&v=4" title="th-km" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/SaizFerri">
<img src="https://avatars2.githubusercontent.com/u/19834971?s=120&v=4" title="SaizFerri" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/allen-garvey">
<img src="https://avatars2.githubusercontent.com/u/9314727?s=120&v=4" title="allen-garvey" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/sedlukha">
<img src="https://avatars2.githubusercontent.com/u/14075940?s=120&v=4" title="sedlukha" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/fcasibu">
<img src="https://avatars2.githubusercontent.com/u/75290989?s=120&v=4" title="fcasibu" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/ishaqibrahimbot">
<img src="https://avatars2.githubusercontent.com/u/74908398?s=120&v=4" title="ishaqibrahimbot" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/JoshuaCrewe">
<img src="https://avatars2.githubusercontent.com/u/12238901?s=120&v=4" title="JoshuaCrewe" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/romellem">
<img src="https://avatars2.githubusercontent.com/u/8504000?s=120&v=4" title="romellem" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/nikrowell">
<img src="https://avatars2.githubusercontent.com/u/260039?s=120&v=4" title="nikrowell" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/horseeyephil">
<img src="https://avatars2.githubusercontent.com/u/32337092?s=120&v=4" title="horseeyephil" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/pipisasa">
<img src="https://avatars2.githubusercontent.com/u/54534600?s=120&v=4" title="pipisasa" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/rojadesign">
<img src="https://avatars2.githubusercontent.com/u/35687281?s=120&v=4" title="rojadesign" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/anzbert">
<img src="https://avatars2.githubusercontent.com/u/38823700?s=120&v=4" title="anzbert" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/silllli">
<img src="https://avatars2.githubusercontent.com/u/9334305?s=120&v=4" title="silllli" width="50" height="50" style="max-width: 100%" />
</a>
</p>

@@ -112,0 +134,0 @@ </div>

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