app-studio 0.5.57 → 0.5.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -40
- package/dist/app-studio.cjs.development.js +91 -68
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +91 -68
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +91 -68
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/hooks/useScroll.d.ts +4 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
# App-Studio
|
|
1
|
+
# App-Studio
|
|
2
2
|
|
|
3
3
|
App-Studio is a powerful React-based library designed to simplify the process of building responsive, interactive, and visually consistent web applications. It provides CSS design props for layout, spacing, sizing, shadows, event management, and theming.
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
7
|
+
- 🌈 Add styled props to your application
|
|
8
|
+
- 📦 A set of simple and powerful React components
|
|
9
|
+
- 🌍 Internationalization support for dozens of languages
|
|
10
|
+
- 🎨 Powerful theme customization in every detail
|
|
11
|
+
|
|
12
|
+
## Table of Contents
|
|
13
|
+
|
|
14
|
+
- [Installation](#2-installation)
|
|
15
|
+
- [Core Components](#3-core-components)
|
|
16
|
+
- [Element](#element)
|
|
17
|
+
- [View](#view)
|
|
18
|
+
- [Text](#text)
|
|
19
|
+
- [Form](#form)
|
|
20
|
+
- [Image](#image)
|
|
21
|
+
- [Responsive Design](#4-responsive-design)
|
|
22
|
+
- [Media Prop](#media-prop)
|
|
23
|
+
- [useResponsive Hook](#useresponsive-hook)
|
|
24
|
+
- [Event Management](#5-event-management)
|
|
25
|
+
- [Theming](#6-theming)
|
|
26
|
+
- [Custom Hooks](#7-custom-hooks)
|
|
27
|
+
- [useMount](#usemount)
|
|
28
|
+
- [Design Props](#8-design-props)
|
|
29
|
+
- [Shadow Prop](#shadow-prop)
|
|
30
|
+
- [Animation](#9-animation)
|
|
31
|
+
- [Basic Usage](#basic-usage)
|
|
32
|
+
- [Available Animations](#available-animations)
|
|
33
|
+
- [Animation Properties](#animation-properties)
|
|
34
|
+
- [Advanced Usage](#10-advanced-usage)
|
|
35
|
+
- [Contributing](#11-contributing)
|
|
36
|
+
- [License](#12-license)
|
|
11
37
|
|
|
12
38
|
## 2. Installation
|
|
13
39
|
|
|
@@ -21,7 +47,14 @@ npm install app-studio --save
|
|
|
21
47
|
|
|
22
48
|
### Element
|
|
23
49
|
|
|
24
|
-
The `Element` component is the
|
|
50
|
+
The `Element` component is the base for all other components. It handles responsiveness, shadows, margins, padding, and more.
|
|
51
|
+
|
|
52
|
+
#### Key Features
|
|
53
|
+
|
|
54
|
+
- Sets both `width` and `height` with the `size` prop.
|
|
55
|
+
- Defines styles for different CSS events with the `on` prop.
|
|
56
|
+
- Defines responsive styles for different media queries with the `media` prop.
|
|
57
|
+
- Applies shadow effects with the `shadow` prop.
|
|
25
58
|
|
|
26
59
|
#### Usage
|
|
27
60
|
|
|
@@ -31,16 +64,14 @@ The `Element` component is the foundation of App-Studio. It handles a large part
|
|
|
31
64
|
</Element>
|
|
32
65
|
```
|
|
33
66
|
|
|
34
|
-
|
|
67
|
+
### View
|
|
35
68
|
|
|
36
|
-
|
|
37
|
-
- `on`: Defines styles for different CSS events
|
|
38
|
-
- `media`: Defines styles for different media queries
|
|
39
|
-
- `shadow`: Adds shadow to an element (boolean, number, or `Shadow` object)
|
|
69
|
+
The `View` component extends the basic `div` HTML element. It's a generic container used to create various layouts.
|
|
40
70
|
|
|
41
|
-
|
|
71
|
+
#### Key Features
|
|
42
72
|
|
|
43
|
-
|
|
73
|
+
- Provides a flexible way to structure content.
|
|
74
|
+
- Supports all `Element` props.
|
|
44
75
|
|
|
45
76
|
#### Usage
|
|
46
77
|
|
|
@@ -52,7 +83,12 @@ The `View` component is a versatile layout component that extends the basic HTML
|
|
|
52
83
|
|
|
53
84
|
### Text
|
|
54
85
|
|
|
55
|
-
The `Text` component extends the
|
|
86
|
+
The `Text` component extends the basic `div` HTML element for rendering text content.
|
|
87
|
+
|
|
88
|
+
#### Key Features
|
|
89
|
+
|
|
90
|
+
- Provides text-specific styling options.
|
|
91
|
+
- Supports all `Element` props.
|
|
56
92
|
|
|
57
93
|
#### Usage
|
|
58
94
|
|
|
@@ -62,20 +98,31 @@ The `Text` component extends the HTML `div` tag with additional text styling pro
|
|
|
62
98
|
|
|
63
99
|
### Form
|
|
64
100
|
|
|
65
|
-
The `Form` component extends the
|
|
101
|
+
The `Form` component extends the basic `form` HTML element and provides nested `Form.Button` and `Form.Input` components.
|
|
102
|
+
|
|
103
|
+
#### Key Features
|
|
104
|
+
|
|
105
|
+
- Simplifies form creation and management.
|
|
106
|
+
- Supports all `Element` props.
|
|
66
107
|
|
|
67
108
|
#### Usage
|
|
68
109
|
|
|
69
110
|
```jsx
|
|
70
111
|
<Form>
|
|
71
|
-
<Input placeholder="Enter your name" />
|
|
72
|
-
<Button>Submit</Button>
|
|
112
|
+
<Form.Input placeholder="Enter your name" />
|
|
113
|
+
<Form.Button>Submit</Form.Button>
|
|
73
114
|
</Form>
|
|
74
115
|
```
|
|
75
116
|
|
|
76
117
|
### Image
|
|
77
118
|
|
|
78
|
-
The `Image` component extends the
|
|
119
|
+
The `Image` component extends the basic `img` HTML element for displaying images.
|
|
120
|
+
|
|
121
|
+
#### Key Features
|
|
122
|
+
|
|
123
|
+
- Supports responsive image loading with `media`.
|
|
124
|
+
- Applies shadow effects with `shadow`.
|
|
125
|
+
- Handles events with `on`.
|
|
79
126
|
|
|
80
127
|
#### Usage
|
|
81
128
|
|
|
@@ -305,7 +352,6 @@ All animations are available through the `Animation` object:
|
|
|
305
352
|
- `Animation.pulse()`
|
|
306
353
|
- And many more...
|
|
307
354
|
|
|
308
|
-
|
|
309
355
|
### Basic Usage
|
|
310
356
|
|
|
311
357
|
To apply an animation to a component, use the `animate` prop with an animation object:
|
|
@@ -316,7 +362,7 @@ import { View, Animation } from 'app-studio';
|
|
|
316
362
|
function Example() {
|
|
317
363
|
return (
|
|
318
364
|
<View
|
|
319
|
-
animate={Animation.fadeIn()}
|
|
365
|
+
animate={Animation.fadeIn()} // Fades in the view
|
|
320
366
|
backgroundColor="theme.primary"
|
|
321
367
|
padding={20}
|
|
322
368
|
>
|
|
@@ -330,32 +376,43 @@ function Example() {
|
|
|
330
376
|
|
|
331
377
|
App-Studio comes with a set of pre-defined animations that you can use out of the box:
|
|
332
378
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
-
|
|
336
|
-
- `
|
|
337
|
-
- `
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
379
|
+
#### Transition Animations
|
|
380
|
+
|
|
381
|
+
- `fadeIn` / `fadeOut`
|
|
382
|
+
- `slideInLeft` / `slideInRight` / `slideInUp` / `slideInDown`
|
|
383
|
+
- `zoomIn` / `zoomOut`
|
|
384
|
+
|
|
385
|
+
#### Transform Animations
|
|
386
|
+
|
|
387
|
+
- `rotate`
|
|
388
|
+
- `scale`
|
|
389
|
+
- `translate`
|
|
390
|
+
|
|
391
|
+
#### Effect Animations
|
|
392
|
+
|
|
393
|
+
- `bounce`
|
|
394
|
+
- `pulse`
|
|
395
|
+
- `flash`
|
|
396
|
+
- `shake`
|
|
397
|
+
- `swing`
|
|
398
|
+
- `rubberBand`
|
|
399
|
+
- `wobble`
|
|
400
|
+
- `flip`
|
|
401
|
+
- `heartBeat`
|
|
402
|
+
- `rollIn` / `rollOut`
|
|
403
|
+
- `lightSpeedIn` / `lightSpeedOut`
|
|
404
|
+
- `hinge`
|
|
405
|
+
- `jackInTheBox`
|
|
350
406
|
|
|
351
407
|
Each animation function accepts parameters to customize the duration, timing function, and other properties.
|
|
352
408
|
|
|
353
409
|
#### Animation Properties
|
|
354
410
|
|
|
355
411
|
Each animation function accepts an object with the following properties:
|
|
356
|
-
|
|
357
|
-
-
|
|
358
|
-
-
|
|
412
|
+
|
|
413
|
+
- `duration`: Length of the animation (e.g., '1s', '500ms')
|
|
414
|
+
- `timingFunction`: CSS timing function (e.g., 'ease', 'linear', 'ease-in-out')
|
|
415
|
+
- `iterationCount`: Number of times to play the animation (number or 'infinite') // e.g., '1', 'infinite'
|
|
359
416
|
|
|
360
417
|
## 10. Advanced Usage
|
|
361
418
|
|
|
@@ -3302,12 +3302,13 @@ const useResponsive = () => {
|
|
|
3302
3302
|
};
|
|
3303
3303
|
};
|
|
3304
3304
|
|
|
3305
|
-
//
|
|
3305
|
+
// Memoized function to get scroll dimensions
|
|
3306
3306
|
const getScrollDimensions = element => {
|
|
3307
3307
|
if (element instanceof Window) {
|
|
3308
|
+
const doc = document.documentElement;
|
|
3308
3309
|
return {
|
|
3309
|
-
scrollHeight:
|
|
3310
|
-
scrollWidth:
|
|
3310
|
+
scrollHeight: Math.max(doc.scrollHeight, doc.offsetHeight),
|
|
3311
|
+
scrollWidth: Math.max(doc.scrollWidth, doc.offsetWidth),
|
|
3311
3312
|
clientHeight: window.innerHeight,
|
|
3312
3313
|
clientWidth: window.innerWidth,
|
|
3313
3314
|
scrollTop: window.scrollY,
|
|
@@ -3323,14 +3324,13 @@ const getScrollDimensions = element => {
|
|
|
3323
3324
|
scrollLeft: element.scrollLeft
|
|
3324
3325
|
};
|
|
3325
3326
|
};
|
|
3326
|
-
|
|
3327
|
-
* Hook to track scroll position and progress of a container element or window
|
|
3328
|
-
*/
|
|
3327
|
+
// Enhanced useScroll hook with better performance
|
|
3329
3328
|
const useScroll = function (_temp) {
|
|
3330
3329
|
let {
|
|
3331
3330
|
container,
|
|
3332
3331
|
offset = [0, 0],
|
|
3333
|
-
throttleMs = 0
|
|
3332
|
+
throttleMs = 0,
|
|
3333
|
+
disabled = false
|
|
3334
3334
|
} = _temp === void 0 ? {} : _temp;
|
|
3335
3335
|
const [scrollPosition, setScrollPosition] = React.useState({
|
|
3336
3336
|
x: 0,
|
|
@@ -3339,24 +3339,20 @@ const useScroll = function (_temp) {
|
|
|
3339
3339
|
yProgress: 0
|
|
3340
3340
|
});
|
|
3341
3341
|
const lastUpdateRef = React.useRef(0);
|
|
3342
|
+
const frameRef = React.useRef();
|
|
3342
3343
|
const handleScroll = React.useCallback(() => {
|
|
3344
|
+
if (disabled) return;
|
|
3343
3345
|
const now = Date.now();
|
|
3344
3346
|
if (throttleMs > 0 && now - lastUpdateRef.current < throttleMs) {
|
|
3347
|
+
frameRef.current = requestAnimationFrame(handleScroll);
|
|
3345
3348
|
return;
|
|
3346
3349
|
}
|
|
3347
|
-
const
|
|
3348
|
-
const
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
scrollTop,
|
|
3354
|
-
scrollLeft
|
|
3355
|
-
} = getScrollDimensions(targetElement);
|
|
3356
|
-
const x = scrollLeft + offset[0];
|
|
3357
|
-
const y = scrollTop + offset[1];
|
|
3358
|
-
const maxScrollX = scrollWidth - clientWidth;
|
|
3359
|
-
const maxScrollY = scrollHeight - clientHeight;
|
|
3350
|
+
const target = container && container.current ? container.current : window;
|
|
3351
|
+
const dimensions = getScrollDimensions(target);
|
|
3352
|
+
const x = dimensions.scrollLeft + offset[0];
|
|
3353
|
+
const y = dimensions.scrollTop + offset[1];
|
|
3354
|
+
const maxScrollX = dimensions.scrollWidth - dimensions.clientWidth;
|
|
3355
|
+
const maxScrollY = dimensions.scrollHeight - dimensions.clientHeight;
|
|
3360
3356
|
const xProgress = maxScrollX <= 0 ? 1 : Math.min(Math.max(x / maxScrollX, 0), 1);
|
|
3361
3357
|
const yProgress = maxScrollY <= 0 ? 1 : Math.min(Math.max(y / maxScrollY, 0), 1);
|
|
3362
3358
|
setScrollPosition(prev => {
|
|
@@ -3371,26 +3367,27 @@ const useScroll = function (_temp) {
|
|
|
3371
3367
|
}
|
|
3372
3368
|
return prev;
|
|
3373
3369
|
});
|
|
3374
|
-
}, [container, offset, throttleMs]);
|
|
3370
|
+
}, [container, offset, throttleMs, disabled]);
|
|
3375
3371
|
React.useEffect(() => {
|
|
3376
|
-
|
|
3372
|
+
if (disabled) return;
|
|
3373
|
+
const target = container && container.current ? container.current : window;
|
|
3377
3374
|
handleScroll();
|
|
3378
|
-
|
|
3375
|
+
const options = {
|
|
3379
3376
|
passive: true
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
});
|
|
3377
|
+
};
|
|
3378
|
+
target.addEventListener('scroll', handleScroll, options);
|
|
3379
|
+
window.addEventListener('resize', handleScroll, options);
|
|
3384
3380
|
return () => {
|
|
3385
|
-
|
|
3381
|
+
target.removeEventListener('scroll', handleScroll);
|
|
3386
3382
|
window.removeEventListener('resize', handleScroll);
|
|
3383
|
+
if (frameRef.current) {
|
|
3384
|
+
cancelAnimationFrame(frameRef.current);
|
|
3385
|
+
}
|
|
3387
3386
|
};
|
|
3388
|
-
}, [handleScroll, container]);
|
|
3387
|
+
}, [handleScroll, container, disabled]);
|
|
3389
3388
|
return scrollPosition;
|
|
3390
3389
|
};
|
|
3391
|
-
|
|
3392
|
-
* Hook to track element visibility and intersection progress
|
|
3393
|
-
*/
|
|
3390
|
+
// Enhanced useScrollAnimation with callback support
|
|
3394
3391
|
const useScrollAnimation = function (ref, options) {
|
|
3395
3392
|
if (options === void 0) {
|
|
3396
3393
|
options = {};
|
|
@@ -3404,94 +3401,120 @@ const useScrollAnimation = function (ref, options) {
|
|
|
3404
3401
|
const entry = entries[0];
|
|
3405
3402
|
setIsInView(entry.isIntersecting);
|
|
3406
3403
|
setProgress(entry.intersectionRatio);
|
|
3404
|
+
if (options.onIntersectionChange) options.onIntersectionChange(entry.isIntersecting, entry.intersectionRatio);
|
|
3407
3405
|
}, {
|
|
3408
|
-
threshold: options.threshold
|
|
3409
|
-
rootMargin: options.rootMargin
|
|
3410
|
-
root: options.root
|
|
3406
|
+
threshold: options.threshold ?? 0,
|
|
3407
|
+
rootMargin: options.rootMargin ?? '0px',
|
|
3408
|
+
root: options.root ?? null
|
|
3411
3409
|
});
|
|
3412
3410
|
observer.observe(element);
|
|
3413
3411
|
return () => observer.disconnect();
|
|
3414
|
-
}, [ref, options.threshold, options.rootMargin, options.root]);
|
|
3412
|
+
}, [ref, options.threshold, options.rootMargin, options.root, options.onIntersectionChange]);
|
|
3415
3413
|
return {
|
|
3416
3414
|
isInView,
|
|
3417
3415
|
progress
|
|
3418
3416
|
};
|
|
3419
3417
|
};
|
|
3420
|
-
|
|
3421
|
-
* Hook to handle smooth scrolling to elements
|
|
3422
|
-
*/
|
|
3418
|
+
// Enhanced useSmoothScroll with error handling
|
|
3423
3419
|
const useSmoothScroll = () => {
|
|
3424
3420
|
return React.useCallback(function (element, offset) {
|
|
3425
3421
|
if (offset === void 0) {
|
|
3426
3422
|
offset = 0;
|
|
3427
3423
|
}
|
|
3428
3424
|
if (!element) return;
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3425
|
+
try {
|
|
3426
|
+
const top = element.getBoundingClientRect().top + (window.scrollY || window.pageYOffset) - offset;
|
|
3427
|
+
if ('scrollBehavior' in document.documentElement.style) {
|
|
3428
|
+
window.scrollTo({
|
|
3429
|
+
top,
|
|
3430
|
+
behavior: 'smooth'
|
|
3431
|
+
});
|
|
3432
|
+
} else {
|
|
3433
|
+
// Fallback for browsers that don't support smooth scrolling
|
|
3434
|
+
window.scrollTo(0, top);
|
|
3435
|
+
}
|
|
3436
|
+
} catch (error) {
|
|
3437
|
+
console.error('Error during smooth scroll:', error);
|
|
3438
|
+
}
|
|
3434
3439
|
}, []);
|
|
3435
3440
|
};
|
|
3436
|
-
|
|
3437
|
-
* Hook to implement infinite scrolling functionality
|
|
3438
|
-
*/
|
|
3441
|
+
// Enhanced useInfiniteScroll with debouncing
|
|
3439
3442
|
const useInfiniteScroll = function (callback, options) {
|
|
3440
3443
|
if (options === void 0) {
|
|
3441
3444
|
options = {};
|
|
3442
3445
|
}
|
|
3443
3446
|
const [sentinel, setSentinel] = React.useState(null);
|
|
3444
3447
|
const callbackRef = React.useRef(callback);
|
|
3448
|
+
const timeoutRef = React.useRef();
|
|
3445
3449
|
React.useEffect(() => {
|
|
3446
3450
|
callbackRef.current = callback;
|
|
3447
3451
|
}, [callback]);
|
|
3448
3452
|
React.useEffect(() => {
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
const observer = new IntersectionObserver(entries => {
|
|
3453
|
+
if (!sentinel || options.isLoading) return;
|
|
3454
|
+
const handleIntersection = entries => {
|
|
3452
3455
|
if (entries[0].isIntersecting) {
|
|
3453
|
-
|
|
3456
|
+
if (options.debounceMs) {
|
|
3457
|
+
if (timeoutRef.current) {
|
|
3458
|
+
clearTimeout(timeoutRef.current);
|
|
3459
|
+
}
|
|
3460
|
+
timeoutRef.current = setTimeout(callbackRef.current, options.debounceMs);
|
|
3461
|
+
} else {
|
|
3462
|
+
callbackRef.current();
|
|
3463
|
+
}
|
|
3454
3464
|
}
|
|
3455
|
-
}
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3465
|
+
};
|
|
3466
|
+
const observer = new IntersectionObserver(handleIntersection, {
|
|
3467
|
+
threshold: options.threshold ?? 0,
|
|
3468
|
+
root: options.root ?? null,
|
|
3469
|
+
rootMargin: options.rootMargin ?? '0px'
|
|
3459
3470
|
});
|
|
3460
|
-
observer.observe(
|
|
3461
|
-
return () =>
|
|
3462
|
-
|
|
3471
|
+
observer.observe(sentinel);
|
|
3472
|
+
return () => {
|
|
3473
|
+
observer.disconnect();
|
|
3474
|
+
if (timeoutRef.current) {
|
|
3475
|
+
clearTimeout(timeoutRef.current);
|
|
3476
|
+
}
|
|
3477
|
+
};
|
|
3478
|
+
}, [sentinel, options.threshold, options.isLoading, options.root, options.rootMargin, options.debounceMs]);
|
|
3463
3479
|
return {
|
|
3464
3480
|
sentinelRef: setSentinel
|
|
3465
3481
|
};
|
|
3466
3482
|
};
|
|
3467
|
-
|
|
3468
|
-
* Hook to detect scroll direction with configurable threshold
|
|
3469
|
-
*/
|
|
3483
|
+
// Enhanced useScrollDirection with better performance
|
|
3470
3484
|
const useScrollDirection = function (threshold) {
|
|
3471
3485
|
if (threshold === void 0) {
|
|
3472
3486
|
threshold = 0;
|
|
3473
3487
|
}
|
|
3474
3488
|
const [scrollDirection, setScrollDirection] = React.useState('up');
|
|
3475
3489
|
const lastScrollYRef = React.useRef(0);
|
|
3476
|
-
const
|
|
3477
|
-
const
|
|
3490
|
+
const prevDirectionRef = React.useRef('up');
|
|
3491
|
+
const frameRef = React.useRef();
|
|
3492
|
+
const updateDirection = React.useCallback(() => {
|
|
3478
3493
|
const scrollY = window.scrollY || window.pageYOffset;
|
|
3479
3494
|
const direction = scrollY > lastScrollYRef.current ? 'down' : 'up';
|
|
3480
|
-
if (Math.abs(scrollY - lastScrollYRef.current) > threshold && direction !==
|
|
3495
|
+
if (Math.abs(scrollY - lastScrollYRef.current) > threshold && direction !== prevDirectionRef.current) {
|
|
3481
3496
|
setScrollDirection(direction);
|
|
3482
|
-
|
|
3497
|
+
prevDirectionRef.current = direction;
|
|
3483
3498
|
}
|
|
3484
3499
|
lastScrollYRef.current = scrollY > 0 ? scrollY : 0;
|
|
3485
3500
|
}, [threshold]);
|
|
3486
3501
|
React.useEffect(() => {
|
|
3487
3502
|
const handleScroll = () => {
|
|
3488
|
-
|
|
3503
|
+
if (frameRef.current) {
|
|
3504
|
+
cancelAnimationFrame(frameRef.current);
|
|
3505
|
+
}
|
|
3506
|
+
frameRef.current = requestAnimationFrame(updateDirection);
|
|
3489
3507
|
};
|
|
3490
3508
|
window.addEventListener('scroll', handleScroll, {
|
|
3491
3509
|
passive: true
|
|
3492
3510
|
});
|
|
3493
|
-
return () =>
|
|
3494
|
-
|
|
3511
|
+
return () => {
|
|
3512
|
+
window.removeEventListener('scroll', handleScroll);
|
|
3513
|
+
if (frameRef.current) {
|
|
3514
|
+
cancelAnimationFrame(frameRef.current);
|
|
3515
|
+
}
|
|
3516
|
+
};
|
|
3517
|
+
}, [updateDirection]);
|
|
3495
3518
|
return scrollDirection;
|
|
3496
3519
|
};
|
|
3497
3520
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-studio.cjs.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-studio.cjs.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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