Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+27
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;
+14
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;
+4
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;