Skip to content

Commit

Permalink
v0.2.19
Browse files Browse the repository at this point in the history
  • Loading branch information
clementroche committed Oct 26, 2022
1 parent fa6c642 commit fb00d5e
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 36 deletions.
2 changes: 1 addition & 1 deletion bundled/lenis.js

Large diffs are not rendered by default.

32 changes: 6 additions & 26 deletions dist/lenis.d.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
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;
Expand All @@ -27,7 +7,7 @@ export default class Lenis {
smoothTouch?: boolean;
touchMultiplier?: number;
direction?: "vertical" | "horizontal";
gestureDirection?: "vertical" | "horizontal" | "both";
gestureDirection?: "both" | "vertical" | "horizontal";
infinite?: boolean;
wrapper?: Window | HTMLElement;
content?: HTMLElement;
Expand All @@ -40,9 +20,9 @@ export default class Lenis {
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "vertical" | "horizontal" | "both";
gestureDirection: "both" | "vertical" | "horizontal";
infinite: boolean;
wrapper: Window | HTMLElement;
wrapper: HTMLElement | Window;
content: HTMLElement;
};
duration: number;
Expand All @@ -52,9 +32,9 @@ export default class Lenis {
smoothTouch: boolean;
touchMultiplier: number;
direction: "vertical" | "horizontal";
gestureDirection: "vertical" | "horizontal" | "both";
gestureDirection: "both" | "vertical" | "horizontal";
infinite: boolean;
wrapperNode: Window | HTMLElement;
wrapperNode: HTMLElement | Window;
contentNode: HTMLElement;
wrapperHeight: any;
wrapperWidth: any;
Expand All @@ -76,7 +56,7 @@ export default class Lenis {
onWrapperResize: ([entry]: [any]) => void;
onContentResize: ([entry]: [any]) => void;
get limit(): number;
onVirtualScroll: ({ deltaY, deltaX, originalEvent: e }: {
onVirtualScroll: ({ deltaY, deltaX, originalEvent }: {
deltaY: any;
deltaX: any;
originalEvent: any;
Expand Down
2 changes: 1 addition & 1 deletion dist/lenis.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lenis.js.map

Large diffs are not rendered by default.

Loading

2 comments on commit fb00d5e

@vercel
Copy link

@vercel vercel bot commented on fb00d5e Oct 26, 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: 43
🟢 Accessibility: 100
🟢 Best practices: 92
🟢 SEO: 92
🟢 PWA: 100

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

Please sign in to comment.