react-ui-animate 4.0.0-rc.3 → 4.0.0-rc.4

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.
Files changed (40) hide show
  1. package/.idea/codeStyles/Project.xml +59 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/modules.xml +8 -0
  4. package/.idea/react-ui-animate.iml +9 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/LICENSE +21 -21
  7. package/README.md +209 -209
  8. package/dist/animation/animationType.d.ts +58 -15
  9. package/dist/animation/controllers/index.d.ts +8 -0
  10. package/dist/animation/controllers/withConfig.d.ts +5 -0
  11. package/dist/animation/controllers/withDecay.d.ts +7 -0
  12. package/dist/animation/controllers/withDelay.d.ts +6 -0
  13. package/dist/animation/controllers/withEase.d.ts +6 -0
  14. package/dist/animation/controllers/withLoop.d.ts +2 -0
  15. package/dist/animation/controllers/withSequence.d.ts +2 -0
  16. package/dist/animation/controllers/withSpring.d.ts +7 -0
  17. package/dist/animation/controllers/withTiming.d.ts +7 -0
  18. package/dist/animation/core/FluidArrayController.d.ts +2 -2
  19. package/dist/animation/core/FluidController.d.ts +5 -3
  20. package/dist/animation/core/useFluidValue.d.ts +2 -2
  21. package/dist/animation/core/useFluidValues.d.ts +3 -0
  22. package/dist/animation/core/useMount.d.ts +3 -3
  23. package/dist/animation/helpers/getToValue.d.ts +2 -0
  24. package/dist/animation/helpers/index.d.ts +1 -0
  25. package/dist/animation/hooks/index.d.ts +3 -0
  26. package/dist/animation/hooks/useMount.d.ts +15 -0
  27. package/dist/animation/hooks/useValue.d.ts +17 -0
  28. package/dist/animation/hooks/useValues.d.ts +8 -0
  29. package/dist/animation/index.d.ts +3 -4
  30. package/dist/animation/interpolation.d.ts +5 -4
  31. package/dist/animation/modules/MountedBlock.d.ts +7 -10
  32. package/dist/animation/modules/ScrollableBlock.d.ts +5 -4
  33. package/dist/animation/modules/TransitionBlock.d.ts +5 -4
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +1 -1
  36. package/dist/index.js.map +1 -1
  37. package/package.json +52 -52
  38. package/dist/animation/useAnimatedValue.d.ts +0 -21
  39. package/dist/animation/useMountedValue.d.ts +0 -15
  40. package/dist/animation/withFunctions.d.ts +0 -107
@@ -1,107 +0,0 @@
1
- import type { UseAnimatedValueConfig } from './useAnimatedValue';
2
- interface WithOnCallbacks extends Pick<UseAnimatedValueConfig, 'onRest' | 'onStart' | 'onChange'> {
3
- }
4
- /**
5
- * Creates a default animation configuration.
6
- * @param {number} toValue - The target value of the animation.
7
- * @param {UseAnimatedValueConfig} config - Optional configuration.
8
- * @returns {{ toValue: number; config: UseAnimatedValueConfig }}
9
- */
10
- export declare const withConfig: (toValue: number, config?: UseAnimatedValueConfig) => {
11
- toValue: number;
12
- config: UseAnimatedValueConfig | undefined;
13
- };
14
- interface WithEaseConfig extends WithOnCallbacks {
15
- }
16
- /**
17
- * Creates an ease animation configuration.
18
- * @param {number} toValue - The target value of the animation.
19
- * @param {UseAnimatedValueConfig} [config=AnimationConfigUtils.EASE] - Optional ease configuration.
20
- * @returns {{ toValue: number; config: UseAnimatedValueConfig }}
21
- */
22
- export declare const withEase: (toValue: number, config?: WithEaseConfig) => {
23
- toValue: number;
24
- config: UseAnimatedValueConfig | undefined;
25
- };
26
- interface WithSpringConfig extends Pick<UseAnimatedValueConfig, 'mass' | 'friction' | 'tension'>, WithOnCallbacks {
27
- }
28
- /**
29
- * Creates a spring animation configuration.
30
- * @param {number} toValue - The target value of the animation.
31
- * @param {WithSpringConfig} [config=AnimationConfigUtils.ELASTIC] - Optional spring configuration.
32
- * @returns {{ toValue: number; config: WithSpringConfig }}
33
- */
34
- export declare const withSpring: (toValue: number, config?: WithSpringConfig) => {
35
- toValue: number;
36
- config: UseAnimatedValueConfig | undefined;
37
- };
38
- interface WithTimingConfig extends Pick<UseAnimatedValueConfig, 'duration' | 'easing'>, WithOnCallbacks {
39
- }
40
- /**
41
- * Creates a timing animation configuration.
42
- * @param {number} toValue - The target value of the animation.
43
- * @param {WithTimingConfig} [config={ duration: 250 }] - Optional timing configuration.
44
- * @returns {{ toValue: number; config: WithTimingConfig }}
45
- */
46
- export declare const withTiming: (toValue: number, config?: WithTimingConfig) => {
47
- toValue: number;
48
- config: UseAnimatedValueConfig | undefined;
49
- };
50
- interface WithDecayConfig extends Pick<UseAnimatedValueConfig, 'velocity' | 'deceleration'>, WithOnCallbacks {
51
- }
52
- /**
53
- * Creates a decay animation configuration.
54
- * @param {WithDecayConfig} config - Optional decay configuration.
55
- * @returns {{ config: WithDecayConfig }}
56
- */
57
- export declare const withDecay: (config?: WithDecayConfig) => {
58
- config: {
59
- velocity?: number;
60
- deceleration?: number;
61
- onRest?: (value: number) => void;
62
- onStart?: (value: number) => void;
63
- onChange?: (value: number) => void;
64
- decay: boolean;
65
- };
66
- };
67
- /**
68
- * Creates a sequence of animations that run one after another.
69
- * @param {Array<{ toValue: number; config?: UseAnimatedValueConfig } | number>} configs - An array of animation configurations or delays.
70
- * @returns {Function} An async function that runs the animations in sequence.
71
- */
72
- export declare const withSequence: (configs: Array<{
73
- toValue?: number;
74
- config?: UseAnimatedValueConfig;
75
- } | number>) => (next: (arg: {
76
- toValue?: number;
77
- config?: UseAnimatedValueConfig;
78
- }) => void) => Promise<void>;
79
- /**
80
- * Adds a delay before the given animation.
81
- * @param {number} delay - The delay in milliseconds.
82
- * @param {{ toValue: number; config?: UseAnimatedValueConfig }} animation - The animation configuration (withTiming | withSpring).
83
- * @returns {{ toValue: number; config: UseAnimatedValueConfig }} The updated animation configuration with delay.
84
- */
85
- export declare const withDelay: (delay: number, animation: {
86
- toValue: number;
87
- config?: UseAnimatedValueConfig;
88
- }) => {
89
- config: {
90
- delay: number;
91
- mass?: number;
92
- tension?: number;
93
- friction?: number;
94
- duration?: number;
95
- easing?: (value: number) => number;
96
- immediate?: boolean;
97
- restDistance?: number;
98
- onChange?: (value: number) => void;
99
- onRest?: (value: number) => void;
100
- onStart?: (value: number) => void;
101
- decay?: boolean;
102
- velocity?: number;
103
- deceleration?: number;
104
- };
105
- toValue: number;
106
- };
107
- export {};