vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
97 lines • 3.67 kB
TypeScript
import { Snap } from '..';
export declare class SnapLogic {
private _snap;
/** Listeners to destruct */
private _destructors;
constructor(_snap: Snap);
/** Snap component */
protected get props(): {
slides: false | (HTMLElement | {
readonly element: HTMLElement | null;
readonly index: number;
readonly coord: number;
readonly staticCoord: number;
readonly progress: number;
readonly size: number;
readonly isVisible: boolean;
resize: (isManual?: boolean) => void;
$_attach: (ctx: Snap, index: number) => void;
$_detach: () => void;
$_setStaticCoord: (value: number) => void;
$_render: () => void;
readonly magnets: number[];
$_updateProgress: () => void;
$_updateCoords: (offset: number) => void;
})[];
containerSize: string | number;
slidesToScroll: number;
direction: "horizontal" | "vertical";
centered: boolean;
origin: "start" | "center" | "end";
loop: boolean;
gap: number | string;
lerp: number;
freemode: boolean | "sticky";
rewind: boolean;
stickOnResize: boolean;
friction: number;
edgeFriction: number;
duration: import("..").TSnapDuration;
easing: false | number[] | import("easing-progress").TEasingFunction;
slideSize: string | number;
__mutableProp: true;
wheel: boolean;
wheelSpeed: number;
wheelAxis: "x" | "y" | "auto";
followWheel: boolean;
wheelThrottle: number | "auto";
stickOnWheelEnd: boolean;
stickOnWheelEndThreshold: number;
swipe: boolean;
grabCursor: boolean;
swipeSpeed: number;
swipeAxis: "x" | "y" | "angle" | "auto";
followSwipe: boolean;
shortSwipes: boolean;
shortSwipesDuration: number;
shortSwipesThreshold: number;
swipeFriction: boolean;
swipeThreshold: number;
swipeMinTime: number;
swipeInertiaDuration: (distance: number) => number;
swipeInertiaRatio: number;
interval: number;
intervalDirection: "next" | "prev";
container: HTMLElement;
eventsEmitter: HTMLElement;
activeIndex: number;
__staticProp: true;
};
protected get container(): HTMLElement;
/** Snap component */
protected get callbacks(): import("../../..").Callbacks<import("..").ISnapCallbacksMap, Snap>;
protected get isSwiping(): boolean;
protected get isWheeling(): boolean;
protected get hasInertia(): boolean;
protected get isInterpolating(): boolean;
protected get isTransitioning(): boolean;
protected get eventsEmitter(): HTMLElement;
protected get snapAxis(): "x" | "y";
protected get track(): import("../Track").SnapTrack;
protected get isSlideScrolling(): boolean;
protected get containerSize(): number;
protected get activeSlide(): import("./Slide").SnapSlide;
protected get activeIndex(): number;
protected get slides(): import("./Slide").SnapSlide[];
protected get isDestroyed(): boolean;
protected get scrollableSlides(): import("./Slide").SnapSlide[];
/** Snap component */
protected addDestructor(callback: () => void): void;
/** Destroy wheel listeners */
private _destroy;
protected next(): boolean;
protected prev(): boolean;
protected stick(): boolean;
protected getNearestMagnet(coord: number): import("..").ISnapMagnet | undefined;
}
//# sourceMappingURL=index.d.ts.map