main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

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

@@ -0,0 +1,225 @@
<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"><img src="https://img.shields.io/npm/v/embla-carousel.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@latest"><img src="https://img.shields.io/bundlephobia/minzip/embla-carousel?color=%238ab4f8&label=gzip%20size">
</a>
</p>
<strong>
<h2 align="center">Embla Carousel</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/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/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/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/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/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/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/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/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/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,5 @@
export type AlignmentOptionType = 'start' | 'center' | 'end' | ((viewSize: number, snapSize: number, index: number) => number);
export type AlignmentType = {
measure: (n: number, index: number) => number;
};
export declare function Alignment(align: AlignmentOptionType, viewSize: number): AlignmentType;

View File

@@ -0,0 +1,13 @@
import { EngineType } from './Engine';
import { WindowType } from './utils';
export type AnimationsUpdateType = (engine: EngineType, timeStep: number) => void;
export type AnimationsRenderType = (engine: EngineType, lagOffset: number) => void;
export type AnimationsType = {
init: () => void;
destroy: () => void;
start: () => void;
stop: () => void;
update: () => void;
render: (lagOffset: number) => void;
};
export declare function Animations(ownerDocument: Document, ownerWindow: WindowType, update: (timeStep: number) => void, render: (lagOffset: number) => void): AnimationsType;

14
node_modules/embla-carousel/cjs/components/Axis.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { NodeRectType } from './NodeRects';
export type AxisOptionType = 'x' | 'y';
export type AxisDirectionOptionType = 'ltr' | 'rtl';
type AxisEdgeType = 'top' | 'right' | 'bottom' | 'left';
export type AxisType = {
scroll: AxisOptionType;
cross: AxisOptionType;
startEdge: AxisEdgeType;
endEdge: AxisEdgeType;
measureSize: (nodeRect: NodeRectType) => number;
direction: (n: number) => number;
};
export declare function Axis(axis: AxisOptionType, contentDirection: AxisDirectionOptionType): AxisType;
export {};

View File

@@ -0,0 +1,7 @@
export type CounterType = {
get: () => number;
set: (n: number) => CounterType;
add: (n: number) => CounterType;
clone: () => CounterType;
};
export declare function Counter(max: number, start: number, loop: boolean): CounterType;

View File

@@ -0,0 +1,21 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { AnimationsType } from './Animations';
import { CounterType } from './Counter';
import { DragTrackerType, PointerEventType } from './DragTracker';
import { EventHandlerType } from './EventHandler';
import { AxisType } from './Axis';
import { ScrollBodyType } from './ScrollBody';
import { ScrollTargetType } from './ScrollTarget';
import { ScrollToType } from './ScrollTo';
import { Vector1DType } from './Vector1d';
import { PercentOfViewType } from './PercentOfView';
import { WindowType } from './utils';
type DragHandlerCallbackType = (emblaApi: EmblaCarouselType, evt: PointerEventType) => boolean | void;
export type DragHandlerOptionType = boolean | DragHandlerCallbackType;
export type DragHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
pointerDown: () => boolean;
};
export declare function DragHandler(axis: AxisType, rootNode: HTMLElement, ownerDocument: Document, ownerWindow: WindowType, target: Vector1DType, dragTracker: DragTrackerType, location: Vector1DType, animation: AnimationsType, scrollTo: ScrollToType, scrollBody: ScrollBodyType, scrollTarget: ScrollTargetType, index: CounterType, eventHandler: EventHandlerType, percentOfView: PercentOfViewType, dragFree: boolean, dragThreshold: number, skipSnaps: boolean, baseFriction: number, watchDrag: DragHandlerOptionType): DragHandlerType;
export {};

View File

@@ -0,0 +1,10 @@
import { AxisOptionType, AxisType } from './Axis';
import { WindowType } from './utils';
export type PointerEventType = TouchEvent | MouseEvent;
export type DragTrackerType = {
pointerDown: (evt: PointerEventType) => number;
pointerMove: (evt: PointerEventType) => number;
pointerUp: (evt: PointerEventType) => number;
readPoint: (evt: PointerEventType, evtAxis?: AxisOptionType) => number;
};
export declare function DragTracker(axis: AxisType, ownerWindow: WindowType): DragTrackerType;

View File

@@ -0,0 +1,32 @@
import { EngineType } from './Engine';
import { EventHandlerType } from './EventHandler';
import { EmblaOptionsType } from './Options';
import { EmblaPluginsType, EmblaPluginType } from './Plugins';
export type EmblaCarouselType = {
canScrollNext: () => boolean;
canScrollPrev: () => boolean;
containerNode: () => HTMLElement;
internalEngine: () => EngineType;
destroy: () => void;
off: EventHandlerType['off'];
on: EventHandlerType['on'];
emit: EventHandlerType['emit'];
plugins: () => EmblaPluginsType;
previousScrollSnap: () => number;
reInit: (options?: EmblaOptionsType, plugins?: EmblaPluginType[]) => void;
rootNode: () => HTMLElement;
scrollNext: (jump?: boolean) => void;
scrollPrev: (jump?: boolean) => void;
scrollProgress: () => number;
scrollSnapList: () => number[];
scrollTo: (index: number, jump?: boolean) => void;
selectedScrollSnap: () => number;
slideNodes: () => HTMLElement[];
slidesInView: () => number[];
slidesNotInView: () => number[];
};
declare function EmblaCarousel(root: HTMLElement, userOptions?: EmblaOptionsType, userPlugins?: EmblaPluginType[]): EmblaCarouselType;
declare namespace EmblaCarousel {
let globalOptions: EmblaOptionsType | undefined;
}
export default EmblaCarousel;

64
node_modules/embla-carousel/cjs/components/Engine.d.ts generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import { AnimationsType } from './Animations';
import { AxisType } from './Axis';
import { CounterType } from './Counter';
import { DragHandlerType } from './DragHandler';
import { EventHandlerType } from './EventHandler';
import { EventStoreType } from './EventStore';
import { LimitType } from './Limit';
import { NodeRectType } from './NodeRects';
import { OptionsType } from './Options';
import { PercentOfViewType } from './PercentOfView';
import { ResizeHandlerType } from './ResizeHandler';
import { ScrollBodyType } from './ScrollBody';
import { ScrollBoundsType } from './ScrollBounds';
import { ScrollLooperType } from './ScrollLooper';
import { ScrollProgressType } from './ScrollProgress';
import { SlideRegistryType } from './SlideRegistry';
import { ScrollTargetType } from './ScrollTarget';
import { ScrollToType } from './ScrollTo';
import { SlideFocusType } from './SlideFocus';
import { SlideLooperType } from './SlideLooper';
import { SlidesHandlerType } from './SlidesHandler';
import { SlidesInViewType } from './SlidesInView';
import { SlidesToScrollType } from './SlidesToScroll';
import { TranslateType } from './Translate';
import { WindowType } from './utils';
import { Vector1DType } from './Vector1d';
export type EngineType = {
ownerDocument: Document;
ownerWindow: WindowType;
eventHandler: EventHandlerType;
axis: AxisType;
animation: AnimationsType;
scrollBounds: ScrollBoundsType;
scrollLooper: ScrollLooperType;
scrollProgress: ScrollProgressType;
index: CounterType;
indexPrevious: CounterType;
limit: LimitType;
location: Vector1DType;
offsetLocation: Vector1DType;
previousLocation: Vector1DType;
options: OptionsType;
percentOfView: PercentOfViewType;
scrollBody: ScrollBodyType;
dragHandler: DragHandlerType;
eventStore: EventStoreType;
slideLooper: SlideLooperType;
slidesInView: SlidesInViewType;
slidesToScroll: SlidesToScrollType;
target: Vector1DType;
translate: TranslateType;
resizeHandler: ResizeHandlerType;
slidesHandler: SlidesHandlerType;
scrollTo: ScrollToType;
scrollTarget: ScrollTargetType;
scrollSnapList: number[];
scrollSnaps: number[];
slideIndexes: number[];
slideFocus: SlideFocusType;
slideRegistry: SlideRegistryType['slideRegistry'];
containerRect: NodeRectType;
slideRects: NodeRectType[];
};
export declare function Engine(root: HTMLElement, container: HTMLElement, slides: HTMLElement[], ownerDocument: Document, ownerWindow: WindowType, options: OptionsType, eventHandler: EventHandlerType): EngineType;

View File

@@ -0,0 +1,27 @@
import { EmblaCarouselType } from './EmblaCarousel';
type CallbackType = (emblaApi: EmblaCarouselType, evt: EmblaEventType) => void;
export type EmblaEventType = EmblaEventListType[keyof EmblaEventListType];
export interface EmblaEventListType {
init: 'init';
pointerDown: 'pointerDown';
pointerUp: 'pointerUp';
slidesChanged: 'slidesChanged';
slidesInView: 'slidesInView';
scroll: 'scroll';
select: 'select';
settle: 'settle';
destroy: 'destroy';
reInit: 'reInit';
resize: 'resize';
slideFocusStart: 'slideFocusStart';
slideFocus: 'slideFocus';
}
export type EventHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
emit: (evt: EmblaEventType) => EventHandlerType;
on: (evt: EmblaEventType, cb: CallbackType) => EventHandlerType;
off: (evt: EmblaEventType, cb: CallbackType) => EventHandlerType;
clear: () => void;
};
export declare function EventHandler(): EventHandlerType;
export {};

View File

@@ -0,0 +1,9 @@
type EventNameType = keyof DocumentEventMap | keyof WindowEventMap;
type EventHandlerType = (evt: any) => void;
type EventOptionsType = boolean | AddEventListenerOptions | undefined;
export type EventStoreType = {
add: (node: EventTarget, type: EventNameType, handler: EventHandlerType, options?: EventOptionsType) => EventStoreType;
clear: () => void;
};
export declare function EventStore(): EventStoreType;
export {};

11
node_modules/embla-carousel/cjs/components/Limit.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export type LimitType = {
min: number;
max: number;
length: number;
constrain: (n: number) => number;
reachedAny: (n: number) => boolean;
reachedMax: (n: number) => boolean;
reachedMin: (n: number) => boolean;
removeOffset: (n: number) => number;
};
export declare function Limit(min?: number, max?: number): LimitType;

View File

@@ -0,0 +1,12 @@
export type NodeRectType = {
top: number;
right: number;
bottom: number;
left: number;
width: number;
height: number;
};
export type NodeRectsType = {
measure: (node: HTMLElement) => NodeRectType;
};
export declare function NodeRects(): NodeRectsType;

View File

@@ -0,0 +1,40 @@
import { AlignmentOptionType } from './Alignment';
import { AxisDirectionOptionType, AxisOptionType } from './Axis';
import { SlidesToScrollOptionType } from './SlidesToScroll';
import { ScrollContainOptionType } from './ScrollContain';
import { DragHandlerOptionType } from './DragHandler';
import { ResizeHandlerOptionType } from './ResizeHandler';
import { SlidesHandlerOptionType } from './SlidesHandler';
import { SlidesInViewOptionsType } from './SlidesInView';
import { FocusHandlerOptionType } from './SlideFocus';
export type LooseOptionsType = {
[key: string]: unknown;
};
export type CreateOptionsType<Type extends LooseOptionsType> = Type & {
active: boolean;
breakpoints: {
[key: string]: Omit<Partial<CreateOptionsType<Type>>, 'breakpoints'>;
};
};
export type OptionsType = CreateOptionsType<{
align: AlignmentOptionType;
axis: AxisOptionType;
container: string | HTMLElement | null;
slides: string | HTMLElement[] | NodeListOf<HTMLElement> | null;
containScroll: ScrollContainOptionType;
direction: AxisDirectionOptionType;
slidesToScroll: SlidesToScrollOptionType;
dragFree: boolean;
dragThreshold: number;
inViewThreshold: SlidesInViewOptionsType;
loop: boolean;
skipSnaps: boolean;
duration: number;
startIndex: number;
watchDrag: DragHandlerOptionType;
watchResize: ResizeHandlerOptionType;
watchSlides: SlidesHandlerOptionType;
watchFocus: FocusHandlerOptionType;
}>;
export declare const defaultOptions: OptionsType;
export type EmblaOptionsType = Partial<OptionsType>;

View File

@@ -0,0 +1,10 @@
import { LooseOptionsType, CreateOptionsType } from './Options';
import { WindowType } from './utils';
type OptionsType = Partial<CreateOptionsType<LooseOptionsType>>;
export type OptionsHandlerType = {
mergeOptions: <TypeA extends OptionsType, TypeB extends OptionsType>(optionsA: TypeA, optionsB?: TypeB) => TypeA;
optionsAtMedia: <Type extends OptionsType>(options: Type) => Type;
optionsMediaQueries: (optionsList: OptionsType[]) => MediaQueryList[];
};
export declare function OptionsHandler(ownerWindow: WindowType): OptionsHandlerType;
export {};

View File

@@ -0,0 +1,4 @@
export type PercentOfViewType = {
measure: (n: number) => number;
};
export declare function PercentOfView(viewSize: number): PercentOfViewType;

View File

@@ -0,0 +1,16 @@
import { CreateOptionsType, LooseOptionsType } from './Options';
import { EmblaCarouselType } from './EmblaCarousel';
import { OptionsHandlerType } from './OptionsHandler';
export type LoosePluginType = {
[key: string]: unknown;
};
export type CreatePluginType<TypeA extends LoosePluginType, TypeB extends LooseOptionsType> = TypeA & {
name: string;
options: Partial<CreateOptionsType<TypeB>>;
init: (embla: EmblaCarouselType, OptionsHandler: OptionsHandlerType) => void;
destroy: () => void;
};
export interface EmblaPluginsType {
[key: string]: CreatePluginType<LoosePluginType, {}>;
}
export type EmblaPluginType = EmblaPluginsType[keyof EmblaPluginsType];

View File

@@ -0,0 +1,8 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { OptionsHandlerType } from './OptionsHandler';
import { EmblaPluginsType, EmblaPluginType } from './Plugins';
export type PluginsHandlerType = {
init: (emblaApi: EmblaCarouselType, plugins: EmblaPluginType[]) => EmblaPluginsType;
destroy: () => void;
};
export declare function PluginsHandler(optionsHandler: OptionsHandlerType): PluginsHandlerType;

View File

@@ -0,0 +1,13 @@
import { AxisType } from './Axis';
import { EmblaCarouselType } from './EmblaCarousel';
import { EventHandlerType } from './EventHandler';
import { NodeRectsType } from './NodeRects';
import { WindowType } from './utils';
type ResizeHandlerCallbackType = (emblaApi: EmblaCarouselType, entries: ResizeObserverEntry[]) => boolean | void;
export type ResizeHandlerOptionType = boolean | ResizeHandlerCallbackType;
export type ResizeHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
};
export declare function ResizeHandler(container: HTMLElement, eventHandler: EventHandlerType, ownerWindow: WindowType, slides: HTMLElement[], axis: AxisType, watchResize: ResizeHandlerOptionType, nodeRects: NodeRectsType): ResizeHandlerType;
export {};

View File

@@ -0,0 +1,13 @@
import { Vector1DType } from './Vector1d';
export type ScrollBodyType = {
direction: () => number;
duration: () => number;
velocity: () => number;
seek: (timeStep: number) => ScrollBodyType;
settled: () => boolean;
useBaseFriction: () => ScrollBodyType;
useBaseDuration: () => ScrollBodyType;
useFriction: (n: number) => ScrollBodyType;
useDuration: (n: number) => ScrollBodyType;
};
export declare function ScrollBody(location: Vector1DType, offsetLocation: Vector1DType, previousLocation: Vector1DType, target: Vector1DType, baseDuration: number, baseFriction: number): ScrollBodyType;

View File

@@ -0,0 +1,10 @@
import { LimitType } from './Limit';
import { ScrollBodyType } from './ScrollBody';
import { Vector1DType } from './Vector1d';
import { PercentOfViewType } from './PercentOfView';
export type ScrollBoundsType = {
shouldConstrain: () => boolean;
constrain: (pointerDown: boolean) => void;
toggleActive: (active: boolean) => void;
};
export declare function ScrollBounds(limit: LimitType, location: Vector1DType, target: Vector1DType, scrollBody: ScrollBodyType, percentOfView: PercentOfViewType): ScrollBoundsType;

View File

@@ -0,0 +1,7 @@
import { LimitType } from './Limit';
export type ScrollContainOptionType = false | 'trimSnaps' | 'keepSnaps';
export type ScrollContainType = {
snapsContained: number[];
scrollContainLimit: LimitType;
};
export declare function ScrollContain(viewSize: number, contentSize: number, snapsAligned: number[], containScroll: ScrollContainOptionType, pixelTolerance: number): ScrollContainType;

View File

@@ -0,0 +1,5 @@
import { LimitType } from './Limit';
export type ScrollLimitType = {
limit: LimitType;
};
export declare function ScrollLimit(contentSize: number, scrollSnaps: number[], loop: boolean): ScrollLimitType;

View File

@@ -0,0 +1,6 @@
import { LimitType } from './Limit';
import { Vector1DType } from './Vector1d';
export type ScrollLooperType = {
loop: (direction: number) => void;
};
export declare function ScrollLooper(contentSize: number, limit: LimitType, location: Vector1DType, vectors: Vector1DType[]): ScrollLooperType;

View File

@@ -0,0 +1,5 @@
import { LimitType } from './Limit';
export type ScrollProgressType = {
get: (n: number) => number;
};
export declare function ScrollProgress(limit: LimitType): ScrollProgressType;

View File

@@ -0,0 +1,9 @@
import { AlignmentType } from './Alignment';
import { AxisType } from './Axis';
import { NodeRectType } from './NodeRects';
import { SlidesToScrollType } from './SlidesToScroll';
export type ScrollSnapsType = {
snaps: number[];
snapsAligned: number[];
};
export declare function ScrollSnaps(axis: AxisType, alignment: AlignmentType, containerRect: NodeRectType, slideRects: NodeRectType[], slidesToScroll: SlidesToScrollType): ScrollSnapsType;

View File

@@ -0,0 +1,12 @@
import { LimitType } from './Limit';
import { Vector1DType } from './Vector1d';
export type TargetType = {
distance: number;
index: number;
};
export type ScrollTargetType = {
byIndex: (target: number, direction: number) => TargetType;
byDistance: (force: number, snap: boolean) => TargetType;
shortcut: (target: number, direction: number) => number;
};
export declare function ScrollTarget(loop: boolean, scrollSnaps: number[], contentSize: number, limit: LimitType, targetVector: Vector1DType): ScrollTargetType;

View File

@@ -0,0 +1,11 @@
import { AnimationsType } from './Animations';
import { CounterType } from './Counter';
import { EventHandlerType } from './EventHandler';
import { ScrollBodyType } from './ScrollBody';
import { ScrollTargetType } from './ScrollTarget';
import { Vector1DType } from './Vector1d';
export type ScrollToType = {
distance: (n: number, snap: boolean) => void;
index: (n: number, direction: number) => void;
};
export declare function ScrollTo(animation: AnimationsType, indexCurrent: CounterType, indexPrevious: CounterType, scrollBody: ScrollBodyType, scrollTarget: ScrollTargetType, targetVector: Vector1DType, eventHandler: EventHandlerType): ScrollToType;

View File

@@ -0,0 +1,13 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { EventHandlerType } from './EventHandler';
import { EventStoreType } from './EventStore';
import { ScrollBodyType } from './ScrollBody';
import { ScrollToType } from './ScrollTo';
import { SlideRegistryType } from './SlideRegistry';
type FocusHandlerCallbackType = (emblaApi: EmblaCarouselType, evt: FocusEvent) => boolean | void;
export type FocusHandlerOptionType = boolean | FocusHandlerCallbackType;
export type SlideFocusType = {
init: (emblaApi: EmblaCarouselType) => void;
};
export declare function SlideFocus(root: HTMLElement, slides: HTMLElement[], slideRegistry: SlideRegistryType['slideRegistry'], scrollTo: ScrollToType, scrollBody: ScrollBodyType, eventStore: EventStoreType, eventHandler: EventHandlerType, watchFocus: FocusHandlerOptionType): SlideFocusType;
export {};

View File

@@ -0,0 +1,18 @@
import { AxisType } from './Axis';
import { Vector1DType } from './Vector1d';
import { TranslateType } from './Translate';
type LoopPointType = {
loopPoint: number;
index: number;
translate: TranslateType;
slideLocation: Vector1DType;
target: () => number;
};
export type SlideLooperType = {
canLoop: () => boolean;
clear: () => void;
loop: () => void;
loopPoints: LoopPointType[];
};
export declare function SlideLooper(axis: AxisType, viewSize: number, contentSize: number, slideSizes: number[], slideSizesWithGaps: number[], snaps: number[], scrollSnaps: number[], location: Vector1DType, slides: HTMLElement[]): SlideLooperType;
export {};

View File

@@ -0,0 +1,7 @@
import { LimitType } from './Limit';
import { ScrollContainOptionType } from './ScrollContain';
import { SlidesToScrollType } from './SlidesToScroll';
export type SlideRegistryType = {
slideRegistry: number[][];
};
export declare function SlideRegistry(containSnaps: boolean, containScroll: ScrollContainOptionType, scrollSnaps: number[], scrollContainLimit: LimitType, slidesToScroll: SlidesToScrollType, slideIndexes: number[]): SlideRegistryType;

View File

@@ -0,0 +1,10 @@
import { AxisType } from './Axis';
import { NodeRectType } from './NodeRects';
import { WindowType } from './utils';
export type SlideSizesType = {
slideSizes: number[];
slideSizesWithGaps: number[];
startGap: number;
endGap: number;
};
export declare function SlideSizes(axis: AxisType, containerRect: NodeRectType, slideRects: NodeRectType[], slides: HTMLElement[], readEdgeGap: boolean, ownerWindow: WindowType): SlideSizesType;

View File

@@ -0,0 +1,10 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { EventHandlerType } from './EventHandler';
type SlidesHandlerCallbackType = (emblaApi: EmblaCarouselType, mutations: MutationRecord[]) => boolean | void;
export type SlidesHandlerOptionType = boolean | SlidesHandlerCallbackType;
export type SlidesHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
};
export declare function SlidesHandler(container: HTMLElement, eventHandler: EventHandlerType, watchSlides: SlidesHandlerOptionType): SlidesHandlerType;
export {};

View File

@@ -0,0 +1,8 @@
import { EventHandlerType } from './EventHandler';
export type SlidesInViewOptionsType = IntersectionObserverInit['threshold'];
export type SlidesInViewType = {
init: () => void;
destroy: () => void;
get: (inView?: boolean) => number[];
};
export declare function SlidesInView(container: HTMLElement, slides: HTMLElement[], eventHandler: EventHandlerType, threshold: SlidesInViewOptionsType): SlidesInViewType;

View File

@@ -0,0 +1,7 @@
import { AxisType } from './Axis';
import { NodeRectType } from './NodeRects';
export type SlidesToScrollOptionType = 'auto' | number;
export type SlidesToScrollType = {
groupSlides: <Type>(array: Type[]) => Type[][];
};
export declare function SlidesToScroll(axis: AxisType, viewSize: number, slidesToScroll: SlidesToScrollOptionType, loop: boolean, containerRect: NodeRectType, slideRects: NodeRectType[], startGap: number, endGap: number, pixelTolerance: number): SlidesToScrollType;

View File

@@ -0,0 +1,7 @@
import { AxisType } from './Axis';
export type TranslateType = {
clear: () => void;
to: (target: number) => void;
toggleActive: (active: boolean) => void;
};
export declare function Translate(axis: AxisType, container: HTMLElement): TranslateType;

View File

@@ -0,0 +1,7 @@
export type Vector1DType = {
get: () => number;
set: (n: Vector1DType | number) => void;
add: (n: Vector1DType | number) => void;
subtract: (n: Vector1DType | number) => void;
};
export declare function Vector1D(initialValue: number): Vector1DType;

18
node_modules/embla-carousel/cjs/components/utils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import { PointerEventType } from './DragTracker';
export type WindowType = Window & typeof globalThis;
export declare function isNumber(subject: unknown): subject is number;
export declare function isString(subject: unknown): subject is string;
export declare function isBoolean(subject: unknown): subject is boolean;
export declare function isObject(subject: unknown): subject is Record<string, unknown>;
export declare function mathAbs(n: number): number;
export declare function mathSign(n: number): number;
export declare function deltaAbs(valueB: number, valueA: number): number;
export declare function factorAbs(valueB: number, valueA: number): number;
export declare function arrayKeys<Type>(array: Type[]): number[];
export declare function arrayLast<Type>(array: Type[]): Type;
export declare function arrayLastIndex<Type>(array: Type[]): number;
export declare function arrayIsLastIndex<Type>(array: Type[], index: number): boolean;
export declare function arrayFromNumber(n: number, startAt?: number): number[];
export declare function objectKeys<Type extends object>(object: Type): string[];
export declare function objectsMergeDeep(objectA: Record<string, unknown>, objectB: Record<string, unknown>): Record<string, unknown>;
export declare function isMouseEvent(evt: PointerEventType, ownerWindow: WindowType): evt is MouseEvent;

1661
node_modules/embla-carousel/cjs/embla-carousel.cjs.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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

@@ -0,0 +1,11 @@
export { EmblaOptionsType } from './components/Options';
export { EmblaEventType } from './components/EventHandler';
export { EmblaPluginType } from './components/Plugins';
export { EmblaCarouselType } from './components/EmblaCarousel';
export { default } from './components/EmblaCarousel';
export { CreatePluginType, EmblaPluginsType } from './components/Plugins';
export { CreateOptionsType } from './components/Options';
export { OptionsHandlerType } from './components/OptionsHandler';
export { EmblaEventListType } from './components/EventHandler';
export { EngineType } from './components/Engine';
export { ScrollBodyType } from './components/ScrollBody';

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

@@ -0,0 +1,52 @@
{
"name": "embla-carousel",
"version": "8.3.0",
"author": "David Jerleke",
"description": "A lightweight carousel library with fluid motion and great swipe precision",
"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*",
"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.1.5",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
"main": "embla-carousel.cjs.js",
"type": "commonjs"
}

View File

@@ -0,0 +1,5 @@
export type AlignmentOptionType = 'start' | 'center' | 'end' | ((viewSize: number, snapSize: number, index: number) => number);
export type AlignmentType = {
measure: (n: number, index: number) => number;
};
export declare function Alignment(align: AlignmentOptionType, viewSize: number): AlignmentType;

13
node_modules/embla-carousel/components/Animations.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import { EngineType } from './Engine';
import { WindowType } from './utils';
export type AnimationsUpdateType = (engine: EngineType, timeStep: number) => void;
export type AnimationsRenderType = (engine: EngineType, lagOffset: number) => void;
export type AnimationsType = {
init: () => void;
destroy: () => void;
start: () => void;
stop: () => void;
update: () => void;
render: (lagOffset: number) => void;
};
export declare function Animations(ownerDocument: Document, ownerWindow: WindowType, update: (timeStep: number) => void, render: (lagOffset: number) => void): AnimationsType;

14
node_modules/embla-carousel/components/Axis.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { NodeRectType } from './NodeRects';
export type AxisOptionType = 'x' | 'y';
export type AxisDirectionOptionType = 'ltr' | 'rtl';
type AxisEdgeType = 'top' | 'right' | 'bottom' | 'left';
export type AxisType = {
scroll: AxisOptionType;
cross: AxisOptionType;
startEdge: AxisEdgeType;
endEdge: AxisEdgeType;
measureSize: (nodeRect: NodeRectType) => number;
direction: (n: number) => number;
};
export declare function Axis(axis: AxisOptionType, contentDirection: AxisDirectionOptionType): AxisType;
export {};

7
node_modules/embla-carousel/components/Counter.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export type CounterType = {
get: () => number;
set: (n: number) => CounterType;
add: (n: number) => CounterType;
clone: () => CounterType;
};
export declare function Counter(max: number, start: number, loop: boolean): CounterType;

View File

@@ -0,0 +1,21 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { AnimationsType } from './Animations';
import { CounterType } from './Counter';
import { DragTrackerType, PointerEventType } from './DragTracker';
import { EventHandlerType } from './EventHandler';
import { AxisType } from './Axis';
import { ScrollBodyType } from './ScrollBody';
import { ScrollTargetType } from './ScrollTarget';
import { ScrollToType } from './ScrollTo';
import { Vector1DType } from './Vector1d';
import { PercentOfViewType } from './PercentOfView';
import { WindowType } from './utils';
type DragHandlerCallbackType = (emblaApi: EmblaCarouselType, evt: PointerEventType) => boolean | void;
export type DragHandlerOptionType = boolean | DragHandlerCallbackType;
export type DragHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
pointerDown: () => boolean;
};
export declare function DragHandler(axis: AxisType, rootNode: HTMLElement, ownerDocument: Document, ownerWindow: WindowType, target: Vector1DType, dragTracker: DragTrackerType, location: Vector1DType, animation: AnimationsType, scrollTo: ScrollToType, scrollBody: ScrollBodyType, scrollTarget: ScrollTargetType, index: CounterType, eventHandler: EventHandlerType, percentOfView: PercentOfViewType, dragFree: boolean, dragThreshold: number, skipSnaps: boolean, baseFriction: number, watchDrag: DragHandlerOptionType): DragHandlerType;
export {};

View File

@@ -0,0 +1,10 @@
import { AxisOptionType, AxisType } from './Axis';
import { WindowType } from './utils';
export type PointerEventType = TouchEvent | MouseEvent;
export type DragTrackerType = {
pointerDown: (evt: PointerEventType) => number;
pointerMove: (evt: PointerEventType) => number;
pointerUp: (evt: PointerEventType) => number;
readPoint: (evt: PointerEventType, evtAxis?: AxisOptionType) => number;
};
export declare function DragTracker(axis: AxisType, ownerWindow: WindowType): DragTrackerType;

View File

@@ -0,0 +1,32 @@
import { EngineType } from './Engine';
import { EventHandlerType } from './EventHandler';
import { EmblaOptionsType } from './Options';
import { EmblaPluginsType, EmblaPluginType } from './Plugins';
export type EmblaCarouselType = {
canScrollNext: () => boolean;
canScrollPrev: () => boolean;
containerNode: () => HTMLElement;
internalEngine: () => EngineType;
destroy: () => void;
off: EventHandlerType['off'];
on: EventHandlerType['on'];
emit: EventHandlerType['emit'];
plugins: () => EmblaPluginsType;
previousScrollSnap: () => number;
reInit: (options?: EmblaOptionsType, plugins?: EmblaPluginType[]) => void;
rootNode: () => HTMLElement;
scrollNext: (jump?: boolean) => void;
scrollPrev: (jump?: boolean) => void;
scrollProgress: () => number;
scrollSnapList: () => number[];
scrollTo: (index: number, jump?: boolean) => void;
selectedScrollSnap: () => number;
slideNodes: () => HTMLElement[];
slidesInView: () => number[];
slidesNotInView: () => number[];
};
declare function EmblaCarousel(root: HTMLElement, userOptions?: EmblaOptionsType, userPlugins?: EmblaPluginType[]): EmblaCarouselType;
declare namespace EmblaCarousel {
let globalOptions: EmblaOptionsType | undefined;
}
export default EmblaCarousel;

64
node_modules/embla-carousel/components/Engine.d.ts generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import { AnimationsType } from './Animations';
import { AxisType } from './Axis';
import { CounterType } from './Counter';
import { DragHandlerType } from './DragHandler';
import { EventHandlerType } from './EventHandler';
import { EventStoreType } from './EventStore';
import { LimitType } from './Limit';
import { NodeRectType } from './NodeRects';
import { OptionsType } from './Options';
import { PercentOfViewType } from './PercentOfView';
import { ResizeHandlerType } from './ResizeHandler';
import { ScrollBodyType } from './ScrollBody';
import { ScrollBoundsType } from './ScrollBounds';
import { ScrollLooperType } from './ScrollLooper';
import { ScrollProgressType } from './ScrollProgress';
import { SlideRegistryType } from './SlideRegistry';
import { ScrollTargetType } from './ScrollTarget';
import { ScrollToType } from './ScrollTo';
import { SlideFocusType } from './SlideFocus';
import { SlideLooperType } from './SlideLooper';
import { SlidesHandlerType } from './SlidesHandler';
import { SlidesInViewType } from './SlidesInView';
import { SlidesToScrollType } from './SlidesToScroll';
import { TranslateType } from './Translate';
import { WindowType } from './utils';
import { Vector1DType } from './Vector1d';
export type EngineType = {
ownerDocument: Document;
ownerWindow: WindowType;
eventHandler: EventHandlerType;
axis: AxisType;
animation: AnimationsType;
scrollBounds: ScrollBoundsType;
scrollLooper: ScrollLooperType;
scrollProgress: ScrollProgressType;
index: CounterType;
indexPrevious: CounterType;
limit: LimitType;
location: Vector1DType;
offsetLocation: Vector1DType;
previousLocation: Vector1DType;
options: OptionsType;
percentOfView: PercentOfViewType;
scrollBody: ScrollBodyType;
dragHandler: DragHandlerType;
eventStore: EventStoreType;
slideLooper: SlideLooperType;
slidesInView: SlidesInViewType;
slidesToScroll: SlidesToScrollType;
target: Vector1DType;
translate: TranslateType;
resizeHandler: ResizeHandlerType;
slidesHandler: SlidesHandlerType;
scrollTo: ScrollToType;
scrollTarget: ScrollTargetType;
scrollSnapList: number[];
scrollSnaps: number[];
slideIndexes: number[];
slideFocus: SlideFocusType;
slideRegistry: SlideRegistryType['slideRegistry'];
containerRect: NodeRectType;
slideRects: NodeRectType[];
};
export declare function Engine(root: HTMLElement, container: HTMLElement, slides: HTMLElement[], ownerDocument: Document, ownerWindow: WindowType, options: OptionsType, eventHandler: EventHandlerType): EngineType;

View File

@@ -0,0 +1,27 @@
import { EmblaCarouselType } from './EmblaCarousel';
type CallbackType = (emblaApi: EmblaCarouselType, evt: EmblaEventType) => void;
export type EmblaEventType = EmblaEventListType[keyof EmblaEventListType];
export interface EmblaEventListType {
init: 'init';
pointerDown: 'pointerDown';
pointerUp: 'pointerUp';
slidesChanged: 'slidesChanged';
slidesInView: 'slidesInView';
scroll: 'scroll';
select: 'select';
settle: 'settle';
destroy: 'destroy';
reInit: 'reInit';
resize: 'resize';
slideFocusStart: 'slideFocusStart';
slideFocus: 'slideFocus';
}
export type EventHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
emit: (evt: EmblaEventType) => EventHandlerType;
on: (evt: EmblaEventType, cb: CallbackType) => EventHandlerType;
off: (evt: EmblaEventType, cb: CallbackType) => EventHandlerType;
clear: () => void;
};
export declare function EventHandler(): EventHandlerType;
export {};

View File

@@ -0,0 +1,9 @@
type EventNameType = keyof DocumentEventMap | keyof WindowEventMap;
type EventHandlerType = (evt: any) => void;
type EventOptionsType = boolean | AddEventListenerOptions | undefined;
export type EventStoreType = {
add: (node: EventTarget, type: EventNameType, handler: EventHandlerType, options?: EventOptionsType) => EventStoreType;
clear: () => void;
};
export declare function EventStore(): EventStoreType;
export {};

11
node_modules/embla-carousel/components/Limit.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export type LimitType = {
min: number;
max: number;
length: number;
constrain: (n: number) => number;
reachedAny: (n: number) => boolean;
reachedMax: (n: number) => boolean;
reachedMin: (n: number) => boolean;
removeOffset: (n: number) => number;
};
export declare function Limit(min?: number, max?: number): LimitType;

12
node_modules/embla-carousel/components/NodeRects.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export type NodeRectType = {
top: number;
right: number;
bottom: number;
left: number;
width: number;
height: number;
};
export type NodeRectsType = {
measure: (node: HTMLElement) => NodeRectType;
};
export declare function NodeRects(): NodeRectsType;

40
node_modules/embla-carousel/components/Options.d.ts generated vendored Normal file
View File

@@ -0,0 +1,40 @@
import { AlignmentOptionType } from './Alignment';
import { AxisDirectionOptionType, AxisOptionType } from './Axis';
import { SlidesToScrollOptionType } from './SlidesToScroll';
import { ScrollContainOptionType } from './ScrollContain';
import { DragHandlerOptionType } from './DragHandler';
import { ResizeHandlerOptionType } from './ResizeHandler';
import { SlidesHandlerOptionType } from './SlidesHandler';
import { SlidesInViewOptionsType } from './SlidesInView';
import { FocusHandlerOptionType } from './SlideFocus';
export type LooseOptionsType = {
[key: string]: unknown;
};
export type CreateOptionsType<Type extends LooseOptionsType> = Type & {
active: boolean;
breakpoints: {
[key: string]: Omit<Partial<CreateOptionsType<Type>>, 'breakpoints'>;
};
};
export type OptionsType = CreateOptionsType<{
align: AlignmentOptionType;
axis: AxisOptionType;
container: string | HTMLElement | null;
slides: string | HTMLElement[] | NodeListOf<HTMLElement> | null;
containScroll: ScrollContainOptionType;
direction: AxisDirectionOptionType;
slidesToScroll: SlidesToScrollOptionType;
dragFree: boolean;
dragThreshold: number;
inViewThreshold: SlidesInViewOptionsType;
loop: boolean;
skipSnaps: boolean;
duration: number;
startIndex: number;
watchDrag: DragHandlerOptionType;
watchResize: ResizeHandlerOptionType;
watchSlides: SlidesHandlerOptionType;
watchFocus: FocusHandlerOptionType;
}>;
export declare const defaultOptions: OptionsType;
export type EmblaOptionsType = Partial<OptionsType>;

View File

@@ -0,0 +1,10 @@
import { LooseOptionsType, CreateOptionsType } from './Options';
import { WindowType } from './utils';
type OptionsType = Partial<CreateOptionsType<LooseOptionsType>>;
export type OptionsHandlerType = {
mergeOptions: <TypeA extends OptionsType, TypeB extends OptionsType>(optionsA: TypeA, optionsB?: TypeB) => TypeA;
optionsAtMedia: <Type extends OptionsType>(options: Type) => Type;
optionsMediaQueries: (optionsList: OptionsType[]) => MediaQueryList[];
};
export declare function OptionsHandler(ownerWindow: WindowType): OptionsHandlerType;
export {};

View File

@@ -0,0 +1,4 @@
export type PercentOfViewType = {
measure: (n: number) => number;
};
export declare function PercentOfView(viewSize: number): PercentOfViewType;

16
node_modules/embla-carousel/components/Plugins.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import { CreateOptionsType, LooseOptionsType } from './Options';
import { EmblaCarouselType } from './EmblaCarousel';
import { OptionsHandlerType } from './OptionsHandler';
export type LoosePluginType = {
[key: string]: unknown;
};
export type CreatePluginType<TypeA extends LoosePluginType, TypeB extends LooseOptionsType> = TypeA & {
name: string;
options: Partial<CreateOptionsType<TypeB>>;
init: (embla: EmblaCarouselType, OptionsHandler: OptionsHandlerType) => void;
destroy: () => void;
};
export interface EmblaPluginsType {
[key: string]: CreatePluginType<LoosePluginType, {}>;
}
export type EmblaPluginType = EmblaPluginsType[keyof EmblaPluginsType];

View File

@@ -0,0 +1,8 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { OptionsHandlerType } from './OptionsHandler';
import { EmblaPluginsType, EmblaPluginType } from './Plugins';
export type PluginsHandlerType = {
init: (emblaApi: EmblaCarouselType, plugins: EmblaPluginType[]) => EmblaPluginsType;
destroy: () => void;
};
export declare function PluginsHandler(optionsHandler: OptionsHandlerType): PluginsHandlerType;

View File

@@ -0,0 +1,13 @@
import { AxisType } from './Axis';
import { EmblaCarouselType } from './EmblaCarousel';
import { EventHandlerType } from './EventHandler';
import { NodeRectsType } from './NodeRects';
import { WindowType } from './utils';
type ResizeHandlerCallbackType = (emblaApi: EmblaCarouselType, entries: ResizeObserverEntry[]) => boolean | void;
export type ResizeHandlerOptionType = boolean | ResizeHandlerCallbackType;
export type ResizeHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
};
export declare function ResizeHandler(container: HTMLElement, eventHandler: EventHandlerType, ownerWindow: WindowType, slides: HTMLElement[], axis: AxisType, watchResize: ResizeHandlerOptionType, nodeRects: NodeRectsType): ResizeHandlerType;
export {};

13
node_modules/embla-carousel/components/ScrollBody.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import { Vector1DType } from './Vector1d';
export type ScrollBodyType = {
direction: () => number;
duration: () => number;
velocity: () => number;
seek: (timeStep: number) => ScrollBodyType;
settled: () => boolean;
useBaseFriction: () => ScrollBodyType;
useBaseDuration: () => ScrollBodyType;
useFriction: (n: number) => ScrollBodyType;
useDuration: (n: number) => ScrollBodyType;
};
export declare function ScrollBody(location: Vector1DType, offsetLocation: Vector1DType, previousLocation: Vector1DType, target: Vector1DType, baseDuration: number, baseFriction: number): ScrollBodyType;

View File

@@ -0,0 +1,10 @@
import { LimitType } from './Limit';
import { ScrollBodyType } from './ScrollBody';
import { Vector1DType } from './Vector1d';
import { PercentOfViewType } from './PercentOfView';
export type ScrollBoundsType = {
shouldConstrain: () => boolean;
constrain: (pointerDown: boolean) => void;
toggleActive: (active: boolean) => void;
};
export declare function ScrollBounds(limit: LimitType, location: Vector1DType, target: Vector1DType, scrollBody: ScrollBodyType, percentOfView: PercentOfViewType): ScrollBoundsType;

View File

@@ -0,0 +1,7 @@
import { LimitType } from './Limit';
export type ScrollContainOptionType = false | 'trimSnaps' | 'keepSnaps';
export type ScrollContainType = {
snapsContained: number[];
scrollContainLimit: LimitType;
};
export declare function ScrollContain(viewSize: number, contentSize: number, snapsAligned: number[], containScroll: ScrollContainOptionType, pixelTolerance: number): ScrollContainType;

View File

@@ -0,0 +1,5 @@
import { LimitType } from './Limit';
export type ScrollLimitType = {
limit: LimitType;
};
export declare function ScrollLimit(contentSize: number, scrollSnaps: number[], loop: boolean): ScrollLimitType;

View File

@@ -0,0 +1,6 @@
import { LimitType } from './Limit';
import { Vector1DType } from './Vector1d';
export type ScrollLooperType = {
loop: (direction: number) => void;
};
export declare function ScrollLooper(contentSize: number, limit: LimitType, location: Vector1DType, vectors: Vector1DType[]): ScrollLooperType;

View File

@@ -0,0 +1,5 @@
import { LimitType } from './Limit';
export type ScrollProgressType = {
get: (n: number) => number;
};
export declare function ScrollProgress(limit: LimitType): ScrollProgressType;

View File

@@ -0,0 +1,9 @@
import { AlignmentType } from './Alignment';
import { AxisType } from './Axis';
import { NodeRectType } from './NodeRects';
import { SlidesToScrollType } from './SlidesToScroll';
export type ScrollSnapsType = {
snaps: number[];
snapsAligned: number[];
};
export declare function ScrollSnaps(axis: AxisType, alignment: AlignmentType, containerRect: NodeRectType, slideRects: NodeRectType[], slidesToScroll: SlidesToScrollType): ScrollSnapsType;

View File

@@ -0,0 +1,12 @@
import { LimitType } from './Limit';
import { Vector1DType } from './Vector1d';
export type TargetType = {
distance: number;
index: number;
};
export type ScrollTargetType = {
byIndex: (target: number, direction: number) => TargetType;
byDistance: (force: number, snap: boolean) => TargetType;
shortcut: (target: number, direction: number) => number;
};
export declare function ScrollTarget(loop: boolean, scrollSnaps: number[], contentSize: number, limit: LimitType, targetVector: Vector1DType): ScrollTargetType;

11
node_modules/embla-carousel/components/ScrollTo.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import { AnimationsType } from './Animations';
import { CounterType } from './Counter';
import { EventHandlerType } from './EventHandler';
import { ScrollBodyType } from './ScrollBody';
import { ScrollTargetType } from './ScrollTarget';
import { Vector1DType } from './Vector1d';
export type ScrollToType = {
distance: (n: number, snap: boolean) => void;
index: (n: number, direction: number) => void;
};
export declare function ScrollTo(animation: AnimationsType, indexCurrent: CounterType, indexPrevious: CounterType, scrollBody: ScrollBodyType, scrollTarget: ScrollTargetType, targetVector: Vector1DType, eventHandler: EventHandlerType): ScrollToType;

13
node_modules/embla-carousel/components/SlideFocus.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { EventHandlerType } from './EventHandler';
import { EventStoreType } from './EventStore';
import { ScrollBodyType } from './ScrollBody';
import { ScrollToType } from './ScrollTo';
import { SlideRegistryType } from './SlideRegistry';
type FocusHandlerCallbackType = (emblaApi: EmblaCarouselType, evt: FocusEvent) => boolean | void;
export type FocusHandlerOptionType = boolean | FocusHandlerCallbackType;
export type SlideFocusType = {
init: (emblaApi: EmblaCarouselType) => void;
};
export declare function SlideFocus(root: HTMLElement, slides: HTMLElement[], slideRegistry: SlideRegistryType['slideRegistry'], scrollTo: ScrollToType, scrollBody: ScrollBodyType, eventStore: EventStoreType, eventHandler: EventHandlerType, watchFocus: FocusHandlerOptionType): SlideFocusType;
export {};

View File

@@ -0,0 +1,18 @@
import { AxisType } from './Axis';
import { Vector1DType } from './Vector1d';
import { TranslateType } from './Translate';
type LoopPointType = {
loopPoint: number;
index: number;
translate: TranslateType;
slideLocation: Vector1DType;
target: () => number;
};
export type SlideLooperType = {
canLoop: () => boolean;
clear: () => void;
loop: () => void;
loopPoints: LoopPointType[];
};
export declare function SlideLooper(axis: AxisType, viewSize: number, contentSize: number, slideSizes: number[], slideSizesWithGaps: number[], snaps: number[], scrollSnaps: number[], location: Vector1DType, slides: HTMLElement[]): SlideLooperType;
export {};

View File

@@ -0,0 +1,7 @@
import { LimitType } from './Limit';
import { ScrollContainOptionType } from './ScrollContain';
import { SlidesToScrollType } from './SlidesToScroll';
export type SlideRegistryType = {
slideRegistry: number[][];
};
export declare function SlideRegistry(containSnaps: boolean, containScroll: ScrollContainOptionType, scrollSnaps: number[], scrollContainLimit: LimitType, slidesToScroll: SlidesToScrollType, slideIndexes: number[]): SlideRegistryType;

10
node_modules/embla-carousel/components/SlideSizes.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import { AxisType } from './Axis';
import { NodeRectType } from './NodeRects';
import { WindowType } from './utils';
export type SlideSizesType = {
slideSizes: number[];
slideSizesWithGaps: number[];
startGap: number;
endGap: number;
};
export declare function SlideSizes(axis: AxisType, containerRect: NodeRectType, slideRects: NodeRectType[], slides: HTMLElement[], readEdgeGap: boolean, ownerWindow: WindowType): SlideSizesType;

View File

@@ -0,0 +1,10 @@
import { EmblaCarouselType } from './EmblaCarousel';
import { EventHandlerType } from './EventHandler';
type SlidesHandlerCallbackType = (emblaApi: EmblaCarouselType, mutations: MutationRecord[]) => boolean | void;
export type SlidesHandlerOptionType = boolean | SlidesHandlerCallbackType;
export type SlidesHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
};
export declare function SlidesHandler(container: HTMLElement, eventHandler: EventHandlerType, watchSlides: SlidesHandlerOptionType): SlidesHandlerType;
export {};

View File

@@ -0,0 +1,8 @@
import { EventHandlerType } from './EventHandler';
export type SlidesInViewOptionsType = IntersectionObserverInit['threshold'];
export type SlidesInViewType = {
init: () => void;
destroy: () => void;
get: (inView?: boolean) => number[];
};
export declare function SlidesInView(container: HTMLElement, slides: HTMLElement[], eventHandler: EventHandlerType, threshold: SlidesInViewOptionsType): SlidesInViewType;

View File

@@ -0,0 +1,7 @@
import { AxisType } from './Axis';
import { NodeRectType } from './NodeRects';
export type SlidesToScrollOptionType = 'auto' | number;
export type SlidesToScrollType = {
groupSlides: <Type>(array: Type[]) => Type[][];
};
export declare function SlidesToScroll(axis: AxisType, viewSize: number, slidesToScroll: SlidesToScrollOptionType, loop: boolean, containerRect: NodeRectType, slideRects: NodeRectType[], startGap: number, endGap: number, pixelTolerance: number): SlidesToScrollType;

View File

@@ -0,0 +1,7 @@
import { AxisType } from './Axis';
export type TranslateType = {
clear: () => void;
to: (target: number) => void;
toggleActive: (active: boolean) => void;
};
export declare function Translate(axis: AxisType, container: HTMLElement): TranslateType;

7
node_modules/embla-carousel/components/Vector1d.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export type Vector1DType = {
get: () => number;
set: (n: Vector1DType | number) => void;
add: (n: Vector1DType | number) => void;
subtract: (n: Vector1DType | number) => void;
};
export declare function Vector1D(initialValue: number): Vector1DType;

18
node_modules/embla-carousel/components/utils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
import { PointerEventType } from './DragTracker';
export type WindowType = Window & typeof globalThis;
export declare function isNumber(subject: unknown): subject is number;
export declare function isString(subject: unknown): subject is string;
export declare function isBoolean(subject: unknown): subject is boolean;
export declare function isObject(subject: unknown): subject is Record<string, unknown>;
export declare function mathAbs(n: number): number;
export declare function mathSign(n: number): number;
export declare function deltaAbs(valueB: number, valueA: number): number;
export declare function factorAbs(valueB: number, valueA: number): number;
export declare function arrayKeys<Type>(array: Type[]): number[];
export declare function arrayLast<Type>(array: Type[]): Type;
export declare function arrayLastIndex<Type>(array: Type[]): number;
export declare function arrayIsLastIndex<Type>(array: Type[], index: number): boolean;
export declare function arrayFromNumber(n: number, startAt?: number): number[];
export declare function objectKeys<Type extends object>(object: Type): string[];
export declare function objectsMergeDeep(objectA: Record<string, unknown>, objectB: Record<string, unknown>): Record<string, unknown>;
export declare function isMouseEvent(evt: PointerEventType, ownerWindow: WindowType): evt is MouseEvent;

1
node_modules/embla-carousel/embla-carousel.umd.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
export type AlignmentOptionType = 'start' | 'center' | 'end' | ((viewSize: number, snapSize: number, index: number) => number);
export type AlignmentType = {
measure: (n: number, index: number) => number;
};
export declare function Alignment(align: AlignmentOptionType, viewSize: number): AlignmentType;

View File

@@ -0,0 +1,13 @@
import { EngineType } from './Engine.js';
import { WindowType } from './utils.js';
export type AnimationsUpdateType = (engine: EngineType, timeStep: number) => void;
export type AnimationsRenderType = (engine: EngineType, lagOffset: number) => void;
export type AnimationsType = {
init: () => void;
destroy: () => void;
start: () => void;
stop: () => void;
update: () => void;
render: (lagOffset: number) => void;
};
export declare function Animations(ownerDocument: Document, ownerWindow: WindowType, update: (timeStep: number) => void, render: (lagOffset: number) => void): AnimationsType;

14
node_modules/embla-carousel/esm/components/Axis.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { NodeRectType } from './NodeRects.js';
export type AxisOptionType = 'x' | 'y';
export type AxisDirectionOptionType = 'ltr' | 'rtl';
type AxisEdgeType = 'top' | 'right' | 'bottom' | 'left';
export type AxisType = {
scroll: AxisOptionType;
cross: AxisOptionType;
startEdge: AxisEdgeType;
endEdge: AxisEdgeType;
measureSize: (nodeRect: NodeRectType) => number;
direction: (n: number) => number;
};
export declare function Axis(axis: AxisOptionType, contentDirection: AxisDirectionOptionType): AxisType;
export {};

View File

@@ -0,0 +1,7 @@
export type CounterType = {
get: () => number;
set: (n: number) => CounterType;
add: (n: number) => CounterType;
clone: () => CounterType;
};
export declare function Counter(max: number, start: number, loop: boolean): CounterType;

View File

@@ -0,0 +1,21 @@
import { EmblaCarouselType } from './EmblaCarousel.js';
import { AnimationsType } from './Animations.js';
import { CounterType } from './Counter.js';
import { DragTrackerType, PointerEventType } from './DragTracker.js';
import { EventHandlerType } from './EventHandler.js';
import { AxisType } from './Axis.js';
import { ScrollBodyType } from './ScrollBody.js';
import { ScrollTargetType } from './ScrollTarget.js';
import { ScrollToType } from './ScrollTo.js';
import { Vector1DType } from './Vector1d.js';
import { PercentOfViewType } from './PercentOfView.js';
import { WindowType } from './utils.js';
type DragHandlerCallbackType = (emblaApi: EmblaCarouselType, evt: PointerEventType) => boolean | void;
export type DragHandlerOptionType = boolean | DragHandlerCallbackType;
export type DragHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
pointerDown: () => boolean;
};
export declare function DragHandler(axis: AxisType, rootNode: HTMLElement, ownerDocument: Document, ownerWindow: WindowType, target: Vector1DType, dragTracker: DragTrackerType, location: Vector1DType, animation: AnimationsType, scrollTo: ScrollToType, scrollBody: ScrollBodyType, scrollTarget: ScrollTargetType, index: CounterType, eventHandler: EventHandlerType, percentOfView: PercentOfViewType, dragFree: boolean, dragThreshold: number, skipSnaps: boolean, baseFriction: number, watchDrag: DragHandlerOptionType): DragHandlerType;
export {};

View File

@@ -0,0 +1,10 @@
import { AxisOptionType, AxisType } from './Axis.js';
import { WindowType } from './utils.js';
export type PointerEventType = TouchEvent | MouseEvent;
export type DragTrackerType = {
pointerDown: (evt: PointerEventType) => number;
pointerMove: (evt: PointerEventType) => number;
pointerUp: (evt: PointerEventType) => number;
readPoint: (evt: PointerEventType, evtAxis?: AxisOptionType) => number;
};
export declare function DragTracker(axis: AxisType, ownerWindow: WindowType): DragTrackerType;

View File

@@ -0,0 +1,32 @@
import { EngineType } from './Engine.js';
import { EventHandlerType } from './EventHandler.js';
import { EmblaOptionsType } from './Options.js';
import { EmblaPluginsType, EmblaPluginType } from './Plugins.js';
export type EmblaCarouselType = {
canScrollNext: () => boolean;
canScrollPrev: () => boolean;
containerNode: () => HTMLElement;
internalEngine: () => EngineType;
destroy: () => void;
off: EventHandlerType['off'];
on: EventHandlerType['on'];
emit: EventHandlerType['emit'];
plugins: () => EmblaPluginsType;
previousScrollSnap: () => number;
reInit: (options?: EmblaOptionsType, plugins?: EmblaPluginType[]) => void;
rootNode: () => HTMLElement;
scrollNext: (jump?: boolean) => void;
scrollPrev: (jump?: boolean) => void;
scrollProgress: () => number;
scrollSnapList: () => number[];
scrollTo: (index: number, jump?: boolean) => void;
selectedScrollSnap: () => number;
slideNodes: () => HTMLElement[];
slidesInView: () => number[];
slidesNotInView: () => number[];
};
declare function EmblaCarousel(root: HTMLElement, userOptions?: EmblaOptionsType, userPlugins?: EmblaPluginType[]): EmblaCarouselType;
declare namespace EmblaCarousel {
let globalOptions: EmblaOptionsType | undefined;
}
export default EmblaCarousel;

64
node_modules/embla-carousel/esm/components/Engine.d.ts generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import { AnimationsType } from './Animations.js';
import { AxisType } from './Axis.js';
import { CounterType } from './Counter.js';
import { DragHandlerType } from './DragHandler.js';
import { EventHandlerType } from './EventHandler.js';
import { EventStoreType } from './EventStore.js';
import { LimitType } from './Limit.js';
import { NodeRectType } from './NodeRects.js';
import { OptionsType } from './Options.js';
import { PercentOfViewType } from './PercentOfView.js';
import { ResizeHandlerType } from './ResizeHandler.js';
import { ScrollBodyType } from './ScrollBody.js';
import { ScrollBoundsType } from './ScrollBounds.js';
import { ScrollLooperType } from './ScrollLooper.js';
import { ScrollProgressType } from './ScrollProgress.js';
import { SlideRegistryType } from './SlideRegistry.js';
import { ScrollTargetType } from './ScrollTarget.js';
import { ScrollToType } from './ScrollTo.js';
import { SlideFocusType } from './SlideFocus.js';
import { SlideLooperType } from './SlideLooper.js';
import { SlidesHandlerType } from './SlidesHandler.js';
import { SlidesInViewType } from './SlidesInView.js';
import { SlidesToScrollType } from './SlidesToScroll.js';
import { TranslateType } from './Translate.js';
import { WindowType } from './utils.js';
import { Vector1DType } from './Vector1d.js';
export type EngineType = {
ownerDocument: Document;
ownerWindow: WindowType;
eventHandler: EventHandlerType;
axis: AxisType;
animation: AnimationsType;
scrollBounds: ScrollBoundsType;
scrollLooper: ScrollLooperType;
scrollProgress: ScrollProgressType;
index: CounterType;
indexPrevious: CounterType;
limit: LimitType;
location: Vector1DType;
offsetLocation: Vector1DType;
previousLocation: Vector1DType;
options: OptionsType;
percentOfView: PercentOfViewType;
scrollBody: ScrollBodyType;
dragHandler: DragHandlerType;
eventStore: EventStoreType;
slideLooper: SlideLooperType;
slidesInView: SlidesInViewType;
slidesToScroll: SlidesToScrollType;
target: Vector1DType;
translate: TranslateType;
resizeHandler: ResizeHandlerType;
slidesHandler: SlidesHandlerType;
scrollTo: ScrollToType;
scrollTarget: ScrollTargetType;
scrollSnapList: number[];
scrollSnaps: number[];
slideIndexes: number[];
slideFocus: SlideFocusType;
slideRegistry: SlideRegistryType['slideRegistry'];
containerRect: NodeRectType;
slideRects: NodeRectType[];
};
export declare function Engine(root: HTMLElement, container: HTMLElement, slides: HTMLElement[], ownerDocument: Document, ownerWindow: WindowType, options: OptionsType, eventHandler: EventHandlerType): EngineType;

View File

@@ -0,0 +1,27 @@
import { EmblaCarouselType } from './EmblaCarousel.js';
type CallbackType = (emblaApi: EmblaCarouselType, evt: EmblaEventType) => void;
export type EmblaEventType = EmblaEventListType[keyof EmblaEventListType];
export interface EmblaEventListType {
init: 'init';
pointerDown: 'pointerDown';
pointerUp: 'pointerUp';
slidesChanged: 'slidesChanged';
slidesInView: 'slidesInView';
scroll: 'scroll';
select: 'select';
settle: 'settle';
destroy: 'destroy';
reInit: 'reInit';
resize: 'resize';
slideFocusStart: 'slideFocusStart';
slideFocus: 'slideFocus';
}
export type EventHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
emit: (evt: EmblaEventType) => EventHandlerType;
on: (evt: EmblaEventType, cb: CallbackType) => EventHandlerType;
off: (evt: EmblaEventType, cb: CallbackType) => EventHandlerType;
clear: () => void;
};
export declare function EventHandler(): EventHandlerType;
export {};

View File

@@ -0,0 +1,9 @@
type EventNameType = keyof DocumentEventMap | keyof WindowEventMap;
type EventHandlerType = (evt: any) => void;
type EventOptionsType = boolean | AddEventListenerOptions | undefined;
export type EventStoreType = {
add: (node: EventTarget, type: EventNameType, handler: EventHandlerType, options?: EventOptionsType) => EventStoreType;
clear: () => void;
};
export declare function EventStore(): EventStoreType;
export {};

11
node_modules/embla-carousel/esm/components/Limit.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export type LimitType = {
min: number;
max: number;
length: number;
constrain: (n: number) => number;
reachedAny: (n: number) => boolean;
reachedMax: (n: number) => boolean;
reachedMin: (n: number) => boolean;
removeOffset: (n: number) => number;
};
export declare function Limit(min?: number, max?: number): LimitType;

View File

@@ -0,0 +1,12 @@
export type NodeRectType = {
top: number;
right: number;
bottom: number;
left: number;
width: number;
height: number;
};
export type NodeRectsType = {
measure: (node: HTMLElement) => NodeRectType;
};
export declare function NodeRects(): NodeRectsType;

View File

@@ -0,0 +1,40 @@
import { AlignmentOptionType } from './Alignment.js';
import { AxisDirectionOptionType, AxisOptionType } from './Axis.js';
import { SlidesToScrollOptionType } from './SlidesToScroll.js';
import { ScrollContainOptionType } from './ScrollContain.js';
import { DragHandlerOptionType } from './DragHandler.js';
import { ResizeHandlerOptionType } from './ResizeHandler.js';
import { SlidesHandlerOptionType } from './SlidesHandler.js';
import { SlidesInViewOptionsType } from './SlidesInView.js';
import { FocusHandlerOptionType } from './SlideFocus.js';
export type LooseOptionsType = {
[key: string]: unknown;
};
export type CreateOptionsType<Type extends LooseOptionsType> = Type & {
active: boolean;
breakpoints: {
[key: string]: Omit<Partial<CreateOptionsType<Type>>, 'breakpoints'>;
};
};
export type OptionsType = CreateOptionsType<{
align: AlignmentOptionType;
axis: AxisOptionType;
container: string | HTMLElement | null;
slides: string | HTMLElement[] | NodeListOf<HTMLElement> | null;
containScroll: ScrollContainOptionType;
direction: AxisDirectionOptionType;
slidesToScroll: SlidesToScrollOptionType;
dragFree: boolean;
dragThreshold: number;
inViewThreshold: SlidesInViewOptionsType;
loop: boolean;
skipSnaps: boolean;
duration: number;
startIndex: number;
watchDrag: DragHandlerOptionType;
watchResize: ResizeHandlerOptionType;
watchSlides: SlidesHandlerOptionType;
watchFocus: FocusHandlerOptionType;
}>;
export declare const defaultOptions: OptionsType;
export type EmblaOptionsType = Partial<OptionsType>;

View File

@@ -0,0 +1,10 @@
import { LooseOptionsType, CreateOptionsType } from './Options.js';
import { WindowType } from './utils.js';
type OptionsType = Partial<CreateOptionsType<LooseOptionsType>>;
export type OptionsHandlerType = {
mergeOptions: <TypeA extends OptionsType, TypeB extends OptionsType>(optionsA: TypeA, optionsB?: TypeB) => TypeA;
optionsAtMedia: <Type extends OptionsType>(options: Type) => Type;
optionsMediaQueries: (optionsList: OptionsType[]) => MediaQueryList[];
};
export declare function OptionsHandler(ownerWindow: WindowType): OptionsHandlerType;
export {};

View File

@@ -0,0 +1,4 @@
export type PercentOfViewType = {
measure: (n: number) => number;
};
export declare function PercentOfView(viewSize: number): PercentOfViewType;

View File

@@ -0,0 +1,16 @@
import { CreateOptionsType, LooseOptionsType } from './Options.js';
import { EmblaCarouselType } from './EmblaCarousel.js';
import { OptionsHandlerType } from './OptionsHandler.js';
export type LoosePluginType = {
[key: string]: unknown;
};
export type CreatePluginType<TypeA extends LoosePluginType, TypeB extends LooseOptionsType> = TypeA & {
name: string;
options: Partial<CreateOptionsType<TypeB>>;
init: (embla: EmblaCarouselType, OptionsHandler: OptionsHandlerType) => void;
destroy: () => void;
};
export interface EmblaPluginsType {
[key: string]: CreatePluginType<LoosePluginType, {}>;
}
export type EmblaPluginType = EmblaPluginsType[keyof EmblaPluginsType];

View File

@@ -0,0 +1,8 @@
import { EmblaCarouselType } from './EmblaCarousel.js';
import { OptionsHandlerType } from './OptionsHandler.js';
import { EmblaPluginsType, EmblaPluginType } from './Plugins.js';
export type PluginsHandlerType = {
init: (emblaApi: EmblaCarouselType, plugins: EmblaPluginType[]) => EmblaPluginsType;
destroy: () => void;
};
export declare function PluginsHandler(optionsHandler: OptionsHandlerType): PluginsHandlerType;

View File

@@ -0,0 +1,13 @@
import { AxisType } from './Axis.js';
import { EmblaCarouselType } from './EmblaCarousel.js';
import { EventHandlerType } from './EventHandler.js';
import { NodeRectsType } from './NodeRects.js';
import { WindowType } from './utils.js';
type ResizeHandlerCallbackType = (emblaApi: EmblaCarouselType, entries: ResizeObserverEntry[]) => boolean | void;
export type ResizeHandlerOptionType = boolean | ResizeHandlerCallbackType;
export type ResizeHandlerType = {
init: (emblaApi: EmblaCarouselType) => void;
destroy: () => void;
};
export declare function ResizeHandler(container: HTMLElement, eventHandler: EventHandlerType, ownerWindow: WindowType, slides: HTMLElement[], axis: AxisType, watchResize: ResizeHandlerOptionType, nodeRects: NodeRectsType): ResizeHandlerType;
export {};

View File

@@ -0,0 +1,13 @@
import { Vector1DType } from './Vector1d.js';
export type ScrollBodyType = {
direction: () => number;
duration: () => number;
velocity: () => number;
seek: (timeStep: number) => ScrollBodyType;
settled: () => boolean;
useBaseFriction: () => ScrollBodyType;
useBaseDuration: () => ScrollBodyType;
useFriction: (n: number) => ScrollBodyType;
useDuration: (n: number) => ScrollBodyType;
};
export declare function ScrollBody(location: Vector1DType, offsetLocation: Vector1DType, previousLocation: Vector1DType, target: Vector1DType, baseDuration: number, baseFriction: number): ScrollBodyType;

View File

@@ -0,0 +1,10 @@
import { LimitType } from './Limit.js';
import { ScrollBodyType } from './ScrollBody.js';
import { Vector1DType } from './Vector1d.js';
import { PercentOfViewType } from './PercentOfView.js';
export type ScrollBoundsType = {
shouldConstrain: () => boolean;
constrain: (pointerDown: boolean) => void;
toggleActive: (active: boolean) => void;
};
export declare function ScrollBounds(limit: LimitType, location: Vector1DType, target: Vector1DType, scrollBody: ScrollBodyType, percentOfView: PercentOfViewType): ScrollBoundsType;

Some files were not shown because too many files have changed in this diff Show More