Skip to content

Commit

Permalink
better tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
clementroche committed Jun 29, 2024
1 parent f24ce47 commit b672548
Show file tree
Hide file tree
Showing 45 changed files with 679 additions and 759 deletions.
20 changes: 0 additions & 20 deletions dist/animate.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/debounce.d.ts

This file was deleted.

25 changes: 0 additions & 25 deletions dist/dimensions.d.ts

This file was deleted.

36 changes: 0 additions & 36 deletions dist/element.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions dist/emitter.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/id.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion dist/lenis-react.mjs.map

Large diffs are not rendered by default.

28 changes: 13 additions & 15 deletions dist/lenis-snap.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,40 +42,38 @@ type Viewport = {
width: number;
height: number;
};
type SnapItem = {
value: number;
userData: object;
};
type SnapOptions = {
type?: 'mandatory' | 'proximity';
lerp?: number;
easing?: (t: number) => number;
duration?: number;
velocityThreshold?: number;
onSnapStart?: (t: number) => number;
onSnapComplete?: (t: number) => number;
debounce?: number;
onSnapStart?: (t: SnapItem) => void;
onSnapComplete?: (t: SnapItem) => void;
};
declare class Snap {
lenis: Lenis;
options: SnapOptions;
elements: Map<UID, SnapElement>;
snaps: Map<UID, number>;
snaps: Map<UID, SnapItem>;
viewport: Viewport;
isStopped: Boolean;
constructor(lenis: Lenis, { type, lerp, easing, duration, velocityThreshold, onSnapStart, onSnapComplete, }?: SnapOptions);
constructor(lenis: Lenis, { type, lerp, easing, duration, velocityThreshold, debounce: debounceDelay, onSnapStart, onSnapComplete, }?: SnapOptions);
destroy(): void;
start(): void;
stop(): void;
add(value: number): () => void;
add(value: number, userData?: object): () => void;
remove(id: UID): void;
addElement(element: HTMLElement, options?: SnapElementOptions): () => void;
removeElement(id: UID): void;
onWindowResize: () => void;
onScroll: ({ scroll, limit, lastVelocity, velocity, isScrolling, userData, isHorizontal, }: {
scroll: any;
limit: any;
lastVelocity: any;
velocity: any;
isScrolling: any;
userData: any;
isHorizontal: any;
}) => void;
private onWindowResize;
private onScroll;
private onSnap;
}

export { type SnapOptions, Snap as default };
Loading

0 comments on commit b672548

Please sign in to comment.