@hua-labs/motion-core 2.3.0 → 2.4.0

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/dist/index.d.mts CHANGED
@@ -1,494 +1,9 @@
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, d as ScaleOptions, e as BounceOptions, f as PulseOptions, g as SpringOptions, G as GradientOptions, H as HoverMotionOptions, h as ScrollRevealOptions, R as RepeatOptions, T as ToggleMotionOptions, I as InteractionReturn, i as InViewOptions, j as InViewReturn, k as MouseOptions, l as MouseReturn, m as ReducedMotionReturn, W as WindowSizeOptions, n as WindowSizeReturn, o as ScrollRevealMotionType } from './springPhysics-DLyZ4nbx.mjs';
2
+ export { p as BuiltInProfileName, D as DeepPartial, q as EasingFunction, r as EasingType, s as GestureConfig, t as GestureOptions, u as MOTION_PRESETS, v as MotionCallback, w as MotionConfig, x as MotionDirection, y as MotionEasing, z as MotionEngine, A as MotionFrame, C as MotionInstance, J as MotionOptions, K as MotionPreset, L as MotionProfile, N as MotionProfileBase, O as MotionProfileEntrance, Q as MotionProfileInteraction, U as MotionProfileProvider, V as MotionProfileProviderProps, X as MotionProfileSpring, Y as MotionProfileStagger, Z as MotionProgressCallback, _ as MotionState, $ as MotionStateCallback, a0 as MotionTrigger, a1 as MotionType, a2 as OrchestrationConfig, a3 as PAGE_MOTIONS, a4 as PageMotionElement, a5 as PerformanceMetrics, a6 as PresetConfig, a7 as ReducedMotionStrategy, a8 as SpringConfig, a9 as SpringPhysicsConfig, aa as SpringResult, ab as TransitionEffects, ac as TransitionOptions, ad as TransitionType, ae as applyEasing, af as calculateSpring, ag as easeIn, ah as easeInOut, ai as easeInOutQuad, aj as easeInQuad, ak as easeOut, al as easeOutQuad, am as easingPresets, an as getAvailableEasings, ao as getEasing, ap as getMotionPreset, aq as getPagePreset, ar as getPresetEasing, as as hua, at as isEasingFunction, au as isValidEasing, av as linear, aw as mergeProfileOverrides, ax as mergeWithPreset, ay as motionEngine, az as neutral, aA as resolveProfile, aB as safeApplyEasing, aC as transitionEffects, aD as useMotionProfile } from './springPhysics-DLyZ4nbx.mjs';
1
3
  import * as react from 'react';
2
4
  import react__default, { CSSProperties, RefObject } from 'react';
3
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
6
 
5
- /**
6
- * HUA Motion Core - 의존성 제로 모션 엔진
7
- *
8
- * 순수 JavaScript로 구현된 고성능 모션 엔진
9
- * GPU 가속, 레이어 분리, 성능 최적화 포함
10
- */
11
- interface MotionFrame {
12
- progress: number;
13
- properties: {
14
- opacity?: number;
15
- transform?: string;
16
- scale?: number;
17
- translateX?: number;
18
- translateY?: number;
19
- rotate?: number;
20
- rotateX?: number;
21
- rotateY?: number;
22
- rotateZ?: number;
23
- skewX?: number;
24
- skewY?: number;
25
- };
26
- }
27
- interface MotionOptions {
28
- duration: number;
29
- easing: (t: number) => number;
30
- delay?: number;
31
- direction?: 'forward' | 'reverse' | 'alternate';
32
- iterations?: number;
33
- fill?: 'none' | 'forwards' | 'backwards' | 'both';
34
- onStart?: () => void;
35
- onUpdate?: (progress: number) => void;
36
- onComplete?: () => void;
37
- onCancel?: () => void;
38
- }
39
- interface Motion$1 {
40
- id: string;
41
- element: HTMLElement;
42
- isRunning: boolean;
43
- isPaused: boolean;
44
- currentProgress: number;
45
- startTime: number;
46
- pauseTime: number;
47
- options: MotionOptions;
48
- }
49
- declare class MotionEngine {
50
- private motions;
51
- private isRunning;
52
- private animationFrameId;
53
- /**
54
- * 모션 시작
55
- */
56
- motion(element: HTMLElement, motionFrames: MotionFrame[], options: MotionOptions): Promise<string>;
57
- /**
58
- * 모션 중지
59
- */
60
- stop(motionId: string): void;
61
- /**
62
- * 모션 일시정지
63
- */
64
- pause(motionId: string): void;
65
- /**
66
- * 모션 재개
67
- */
68
- resume(motionId: string): void;
69
- /**
70
- * 모든 모션 중지
71
- */
72
- stopAll(): void;
73
- /**
74
- * 모션 상태 확인
75
- */
76
- getMotion(motionId: string): Motion$1 | undefined;
77
- /**
78
- * 실행 중인 모션 수
79
- */
80
- getActiveMotionCount(): number;
81
- /**
82
- * 애니메이션 루프 시작
83
- */
84
- private startAnimationLoop;
85
- /**
86
- * 애니메이션 루프 중지
87
- */
88
- private stopAnimationLoop;
89
- /**
90
- * 메인 애니메이션 루프
91
- */
92
- private animate;
93
- /**
94
- * 모션 프레임 적용
95
- */
96
- private applyMotionFrame;
97
- /**
98
- * GPU 가속 활성화
99
- */
100
- private enableGPUAcceleration;
101
- /**
102
- * 레이어 분리
103
- */
104
- private createLayer;
105
- /**
106
- * 고유 모션 ID 생성
107
- */
108
- private generateMotionId;
109
- /**
110
- * 정리
111
- */
112
- destroy(): void;
113
- }
114
- declare const motionEngine: MotionEngine;
115
-
116
- /**
117
- * HUA Motion Core - 전환 효과 시스템
118
- *
119
- * CSS Motion API를 활용한 고성능 전환 효과들
120
- * GPU 가속 및 레이어 분리 최적화 포함
121
- */
122
-
123
- type TransitionType = 'fade' | 'slide' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right' | 'scale' | 'flip' | 'morph' | 'cube' | 'zoom';
124
- interface TransitionOptions extends Omit<MotionOptions, 'easing'> {
125
- type: TransitionType;
126
- easing?: (t: number) => number;
127
- distance?: number;
128
- scale?: number;
129
- perspective?: number;
130
- onTransitionStart?: () => void;
131
- onTransitionComplete?: () => void;
132
- }
133
- declare class TransitionEffects {
134
- private static instance;
135
- private activeTransitions;
136
- static getInstance(): TransitionEffects;
137
- /**
138
- * 공통 전환 실행 헬퍼
139
- */
140
- private executeTransition;
141
- /**
142
- * 페이드 인/아웃 전환
143
- */
144
- fade(element: HTMLElement, options: Omit<TransitionOptions, 'type'>): Promise<void>;
145
- /**
146
- * 슬라이드 전환
147
- */
148
- slide(element: HTMLElement, options: Omit<TransitionOptions, 'type'>): Promise<void>;
149
- /**
150
- * 스케일 전환
151
- */
152
- scale(element: HTMLElement, options: Omit<TransitionOptions, 'type'>): Promise<void>;
153
- /**
154
- * 플립 전환 (3D 회전)
155
- */
156
- flip(element: HTMLElement, options: Omit<TransitionOptions, 'type'>): Promise<void>;
157
- /**
158
- * 큐브 전환 (3D 큐브 회전)
159
- */
160
- cube(element: HTMLElement, options: Omit<TransitionOptions, 'type'>): Promise<void>;
161
- /**
162
- * 모프 전환 (복합 변형)
163
- */
164
- morph(element: HTMLElement, options: Omit<TransitionOptions, 'type'>): Promise<void>;
165
- /**
166
- * 전환 중지
167
- */
168
- stopTransition(transitionId: string): void;
169
- /**
170
- * 모든 전환 중지
171
- */
172
- stopAllTransitions(): void;
173
- /**
174
- * 활성 전환 수 확인
175
- */
176
- getActiveTransitionCount(): number;
177
- /**
178
- * GPU 가속 활성화
179
- */
180
- private enableGPUAcceleration;
181
- /**
182
- * 기본 이징 함수
183
- */
184
- private getDefaultEasing;
185
- /**
186
- * 고유 전환 ID 생성
187
- */
188
- private generateTransitionId;
189
- /**
190
- * 정리
191
- */
192
- destroy(): void;
193
- }
194
- declare const transitionEffects: TransitionEffects;
195
-
196
- type MotionElement = HTMLDivElement | HTMLSpanElement | HTMLButtonElement | HTMLHeadingElement | HTMLParagraphElement | HTMLImageElement;
197
- type MotionStyle = CSSProperties & {
198
- '--motion-delay'?: string;
199
- '--motion-duration'?: string;
200
- '--motion-easing'?: string;
201
- '--motion-progress'?: string;
202
- };
203
- interface BaseMotionOptions {
204
- /** 모션 시작 지연 시간 (ms) */
205
- delay?: number;
206
- /** 모션 지속 시간 (ms) */
207
- duration?: number;
208
- /** Intersection Observer 임계값 (0-1) */
209
- threshold?: number;
210
- /** 한 번만 트리거할지 여부 */
211
- triggerOnce?: boolean;
212
- /** 이징 함수명 */
213
- easing?: string;
214
- /** 자동 시작 여부 */
215
- autoStart?: boolean;
216
- /** 모션 완료 시 콜백 */
217
- onComplete?: () => void;
218
- /** 모션 시작 시 콜백 */
219
- onStart?: () => void;
220
- /** 모션 중단 시 콜백 */
221
- onStop?: () => void;
222
- /** 모션 리셋 시 콜백 */
223
- onReset?: () => void;
224
- }
225
- interface BaseMotionReturn<T extends MotionElement = HTMLDivElement> {
226
- /** DOM 요소 참조 (React 19 호환) */
227
- ref: React.RefObject<T | null>;
228
- /** 요소가 화면에 보이는지 여부 */
229
- isVisible: boolean;
230
- /** 모션이 진행 중인지 여부 */
231
- isAnimating: boolean;
232
- /** 적용할 CSS 스타일 (React 19 호환) - useFadeIn 등에서는 항상 반환됨 */
233
- style: MotionStyle;
234
- /** 적용할 CSS 클래스명 */
235
- className?: string;
236
- /** 모션 진행률 (0-1) - useFadeIn 등에서는 항상 반환됨 */
237
- progress: number;
238
- /** 모션 시작 함수 - useFadeIn 등에서는 항상 반환됨 */
239
- start: () => void;
240
- /** 모션 리셋 함수 - useFadeIn 등에서는 항상 반환됨 */
241
- reset: () => void;
242
- /** 모션 중단 함수 - useFadeIn 등에서는 항상 반환됨 */
243
- stop: () => void;
244
- /** 모션 일시정지 함수 - 일부 훅에서만 제공 */
245
- pause?: () => void;
246
- /** 모션 재개 함수 - 일부 훅에서만 제공 */
247
- resume?: () => void;
248
- }
249
- interface InteractionReturn<T extends MotionElement = HTMLDivElement> extends BaseMotionReturn<T> {
250
- /** 가시성 토글 함수 */
251
- toggle?: () => void;
252
- /** 표시 함수 */
253
- show?: () => void;
254
- /** 숨김 함수 */
255
- hide?: () => void;
256
- }
257
- interface FadeInOptions extends BaseMotionOptions {
258
- /** 초기 투명도 */
259
- initialOpacity?: number;
260
- /** 목표 투명도 */
261
- targetOpacity?: number;
262
- }
263
- interface SlideOptions extends BaseMotionOptions {
264
- /** 슬라이드 방향 */
265
- direction?: 'up' | 'down' | 'left' | 'right';
266
- /** 슬라이드 거리 (px) */
267
- distance?: number;
268
- }
269
- interface ScaleOptions extends BaseMotionOptions {
270
- /** 초기 스케일 */
271
- initialScale?: number;
272
- /** 목표 스케일 */
273
- targetScale?: number;
274
- }
275
- interface BounceOptions extends BaseMotionOptions {
276
- /** 바운스 강도 */
277
- intensity?: number;
278
- /** 바운스 횟수 */
279
- bounces?: number;
280
- }
281
- interface PulseOptions extends BaseMotionOptions {
282
- /** 펄스 강도 */
283
- intensity?: number;
284
- /** 반복 횟수 (-1 = 무한) */
285
- repeatCount?: number;
286
- /** 반복 간격 (ms) */
287
- repeatDelay?: number;
288
- }
289
- interface SpringOptions extends BaseMotionOptions {
290
- /** 스프링 질량 */
291
- mass?: number;
292
- /** 스프링 강성 */
293
- stiffness?: number;
294
- /** 스프링 감쇠 */
295
- damping?: number;
296
- /** 정지 임계값 */
297
- restDelta?: number;
298
- /** 정지 속도 */
299
- restSpeed?: number;
300
- }
301
- interface GestureOptions$1 extends BaseMotionOptions {
302
- /** 호버 제스처 활성화 */
303
- hover?: boolean;
304
- /** 드래그 제스처 활성화 */
305
- drag?: boolean;
306
- /** 핀치 제스처 활성화 */
307
- pinch?: boolean;
308
- /** 스와이프 제스처 활성화 */
309
- swipe?: boolean;
310
- /** 틸트 제스처 활성화 */
311
- tilt?: boolean;
312
- }
313
- type MotionDirection$1 = 'up' | 'down' | 'left' | 'right';
314
- type MotionEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'bounce' | 'elastic';
315
- type MotionTrigger = 'scroll' | 'click' | 'hover' | 'focus' | 'auto';
316
- type MotionCallback = () => void;
317
- type MotionProgressCallback = (progress: number) => void;
318
- type MotionStateCallback<T extends MotionElement = HTMLDivElement> = (state: BaseMotionReturn<T>) => void;
319
- interface PerformanceMetrics {
320
- /** 모션 시작 시간 */
321
- startTime: number;
322
- /** 모션 종료 시간 */
323
- endTime?: number;
324
- /** 총 지속 시간 */
325
- duration: number;
326
- /** FPS */
327
- fps: number;
328
- /** 메모리 사용량 */
329
- memoryUsage?: number;
330
- }
331
- interface MotionConfig {
332
- /** 성능 모니터링 활성화 */
333
- enablePerformanceMonitoring?: boolean;
334
- /** 디버그 모드 활성화 */
335
- debug?: boolean;
336
- /** 로그 레벨 */
337
- logLevel?: 'none' | 'error' | 'warn' | 'info' | 'debug';
338
- }
339
- interface InViewOptions {
340
- /** Intersection Observer 임계값 */
341
- threshold?: number | number[];
342
- /** 루트 마진 */
343
- rootMargin?: string;
344
- /** 한 번만 트리거할지 여부 */
345
- triggerOnce?: boolean;
346
- /** 초기 가시성 상태 */
347
- initialInView?: boolean;
348
- }
349
- interface InViewReturn<T extends HTMLElement = HTMLDivElement> {
350
- /** DOM 요소 참조 */
351
- ref: RefObject<T | null>;
352
- /** 요소가 화면에 보이는지 여부 */
353
- inView: boolean;
354
- /** IntersectionObserver 엔트리 */
355
- entry: IntersectionObserverEntry | null;
356
- }
357
- interface MouseOptions {
358
- /** 타겟 요소 참조 */
359
- targetRef?: RefObject<HTMLElement | null>;
360
- /** 스로틀 시간 (ms) */
361
- throttle?: number;
362
- }
363
- interface MouseReturn {
364
- /** 마우스 X 좌표 (viewport 기준) */
365
- x: number;
366
- /** 마우스 Y 좌표 (viewport 기준) */
367
- y: number;
368
- /** 요소 내 상대 X 좌표 (0-1) */
369
- elementX: number;
370
- /** 요소 내 상대 Y 좌표 (0-1) */
371
- elementY: number;
372
- /** 마우스가 타겟 위에 있는지 여부 */
373
- isOver: boolean;
374
- }
375
- interface ReducedMotionReturn {
376
- /** 사용자가 모션 감소를 선호하는지 여부 */
377
- prefersReducedMotion: boolean;
378
- }
379
- interface WindowSizeOptions {
380
- /** 디바운스 시간 (ms) */
381
- debounce?: number;
382
- /** 초기 너비 */
383
- initialWidth?: number;
384
- /** 초기 높이 */
385
- initialHeight?: number;
386
- }
387
- interface WindowSizeReturn {
388
- /** 윈도우 너비 */
389
- width: number;
390
- /** 윈도우 높이 */
391
- height: number;
392
- /** 마운트 여부 (SSR 대응) */
393
- isMounted: boolean;
394
- }
395
- type ScrollRevealMotionType = 'fadeIn' | 'slideUp' | 'slideLeft' | 'slideRight' | 'scaleIn' | 'bounceIn';
396
- interface ScrollRevealOptions extends BaseMotionOptions {
397
- /** 루트 마진 */
398
- rootMargin?: string;
399
- /** 모션 타입 */
400
- motionType?: ScrollRevealMotionType;
401
- }
402
- interface GradientOptions extends BaseMotionOptions {
403
- /** 그라디언트 색상 배열 */
404
- colors?: string[];
405
- /** 그라디언트 방향 */
406
- direction?: 'horizontal' | 'vertical' | 'diagonal';
407
- /** 그라디언트 크기 (%) */
408
- size?: number;
409
- }
410
- interface ToggleMotionOptions extends BaseMotionOptions {
411
- }
412
- interface RepeatOptions extends BaseMotionOptions {
413
- /** 반복 효과 타입 */
414
- type?: 'pulse' | 'bounce' | 'wave' | 'fade';
415
- /** 효과 강도 */
416
- intensity?: number;
417
- }
418
- interface HoverMotionOptions extends BaseMotionOptions {
419
- /** 호버 시 스케일 */
420
- hoverScale?: number;
421
- /** 호버 시 Y 오프셋 (px) */
422
- hoverY?: number;
423
- /** 호버 시 투명도 */
424
- hoverOpacity?: number;
425
- }
426
-
427
- type PageType = 'home' | 'dashboard' | 'product' | 'blog';
428
- type MotionType$1 = 'hero' | 'title' | 'button' | 'card' | 'text' | 'image';
429
- type EntranceType = 'fadeIn' | 'slideUp' | 'slideLeft' | 'slideRight' | 'scaleIn' | 'bounceIn';
430
- interface PageMotionElement {
431
- type: MotionType$1;
432
- entrance?: EntranceType;
433
- hover?: boolean;
434
- click?: boolean;
435
- delay?: number;
436
- duration?: number;
437
- threshold?: number;
438
- }
439
- interface PageMotionsConfig {
440
- [elementId: string]: PageMotionElement;
441
- }
442
- interface MotionState$1 {
443
- internalVisibility: boolean;
444
- triggeredVisibility: boolean;
445
- finalVisibility: boolean;
446
- opacity: number;
447
- translateY: number;
448
- translateX: number;
449
- scale: number;
450
- rotation: number;
451
- isHovered: boolean;
452
- isClicked: boolean;
453
- isAnimating: boolean;
454
- }
455
- interface PageMotionRef<T extends HTMLElement = HTMLElement> {
456
- ref: React.RefObject<T | null>;
457
- style: React.CSSProperties;
458
- isVisible: boolean;
459
- isHovered: boolean;
460
- isClicked: boolean;
461
- }
462
- interface MotionPreset {
463
- entrance: EntranceType;
464
- delay: number;
465
- duration: number;
466
- hover: boolean;
467
- click: boolean;
468
- }
469
- interface PresetConfig {
470
- [key: string]: MotionPreset;
471
- }
472
- interface SpringConfig$1 {
473
- mass?: number;
474
- stiffness?: number;
475
- damping?: number;
476
- restDelta?: number;
477
- restSpeed?: number;
478
- }
479
- interface GestureConfig {
480
- hover?: boolean;
481
- drag?: boolean;
482
- pinch?: boolean;
483
- swipe?: boolean;
484
- tilt?: boolean;
485
- }
486
- interface OrchestrationConfig {
487
- sequence?: 'sequential' | 'parallel' | 'stagger';
488
- staggerDelay?: number;
489
- staggerDuration?: number;
490
- }
491
-
492
7
  /**
493
8
  * 1단계 API: 프리셋 기반 페이지 모션 (기존 방식)
494
9
  *
@@ -1318,150 +833,6 @@ interface ElementProgressReturn<T extends HTMLElement = HTMLElement> {
1318
833
  */
1319
834
  declare function useElementProgress<T extends HTMLElement = HTMLElement>(options?: ElementProgressOptions): ElementProgressReturn<T>;
1320
835
 
1321
- declare const MOTION_PRESETS: PresetConfig;
1322
- declare const PAGE_MOTIONS: Record<PageType, PageMotionsConfig>;
1323
- /**
1324
- * 프리셋과 커스텀 설정을 병합
1325
- */
1326
- declare function mergeWithPreset(preset: MotionPreset, custom?: Partial<MotionPreset>): MotionPreset;
1327
- /**
1328
- * 페이지 타입으로 프리셋 가져오기
1329
- */
1330
- declare function getPagePreset(pageType: PageType): PageMotionsConfig;
1331
- /**
1332
- * 모션 타입으로 기본 프리셋 가져오기
1333
- */
1334
- declare function getMotionPreset(type: string): MotionPreset;
1335
-
1336
- /** 프로필 전체의 기본 모션 디폴트 */
1337
- interface MotionProfileBase {
1338
- /** 기본 duration (ms) */
1339
- duration: number;
1340
- /** 기본 easing (CSS 또는 named preset) */
1341
- easing: string;
1342
- /** IntersectionObserver 임계값 */
1343
- threshold: number;
1344
- /** 한 번만 트리거할지 여부 */
1345
- triggerOnce: boolean;
1346
- }
1347
- /** 입장 애니메이션 디폴트 */
1348
- interface MotionProfileEntrance {
1349
- slide: {
1350
- /** 슬라이드 거리 (px) */
1351
- distance: number;
1352
- /** 슬라이드 전용 이징 */
1353
- easing: string;
1354
- };
1355
- fade: {
1356
- /** 초기 투명도 */
1357
- initialOpacity: number;
1358
- };
1359
- scale: {
1360
- /** 초기 스케일 (useScrollReveal/useStagger용, 0.95 등 미세 변화) */
1361
- from: number;
1362
- };
1363
- bounce: {
1364
- /** 바운스 강도 */
1365
- intensity: number;
1366
- /** 바운스 전용 이징 */
1367
- easing: string;
1368
- };
1369
- }
1370
- /** 스태거 디폴트 */
1371
- interface MotionProfileStagger {
1372
- /** 아이템 간 딜레이 (ms) */
1373
- perItem: number;
1374
- /** 첫 아이템 전 딜레이 (ms) */
1375
- baseDelay: number;
1376
- }
1377
- /** 인터랙션 디폴트 */
1378
- interface MotionProfileInteraction {
1379
- hover: {
1380
- /** 호버 시 스케일 */
1381
- scale: number;
1382
- /** 호버 시 Y 오프셋 (px) */
1383
- y: number;
1384
- /** 호버 duration (ms) */
1385
- duration: number;
1386
- /** 호버 이징 */
1387
- easing: string;
1388
- };
1389
- }
1390
- /** 스프링 물리 디폴트 */
1391
- interface MotionProfileSpring {
1392
- /** 질량 */
1393
- mass: number;
1394
- /** 강성 */
1395
- stiffness: number;
1396
- /** 감쇠 */
1397
- damping: number;
1398
- /** 정지 임계값 */
1399
- restDelta: number;
1400
- /** 정지 속도 */
1401
- restSpeed: number;
1402
- }
1403
- /** reduced motion 전략 */
1404
- type ReducedMotionStrategy = 'skip' | 'fade-only' | 'minimal';
1405
- /** 전체 Motion Profile */
1406
- interface MotionProfile {
1407
- /** 프로필 이름 */
1408
- name: string;
1409
- /** 공통 디폴트 */
1410
- base: MotionProfileBase;
1411
- /** 입장 애니메이션 */
1412
- entrance: MotionProfileEntrance;
1413
- /** 스태거 */
1414
- stagger: MotionProfileStagger;
1415
- /** 인터랙션 */
1416
- interaction: MotionProfileInteraction;
1417
- /** 스프링 물리 */
1418
- spring: MotionProfileSpring;
1419
- /** reduced motion 전략 */
1420
- reducedMotion: ReducedMotionStrategy;
1421
- }
1422
- /** 내장 프로필 이름 */
1423
- type BuiltInProfileName = 'neutral' | 'hua';
1424
- /** DeepPartial 유틸리티 */
1425
- type DeepPartial<T> = {
1426
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
1427
- };
1428
-
1429
- /**
1430
- * neutral 프로필 — 기존 하드코딩 디폴트와 동일.
1431
- * Provider 없을 때 fallback으로 사용되므로 하위 호환 100% 보장.
1432
- */
1433
- declare const neutral: MotionProfile;
1434
-
1435
- /**
1436
- * HUA 프로필 — 스르륵 쫀뜩한 브랜드 시그니처.
1437
- *
1438
- * 특징:
1439
- * - CSS ease-out 기반이되 끝에 미세한 오버슈트 (1.04~1.06)
1440
- * - 도착점을 살짝 지나쳤다가 돌아오는 탄성
1441
- * - 바운스 없이 쫀뜩 (높은 감쇠 + 높은 강성)
1442
- * - neutral보다 짧은 duration, 좁은 distance → 더 정교한 느낌
1443
- */
1444
- declare const hua: MotionProfile;
1445
-
1446
- interface MotionProfileProviderProps {
1447
- /** 내장 프로필 이름 또는 커스텀 프로필 객체 */
1448
- profile?: BuiltInProfileName | MotionProfile;
1449
- /** 선택한 프로필 위에 부분 오버라이드 */
1450
- overrides?: DeepPartial<MotionProfile>;
1451
- children: React.ReactNode;
1452
- }
1453
- declare function MotionProfileProvider({ profile, overrides, children, }: MotionProfileProviderProps): react.FunctionComponentElement<react.ProviderProps<MotionProfile>>;
1454
- /**
1455
- * 현재 프로필을 가져옴.
1456
- * Provider 밖에서 호출 시 neutral 프로필 반환 (하위 호환).
1457
- */
1458
- declare function useMotionProfile(): MotionProfile;
1459
-
1460
- /** 이름 또는 객체에서 프로필 resolve */
1461
- declare function resolveProfile(profile: BuiltInProfileName | MotionProfile): MotionProfile;
1462
- /** 프로필에 오버라이드를 깊은 병합 */
1463
- declare function mergeProfileOverrides(base: MotionProfile, overrides: DeepPartial<MotionProfile>): MotionProfile;
1464
-
1465
836
  /**
1466
837
  * Shared IntersectionObserver Pool
1467
838
  *
@@ -1499,57 +870,515 @@ declare function observeElement(element: Element, callback: EntryCallback, optio
1499
870
  rootMargin?: string;
1500
871
  }, once?: boolean): () => void;
1501
872
 
1502
- type EasingFunction = (t: number) => number;
1503
- declare const linear: EasingFunction;
1504
- declare const easeIn: EasingFunction;
1505
- declare const easeOut: EasingFunction;
1506
- declare const easeInOut: EasingFunction;
1507
- declare const easeInQuad: EasingFunction;
1508
- declare const easeOutQuad: EasingFunction;
1509
- declare const easeInOutQuad: EasingFunction;
1510
- type EasingType = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'easeInQuad' | 'easeOutQuad' | 'easeInOutQuad' | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic' | 'easeInQuart' | 'easeOutQuart' | 'easeInOutQuart' | 'easeInQuint' | 'easeOutQuint' | 'easeInOutQuint' | 'easeInSine' | 'easeOutSine' | 'easeInOutSine' | 'easeInExpo' | 'easeOutExpo' | 'easeInOutExpo' | 'easeInCirc' | 'easeOutCirc' | 'easeInOutCirc' | 'easeInBounce' | 'easeOutBounce' | 'easeInOutBounce' | 'easeInBack' | 'easeOutBack' | 'easeInOutBack' | 'easeInElastic' | 'easeOutElastic' | 'easeInOutElastic' | 'pulse' | 'pulseSmooth' | 'skeletonWave' | 'blink';
1511
- declare function isValidEasing(easingName: string): boolean;
1512
- declare function getEasing(easingName: unknown): EasingFunction;
1513
- declare function applyEasing(t: number, easingName: string | EasingFunction): number;
1514
- declare function safeApplyEasing(t: number, easingName: unknown): number;
1515
- declare function getAvailableEasings(): string[];
1516
- declare function isEasingFunction(value: any): value is EasingFunction;
1517
- declare const easingPresets: {
1518
- readonly default: "easeOut";
1519
- readonly smooth: "easeInOutCubic";
1520
- readonly fast: "easeOutQuad";
1521
- readonly slow: "easeInOutSine";
1522
- readonly bouncy: "easeOutBounce";
1523
- readonly elastic: "easeOutElastic";
1524
- readonly fade: "easeInOut";
1525
- readonly scale: "easeOutBack";
873
+ interface AutoFadeConfig {
874
+ initialOpacity?: number;
875
+ targetOpacity?: number;
876
+ duration?: number;
877
+ delay?: number;
878
+ repeat?: boolean;
879
+ repeatDelay?: number;
880
+ repeatCount?: number;
881
+ ease?: "linear" | "ease-in" | "ease-out" | "ease-in-out";
882
+ autoStart?: boolean;
883
+ onComplete?: () => void;
884
+ onRepeat?: (count: number) => void;
885
+ showOnMount?: boolean;
886
+ }
887
+ interface AutoFadeReturn {
888
+ opacity: number;
889
+ isAnimating: boolean;
890
+ isVisible: boolean;
891
+ mounted: boolean;
892
+ start: () => void;
893
+ stop: () => void;
894
+ reset: () => void;
895
+ fadeIn: () => void;
896
+ fadeOut: () => void;
897
+ toggle: () => void;
898
+ }
899
+ declare function useAutoFade(options?: AutoFadeConfig): AutoFadeReturn;
900
+
901
+ interface AutoPlayConfig {
902
+ interval?: number;
903
+ delay?: number;
904
+ repeat?: number | "infinite";
905
+ autoStart?: boolean;
906
+ pauseOnHover?: boolean;
907
+ pauseOnBlur?: boolean;
908
+ showOnMount?: boolean;
909
+ }
910
+ declare function useAutoPlay(options?: AutoPlayConfig): {
911
+ isPlaying: boolean;
912
+ isPaused: boolean;
913
+ currentStep: number;
914
+ mounted: boolean;
915
+ start: () => void;
916
+ stop: () => void;
917
+ pause: () => void;
918
+ resume: () => void;
919
+ next: () => void;
920
+ previous: () => void;
921
+ goTo: (step: number) => void;
1526
922
  };
1527
- declare function getPresetEasing(preset: keyof typeof easingPresets): EasingFunction;
1528
923
 
924
+ interface AutoScaleConfig {
925
+ initialScale?: number;
926
+ targetScale?: number;
927
+ duration?: number;
928
+ delay?: number;
929
+ repeat?: boolean;
930
+ repeatDelay?: number;
931
+ repeatCount?: number;
932
+ ease?: "linear" | "ease-in" | "ease-out" | "ease-in-out" | "bounce" | "elastic";
933
+ autoStart?: boolean;
934
+ onComplete?: () => void;
935
+ onRepeat?: (count: number) => void;
936
+ showOnMount?: boolean;
937
+ centerTransform?: boolean;
938
+ }
939
+ interface AutoScaleReturn {
940
+ scale: number;
941
+ isAnimating: boolean;
942
+ isVisible: boolean;
943
+ mounted: boolean;
944
+ start: () => void;
945
+ stop: () => void;
946
+ reset: () => void;
947
+ scaleIn: () => void;
948
+ scaleOut: () => void;
949
+ toggle: () => void;
950
+ }
951
+ declare function useAutoScale(options?: AutoScaleConfig): AutoScaleReturn;
952
+
953
+ type SlideDirection = "left" | "right" | "up" | "down" | "left-up" | "left-down" | "right-up" | "right-down";
954
+ interface AutoSlideConfig {
955
+ direction?: SlideDirection;
956
+ distance?: number;
957
+ initialPosition?: {
958
+ x: number;
959
+ y: number;
960
+ };
961
+ targetPosition?: {
962
+ x: number;
963
+ y: number;
964
+ };
965
+ duration?: number;
966
+ delay?: number;
967
+ repeat?: boolean;
968
+ repeatDelay?: number;
969
+ repeatCount?: number;
970
+ ease?: "linear" | "ease-in" | "ease-out" | "ease-in-out";
971
+ autoStart?: boolean;
972
+ onComplete?: () => void;
973
+ onRepeat?: (count: number) => void;
974
+ showOnMount?: boolean;
975
+ }
976
+ interface AutoSlideReturn {
977
+ position: {
978
+ x: number;
979
+ y: number;
980
+ };
981
+ isAnimating: boolean;
982
+ isVisible: boolean;
983
+ mounted: boolean;
984
+ start: () => void;
985
+ stop: () => void;
986
+ reset: () => void;
987
+ slideIn: () => void;
988
+ slideOut: () => void;
989
+ toggle: () => void;
990
+ }
991
+ declare function useAutoSlide(options?: AutoSlideConfig): AutoSlideReturn;
992
+
993
+ interface MotionStep$1 {
994
+ id: string;
995
+ motion: () => void;
996
+ delay?: number;
997
+ duration?: number;
998
+ onComplete?: () => void;
999
+ }
1000
+ interface MotionOrchestraOptions {
1001
+ mode?: "sequential" | "parallel" | "stagger";
1002
+ staggerDelay?: number;
1003
+ autoStart?: boolean;
1004
+ loop?: boolean;
1005
+ onComplete?: () => void;
1006
+ }
1007
+ declare function useMotionOrchestra(options?: MotionOrchestraOptions): {
1008
+ addMotion: (step: MotionStep$1) => void;
1009
+ removeMotion: (id: string) => void;
1010
+ play: () => void;
1011
+ stop: () => void;
1012
+ pause: () => void;
1013
+ resume: () => void;
1014
+ isPlaying: boolean;
1015
+ currentStep: number;
1016
+ completedSteps: Set<string>;
1017
+ totalSteps: number;
1018
+ };
1019
+
1020
+ interface MotionStep {
1021
+ id: string;
1022
+ duration: number;
1023
+ delay?: number;
1024
+ ease?: "linear" | "ease-in" | "ease-out" | "ease-in-out" | "bounce" | "elastic";
1025
+ onStart?: () => void;
1026
+ onUpdate?: (progress: number) => void;
1027
+ onComplete?: () => void;
1028
+ onError?: (error: Error) => void;
1029
+ }
1030
+ interface OrchestrationConfig {
1031
+ autoStart?: boolean;
1032
+ loop?: boolean;
1033
+ loopCount?: number;
1034
+ loopDelay?: number;
1035
+ timeline?: MotionStep[];
1036
+ duration?: number;
1037
+ speed?: number;
1038
+ reverse?: boolean;
1039
+ onStart?: () => void;
1040
+ onComplete?: () => void;
1041
+ onLoop?: (count: number) => void;
1042
+ onError?: (error: Error) => void;
1043
+ onProgress?: (progress: number) => void;
1044
+ onStepStart?: (stepId: string) => void;
1045
+ onStepComplete?: (stepId: string) => void;
1046
+ }
1047
+ interface OrchestrationReturn {
1048
+ isPlaying: boolean;
1049
+ isPaused: boolean;
1050
+ currentTime: number;
1051
+ progress: number;
1052
+ currentStep: string | null;
1053
+ loopCount: number;
1054
+ error: string | null;
1055
+ play: () => void;
1056
+ pause: () => void;
1057
+ stop: () => void;
1058
+ reset: () => void;
1059
+ seek: (time: number) => void;
1060
+ setSpeed: (speed: number) => void;
1061
+ reverse: () => void;
1062
+ addStep: (step: MotionStep) => void;
1063
+ removeStep: (stepId: string) => void;
1064
+ updateStep: (stepId: string, updates: Partial<MotionStep>) => void;
1065
+ reorderSteps: (stepIds: string[]) => void;
1066
+ getStepProgress: (stepId: string) => number;
1067
+ getStepTime: (stepId: string) => number;
1068
+ getTotalDuration: () => number;
1069
+ }
1070
+ declare function useOrchestration(options?: OrchestrationConfig): OrchestrationReturn;
1071
+
1072
+ interface SequenceConfig {
1073
+ autoStart?: boolean;
1074
+ loop?: boolean;
1075
+ }
1076
+ interface SequenceItem {
1077
+ hook: () => any;
1078
+ delay?: number;
1079
+ }
1080
+ declare function useSequence(sequence: SequenceItem[], options?: SequenceConfig): {
1081
+ start: () => void;
1082
+ stop: () => void;
1083
+ pause: () => void;
1084
+ resume: () => void;
1085
+ reset: () => void;
1086
+ isPlaying: boolean;
1087
+ currentIndex: number;
1088
+ totalMotions: number;
1089
+ ref: any;
1090
+ };
1091
+
1092
+ interface LayoutMotionConfig {
1093
+ from: {
1094
+ width?: number | string;
1095
+ height?: number | string;
1096
+ flexDirection?: "row" | "column" | "row-reverse" | "column-reverse";
1097
+ justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
1098
+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
1099
+ gap?: number | string;
1100
+ gridTemplateColumns?: string;
1101
+ gridTemplateRows?: string;
1102
+ gridGap?: number | string;
1103
+ };
1104
+ to: {
1105
+ width?: number | string;
1106
+ height?: number | string;
1107
+ flexDirection?: "row" | "column" | "row-reverse" | "column-reverse";
1108
+ justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
1109
+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
1110
+ gap?: number | string;
1111
+ gridTemplateColumns?: string;
1112
+ gridTemplateRows?: string;
1113
+ gridGap?: number | string;
1114
+ };
1115
+ duration?: number;
1116
+ easing?: string;
1117
+ autoStart?: boolean;
1118
+ onComplete?: () => void;
1119
+ }
1120
+ interface LayoutState {
1121
+ isAnimating: boolean;
1122
+ progress: number;
1123
+ currentStyle: React.CSSProperties;
1124
+ }
1125
+ declare function useLayoutMotion(config: LayoutMotionConfig): {
1126
+ ref: react.RefObject<HTMLDivElement | null>;
1127
+ state: LayoutState;
1128
+ start: () => void;
1129
+ stop: () => void;
1130
+ reset: () => void;
1131
+ };
1132
+ declare function createLayoutTransition(from: LayoutMotionConfig["from"], to: LayoutMotionConfig["to"], options?: Partial<LayoutMotionConfig>): {
1133
+ from: {
1134
+ width?: number | string;
1135
+ height?: number | string;
1136
+ flexDirection?: "row" | "column" | "row-reverse" | "column-reverse";
1137
+ justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
1138
+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
1139
+ gap?: number | string;
1140
+ gridTemplateColumns?: string;
1141
+ gridTemplateRows?: string;
1142
+ gridGap?: number | string;
1143
+ };
1144
+ to: {
1145
+ width?: number | string;
1146
+ height?: number | string;
1147
+ flexDirection?: "row" | "column" | "row-reverse" | "column-reverse";
1148
+ justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
1149
+ alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
1150
+ gap?: number | string;
1151
+ gridTemplateColumns?: string;
1152
+ gridTemplateRows?: string;
1153
+ gridGap?: number | string;
1154
+ };
1155
+ duration: number;
1156
+ easing: string;
1157
+ autoStart: boolean;
1158
+ onComplete: (() => void) | undefined;
1159
+ };
1160
+
1161
+ interface KeyboardToggleConfig {
1162
+ initialState?: boolean;
1163
+ keys?: string[];
1164
+ keyCode?: number;
1165
+ keyCombo?: string[];
1166
+ toggleOnKeyDown?: boolean;
1167
+ toggleOnKeyUp?: boolean;
1168
+ toggleOnKeyPress?: boolean;
1169
+ autoReset?: boolean;
1170
+ resetDelay?: number;
1171
+ preventDefault?: boolean;
1172
+ stopPropagation?: boolean;
1173
+ requireFocus?: boolean;
1174
+ showOnMount?: boolean;
1175
+ }
1176
+ interface KeyboardToggleReturn {
1177
+ isActive: boolean;
1178
+ mounted: boolean;
1179
+ toggle: () => void;
1180
+ activate: () => void;
1181
+ deactivate: () => void;
1182
+ reset: () => void;
1183
+ keyboardHandlers: {
1184
+ onKeyDown?: (event: React.KeyboardEvent) => void;
1185
+ onKeyUp?: (event: React.KeyboardEvent) => void;
1186
+ onKeyPress?: (event: React.KeyboardEvent) => void;
1187
+ };
1188
+ ref: React.RefObject<HTMLElement | null>;
1189
+ }
1190
+ declare function useKeyboardToggle(options?: KeyboardToggleConfig): KeyboardToggleReturn;
1191
+
1192
+ type ScrollDirection = "up" | "down" | "idle";
1193
+ interface ScrollDirectionConfig {
1194
+ threshold?: number;
1195
+ idleDelay?: number;
1196
+ showOnMount?: boolean;
1197
+ }
1198
+ declare function useScrollDirection(options?: ScrollDirectionConfig): {
1199
+ direction: ScrollDirection;
1200
+ mounted: boolean;
1201
+ };
1202
+
1203
+ interface StickyToggleConfig {
1204
+ offset?: number;
1205
+ behavior?: "smooth" | "auto";
1206
+ showOnMount?: boolean;
1207
+ }
1208
+ declare function useStickyToggle(options?: StickyToggleConfig): {
1209
+ isSticky: boolean;
1210
+ mounted: boolean;
1211
+ };
1212
+
1213
+ interface InteractiveConfig {
1214
+ hoverScale?: number;
1215
+ clickScale?: number;
1216
+ duration?: number;
1217
+ }
1218
+ interface InteractiveState {
1219
+ scale: number;
1220
+ isHovered: boolean;
1221
+ isClicked: boolean;
1222
+ }
1223
+ declare function useInteractive(config?: InteractiveConfig): {
1224
+ ref: (element: HTMLDivElement | null) => void;
1225
+ scale: number;
1226
+ isHovered: boolean;
1227
+ isClicked: boolean;
1228
+ handleMouseEnter: () => void;
1229
+ handleMouseLeave: () => void;
1230
+ handleMouseDown: () => void;
1231
+ handleMouseUp: () => void;
1232
+ };
1233
+
1234
+ interface PerformanceMonitorConfig {
1235
+ threshold?: number;
1236
+ onPerformanceIssue?: (fps: number) => void;
1237
+ }
1238
+ interface PerformanceMonitorState {
1239
+ fps: number;
1240
+ isLowPerformance: boolean;
1241
+ frameCount: number;
1242
+ }
1243
+ declare function usePerformanceMonitor(config?: PerformanceMonitorConfig): {
1244
+ ref: (element: HTMLDivElement | null) => void;
1245
+ fps: number;
1246
+ isLowPerformance: boolean;
1247
+ frameCount: number;
1248
+ };
1249
+
1250
+ interface LanguageConfig {
1251
+ motionType: "fadeIn" | "slideUp" | "slideLeft" | "slideRight" | "scaleIn" | "bounceIn";
1252
+ duration?: number;
1253
+ delay?: number;
1254
+ threshold?: number;
1255
+ pauseOnLanguageChange?: boolean;
1256
+ restartOnLanguageChange?: boolean;
1257
+ currentLanguage?: string;
1258
+ }
1259
+ declare function useLanguageAwareMotion(options: LanguageConfig): {
1260
+ ref: react.RefObject<HTMLElement | null>;
1261
+ isVisible: boolean;
1262
+ isPaused: boolean;
1263
+ style: {
1264
+ opacity: number;
1265
+ transform: string;
1266
+ transition: string;
1267
+ } | {
1268
+ opacity: number;
1269
+ transition: string;
1270
+ transform?: undefined;
1271
+ };
1272
+ pauseMotion: () => void;
1273
+ resumeMotion: () => void;
1274
+ restartMotion: () => void;
1275
+ currentLanguage: string;
1276
+ };
1277
+
1278
+ interface GameLoopConfig {
1279
+ fps?: number;
1280
+ autoStart?: boolean;
1281
+ maxFPS?: number;
1282
+ minFPS?: number;
1283
+ showOnMount?: boolean;
1284
+ }
1285
+ interface GameState {
1286
+ isRunning: boolean;
1287
+ fps: number;
1288
+ deltaTime: number;
1289
+ elapsedTime: number;
1290
+ frameCount: number;
1291
+ mounted: boolean;
1292
+ }
1293
+ interface GameLoopReturn {
1294
+ isRunning: boolean;
1295
+ fps: number;
1296
+ deltaTime: number;
1297
+ elapsedTime: number;
1298
+ frameCount: number;
1299
+ mounted: boolean;
1300
+ start: () => void;
1301
+ stop: () => void;
1302
+ pause: () => void;
1303
+ resume: () => void;
1304
+ reset: () => void;
1305
+ onUpdate: (callback: (deltaTime: number, elapsedTime: number) => void) => void;
1306
+ onRender: (callback: (deltaTime: number, elapsedTime: number) => void) => void;
1307
+ }
1308
+ declare function useGameLoop(options?: GameLoopConfig): GameLoopReturn;
1309
+
1310
+ interface AutoMotionConfig {
1311
+ duration?: number;
1312
+ delay?: number;
1313
+ autoStart?: boolean;
1314
+ easing?: string;
1315
+ type?: "fade" | "slide" | "scale" | "rotate";
1316
+ }
1317
+ interface MotionConfig {
1318
+ duration?: number;
1319
+ delay?: number;
1320
+ autoStart?: boolean;
1321
+ easing?: string;
1322
+ type?: "fade" | "slide" | "scale" | "rotate";
1323
+ }
1324
+ interface MotionFromToConfig {
1325
+ from: Record<string, any>;
1326
+ to: Record<string, any>;
1327
+ duration?: number;
1328
+ delay?: number;
1329
+ autoStart?: boolean;
1330
+ ease?: string;
1331
+ }
1332
+ declare function useMotion(configOrFrom?: MotionConfig | Record<string, any>, to?: Record<string, any>, options?: {
1333
+ duration?: number;
1334
+ delay?: number;
1335
+ autoStart?: boolean;
1336
+ ease?: string;
1337
+ }): {
1338
+ ref: (element: HTMLDivElement | null) => void;
1339
+ style: react__default.CSSProperties;
1340
+ transform: string;
1341
+ opacity: number;
1342
+ backgroundColor: string | undefined;
1343
+ isAnimating: boolean;
1344
+ start: () => void;
1345
+ stop: () => void;
1346
+ reset: () => void;
1347
+ };
1348
+
1349
+ interface ViewportToggleConfig {
1350
+ threshold?: number;
1351
+ rootMargin?: string;
1352
+ trigger?: "enter" | "exit" | "both";
1353
+ once?: boolean;
1354
+ showOnMount?: boolean;
1355
+ }
1529
1356
  /**
1530
- * Spring physics calculation (Hooke's Law + damping)
1531
- *
1532
- * Pure function no side effects, fully testable.
1357
+ * IntersectionObserver를 사용해 뷰포트 진입/이탈을 감지하는 훅.
1358
+ * (구 hua-pro의 useVisibilityToggle — animation lifecycle 기반의
1359
+ * motion-core useVisibilityToggle과 충돌을 피해 이름을 변경함)
1533
1360
  */
1534
- interface SpringConfig {
1535
- stiffness: number;
1536
- damping: number;
1537
- mass: number;
1538
- }
1539
- interface SpringResult {
1540
- value: number;
1541
- velocity: number;
1361
+ declare function useViewportToggle(options?: ViewportToggleConfig): {
1362
+ ref: react.RefObject<HTMLElement | null>;
1363
+ isVisible: boolean;
1364
+ mounted: boolean;
1365
+ };
1366
+
1367
+ interface ScrollPositionToggleConfig {
1368
+ threshold?: number;
1369
+ showOnMount?: boolean;
1370
+ smooth?: boolean;
1542
1371
  }
1543
1372
  /**
1544
- * Calculate one step of a damped spring simulation.
1545
- *
1546
- * @param currentValue Current position
1547
- * @param currentVelocity Current velocity
1548
- * @param targetValue Equilibrium (target) position
1549
- * @param deltaTime Time step in seconds
1550
- * @param config Spring parameters (stiffness, damping, mass)
1373
+ * window.pageYOffset 기준 스크롤 위치 임계값에 따라 가시성을 토글하는 훅.
1374
+ * (구 hua-pro의 useScrollToggle — animation lifecycle 기반의
1375
+ * motion-core useScrollToggle과 충돌을 피해 이름을 변경함)
1551
1376
  */
1552
- declare function calculateSpring(currentValue: number, currentVelocity: number, targetValue: number, deltaTime: number, config: SpringConfig): SpringResult;
1377
+ declare function useScrollPositionToggle(options?: ScrollPositionToggleConfig): {
1378
+ isVisible: boolean;
1379
+ scrollToTop: () => void;
1380
+ mounted: boolean;
1381
+ };
1553
1382
 
1554
1383
  type MotionAs = 'div' | 'span' | 'section' | 'article' | 'header' | 'footer' | 'main' | 'nav';
1555
1384
  interface MotionProps extends react__default.HTMLAttributes<HTMLElement> {
@@ -1584,6 +1413,108 @@ interface MotionProps extends react__default.HTMLAttributes<HTMLElement> {
1584
1413
  */
1585
1414
  declare function Motion({ as: Component, type, effects, scroll, delay, duration, children, className, style: userStyle, ...rest }: MotionProps): react_jsx_runtime.JSX.Element;
1586
1415
 
1416
+ interface CountUpOptions {
1417
+ /** 목표 숫자 */
1418
+ end: number;
1419
+ /** 숫자 뒤에 붙는 접미사 (%, +, 명 등) */
1420
+ suffix?: string;
1421
+ /** 애니메이션 지속 시간 (ms) */
1422
+ duration?: number;
1423
+ /** 시작 지연 시간 (ms) */
1424
+ delay?: number;
1425
+ /** 애니메이션 활성화 여부 (true가 되면 시작, 한 번만 실행) */
1426
+ active?: boolean;
1427
+ }
1428
+ interface CountUpReturn {
1429
+ /** 현재 숫자 값 */
1430
+ value: number;
1431
+ /** 접미사 포함 표시 문자열 */
1432
+ display: string;
1433
+ }
1434
+ /**
1435
+ * useCountUp — 숫자 카운트업 애니메이션
1436
+ *
1437
+ * 통계, 대시보드, 메트릭 수치 강조에 적합.
1438
+ * ease-out cubic 이징으로 자연스러운 감속 효과.
1439
+ *
1440
+ * @example
1441
+ * ```tsx
1442
+ * const { display } = useCountUp({ end: 1200, suffix: '+', active: isInView })
1443
+ * return <span>{display}</span>
1444
+ * ```
1445
+ */
1446
+ declare function useCountUp(options: CountUpOptions): CountUpReturn;
1447
+
1448
+ interface ClipRevealOptions {
1449
+ /** 시작 지연 시간 (ms) */
1450
+ delay?: number;
1451
+ /** 애니메이션 지속 시간 (ms) */
1452
+ duration?: number;
1453
+ /** CSS 이징 함수 */
1454
+ easing?: string;
1455
+ /** 애니메이션 활성화 여부 (true가 되면 시작, 한 번만 실행) */
1456
+ active?: boolean;
1457
+ }
1458
+ interface ClipRevealReturn {
1459
+ /** overflow:hidden 컨테이너에 적용할 스타일 */
1460
+ containerStyle: CSSProperties;
1461
+ /** 슬라이딩 텍스트에 적용할 스타일 */
1462
+ textStyle: CSSProperties;
1463
+ /** 등장 완료 여부 */
1464
+ isVisible: boolean;
1465
+ }
1466
+ /**
1467
+ * useClipReveal — overflow clip으로 텍스트가 아래→위로 등장
1468
+ *
1469
+ * 커버 타이틀, 히어로 헤드라인, 큰 문구에 적합.
1470
+ * 컨테이너에 overflow:hidden을 적용하고, 내부 텍스트가 translateY로 올라옴.
1471
+ *
1472
+ * @example
1473
+ * ```tsx
1474
+ * const { containerStyle, textStyle } = useClipReveal({ delay: 200, active: isInView })
1475
+ * return (
1476
+ * <span style={containerStyle}>
1477
+ * <span style={textStyle}>Hello World</span>
1478
+ * </span>
1479
+ * )
1480
+ * ```
1481
+ */
1482
+ declare function useClipReveal(options?: ClipRevealOptions): ClipRevealReturn;
1483
+
1484
+ interface BlurInOptions {
1485
+ /** 시작 지연 시간 (ms) */
1486
+ delay?: number;
1487
+ /** 애니메이션 지속 시간 (ms) */
1488
+ duration?: number;
1489
+ /** 초기 블러 강도 (px) */
1490
+ blurAmount?: number;
1491
+ /** 초기 스케일 (0~1) */
1492
+ scale?: number;
1493
+ /** CSS 이징 함수 */
1494
+ easing?: string;
1495
+ /** 애니메이션 활성화 여부 (true가 되면 시작, 한 번만 실행) */
1496
+ active?: boolean;
1497
+ }
1498
+ interface BlurInReturn {
1499
+ /** 요소에 적용할 스타일 */
1500
+ style: CSSProperties;
1501
+ /** 등장 완료 여부 */
1502
+ isVisible: boolean;
1503
+ }
1504
+ /**
1505
+ * useBlurIn — 블러에서 선명하게 + 스케일 등장
1506
+ *
1507
+ * 인용구, 임팩트 문구, 핵심 메시지에 적합.
1508
+ * blur + scale + opacity 세 가지가 동시에 전환됨.
1509
+ *
1510
+ * @example
1511
+ * ```tsx
1512
+ * const { style } = useBlurIn({ blurAmount: 12, scale: 0.95, active: isInView })
1513
+ * return <blockquote style={style}>Deep insight here</blockquote>
1514
+ * ```
1515
+ */
1516
+ declare function useBlurIn(options?: BlurInOptions): BlurInReturn;
1517
+
1587
1518
  interface UseStaggerOptions {
1588
1519
  /** 자식 아이템 개수 */
1589
1520
  count: number;
@@ -1624,4 +1555,4 @@ interface UseStaggerReturn {
1624
1555
  */
1625
1556
  declare function useStagger(options: UseStaggerOptions): UseStaggerReturn;
1626
1557
 
1627
- export { type BaseMotionOptions, type BaseMotionReturn, type BounceOptions, type BuiltInProfileName, type ButtonEffectOptions, type CardListOptions, type CustomCursorOptions, type CustomCursorReturn, type DeepPartial, type EasingFunction, type EasingType, type ElementProgressOptions, type ElementProgressReturn, type EntranceType, type FadeInOptions, type GestureConfig, type GestureOptions$1 as GestureOptions, type GradientOptions, type HoverMotionOptions, type InViewOptions, type InViewReturn, type InteractionReturn, type LoadingSpinnerOptions, MOTION_PRESETS, type MagneticCursorOptions, type MagneticCursorReturn, Motion, type MotionCallback, type MotionConfig, type MotionDirection$1 as MotionDirection, type MotionEasing, type MotionEffects, type MotionElement, MotionEngine, type MotionFrame, type Motion$1 as MotionInstance, type MotionOptions, type MotionPreset, type MotionProfile, type MotionProfileBase, type MotionProfileEntrance, type MotionProfileInteraction, MotionProfileProvider, type MotionProfileProviderProps, type MotionProfileSpring, type MotionProfileStagger, type MotionProgressCallback, type MotionProps, type MotionState$1 as MotionState, type MotionStateCallback, type MotionTrigger, type MotionType$1 as MotionType, type MouseOptions, type MouseReturn, type NavigationOptions, type OrchestrationConfig, PAGE_MOTIONS, type PageMotionElement, type PageMotionRef, type PageMotionsConfig, type PageType, type PerformanceMetrics, type PresetConfig, type PulseOptions, type ReducedMotionReturn, type ReducedMotionStrategy, type RepeatOptions, type ScaleOptions, type ScrollRevealMotionType, type ScrollRevealOptions, type ScrollToggleOptions, type SkeletonOptions, type SlideOptions, type SmoothScrollOptions, type SmoothScrollReturn, type SpringConfig$1 as SpringConfig, type SpringOptions, type SpringConfig as SpringPhysicsConfig, type SpringResult, type ToggleMotionOptions, TransitionEffects, type TransitionOptions, type TransitionType, type TypewriterOptions, type TypewriterReturn, type UseStaggerOptions, type UseStaggerReturn, type UseUnifiedMotionOptions, type VisibilityToggleOptions, type WindowSizeOptions, type WindowSizeReturn, applyEasing, calculateSpring, easeIn, easeInOut, easeInOutQuad, easeInQuad, easeOut, easeOutQuad, easingPresets, getAvailableEasings, getEasing, getMotionPreset, getPagePreset, getPresetEasing, hua, isEasingFunction, isValidEasing, linear, mergeProfileOverrides, mergeWithPreset, motionEngine, neutral, observeElement, resolveProfile, safeApplyEasing, transitionEffects, useBounceIn, useButtonEffect, useCardList, useClickToggle, useCustomCursor, useElementProgress, useFadeIn, useFocusToggle, useGesture, useGestureMotion, useGradient, useHoverMotion, useInView, useLoadingSpinner, useMagneticCursor, useMotionProfile, useMotionState, useMouse, useNavigation, usePageMotions, usePulse, useReducedMotion, useRepeat, useScaleIn, useScrollProgress, useScrollReveal, useScrollToggle, useSimplePageMotion, useSkeleton, useSlideDown, useSlideLeft, useSlideRight, useSlideUp, useSmartMotion, useSmoothScroll, useSpringMotion, useStagger, useToggleMotion, useTypewriter, useUnifiedMotion, useVisibilityToggle, useWindowSize };
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 };