Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
arzafran committed Nov 7, 2022
1 parent fe2f54e commit b2d1829
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 125 deletions.
2 changes: 1 addition & 1 deletion bundled/lenis.js

Large diffs are not rendered by default.

210 changes: 95 additions & 115 deletions dist/lenis.d.ts
Original file line number Diff line number Diff line change
@@ -1,115 +1,95 @@
export default class Lenis {
/**
* @typedef {(t: number) => number} EasingFunction
* @typedef {'vertical' | 'horizontal'} Direction
* @typedef {'vertical' | 'horizontal' | 'both'} GestureDirection
*
* @typedef LenisOptions
* @property {number} [duration]
* @property {EasingFunction} [easing]
* @property {boolean} [smooth]
* @property {number} [mouseMultiplier]
* @property {boolean} [smoothTouch]
* @property {number} [touchMultiplier]
* @property {Direction} [direction]
* @property {GestureDirection} [gestureDirection]
* @property {boolean} [infinite]
* @property {Window | HTMLElement} [wrapper]
* @property {HTMLElement} [content]
*
* @param {LenisOptions}
*/
constructor({ duration, easing, smooth, mouseMultiplier, smoothTouch, touchMultiplier, direction, gestureDirection, infinite, wrapper, content, }?: {
duration?: number;
easing?: (t: number) => number;
smooth?: boolean;
mouseMultiplier?: number;
smoothTouch?: boolean;
touchMultiplier?: number;
direction?: "vertical" | "horizontal";
gestureDirection?: "vertical" | "horizontal" | "both";
infinite?: boolean;
wrapper?: Window | HTMLElement;
content?: HTMLElement;
});
options: {
duration: number;
easing: (t: number) => number;
smooth: boolean;
mouseMultiplier: number;
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "vertical" | "horizontal" | "both";
infinite: boolean;
wrapper: Window | HTMLElement;
content: HTMLElement;
};
duration: number;
easing: (t: number) => number;
smooth: boolean;
mouseMultiplier: number;
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "vertical" | "horizontal" | "both";
infinite: boolean;
wrapperNode: Window | HTMLElement;
contentNode: HTMLElement;
wrapperHeight: any;
wrapperWidth: any;
wrapperObserver: ResizeObserver;
contentHeight: number;
contentWidth: number;
contentObserver: ResizeObserver;
targetScroll: any;
scroll: any;
lastScroll: any;
animate: Animate;
virtualScroll: any;
get scrollProperty(): string;
start(): void;
stopped: boolean;
stop(): void;
destroy(): void;
onWindowResize: () => void;
onWrapperResize: ([entry]: [any]) => void;
onContentResize: ([entry]: [any]) => void;
get limit(): number;
onVirtualScroll: ({ deltaY, deltaX, originalEvent: e }: {
deltaY: any;
deltaX: any;
originalEvent: any;
}) => void;
raf(now: any): void;
now: any;
isScrolling: boolean;
get velocity(): number;
setScroll(value: any): void;
onScroll: (e: any) => void;
notify(): void;
scrollTo(target: any, { offset, immediate, duration, easing, }?: {
offset?: number;
immediate?: boolean;
duration?: number;
easing?: (t: number) => number;
}): void;
}
declare class Animate {
to(target: any, { duration, easing, ...keys }?: {
duration?: number;
easing?: (t: any) => any;
}): void;
target: any;
fromKeys: {};
toKeys: {};
keys: string[];
duration: number;
easing: (t: any) => any;
currentTime: any;
isRunning: boolean;
stop(): void;
raf(deltaTime: any): void;
get progress(): number;
}
export {};
export default class Lenis {
constructor({ duration, easing, smooth, mouseMultiplier, smoothTouch, touchMultiplier, direction, gestureDirection, infinite, wrapper, content, }?: {
duration?: number;
easing?: (t: number) => number;
smooth?: boolean;
mouseMultiplier?: number;
smoothTouch?: boolean;
touchMultiplier?: number;
direction?: "vertical" | "horizontal";
gestureDirection?: "both" | "vertical" | "horizontal";
infinite?: boolean;
wrapper?: Window | HTMLElement;
content?: HTMLElement;
});
options: {
duration: number;
easing: (t: number) => number;
smooth: boolean;
mouseMultiplier: number;
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "both" | "vertical" | "horizontal";
infinite: boolean;
wrapper: HTMLElement | Window;
content: HTMLElement;
};
duration: number;
easing: (t: number) => number;
smooth: boolean;
mouseMultiplier: number;
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "both" | "vertical" | "horizontal";
infinite: boolean;
wrapperNode: HTMLElement | Window;
contentNode: HTMLElement;
wrapperHeight: any;
wrapperWidth: any;
wrapperObserver: ResizeObserver;
contentHeight: number;
contentWidth: number;
contentObserver: ResizeObserver;
targetScroll: any;
scroll: any;
lastScroll: any;
animate: Animate;
virtualScroll: any;
get scrollProperty(): string;
start(): void;
stopped: boolean;
stop(): void;
destroy(): void;
onWindowResize: () => void;
onWrapperResize: ([entry]: [any]) => void;
onContentResize: ([entry]: [any]) => void;
get limit(): number;
onVirtualScroll: ({ deltaY, deltaX, originalEvent: e }: {
deltaY: any;
deltaX: any;
originalEvent: any;
}) => void;
raf(now: any): void;
now: any;
isScrolling: boolean;
get velocity(): number;
setScroll(value: any): void;
onScroll: (e: any) => void;
notify(): void;
scrollTo(target: any, { offset, immediate, duration, easing, }?: {
offset?: number;
immediate?: boolean;
duration?: number;
easing?: (t: number) => number;
}): void;
}
declare class Animate {
to(target: any, { duration, easing, ...keys }?: {
duration?: number;
easing?: (t: any) => any;
}): void;
target: any;
fromKeys: {};
toKeys: {};
keys: string[];
duration: number;
easing: (t: any) => any;
currentTime: any;
isRunning: boolean;
stop(): void;
raf(deltaTime: any): void;
get progress(): number;
}
export {};
Loading

2 comments on commit b2d1829

@vercel
Copy link

@vercel vercel bot commented on b2d1829 Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"⚡️ Lighthouse report for the changes in this commit:

🔴 Performance: 47
🟢 Accessibility: 100
🟢 Best practices: 92
🟢 SEO: 92
🟢 PWA: 100

Lighthouse ran on https://lenis-goaf3tsso-studio-freight.vercel.app/"

Please sign in to comment.