@umituz/react-native-design-system 2.6.47 → 2.6.49

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 (47) hide show
  1. package/package.json +1 -1
  2. package/src/atoms/skeleton/AtomicSkeleton.tsx +16 -62
  3. package/src/index.ts +0 -32
  4. package/src/molecules/bottom-sheet/components/BottomSheetModal.tsx +101 -180
  5. package/src/molecules/bottom-sheet/components/SafeBottomSheetModalProvider.tsx +8 -14
  6. package/src/molecules/index.ts +0 -6
  7. package/src/molecules/animation/core/AnimationCore.ts +0 -29
  8. package/src/molecules/animation/domain/entities/Animation.ts +0 -81
  9. package/src/molecules/animation/domain/entities/Fireworks.ts +0 -44
  10. package/src/molecules/animation/domain/entities/Theme.ts +0 -76
  11. package/src/molecules/animation/index.ts +0 -146
  12. package/src/molecules/animation/infrastructure/services/AnimationConfigService.ts +0 -35
  13. package/src/molecules/animation/infrastructure/services/SpringAnimationConfigService.ts +0 -67
  14. package/src/molecules/animation/infrastructure/services/TimingAnimationConfigService.ts +0 -57
  15. package/src/molecules/animation/infrastructure/services/__tests__/SpringAnimationConfigService.test.ts +0 -114
  16. package/src/molecules/animation/infrastructure/services/__tests__/TimingAnimationConfigService.test.ts +0 -105
  17. package/src/molecules/animation/presentation/components/Fireworks.tsx +0 -127
  18. package/src/molecules/animation/presentation/components/__tests__/Fireworks.test.tsx +0 -185
  19. package/src/molecules/animation/presentation/hooks/__tests__/useAnimation.integration.test.ts +0 -210
  20. package/src/molecules/animation/presentation/hooks/__tests__/useFireworks.test.ts +0 -242
  21. package/src/molecules/animation/presentation/hooks/__tests__/useGesture.test.ts +0 -108
  22. package/src/molecules/animation/presentation/hooks/__tests__/useSpringAnimation.test.ts +0 -127
  23. package/src/molecules/animation/presentation/hooks/__tests__/useTimingAnimation.test.ts +0 -172
  24. package/src/molecules/animation/presentation/hooks/__tests__/useTransformAnimation.test.ts +0 -133
  25. package/src/molecules/animation/presentation/hooks/useAnimation.ts +0 -77
  26. package/src/molecules/animation/presentation/hooks/useFireworks.ts +0 -144
  27. package/src/molecules/animation/presentation/hooks/useGesture.ts +0 -57
  28. package/src/molecules/animation/presentation/hooks/useGestureCreators.ts +0 -163
  29. package/src/molecules/animation/presentation/hooks/useGestureState.ts +0 -53
  30. package/src/molecules/animation/presentation/hooks/useIconAnimations.ts +0 -120
  31. package/src/molecules/animation/presentation/hooks/useModalAnimations.ts +0 -124
  32. package/src/molecules/animation/presentation/hooks/useReanimatedReady.ts +0 -60
  33. package/src/molecules/animation/presentation/hooks/useSpringAnimation.ts +0 -69
  34. package/src/molecules/animation/presentation/hooks/useTimingAnimation.ts +0 -111
  35. package/src/molecules/animation/presentation/hooks/useTransformAnimation.ts +0 -57
  36. package/src/molecules/animation/presentation/providers/AnimationThemeProvider.tsx +0 -60
  37. package/src/molecules/animation/presentation/providers/__tests__/AnimationThemeProvider.test.tsx +0 -165
  38. package/src/molecules/celebration/domain/entities/CelebrationConfig.ts +0 -17
  39. package/src/molecules/celebration/domain/entities/FireworksConfig.ts +0 -32
  40. package/src/molecules/celebration/index.ts +0 -93
  41. package/src/molecules/celebration/infrastructure/services/FireworksConfigService.ts +0 -49
  42. package/src/molecules/celebration/presentation/components/CelebrationFireworksOverlay.tsx +0 -33
  43. package/src/molecules/celebration/presentation/components/CelebrationModal.tsx +0 -81
  44. package/src/molecules/celebration/presentation/components/CelebrationModalContent.tsx +0 -88
  45. package/src/molecules/celebration/presentation/hooks/useCelebrationModalAnimation.ts +0 -49
  46. package/src/molecules/celebration/presentation/hooks/useCelebrationState.ts +0 -45
  47. package/src/molecules/celebration/presentation/styles/CelebrationModalStyles.ts +0 -65
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.6.47",
3
+ "version": "2.6.49",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive and safe area utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AtomicSkeleton - Skeleton Loader Component
3
3
  *
4
- * Skeleton placeholder loader with shimmer animation for loading states.
4
+ * Skeleton placeholder loader for loading states.
5
5
  *
6
6
  * @example
7
7
  * ```tsx
@@ -22,24 +22,12 @@
22
22
  * ```
23
23
  */
24
24
 
25
- import React, { useEffect } from 'react';
26
- import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
27
- import Animated, {
28
- useSharedValue,
29
- useAnimatedStyle,
30
- withRepeat,
31
- withSequence,
32
- withTiming,
33
- Easing,
34
- } from 'react-native-reanimated';
25
+ import React from 'react';
26
+ import { View, StyleSheet, type StyleProp, type ViewStyle, type DimensionValue } from 'react-native';
35
27
  import { useAppDesignTokens } from '../../theme';
36
28
  import type { SkeletonPattern, SkeletonConfig } from './AtomicSkeleton.types';
37
29
  import { SKELETON_PATTERNS } from './AtomicSkeleton.types';
38
30
 
39
- const AnimatedView = (Animated as any).createAnimatedComponent(View);
40
-
41
- const SHIMMER_DURATION = 1200;
42
-
43
31
  export interface AtomicSkeletonProps {
44
32
  /** Skeleton pattern preset */
45
33
  pattern?: SkeletonPattern;
@@ -49,63 +37,32 @@ export interface AtomicSkeletonProps {
49
37
  count?: number;
50
38
  /** Custom container style */
51
39
  style?: StyleProp<ViewStyle>;
52
- /** Disable shimmer animation */
53
- disableAnimation?: boolean;
54
40
  /** Test ID for testing */
55
41
  testID?: string;
56
42
  }
57
43
 
58
44
  /**
59
- * Skeleton loader component with shimmer animation
45
+ * Skeleton loader component
60
46
  *
61
47
  * Provides visual feedback during content loading with customizable patterns
62
48
  */
63
49
  const SkeletonItem: React.FC<{
64
50
  config: SkeletonConfig;
65
51
  baseColor: string;
66
- highlightColor: string;
67
- disableAnimation: boolean;
68
52
  multiplier: number;
69
- }> = ({ config, baseColor, highlightColor, disableAnimation, multiplier }) => {
70
- const opacity = useSharedValue(0);
71
-
72
- useEffect(() => {
73
- if (disableAnimation) return;
74
-
75
- opacity.value = withRepeat(
76
- withSequence(
77
- withTiming(1, { duration: SHIMMER_DURATION / 2, easing: Easing.ease }),
78
- withTiming(0, { duration: SHIMMER_DURATION / 2, easing: Easing.ease })
79
- ),
80
- -1,
81
- false
82
- );
83
- }, [opacity, disableAnimation]);
53
+ }> = ({ config, baseColor, multiplier }) => {
54
+ const itemStyles = StyleSheet.create({
55
+ item: {
56
+ ...styles.skeleton,
57
+ width: (typeof config.width === 'number' ? config.width * multiplier : config.width) as DimensionValue,
58
+ height: config.height ? config.height * multiplier : undefined,
59
+ borderRadius: config.borderRadius ? config.borderRadius * multiplier : undefined,
60
+ marginBottom: config.marginBottom ? config.marginBottom * multiplier : undefined,
61
+ backgroundColor: baseColor,
62
+ },
63
+ });
84
64
 
85
- const animatedStyle = useAnimatedStyle(() => ({
86
- backgroundColor: disableAnimation
87
- ? baseColor
88
- : opacity.value === 0
89
- ? baseColor
90
- : highlightColor,
91
- opacity: disableAnimation ? 1 : 0.5 + opacity.value * 0.5,
92
- }));
93
-
94
- return (
95
- <AnimatedView
96
- style={[
97
- styles.skeleton,
98
- {
99
- width: typeof config.width === 'number' ? config.width * multiplier : config.width,
100
- height: config.height ? config.height * multiplier : undefined,
101
- borderRadius: config.borderRadius ? config.borderRadius * multiplier : undefined,
102
- marginBottom: config.marginBottom ? config.marginBottom * multiplier : undefined,
103
- backgroundColor: baseColor,
104
- },
105
- animatedStyle,
106
- ]}
107
- />
108
- );
65
+ return <View style={itemStyles.item} />;
109
66
  };
110
67
 
111
68
  export const AtomicSkeleton: React.FC<AtomicSkeletonProps> = ({
@@ -113,7 +70,6 @@ export const AtomicSkeleton: React.FC<AtomicSkeletonProps> = ({
113
70
  custom,
114
71
  count = 1,
115
72
  style,
116
- disableAnimation = false,
117
73
  testID,
118
74
  }) => {
119
75
  const tokens = useAppDesignTokens();
@@ -128,8 +84,6 @@ export const AtomicSkeleton: React.FC<AtomicSkeletonProps> = ({
128
84
  key={`skeleton-${index}-${configIndex}`}
129
85
  config={config}
130
86
  baseColor={tokens.colors.surfaceSecondary}
131
- highlightColor={tokens.colors.border}
132
- disableAnimation={disableAnimation}
133
87
  multiplier={tokens.spacingMultiplier}
134
88
  />
135
89
  ))}
package/src/index.ts CHANGED
@@ -378,24 +378,6 @@ export {
378
378
  type StackNavigationOptions,
379
379
  type TabLabelProps,
380
380
  type TabBarConfig,
381
- // Celebration
382
- CelebrationModal,
383
- CelebrationModalContent,
384
- CelebrationFireworksOverlay,
385
- useCelebrationState,
386
- useCelebrationModalAnimation,
387
- FireworksConfigService,
388
- DEFAULT_FIREWORKS_COLORS,
389
- DEFAULT_FIREWORKS_CONFIG,
390
- type CelebrationConfig,
391
- type CelebrationAction,
392
- type ThemeColors,
393
- type CelebrationFireworksConfig,
394
- type UseCelebrationStateReturn,
395
- type UseCelebrationModalAnimationReturn,
396
- type CelebrationModalProps,
397
- type CelebrationModalContentProps,
398
- type CelebrationFireworksOverlayProps,
399
381
  // Long Press Menu
400
382
  type MenuAction,
401
383
  type MenuActionTypeValue,
@@ -441,20 +423,6 @@ export {
441
423
  type SplashColors,
442
424
  type UseSplashFlowOptions,
443
425
  type UseSplashFlowResult,
444
- // Animation
445
- Animated,
446
- useSharedValue,
447
- useAnimatedStyle,
448
- withTiming,
449
- withSpring,
450
- withSequence,
451
- withRepeat,
452
- runOnJS,
453
- cancelAnimation,
454
- Easing,
455
- type SharedValue,
456
- type WithTimingConfig,
457
- type WithSpringConfig,
458
426
  } from './molecules';
459
427
 
460
428
  // =============================================================================
@@ -1,192 +1,113 @@
1
- import React, { forwardRef, useCallback, useMemo, useImperativeHandle, useRef } from 'react';
2
- import { StyleSheet } from 'react-native';
3
- import {
4
- BottomSheetModal as GorhomBottomSheetModal,
5
- BottomSheetView,
6
- BottomSheetBackdrop,
7
- type BottomSheetBackdropProps,
8
- } from '@gorhom/bottom-sheet';
1
+ import React, { forwardRef, useImperativeHandle, useState, useCallback } from 'react';
2
+ import { Modal, View, StyleSheet, Pressable, Platform } from 'react-native';
9
3
  import { useAppDesignTokens } from '../../../theme';
10
- import type {
11
- BottomSheetConfig,
12
- BottomSheetModalRef,
13
- BottomSheetModalProps,
14
- } from '../types/BottomSheet';
15
- import { BottomSheetUtils } from '../types/BottomSheet';
4
+ import { useSafeAreaInsets } from '../../../safe-area';
5
+ import { getResponsiveBottomSheetLayout } from '../../../responsive';
6
+ import type { BottomSheetModalRef, BottomSheetModalProps } from '../types/BottomSheet';
16
7
 
17
- export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModalProps>((props, ref) => {
18
- const {
19
- children,
20
- preset = 'medium',
21
- snapPoints: customSnapPoints,
22
- initialIndex,
23
- enableBackdrop = true,
24
- backdropAppearsOnIndex,
25
- backdropDisappearsOnIndex,
26
- keyboardBehavior = 'interactive',
27
- enableHandleIndicator = true,
28
- enablePanDownToClose = true,
29
- enableDynamicSizing = false,
30
- onChange,
31
- onDismiss,
32
- backgroundColor,
33
- } = props;
8
+ declare const __DEV__: boolean;
34
9
 
35
- const tokens = useAppDesignTokens();
36
- const modalRef = useRef<GorhomBottomSheetModal>(null);
10
+ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModalProps>(
11
+ (props, ref) => {
12
+ const {
13
+ children,
14
+ preset = 'medium',
15
+ onDismiss,
16
+ backgroundColor,
17
+ } = props;
37
18
 
38
- const config: BottomSheetConfig = useMemo(() => {
39
- if (customSnapPoints) {
40
- return BottomSheetUtils.createConfig({
41
- snapPoints: customSnapPoints,
42
- initialIndex,
43
- enableBackdrop,
44
- backdropAppearsOnIndex,
45
- backdropDisappearsOnIndex,
46
- keyboardBehavior,
47
- enableHandleIndicator,
48
- enablePanDownToClose,
49
- enableDynamicSizing,
50
- });
51
- }
52
- return BottomSheetUtils.getPreset(preset);
53
- }, [preset, customSnapPoints, initialIndex, enableBackdrop, backdropAppearsOnIndex, backdropDisappearsOnIndex, keyboardBehavior, enableHandleIndicator, enablePanDownToClose, enableDynamicSizing]);
19
+ const [visible, setVisible] = useState(false);
20
+ const tokens = useAppDesignTokens();
21
+ const insets = useSafeAreaInsets();
22
+ const { maxHeight, borderRadius } = getResponsiveBottomSheetLayout();
54
23
 
55
- const renderBackdrop = useCallback(
56
- (backdropProps: BottomSheetBackdropProps) =>
57
- enableBackdrop ? (
58
- <BottomSheetBackdrop
59
- {...backdropProps}
60
- appearsOnIndex={config.backdropAppearsOnIndex ?? 0}
61
- disappearsOnIndex={config.backdropDisappearsOnIndex ?? -1}
62
- opacity={0.5}
63
- pressBehavior="close"
64
- />
65
- ) : null,
66
- [enableBackdrop, config.backdropAppearsOnIndex, config.backdropDisappearsOnIndex]
67
- );
24
+ const PRESET_HEIGHTS = {
25
+ small: maxHeight * 0.35,
26
+ medium: maxHeight * 0.6,
27
+ large: maxHeight * 0.85,
28
+ full: maxHeight,
29
+ custom: maxHeight * 0.6,
30
+ };
68
31
 
69
- const handleSheetChange = useCallback(
70
- (index: number) => {
71
- if (__DEV__) {
72
- console.log('[BottomSheetModal] onChange triggered', { index });
73
- }
74
- onChange?.(index);
75
- if (index === -1) onDismiss?.();
76
- },
77
- [onChange, onDismiss]
78
- );
32
+ const sheetHeight = PRESET_HEIGHTS[preset] || PRESET_HEIGHTS.medium;
79
33
 
80
- useImperativeHandle(ref, () => ({
81
- present: () => {
82
- if (__DEV__) {
83
- console.log('[BottomSheetModal] present() called', {
84
- refExists: !!modalRef.current,
85
- hasPresentMethod: typeof modalRef.current?.present === 'function',
86
- refType: typeof modalRef.current,
87
- refKeys: modalRef.current ? Object.keys(modalRef.current) : []
88
- });
89
- }
90
-
91
- try {
92
- if (!modalRef.current) {
93
- if (__DEV__) console.error('[BottomSheetModal] modalRef.current is null!');
94
- return;
95
- }
96
-
97
- if (typeof modalRef.current.present !== 'function') {
98
- if (__DEV__) console.error('[BottomSheetModal] present is not a function!', typeof modalRef.current.present);
99
- return;
100
- }
101
-
102
- if (__DEV__) console.log('[BottomSheetModal] Calling modalRef.current.present()...');
103
- modalRef.current.present();
104
- if (__DEV__) console.log('[BottomSheetModal] modalRef.current.present() executed');
105
-
106
- // Fallback: Also try snapToIndex as a workaround
107
- setTimeout(() => {
108
- if (modalRef.current && typeof modalRef.current.snapToIndex === 'function') {
109
- if (__DEV__) console.log('[BottomSheetModal] Fallback: calling snapToIndex(0)');
110
- modalRef.current.snapToIndex(0);
111
- }
112
- }, 50);
113
- } catch (error) {
114
- if (__DEV__) console.error('[BottomSheetModal] Error calling present():', error);
115
- }
116
- },
117
- dismiss: () => {
118
- if (__DEV__) console.log('[BottomSheetModal] dismiss() called');
119
- modalRef.current?.dismiss();
120
- },
121
- snapToIndex: (index: number) => {
122
- if (__DEV__) console.log('[BottomSheetModal] snapToIndex called', { index });
123
- modalRef.current?.snapToIndex(index);
124
- },
125
- snapToPosition: (pos: string | number) => modalRef.current?.snapToPosition(pos),
126
- expand: () => modalRef.current?.expand(),
127
- collapse: () => modalRef.current?.collapse(),
128
- }));
34
+ const present = useCallback(() => {
35
+ if (__DEV__) console.log('[BottomSheetModal] Opening');
36
+ setVisible(true);
37
+ }, []);
129
38
 
130
- React.useEffect(() => {
131
- if (__DEV__) {
132
- console.log('[BottomSheetModal] Component mounted', {
133
- hasModalRef: !!modalRef.current,
134
- snapPoints: config.snapPoints,
135
- preset
136
- });
137
- }
138
- }, []);
39
+ const dismiss = useCallback(() => {
40
+ if (__DEV__) console.log('[BottomSheetModal] Closing');
41
+ setVisible(false);
42
+ onDismiss?.();
43
+ }, [onDismiss]);
139
44
 
140
- React.useEffect(() => {
141
- if (__DEV__) {
142
- console.log('[BottomSheetModal] modalRef updated', {
143
- hasModalRef: !!modalRef.current,
144
- });
145
- }
146
- }, [modalRef.current]);
45
+ useImperativeHandle(ref, () => ({
46
+ present,
47
+ dismiss,
48
+ snapToIndex: (index: number) => {
49
+ if (index >= 0) present();
50
+ else dismiss();
51
+ },
52
+ snapToPosition: () => present(),
53
+ expand: () => present(),
54
+ collapse: () => dismiss(),
55
+ }));
147
56
 
148
- return (
149
- <GorhomBottomSheetModal
150
- ref={modalRef}
151
- index={-1}
152
- snapPoints={config.snapPoints}
153
- enableDynamicSizing={false}
154
- backdropComponent={renderBackdrop}
155
- keyboardBehavior={config.keyboardBehavior}
156
- enableHandlePanningGesture={config.enableHandleIndicator}
157
- enablePanDownToClose={config.enablePanDownToClose ?? true}
158
- onChange={handleSheetChange}
159
- onDismiss={onDismiss}
160
- onAnimate={(fromIndex, toIndex) => {
161
- if (__DEV__) {
162
- console.log('[BottomSheetModal] onAnimate', { fromIndex, toIndex });
163
- }
164
- }}
165
- backgroundStyle={[styles.background, { backgroundColor: backgroundColor || tokens.colors.surface }]}
166
- handleIndicatorStyle={[styles.handleIndicator, { backgroundColor: tokens.colors.border }]}
167
- enableOverDrag={false}
168
- >
169
- <BottomSheetView style={styles.contentContainer}>
170
- {children}
171
- </BottomSheetView>
172
- </GorhomBottomSheetModal>
173
- );
174
- });
57
+ const styles = StyleSheet.create({
58
+ overlay: {
59
+ flex: 1,
60
+ backgroundColor: tokens.colors.modalOverlay,
61
+ justifyContent: 'flex-end',
62
+ },
63
+ container: {
64
+ height: sheetHeight,
65
+ backgroundColor: backgroundColor || tokens.colors.surface,
66
+ borderTopLeftRadius: borderRadius,
67
+ borderTopRightRadius: borderRadius,
68
+ paddingBottom: Math.max(insets.bottom, 8),
69
+ ...Platform.select({
70
+ ios: {
71
+ shadowColor: tokens.colors.black,
72
+ shadowOffset: { width: 0, height: -4 },
73
+ shadowOpacity: 0.15,
74
+ shadowRadius: 12,
75
+ },
76
+ android: {
77
+ elevation: 8,
78
+ },
79
+ }),
80
+ },
81
+ handle: {
82
+ width: 40,
83
+ height: 4,
84
+ backgroundColor: tokens.colors.border,
85
+ borderRadius: 2,
86
+ alignSelf: 'center',
87
+ marginTop: 12,
88
+ marginBottom: 8,
89
+ },
90
+ });
175
91
 
176
- BottomSheetModal.displayName = 'BottomSheetModal';
177
-
178
- const styles = StyleSheet.create({
179
- background: {
180
- borderTopLeftRadius: 16,
181
- borderTopRightRadius: 16,
182
- },
183
- handleIndicator: {
184
- width: 40,
185
- height: 4,
186
- borderRadius: 2,
187
- },
188
- contentContainer: {
189
- flex: 1,
190
- },
191
- });
92
+ return (
93
+ <Modal
94
+ visible={visible}
95
+ transparent
96
+ animationType="slide"
97
+ onRequestClose={dismiss}
98
+ statusBarTranslucent
99
+ >
100
+ <Pressable style={styles.overlay} onPress={dismiss}>
101
+ <View style={styles.container}>
102
+ <Pressable onPress={(e) => e.stopPropagation()}>
103
+ <View style={styles.handle} />
104
+ {children}
105
+ </Pressable>
106
+ </View>
107
+ </Pressable>
108
+ </Modal>
109
+ );
110
+ }
111
+ );
192
112
 
113
+ BottomSheetModal.displayName = 'BottomSheetModal';
@@ -1,21 +1,15 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
3
2
 
4
- interface SafeBottomSheetModalProviderProps {
3
+ export interface SafeBottomSheetModalProviderProps {
5
4
  children: ReactNode;
6
5
  }
7
6
 
7
+ /**
8
+ * SafeBottomSheetModalProvider
9
+ *
10
+ * Simple wrapper for backward compatibility.
11
+ * No longer uses @gorhom/bottom-sheet provider.
12
+ */
8
13
  export const SafeBottomSheetModalProvider = ({ children }: SafeBottomSheetModalProviderProps) => {
9
- React.useEffect(() => {
10
- if (__DEV__) {
11
- console.log('[SafeBottomSheetModalProvider] Mounted and providing context');
12
- }
13
- }, []);
14
-
15
- if (__DEV__) {
16
- console.log('[SafeBottomSheetModalProvider] Rendering');
17
- }
18
-
19
- return <BottomSheetModalProvider>{children}</BottomSheetModalProvider>;
14
+ return <>{children}</>;
20
15
  };
21
-
@@ -39,12 +39,6 @@ export * from './swipe-actions';
39
39
  // Navigation
40
40
  export * from './navigation';
41
41
 
42
- // Celebration
43
- export * from './celebration';
44
-
45
- // Animation
46
- export * from './animation';
47
-
48
42
  // Long Press Menu
49
43
  export * from './long-press-menu';
50
44
 
@@ -1,29 +0,0 @@
1
- /**
2
- * Animation Core Exports
3
- *
4
- * Re-exports react-native-reanimated for centralized usage.
5
- * All packages should use this instead of importing directly.
6
- */
7
-
8
- export {
9
- useSharedValue,
10
- useAnimatedStyle,
11
- withTiming,
12
- withSpring,
13
- withSequence,
14
- withRepeat,
15
- runOnJS,
16
- cancelAnimation,
17
- Easing,
18
- } from 'react-native-reanimated';
19
-
20
- // Re-export Animated namespace
21
- import Animated from 'react-native-reanimated';
22
- export { Animated };
23
-
24
- // Re-export types
25
- export type {
26
- SharedValue,
27
- WithTimingConfig,
28
- WithSpringConfig,
29
- } from 'react-native-reanimated';
@@ -1,81 +0,0 @@
1
- /**
2
- * Animation Domain Entity
3
- *
4
- * Core animation types and configurations for React Native.
5
- * Wraps react-native-reanimated and react-native-gesture-handler.
6
- */
7
-
8
- import type { WithSpringConfig, WithTimingConfig } from 'react-native-reanimated';
9
-
10
- /**
11
- * Animation timing configuration
12
- */
13
- export type AnimationTimingConfig = WithTimingConfig & {
14
- duration?: number;
15
- };
16
-
17
- /**
18
- * Animation spring configuration
19
- */
20
- export type AnimationSpringConfig = WithSpringConfig & {
21
- damping?: number;
22
- stiffness?: number;
23
- mass?: number;
24
- };
25
-
26
- /**
27
- * Animation preset types
28
- */
29
- export enum AnimationPreset {
30
- FADE_IN = 'fadeIn',
31
- FADE_OUT = 'fadeOut',
32
- SLIDE_IN_UP = 'slideInUp',
33
- SLIDE_IN_DOWN = 'slideInDown',
34
- SLIDE_IN_LEFT = 'slideInLeft',
35
- SLIDE_IN_RIGHT = 'slideInRight',
36
- SCALE_IN = 'scaleIn',
37
- SCALE_OUT = 'scaleOut',
38
- BOUNCE = 'bounce',
39
- SHAKE = 'shake',
40
- }
41
-
42
- /**
43
- * Gesture type
44
- */
45
- export enum GestureType {
46
- TAP = 'tap',
47
- PAN = 'pan',
48
- PINCH = 'pinch',
49
- ROTATION = 'rotation',
50
- LONG_PRESS = 'longPress',
51
- }
52
-
53
- /**
54
- * Animation easing functions
55
- */
56
- export enum AnimationEasing {
57
- LINEAR = 'linear',
58
- EASE_IN = 'easeIn',
59
- EASE_OUT = 'easeOut',
60
- EASE_IN_OUT = 'easeInOut',
61
- BOUNCE = 'bounce',
62
- ELASTIC = 'elastic',
63
- }
64
-
65
- /**
66
- * Animation constants
67
- */
68
- export const ANIMATION_CONSTANTS = {
69
- DURATION: {
70
- INSTANT: 0,
71
- FAST: 200,
72
- NORMAL: 300,
73
- SLOW: 500,
74
- VERY_SLOW: 1000,
75
- },
76
- SPRING: {
77
- DAMPING: 10,
78
- STIFFNESS: 100,
79
- MASS: 1,
80
- },
81
- } as const;
@@ -1,44 +0,0 @@
1
- /**
2
- * Fireworks Domain Entity
3
- *
4
- * Types and constants for fireworks particle system
5
- */
6
-
7
- /**
8
- * Particle configuration
9
- */
10
- export interface ParticleConfig {
11
- x: number;
12
- y: number;
13
- color: string;
14
- size: number;
15
- velocityX: number;
16
- velocityY: number;
17
- life: number;
18
- decay: number;
19
- }
20
-
21
- /**
22
- * Fireworks configuration
23
- */
24
- export interface FireworksConfig {
25
- particleCount?: number;
26
- colors: string[]; // Required - colors must be provided by consumer
27
- duration?: number;
28
- particleSize?: number;
29
- spread?: number;
30
- }
31
-
32
- /**
33
- * Fireworks constants
34
- */
35
- export const FIREWORKS_CONSTANTS = {
36
- DEFAULT_PARTICLE_COUNT: 50,
37
- DEFAULT_DURATION: 2000,
38
- DEFAULT_PARTICLE_SIZE: 4,
39
- DEFAULT_SPREAD: 100,
40
- DEFAULT_COLORS: [] as string[], // Colors should be provided by consumer
41
- GRAVITY: 0.3,
42
- DECAY_RATE: 0.02,
43
- } as const;
44
-