1- import { memo as L , useState as p , useEffect as g } from "react" ;
1+ import { memo as R , useState as p , useEffect as g } from "react" ;
22import { jsx as k } from "react/jsx-runtime" ;
33var y = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { } ;
44function z ( e ) {
@@ -126,7 +126,7 @@ const x = (e, n) => {
126126 s = n . containerHeight , u = x ( e , n . element ) , i === "onEnter" && ( u -= n . containerHeight ) ;
127127 break ;
128128 case "elem" :
129- u = x ( e , n . element ) , i === "onEnter" ? ( s = e . getBoundingClientRect ( ) . bottom , u -= n . containerHeight ) : i === "onLeave" && ( s = e . scrollHeight ) ;
129+ u = x ( e , n . element ) , i === "onEnter" ? ( s = e . scrollHeight , u -= n . containerHeight ) : i === "onLeave" && ( s = e . scrollHeight ) ;
130130 break ;
131131 }
132132 if ( r ) {
@@ -180,10 +180,10 @@ const x = (e, n) => {
180180 start : f ,
181181 end : d
182182 } ;
183- } , R = {
183+ } , q = {
184184 resizeThrottle : 150
185185 // scrollThrottle: 200
186- } , q = {
186+ } , L = {
187187 progress : 0 ,
188188 scrollData : {
189189 containerHeight : 0 ,
@@ -194,7 +194,7 @@ const x = (e, n) => {
194194 } ,
195195 start : 0 ,
196196 end : 0
197- } , _ = ( e , n = q ) => typeof e == "function" ? e ( { scrollObject : n , children : e } ) : e , J = L ( ( { scrollData : e , children : n , elem : i , settings : r , onStart : t , onEnd : o } ) => {
197+ } , _ = ( e , n = L ) => typeof e == "function" ? e ( { scrollObject : n , children : e } ) : e , K = R ( ( { scrollData : e , children : n , elem : i , settings : r , onStart : t , onEnd : o } ) => {
198198 const { trigger : s = "onEnter" , offsetTop : u , offsetBottom : c , duration : l } = r , [ a , f ] = p ( ! 1 ) , [ d , m ] = p ( ! 1 ) , [ h , w ] = p ( ! 1 ) ;
199199 if ( g ( ( ) => {
200200 a && typeof t == "function" && t ( ) ;
@@ -203,7 +203,7 @@ const x = (e, n) => {
203203 } , [ d ] ) , g ( ( ) => {
204204 i != null && i . current && w ( ! 0 ) ;
205205 } , [ i ] ) , ! h )
206- return _ ( n , q ) ;
206+ return _ ( n , L ) ;
207207 const S = W ( i . current , e , s , u , c , l ) , { progress : v } = S ;
208208 return v > 0 && v < 1 && a === ! 1 && typeof t == "function" && f ( ! 0 ) , v <= 0 && a === ! 0 && typeof t == "function" && f ( ! 1 ) , v >= 1 && d === ! 1 && typeof o == "function" && m ( ! 0 ) , v < 1 && d === ! 0 && typeof o == "function" && m ( ! 1 ) , _ ( n , S ) ;
209209} ) , P = ( { scrollData : e , children : n } ) => typeof n == "function" ? n ( {
@@ -215,7 +215,7 @@ const x = (e, n) => {
215215 element : e . element
216216 } ,
217217 children : n
218- } ) : n , K = ( { children : e , scrollThrottle : n , resizeThrottle : i = R . resizeThrottle } ) => {
218+ } ) : n , Q = ( { children : e , scrollThrottle : n , resizeThrottle : i = q . resizeThrottle } ) => {
219219 const r = document == null ? void 0 : document . documentElement ;
220220 if ( ! r )
221221 throw new Error ( "No document.documentElement found." ) ;
@@ -250,7 +250,7 @@ const x = (e, n) => {
250250 } ,
251251 children : e
252252 } ) ;
253- } , Q = ( { children : e , scrollThrottle : n , scrollingElement : i , resizeThrottle : r } ) => {
253+ } , X = ( { children : e , scrollThrottle : n , scrollingElement : i , resizeThrottle : r } ) => {
254254 const [ t , o ] = p ( ! 1 ) , [ s , u ] = p ( null ) , c = P ( {
255255 scrollData : {
256256 scrollTop : 0 ,
@@ -268,7 +268,7 @@ const x = (e, n) => {
268268 children : e ,
269269 customScrollingElement : n ,
270270 scrollThrottle : i ,
271- resizeThrottle : r = R . resizeThrottle
271+ resizeThrottle : r = q . resizeThrottle
272272} ) => {
273273 const t = n ;
274274 if ( ! t )
@@ -308,7 +308,7 @@ const x = (e, n) => {
308308 } ) ;
309309} ;
310310export {
311- J as ScrollTracker ,
312- Q as ScrollTrackerCustom ,
313- K as ScrollTrackerDocument
311+ K as ScrollTracker ,
312+ X as ScrollTrackerCustom ,
313+ Q as ScrollTrackerDocument
314314} ;
0 commit comments