Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

233
node_modules/embla-carousel-autoplay/README.md generated vendored Normal file
View File

@@ -0,0 +1,233 @@
<br />
<div align="center">
<p align="center">
<a href="https://www.embla-carousel.com/"><img width="100" height="100" src="https://www.embla-carousel.com/embla-logo.svg" alt="Embla Carousel">
</a>
</p>
<p align="center">
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/npm/l/embla-carousel?color=%238ab4f8"></a>
<a href="https://www.npmjs.com/package/embla-carousel-autoplay"><img src="https://img.shields.io/npm/v/embla-carousel-autoplay.svg?color=%23c1a8e2"></a>
<a href="https://github.com/davidjerleke/embla-carousel/actions?query=workflow%3A%22Continuous+Integration%22"><img src="https://img.shields.io/github/actions/workflow/status/davidjerleke/embla-carousel/cd.yml?color=%238ab4f8"></a>
<a href="https://prettier.io"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?color=%23c1a8e2"></a>
<a href="https://bundlephobia.com/result?p=embla-carousel-autoplay@latest"><img src="https://img.shields.io/bundlephobia/minzip/embla-carousel-autoplay?color=%238ab4f8&label=gzip%20size">
</a>
</p>
<strong>
<h2 align="center">Embla Carousel Autoplay</h2>
</strong>
<p align="center">
<strong>Embla Carousel</strong> is a bare bones carousel library with great fluid motion and awesome swipe precision. It's library agnostic, dependency free and 100% open source.
</p>
<br>
<p align="center">
<strong>
<code>&nbsp;<a href="https://www.embla-carousel.com/examples/predefined/">Examples</a>&nbsp;</code>
</strong>
</p>
<p align="center">
<strong>
<code>&nbsp;<a href="https://www.embla-carousel.com/examples/generator/">Generator</a>&nbsp;</code>
</strong>
</p>
<p align="center">
<strong>
<code>&nbsp;<a href="https://www.embla-carousel.com/get-started/#choose-installation-type">Installation</a>&nbsp;</code>
</strong>
</p>
</div>
<br>
<div align="center">
<strong>
<h2 align="center">Ready for</h2>
</strong>
<p align="center">
<a href="https://www.embla-carousel.com/get-started/module/">
<img src="https://www.embla-carousel.com/javascript-logo.svg" width="40" height="40" />
</a>
<a href="https://www.embla-carousel.com/get-started/module/">
<img src="https://www.embla-carousel.com/typescript-logo.svg" width="40" height="40" />
</a>
<a href="https://www.embla-carousel.com/get-started/react/">
<img src="https://www.embla-carousel.com/react-logo.svg" width="40" height="40" />
</a>
<a href="https://www.embla-carousel.com/get-started/vue/">
<img src="https://www.embla-carousel.com/vue-logo.svg" width="40" height="40" />
</a>
<a href="https://www.embla-carousel.com/get-started/svelte/">
<img src="https://www.embla-carousel.com/svelte-logo.svg" width="40" height="40" />
</a>
<a href="https://www.embla-carousel.com/get-started/solid/">
<img src="https://www.embla-carousel.com/solid-logo.svg" width="40" height="40" />
</a>
<a href="https://github.com/donaldxdonald/embla-carousel-angular">
<img src="https://www.embla-carousel.com/angular-logo.svg" width="40" height="40" />
</a>
</p>
</div>
<br>
<div align="center">
<strong>
<h2 align="center">Contributors</h2>
</strong>
<p align="center">
Thank you to all contributors for making <a href="https://www.embla-carousel.com/">Embla Carousel</a> awesome! <a href="https://github.com/davidjerleke/embla-carousel/blob/master/CONTRIBUTING.md">Contributions</a> are welcome.
</p>
<p align="center">
<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/zaaakher">
<img src="https://avatars2.githubusercontent.com/u/46135573?s=120&v=4" title="zaaakher" 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/meirroth">
<img src="https://avatars2.githubusercontent.com/u/12494197?s=120&v=4" title="meirroth" 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/negezor">
<img src="https://avatars2.githubusercontent.com/u/9392723?s=120&v=4" title="negezor" 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/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/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/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/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/ranno-lauri">
<img src="https://avatars2.githubusercontent.com/u/87007115?s=120&v=4" title="ranno-lauri" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/ruijdacd">
<img src="https://avatars2.githubusercontent.com/u/9107610?s=120&v=4" title="ruijdacd" 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/sadeghbarati">
<img src="https://avatars2.githubusercontent.com/u/17789047?s=120&v=4" title="sadeghbarati" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/S-Shingler">
<img src="https://avatars2.githubusercontent.com/u/48463809?s=120&v=4" title="S-Shingler" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/Yonom">
<img src="https://avatars2.githubusercontent.com/u/1394504?s=120&v=4" title="Yonom" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/smultar">
<img src="https://avatars2.githubusercontent.com/u/6223536?s=120&v=4" title="smultar" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/dev-suraj-kumar">
<img src="https://avatars2.githubusercontent.com/u/184739775?s=120&v=4" title="dev-suraj-kumar" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/Matoseb">
<img src="https://avatars2.githubusercontent.com/u/24431250?s=120&v=4" title="Matoseb" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/tlo-johnson">
<img src="https://avatars2.githubusercontent.com/u/8763144?s=120&v=4" title="tlo-johnson" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/yasuhiro-yamamoto">
<img src="https://avatars2.githubusercontent.com/u/25109330?s=120&v=4" title="yasuhiro-yamamoto" 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/sarussss">
<img src="https://avatars2.githubusercontent.com/u/15656996?s=120&v=4" title="sarussss" 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><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/mujahidfa">
<img src="https://avatars2.githubusercontent.com/u/17759705?s=120&v=4" title="mujahidfa" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/Mitch-At-Work">
<img src="https://avatars2.githubusercontent.com/u/99835933?s=120&v=4" title="Mitch-At-Work" 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/junlarsen">
<img src="https://avatars2.githubusercontent.com/u/42585241?s=120&v=4" title="junlarsen" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/LucasMariniFalbo">
<img src="https://avatars2.githubusercontent.com/u/9245477?s=120&v=4" title="LucasMariniFalbo" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/LiamMartens">
<img src="https://avatars2.githubusercontent.com/u/5265324?s=120&v=4" title="LiamMartens" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/S1r-Lanzelot">
<img src="https://avatars2.githubusercontent.com/u/4487160?s=120&v=4" title="S1r-Lanzelot" 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/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/cundd">
<img src="https://avatars2.githubusercontent.com/u/743122?s=120&v=4" title="cundd" 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/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/lesha1201">
<img src="https://avatars2.githubusercontent.com/u/10157660?s=120&v=4" title="lesha1201" 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>
</p>
</div>
<br>
<div align="center">
<strong>
<h2 align="center">Special Thanks</h2>
</strong>
<p align="center">
<sup>
<a href="https://github.com/gunnarx2">gunnarx2</a> - React wrapper <a href="https://www.embla-carousel.com/get-started/react/">useEmblaCarousel</a>.
</sup>
<br>
<sup>
<a href="https://github.com/LiamMartens">LiamMartens</a> - Solid wrapper <a href="https://www.embla-carousel.com/get-started/solid/">createEmblaCarousel</a>.
</sup>
<br>
<sup>
<a href="https://github.com/donaldxdonald">donaldxdonald</a>, <a href="https://github.com/zip-fa">zip-fa</a>, <a href="https://github.com/JeanMeche">JeanMeche</a> - Angular wrapper <a href="https://github.com/donaldxdonald/embla-carousel-angular?tab=readme-ov-file#installation">EmblaCarouselDirective</a>.
</sup>
<br>
<sup>
<a href="https://github.com/xiel">xiel</a> - Plugin <a href="https://github.com/xiel/embla-carousel-wheel-gestures">Embla Carousel Wheel Gestures</a>.
</sup>
<br>
<sup>
<a href="https://github.com/zaaakher">zaaakher</a> - Contributing <a href="https://github.com/davidjerleke/embla-carousel/blob/master/CONTRIBUTING.md">guidelines</a>.
</sup>
<br>
<sup>
<a href="https://github.com/sarussss">sarussss</a> - Answering questions.
</sup>
</p>
</div>
<br>
<h2 align="center">Open Source</h2>
<p align="center">
Embla is <a href="https://github.com/davidjerleke/embla-carousel/blob/master/LICENSE">MIT licensed</a> 💖.<br><br>
<sup>Embla Carousel - Copyright © 2019-present.</sup><br />
<sup>Package created by David Jerleke.</sup>
</p>
<p align="center">
<strong>· · ·</strong>
</p>
<p align="center">
Thanks <a href="https://www.browserstack.com">BrowserStack</a>.
</p>
<p align="center">
<a href="https://www.browserstack.com">
<img src="https://www.embla-carousel.com/browserstack-logo.svg" width="45" height="45" />
</a>
</p>

View File

@@ -0,0 +1,27 @@
import { OptionsType } from './Options';
import { CreatePluginType } from 'embla-carousel';
declare module 'embla-carousel' {
interface EmblaPluginsType {
autoplay: AutoplayType;
}
interface EmblaEventListType {
autoplayPlay: 'autoplay:play';
autoplayStop: 'autoplay:stop';
autoplaySelect: 'autoplay:select';
autoplayTimerSet: 'autoplay:timerset';
autoplayTimerStopped: 'autoplay:timerstopped';
}
}
export type AutoplayType = CreatePluginType<{
play: (jump?: boolean) => void;
stop: () => void;
reset: () => void;
isPlaying: () => boolean;
timeUntilNext: () => number | null;
}, OptionsType>;
export type AutoplayOptionsType = AutoplayType['options'];
declare function Autoplay(userOptions?: AutoplayOptionsType): AutoplayType;
declare namespace Autoplay {
let globalOptions: AutoplayOptionsType | undefined;
}
export default Autoplay;

View File

@@ -0,0 +1,14 @@
import { CreateOptionsType, EmblaCarouselType } from 'embla-carousel';
export type DelayOptionType = number | ((scrollSnaps: number[], emblaApi: EmblaCarouselType) => number[]);
export type RootNodeType = null | ((emblaRoot: HTMLElement) => HTMLElement | null);
export type OptionsType = CreateOptionsType<{
delay: DelayOptionType;
jump: boolean;
playOnInit: boolean;
stopOnFocusIn: boolean;
stopOnInteraction: boolean;
stopOnMouseEnter: boolean;
stopOnLastSnap: boolean;
rootNode: RootNodeType;
}>;
export declare const defaultOptions: OptionsType;

View File

@@ -0,0 +1,4 @@
import { EmblaCarouselType } from 'embla-carousel/components/EmblaCarousel';
import { DelayOptionType, RootNodeType } from './Options';
export declare function normalizeDelay(emblaApi: EmblaCarouselType, delay: DelayOptionType): number[];
export declare function getAutoplayRootNode(emblaApi: EmblaCarouselType, rootNode: RootNodeType): HTMLElement;

View File

@@ -0,0 +1,197 @@
'use strict';
const defaultOptions = {
active: true,
breakpoints: {},
delay: 4000,
jump: false,
playOnInit: true,
stopOnFocusIn: true,
stopOnInteraction: true,
stopOnMouseEnter: false,
stopOnLastSnap: false,
rootNode: null
};
function normalizeDelay(emblaApi, delay) {
const scrollSnaps = emblaApi.scrollSnapList();
if (typeof delay === 'number') {
return scrollSnaps.map(() => delay);
}
return delay(scrollSnaps, emblaApi);
}
function getAutoplayRootNode(emblaApi, rootNode) {
const emblaRootNode = emblaApi.rootNode();
return rootNode && rootNode(emblaRootNode) || emblaRootNode;
}
function Autoplay(userOptions = {}) {
let options;
let emblaApi;
let destroyed;
let delay;
let timerStartTime = null;
let timerId = 0;
let autoplayActive = false;
let mouseIsOver = false;
let playOnDocumentVisible = false;
let jump = false;
function init(emblaApiInstance, optionsHandler) {
emblaApi = emblaApiInstance;
const {
mergeOptions,
optionsAtMedia
} = optionsHandler;
const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions);
const allOptions = mergeOptions(optionsBase, userOptions);
options = optionsAtMedia(allOptions);
if (emblaApi.scrollSnapList().length <= 1) return;
jump = options.jump;
destroyed = false;
delay = normalizeDelay(emblaApi, options.delay);
const {
eventStore,
ownerDocument
} = emblaApi.internalEngine();
const isDraggable = !!emblaApi.internalEngine().options.watchDrag;
const root = getAutoplayRootNode(emblaApi, options.rootNode);
eventStore.add(ownerDocument, 'visibilitychange', visibilityChange);
if (isDraggable) {
emblaApi.on('pointerDown', pointerDown);
}
if (isDraggable && !options.stopOnInteraction) {
emblaApi.on('pointerUp', pointerUp);
}
if (options.stopOnMouseEnter) {
eventStore.add(root, 'mouseenter', mouseEnter);
}
if (options.stopOnMouseEnter && !options.stopOnInteraction) {
eventStore.add(root, 'mouseleave', mouseLeave);
}
if (options.stopOnFocusIn) {
emblaApi.on('slideFocusStart', stopAutoplay);
}
if (options.stopOnFocusIn && !options.stopOnInteraction) {
eventStore.add(emblaApi.containerNode(), 'focusout', startAutoplay);
}
if (options.playOnInit) startAutoplay();
}
function destroy() {
emblaApi.off('pointerDown', pointerDown).off('pointerUp', pointerUp).off('slideFocusStart', stopAutoplay);
stopAutoplay();
destroyed = true;
autoplayActive = false;
}
function setTimer() {
const {
ownerWindow
} = emblaApi.internalEngine();
ownerWindow.clearTimeout(timerId);
timerId = ownerWindow.setTimeout(next, delay[emblaApi.selectedScrollSnap()]);
timerStartTime = new Date().getTime();
emblaApi.emit('autoplay:timerset');
}
function clearTimer() {
const {
ownerWindow
} = emblaApi.internalEngine();
ownerWindow.clearTimeout(timerId);
timerId = 0;
timerStartTime = null;
emblaApi.emit('autoplay:timerstopped');
}
function startAutoplay() {
if (destroyed) return;
if (documentIsHidden()) {
playOnDocumentVisible = true;
return;
}
if (!autoplayActive) emblaApi.emit('autoplay:play');
setTimer();
autoplayActive = true;
}
function stopAutoplay() {
if (destroyed) return;
if (autoplayActive) emblaApi.emit('autoplay:stop');
clearTimer();
autoplayActive = false;
}
function visibilityChange() {
if (documentIsHidden()) {
playOnDocumentVisible = autoplayActive;
return stopAutoplay();
}
if (playOnDocumentVisible) startAutoplay();
}
function documentIsHidden() {
const {
ownerDocument
} = emblaApi.internalEngine();
return ownerDocument.visibilityState === 'hidden';
}
function pointerDown() {
if (!mouseIsOver) stopAutoplay();
}
function pointerUp() {
if (!mouseIsOver) startAutoplay();
}
function mouseEnter() {
mouseIsOver = true;
stopAutoplay();
}
function mouseLeave() {
mouseIsOver = false;
startAutoplay();
}
function play(jumpOverride) {
if (typeof jumpOverride !== 'undefined') jump = jumpOverride;
startAutoplay();
}
function stop() {
if (autoplayActive) stopAutoplay();
}
function reset() {
if (autoplayActive) startAutoplay();
}
function isPlaying() {
return autoplayActive;
}
function next() {
const {
index
} = emblaApi.internalEngine();
const nextIndex = index.clone().add(1).get();
const lastIndex = emblaApi.scrollSnapList().length - 1;
const kill = options.stopOnLastSnap && nextIndex === lastIndex;
if (emblaApi.canScrollNext()) {
emblaApi.scrollNext(jump);
} else {
emblaApi.scrollTo(0, jump);
}
emblaApi.emit('autoplay:select');
if (kill) return stopAutoplay();
startAutoplay();
}
function timeUntilNext() {
if (!timerStartTime) return null;
const currentDelay = delay[emblaApi.selectedScrollSnap()];
const timePastSinceStart = new Date().getTime() - timerStartTime;
return currentDelay - timePastSinceStart;
}
const self = {
name: 'autoplay',
options: userOptions,
init,
destroy,
play,
stop,
reset,
isPlaying,
timeUntilNext
};
return self;
}
Autoplay.globalOptions = undefined;
module.exports = Autoplay;
//# sourceMappingURL=embla-carousel-autoplay.cjs.js.map

File diff suppressed because one or more lines are too long

2
node_modules/embla-carousel-autoplay/cjs/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { AutoplayType, AutoplayOptionsType } from './components/Autoplay';
export { default } from './components/Autoplay';

55
node_modules/embla-carousel-autoplay/cjs/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "embla-carousel-autoplay",
"version": "8.6.0",
"author": "David Jerleke",
"description": "An autoplay plugin for Embla Carousel",
"repository": {
"type": "git",
"url": "git+https://github.com/davidjerleke/embla-carousel"
},
"bugs": {
"url": "https://github.com/davidjerleke/embla-carousel/issues"
},
"homepage": "https://www.embla-carousel.com",
"license": "MIT",
"keywords": [
"slider",
"carousel",
"slideshow",
"gallery",
"lightweight",
"touch",
"javascript",
"typescript",
"react",
"vue",
"svelte",
"solid"
],
"types": "index.d.ts",
"sideEffects": false,
"files": [
"embla-carousel-autoplay*",
"components/**/*",
"index.d.ts"
],
"devDependencies": {
"@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": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "2.8.8",
"rollup": "^4.22.4",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
"peerDependencies": {
"embla-carousel": "8.6.0"
},
"main": "embla-carousel-autoplay.cjs.js",
"type": "commonjs"
}

View File

@@ -0,0 +1,27 @@
import { OptionsType } from './Options';
import { CreatePluginType } from 'embla-carousel';
declare module 'embla-carousel' {
interface EmblaPluginsType {
autoplay: AutoplayType;
}
interface EmblaEventListType {
autoplayPlay: 'autoplay:play';
autoplayStop: 'autoplay:stop';
autoplaySelect: 'autoplay:select';
autoplayTimerSet: 'autoplay:timerset';
autoplayTimerStopped: 'autoplay:timerstopped';
}
}
export type AutoplayType = CreatePluginType<{
play: (jump?: boolean) => void;
stop: () => void;
reset: () => void;
isPlaying: () => boolean;
timeUntilNext: () => number | null;
}, OptionsType>;
export type AutoplayOptionsType = AutoplayType['options'];
declare function Autoplay(userOptions?: AutoplayOptionsType): AutoplayType;
declare namespace Autoplay {
let globalOptions: AutoplayOptionsType | undefined;
}
export default Autoplay;

View File

@@ -0,0 +1,14 @@
import { CreateOptionsType, EmblaCarouselType } from 'embla-carousel';
export type DelayOptionType = number | ((scrollSnaps: number[], emblaApi: EmblaCarouselType) => number[]);
export type RootNodeType = null | ((emblaRoot: HTMLElement) => HTMLElement | null);
export type OptionsType = CreateOptionsType<{
delay: DelayOptionType;
jump: boolean;
playOnInit: boolean;
stopOnFocusIn: boolean;
stopOnInteraction: boolean;
stopOnMouseEnter: boolean;
stopOnLastSnap: boolean;
rootNode: RootNodeType;
}>;
export declare const defaultOptions: OptionsType;

View File

@@ -0,0 +1,4 @@
import { EmblaCarouselType } from 'embla-carousel/components/EmblaCarousel';
import { DelayOptionType, RootNodeType } from './Options';
export declare function normalizeDelay(emblaApi: EmblaCarouselType, delay: DelayOptionType): number[];
export declare function getAutoplayRootNode(emblaApi: EmblaCarouselType, rootNode: RootNodeType): HTMLElement;

View File

@@ -0,0 +1 @@
!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,s,l,r=null,u=0,a=!1,c=!1,p=!1,f=!1;function d(){s||(g()?p=!0:(a||i.emit("autoplay:play"),function(){const{ownerWindow:n}=i.internalEngine();n.clearTimeout(u),u=n.setTimeout(E,l[i.selectedScrollSnap()]),r=(new Date).getTime(),i.emit("autoplay:timerset")}(),a=!0))}function m(){s||(a&&i.emit("autoplay:stop"),function(){const{ownerWindow:n}=i.internalEngine();n.clearTimeout(u),u=0,r=null,i.emit("autoplay:timerstopped")}(),a=!1)}function y(){if(g())return p=a,m();p&&d()}function g(){const{ownerDocument:n}=i.internalEngine();return"hidden"===n.visibilityState}function O(){c||m()}function S(){c||d()}function w(){c=!0,m()}function b(){c=!1,d()}function E(){const{index:n}=i.internalEngine(),t=n.clone().add(1).get(),o=i.scrollSnapList().length-1,s=e.stopOnLastSnap&&t===o;if(i.canScrollNext()?i.scrollNext(f):i.scrollTo(0,f),i.emit("autoplay:select"),s)return m();d()}return{name:"autoplay",options:o,init:function(r,u){i=r;const{mergeOptions:a,optionsAtMedia:c}=u,p=a(n,t.globalOptions),g=a(p,o);if(e=c(g),i.scrollSnapList().length<=1)return;f=e.jump,s=!1,l=function(n,t){const o=n.scrollSnapList();return"number"==typeof t?o.map((()=>t)):t(o,n)}(i,e.delay);const{eventStore:E,ownerDocument:I}=i.internalEngine(),h=!!i.internalEngine().options.watchDrag,T=function(n,t){const o=n.rootNode();return t&&t(o)||o}(i,e.rootNode);E.add(I,"visibilitychange",y),h&&i.on("pointerDown",O),h&&!e.stopOnInteraction&&i.on("pointerUp",S),e.stopOnMouseEnter&&E.add(T,"mouseenter",w),e.stopOnMouseEnter&&!e.stopOnInteraction&&E.add(T,"mouseleave",b),e.stopOnFocusIn&&i.on("slideFocusStart",m),e.stopOnFocusIn&&!e.stopOnInteraction&&E.add(i.containerNode(),"focusout",d),e.playOnInit&&d()},destroy:function(){i.off("pointerDown",O).off("pointerUp",S).off("slideFocusStart",m),m(),s=!0,a=!1},play:function(n){void 0!==n&&(f=n),d()},stop:function(){a&&m()},reset:function(){a&&d()},isPlaying:function(){return a},timeUntilNext:function(){return r?l[i.selectedScrollSnap()]-((new Date).getTime()-r):null}}}return t.globalOptions=void 0,t}));

View File

@@ -0,0 +1,27 @@
import { OptionsType } from './Options.js';
import { CreatePluginType } from 'embla-carousel';
declare module 'embla-carousel' {
interface EmblaPluginsType {
autoplay: AutoplayType;
}
interface EmblaEventListType {
autoplayPlay: 'autoplay:play';
autoplayStop: 'autoplay:stop';
autoplaySelect: 'autoplay:select';
autoplayTimerSet: 'autoplay:timerset';
autoplayTimerStopped: 'autoplay:timerstopped';
}
}
export type AutoplayType = CreatePluginType<{
play: (jump?: boolean) => void;
stop: () => void;
reset: () => void;
isPlaying: () => boolean;
timeUntilNext: () => number | null;
}, OptionsType>;
export type AutoplayOptionsType = AutoplayType['options'];
declare function Autoplay(userOptions?: AutoplayOptionsType): AutoplayType;
declare namespace Autoplay {
let globalOptions: AutoplayOptionsType | undefined;
}
export default Autoplay;

View File

@@ -0,0 +1,14 @@
import { CreateOptionsType, EmblaCarouselType } from 'embla-carousel';
export type DelayOptionType = number | ((scrollSnaps: number[], emblaApi: EmblaCarouselType) => number[]);
export type RootNodeType = null | ((emblaRoot: HTMLElement) => HTMLElement | null);
export type OptionsType = CreateOptionsType<{
delay: DelayOptionType;
jump: boolean;
playOnInit: boolean;
stopOnFocusIn: boolean;
stopOnInteraction: boolean;
stopOnMouseEnter: boolean;
stopOnLastSnap: boolean;
rootNode: RootNodeType;
}>;
export declare const defaultOptions: OptionsType;

View File

@@ -0,0 +1,4 @@
import { EmblaCarouselType } from 'embla-carousel/components/EmblaCarousel';
import { DelayOptionType, RootNodeType } from './Options.js';
export declare function normalizeDelay(emblaApi: EmblaCarouselType, delay: DelayOptionType): number[];
export declare function getAutoplayRootNode(emblaApi: EmblaCarouselType, rootNode: RootNodeType): HTMLElement;

View File

@@ -0,0 +1,195 @@
const defaultOptions = {
active: true,
breakpoints: {},
delay: 4000,
jump: false,
playOnInit: true,
stopOnFocusIn: true,
stopOnInteraction: true,
stopOnMouseEnter: false,
stopOnLastSnap: false,
rootNode: null
};
function normalizeDelay(emblaApi, delay) {
const scrollSnaps = emblaApi.scrollSnapList();
if (typeof delay === 'number') {
return scrollSnaps.map(() => delay);
}
return delay(scrollSnaps, emblaApi);
}
function getAutoplayRootNode(emblaApi, rootNode) {
const emblaRootNode = emblaApi.rootNode();
return rootNode && rootNode(emblaRootNode) || emblaRootNode;
}
function Autoplay(userOptions = {}) {
let options;
let emblaApi;
let destroyed;
let delay;
let timerStartTime = null;
let timerId = 0;
let autoplayActive = false;
let mouseIsOver = false;
let playOnDocumentVisible = false;
let jump = false;
function init(emblaApiInstance, optionsHandler) {
emblaApi = emblaApiInstance;
const {
mergeOptions,
optionsAtMedia
} = optionsHandler;
const optionsBase = mergeOptions(defaultOptions, Autoplay.globalOptions);
const allOptions = mergeOptions(optionsBase, userOptions);
options = optionsAtMedia(allOptions);
if (emblaApi.scrollSnapList().length <= 1) return;
jump = options.jump;
destroyed = false;
delay = normalizeDelay(emblaApi, options.delay);
const {
eventStore,
ownerDocument
} = emblaApi.internalEngine();
const isDraggable = !!emblaApi.internalEngine().options.watchDrag;
const root = getAutoplayRootNode(emblaApi, options.rootNode);
eventStore.add(ownerDocument, 'visibilitychange', visibilityChange);
if (isDraggable) {
emblaApi.on('pointerDown', pointerDown);
}
if (isDraggable && !options.stopOnInteraction) {
emblaApi.on('pointerUp', pointerUp);
}
if (options.stopOnMouseEnter) {
eventStore.add(root, 'mouseenter', mouseEnter);
}
if (options.stopOnMouseEnter && !options.stopOnInteraction) {
eventStore.add(root, 'mouseleave', mouseLeave);
}
if (options.stopOnFocusIn) {
emblaApi.on('slideFocusStart', stopAutoplay);
}
if (options.stopOnFocusIn && !options.stopOnInteraction) {
eventStore.add(emblaApi.containerNode(), 'focusout', startAutoplay);
}
if (options.playOnInit) startAutoplay();
}
function destroy() {
emblaApi.off('pointerDown', pointerDown).off('pointerUp', pointerUp).off('slideFocusStart', stopAutoplay);
stopAutoplay();
destroyed = true;
autoplayActive = false;
}
function setTimer() {
const {
ownerWindow
} = emblaApi.internalEngine();
ownerWindow.clearTimeout(timerId);
timerId = ownerWindow.setTimeout(next, delay[emblaApi.selectedScrollSnap()]);
timerStartTime = new Date().getTime();
emblaApi.emit('autoplay:timerset');
}
function clearTimer() {
const {
ownerWindow
} = emblaApi.internalEngine();
ownerWindow.clearTimeout(timerId);
timerId = 0;
timerStartTime = null;
emblaApi.emit('autoplay:timerstopped');
}
function startAutoplay() {
if (destroyed) return;
if (documentIsHidden()) {
playOnDocumentVisible = true;
return;
}
if (!autoplayActive) emblaApi.emit('autoplay:play');
setTimer();
autoplayActive = true;
}
function stopAutoplay() {
if (destroyed) return;
if (autoplayActive) emblaApi.emit('autoplay:stop');
clearTimer();
autoplayActive = false;
}
function visibilityChange() {
if (documentIsHidden()) {
playOnDocumentVisible = autoplayActive;
return stopAutoplay();
}
if (playOnDocumentVisible) startAutoplay();
}
function documentIsHidden() {
const {
ownerDocument
} = emblaApi.internalEngine();
return ownerDocument.visibilityState === 'hidden';
}
function pointerDown() {
if (!mouseIsOver) stopAutoplay();
}
function pointerUp() {
if (!mouseIsOver) startAutoplay();
}
function mouseEnter() {
mouseIsOver = true;
stopAutoplay();
}
function mouseLeave() {
mouseIsOver = false;
startAutoplay();
}
function play(jumpOverride) {
if (typeof jumpOverride !== 'undefined') jump = jumpOverride;
startAutoplay();
}
function stop() {
if (autoplayActive) stopAutoplay();
}
function reset() {
if (autoplayActive) startAutoplay();
}
function isPlaying() {
return autoplayActive;
}
function next() {
const {
index
} = emblaApi.internalEngine();
const nextIndex = index.clone().add(1).get();
const lastIndex = emblaApi.scrollSnapList().length - 1;
const kill = options.stopOnLastSnap && nextIndex === lastIndex;
if (emblaApi.canScrollNext()) {
emblaApi.scrollNext(jump);
} else {
emblaApi.scrollTo(0, jump);
}
emblaApi.emit('autoplay:select');
if (kill) return stopAutoplay();
startAutoplay();
}
function timeUntilNext() {
if (!timerStartTime) return null;
const currentDelay = delay[emblaApi.selectedScrollSnap()];
const timePastSinceStart = new Date().getTime() - timerStartTime;
return currentDelay - timePastSinceStart;
}
const self = {
name: 'autoplay',
options: userOptions,
init,
destroy,
play,
stop,
reset,
isPlaying,
timeUntilNext
};
return self;
}
Autoplay.globalOptions = undefined;
export { Autoplay as default };
//# sourceMappingURL=embla-carousel-autoplay.esm.js.map

File diff suppressed because one or more lines are too long

2
node_modules/embla-carousel-autoplay/esm/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { AutoplayType, AutoplayOptionsType } from './components/Autoplay.js';
export { default } from './components/Autoplay.js';

55
node_modules/embla-carousel-autoplay/esm/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "embla-carousel-autoplay",
"version": "8.6.0",
"author": "David Jerleke",
"description": "An autoplay plugin for Embla Carousel",
"repository": {
"type": "git",
"url": "git+https://github.com/davidjerleke/embla-carousel"
},
"bugs": {
"url": "https://github.com/davidjerleke/embla-carousel/issues"
},
"homepage": "https://www.embla-carousel.com",
"license": "MIT",
"keywords": [
"slider",
"carousel",
"slideshow",
"gallery",
"lightweight",
"touch",
"javascript",
"typescript",
"react",
"vue",
"svelte",
"solid"
],
"types": "index.d.ts",
"sideEffects": false,
"files": [
"embla-carousel-autoplay*",
"components/**/*",
"index.d.ts"
],
"devDependencies": {
"@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": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "2.8.8",
"rollup": "^4.22.4",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
"peerDependencies": {
"embla-carousel": "8.6.0"
},
"module": "embla-carousel-autoplay.esm.js",
"type": "module"
}

2
node_modules/embla-carousel-autoplay/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { AutoplayType, AutoplayOptionsType } from './components/Autoplay';
export { default } from './components/Autoplay';

77
node_modules/embla-carousel-autoplay/package.json generated vendored Normal file
View File

@@ -0,0 +1,77 @@
{
"name": "embla-carousel-autoplay",
"version": "8.6.0",
"author": "David Jerleke",
"description": "An autoplay plugin for Embla Carousel",
"repository": {
"type": "git",
"url": "git+https://github.com/davidjerleke/embla-carousel"
},
"bugs": {
"url": "https://github.com/davidjerleke/embla-carousel/issues"
},
"homepage": "https://www.embla-carousel.com",
"license": "MIT",
"keywords": [
"slider",
"carousel",
"slideshow",
"gallery",
"lightweight",
"touch",
"javascript",
"typescript",
"react",
"vue",
"svelte",
"solid"
],
"main": "embla-carousel-autoplay.umd.js",
"unpkg": "embla-carousel-autoplay.umd.js",
"module": "./esm/embla-carousel-autoplay.esm.js",
"types": "index.d.ts",
"sideEffects": false,
"files": [
"embla-carousel-autoplay*",
"components/**/*",
"index.d.ts",
"esm/**/*",
"cjs/**/*"
],
"scripts": {
"test": "echo \"Info: no tests specified\" && exit 0",
"build": "rollup --bundleConfigAsCjs -c",
"start": "rollup --bundleConfigAsCjs -c --watch --environment BUILD:development",
"eslint:report": "eslint \"src/**/*.{js,tsx,ts}\""
},
"devDependencies": {
"@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": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "2.8.8",
"rollup": "^4.22.4",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
"peerDependencies": {
"embla-carousel": "8.6.0"
},
"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"
}
}
}
}