telecop 0.1.28 → 0.1.30
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/animations/core/animator.d.ts +75 -0
- package/dist/animations/core/easing.d.ts +86 -0
- package/dist/animations/core/observer.d.ts +48 -0
- package/dist/animations/presets/attention.d.ts +12 -0
- package/dist/animations/presets/bounce.d.ts +9 -0
- package/dist/animations/presets/fade.d.ts +15 -0
- package/dist/animations/presets/index.d.ts +80 -0
- package/dist/animations/presets/rotate.d.ts +11 -0
- package/dist/animations/presets/slide.d.ts +9 -0
- package/dist/animations/presets/zoom.d.ts +11 -0
- package/dist/animations/react/TeleMotion.d.ts +18 -0
- package/dist/animations/react/hooks.d.ts +21 -0
- package/dist/animations/react/index.d.ts +3 -0
- package/dist/animations/test.d.ts +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +14 -14
- package/dist/index.mjs +1611 -232
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export type EasingFunction = (t: number) => number;
|
|
2
|
+
export interface AnimationConfig {
|
|
3
|
+
duration?: number;
|
|
4
|
+
delay?: number;
|
|
5
|
+
easing?: EasingFunction | string;
|
|
6
|
+
iterations?: number;
|
|
7
|
+
direction?: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
|
|
8
|
+
fill?: 'none' | 'forwards' | 'backwards' | 'both';
|
|
9
|
+
}
|
|
10
|
+
export interface AnimationKeyframe {
|
|
11
|
+
[property: string]: string | number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 🎬 Animator - المحرك الأساسي للـ Animations
|
|
15
|
+
* يستخدم Web Animations API (WAAPI)
|
|
16
|
+
*/
|
|
17
|
+
export declare class Animator {
|
|
18
|
+
private element;
|
|
19
|
+
private animation;
|
|
20
|
+
constructor(element: HTMLElement);
|
|
21
|
+
/**
|
|
22
|
+
* تشغيل animation باستخدام keyframes
|
|
23
|
+
*/
|
|
24
|
+
animate(keyframes: AnimationKeyframe[], config?: AnimationConfig): Promise<Animation>;
|
|
25
|
+
/**
|
|
26
|
+
* إيقاف الـ animation
|
|
27
|
+
*/
|
|
28
|
+
stop(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Pause الـ animation
|
|
31
|
+
*/
|
|
32
|
+
pause(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Resume الـ animation
|
|
35
|
+
*/
|
|
36
|
+
resume(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Reverse الـ animation
|
|
39
|
+
*/
|
|
40
|
+
reverse(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get current progress (0 to 1)
|
|
43
|
+
*/
|
|
44
|
+
getProgress(): number;
|
|
45
|
+
/**
|
|
46
|
+
* Check if animation is running
|
|
47
|
+
*/
|
|
48
|
+
isRunning(): boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 🎨 Helper function لإنشاء animator
|
|
52
|
+
*/
|
|
53
|
+
export declare function createAnimator(element: HTMLElement): Animator;
|
|
54
|
+
/**
|
|
55
|
+
* 🎭 Animate multiple elements with stagger
|
|
56
|
+
*/
|
|
57
|
+
export declare function animateGroup(elements: HTMLElement[], keyframes: AnimationKeyframe[], config?: AnimationConfig & {
|
|
58
|
+
stagger?: number;
|
|
59
|
+
}): Promise<Animation[]>;
|
|
60
|
+
/**
|
|
61
|
+
* 🎬 Sequence animations (واحد بعد الآخر)
|
|
62
|
+
*/
|
|
63
|
+
export declare function sequence(animations: Array<{
|
|
64
|
+
element: HTMLElement;
|
|
65
|
+
keyframes: AnimationKeyframe[];
|
|
66
|
+
config?: AnimationConfig;
|
|
67
|
+
}>): Promise<Animation[]>;
|
|
68
|
+
/**
|
|
69
|
+
* 🔄 Parallel animations (كلهم مع بعض)
|
|
70
|
+
*/
|
|
71
|
+
export declare function parallel(animations: Array<{
|
|
72
|
+
element: HTMLElement;
|
|
73
|
+
keyframes: AnimationKeyframe[];
|
|
74
|
+
config?: AnimationConfig;
|
|
75
|
+
}>): Promise<Animation[]>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type EasingFunction = (t: number) => number;
|
|
2
|
+
/**
|
|
3
|
+
* 🎨 Easing Functions Collection
|
|
4
|
+
* t = progress (0 to 1)
|
|
5
|
+
* Returns eased value (0 to 1)
|
|
6
|
+
*/
|
|
7
|
+
export declare const linear: EasingFunction;
|
|
8
|
+
export declare const easeInCubic: EasingFunction;
|
|
9
|
+
export declare const easeOutCubic: EasingFunction;
|
|
10
|
+
export declare const easeInOutCubic: EasingFunction;
|
|
11
|
+
export declare const easeInQuad: EasingFunction;
|
|
12
|
+
export declare const easeOutQuad: EasingFunction;
|
|
13
|
+
export declare const easeInOutQuad: EasingFunction;
|
|
14
|
+
export declare const easeInQuart: EasingFunction;
|
|
15
|
+
export declare const easeOutQuart: EasingFunction;
|
|
16
|
+
export declare const easeInOutQuart: EasingFunction;
|
|
17
|
+
export declare const easeInQuint: EasingFunction;
|
|
18
|
+
export declare const easeOutQuint: EasingFunction;
|
|
19
|
+
export declare const easeInOutQuint: EasingFunction;
|
|
20
|
+
export declare const easeInExpo: EasingFunction;
|
|
21
|
+
export declare const easeOutExpo: EasingFunction;
|
|
22
|
+
export declare const easeInOutExpo: EasingFunction;
|
|
23
|
+
export declare const easeInBack: EasingFunction;
|
|
24
|
+
export declare const easeOutBack: EasingFunction;
|
|
25
|
+
export declare const easeInOutBack: EasingFunction;
|
|
26
|
+
export declare const easeInElastic: EasingFunction;
|
|
27
|
+
export declare const easeOutElastic: EasingFunction;
|
|
28
|
+
export declare const easeInOutElastic: EasingFunction;
|
|
29
|
+
export declare const easeOutBounce: EasingFunction;
|
|
30
|
+
export declare const easeInBounce: EasingFunction;
|
|
31
|
+
export declare const easeInOutBounce: EasingFunction;
|
|
32
|
+
export declare const easeInSine: EasingFunction;
|
|
33
|
+
export declare const easeOutSine: EasingFunction;
|
|
34
|
+
export declare const easeInOutSine: EasingFunction;
|
|
35
|
+
export declare const easeInCirc: EasingFunction;
|
|
36
|
+
export declare const easeOutCirc: EasingFunction;
|
|
37
|
+
export declare const easeInOutCirc: EasingFunction;
|
|
38
|
+
/**
|
|
39
|
+
* 📦 Map of all easing functions
|
|
40
|
+
*/
|
|
41
|
+
export declare const easings: {
|
|
42
|
+
readonly linear: EasingFunction;
|
|
43
|
+
readonly easeInCubic: EasingFunction;
|
|
44
|
+
readonly easeOutCubic: EasingFunction;
|
|
45
|
+
readonly easeInOutCubic: EasingFunction;
|
|
46
|
+
readonly easeInQuad: EasingFunction;
|
|
47
|
+
readonly easeOutQuad: EasingFunction;
|
|
48
|
+
readonly easeInOutQuad: EasingFunction;
|
|
49
|
+
readonly easeInQuart: EasingFunction;
|
|
50
|
+
readonly easeOutQuart: EasingFunction;
|
|
51
|
+
readonly easeInOutQuart: EasingFunction;
|
|
52
|
+
readonly easeInQuint: EasingFunction;
|
|
53
|
+
readonly easeOutQuint: EasingFunction;
|
|
54
|
+
readonly easeInOutQuint: EasingFunction;
|
|
55
|
+
readonly easeInExpo: EasingFunction;
|
|
56
|
+
readonly easeOutExpo: EasingFunction;
|
|
57
|
+
readonly easeInOutExpo: EasingFunction;
|
|
58
|
+
readonly easeInBack: EasingFunction;
|
|
59
|
+
readonly easeOutBack: EasingFunction;
|
|
60
|
+
readonly easeInOutBack: EasingFunction;
|
|
61
|
+
readonly easeInElastic: EasingFunction;
|
|
62
|
+
readonly easeOutElastic: EasingFunction;
|
|
63
|
+
readonly easeInOutElastic: EasingFunction;
|
|
64
|
+
readonly easeInBounce: EasingFunction;
|
|
65
|
+
readonly easeOutBounce: EasingFunction;
|
|
66
|
+
readonly easeInOutBounce: EasingFunction;
|
|
67
|
+
readonly easeInSine: EasingFunction;
|
|
68
|
+
readonly easeOutSine: EasingFunction;
|
|
69
|
+
readonly easeInOutSine: EasingFunction;
|
|
70
|
+
readonly easeInCirc: EasingFunction;
|
|
71
|
+
readonly easeOutCirc: EasingFunction;
|
|
72
|
+
readonly easeInOutCirc: EasingFunction;
|
|
73
|
+
};
|
|
74
|
+
export type EasingName = keyof typeof easings;
|
|
75
|
+
/**
|
|
76
|
+
* 🔍 Get easing function by name
|
|
77
|
+
*/
|
|
78
|
+
export declare function getEasing(name: EasingName | EasingFunction): EasingFunction;
|
|
79
|
+
/**
|
|
80
|
+
* 🌊 Create custom spring easing
|
|
81
|
+
*/
|
|
82
|
+
export declare function spring(stiffness?: number, damping?: number, mass?: number): EasingFunction;
|
|
83
|
+
/**
|
|
84
|
+
* 📈 Create cubic bezier easing
|
|
85
|
+
*/
|
|
86
|
+
export declare function bezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface ObserverOptions {
|
|
2
|
+
threshold?: number | number[];
|
|
3
|
+
rootMargin?: string;
|
|
4
|
+
triggerOnce?: boolean;
|
|
5
|
+
onEnter?: (entry: IntersectionObserverEntry) => void;
|
|
6
|
+
onExit?: (entry: IntersectionObserverEntry) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 👁️ ScrollObserver - لتتبع ظهور العناصر في الشاشة
|
|
10
|
+
* يستخدم IntersectionObserver API
|
|
11
|
+
*/
|
|
12
|
+
export declare class ScrollObserver {
|
|
13
|
+
private observer;
|
|
14
|
+
private elements;
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* مراقبة عنصر
|
|
18
|
+
*/
|
|
19
|
+
observe(element: Element, options?: ObserverOptions): void;
|
|
20
|
+
/**
|
|
21
|
+
* إيقاف مراقبة عنصر
|
|
22
|
+
*/
|
|
23
|
+
unobserve(element: Element): void;
|
|
24
|
+
/**
|
|
25
|
+
* إيقاف كل المراقبة
|
|
26
|
+
*/
|
|
27
|
+
disconnect(): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 🎯 Helper: مراقبة عنصر واحد
|
|
31
|
+
*/
|
|
32
|
+
export declare function observeElement(element: Element, options: ObserverOptions): () => void;
|
|
33
|
+
/**
|
|
34
|
+
* 📊 Helper: مراقبة مجموعة عناصر
|
|
35
|
+
*/
|
|
36
|
+
export declare function observeElements(elements: Element[], options: ObserverOptions): () => void;
|
|
37
|
+
/**
|
|
38
|
+
* 🎬 Helper: تشغيل animation عند الظهور
|
|
39
|
+
*/
|
|
40
|
+
export declare function animateOnScroll(element: HTMLElement, animationCallback: () => void | Promise<void>, options?: Omit<ObserverOptions, 'onEnter'>): () => void;
|
|
41
|
+
/**
|
|
42
|
+
* 📈 Get scroll progress (0 to 1)
|
|
43
|
+
*/
|
|
44
|
+
export declare function getScrollProgress(element: Element): number;
|
|
45
|
+
/**
|
|
46
|
+
* 🎯 Check if element is in viewport
|
|
47
|
+
*/
|
|
48
|
+
export declare function isInViewport(element: Element, threshold?: number): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PresetAnimation } from './fade';
|
|
2
|
+
export declare const shake: PresetAnimation;
|
|
3
|
+
export declare const shakeY: PresetAnimation;
|
|
4
|
+
export declare const pulse: PresetAnimation;
|
|
5
|
+
export declare const pulseLoop: PresetAnimation;
|
|
6
|
+
export declare const heartbeat: PresetAnimation;
|
|
7
|
+
export declare const flash: PresetAnimation;
|
|
8
|
+
export declare const rubberBand: PresetAnimation;
|
|
9
|
+
export declare const jello: PresetAnimation;
|
|
10
|
+
export declare const swing: PresetAnimation;
|
|
11
|
+
export declare const wobble: PresetAnimation;
|
|
12
|
+
export declare const tada: PresetAnimation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PresetAnimation } from './fade';
|
|
2
|
+
export declare const bounceIn: PresetAnimation;
|
|
3
|
+
export declare const bounceInUp: PresetAnimation;
|
|
4
|
+
export declare const bounceInDown: PresetAnimation;
|
|
5
|
+
export declare const bounceInLeft: PresetAnimation;
|
|
6
|
+
export declare const bounceInRight: PresetAnimation;
|
|
7
|
+
export declare const bounceOut: PresetAnimation;
|
|
8
|
+
export declare const bounce: PresetAnimation;
|
|
9
|
+
export declare const bounceLoop: PresetAnimation;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnimationKeyframe, AnimationConfig } from '../core/animator';
|
|
2
|
+
export interface PresetAnimation {
|
|
3
|
+
keyframes: AnimationKeyframe[];
|
|
4
|
+
config?: AnimationConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const fadeIn: PresetAnimation;
|
|
7
|
+
export declare const fadeInUp: PresetAnimation;
|
|
8
|
+
export declare const fadeInDown: PresetAnimation;
|
|
9
|
+
export declare const fadeInLeft: PresetAnimation;
|
|
10
|
+
export declare const fadeInRight: PresetAnimation;
|
|
11
|
+
export declare const fadeOut: PresetAnimation;
|
|
12
|
+
export declare const fadeOutUp: PresetAnimation;
|
|
13
|
+
export declare const fadeOutDown: PresetAnimation;
|
|
14
|
+
export declare const fadeOutLeft: PresetAnimation;
|
|
15
|
+
export declare const fadeOutRight: PresetAnimation;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export type { PresetAnimation } from './fade';
|
|
2
|
+
export { fadeIn, fadeInUp, fadeInDown, fadeInLeft, fadeInRight, fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, } from './fade';
|
|
3
|
+
export { slideInUp, slideInDown, slideInLeft, slideInRight, slideOutUp, slideOutDown, slideOutLeft, slideOutRight, } from './slide';
|
|
4
|
+
export { zoomIn, zoomInUp, zoomInDown, zoomInLeft, zoomInRight, zoomOut, zoomOutUp, zoomOutDown, zoomInBig, zoomInBounce, } from './zoom';
|
|
5
|
+
export { rotateIn, rotateInUpLeft, rotateInUpRight, rotateInDownLeft, rotateInDownRight, rotateOut, spin, spinReverse, spinSlow, spinFast, } from './rotate';
|
|
6
|
+
export { bounceIn, bounceInUp, bounceInDown, bounceInLeft, bounceInRight, bounceOut, bounce, bounceLoop, } from './bounce';
|
|
7
|
+
export { shake, shakeY, pulse, pulseLoop, heartbeat, flash, rubberBand, jello, swing, wobble, tada, } from './attention';
|
|
8
|
+
import * as fade from './fade';
|
|
9
|
+
export declare const presets: {
|
|
10
|
+
readonly fadeIn: fade.PresetAnimation;
|
|
11
|
+
readonly fadeInUp: fade.PresetAnimation;
|
|
12
|
+
readonly fadeInDown: fade.PresetAnimation;
|
|
13
|
+
readonly fadeInLeft: fade.PresetAnimation;
|
|
14
|
+
readonly fadeInRight: fade.PresetAnimation;
|
|
15
|
+
readonly fadeOut: fade.PresetAnimation;
|
|
16
|
+
readonly fadeOutUp: fade.PresetAnimation;
|
|
17
|
+
readonly fadeOutDown: fade.PresetAnimation;
|
|
18
|
+
readonly fadeOutLeft: fade.PresetAnimation;
|
|
19
|
+
readonly fadeOutRight: fade.PresetAnimation;
|
|
20
|
+
readonly slideInUp: fade.PresetAnimation;
|
|
21
|
+
readonly slideInDown: fade.PresetAnimation;
|
|
22
|
+
readonly slideInLeft: fade.PresetAnimation;
|
|
23
|
+
readonly slideInRight: fade.PresetAnimation;
|
|
24
|
+
readonly slideOutUp: fade.PresetAnimation;
|
|
25
|
+
readonly slideOutDown: fade.PresetAnimation;
|
|
26
|
+
readonly slideOutLeft: fade.PresetAnimation;
|
|
27
|
+
readonly slideOutRight: fade.PresetAnimation;
|
|
28
|
+
readonly zoomIn: fade.PresetAnimation;
|
|
29
|
+
readonly zoomInUp: fade.PresetAnimation;
|
|
30
|
+
readonly zoomInDown: fade.PresetAnimation;
|
|
31
|
+
readonly zoomInLeft: fade.PresetAnimation;
|
|
32
|
+
readonly zoomInRight: fade.PresetAnimation;
|
|
33
|
+
readonly zoomOut: fade.PresetAnimation;
|
|
34
|
+
readonly zoomOutUp: fade.PresetAnimation;
|
|
35
|
+
readonly zoomOutDown: fade.PresetAnimation;
|
|
36
|
+
readonly zoomInBig: fade.PresetAnimation;
|
|
37
|
+
readonly zoomInBounce: fade.PresetAnimation;
|
|
38
|
+
readonly rotateIn: fade.PresetAnimation;
|
|
39
|
+
readonly rotateInUpLeft: fade.PresetAnimation;
|
|
40
|
+
readonly rotateInUpRight: fade.PresetAnimation;
|
|
41
|
+
readonly rotateInDownLeft: fade.PresetAnimation;
|
|
42
|
+
readonly rotateInDownRight: fade.PresetAnimation;
|
|
43
|
+
readonly rotateOut: fade.PresetAnimation;
|
|
44
|
+
readonly spin: fade.PresetAnimation;
|
|
45
|
+
readonly spinReverse: fade.PresetAnimation;
|
|
46
|
+
readonly spinSlow: fade.PresetAnimation;
|
|
47
|
+
readonly spinFast: fade.PresetAnimation;
|
|
48
|
+
readonly bounceIn: fade.PresetAnimation;
|
|
49
|
+
readonly bounceInUp: fade.PresetAnimation;
|
|
50
|
+
readonly bounceInDown: fade.PresetAnimation;
|
|
51
|
+
readonly bounceInLeft: fade.PresetAnimation;
|
|
52
|
+
readonly bounceInRight: fade.PresetAnimation;
|
|
53
|
+
readonly bounceOut: fade.PresetAnimation;
|
|
54
|
+
readonly bounce: fade.PresetAnimation;
|
|
55
|
+
readonly bounceLoop: fade.PresetAnimation;
|
|
56
|
+
readonly shake: fade.PresetAnimation;
|
|
57
|
+
readonly shakeY: fade.PresetAnimation;
|
|
58
|
+
readonly pulse: fade.PresetAnimation;
|
|
59
|
+
readonly pulseLoop: fade.PresetAnimation;
|
|
60
|
+
readonly heartbeat: fade.PresetAnimation;
|
|
61
|
+
readonly flash: fade.PresetAnimation;
|
|
62
|
+
readonly rubberBand: fade.PresetAnimation;
|
|
63
|
+
readonly jello: fade.PresetAnimation;
|
|
64
|
+
readonly swing: fade.PresetAnimation;
|
|
65
|
+
readonly wobble: fade.PresetAnimation;
|
|
66
|
+
readonly tada: fade.PresetAnimation;
|
|
67
|
+
};
|
|
68
|
+
export type PresetName = keyof typeof presets;
|
|
69
|
+
/**
|
|
70
|
+
* Get preset animation by name
|
|
71
|
+
*/
|
|
72
|
+
export declare function getPreset(name: PresetName): fade.PresetAnimation;
|
|
73
|
+
/**
|
|
74
|
+
* Get all preset names
|
|
75
|
+
*/
|
|
76
|
+
export declare function getPresetNames(): PresetName[];
|
|
77
|
+
/**
|
|
78
|
+
* Get presets by category
|
|
79
|
+
*/
|
|
80
|
+
export declare function getPresetsByCategory(category: 'fade' | 'slide' | 'zoom' | 'rotate' | 'bounce' | 'attention'): PresetName[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PresetAnimation } from './fade';
|
|
2
|
+
export declare const rotateIn: PresetAnimation;
|
|
3
|
+
export declare const rotateInUpLeft: PresetAnimation;
|
|
4
|
+
export declare const rotateInUpRight: PresetAnimation;
|
|
5
|
+
export declare const rotateInDownLeft: PresetAnimation;
|
|
6
|
+
export declare const rotateInDownRight: PresetAnimation;
|
|
7
|
+
export declare const rotateOut: PresetAnimation;
|
|
8
|
+
export declare const spin: PresetAnimation;
|
|
9
|
+
export declare const spinReverse: PresetAnimation;
|
|
10
|
+
export declare const spinSlow: PresetAnimation;
|
|
11
|
+
export declare const spinFast: PresetAnimation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PresetAnimation } from './fade';
|
|
2
|
+
export declare const slideInUp: PresetAnimation;
|
|
3
|
+
export declare const slideInDown: PresetAnimation;
|
|
4
|
+
export declare const slideInLeft: PresetAnimation;
|
|
5
|
+
export declare const slideInRight: PresetAnimation;
|
|
6
|
+
export declare const slideOutUp: PresetAnimation;
|
|
7
|
+
export declare const slideOutDown: PresetAnimation;
|
|
8
|
+
export declare const slideOutLeft: PresetAnimation;
|
|
9
|
+
export declare const slideOutRight: PresetAnimation;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PresetAnimation } from './fade';
|
|
2
|
+
export declare const zoomIn: PresetAnimation;
|
|
3
|
+
export declare const zoomInUp: PresetAnimation;
|
|
4
|
+
export declare const zoomInDown: PresetAnimation;
|
|
5
|
+
export declare const zoomInLeft: PresetAnimation;
|
|
6
|
+
export declare const zoomInRight: PresetAnimation;
|
|
7
|
+
export declare const zoomOut: PresetAnimation;
|
|
8
|
+
export declare const zoomOutUp: PresetAnimation;
|
|
9
|
+
export declare const zoomOutDown: PresetAnimation;
|
|
10
|
+
export declare const zoomInBig: PresetAnimation;
|
|
11
|
+
export declare const zoomInBounce: PresetAnimation;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { PresetName } from '../presets';
|
|
3
|
+
export interface TeleMotionProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
preset?: PresetName;
|
|
6
|
+
duration?: number;
|
|
7
|
+
delay?: number;
|
|
8
|
+
easing?: string;
|
|
9
|
+
iterations?: number;
|
|
10
|
+
trigger?: 'mount' | 'hover' | 'click' | 'scroll';
|
|
11
|
+
threshold?: number;
|
|
12
|
+
triggerOnce?: boolean;
|
|
13
|
+
onAnimationStart?: () => void;
|
|
14
|
+
onAnimationEnd?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
export declare const TeleMotion: React.FC<TeleMotionProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { AnimationConfig, AnimationKeyframe } from '../core/animator';
|
|
3
|
+
import { PresetName } from '../presets';
|
|
4
|
+
export declare function useAnimator<T extends HTMLElement = HTMLDivElement>(): [
|
|
5
|
+
RefObject<T>,
|
|
6
|
+
(keyframes: AnimationKeyframe[], config?: AnimationConfig) => Promise<void>
|
|
7
|
+
];
|
|
8
|
+
export declare function usePresetAnimation<T extends HTMLElement = HTMLDivElement>(preset: PresetName, config?: AnimationConfig & {
|
|
9
|
+
trigger?: 'mount' | 'manual';
|
|
10
|
+
}): [RefObject<T>, () => Promise<void>];
|
|
11
|
+
export declare function useScrollAnimation<T extends HTMLElement = HTMLDivElement>(preset: PresetName, options?: {
|
|
12
|
+
threshold?: number;
|
|
13
|
+
triggerOnce?: boolean;
|
|
14
|
+
config?: AnimationConfig;
|
|
15
|
+
}): RefObject<T>;
|
|
16
|
+
export declare function useStagger<T extends HTMLElement = HTMLDivElement>(preset: PresetName, staggerDelay?: number, config?: AnimationConfig): [RefObject<T>, () => Promise<void>];
|
|
17
|
+
export declare function useHoverAnimation<T extends HTMLElement = HTMLDivElement>(preset: PresetName, config?: AnimationConfig): [RefObject<T>, {
|
|
18
|
+
onMouseEnter: () => void;
|
|
19
|
+
onMouseLeave: () => void;
|
|
20
|
+
}];
|
|
21
|
+
export declare function useInView<T extends HTMLElement = HTMLDivElement>(threshold?: number): [RefObject<T>, boolean];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function testAnimations(): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,3 +12,14 @@ export { Container, ContainerImage, ContainerContent, ContainerButton } from './
|
|
|
12
12
|
export type { ContainerProps, ContainerImageProps, ContainerContentProps, ContainerButtonProps, ContainerLayout, ContainerSize, ContainerTheme } from './components/Container/types';
|
|
13
13
|
export { FeatureCard, ProductCard, StatCard } from './components/Cards';
|
|
14
14
|
export type { FeatureCardProps, ProductCardProps, StatCardProps, CardVariant } from './components/Cards';
|
|
15
|
+
export { Animator, createAnimator, animateGroup, sequence, parallel } from './animations/core/animator';
|
|
16
|
+
export type { AnimationConfig, AnimationKeyframe, EasingFunction } from './animations/core/animator';
|
|
17
|
+
export { easings, getEasing, spring, bezier } from './animations/core/easing';
|
|
18
|
+
export type { EasingName } from './animations/core/easing';
|
|
19
|
+
export { ScrollObserver, observeElement, observeElements, animateOnScroll, getScrollProgress, isInViewport } from './animations/core/observer';
|
|
20
|
+
export type { ObserverOptions } from './animations/core/observer';
|
|
21
|
+
export { presets, getPreset, getPresetNames, getPresetsByCategory } from './animations/presets';
|
|
22
|
+
export type { PresetAnimation, PresetName } from './animations/presets';
|
|
23
|
+
export { TeleMotion } from './animations/react';
|
|
24
|
+
export type { TeleMotionProps } from './animations/react';
|
|
25
|
+
export { useAnimator, usePresetAnimation, useScrollAnimation, useStagger, useHoverAnimation, useInView } from './animations/react';
|