react-native-inapp-inspector 2.3.2 → 2.3.3

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.
@@ -1,206 +1,2 @@
1
- import React, {useEffect, useRef} from 'react';
2
- import {Animated, StyleSheet, View} from 'react-native';
3
- import {AppColors} from '../styles/AppColors';
4
-
5
- interface SkeletonPlaceholderProps {
6
- cardCount?: number;
7
- }
8
-
9
- const SkeletonPlaceholder = React.memo(function SkeletonPlaceholder({
10
- cardCount = 4,
11
- }: SkeletonPlaceholderProps) {
12
- const shimmerAnim = useRef(new Animated.Value(0.35)).current;
13
-
14
- useEffect(() => {
15
- const animation = Animated.loop(
16
- Animated.sequence([
17
- Animated.timing(shimmerAnim, {
18
- toValue: 0.85,
19
- duration: 750,
20
- useNativeDriver: true,
21
- }),
22
- Animated.timing(shimmerAnim, {
23
- toValue: 0.35,
24
- duration: 750,
25
- useNativeDriver: true,
26
- }),
27
- ]),
28
- );
29
- animation.start();
30
- return () => animation.stop();
31
- }, [shimmerAnim]);
32
-
33
- return (
34
- <View style={skeletonStyles.container}>
35
- {/* ─── Search & Scope Toolbar Skeleton ─── */}
36
- <View style={skeletonStyles.toolbarSkeleton}>
37
- <Animated.View
38
- style={[
39
- skeletonStyles.searchBarSkeleton,
40
- {opacity: shimmerAnim},
41
- ]}
42
- />
43
- <View style={skeletonStyles.actionButtonsRow}>
44
- <Animated.View
45
- style={[skeletonStyles.iconButtonSkeleton, {opacity: shimmerAnim}]}
46
- />
47
- <Animated.View
48
- style={[skeletonStyles.iconButtonSkeleton, {opacity: shimmerAnim}]}
49
- />
50
- </View>
51
- </View>
52
-
53
- {/* ─── Quick Filter Chips Skeleton Strip ─── */}
54
- <View style={skeletonStyles.chipStripSkeleton}>
55
- <Animated.View
56
- style={[skeletonStyles.chipSkeleton, {width: 48, opacity: shimmerAnim}]}
57
- />
58
- <Animated.View
59
- style={[skeletonStyles.chipSkeleton, {width: 68, opacity: shimmerAnim}]}
60
- />
61
- <Animated.View
62
- style={[skeletonStyles.chipSkeleton, {width: 76, opacity: shimmerAnim}]}
63
- />
64
- <Animated.View
65
- style={[skeletonStyles.chipSkeleton, {width: 58, opacity: shimmerAnim}]}
66
- />
67
- </View>
68
-
69
- {/* ─── List Cards Skeleton ─── */}
70
- {Array.from({length: cardCount}).map((_, i) => (
71
- <Animated.View
72
- key={`skeleton_card_${i}`}
73
- style={[skeletonStyles.cardSkeleton, {opacity: shimmerAnim}]}>
74
- {/* Top row: Status pill + Method + Time */}
75
- <View style={skeletonStyles.cardTopRow}>
76
- <View style={skeletonStyles.badgeGroup}>
77
- <View style={skeletonStyles.statusBadgeSkeleton} />
78
- <View style={skeletonStyles.methodBadgeSkeleton} />
79
- </View>
80
- <View style={skeletonStyles.timeSkeleton} />
81
- </View>
82
-
83
- {/* Middle row: URL lines */}
84
- <View style={skeletonStyles.urlLineLong} />
85
- <View style={skeletonStyles.urlLineShort} />
86
-
87
- {/* Bottom row: Latency & Size */}
88
- <View style={skeletonStyles.cardBottomRow}>
89
- <View style={skeletonStyles.metaPillSkeleton} />
90
- <View style={skeletonStyles.metaPillSkeleton} />
91
- </View>
92
- </Animated.View>
93
- ))}
94
- </View>
95
- );
96
- });
97
-
98
- const skeletonStyles = StyleSheet.create({
99
- container: {
100
- flex: 1,
101
- paddingHorizontal: 12,
102
- paddingTop: 8,
103
- },
104
- toolbarSkeleton: {
105
- flexDirection: 'row',
106
- alignItems: 'center',
107
- gap: 8,
108
- marginBottom: 8,
109
- },
110
- searchBarSkeleton: {
111
- flex: 1,
112
- height: 36,
113
- borderRadius: 8,
114
- backgroundColor: AppColors.graySurface,
115
- borderWidth: 1,
116
- borderColor: AppColors.dividerColor,
117
- },
118
- actionButtonsRow: {
119
- flexDirection: 'row',
120
- gap: 6,
121
- },
122
- iconButtonSkeleton: {
123
- width: 36,
124
- height: 36,
125
- borderRadius: 8,
126
- backgroundColor: AppColors.graySurface,
127
- borderWidth: 1,
128
- borderColor: AppColors.dividerColor,
129
- },
130
- chipStripSkeleton: {
131
- flexDirection: 'row',
132
- gap: 6,
133
- marginBottom: 10,
134
- },
135
- chipSkeleton: {
136
- height: 24,
137
- borderRadius: 6,
138
- backgroundColor: AppColors.graySurface,
139
- borderWidth: 1,
140
- borderColor: AppColors.dividerColor,
141
- },
142
- cardSkeleton: {
143
- backgroundColor: AppColors.primaryLight,
144
- borderRadius: 10,
145
- padding: 12,
146
- marginBottom: 8,
147
- borderWidth: 1,
148
- borderColor: AppColors.dividerColor,
149
- },
150
- cardTopRow: {
151
- flexDirection: 'row',
152
- justifyContent: 'space-between',
153
- alignItems: 'center',
154
- marginBottom: 8,
155
- },
156
- badgeGroup: {
157
- flexDirection: 'row',
158
- alignItems: 'center',
159
- gap: 6,
160
- },
161
- statusBadgeSkeleton: {
162
- width: 38,
163
- height: 18,
164
- borderRadius: 4,
165
- backgroundColor: AppColors.graySurface,
166
- },
167
- methodBadgeSkeleton: {
168
- width: 44,
169
- height: 18,
170
- borderRadius: 4,
171
- backgroundColor: AppColors.graySurface,
172
- },
173
- timeSkeleton: {
174
- width: 48,
175
- height: 12,
176
- borderRadius: 4,
177
- backgroundColor: AppColors.graySurface,
178
- },
179
- urlLineLong: {
180
- height: 13,
181
- borderRadius: 4,
182
- backgroundColor: AppColors.graySurface,
183
- marginBottom: 5,
184
- width: '90%',
185
- },
186
- urlLineShort: {
187
- height: 11,
188
- borderRadius: 4,
189
- backgroundColor: AppColors.graySurface,
190
- marginBottom: 8,
191
- width: '55%',
192
- },
193
- cardBottomRow: {
194
- flexDirection: 'row',
195
- gap: 8,
196
- marginTop: 2,
197
- },
198
- metaPillSkeleton: {
199
- width: 52,
200
- height: 14,
201
- borderRadius: 4,
202
- backgroundColor: AppColors.graySurface,
203
- },
204
- });
205
-
206
- export default SkeletonPlaceholder;
1
+ export * from './Inspector/SkeletonPlaceholder';
2
+ export {default} from './Inspector/SkeletonPlaceholder';
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED FILE — do not edit by hand.
2
2
  // Regenerated from package.json on every build by scripts/gen-version.js.
3
- export const LIB_VERSION = '2.3.2';
3
+ export const LIB_VERSION = '2.3.3';
package/src/index.tsx CHANGED
@@ -2245,6 +2245,7 @@ export {
2245
2245
 
2246
2246
  export {default as CrashTab} from './components/Inspector/CrashTab';
2247
2247
  export {default as ErrorBoundary} from './components/ErrorBoundary';
2248
+ export {default as SkeletonPlaceholder} from './components/Inspector/SkeletonPlaceholder';
2248
2249
 
2249
2250
  export {
2250
2251
  connectReduxStore,