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

9
node_modules/lenis/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,9 @@
The MIT License
Copyright (c) 2024 darkroom.engineering
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

378
node_modules/lenis/README.md generated vendored Normal file
View File

@@ -0,0 +1,378 @@
[![LENIS](https://assets.darkroom.engineering/lenis/banner.gif)](https://github.com/darkroomengineering/lenis)
[![npm](https://img.shields.io/npm/v/lenis?colorA=E30613&colorB=000000
)](https://www.npmjs.com/package/lenis)
[![downloads](https://img.shields.io/npm/dm/lenis?colorA=E30613&colorB=000000
)](https://www.npmjs.com/package/lenis)
[![size](https://img.shields.io/bundlephobia/minzip/lenis?label=size&colorA=E30613&colorB=000000)](https://bundlephobia.com/package/lenis)
## Introduction
Lenis ("smooth" in latin) is a lightweight, robust, and performant smooth scroll library. It's designed by [@darkroom.engineering](https://twitter.com/darkroomdevs) to be simple to use and easy to integrate into your projects. It's built with performance in mind and is optimized for modern browsers. It's perfect for creating smooth scrolling experiences on your website such as WebGL scroll syncing, parallax effects, and much more, see [ Demo](https://lenis.darkroom.engineering/) and [Showcase](#lenis-in-use).
Read our [Manifesto](https://github.com/darkroomengineering/lenis/blob/main/MANIFESTO.md) to learn more about the inspiration behind Lenis.
<br/>
- [Sponsors](#sponsors)
- [Packages](#packages)
- [Installation](#installation)
- [Setup](#setup)
- [Settings](#settings)
- [Properties](#properties)
- [Methods](#methods)
- [Events](#events)
- [Considerations](#considerations)
- [Limitations](#limitations)
- [Troubleshooting](#troubleshooting)
- [Tutorials](#tutorials)
- [Plugins](#plugins)
- [Lenis in Use](#lenis-in-use)
- [License](#license)
<br/>
## Sponsors
If youve used Lenis and it made your site feel just a little more alive, consider [sponsoring](https://github.com/sponsors/darkroomengineering).
Your support helps us smooth out the internet one library at a time—and lets us keep building tools that care about the details most folks overlook.
<!-- sponsors -->
<a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" width="60px" alt="User avatar: Syntax" /></a>
<a href="https://github.com/glauber-sampaio"><img src="https://github.com/glauber-sampaio.png" width="60px" alt="User avatar: Glauber" /></a>
<a href="https://itsoffbrand.com"><img src="https://github.com/itsoffbrand.png" width="60px" alt="User avatar: OFF+BRAND." /></a>
<a href="https://bizar.ro"><img src="https://github.com/bizarro.png" width="60px" alt="User avatar: Luis Bizarro" /></a>
<a href="https://github.com/OHO-Design"><img src="https://github.com/OHO-Design.png" width="60px" alt="User avatar: OHO Design" /></a>
<a href="https://github.com/ae-com"><img src="https://github.com/ae-com.png" width="60px" alt="User avatar: Æ" /></a>
<a href="https://ironvelvet.studio"><img src="https://github.com/ironvelvet.png" width="60px" alt="User avatar: Iron Velvet" /></a>
<a href="https://federic.ooo/"><img src="https://github.com/vallafederico.png" width="60px" alt="User avatar: Federico Valla" /></a>
<a href="https://www.non-linear.studio"><img src="https://github.com/mariosmaselli.png" width="60px" alt="User avatar: Mario Sanchez Maselli" /></a>
<a href="https://github.com/thearkis"><img src="https://github.com/thearkis.png" width="60px" alt="User avatar: ΛRK®" /></a>
<a href="https://github.com/smsunarto"><img src="https://github.com/smsunarto.png" width="60px" alt="User avatar: Scott" /></a>
<a href="https://www.cachet.studio"><img src="https://github.com/cachet-studio.png" width="60px" alt="User avatar: cachet.studio" /></a>
<!-- sponsors -->
<br />
<br />
<a href="https://vercel.com/oss">
<img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" />
</a>
<br />
## Packages
- [lenis](https://github.com/darkroomengineering/lenis/blob/main/README.md)
- [lenis/react](https://github.com/darkroomengineering/lenis/blob/main/packages/react/README.md)
- [lenis/vue](https://github.com/darkroomengineering/lenis/tree/main/packages/vue/README.md)
- [lenis/framer](https://lenis.framer.website/)
- [lenis/snap](https://github.com/darkroomengineering/lenis/tree/main/packages/snap/README.md)
<br>
## Installation
Using a package manager:
```bash
npm i lenis
```
```js
import Lenis from 'lenis'
```
<br/>
Using scripts:
```html
<script src="https://unpkg.com/lenis@1.3.14/dist/lenis.min.js"></script>
```
<br>
## Setup
### Basic:
```js
// Initialize Lenis
const lenis = new Lenis({
autoRaf: true,
});
// Listen for the scroll event and log the event data
lenis.on('scroll', (e) => {
console.log(e);
});
```
### Custom raf loop:
```js
// Initialize Lenis
const lenis = new Lenis();
// Use requestAnimationFrame to continuously update the scroll
function raf(time) {
lenis.raf(time);
requestAnimationFrame(raf);
}
requestAnimationFrame(raf);
```
### Recommended CSS:
import stylesheet
```js
import 'lenis/dist/lenis.css'
```
or link the CSS file:
```html
<link rel="stylesheet" href="https://unpkg.com/lenis@1.3.14/dist/lenis.css">
```
or add it manually:
[See lenis.css stylesheet](./packages/core/lenis.css)
### GSAP ScrollTrigger:
```js
// Initialize a new Lenis instance for smooth scrolling
const lenis = new Lenis();
// Synchronize Lenis scrolling with GSAP's ScrollTrigger plugin
lenis.on('scroll', ScrollTrigger.update);
// Add Lenis's requestAnimationFrame (raf) method to GSAP's ticker
// This ensures Lenis's smooth scroll animation updates on each GSAP tick
gsap.ticker.add((time) => {
lenis.raf(time * 1000); // Convert time from seconds to milliseconds
});
// Disable lag smoothing in GSAP to prevent any delay in scroll animations
gsap.ticker.lagSmoothing(0);
```
### React:
[See documentation for lenis/react](https://github.com/darkroomengineering/lenis/blob/main/packages/react/README.md).
<br/>
## Settings
| Option | Type | Default | Description |
|------------------------|----------------------------|----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `wrapper` | `HTMLElement, Window` | `window` | The element that will be used as the scroll container. |
| `content` | `HTMLElement` | `document.documentElement` | The element that contains the content that will be scrolled, usually `wrapper`'s direct child. |
| `eventsTarget` | `HTMLElement, Window` | `wrapper` | The element that will listen to `wheel` and `touch` events. |
| `smoothWheel` | `boolean` | `true` | Smooth the scroll initiated by `wheel` events. |
| `lerp` | `number` | `0.1` | Linear interpolation (lerp) intensity (between 0 and 1). |
| `duration` | `number` | `1.2` | The duration of scroll animation (in seconds). Useless if lerp defined. |
| `easing` | `function` | `(t) => Math.min(1, 1.001 - Math.pow(2, -10 * t))` | The easing function to use for the scroll animation, our default is custom but you can pick one from [Easings.net](https://easings.net/en). Useless if lerp defined. |
| `orientation` | `string` | `vertical` | The orientation of the scrolling. Can be `vertical` or `horizontal`. |
| `gestureOrientation` | `string` | `vertical` | The orientation of the gestures. Can be `vertical`, `horizontal` or `both`. |
| `syncTouch` | `boolean` | `false` | Mimic touch device scroll while allowing scroll sync (can be unstable on iOS<16). |
| `syncTouchLerp` | `number` | `0.075` | Lerp applied during `syncTouch` inertia. |
| `touchInertiaExponent` | `number` | `1.7` | Manage the strength of syncTouch inertia. |
| `wheelMultiplier` | `number` | `1` | The multiplier to use for mouse wheel events. |
| `touchMultiplier` | `number` | `1` | The multiplier to use for touch events. |
| `infinite` | `boolean` | `false` | Enable infinite scrolling! `syncTouch: true` is required on touch devices ([See example](https://codepen.io/ClementRoche/pen/OJqBLod)). |
| `autoResize` | `boolean` | `true` | Resize instance automatically based on `ResizeObserver`. If `false` you must resize manually using `.resize()`. |
| `prevent` | `function` | `undefined` | Manually prevent scroll to be smoothed based on elements traversed by events. If `true` is returned, it will prevent the scroll to be smoothed. Example: `(node) => node.classList.contains('cookie-modal')`. |
| `virtualScroll` | `function` | `undefined` | Manually modify the events before they get consumed. If `false` is returned, the scroll will not be smoothed. Examples: `(e) => { e.deltaY /= 2 }` (to slow down vertical scroll) or `({ event }) => !event.shiftKey` (to prevent scroll to be smoothed if shift key is pressed). |
| `overscroll` | `boolean` | `true` | Similar to CSS overscroll-behavior (https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior). |
| `autoRaf` | `boolean` | `false` | Wether or not to automatically run `requestAnimationFrame` loop. |
| `anchors` | `boolean, ScrollToOptions` | `false` | Scroll to anchor links when clicked. If `true` is passed, it will enable anchor links with default options. If `ScrollToOptions` is passed, it will enable anchor links with the given options. |
| `autoToggle` | `boolean` | `false` | Automatically start or stop the lenis instance based on the wrapper's overflow property, ⚠️ this requires Lenis recommended CSS. Safari > 17.3, Chrome > 116 and Firefox > 128 ([https://caniuse.com/?search=transition-behavior](https://caniuse.com/?search=transition-behavior)). |
| `allowNestedScroll` | `boolean` | `false` | Allow nested scrolls. If `true` is passed, it will allow nested scrolls. If `false` is passed, it will not allow nested scrolls. ⚠️ To be used with caution since this can lead to performance issues, prefer using `prevent` or `data-lenis-prevent` instead. |
<br/>
<!-- `target`: goal to reach
- `number`: value to scroll in pixels
- `string`: CSS selector or keyword (`top`, `left`, `start`, `bottom`, `right`, `end`)
- `HTMLElement`: DOM element
<br/>
`options`:
- `offset`(`number`): equivalent to [`scroll-padding-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top)
- `lerp`(`number`): animation lerp intensity
- `duration`(`number`): animation duration (in seconds)
- `easing`(`function`): animation easing
- `immediate`(`boolean`): ignore duration, easing and lerp
- `lock`(`boolean`): whether or not to prevent user from scrolling until target reached
- `onComplete`(`function`): called when target is reached -->
## Properties
| Property | Type | Description |
|-------------------------|-------------------|----------------------------------------------------------------------------|
| `animatedScroll` | `number` | Current scroll value |
| `dimensions` | `object` | Dimensions instance |
| `direction` | `number` | `1`: scrolling up, `-1`: scrolling down |
| `emitter` | `object` | Emitter instance |
| `options` | `object` | Instance options |
| `targetScroll` | `number` | Target scroll value |
| `time` | `number` | Time elapsed since instance creation |
| `actualScroll` | `number` | Current scroll value registered by the browser |
| `lastVelocity` | `number` | last scroll velocity |
| `velocity` | `number` | Current scroll velocity |
| `isHorizontal` (getter) | `boolean` | Whether or not the instance is horizontal |
| `isScrolling` (getter) | `boolean, string` | Whether or not the scroll is being animated, `smooth`, `native` or `false` |
| `isStopped` (getter) | `boolean` | Whether or not the user should be able to scroll |
| `limit` (getter) | `number` | Maximum scroll value |
| `progress` (getter) | `number` | Scroll progress from `0` to `1` |
| `rootElement` (getter) | `HTMLElement` | Element on which Lenis is instanced |
| `scroll` (getter) | `number` | Current scroll value (handles infinite scroll if activated) |
| `className` (getter) | `string` | `rootElement` className |
<br/>
## Methods
| Method | Description | Arguments |
|-----------------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `raf(time)` | Must be called every frame for internal usage. | `time`: in ms |
| `scrollTo(target, options)` | Scroll to target. | `target`: goal to reach<ul><li>`number`: value to scroll in pixels</li><li>`string`: CSS selector or keyword (`top`, `left`, `start`, `bottom`, `right`, `end`)</li><li>`HTMLElement`: DOM element</li></ul>`options`<ul><li>`offset`(`number`): equivalent to [`scroll-padding-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top)</li><li>`lerp`(`number`): animation lerp intensity</li><li>`duration`(`number`): animation duration (in seconds)</li><li>`easing`(`function`): animation easing</li><li>`immediate`(`boolean`): ignore duration, easing and lerp</li><li>`lock`(`boolean`): whether or not to prevent the user from scrolling until the target is reached</li><li>`force`(`boolean`): reach target even if instance is stopped</li><li>`onComplete`(`function`): called when the target is reached</li><li>`userData`(`object`): this object will be forwarded through `scroll` events</li></ul> |
| `on(id, function)` | `id` can be any of the following [instance events](#instance-events) to listen. | |
| `stop()` | Pauses the scroll | |
| `start()` | Resumes the scroll | |
| `resize()` | Compute internal sizes, it has to be used if `autoResize` option is `false`. | |
| `destroy()` | Destroys the instance and removes all events. | |
## Events
| Event | Callback Arguments |
|------------------|---------------------------|
| `scroll` | Lenis instance |
| `virtual-scroll` | `{deltaX, deltaY, event}` |
<br/>
## Considerations
### Nested scroll
#### Using Javascript
```html
<div id="modal">scrollable content</div>
```
```js
const lenis = new Lenis({
prevent: (node) => node.id === 'modal',
})
```
[See example](https://codepen.io/ClementRoche/pen/emONGYN)
#### Using HTML
```html
<div data-lenis-prevent>scrollable content</div>
```
[See example](https://codepen.io/ClementRoche/pen/PoLdjpw)
prevent wheel events only
```html
<div data-lenis-prevent-wheel>scrollable content</div>
```
prevent touch events only
```html
<div data-lenis-prevent-touch>scrollable content</div>
```
### Anchor links
By default, Lenis will prevent anchor links, click while scrolling, to fix that you must set `anchors: true`.
```js
new Lenis({
anchors: true
})
```
You can also use `scrollTo` options.
```js
new Lenis({
anchors: {
offset: 100,
onComplete: ()=>{
console.log('scrolled to anchor')
}
}
})
```
<br>
## Limitations
- no support for CSS scroll-snap, you must use ([lenis/snap](https://github.com/darkroomengineering/lenis/tree/main/packages/snap/README.md))
- capped to 60fps on Safari ([source](https://bugs.webkit.org/show_bug.cgi?id=173434)) and 30fps on low power mode
- smooth scroll will stop working over iframe since they don't forward wheel events
- position fixed seems to lag on MacOS Safari pre-M1 ([source](https://github.com/darkroomengineering/lenis/issues/103))
- touch events may behave unexpectedly when `syncTouch` is enabled on iOS < 16
- nested scroll containers require proper configuration to work correctly
<br>
## Troubleshooting
- Make sure you use the latest version of [Lenis](https://www.npmjs.com/package/lenis?activeTab=versions)
- Include recommended CSS.
- Remove GSAP ScrollTrigger.
- Remove Lenis and be sure that your element/page is scrollable anyway.
- Be sure to use `autoRaf: true` or to manually call `lenis.raf(time)`.
<br>
## Tutorials
- [Scroll Animation Ideas for Image Grids](https://tympanus.net/Development/ScrollAnimationsGrid/) by [Codrops](https://tympanus.net/codrops)
- [How to Animate SVG Shapes on Scroll](https://tympanus.net/codrops/2022/06/08/how-to-animate-svg-shapes-on-scroll) by [Codrops](https://tympanus.net/codrops)
- [The BEST smooth scrolling library for your Webflow website! (Lenis)](https://www.youtube.com/watch?v=VtCqTLRRMII) by [Diego Toda de Oliveira](https://www.diegoliv.works/)
- [Easy smooth scroll in @Webflow with Lenis + GSAP ScrollTrigger tutorial](https://www.youtube.com/watch?v=gRKuzQTXq74) by [También Studio](https://www.tambien.studio/)
<br>
## Plugins
- [r3f-scroll-rig](https://github.com/14islands/r3f-scroll-rig) by [14islands](https://14islands.com/)
- [locomotive-scroll](https://github.com/locomotivemtl/locomotive-scroll) by [Locomotive](https://locomotive.ca/)
<br>
## Lenis in use
- [DeSo](https://deso.com) by [Studio Freight](https://www.studiofreight.com/)
- [Sculpting Harmony](https://gehry.getty.edu/) by [Resn](https://resn.co.nz/)
- [Superpower](https://superpower.com/)
- [Daylight Computer](https://daylightcomputer.com/) by [Basement Studio](https://basement.studio/)
- [Lifeworld by Olafur Eliasson](https://lifeworld.wetransfer.com/) by Nicolas Garnier, Simon Riisnæs Dagfinrud, Lumír Španihel, Everton Guilherme, Diana Alcausin, Cristiana Sousa
<br/>
## License
MIT © [darkroom.engineering](https://github.com/darkroomengineering)

105
node_modules/lenis/dist/lenis-react.d.ts generated vendored Normal file
View File

@@ -0,0 +1,105 @@
import * as Lenis from 'lenis';
import Lenis__default, { ScrollCallback, LenisOptions } from 'lenis';
import * as react from 'react';
import { ComponentPropsWithoutRef, ReactNode } from 'react';
type LenisContextValue = {
lenis: Lenis__default;
addCallback: (callback: ScrollCallback, priority: number) => void;
removeCallback: (callback: ScrollCallback) => void;
};
type LenisProps = ComponentPropsWithoutRef<'div'> & {
/**
* Setup a global instance of Lenis
* if `asChild`, the component will render wrapper and content divs
* @default false
*/
root?: boolean | 'asChild';
/**
* Lenis options
*/
options?: LenisOptions;
/**
* Auto-setup requestAnimationFrame
* @default true
* @deprecated use options.autoRaf instead
*/
autoRaf?: boolean;
/**
* Children
*/
children?: ReactNode;
};
type LenisRef = {
/**
* The wrapper div element
*
* Will only be defined if `root` is `false` or `root` is `asChild`
*/
wrapper: HTMLDivElement | null;
/**
* The content div element
*
* Will only be defined if `root` is `false` or `root` is `asChild`
*/
content: HTMLDivElement | null;
/**
* The lenis instance
*/
lenis?: Lenis__default;
};
declare const LenisContext: react.Context<LenisContextValue | null>;
/**
* React component to setup a Lenis instance
*/
declare const ReactLenis: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
root?: boolean | "asChild";
options?: Lenis.LenisOptions;
autoRaf?: boolean;
children?: react.ReactNode;
} & react.RefAttributes<LenisRef>>;
/**
* Hook to access the Lenis instance and its methods
*
* @example <caption>Scroll callback</caption>
* useLenis((lenis) => {
* if (lenis.isScrolling) {
* console.log('Scrolling...')
* }
*
* if (lenis.progress === 1) {
* console.log('At the end!')
* }
* })
*
* @example <caption>Scroll callback with dependencies</caption>
* useLenis((lenis) => {
* if (lenis.isScrolling) {
* console.log('Scrolling...', someDependency)
* }
* }, [someDependency])
* @example <caption>Scroll callback with priority</caption>
* useLenis((lenis) => {
* if (lenis.isScrolling) {
* console.log('Scrolling...')
* }
* }, [], 1)
* @example <caption>Instance access</caption>
* const lenis = useLenis()
*
* handleClick() {
* lenis.scrollTo(100, {
* lerp: 0.1,
* duration: 1,
* easing: (t) => t,
* onComplete: () => {
* console.log('Complete!')
* }
* })
* }
*/
declare function useLenis(callback?: ScrollCallback, deps?: any[], priority?: number): Lenis.default | undefined;
export { ReactLenis as Lenis, LenisContext, type LenisContextValue, type LenisProps, type LenisRef, ReactLenis, ReactLenis as default, useLenis };

156
node_modules/lenis/dist/lenis-react.mjs generated vendored Normal file
View File

@@ -0,0 +1,156 @@
"use client";
// packages/react/src/provider.tsx
import Lenis from "lenis";
import {
createContext,
forwardRef,
useCallback,
useEffect as useEffect2,
useImperativeHandle,
useRef,
useState as useState2
} from "react";
// packages/react/src/store.ts
import { useEffect, useState } from "react";
var Store = class {
constructor(state) {
this.state = state;
}
listeners = [];
set(state) {
this.state = state;
for (let listener of this.listeners) {
listener(this.state);
}
}
subscribe(listener) {
this.listeners = [...this.listeners, listener];
return () => {
this.listeners = this.listeners.filter((l) => l !== listener);
};
}
get() {
return this.state;
}
};
function useStore(store) {
const [state, setState] = useState(store.get());
useEffect(() => {
return store.subscribe((state2) => setState(state2));
}, [store]);
return state;
}
// packages/react/src/provider.tsx
import { jsx } from "react/jsx-runtime";
var LenisContext = createContext(null);
var rootLenisContextStore = new Store(null);
var ReactLenis = forwardRef(
({
children,
root = false,
options = {},
autoRaf = true,
...props
}, ref) => {
const wrapperRef = useRef(null);
const contentRef = useRef(null);
const [lenis, setLenis] = useState2(void 0);
useImperativeHandle(
ref,
() => ({
wrapper: wrapperRef.current,
content: contentRef.current,
lenis
}),
[lenis]
);
useEffect2(() => {
const lenis2 = new Lenis({
...options,
...wrapperRef.current && contentRef.current && {
wrapper: wrapperRef.current,
content: contentRef.current
},
autoRaf: options?.autoRaf ?? autoRaf
// this is to avoid breaking the autoRaf prop if it's still used (require breaking change)
});
setLenis(lenis2);
return () => {
lenis2.destroy();
setLenis(void 0);
};
}, [root, JSON.stringify({ ...options, wrapper: null, content: null })]);
const callbacksRefs = useRef([]);
const addCallback = useCallback(
(callback, priority) => {
callbacksRefs.current.push({ callback, priority });
callbacksRefs.current.sort((a, b) => a.priority - b.priority);
},
[]
);
const removeCallback = useCallback(
(callback) => {
callbacksRefs.current = callbacksRefs.current.filter(
(cb) => cb.callback !== callback
);
},
[]
);
useEffect2(() => {
if (root && lenis) {
rootLenisContextStore.set({ lenis, addCallback, removeCallback });
return () => rootLenisContextStore.set(null);
}
}, [root, lenis, addCallback, removeCallback]);
useEffect2(() => {
if (!lenis) return;
const onScroll = (data) => {
for (let i = 0; i < callbacksRefs.current.length; i++) {
callbacksRefs.current[i]?.callback(data);
}
};
lenis.on("scroll", onScroll);
return () => {
lenis.off("scroll", onScroll);
};
}, [lenis]);
if (!children) return null;
return /* @__PURE__ */ jsx(
LenisContext.Provider,
{
value: { lenis, addCallback, removeCallback },
children: root && root !== "asChild" ? children : /* @__PURE__ */ jsx("div", { ref: wrapperRef, ...props, children: /* @__PURE__ */ jsx("div", { ref: contentRef, children }) })
}
);
}
);
// packages/react/src/use-lenis.ts
import { useContext, useEffect as useEffect3 } from "react";
var fallbackContext = {};
function useLenis(callback, deps = [], priority = 0) {
const localContext = useContext(LenisContext);
const rootContext = useStore(rootLenisContextStore);
const currentContext = localContext ?? rootContext ?? fallbackContext;
const { lenis, addCallback, removeCallback } = currentContext;
useEffect3(() => {
if (!callback || !addCallback || !removeCallback || !lenis) return;
addCallback(callback, priority);
callback(lenis);
return () => {
removeCallback(callback);
};
}, [lenis, addCallback, removeCallback, priority, ...deps]);
return lenis;
}
export {
ReactLenis as Lenis,
LenisContext,
ReactLenis,
ReactLenis as default,
useLenis
};
//# sourceMappingURL=lenis-react.mjs.map

1
node_modules/lenis/dist/lenis-react.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

160
node_modules/lenis/dist/lenis-snap.d.ts generated vendored Normal file
View File

@@ -0,0 +1,160 @@
import Lenis, { EasingFunction, VirtualScrollData } from 'lenis';
type SnapElementOptions = {
align?: string | string[];
ignoreSticky?: boolean;
ignoreTransform?: boolean;
};
type Rect = {
top: number;
left: number;
width: number;
height: number;
x: number;
y: number;
bottom: number;
right: number;
element: HTMLElement;
};
declare class SnapElement {
element: HTMLElement;
options: SnapElementOptions;
align: string[];
rect: Rect;
wrapperResizeObserver: ResizeObserver;
resizeObserver: ResizeObserver;
debouncedWrapperResize: () => void;
constructor(element: HTMLElement, { align, ignoreSticky, ignoreTransform, }?: SnapElementOptions);
destroy(): void;
setRect({ top, left, width, height, element, }?: {
top?: number;
left?: number;
width?: number;
height?: number;
element?: HTMLElement;
}): void;
onWrapperResize: () => void;
onResize: ([entry]: ResizeObserverEntry[]) => void;
}
type SnapItem = {
value: number;
};
type OnSnapCallback = (item: SnapItem & {
index?: number;
}) => void;
type SnapOptions = {
/**
* Snap type
* @default 'proximity'
*/
type?: 'mandatory' | 'proximity' | 'lock';
/**
* @description Linear interpolation (lerp) intensity (between 0 and 1)
*/
lerp?: number;
/**
* @description The easing function to use for the snap animation
*/
easing?: EasingFunction;
/**
* @description The duration of the snap animation (in s)
*/
duration?: number;
/**
* @default '50%'
* @description The distance threshold from the snap point to the scroll position. Ignored when `type` is `mandatory`. If a percentage, it is relative to the viewport size. If a number, it is absolute.
*/
distanceThreshold?: number | `${number}%`;
/**
* @default 500
* @description The debounce delay (in ms) to prevent snapping too often.
*/
debounce?: number;
/**
* @description Called when the snap starts
*/
onSnapStart?: OnSnapCallback;
/**
* @description Called when the snap completes
*/
onSnapComplete?: OnSnapCallback;
};
type RequiredPick<T, F extends keyof T> = Omit<T, F> & Required<Pick<T, F>>;
/**
* Snap class to handle the snap functionality
*
* @example
* const snap = new Snap(lenis, {
* type: 'mandatory', // 'mandatory', 'proximity' or 'lock'
* onSnapStart: (snap) => {
* console.log('onSnapStart', snap)
* },
* onSnapComplete: (snap) => {
* console.log('onSnapComplete', snap)
* },
* })
*
* snap.add(500) // snap at 500px
*
* const removeSnap = snap.add(500)
*
* if (someCondition) {
* removeSnap()
* }
*/
declare class Snap {
private lenis;
options: RequiredPick<SnapOptions, 'type' | 'debounce'>;
elements: Map<number, SnapElement>;
snaps: Map<number, SnapItem>;
viewport: {
width: number;
height: number;
};
isStopped: boolean;
onSnapDebounced: (e: VirtualScrollData) => void;
currentSnapIndex?: number;
constructor(lenis: Lenis, { type, lerp, easing, duration, distanceThreshold, // useless when type is "mandatory"
debounce: debounceDelay, onSnapStart, onSnapComplete, }?: SnapOptions);
/**
* Destroy the snap instance
*/
destroy(): void;
/**
* Start the snap after it has been stopped
*/
start(): void;
/**
* Stop the snap
*/
stop(): void;
/**
* Add a snap to the snap instance
*
* @param value The value to snap to
* @param userData User data that will be forwarded through the snap event
* @returns Unsubscribe function
*/
add(value: number): () => void;
/**
* Add an element to the snap instance
*
* @param element The element to add
* @param options The options for the element
* @returns Unsubscribe function
*/
addElement(element: HTMLElement, options?: SnapElementOptions): () => void;
addElements(elements: HTMLElement[], options?: SnapElementOptions): () => void;
private onWindowResize;
private computeSnaps;
previous(): void;
next(): void;
goTo(index: number): void;
get distanceThreshold(): number;
private onSnap;
resize(): void;
}
export { type OnSnapCallback, type SnapItem, type SnapOptions, Snap as default };

350
node_modules/lenis/dist/lenis-snap.js generated vendored Normal file
View File

@@ -0,0 +1,350 @@
// packages/snap/src/debounce.ts
function debounce(callback, delay) {
let timer;
return function(...args) {
let context = this;
clearTimeout(timer);
timer = setTimeout(() => {
timer = void 0;
callback.apply(context, args);
}, delay);
};
}
// packages/snap/src/element.ts
function removeParentSticky(element) {
const position = getComputedStyle(element).position;
const isSticky = position === "sticky";
if (isSticky) {
element.style.setProperty("position", "static");
element.dataset.sticky = "true";
}
if (element.offsetParent) {
removeParentSticky(element.offsetParent);
}
}
function addParentSticky(element) {
if (element?.dataset?.sticky === "true") {
element.style.removeProperty("position");
delete element.dataset.sticky;
}
if (element.offsetParent) {
addParentSticky(element.offsetParent);
}
}
function offsetTop(element, accumulator = 0) {
const top = accumulator + element.offsetTop;
if (element.offsetParent) {
return offsetTop(element.offsetParent, top);
}
return top;
}
function offsetLeft(element, accumulator = 0) {
const left = accumulator + element.offsetLeft;
if (element.offsetParent) {
return offsetLeft(element.offsetParent, left);
}
return left;
}
function scrollTop(element, accumulator = 0) {
const top = accumulator + element.scrollTop;
if (element.offsetParent) {
return scrollTop(element.offsetParent, top);
}
return top + window.scrollY;
}
function scrollLeft(element, accumulator = 0) {
const left = accumulator + element.scrollLeft;
if (element.offsetParent) {
return scrollLeft(element.offsetParent, left);
}
return left + window.scrollX;
}
var SnapElement = class {
element;
options;
align;
// @ts-ignore
rect = {};
wrapperResizeObserver;
resizeObserver;
debouncedWrapperResize;
constructor(element, {
align = ["start"],
ignoreSticky = true,
ignoreTransform = false
} = {}) {
this.element = element;
this.options = { align, ignoreSticky, ignoreTransform };
this.align = [align].flat();
this.debouncedWrapperResize = debounce(this.onWrapperResize, 500);
this.wrapperResizeObserver = new ResizeObserver(this.debouncedWrapperResize);
this.wrapperResizeObserver.observe(document.body);
this.onWrapperResize();
this.resizeObserver = new ResizeObserver(this.onResize);
this.resizeObserver.observe(this.element);
this.setRect({
width: this.element.offsetWidth,
height: this.element.offsetHeight
});
}
destroy() {
this.wrapperResizeObserver.disconnect();
this.resizeObserver.disconnect();
}
setRect({
top,
left,
width,
height,
element
} = {}) {
top = top ?? this.rect.top;
left = left ?? this.rect.left;
width = width ?? this.rect.width;
height = height ?? this.rect.height;
element = element ?? this.rect.element;
if (top === this.rect.top && left === this.rect.left && width === this.rect.width && height === this.rect.height && element === this.rect.element)
return;
this.rect.top = top;
this.rect.y = top;
this.rect.width = width;
this.rect.height = height;
this.rect.left = left;
this.rect.x = left;
this.rect.bottom = top + height;
this.rect.right = left + width;
}
onWrapperResize = () => {
let top, left;
if (this.options.ignoreSticky) removeParentSticky(this.element);
if (this.options.ignoreTransform) {
top = offsetTop(this.element);
left = offsetLeft(this.element);
} else {
const rect = this.element.getBoundingClientRect();
top = rect.top + scrollTop(this.element);
left = rect.left + scrollLeft(this.element);
}
if (this.options.ignoreSticky) addParentSticky(this.element);
this.setRect({ top, left });
};
onResize = ([entry]) => {
if (!entry?.borderBoxSize[0]) return;
const width = entry.borderBoxSize[0].inlineSize;
const height = entry.borderBoxSize[0].blockSize;
this.setRect({ width, height });
};
};
// packages/snap/src/uid.ts
var index = 0;
function uid() {
return index++;
}
// packages/snap/src/snap.ts
var Snap = class {
constructor(lenis, {
type = "proximity",
lerp,
easing,
duration,
distanceThreshold = "50%",
// useless when type is "mandatory"
debounce: debounceDelay = 500,
onSnapStart,
onSnapComplete
} = {}) {
this.lenis = lenis;
this.options = {
type,
lerp,
easing,
duration,
distanceThreshold,
debounce: debounceDelay,
onSnapStart,
onSnapComplete
};
this.onWindowResize();
window.addEventListener("resize", this.onWindowResize, false);
this.onSnapDebounced = debounce(this.onSnap, this.options.debounce);
this.lenis.on("virtual-scroll", this.onSnapDebounced);
}
options;
elements = /* @__PURE__ */ new Map();
snaps = /* @__PURE__ */ new Map();
viewport = {
width: window.innerWidth,
height: window.innerHeight
};
isStopped = false;
onSnapDebounced;
currentSnapIndex;
/**
* Destroy the snap instance
*/
destroy() {
this.lenis.off("virtual-scroll", this.onSnapDebounced);
window.removeEventListener("resize", this.onWindowResize, false);
this.elements.forEach((element) => element.destroy());
}
/**
* Start the snap after it has been stopped
*/
start() {
this.isStopped = false;
}
/**
* Stop the snap
*/
stop() {
this.isStopped = true;
}
/**
* Add a snap to the snap instance
*
* @param value The value to snap to
* @param userData User data that will be forwarded through the snap event
* @returns Unsubscribe function
*/
add(value) {
const id = uid();
this.snaps.set(id, { value });
return () => this.snaps.delete(id);
}
/**
* Add an element to the snap instance
*
* @param element The element to add
* @param options The options for the element
* @returns Unsubscribe function
*/
addElement(element, options = {}) {
const id = uid();
this.elements.set(id, new SnapElement(element, options));
return () => this.elements.delete(id);
}
addElements(elements, options = {}) {
const map = elements.map((element) => this.addElement(element, options));
return () => {
map.forEach((remove) => {
remove();
});
};
}
onWindowResize = () => {
this.viewport.width = window.innerWidth;
this.viewport.height = window.innerHeight;
};
computeSnaps = () => {
const { isHorizontal } = this.lenis;
let snaps = [...this.snaps.values()];
this.elements.forEach(({ rect, align }) => {
let value;
align.forEach((align2) => {
if (align2 === "start") {
value = rect.top;
} else if (align2 === "center") {
value = isHorizontal ? rect.left + rect.width / 2 - this.viewport.width / 2 : rect.top + rect.height / 2 - this.viewport.height / 2;
} else if (align2 === "end") {
value = isHorizontal ? rect.left + rect.width - this.viewport.width : rect.top + rect.height - this.viewport.height;
}
if (typeof value === "number") {
snaps.push({ value: Math.ceil(value) });
}
});
});
snaps = snaps.sort((a, b) => Math.abs(a.value) - Math.abs(b.value));
return snaps;
};
previous() {
this.goTo((this.currentSnapIndex ?? 0) - 1);
}
next() {
this.goTo((this.currentSnapIndex ?? 0) + 1);
}
goTo(index2) {
const snaps = this.computeSnaps();
if (snaps.length === 0) return;
this.currentSnapIndex = Math.max(0, Math.min(index2, snaps.length - 1));
const currentSnap = snaps[this.currentSnapIndex];
if (currentSnap === void 0) return;
this.lenis.scrollTo(currentSnap.value, {
duration: this.options.duration,
easing: this.options.easing,
lerp: this.options.lerp,
lock: this.options.type === "lock",
userData: { initiator: "snap" },
onStart: () => {
this.options.onSnapStart?.({
index: this.currentSnapIndex,
...currentSnap
});
},
onComplete: () => {
this.options.onSnapComplete?.({
index: this.currentSnapIndex,
...currentSnap
});
}
});
}
get distanceThreshold() {
let distanceThreshold = Infinity;
if (this.options.type === "mandatory") return Infinity;
const { isHorizontal } = this.lenis;
const axis = isHorizontal ? "width" : "height";
if (typeof this.options.distanceThreshold === "string" && this.options.distanceThreshold.endsWith("%")) {
distanceThreshold = Number(this.options.distanceThreshold.replace("%", "")) / 100 * this.viewport[axis];
} else if (typeof this.options.distanceThreshold === "number") {
distanceThreshold = this.options.distanceThreshold;
} else {
distanceThreshold = this.viewport[axis];
}
return distanceThreshold;
}
onSnap = (e) => {
if (this.isStopped) return;
if (e.event.type === "touchmove") return;
if (this.options.type === "lock" && this.lenis.userData?.initiator === "snap")
return;
let { scroll, isHorizontal } = this.lenis;
const delta = isHorizontal ? e.deltaX : e.deltaY;
scroll = Math.ceil(this.lenis.scroll + delta);
const snaps = this.computeSnaps();
if (snaps.length === 0) return;
let snapIndex;
const prevSnapIndex = snaps.findLastIndex(({ value }) => value < scroll);
const nextSnapIndex = snaps.findIndex(({ value }) => value > scroll);
if (this.options.type === "lock") {
if (delta > 0) {
snapIndex = nextSnapIndex;
} else if (delta < 0) {
snapIndex = prevSnapIndex;
}
} else {
const prevSnap = snaps[prevSnapIndex];
const distanceToPrevSnap = prevSnap ? Math.abs(scroll - prevSnap.value) : Infinity;
const nextSnap = snaps[nextSnapIndex];
const distanceToNextSnap = nextSnap ? Math.abs(scroll - nextSnap.value) : Infinity;
snapIndex = distanceToPrevSnap < distanceToNextSnap ? prevSnapIndex : nextSnapIndex;
}
if (snapIndex === void 0) return;
if (snapIndex === -1) return;
snapIndex = Math.max(0, Math.min(snapIndex, snaps.length - 1));
const snap = snaps[snapIndex];
const distance = Math.abs(scroll - snap.value);
if (distance <= this.distanceThreshold) {
this.goTo(snapIndex);
}
};
resize() {
this.elements.forEach((element) => element.onWrapperResize());
}
};
// packages/snap/browser.ts
globalThis.Snap = Snap;
//# sourceMappingURL=lenis-snap.js.map

1
node_modules/lenis/dist/lenis-snap.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/lenis/dist/lenis-snap.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/lenis/dist/lenis-snap.min.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

350
node_modules/lenis/dist/lenis-snap.mjs generated vendored Normal file
View File

@@ -0,0 +1,350 @@
// packages/snap/src/debounce.ts
function debounce(callback, delay) {
let timer;
return function(...args) {
let context = this;
clearTimeout(timer);
timer = setTimeout(() => {
timer = void 0;
callback.apply(context, args);
}, delay);
};
}
// packages/snap/src/element.ts
function removeParentSticky(element) {
const position = getComputedStyle(element).position;
const isSticky = position === "sticky";
if (isSticky) {
element.style.setProperty("position", "static");
element.dataset.sticky = "true";
}
if (element.offsetParent) {
removeParentSticky(element.offsetParent);
}
}
function addParentSticky(element) {
if (element?.dataset?.sticky === "true") {
element.style.removeProperty("position");
delete element.dataset.sticky;
}
if (element.offsetParent) {
addParentSticky(element.offsetParent);
}
}
function offsetTop(element, accumulator = 0) {
const top = accumulator + element.offsetTop;
if (element.offsetParent) {
return offsetTop(element.offsetParent, top);
}
return top;
}
function offsetLeft(element, accumulator = 0) {
const left = accumulator + element.offsetLeft;
if (element.offsetParent) {
return offsetLeft(element.offsetParent, left);
}
return left;
}
function scrollTop(element, accumulator = 0) {
const top = accumulator + element.scrollTop;
if (element.offsetParent) {
return scrollTop(element.offsetParent, top);
}
return top + window.scrollY;
}
function scrollLeft(element, accumulator = 0) {
const left = accumulator + element.scrollLeft;
if (element.offsetParent) {
return scrollLeft(element.offsetParent, left);
}
return left + window.scrollX;
}
var SnapElement = class {
element;
options;
align;
// @ts-ignore
rect = {};
wrapperResizeObserver;
resizeObserver;
debouncedWrapperResize;
constructor(element, {
align = ["start"],
ignoreSticky = true,
ignoreTransform = false
} = {}) {
this.element = element;
this.options = { align, ignoreSticky, ignoreTransform };
this.align = [align].flat();
this.debouncedWrapperResize = debounce(this.onWrapperResize, 500);
this.wrapperResizeObserver = new ResizeObserver(this.debouncedWrapperResize);
this.wrapperResizeObserver.observe(document.body);
this.onWrapperResize();
this.resizeObserver = new ResizeObserver(this.onResize);
this.resizeObserver.observe(this.element);
this.setRect({
width: this.element.offsetWidth,
height: this.element.offsetHeight
});
}
destroy() {
this.wrapperResizeObserver.disconnect();
this.resizeObserver.disconnect();
}
setRect({
top,
left,
width,
height,
element
} = {}) {
top = top ?? this.rect.top;
left = left ?? this.rect.left;
width = width ?? this.rect.width;
height = height ?? this.rect.height;
element = element ?? this.rect.element;
if (top === this.rect.top && left === this.rect.left && width === this.rect.width && height === this.rect.height && element === this.rect.element)
return;
this.rect.top = top;
this.rect.y = top;
this.rect.width = width;
this.rect.height = height;
this.rect.left = left;
this.rect.x = left;
this.rect.bottom = top + height;
this.rect.right = left + width;
}
onWrapperResize = () => {
let top, left;
if (this.options.ignoreSticky) removeParentSticky(this.element);
if (this.options.ignoreTransform) {
top = offsetTop(this.element);
left = offsetLeft(this.element);
} else {
const rect = this.element.getBoundingClientRect();
top = rect.top + scrollTop(this.element);
left = rect.left + scrollLeft(this.element);
}
if (this.options.ignoreSticky) addParentSticky(this.element);
this.setRect({ top, left });
};
onResize = ([entry]) => {
if (!entry?.borderBoxSize[0]) return;
const width = entry.borderBoxSize[0].inlineSize;
const height = entry.borderBoxSize[0].blockSize;
this.setRect({ width, height });
};
};
// packages/snap/src/uid.ts
var index = 0;
function uid() {
return index++;
}
// packages/snap/src/snap.ts
var Snap = class {
constructor(lenis, {
type = "proximity",
lerp,
easing,
duration,
distanceThreshold = "50%",
// useless when type is "mandatory"
debounce: debounceDelay = 500,
onSnapStart,
onSnapComplete
} = {}) {
this.lenis = lenis;
this.options = {
type,
lerp,
easing,
duration,
distanceThreshold,
debounce: debounceDelay,
onSnapStart,
onSnapComplete
};
this.onWindowResize();
window.addEventListener("resize", this.onWindowResize, false);
this.onSnapDebounced = debounce(this.onSnap, this.options.debounce);
this.lenis.on("virtual-scroll", this.onSnapDebounced);
}
options;
elements = /* @__PURE__ */ new Map();
snaps = /* @__PURE__ */ new Map();
viewport = {
width: window.innerWidth,
height: window.innerHeight
};
isStopped = false;
onSnapDebounced;
currentSnapIndex;
/**
* Destroy the snap instance
*/
destroy() {
this.lenis.off("virtual-scroll", this.onSnapDebounced);
window.removeEventListener("resize", this.onWindowResize, false);
this.elements.forEach((element) => element.destroy());
}
/**
* Start the snap after it has been stopped
*/
start() {
this.isStopped = false;
}
/**
* Stop the snap
*/
stop() {
this.isStopped = true;
}
/**
* Add a snap to the snap instance
*
* @param value The value to snap to
* @param userData User data that will be forwarded through the snap event
* @returns Unsubscribe function
*/
add(value) {
const id = uid();
this.snaps.set(id, { value });
return () => this.snaps.delete(id);
}
/**
* Add an element to the snap instance
*
* @param element The element to add
* @param options The options for the element
* @returns Unsubscribe function
*/
addElement(element, options = {}) {
const id = uid();
this.elements.set(id, new SnapElement(element, options));
return () => this.elements.delete(id);
}
addElements(elements, options = {}) {
const map = elements.map((element) => this.addElement(element, options));
return () => {
map.forEach((remove) => {
remove();
});
};
}
onWindowResize = () => {
this.viewport.width = window.innerWidth;
this.viewport.height = window.innerHeight;
};
computeSnaps = () => {
const { isHorizontal } = this.lenis;
let snaps = [...this.snaps.values()];
this.elements.forEach(({ rect, align }) => {
let value;
align.forEach((align2) => {
if (align2 === "start") {
value = rect.top;
} else if (align2 === "center") {
value = isHorizontal ? rect.left + rect.width / 2 - this.viewport.width / 2 : rect.top + rect.height / 2 - this.viewport.height / 2;
} else if (align2 === "end") {
value = isHorizontal ? rect.left + rect.width - this.viewport.width : rect.top + rect.height - this.viewport.height;
}
if (typeof value === "number") {
snaps.push({ value: Math.ceil(value) });
}
});
});
snaps = snaps.sort((a, b) => Math.abs(a.value) - Math.abs(b.value));
return snaps;
};
previous() {
this.goTo((this.currentSnapIndex ?? 0) - 1);
}
next() {
this.goTo((this.currentSnapIndex ?? 0) + 1);
}
goTo(index2) {
const snaps = this.computeSnaps();
if (snaps.length === 0) return;
this.currentSnapIndex = Math.max(0, Math.min(index2, snaps.length - 1));
const currentSnap = snaps[this.currentSnapIndex];
if (currentSnap === void 0) return;
this.lenis.scrollTo(currentSnap.value, {
duration: this.options.duration,
easing: this.options.easing,
lerp: this.options.lerp,
lock: this.options.type === "lock",
userData: { initiator: "snap" },
onStart: () => {
this.options.onSnapStart?.({
index: this.currentSnapIndex,
...currentSnap
});
},
onComplete: () => {
this.options.onSnapComplete?.({
index: this.currentSnapIndex,
...currentSnap
});
}
});
}
get distanceThreshold() {
let distanceThreshold = Infinity;
if (this.options.type === "mandatory") return Infinity;
const { isHorizontal } = this.lenis;
const axis = isHorizontal ? "width" : "height";
if (typeof this.options.distanceThreshold === "string" && this.options.distanceThreshold.endsWith("%")) {
distanceThreshold = Number(this.options.distanceThreshold.replace("%", "")) / 100 * this.viewport[axis];
} else if (typeof this.options.distanceThreshold === "number") {
distanceThreshold = this.options.distanceThreshold;
} else {
distanceThreshold = this.viewport[axis];
}
return distanceThreshold;
}
onSnap = (e) => {
if (this.isStopped) return;
if (e.event.type === "touchmove") return;
if (this.options.type === "lock" && this.lenis.userData?.initiator === "snap")
return;
let { scroll, isHorizontal } = this.lenis;
const delta = isHorizontal ? e.deltaX : e.deltaY;
scroll = Math.ceil(this.lenis.scroll + delta);
const snaps = this.computeSnaps();
if (snaps.length === 0) return;
let snapIndex;
const prevSnapIndex = snaps.findLastIndex(({ value }) => value < scroll);
const nextSnapIndex = snaps.findIndex(({ value }) => value > scroll);
if (this.options.type === "lock") {
if (delta > 0) {
snapIndex = nextSnapIndex;
} else if (delta < 0) {
snapIndex = prevSnapIndex;
}
} else {
const prevSnap = snaps[prevSnapIndex];
const distanceToPrevSnap = prevSnap ? Math.abs(scroll - prevSnap.value) : Infinity;
const nextSnap = snaps[nextSnapIndex];
const distanceToNextSnap = nextSnap ? Math.abs(scroll - nextSnap.value) : Infinity;
snapIndex = distanceToPrevSnap < distanceToNextSnap ? prevSnapIndex : nextSnapIndex;
}
if (snapIndex === void 0) return;
if (snapIndex === -1) return;
snapIndex = Math.max(0, Math.min(snapIndex, snaps.length - 1));
const snap = snaps[snapIndex];
const distance = Math.abs(scroll - snap.value);
if (distance <= this.distanceThreshold) {
this.goTo(snapIndex);
}
};
resize() {
this.elements.forEach((element) => element.onWrapperResize());
}
};
export {
Snap as default
};
//# sourceMappingURL=lenis-snap.mjs.map

1
node_modules/lenis/dist/lenis-snap.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

35
node_modules/lenis/dist/lenis-vue-nuxt.mjs generated vendored Normal file
View File

@@ -0,0 +1,35 @@
// packages/vue/nuxt/module.ts
import {
addComponent,
addImports,
addPlugin,
createResolver,
defineNuxtModule
} from "@nuxt/kit";
export * from "lenis/vue";
var nuxtModule = defineNuxtModule({
meta: {
name: "lenis/nuxt",
configKey: "lenis"
},
// Default configuration options of the Nuxt module
defaults: {},
setup(_options, _nuxt) {
const { resolve } = createResolver(import.meta.url);
addPlugin({
src: resolve("./nuxt/runtime/lenis.mjs"),
name: "lenis"
});
addImports({ name: "useLenis", from: "lenis/vue" });
addComponent({
name: "VueLenis",
filePath: "lenis/vue",
global: true,
export: "VueLenis"
});
}
});
var module_default = nuxtModule;
export {
module_default as default
};

67
node_modules/lenis/dist/lenis-vue.d.ts generated vendored Normal file
View File

@@ -0,0 +1,67 @@
import * as Lenis from 'lenis';
import Lenis__default, { ScrollCallback } from 'lenis';
import * as vue from 'vue';
import { PropType, HTMLAttributes, Plugin } from 'vue';
type LenisExposed = {
wrapper?: HTMLDivElement;
content?: HTMLDivElement;
lenis?: Lenis__default;
};
declare const VueLenisImpl: vue.DefineComponent<vue.ExtractPropTypes<{
root: {
type: PropType<boolean>;
default: boolean;
};
autoRaf: {
type: PropType<boolean>;
default: boolean;
};
options: {
type: PropType<ConstructorParameters<typeof Lenis__default>[0]>;
default: () => {};
};
props: {
type: PropType<HTMLAttributes>;
default: () => {};
};
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
root: {
type: PropType<boolean>;
default: boolean;
};
autoRaf: {
type: PropType<boolean>;
default: boolean;
};
options: {
type: PropType<ConstructorParameters<typeof Lenis__default>[0]>;
default: () => {};
};
props: {
type: PropType<HTMLAttributes>;
default: () => {};
};
}>> & Readonly<{}>, {
props: HTMLAttributes;
root: boolean;
autoRaf: boolean;
options: Lenis.LenisOptions | undefined;
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
declare const VueLenis: typeof VueLenisImpl & {
new (): LenisExposed;
};
declare const vueLenisPlugin: Plugin;
declare module '@vue/runtime-core' {
interface GlobalComponents {
'vue-lenis': typeof VueLenis;
}
}
declare function useLenis(callback?: ScrollCallback, priority?: number): vue.ComputedRef<Lenis.default | undefined>;
export { VueLenis as Lenis, VueLenis, vueLenisPlugin as default, useLenis };

179
node_modules/lenis/dist/lenis-vue.mjs generated vendored Normal file
View File

@@ -0,0 +1,179 @@
// packages/vue/src/provider.ts
import Lenis from "lenis";
import {
defineComponent,
h,
onWatcherCleanup,
provide,
reactive,
ref,
shallowRef as shallowRef2,
watch
} from "vue";
// packages/vue/src/store.ts
import { shallowRef } from "vue";
var globalLenis = shallowRef();
var globalAddCallback = shallowRef();
var globalRemoveCallback = shallowRef();
// packages/vue/src/provider.ts
var LenisSymbol = Symbol("LenisContext");
var AddCallbackSymbol = Symbol("AddCallback");
var RemoveCallbackSymbol = Symbol("RemoveCallback");
var VueLenisImpl = defineComponent({
name: "VueLenis",
props: {
root: {
type: Boolean,
default: false
},
autoRaf: {
type: Boolean,
default: true
},
options: {
type: Object,
default: () => ({})
},
props: {
type: Object,
default: () => ({})
}
},
setup(props, { slots, expose }) {
const lenisRef = shallowRef2();
const wrapper = ref();
const content = ref();
expose({
lenis: lenisRef,
wrapper,
content
});
watch(
[() => props.options, wrapper, content],
() => {
const isClient = typeof window !== "undefined";
if (!isClient) return;
if (!props.root && (!wrapper.value || !content.value)) return;
lenisRef.value = new Lenis({
...props.options,
...!props.root ? {
wrapper: wrapper.value,
content: content.value
} : {},
autoRaf: props.options?.autoRaf ?? props.autoRaf
});
onWatcherCleanup(() => {
lenisRef.value?.destroy();
lenisRef.value = void 0;
});
},
{ deep: true, immediate: true }
);
const callbacks = reactive([]);
function addCallback(callback, priority) {
callbacks.push({ callback, priority });
callbacks.sort((a, b) => a.priority - b.priority);
}
function removeCallback(callback) {
callbacks.splice(
callbacks.findIndex((cb) => cb.callback === callback),
1
);
}
const onScroll = (data) => {
for (let i = 0; i < callbacks.length; i++) {
callbacks[i]?.callback(data);
}
};
watch(
[lenisRef, () => props.root],
([lenis, root]) => {
lenis?.on("scroll", onScroll);
if (root) {
globalLenis.value = lenis;
globalAddCallback.value = addCallback;
globalRemoveCallback.value = removeCallback;
onWatcherCleanup(() => {
globalLenis.value = void 0;
globalAddCallback.value = void 0;
globalRemoveCallback.value = void 0;
});
}
},
{ immediate: true }
);
if (!props.root) {
provide(LenisSymbol, lenisRef);
provide(AddCallbackSymbol, addCallback);
provide(RemoveCallbackSymbol, removeCallback);
}
return () => {
if (props.root) {
return slots.default?.();
} else {
return h("div", { ref: wrapper, ...props?.props }, [
h("div", { ref: content }, slots.default?.())
]);
}
};
}
});
var VueLenis = VueLenisImpl;
var vueLenisPlugin = (app) => {
app.component("vue-lenis", VueLenis);
app.provide(LenisSymbol, shallowRef2(void 0));
app.provide(AddCallbackSymbol, void 0);
app.provide(RemoveCallbackSymbol, void 0);
};
// packages/vue/src/use-lenis.ts
import { computed, inject, nextTick, onWatcherCleanup as onWatcherCleanup2, watch as watch2 } from "vue";
function useLenis(callback, priority = 0) {
const lenisInjection = inject(LenisSymbol);
const addCallbackInjection = inject(AddCallbackSymbol);
const removeCallbackInjection = inject(RemoveCallbackSymbol);
const addCallback = computed(
() => addCallbackInjection ? addCallbackInjection : globalAddCallback.value
);
const removeCallback = computed(
() => removeCallbackInjection ? removeCallbackInjection : globalRemoveCallback.value
);
const lenis = computed(
() => lenisInjection?.value ? lenisInjection.value : globalLenis.value
);
if (typeof window !== "undefined") {
nextTick(() => {
nextTick(() => {
if (!lenis.value && import.meta.env.DEV) {
console.warn(
"No lenis instance found, either mount a root lenis instance or wrap your component in a lenis provider"
);
}
});
});
}
watch2(
[lenis, addCallback, removeCallback],
([lenis2, addCallback2, removeCallback2]) => {
if (!lenis2 || !addCallback2 || !removeCallback2 || !callback) return;
addCallback2?.(callback, priority);
callback?.(lenis2);
onWatcherCleanup2(() => {
removeCallback2?.(callback);
});
},
{
immediate: true
}
);
return lenis;
}
export {
VueLenis as Lenis,
VueLenis,
vueLenisPlugin as default,
useLenis
};
//# sourceMappingURL=lenis-vue.mjs.map

1
node_modules/lenis/dist/lenis-vue.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/lenis/dist/lenis.css generated vendored Normal file
View File

@@ -0,0 +1 @@
html.lenis,html.lenis body{height:auto}.lenis:not(.lenis-autoToggle).lenis-stopped{overflow:clip}.lenis [data-lenis-prevent],.lenis [data-lenis-prevent-wheel],.lenis [data-lenis-prevent-touch]{overscroll-behavior:contain}.lenis.lenis-smooth iframe{pointer-events:none}.lenis.lenis-autoToggle{transition-property:overflow;transition-duration:1ms;transition-behavior:allow-discrete}

439
node_modules/lenis/dist/lenis.d.ts generated vendored Normal file
View File

@@ -0,0 +1,439 @@
/**
* Dimensions class to handle the size of the content and wrapper
*
* @example
* const dimensions = new Dimensions(wrapper, content)
* dimensions.on('resize', (e) => {
* console.log(e.width, e.height)
* })
*/
declare class Dimensions {
private wrapper;
private content;
width: number;
height: number;
scrollHeight: number;
scrollWidth: number;
private debouncedResize?;
private wrapperResizeObserver?;
private contentResizeObserver?;
constructor(wrapper: HTMLElement | Window | Element, content: HTMLElement | Element, { autoResize, debounce: debounceValue }?: {
autoResize?: boolean | undefined;
debounce?: number | undefined;
});
destroy(): void;
resize: () => void;
onWrapperResize: () => void;
onContentResize: () => void;
get limit(): {
x: number;
y: number;
};
}
type OnUpdateCallback = (value: number, completed: boolean) => void;
type OnStartCallback = () => void;
type FromToOptions = {
/**
* Linear interpolation (lerp) intensity (between 0 and 1)
* @default 0.1
*/
lerp?: number;
/**
* The duration of the scroll animation (in s)
* @default 1
*/
duration?: number;
/**
* The easing function to use for the scroll animation
* @default (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t))
*/
easing?: EasingFunction;
/**
* Called when the scroll starts
*/
onStart?: OnStartCallback;
/**
* Called when the scroll progress changes
*/
onUpdate?: OnUpdateCallback;
};
type UserData = Record<string, any>;
type Scrolling = boolean | 'native' | 'smooth';
type LenisEvent = 'scroll' | 'virtual-scroll';
type ScrollCallback = (lenis: Lenis) => void;
type VirtualScrollCallback = (data: VirtualScrollData) => void;
type VirtualScrollData = {
deltaX: number;
deltaY: number;
event: WheelEvent | TouchEvent;
};
type Orientation = 'vertical' | 'horizontal';
type GestureOrientation = 'vertical' | 'horizontal' | 'both';
type EasingFunction = (time: number) => number;
type ScrollToOptions = {
/**
* The offset to apply to the target value
* @default 0
*/
offset?: number;
/**
* Skip the animation and jump to the target value immediately
* @default false
*/
immediate?: boolean;
/**
* Lock the scroll to the target value
* @default false
*/
lock?: boolean;
/**
* The duration of the scroll animation (in s)
*/
duration?: number;
/**
* The easing function to use for the scroll animation
* @default (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t))
*/
easing?: EasingFunction;
/**
* Linear interpolation (lerp) intensity (between 0 and 1)
* @default 0.1
*/
lerp?: number;
/**
* Called when the scroll starts
*/
onStart?: (lenis: Lenis) => void;
/**
* Called when the scroll completes
*/
onComplete?: (lenis: Lenis) => void;
/**
* Scroll even if stopped
* @default false
*/
force?: boolean;
/**
* Scroll initiated from outside of the lenis instance
* @default false
*/
programmatic?: boolean;
/**
* User data that will be forwarded through the scroll event
*/
userData?: UserData;
};
type LenisOptions = {
/**
* The element that will be used as the scroll container
* @default window
*/
wrapper?: Window | HTMLElement | Element;
/**
* The element that contains the content that will be scrolled, usually `wrapper`'s direct child
* @default document.documentElement
*/
content?: HTMLElement | Element;
/**
* The element that will listen to `wheel` and `touch` events
* @default window
*/
eventsTarget?: Window | HTMLElement | Element;
/**
* Smooth the scroll initiated by `wheel` events
* @default true
*/
smoothWheel?: boolean;
/**
* Mimic touch device scroll while allowing scroll sync
* @default false
*/
syncTouch?: boolean;
/**
* Linear interpolation (lerp) intensity (between 0 and 1)
* @default 0.075
*/
syncTouchLerp?: number;
/**
* Manage the the strength of `syncTouch` inertia
* @default 35
*/
touchInertiaExponent?: number;
/**
* Scroll duration in seconds
*/
duration?: number;
/**
* Scroll easing function
* @default (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t))
*/
easing?: EasingFunction;
/**
* Linear interpolation (lerp) intensity (between 0 and 1)
* @default 0.1
*/
lerp?: number;
/**
* Enable infinite scrolling
* @default false
*/
infinite?: boolean;
/**
* The orientation of the scrolling. Can be `vertical` or `horizontal`
* @default vertical
*/
orientation?: Orientation;
/**
* The orientation of the gestures. Can be `vertical`, `horizontal` or `both`
* @default vertical
*/
gestureOrientation?: GestureOrientation;
/**
* The multiplier to use for touch events
* @default 1
*/
touchMultiplier?: number;
/**
* The multiplier to use for mouse wheel events
* @default 1
*/
wheelMultiplier?: number;
/**
* Resize instance automatically
* @default true
*/
autoResize?: boolean;
/**
* Manually prevent scroll to be smoothed based on elements traversed by events
*/
prevent?: (node: HTMLElement) => boolean;
/**
* Manually modify the events before they get consumed
*/
virtualScroll?: (data: VirtualScrollData) => boolean;
/**
* Wether or not to enable overscroll on a nested Lenis instance, similar to CSS overscroll-behavior (https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior)
* @default true
*/
overscroll?: boolean;
/**
* If `true`, Lenis will not try to detect the size of the content and wrapper
* @default false
*/
autoRaf?: boolean;
/**
* If `true`, Lenis will automatically run `requestAnimationFrame` loop
* @default false
*/
anchors?: boolean | ScrollToOptions;
/**
* If `true`, Lenis will automatically start/stop based on wrapper's overflow property
* @default false
*/
autoToggle?: boolean;
/**
* If `true`, Lenis will allow nested scroll
* @default false
*/
allowNestedScroll?: boolean;
/**
* If `true`, Lenis will use naive dimensions calculation
* @default false
*/
__experimental__naiveDimensions?: boolean;
};
declare global {
interface Window {
lenisVersion: string;
}
}
type OptionalPick<T, F extends keyof T> = Omit<T, F> & Partial<Pick<T, F>>;
declare class Lenis {
private _isScrolling;
private _isStopped;
private _isLocked;
private _preventNextNativeScrollEvent;
private _resetVelocityTimeout;
private __rafID;
/**
* Whether or not the user is touching the screen
*/
isTouching?: boolean;
/**
* The time in ms since the lenis instance was created
*/
time: number;
/**
* User data that will be forwarded through the scroll event
*
* @example
* lenis.scrollTo(100, {
* userData: {
* foo: 'bar'
* }
* })
*/
userData: UserData;
/**
* The last velocity of the scroll
*/
lastVelocity: number;
/**
* The current velocity of the scroll
*/
velocity: number;
/**
* The direction of the scroll
*/
direction: 1 | -1 | 0;
/**
* The options passed to the lenis instance
*/
options: OptionalPick<Required<LenisOptions>, 'duration' | 'easing' | 'prevent' | 'virtualScroll'>;
/**
* The target scroll value
*/
targetScroll: number;
/**
* The animated scroll value
*/
animatedScroll: number;
private readonly animate;
private readonly emitter;
readonly dimensions: Dimensions;
private readonly virtualScroll;
constructor({ wrapper, content, eventsTarget, smoothWheel, syncTouch, syncTouchLerp, touchInertiaExponent, duration, // in seconds
easing, lerp, infinite, orientation, // vertical, horizontal
gestureOrientation, // vertical, horizontal, both
touchMultiplier, wheelMultiplier, autoResize, prevent, virtualScroll, overscroll, autoRaf, anchors, autoToggle, // https://caniuse.com/?search=transition-behavior
allowNestedScroll, __experimental__naiveDimensions, }?: LenisOptions);
/**
* Destroy the lenis instance, remove all event listeners and clean up the class name
*/
destroy(): void;
/**
* Add an event listener for the given event and callback
*
* @param event Event name
* @param callback Callback function
* @returns Unsubscribe function
*/
on(event: 'scroll', callback: ScrollCallback): () => void;
on(event: 'virtual-scroll', callback: VirtualScrollCallback): () => void;
/**
* Remove an event listener for the given event and callback
*
* @param event Event name
* @param callback Callback function
*/
off(event: 'scroll', callback: ScrollCallback): void;
off(event: 'virtual-scroll', callback: VirtualScrollCallback): void;
private onScrollEnd;
private dispatchScrollendEvent;
private onTransitionEnd;
private setScroll;
private onClick;
private onPointerDown;
private onVirtualScroll;
/**
* Force lenis to recalculate the dimensions
*/
resize(): void;
private emit;
private onNativeScroll;
private reset;
/**
* Start lenis scroll after it has been stopped
*/
start(): void;
private internalStart;
/**
* Stop lenis scroll
*/
stop(): void;
private internalStop;
/**
* RequestAnimationFrame for lenis
*
* @param time The time in ms from an external clock like `requestAnimationFrame` or Tempus
*/
raf: (time: number) => void;
/**
* Scroll to a target value
*
* @param target The target value to scroll to
* @param options The options for the scroll
*
* @example
* lenis.scrollTo(100, {
* offset: 100,
* duration: 1,
* easing: (t) => 1 - Math.cos((t * Math.PI) / 2),
* lerp: 0.1,
* onStart: () => {
* console.log('onStart')
* },
* onComplete: () => {
* console.log('onComplete')
* },
* })
*/
scrollTo(target: number | string | HTMLElement, { offset, immediate, lock, duration, easing, lerp, onStart, onComplete, force, // scroll even if stopped
programmatic, // called from outside of the class
userData, }?: ScrollToOptions): void;
private preventNextNativeScrollEvent;
private checkNestedScroll;
/**
* The root element on which lenis is instanced
*/
get rootElement(): HTMLElement;
/**
* The limit which is the maximum scroll value
*/
get limit(): number;
/**
* Whether or not the scroll is horizontal
*/
get isHorizontal(): boolean;
/**
* The actual scroll value
*/
get actualScroll(): number;
/**
* The current scroll value
*/
get scroll(): number;
/**
* The progress of the scroll relative to the limit
*/
get progress(): number;
/**
* Current scroll state
*/
get isScrolling(): Scrolling;
private set isScrolling(value);
/**
* Check if lenis is stopped
*/
get isStopped(): boolean;
private set isStopped(value);
/**
* Check if lenis is locked
*/
get isLocked(): boolean;
private set isLocked(value);
/**
* Check if lenis is smooth scrolling
*/
get isSmooth(): boolean;
/**
* The class name applied to the wrapper element
*/
get className(): string;
private updateClassName;
private cleanUpClassName;
}
export { type EasingFunction, type FromToOptions, type GestureOrientation, type LenisEvent, type LenisOptions, type OnStartCallback, type OnUpdateCallback, type Orientation, type ScrollCallback, type ScrollToOptions, type Scrolling, type UserData, type VirtualScrollCallback, type VirtualScrollData, Lenis as default };

1086
node_modules/lenis/dist/lenis.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/lenis/dist/lenis.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/lenis/dist/lenis.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/lenis/dist/lenis.min.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1085
node_modules/lenis/dist/lenis.mjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/lenis/dist/lenis.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

5
node_modules/lenis/dist/nuxt/runtime/lenis.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Plugin } from '#app';
declare const plugin: Plugin;
export { plugin as default };

13
node_modules/lenis/dist/nuxt/runtime/lenis.mjs generated vendored Normal file
View File

@@ -0,0 +1,13 @@
// packages/vue/nuxt/runtime/lenis.ts
import { defineNuxtPlugin } from "#imports";
import vuePlugin from "lenis/vue";
var plugin = defineNuxtPlugin({
name: "lenis",
setup(nuxtApp) {
nuxtApp.vueApp.use(vuePlugin);
}
});
var lenis_default = plugin;
export {
lenis_default as default
};

98
node_modules/lenis/package.json generated vendored Normal file
View File

@@ -0,0 +1,98 @@
{
"name": "lenis",
"version": "1.3.14",
"description": "How smooth scroll should be",
"type": "module",
"sideEffects": false,
"author": "darkroom.engineering",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/darkroomengineering/lenis.git"
},
"bugs": {
"url": "https://github.com/darkroomengineering/lenis/issues"
},
"homepage": "https://github.com/darkroomengineering/lenis",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/darkroomengineering"
},
"keywords": [
"scroll",
"smooth",
"lenis",
"react",
"vue"
],
"scripts": {
"build": "pnpm build:core && pnpm build:all",
"build:core": "tsup --config tsup.core.ts",
"build:all": "tsup",
"dev": "pnpm run -w --parallel /^dev:.*/",
"dev:build": "tsup --watch",
"dev:playground": "pnpm --filter playground dev",
"dev:nuxt": "pnpm --filter playground-nuxt dev",
"readme": "node ./scripts/update-readme.js",
"version:dev": "npm version prerelease --preid dev --force --no-git-tag-version",
"version:patch": "npm version patch --force --no-git-tag-version",
"version:minor": "npm version minor --force --no-git-tag-version",
"version:major": "npm version major --force --no-git-tag-version",
"postversion": "pnpm build && pnpm readme",
"publish:dev": "npm publish --tag dev",
"publish:main": "npm publish"
},
"files": [
"dist"
],
"devDependencies": {
"terser": "^5.37.0",
"tsup": "^8.3.5",
"typescript": "^5.7.3"
},
"peerDependencies": {
"react": ">=17.0.0",
"vue": ">=3.0.0",
"@nuxt/kit": ">=3.0.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
},
"vue": {
"optional": true
},
"@nuxt/kit": {
"optional": true
}
},
"unpkg": "./dist/lenis.mjs",
"main": "./dist/lenis.mjs",
"module": "./dist/lenis.mjs",
"types": "./dist/lenis.d.ts",
"exports": {
".": {
"types": "./dist/lenis.d.ts",
"default": "./dist/lenis.mjs"
},
"./react": {
"types": "./dist/lenis-react.d.ts",
"default": "./dist/lenis-react.mjs"
},
"./snap": {
"types": "./dist/lenis-snap.d.ts",
"default": "./dist/lenis-snap.mjs"
},
"./vue": {
"types": "./dist/lenis-vue.d.ts",
"default": "./dist/lenis-vue.mjs"
},
"./nuxt": {
"default": "./dist/lenis-vue-nuxt.mjs"
},
"./nuxt/runtime/*": {
"default": "./dist/nuxt/runtime/*.mjs"
},
"./dist/*": "./dist/*"
}
}