@hua-labs/motion-core 2.4.0 → 2.4.2
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/LICENSE +21 -0
- package/README.md +113 -115
- package/dist/index.cjs +106 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +36 -16
- package/dist/index.d.ts +36 -16
- package/dist/index.mjs +106 -48
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +2 -2
- package/dist/native.d.ts +2 -2
- package/dist/{springPhysics-DLyZ4nbx.d.mts → springPhysics-BZVRi9PQ.d.mts} +71 -18
- package/dist/{springPhysics-DLyZ4nbx.d.ts → springPhysics-BZVRi9PQ.d.ts} +71 -18
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { P as PageType, a as PageMotionRef, b as PageMotionsConfig, B as BaseMotionOptions, E as EntranceType, M as MotionElement, c as BaseMotionReturn, F as FadeInOptions, S as SlideOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { P as PageType, a as PageMotionRef, b as PageMotionsConfig, B as BaseMotionOptions, E as EntranceType, M as MotionElement, c as BaseMotionReturn, F as FadeInOptions, d as EntranceMotionReturn, S as SlideOptions, e as ScaleOptions, f as BounceOptions, g as PulseOptions, h as SpringOptions, G as GradientOptions, H as HoverMotionOptions, i as ScrollRevealOptions, R as RepeatOptions, T as ToggleMotionOptions, I as InteractionReturn, j as InViewOptions, k as InViewReturn, l as MouseOptions, m as MouseReturn, n as ReducedMotionReturn, W as WindowSizeOptions, o as WindowSizeReturn, p as ScrollRevealMotionType } from './springPhysics-BZVRi9PQ.mjs';
|
|
2
|
+
export { A as AutoMotionReturn, q as BuiltInProfileName, D as DeepPartial, r as EasingFunction, s as EasingType, t as GestureConfig, u as GestureOptions, v as MOTION_PRESETS, w as MotionCallback, x as MotionConfig, y as MotionDirection, z as MotionEasing, C as MotionEngine, J as MotionFrame, K as MotionInstance, L as MotionOptions, N as MotionPreset, O as MotionProfile, Q as MotionProfileBase, U as MotionProfileEntrance, V as MotionProfileInteraction, X as MotionProfileProvider, Y as MotionProfileProviderProps, Z as MotionProfileSpring, _ as MotionProfileStagger, $ as MotionProgressCallback, a0 as MotionState, a1 as MotionStateCallback, a2 as MotionTrigger, a3 as MotionType, a4 as ObserverReturn, a5 as OrchestrationConfig, a6 as PAGE_MOTIONS, a7 as PageMotionElement, a8 as PerformanceMetrics, a9 as PresetConfig, aa as ReducedMotionStrategy, ab as SequenceOrchestrationConfig, ac as SpringConfig, ad as SpringPhysicsConfig, ae as SpringResult, af as StyleMotionReturn, ag as ToggleMotionReturn, ah as TransitionEffects, ai as TransitionOptions, aj as TransitionType, ak as applyEasing, al as calculateSpring, am as easeIn, an as easeInOut, ao as easeInOutQuad, ap as easeInQuad, aq as easeOut, ar as easeOutQuad, as as easingPresets, at as getAvailableEasings, au as getEasing, av as getMotionPreset, aw as getPagePreset, ax as getPresetEasing, ay as hua, az as isEasingFunction, aA as isValidEasing, aB as linear, aC as mergeProfileOverrides, aD as mergeWithPreset, aE as motionEngine, aF as neutral, aG as resolveProfile, aH as safeApplyEasing, aI as transitionEffects, aJ as useMotionProfile } from './springPhysics-BZVRi9PQ.mjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import react__default, { CSSProperties, RefObject } from 'react';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* 1단계 API: 프리셋 기반 페이지 모션 (기존 방식)
|
|
@@ -99,9 +98,9 @@ interface UseUnifiedMotionOptions extends Omit<BaseMotionOptions, 'autoStart'> {
|
|
|
99
98
|
}
|
|
100
99
|
declare function useUnifiedMotion<T extends MotionElement = HTMLDivElement>(options: UseUnifiedMotionOptions): BaseMotionReturn<T>;
|
|
101
100
|
|
|
102
|
-
declare function useFadeIn<T extends MotionElement = HTMLDivElement>(options?: FadeInOptions):
|
|
101
|
+
declare function useFadeIn<T extends MotionElement = HTMLDivElement>(options?: FadeInOptions): EntranceMotionReturn<T>;
|
|
103
102
|
|
|
104
|
-
declare function useSlideUp<T extends MotionElement = HTMLDivElement>(options?: SlideOptions):
|
|
103
|
+
declare function useSlideUp<T extends MotionElement = HTMLDivElement>(options?: SlideOptions): EntranceMotionReturn<T>;
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
106
|
* useSlideLeft - 오른쪽에서 왼쪽으로 슬라이드하며 나타나는 애니메이션 훅
|
|
@@ -120,7 +119,7 @@ declare function useSlideUp<T extends MotionElement = HTMLDivElement>(options?:
|
|
|
120
119
|
* );
|
|
121
120
|
* ```
|
|
122
121
|
*/
|
|
123
|
-
declare function useSlideLeft<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions,
|
|
122
|
+
declare function useSlideLeft<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions, "direction">): EntranceMotionReturn<T>;
|
|
124
123
|
|
|
125
124
|
/**
|
|
126
125
|
* useSlideRight - 왼쪽에서 오른쪽으로 슬라이드하며 나타나는 애니메이션 훅
|
|
@@ -139,11 +138,11 @@ declare function useSlideLeft<T extends MotionElement = HTMLDivElement>(options?
|
|
|
139
138
|
* );
|
|
140
139
|
* ```
|
|
141
140
|
*/
|
|
142
|
-
declare function useSlideRight<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions,
|
|
141
|
+
declare function useSlideRight<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions, "direction">): EntranceMotionReturn<T>;
|
|
143
142
|
|
|
144
|
-
declare function useScaleIn<T extends MotionElement = HTMLDivElement>(options?: ScaleOptions):
|
|
143
|
+
declare function useScaleIn<T extends MotionElement = HTMLDivElement>(options?: ScaleOptions): EntranceMotionReturn<T>;
|
|
145
144
|
|
|
146
|
-
declare function useBounceIn<T extends MotionElement = HTMLDivElement>(options?: BounceOptions):
|
|
145
|
+
declare function useBounceIn<T extends MotionElement = HTMLDivElement>(options?: BounceOptions): EntranceMotionReturn<T>;
|
|
147
146
|
|
|
148
147
|
declare function usePulse<T extends MotionElement = HTMLDivElement>(options?: PulseOptions): BaseMotionReturn<T>;
|
|
149
148
|
|
|
@@ -287,7 +286,7 @@ declare function useToggleMotion<T extends MotionElement = HTMLDivElement>(optio
|
|
|
287
286
|
* );
|
|
288
287
|
* ```
|
|
289
288
|
*/
|
|
290
|
-
declare function useSlideDown<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions,
|
|
289
|
+
declare function useSlideDown<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions, "direction">): EntranceMotionReturn<T>;
|
|
291
290
|
|
|
292
291
|
/**
|
|
293
292
|
* useInView - 요소의 뷰포트 가시성 감지 훅
|
|
@@ -348,9 +347,11 @@ declare function useMouse(options?: MouseOptions): MouseReturn;
|
|
|
348
347
|
* Detects user's prefers-reduced-motion setting.
|
|
349
348
|
* Used to reduce or disable motion for accessibility.
|
|
350
349
|
*
|
|
350
|
+
* @returns {boolean} 모션 감소 선호 여부 / Whether reduced motion is preferred
|
|
351
|
+
*
|
|
351
352
|
* @example
|
|
352
353
|
* ```tsx
|
|
353
|
-
* const
|
|
354
|
+
* const prefersReducedMotion = useReducedMotion()
|
|
354
355
|
*
|
|
355
356
|
* return (
|
|
356
357
|
* <motion.div
|
|
@@ -362,7 +363,19 @@ declare function useMouse(options?: MouseOptions): MouseReturn;
|
|
|
362
363
|
* )
|
|
363
364
|
* ```
|
|
364
365
|
*/
|
|
365
|
-
declare function useReducedMotion():
|
|
366
|
+
declare function useReducedMotion(): boolean;
|
|
367
|
+
/**
|
|
368
|
+
* useReducedMotionObject - 객체 형태 반환 (backwards compat)
|
|
369
|
+
* Returns `{ prefersReducedMotion: boolean }` for backwards compatibility.
|
|
370
|
+
*
|
|
371
|
+
* @deprecated Use `useReducedMotion()` which returns `boolean` directly.
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```tsx
|
|
375
|
+
* const { prefersReducedMotion } = useReducedMotionObject()
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
declare function useReducedMotionObject(): ReducedMotionReturn;
|
|
366
379
|
|
|
367
380
|
/**
|
|
368
381
|
* useWindowSize - 윈도우 크기 추적 훅
|
|
@@ -1069,14 +1082,21 @@ interface OrchestrationReturn {
|
|
|
1069
1082
|
}
|
|
1070
1083
|
declare function useOrchestration(options?: OrchestrationConfig): OrchestrationReturn;
|
|
1071
1084
|
|
|
1085
|
+
/** The subset of BaseMotionReturn that useSequence actually consumes. */
|
|
1086
|
+
type SequenceMotionResult = Pick<BaseMotionReturn<MotionElement>, "start" | "stop" | "reset" | "ref"> & {
|
|
1087
|
+
pause?: () => void;
|
|
1088
|
+
resume?: () => void;
|
|
1089
|
+
};
|
|
1072
1090
|
interface SequenceConfig {
|
|
1073
1091
|
autoStart?: boolean;
|
|
1074
1092
|
loop?: boolean;
|
|
1075
1093
|
}
|
|
1094
|
+
/** @deprecated Use useOrchestration or useMotionOrchestra instead. */
|
|
1076
1095
|
interface SequenceItem {
|
|
1077
|
-
hook: () =>
|
|
1096
|
+
hook: () => SequenceMotionResult;
|
|
1078
1097
|
delay?: number;
|
|
1079
1098
|
}
|
|
1099
|
+
/** @deprecated Use useOrchestration or useMotionOrchestra instead. */
|
|
1080
1100
|
declare function useSequence(sequence: SequenceItem[], options?: SequenceConfig): {
|
|
1081
1101
|
start: () => void;
|
|
1082
1102
|
stop: () => void;
|
|
@@ -1086,7 +1106,7 @@ declare function useSequence(sequence: SequenceItem[], options?: SequenceConfig)
|
|
|
1086
1106
|
isPlaying: boolean;
|
|
1087
1107
|
currentIndex: number;
|
|
1088
1108
|
totalMotions: number;
|
|
1089
|
-
ref:
|
|
1109
|
+
ref: react.RefObject<MotionElement | null>;
|
|
1090
1110
|
};
|
|
1091
1111
|
|
|
1092
1112
|
interface LayoutMotionConfig {
|
|
@@ -1411,7 +1431,7 @@ interface MotionProps extends react__default.HTMLAttributes<HTMLElement> {
|
|
|
1411
1431
|
* // 커스텀 요소 + 타입
|
|
1412
1432
|
* <Motion as="section" type="slideUp" duration={800}>...</Motion>
|
|
1413
1433
|
*/
|
|
1414
|
-
declare function Motion({ as: Component, type, effects, scroll, delay, duration, children, className, style: userStyle, ...rest }: MotionProps):
|
|
1434
|
+
declare function Motion({ as: Component, type, effects, scroll, delay, duration, children, className, style: userStyle, ...rest }: MotionProps): react__default.JSX.Element;
|
|
1415
1435
|
|
|
1416
1436
|
interface CountUpOptions {
|
|
1417
1437
|
/** 목표 숫자 */
|
|
@@ -1555,4 +1575,4 @@ interface UseStaggerReturn {
|
|
|
1555
1575
|
*/
|
|
1556
1576
|
declare function useStagger(options: UseStaggerOptions): UseStaggerReturn;
|
|
1557
1577
|
|
|
1558
|
-
export { type AutoFadeConfig, type AutoMotionConfig, type AutoPlayConfig, type AutoScaleConfig, type AutoSlideConfig, BaseMotionOptions, BaseMotionReturn, type BlurInOptions, type BlurInReturn, BounceOptions, type ButtonEffectOptions, type CardListOptions, type ClipRevealOptions, type ClipRevealReturn, type CountUpOptions, type CountUpReturn, type CustomCursorOptions, type CustomCursorReturn, type ElementProgressOptions, type ElementProgressReturn, EntranceType, FadeInOptions, type GameLoopConfig, type GameState, GradientOptions, HoverMotionOptions, InViewOptions, InViewReturn, InteractionReturn, type InteractiveConfig, type InteractiveState, type KeyboardToggleConfig, type LanguageConfig, type LayoutMotionConfig, type LayoutState, type LoadingSpinnerOptions, type MagneticCursorOptions, type MagneticCursorReturn, Motion, type MotionEffects, MotionElement, type MotionFromToConfig, type MotionProps, MouseOptions, MouseReturn, type NavigationOptions, PageMotionRef, PageMotionsConfig, PageType, type PerformanceMonitorConfig, type PerformanceMonitorState, PulseOptions, ReducedMotionReturn, RepeatOptions, ScaleOptions, type ScrollDirectionConfig, type ScrollPositionToggleConfig, ScrollRevealMotionType, ScrollRevealOptions, type ScrollToggleOptions, type SequenceConfig, type SkeletonOptions, SlideOptions, type SmoothScrollOptions, type SmoothScrollReturn, SpringOptions, type StickyToggleConfig, ToggleMotionOptions, type TypewriterOptions, type TypewriterReturn, type MotionConfig as UseMotionConfig, type OrchestrationConfig as UseOrchestrationConfig, type UseStaggerOptions, type UseStaggerReturn, type UseUnifiedMotionOptions, type ViewportToggleConfig, type VisibilityToggleOptions, WindowSizeOptions, WindowSizeReturn, createLayoutTransition, observeElement, useAutoFade, useAutoPlay, useAutoScale, useAutoSlide, useBlurIn, useBounceIn, useButtonEffect, useCardList, useClickToggle, useClipReveal, useCountUp, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGameLoop, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useInteractive, useKeyboardToggle, useLanguageAwareMotion, useLayoutMotion, useLoadingSpinner, useMagneticCursor, useMotion, useMotionOrchestra, useMotionState, useMouse, useNavigation, useOrchestration, usePageMotions, usePerformanceMonitor, usePulse, useReducedMotion, useRepeat, useScaleIn, useScrollDirection, useScrollPositionToggle, useScrollProgress, useScrollReveal, useScrollToggle, useSequence, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useStickyToggle, useToggleMotion, useTypewriter, useUnifiedMotion, useViewportToggle, useVisibilityToggle, useWindowSize };
|
|
1578
|
+
export { type AutoFadeConfig, type AutoMotionConfig, type AutoPlayConfig, type AutoScaleConfig, type AutoSlideConfig, BaseMotionOptions, BaseMotionReturn, type BlurInOptions, type BlurInReturn, BounceOptions, type ButtonEffectOptions, type CardListOptions, type ClipRevealOptions, type ClipRevealReturn, type CountUpOptions, type CountUpReturn, type CustomCursorOptions, type CustomCursorReturn, type ElementProgressOptions, type ElementProgressReturn, EntranceMotionReturn, EntranceType, FadeInOptions, type GameLoopConfig, type GameState, GradientOptions, HoverMotionOptions, InViewOptions, InViewReturn, InteractionReturn, type InteractiveConfig, type InteractiveState, type KeyboardToggleConfig, type LanguageConfig, type LayoutMotionConfig, type LayoutState, type LoadingSpinnerOptions, type MagneticCursorOptions, type MagneticCursorReturn, Motion, type MotionEffects, MotionElement, type MotionFromToConfig, type MotionProps, MouseOptions, MouseReturn, type NavigationOptions, PageMotionRef, PageMotionsConfig, PageType, type PerformanceMonitorConfig, type PerformanceMonitorState, PulseOptions, ReducedMotionReturn, RepeatOptions, ScaleOptions, type ScrollDirectionConfig, type ScrollPositionToggleConfig, ScrollRevealMotionType, ScrollRevealOptions, type ScrollToggleOptions, type SequenceConfig, type SkeletonOptions, SlideOptions, type SmoothScrollOptions, type SmoothScrollReturn, SpringOptions, type StickyToggleConfig, ToggleMotionOptions, type TypewriterOptions, type TypewriterReturn, type MotionConfig as UseMotionConfig, type OrchestrationConfig as UseOrchestrationConfig, type UseStaggerOptions, type UseStaggerReturn, type UseUnifiedMotionOptions, type ViewportToggleConfig, type VisibilityToggleOptions, WindowSizeOptions, WindowSizeReturn, createLayoutTransition, observeElement, useAutoFade, useAutoPlay, useAutoScale, useAutoSlide, useBlurIn, useBounceIn, useButtonEffect, useCardList, useClickToggle, useClipReveal, useCountUp, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGameLoop, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useInteractive, useKeyboardToggle, useLanguageAwareMotion, useLayoutMotion, useLoadingSpinner, useMagneticCursor, useMotion, useMotionOrchestra, useMotionState, useMouse, useNavigation, useOrchestration, usePageMotions, usePerformanceMonitor, usePulse, useReducedMotion, useReducedMotionObject, useRepeat, useScaleIn, useScrollDirection, useScrollPositionToggle, useScrollProgress, useScrollReveal, useScrollToggle, useSequence, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useStickyToggle, useToggleMotion, useTypewriter, useUnifiedMotion, useViewportToggle, useVisibilityToggle, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { P as PageType, a as PageMotionRef, b as PageMotionsConfig, B as BaseMotionOptions, E as EntranceType, M as MotionElement, c as BaseMotionReturn, F as FadeInOptions, S as SlideOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { P as PageType, a as PageMotionRef, b as PageMotionsConfig, B as BaseMotionOptions, E as EntranceType, M as MotionElement, c as BaseMotionReturn, F as FadeInOptions, d as EntranceMotionReturn, S as SlideOptions, e as ScaleOptions, f as BounceOptions, g as PulseOptions, h as SpringOptions, G as GradientOptions, H as HoverMotionOptions, i as ScrollRevealOptions, R as RepeatOptions, T as ToggleMotionOptions, I as InteractionReturn, j as InViewOptions, k as InViewReturn, l as MouseOptions, m as MouseReturn, n as ReducedMotionReturn, W as WindowSizeOptions, o as WindowSizeReturn, p as ScrollRevealMotionType } from './springPhysics-BZVRi9PQ.js';
|
|
2
|
+
export { A as AutoMotionReturn, q as BuiltInProfileName, D as DeepPartial, r as EasingFunction, s as EasingType, t as GestureConfig, u as GestureOptions, v as MOTION_PRESETS, w as MotionCallback, x as MotionConfig, y as MotionDirection, z as MotionEasing, C as MotionEngine, J as MotionFrame, K as MotionInstance, L as MotionOptions, N as MotionPreset, O as MotionProfile, Q as MotionProfileBase, U as MotionProfileEntrance, V as MotionProfileInteraction, X as MotionProfileProvider, Y as MotionProfileProviderProps, Z as MotionProfileSpring, _ as MotionProfileStagger, $ as MotionProgressCallback, a0 as MotionState, a1 as MotionStateCallback, a2 as MotionTrigger, a3 as MotionType, a4 as ObserverReturn, a5 as OrchestrationConfig, a6 as PAGE_MOTIONS, a7 as PageMotionElement, a8 as PerformanceMetrics, a9 as PresetConfig, aa as ReducedMotionStrategy, ab as SequenceOrchestrationConfig, ac as SpringConfig, ad as SpringPhysicsConfig, ae as SpringResult, af as StyleMotionReturn, ag as ToggleMotionReturn, ah as TransitionEffects, ai as TransitionOptions, aj as TransitionType, ak as applyEasing, al as calculateSpring, am as easeIn, an as easeInOut, ao as easeInOutQuad, ap as easeInQuad, aq as easeOut, ar as easeOutQuad, as as easingPresets, at as getAvailableEasings, au as getEasing, av as getMotionPreset, aw as getPagePreset, ax as getPresetEasing, ay as hua, az as isEasingFunction, aA as isValidEasing, aB as linear, aC as mergeProfileOverrides, aD as mergeWithPreset, aE as motionEngine, aF as neutral, aG as resolveProfile, aH as safeApplyEasing, aI as transitionEffects, aJ as useMotionProfile } from './springPhysics-BZVRi9PQ.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import react__default, { CSSProperties, RefObject } from 'react';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* 1단계 API: 프리셋 기반 페이지 모션 (기존 방식)
|
|
@@ -99,9 +98,9 @@ interface UseUnifiedMotionOptions extends Omit<BaseMotionOptions, 'autoStart'> {
|
|
|
99
98
|
}
|
|
100
99
|
declare function useUnifiedMotion<T extends MotionElement = HTMLDivElement>(options: UseUnifiedMotionOptions): BaseMotionReturn<T>;
|
|
101
100
|
|
|
102
|
-
declare function useFadeIn<T extends MotionElement = HTMLDivElement>(options?: FadeInOptions):
|
|
101
|
+
declare function useFadeIn<T extends MotionElement = HTMLDivElement>(options?: FadeInOptions): EntranceMotionReturn<T>;
|
|
103
102
|
|
|
104
|
-
declare function useSlideUp<T extends MotionElement = HTMLDivElement>(options?: SlideOptions):
|
|
103
|
+
declare function useSlideUp<T extends MotionElement = HTMLDivElement>(options?: SlideOptions): EntranceMotionReturn<T>;
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
106
|
* useSlideLeft - 오른쪽에서 왼쪽으로 슬라이드하며 나타나는 애니메이션 훅
|
|
@@ -120,7 +119,7 @@ declare function useSlideUp<T extends MotionElement = HTMLDivElement>(options?:
|
|
|
120
119
|
* );
|
|
121
120
|
* ```
|
|
122
121
|
*/
|
|
123
|
-
declare function useSlideLeft<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions,
|
|
122
|
+
declare function useSlideLeft<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions, "direction">): EntranceMotionReturn<T>;
|
|
124
123
|
|
|
125
124
|
/**
|
|
126
125
|
* useSlideRight - 왼쪽에서 오른쪽으로 슬라이드하며 나타나는 애니메이션 훅
|
|
@@ -139,11 +138,11 @@ declare function useSlideLeft<T extends MotionElement = HTMLDivElement>(options?
|
|
|
139
138
|
* );
|
|
140
139
|
* ```
|
|
141
140
|
*/
|
|
142
|
-
declare function useSlideRight<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions,
|
|
141
|
+
declare function useSlideRight<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions, "direction">): EntranceMotionReturn<T>;
|
|
143
142
|
|
|
144
|
-
declare function useScaleIn<T extends MotionElement = HTMLDivElement>(options?: ScaleOptions):
|
|
143
|
+
declare function useScaleIn<T extends MotionElement = HTMLDivElement>(options?: ScaleOptions): EntranceMotionReturn<T>;
|
|
145
144
|
|
|
146
|
-
declare function useBounceIn<T extends MotionElement = HTMLDivElement>(options?: BounceOptions):
|
|
145
|
+
declare function useBounceIn<T extends MotionElement = HTMLDivElement>(options?: BounceOptions): EntranceMotionReturn<T>;
|
|
147
146
|
|
|
148
147
|
declare function usePulse<T extends MotionElement = HTMLDivElement>(options?: PulseOptions): BaseMotionReturn<T>;
|
|
149
148
|
|
|
@@ -287,7 +286,7 @@ declare function useToggleMotion<T extends MotionElement = HTMLDivElement>(optio
|
|
|
287
286
|
* );
|
|
288
287
|
* ```
|
|
289
288
|
*/
|
|
290
|
-
declare function useSlideDown<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions,
|
|
289
|
+
declare function useSlideDown<T extends MotionElement = HTMLDivElement>(options?: Omit<SlideOptions, "direction">): EntranceMotionReturn<T>;
|
|
291
290
|
|
|
292
291
|
/**
|
|
293
292
|
* useInView - 요소의 뷰포트 가시성 감지 훅
|
|
@@ -348,9 +347,11 @@ declare function useMouse(options?: MouseOptions): MouseReturn;
|
|
|
348
347
|
* Detects user's prefers-reduced-motion setting.
|
|
349
348
|
* Used to reduce or disable motion for accessibility.
|
|
350
349
|
*
|
|
350
|
+
* @returns {boolean} 모션 감소 선호 여부 / Whether reduced motion is preferred
|
|
351
|
+
*
|
|
351
352
|
* @example
|
|
352
353
|
* ```tsx
|
|
353
|
-
* const
|
|
354
|
+
* const prefersReducedMotion = useReducedMotion()
|
|
354
355
|
*
|
|
355
356
|
* return (
|
|
356
357
|
* <motion.div
|
|
@@ -362,7 +363,19 @@ declare function useMouse(options?: MouseOptions): MouseReturn;
|
|
|
362
363
|
* )
|
|
363
364
|
* ```
|
|
364
365
|
*/
|
|
365
|
-
declare function useReducedMotion():
|
|
366
|
+
declare function useReducedMotion(): boolean;
|
|
367
|
+
/**
|
|
368
|
+
* useReducedMotionObject - 객체 형태 반환 (backwards compat)
|
|
369
|
+
* Returns `{ prefersReducedMotion: boolean }` for backwards compatibility.
|
|
370
|
+
*
|
|
371
|
+
* @deprecated Use `useReducedMotion()` which returns `boolean` directly.
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```tsx
|
|
375
|
+
* const { prefersReducedMotion } = useReducedMotionObject()
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
declare function useReducedMotionObject(): ReducedMotionReturn;
|
|
366
379
|
|
|
367
380
|
/**
|
|
368
381
|
* useWindowSize - 윈도우 크기 추적 훅
|
|
@@ -1069,14 +1082,21 @@ interface OrchestrationReturn {
|
|
|
1069
1082
|
}
|
|
1070
1083
|
declare function useOrchestration(options?: OrchestrationConfig): OrchestrationReturn;
|
|
1071
1084
|
|
|
1085
|
+
/** The subset of BaseMotionReturn that useSequence actually consumes. */
|
|
1086
|
+
type SequenceMotionResult = Pick<BaseMotionReturn<MotionElement>, "start" | "stop" | "reset" | "ref"> & {
|
|
1087
|
+
pause?: () => void;
|
|
1088
|
+
resume?: () => void;
|
|
1089
|
+
};
|
|
1072
1090
|
interface SequenceConfig {
|
|
1073
1091
|
autoStart?: boolean;
|
|
1074
1092
|
loop?: boolean;
|
|
1075
1093
|
}
|
|
1094
|
+
/** @deprecated Use useOrchestration or useMotionOrchestra instead. */
|
|
1076
1095
|
interface SequenceItem {
|
|
1077
|
-
hook: () =>
|
|
1096
|
+
hook: () => SequenceMotionResult;
|
|
1078
1097
|
delay?: number;
|
|
1079
1098
|
}
|
|
1099
|
+
/** @deprecated Use useOrchestration or useMotionOrchestra instead. */
|
|
1080
1100
|
declare function useSequence(sequence: SequenceItem[], options?: SequenceConfig): {
|
|
1081
1101
|
start: () => void;
|
|
1082
1102
|
stop: () => void;
|
|
@@ -1086,7 +1106,7 @@ declare function useSequence(sequence: SequenceItem[], options?: SequenceConfig)
|
|
|
1086
1106
|
isPlaying: boolean;
|
|
1087
1107
|
currentIndex: number;
|
|
1088
1108
|
totalMotions: number;
|
|
1089
|
-
ref:
|
|
1109
|
+
ref: react.RefObject<MotionElement | null>;
|
|
1090
1110
|
};
|
|
1091
1111
|
|
|
1092
1112
|
interface LayoutMotionConfig {
|
|
@@ -1411,7 +1431,7 @@ interface MotionProps extends react__default.HTMLAttributes<HTMLElement> {
|
|
|
1411
1431
|
* // 커스텀 요소 + 타입
|
|
1412
1432
|
* <Motion as="section" type="slideUp" duration={800}>...</Motion>
|
|
1413
1433
|
*/
|
|
1414
|
-
declare function Motion({ as: Component, type, effects, scroll, delay, duration, children, className, style: userStyle, ...rest }: MotionProps):
|
|
1434
|
+
declare function Motion({ as: Component, type, effects, scroll, delay, duration, children, className, style: userStyle, ...rest }: MotionProps): react__default.JSX.Element;
|
|
1415
1435
|
|
|
1416
1436
|
interface CountUpOptions {
|
|
1417
1437
|
/** 목표 숫자 */
|
|
@@ -1555,4 +1575,4 @@ interface UseStaggerReturn {
|
|
|
1555
1575
|
*/
|
|
1556
1576
|
declare function useStagger(options: UseStaggerOptions): UseStaggerReturn;
|
|
1557
1577
|
|
|
1558
|
-
export { type AutoFadeConfig, type AutoMotionConfig, type AutoPlayConfig, type AutoScaleConfig, type AutoSlideConfig, BaseMotionOptions, BaseMotionReturn, type BlurInOptions, type BlurInReturn, BounceOptions, type ButtonEffectOptions, type CardListOptions, type ClipRevealOptions, type ClipRevealReturn, type CountUpOptions, type CountUpReturn, type CustomCursorOptions, type CustomCursorReturn, type ElementProgressOptions, type ElementProgressReturn, EntranceType, FadeInOptions, type GameLoopConfig, type GameState, GradientOptions, HoverMotionOptions, InViewOptions, InViewReturn, InteractionReturn, type InteractiveConfig, type InteractiveState, type KeyboardToggleConfig, type LanguageConfig, type LayoutMotionConfig, type LayoutState, type LoadingSpinnerOptions, type MagneticCursorOptions, type MagneticCursorReturn, Motion, type MotionEffects, MotionElement, type MotionFromToConfig, type MotionProps, MouseOptions, MouseReturn, type NavigationOptions, PageMotionRef, PageMotionsConfig, PageType, type PerformanceMonitorConfig, type PerformanceMonitorState, PulseOptions, ReducedMotionReturn, RepeatOptions, ScaleOptions, type ScrollDirectionConfig, type ScrollPositionToggleConfig, ScrollRevealMotionType, ScrollRevealOptions, type ScrollToggleOptions, type SequenceConfig, type SkeletonOptions, SlideOptions, type SmoothScrollOptions, type SmoothScrollReturn, SpringOptions, type StickyToggleConfig, ToggleMotionOptions, type TypewriterOptions, type TypewriterReturn, type MotionConfig as UseMotionConfig, type OrchestrationConfig as UseOrchestrationConfig, type UseStaggerOptions, type UseStaggerReturn, type UseUnifiedMotionOptions, type ViewportToggleConfig, type VisibilityToggleOptions, WindowSizeOptions, WindowSizeReturn, createLayoutTransition, observeElement, useAutoFade, useAutoPlay, useAutoScale, useAutoSlide, useBlurIn, useBounceIn, useButtonEffect, useCardList, useClickToggle, useClipReveal, useCountUp, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGameLoop, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useInteractive, useKeyboardToggle, useLanguageAwareMotion, useLayoutMotion, useLoadingSpinner, useMagneticCursor, useMotion, useMotionOrchestra, useMotionState, useMouse, useNavigation, useOrchestration, usePageMotions, usePerformanceMonitor, usePulse, useReducedMotion, useRepeat, useScaleIn, useScrollDirection, useScrollPositionToggle, useScrollProgress, useScrollReveal, useScrollToggle, useSequence, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useStickyToggle, useToggleMotion, useTypewriter, useUnifiedMotion, useViewportToggle, useVisibilityToggle, useWindowSize };
|
|
1578
|
+
export { type AutoFadeConfig, type AutoMotionConfig, type AutoPlayConfig, type AutoScaleConfig, type AutoSlideConfig, BaseMotionOptions, BaseMotionReturn, type BlurInOptions, type BlurInReturn, BounceOptions, type ButtonEffectOptions, type CardListOptions, type ClipRevealOptions, type ClipRevealReturn, type CountUpOptions, type CountUpReturn, type CustomCursorOptions, type CustomCursorReturn, type ElementProgressOptions, type ElementProgressReturn, EntranceMotionReturn, EntranceType, FadeInOptions, type GameLoopConfig, type GameState, GradientOptions, HoverMotionOptions, InViewOptions, InViewReturn, InteractionReturn, type InteractiveConfig, type InteractiveState, type KeyboardToggleConfig, type LanguageConfig, type LayoutMotionConfig, type LayoutState, type LoadingSpinnerOptions, type MagneticCursorOptions, type MagneticCursorReturn, Motion, type MotionEffects, MotionElement, type MotionFromToConfig, type MotionProps, MouseOptions, MouseReturn, type NavigationOptions, PageMotionRef, PageMotionsConfig, PageType, type PerformanceMonitorConfig, type PerformanceMonitorState, PulseOptions, ReducedMotionReturn, RepeatOptions, ScaleOptions, type ScrollDirectionConfig, type ScrollPositionToggleConfig, ScrollRevealMotionType, ScrollRevealOptions, type ScrollToggleOptions, type SequenceConfig, type SkeletonOptions, SlideOptions, type SmoothScrollOptions, type SmoothScrollReturn, SpringOptions, type StickyToggleConfig, ToggleMotionOptions, type TypewriterOptions, type TypewriterReturn, type MotionConfig as UseMotionConfig, type OrchestrationConfig as UseOrchestrationConfig, type UseStaggerOptions, type UseStaggerReturn, type UseUnifiedMotionOptions, type ViewportToggleConfig, type VisibilityToggleOptions, WindowSizeOptions, WindowSizeReturn, createLayoutTransition, observeElement, useAutoFade, useAutoPlay, useAutoScale, useAutoSlide, useBlurIn, useBounceIn, useButtonEffect, useCardList, useClickToggle, useClipReveal, useCountUp, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGameLoop, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useInteractive, useKeyboardToggle, useLanguageAwareMotion, useLayoutMotion, useLoadingSpinner, useMagneticCursor, useMotion, useMotionOrchestra, useMotionState, useMouse, useNavigation, useOrchestration, usePageMotions, usePerformanceMonitor, usePulse, useReducedMotion, useReducedMotionObject, useRepeat, useScaleIn, useScrollDirection, useScrollPositionToggle, useScrollProgress, useScrollReveal, useScrollToggle, useSequence, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useStickyToggle, useToggleMotion, useTypewriter, useUnifiedMotion, useViewportToggle, useVisibilityToggle, useWindowSize };
|
package/dist/index.mjs
CHANGED
|
@@ -942,6 +942,10 @@ function useFadeIn(options = {}) {
|
|
|
942
942
|
setProgress(0);
|
|
943
943
|
onReset?.();
|
|
944
944
|
}, [stop, onReset]);
|
|
945
|
+
const pause = useCallback(() => {
|
|
946
|
+
}, []);
|
|
947
|
+
const resume = useCallback(() => {
|
|
948
|
+
}, []);
|
|
945
949
|
useEffect(() => {
|
|
946
950
|
if (!ref.current || !autoStart) return;
|
|
947
951
|
return observeElement(
|
|
@@ -958,14 +962,25 @@ function useFadeIn(options = {}) {
|
|
|
958
962
|
stop();
|
|
959
963
|
};
|
|
960
964
|
}, [stop]);
|
|
961
|
-
const style = useMemo(
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
965
|
+
const style = useMemo(
|
|
966
|
+
() => ({
|
|
967
|
+
opacity: isVisible ? targetOpacity : initialOpacity,
|
|
968
|
+
transition: `opacity ${duration}ms ${easing}`,
|
|
969
|
+
"--motion-delay": `${delay}ms`,
|
|
970
|
+
"--motion-duration": `${duration}ms`,
|
|
971
|
+
"--motion-easing": easing,
|
|
972
|
+
"--motion-progress": `${progress}`
|
|
973
|
+
}),
|
|
974
|
+
[
|
|
975
|
+
isVisible,
|
|
976
|
+
targetOpacity,
|
|
977
|
+
initialOpacity,
|
|
978
|
+
duration,
|
|
979
|
+
easing,
|
|
980
|
+
delay,
|
|
981
|
+
progress
|
|
982
|
+
]
|
|
983
|
+
);
|
|
969
984
|
return {
|
|
970
985
|
ref,
|
|
971
986
|
isVisible,
|
|
@@ -974,7 +989,9 @@ function useFadeIn(options = {}) {
|
|
|
974
989
|
progress,
|
|
975
990
|
start,
|
|
976
991
|
stop,
|
|
977
|
-
reset
|
|
992
|
+
reset,
|
|
993
|
+
pause,
|
|
994
|
+
resume
|
|
978
995
|
};
|
|
979
996
|
}
|
|
980
997
|
function useSlideUp(options = {}) {
|
|
@@ -1063,6 +1080,10 @@ function useSlideUp(options = {}) {
|
|
|
1063
1080
|
setProgress(0);
|
|
1064
1081
|
onReset?.();
|
|
1065
1082
|
}, [stop, onReset]);
|
|
1083
|
+
const pause = useCallback(() => {
|
|
1084
|
+
}, []);
|
|
1085
|
+
const resume = useCallback(() => {
|
|
1086
|
+
}, []);
|
|
1066
1087
|
useEffect(() => {
|
|
1067
1088
|
if (!ref.current || !autoStart) return;
|
|
1068
1089
|
return observeElement(
|
|
@@ -1079,21 +1100,37 @@ function useSlideUp(options = {}) {
|
|
|
1079
1100
|
stop();
|
|
1080
1101
|
};
|
|
1081
1102
|
}, [stop]);
|
|
1082
|
-
const initialTransform = useMemo(
|
|
1103
|
+
const initialTransform = useMemo(
|
|
1104
|
+
() => getInitialTransform2(),
|
|
1105
|
+
[getInitialTransform2]
|
|
1106
|
+
);
|
|
1083
1107
|
const finalTransform = useMemo(() => {
|
|
1084
1108
|
return direction === "left" || direction === "right" ? "translateX(0)" : "translateY(0)";
|
|
1085
1109
|
}, [direction]);
|
|
1086
|
-
const style = useMemo(
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1110
|
+
const style = useMemo(
|
|
1111
|
+
() => ({
|
|
1112
|
+
opacity: isVisible ? 1 : 0,
|
|
1113
|
+
transform: isVisible ? finalTransform : initialTransform,
|
|
1114
|
+
transition: `opacity ${duration}ms ${easing}, transform ${duration}ms ${easing}`,
|
|
1115
|
+
"--motion-delay": `${delay}ms`,
|
|
1116
|
+
"--motion-duration": `${duration}ms`,
|
|
1117
|
+
"--motion-easing": easing,
|
|
1118
|
+
"--motion-progress": `${progress}`,
|
|
1119
|
+
"--motion-direction": direction,
|
|
1120
|
+
"--motion-distance": `${distance}px`
|
|
1121
|
+
}),
|
|
1122
|
+
[
|
|
1123
|
+
isVisible,
|
|
1124
|
+
initialTransform,
|
|
1125
|
+
finalTransform,
|
|
1126
|
+
duration,
|
|
1127
|
+
easing,
|
|
1128
|
+
delay,
|
|
1129
|
+
progress,
|
|
1130
|
+
direction,
|
|
1131
|
+
distance
|
|
1132
|
+
]
|
|
1133
|
+
);
|
|
1097
1134
|
return {
|
|
1098
1135
|
ref,
|
|
1099
1136
|
isVisible,
|
|
@@ -1102,7 +1139,9 @@ function useSlideUp(options = {}) {
|
|
|
1102
1139
|
progress,
|
|
1103
1140
|
start,
|
|
1104
1141
|
stop,
|
|
1105
|
-
reset
|
|
1142
|
+
reset,
|
|
1143
|
+
pause,
|
|
1144
|
+
resume
|
|
1106
1145
|
};
|
|
1107
1146
|
}
|
|
1108
1147
|
|
|
@@ -1182,6 +1221,10 @@ function useScaleIn(options = {}) {
|
|
|
1182
1221
|
}
|
|
1183
1222
|
onReset?.();
|
|
1184
1223
|
}, [stop, initialScale, onReset]);
|
|
1224
|
+
const pause = useCallback(() => {
|
|
1225
|
+
}, []);
|
|
1226
|
+
const resume = useCallback(() => {
|
|
1227
|
+
}, []);
|
|
1185
1228
|
useEffect(() => {
|
|
1186
1229
|
if (!ref.current || !autoStart) return;
|
|
1187
1230
|
return observeElement(
|
|
@@ -1198,15 +1241,18 @@ function useScaleIn(options = {}) {
|
|
|
1198
1241
|
stop();
|
|
1199
1242
|
};
|
|
1200
1243
|
}, [stop]);
|
|
1201
|
-
const style = useMemo(
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1244
|
+
const style = useMemo(
|
|
1245
|
+
() => ({
|
|
1246
|
+
transform: `scale(${scale})`,
|
|
1247
|
+
opacity,
|
|
1248
|
+
transition: `all ${duration}ms ${easing}`,
|
|
1249
|
+
"--motion-delay": `${delay}ms`,
|
|
1250
|
+
"--motion-duration": `${duration}ms`,
|
|
1251
|
+
"--motion-easing": easing,
|
|
1252
|
+
"--motion-progress": `${progress}`
|
|
1253
|
+
}),
|
|
1254
|
+
[scale, opacity, duration, easing, delay, progress]
|
|
1255
|
+
);
|
|
1210
1256
|
return {
|
|
1211
1257
|
ref,
|
|
1212
1258
|
isVisible,
|
|
@@ -1215,7 +1261,9 @@ function useScaleIn(options = {}) {
|
|
|
1215
1261
|
progress,
|
|
1216
1262
|
start,
|
|
1217
1263
|
reset,
|
|
1218
|
-
stop
|
|
1264
|
+
stop,
|
|
1265
|
+
pause,
|
|
1266
|
+
resume
|
|
1219
1267
|
};
|
|
1220
1268
|
}
|
|
1221
1269
|
function useBounceIn(options = {}) {
|
|
@@ -1293,6 +1341,10 @@ function useBounceIn(options = {}) {
|
|
|
1293
1341
|
}
|
|
1294
1342
|
onReset?.();
|
|
1295
1343
|
}, [stop, onReset]);
|
|
1344
|
+
const pause = useCallback(() => {
|
|
1345
|
+
}, []);
|
|
1346
|
+
const resume = useCallback(() => {
|
|
1347
|
+
}, []);
|
|
1296
1348
|
useEffect(() => {
|
|
1297
1349
|
if (!ref.current || !autoStart) return;
|
|
1298
1350
|
return observeElement(
|
|
@@ -1309,15 +1361,18 @@ function useBounceIn(options = {}) {
|
|
|
1309
1361
|
stop();
|
|
1310
1362
|
};
|
|
1311
1363
|
}, [stop]);
|
|
1312
|
-
const style = useMemo(
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1364
|
+
const style = useMemo(
|
|
1365
|
+
() => ({
|
|
1366
|
+
transform: `scale(${scale})`,
|
|
1367
|
+
opacity,
|
|
1368
|
+
transition: `all ${duration}ms ${easing}`,
|
|
1369
|
+
"--motion-delay": `${delay}ms`,
|
|
1370
|
+
"--motion-duration": `${duration}ms`,
|
|
1371
|
+
"--motion-easing": easing,
|
|
1372
|
+
"--motion-progress": `${progress}`
|
|
1373
|
+
}),
|
|
1374
|
+
[scale, opacity, duration, easing, delay, progress]
|
|
1375
|
+
);
|
|
1321
1376
|
return {
|
|
1322
1377
|
ref,
|
|
1323
1378
|
isVisible,
|
|
@@ -1326,7 +1381,9 @@ function useBounceIn(options = {}) {
|
|
|
1326
1381
|
progress,
|
|
1327
1382
|
start,
|
|
1328
1383
|
reset,
|
|
1329
|
-
stop
|
|
1384
|
+
stop,
|
|
1385
|
+
pause,
|
|
1386
|
+
resume
|
|
1330
1387
|
};
|
|
1331
1388
|
}
|
|
1332
1389
|
function usePulse(options = {}) {
|
|
@@ -2590,9 +2647,11 @@ function useReducedMotion() {
|
|
|
2590
2647
|
mediaQuery.removeEventListener("change", handleChange);
|
|
2591
2648
|
};
|
|
2592
2649
|
}, []);
|
|
2593
|
-
return
|
|
2594
|
-
|
|
2595
|
-
|
|
2650
|
+
return prefersReducedMotion;
|
|
2651
|
+
}
|
|
2652
|
+
function useReducedMotionObject() {
|
|
2653
|
+
const prefersReducedMotion = useReducedMotion();
|
|
2654
|
+
return { prefersReducedMotion };
|
|
2596
2655
|
}
|
|
2597
2656
|
function useWindowSize(options = {}) {
|
|
2598
2657
|
const {
|
|
@@ -6016,8 +6075,7 @@ function useSequence(sequence, options = {}) {
|
|
|
6016
6075
|
isPlaying,
|
|
6017
6076
|
currentIndex,
|
|
6018
6077
|
totalMotions: sequence.length,
|
|
6019
|
-
ref: motions[0]?.ref
|
|
6020
|
-
})
|
|
6078
|
+
ref: motions[0]?.ref ?? { current: null }
|
|
6021
6079
|
// 첫 번째 모션의 ref 반환
|
|
6022
6080
|
};
|
|
6023
6081
|
}
|
|
@@ -7339,6 +7397,6 @@ function useStagger(options) {
|
|
|
7339
7397
|
};
|
|
7340
7398
|
}
|
|
7341
7399
|
|
|
7342
|
-
export { Motion, createLayoutTransition, observeElement, useAutoFade, useAutoPlay, useAutoScale, useAutoSlide, useBlurIn, useBounceIn, useButtonEffect, useCardList, useClickToggle, useClipReveal, useCountUp, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGameLoop, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useInteractive, useKeyboardToggle, useLanguageAwareMotion, useLayoutMotion, useLoadingSpinner, useMagneticCursor, useMotion, useMotionOrchestra, useMotionState, useMouse, useNavigation, useOrchestration, usePageMotions, usePerformanceMonitor, usePulse, useReducedMotion, useRepeat, useScaleIn, useScrollDirection, useScrollPositionToggle, useScrollProgress, useScrollReveal, useScrollToggle, useSequence, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useStickyToggle, useToggleMotion, useTypewriter, useUnifiedMotion, useViewportToggle, useVisibilityToggle, useWindowSize };
|
|
7400
|
+
export { Motion, createLayoutTransition, observeElement, useAutoFade, useAutoPlay, useAutoScale, useAutoSlide, useBlurIn, useBounceIn, useButtonEffect, useCardList, useClickToggle, useClipReveal, useCountUp, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGameLoop, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useInteractive, useKeyboardToggle, useLanguageAwareMotion, useLayoutMotion, useLoadingSpinner, useMagneticCursor, useMotion, useMotionOrchestra, useMotionState, useMouse, useNavigation, useOrchestration, usePageMotions, usePerformanceMonitor, usePulse, useReducedMotion, useReducedMotionObject, useRepeat, useScaleIn, useScrollDirection, useScrollPositionToggle, useScrollProgress, useScrollReveal, useScrollToggle, useSequence, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useStickyToggle, useToggleMotion, useTypewriter, useUnifiedMotion, useViewportToggle, useVisibilityToggle, useWindowSize };
|
|
7343
7401
|
//# sourceMappingURL=index.mjs.map
|
|
7344
7402
|
//# sourceMappingURL=index.mjs.map
|