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

embla-carousel-autoplay

Package Overview
Dependencies
Maintainers
1
Versions
63
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 6.1.1 to 6.2.0

3

components/index.d.ts

@@ -9,2 +9,5 @@ import { AutoplayOptionsType, OptionsType } from './Options';

declare function Autoplay(userOptions?: AutoplayOptionsType, userNode?: (emblaRoot: HTMLElement) => HTMLElement | null): AutoplayType;
declare namespace Autoplay {
var globalOptions: Partial<OptionsType> | undefined;
}
export default Autoplay;

4

embla-carousel-autoplay.esm.js

@@ -10,3 +10,3 @@ var defaultOptions = {

function Autoplay(userOptions, userNode) {
var options = Object.assign({}, defaultOptions, userOptions);
var options = Object.assign({}, defaultOptions, Autoplay.globalOptions, userOptions);
var playOnInit = options.playOnInit,

@@ -93,3 +93,5 @@ stopOnInteraction = options.stopOnInteraction,

Autoplay.globalOptions = undefined;
export default Autoplay;
//# sourceMappingURL=embla-carousel-autoplay.esm.js.map

@@ -12,3 +12,3 @@ 'use strict';

function Autoplay(userOptions, userNode) {
var options = Object.assign({}, defaultOptions, userOptions);
var options = Object.assign({}, defaultOptions, Autoplay.globalOptions, userOptions);
var playOnInit = options.playOnInit,

@@ -95,3 +95,5 @@ stopOnInteraction = options.stopOnInteraction,

Autoplay.globalOptions = undefined;
module.exports = Autoplay;
//# sourceMappingURL=embla-carousel-autoplay.js.map

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

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselAutoplay=e()}(this,(function(){"use strict";var n={delay:4e3,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1};return function(e,t){var o,i=Object.assign({},n,e),a=i.playOnInit,r=i.stopOnInteraction,s=i.stopOnMouseEnter,d=i.stopOnLastSnap,u=i.delay,p=r?l:y,f=0;function l(){o.off("pointerDown",p),r||o.off("pointerUp",m),y(),f=0}function c(){y(),f=window.setTimeout(O,u)}function y(){f&&window.clearTimeout(f)}function m(){f&&(y(),c())}function O(){var n=o.internalEngine().index;if(d&&n.get()===n.max)return l();o.canScrollNext()?o.scrollNext():o.scrollTo(0),c()}return{name:"Autoplay",options:i,init:function(n){var e=(o=n).internalEngine().eventStore,i=o.rootNode(),d=t&&t(i)||i;o.on("pointerDown",p),r||o.on("pointerUp",m),s&&(e.add(d,"mouseenter",p),r||e.add(d,"mouseleave",m)),e.add(document,"visibilitychange",(function(){if("hidden"===document.visibilityState)return y();m()})),e.add(window,"pagehide",(function(n){n.persisted&&y()})),a&&c()},destroy:l,play:c,stop:y,reset:m}}}));
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselAutoplay=e()}(this,(function(){"use strict";var n={delay:4e3,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1};function e(t,o){var i,a=Object.assign({},n,e.globalOptions,t),r=a.playOnInit,s=a.stopOnInteraction,d=a.stopOnMouseEnter,l=a.stopOnLastSnap,u=a.delay,p=s?c:m,f=0;function c(){i.off("pointerDown",p),s||i.off("pointerUp",O),m(),f=0}function y(){m(),f=window.setTimeout(g,u)}function m(){f&&window.clearTimeout(f)}function O(){f&&(m(),y())}function g(){var n=i.internalEngine().index;if(l&&n.get()===n.max)return c();i.canScrollNext()?i.scrollNext():i.scrollTo(0),y()}return{name:"Autoplay",options:a,init:function(n){var e=(i=n).internalEngine().eventStore,t=i.rootNode(),a=o&&o(t)||t;i.on("pointerDown",p),s||i.on("pointerUp",O),d&&(e.add(a,"mouseenter",p),s||e.add(a,"mouseleave",O)),e.add(document,"visibilitychange",(function(){if("hidden"===document.visibilityState)return m();O()})),e.add(window,"pagehide",(function(n){n.persisted&&m()})),r&&y()},destroy:c,play:y,stop:m,reset:O}}return e.globalOptions=void 0,e}));
{
"name": "embla-carousel-autoplay",
"version": "6.1.1",
"version": "6.2.0",
"author": "David Cetinkaya",

@@ -57,4 +57,4 @@ "description": "An autoplay plugin for Embla Carousel",

"peerDependencies": {
"embla-carousel": "6.1.1"
"embla-carousel": "6.2.0"
}
}

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