react-native-inapp-inspector 1.0.9 → 1.0.11

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/README.md +5 -6
  2. package/dist/commonjs/components/AnalyticsDetail.js +28 -23
  3. package/dist/commonjs/components/AnalyticsEventCard.js +9 -9
  4. package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
  5. package/dist/commonjs/components/BrandSquareIcon.js +180 -0
  6. package/dist/commonjs/components/CodeSnippet.js +32 -24
  7. package/dist/commonjs/components/ConsoleLogCard.js +127 -70
  8. package/dist/commonjs/components/JsonViewer.d.ts +2 -1
  9. package/dist/commonjs/components/JsonViewer.js +2 -2
  10. package/dist/commonjs/components/MetaAccordion.d.ts +1 -1
  11. package/dist/commonjs/components/MetaAccordion.js +45 -2
  12. package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
  13. package/dist/commonjs/components/NetworkIcons.js +42 -1
  14. package/dist/commonjs/components/ReduxTreeView.d.ts +17 -0
  15. package/dist/commonjs/components/ReduxTreeView.js +630 -0
  16. package/dist/commonjs/components/TouchableScale.js +15 -1
  17. package/dist/commonjs/components/TreeNode.js +3 -3
  18. package/dist/commonjs/customHooks/reduxLogger.d.ts +12 -0
  19. package/dist/commonjs/customHooks/reduxLogger.js +71 -2
  20. package/dist/commonjs/index.js +1568 -505
  21. package/dist/commonjs/styles/index.d.ts +11 -1
  22. package/dist/commonjs/styles/index.js +19 -9
  23. package/dist/commonjs/types/index.d.ts +4 -0
  24. package/dist/esm/components/AnalyticsDetail.js +28 -23
  25. package/dist/esm/components/AnalyticsEventCard.js +9 -9
  26. package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
  27. package/dist/esm/components/BrandSquareIcon.js +140 -0
  28. package/dist/esm/components/CodeSnippet.js +32 -24
  29. package/dist/esm/components/ConsoleLogCard.js +127 -70
  30. package/dist/esm/components/JsonViewer.d.ts +2 -1
  31. package/dist/esm/components/JsonViewer.js +2 -2
  32. package/dist/esm/components/MetaAccordion.d.ts +1 -1
  33. package/dist/esm/components/MetaAccordion.js +46 -3
  34. package/dist/esm/components/NetworkIcons.d.ts +7 -0
  35. package/dist/esm/components/NetworkIcons.js +34 -0
  36. package/dist/esm/components/ReduxTreeView.d.ts +17 -0
  37. package/dist/esm/components/ReduxTreeView.js +592 -0
  38. package/dist/esm/components/TouchableScale.js +16 -2
  39. package/dist/esm/components/TreeNode.js +3 -3
  40. package/dist/esm/customHooks/reduxLogger.d.ts +12 -0
  41. package/dist/esm/customHooks/reduxLogger.js +64 -1
  42. package/dist/esm/index.js +1571 -508
  43. package/dist/esm/styles/index.d.ts +11 -1
  44. package/dist/esm/styles/index.js +19 -9
  45. package/dist/esm/types/index.d.ts +4 -0
  46. package/example/App.tsx +46 -0
  47. package/package.json +7 -5
@@ -0,0 +1,630 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ReduxActionTimeline = exports.ReduxTreeView = void 0;
37
+ const react_1 = __importStar(require("react"));
38
+ const react_native_1 = require("react-native");
39
+ const AppColors_1 = require("../styles/AppColors");
40
+ const AppFonts_1 = require("../styles/AppFonts");
41
+ const NetworkIcons_1 = require("./NetworkIcons");
42
+ const react_native_svg_1 = __importStar(require("react-native-svg"));
43
+ // Custom icons
44
+ const DatabaseIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
45
+ <react_native_svg_1.Path d="M12 2C6.5 2 2 4.2 2 7v10c0 2.8 4.5 5 10 5s10-2.2 10-5V7c0-2.8-4.5-5-10-5z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
46
+ <react_native_svg_1.Path d="M2 12c0 2.8 4.5 5 10 5s10-2.2 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
47
+ <react_native_svg_1.Path d="M2 7c0 2.8 4.5 5 10 5s10-2.2 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
48
+ </react_native_svg_1.default>);
49
+ const BoltIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
50
+ <react_native_svg_1.Path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" fill={color} stroke={color} strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
51
+ </react_native_svg_1.default>);
52
+ const FolderIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
53
+ <react_native_svg_1.Path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
54
+ </react_native_svg_1.default>);
55
+ const ReduxValueNode = ({ name, value, level, search }) => {
56
+ const [expanded, setExpanded] = (0, react_1.useState)(level < 1);
57
+ const isObject = typeof value === 'object' && value !== null;
58
+ const isArray = Array.isArray(value);
59
+ const nameStr = String(name);
60
+ // Filter check if search query matches key or value
61
+ const matchesSearch = (k, val) => {
62
+ if (!search)
63
+ return true;
64
+ const s = search.toLowerCase();
65
+ if (k.toLowerCase().includes(s))
66
+ return true;
67
+ if (typeof val !== 'object' && String(val).toLowerCase().includes(s))
68
+ return true;
69
+ if (typeof val === 'object' && val !== null) {
70
+ return Object.keys(val).some(key => matchesSearch(key, val[key]));
71
+ }
72
+ return false;
73
+ };
74
+ if (!matchesSearch(nameStr, value)) {
75
+ return null;
76
+ }
77
+ if (!isObject) {
78
+ const valStr = value === null ? 'null' : value === undefined ? 'undefined' : String(value);
79
+ // Pick different colors for primitives
80
+ let valColor = '#0D9488'; // String
81
+ if (value === null || value === undefined) {
82
+ valColor = AppColors_1.AppColors.grayTextWeak;
83
+ }
84
+ else if (typeof value === 'number') {
85
+ valColor = '#D97706';
86
+ }
87
+ else if (typeof value === 'boolean') {
88
+ valColor = '#4F46E5';
89
+ }
90
+ return (<react_native_1.View style={[reduxValueStyles.treeRow, { paddingLeft: 12 }]}>
91
+ <react_native_1.View style={reduxValueStyles.treeLeafConnector}/>
92
+ <react_native_1.Text style={reduxValueStyles.keyText} selectable={true}>
93
+ {nameStr}
94
+ <react_native_1.Text style={reduxValueStyles.colonText}>: </react_native_1.Text>
95
+ <react_native_1.Text style={[reduxValueStyles.valText, { color: valColor }]} selectable={true}>
96
+ {valStr}
97
+ </react_native_1.Text>
98
+ </react_native_1.Text>
99
+ </react_native_1.View>);
100
+ }
101
+ const keys = Object.keys(value);
102
+ const summaryText = isArray ? `Array [${keys.length}]` : `Object {${keys.length}}`;
103
+ return (<react_native_1.View style={reduxValueStyles.treeNodeBlock}>
104
+ <react_native_1.Pressable onPress={() => setExpanded(!expanded)} style={reduxValueStyles.treeRow}>
105
+ <react_native_1.View style={reduxValueStyles.treeLeafConnector}/>
106
+ <react_native_1.View style={[reduxValueStyles.chevronWrap, { transform: [{ rotate: expanded ? '90deg' : '0deg' }] }]}>
107
+ <NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
108
+ </react_native_1.View>
109
+ <react_native_1.Text style={reduxValueStyles.keyText} selectable={true}>
110
+ {nameStr}
111
+ <react_native_1.Text style={reduxValueStyles.colonText}>: </react_native_1.Text>
112
+ <react_native_1.Text style={reduxValueStyles.summaryText}>{summaryText}</react_native_1.Text>
113
+ </react_native_1.Text>
114
+ </react_native_1.Pressable>
115
+ {expanded && (<react_native_1.View style={reduxValueStyles.treeChildrenContainer}>
116
+ {keys.map(key => (<ReduxValueNode key={key} name={key} value={value[key]} level={level + 1} search={search}/>))}
117
+ </react_native_1.View>)}
118
+ </react_native_1.View>);
119
+ };
120
+ const ReduxTreeView = ({ state, lastActionMap, search, }) => {
121
+ const [storeExpanded, setStoreExpanded] = (0, react_1.useState)(true);
122
+ const [reducerExpanded, setReducerExpanded] = (0, react_1.useState)({});
123
+ if (!state || typeof state !== 'object') {
124
+ return (<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 12, color: AppColors_1.AppColors.grayTextWeak, padding: 12 }}>
125
+ No state object to display.
126
+ </react_native_1.Text>);
127
+ }
128
+ const reducers = Object.keys(state);
129
+ const toggleReducer = (key) => {
130
+ setReducerExpanded(prev => ({
131
+ ...prev,
132
+ [key]: !prev[key],
133
+ }));
134
+ };
135
+ return (<react_native_1.View style={styles.container}>
136
+ {/* Root Node: Store */}
137
+ <react_native_1.Pressable onPress={() => setStoreExpanded(!storeExpanded)} style={styles.storeHeader}>
138
+ <react_native_1.View style={[styles.chevronWrap, { transform: [{ rotate: storeExpanded ? '90deg' : '0deg' }] }]}>
139
+ <NetworkIcons_1.ChevronIcon color="#FFFFFF" size={12}/>
140
+ </react_native_1.View>
141
+ <react_native_1.Text style={styles.storeTitle}>🏪 Redux Store</react_native_1.Text>
142
+ <react_native_1.View style={styles.badge}>
143
+ <react_native_1.Text style={styles.badgeText}>{reducers.length} Reducers</react_native_1.Text>
144
+ </react_native_1.View>
145
+ </react_native_1.Pressable>
146
+
147
+ {storeExpanded && (<react_native_1.View style={styles.storeChildren}>
148
+ {reducers.map((reducerKey, index) => {
149
+ const isLastReducer = index === reducers.length - 1;
150
+ const isExpanded = !!reducerExpanded[reducerKey];
151
+ const sliceData = state[reducerKey];
152
+ const lastAction = lastActionMap[reducerKey];
153
+ return (<react_native_1.View key={reducerKey} style={styles.reducerContainer}>
154
+ {/* Visual Branch Line for Reducer */}
155
+ <react_native_1.View style={[styles.reducerVerticalLine, isLastReducer && { bottom: '50%' }]}/>
156
+
157
+ {/* Reducer Header */}
158
+ <react_native_1.Pressable onPress={() => toggleReducer(reducerKey)} style={styles.reducerHeader}>
159
+ <react_native_1.View style={styles.reducerHorizontalLine}/>
160
+ <react_native_1.View style={[styles.chevronWrap, { transform: [{ rotate: isExpanded ? '90deg' : '0deg' }] }]}>
161
+ <NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.purple} size={10}/>
162
+ </react_native_1.View>
163
+ <react_native_1.View style={styles.iconWrap}>
164
+ <FolderIcon color={AppColors_1.AppColors.purple} size={11}/>
165
+ </react_native_1.View>
166
+ <react_native_1.Text style={styles.reducerText}>{reducerKey}</react_native_1.Text>
167
+ </react_native_1.Pressable>
168
+
169
+ {isExpanded && (<react_native_1.View style={styles.reducerChildren}>
170
+ {/* Vertical line connecting children */}
171
+ <react_native_1.View style={styles.childrenVerticalLine}/>
172
+
173
+ {/* Node 1: Last Action */}
174
+ <react_native_1.View style={styles.childItem}>
175
+ <react_native_1.View style={styles.childHorizontalLine}/>
176
+ <react_native_1.View style={[styles.iconWrap, { backgroundColor: '#FDF2F8' }]}>
177
+ <BoltIcon color="#DB2777" size={11}/>
178
+ </react_native_1.View>
179
+ <react_native_1.View style={{ flex: 1 }}>
180
+ <react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', gap: 6 }}>
181
+ <react_native_1.Text style={styles.childLabel}>Last Action:</react_native_1.Text>
182
+ {lastAction ? (<react_native_1.View style={styles.actionTypeBadge}>
183
+ <react_native_1.Text style={styles.actionTypeText}>{lastAction.type}</react_native_1.Text>
184
+ </react_native_1.View>) : (<react_native_1.Text style={styles.noActionText}>None dispatched</react_native_1.Text>)}
185
+ </react_native_1.View>
186
+ {lastAction && (<react_native_1.Text style={styles.timestampText}>Dispatched: {lastAction.timestamp}</react_native_1.Text>)}
187
+ {lastAction && lastAction.payload !== null && (<react_native_1.View style={{ marginTop: 6 }}>
188
+ <ReduxValueNode name="payload" value={lastAction.payload} level={0} search={search}/>
189
+ </react_native_1.View>)}
190
+ </react_native_1.View>
191
+ </react_native_1.View>
192
+
193
+ {/* Node 2: State Data */}
194
+ <react_native_1.View style={styles.childItem}>
195
+ <react_native_1.View style={[styles.childHorizontalLine, { bottom: '50%' }]}/>
196
+ <react_native_1.View style={[styles.iconWrap, { backgroundColor: '#ECFDF5' }]}>
197
+ <DatabaseIcon color="#059669" size={11}/>
198
+ </react_native_1.View>
199
+ <react_native_1.View style={{ flex: 1 }}>
200
+ <react_native_1.Text style={styles.childLabel}>State Slice Data</react_native_1.Text>
201
+ <react_native_1.View style={{ marginTop: 6 }}>
202
+ <ReduxValueNode name="state" value={sliceData} level={0} search={search}/>
203
+ </react_native_1.View>
204
+ </react_native_1.View>
205
+ </react_native_1.View>
206
+ </react_native_1.View>)}
207
+ </react_native_1.View>);
208
+ })}
209
+ </react_native_1.View>)}
210
+ </react_native_1.View>);
211
+ };
212
+ exports.ReduxTreeView = ReduxTreeView;
213
+ const ReduxActionTimeline = ({ history, onClear, search, }) => {
214
+ const [expandedActionId, setExpandedActionId] = (0, react_1.useState)(null);
215
+ const toggleExpand = (id) => {
216
+ setExpandedActionId(prev => (prev === id ? null : id));
217
+ };
218
+ const filteredHistory = history.filter(action => {
219
+ if (!search)
220
+ return true;
221
+ const s = search.toLowerCase();
222
+ if (action.type.toLowerCase().includes(s))
223
+ return true;
224
+ if (action.affectedSlices.some(slice => slice.toLowerCase().includes(s)))
225
+ return true;
226
+ if (action.payload && typeof action.payload === 'object') {
227
+ return JSON.stringify(action.payload).toLowerCase().includes(s);
228
+ }
229
+ return false;
230
+ });
231
+ return (<react_native_1.View style={timelineStyles.container}>
232
+ <react_native_1.View style={timelineStyles.headerRow}>
233
+ <react_native_1.Text style={timelineStyles.headerTitle}>⚡ Dispatched Actions ({filteredHistory.length})</react_native_1.Text>
234
+ {history.length > 0 && (<react_native_1.Pressable onPress={onClear} style={timelineStyles.clearBtn}>
235
+ <react_native_1.Text style={timelineStyles.clearBtnText}>Clear Log</react_native_1.Text>
236
+ </react_native_1.Pressable>)}
237
+ </react_native_1.View>
238
+
239
+ {filteredHistory.length === 0 ? (<react_native_1.View style={timelineStyles.emptyContainer}>
240
+ <react_native_1.Text style={timelineStyles.emptyText}>
241
+ {history.length === 0
242
+ ? 'No actions dispatched yet.\nDispatch actions in your application to see the timeline.'
243
+ : 'No matching actions found.'}
244
+ </react_native_1.Text>
245
+ </react_native_1.View>) : (<react_native_1.View style={timelineStyles.listContainer}>
246
+ {filteredHistory.map((item, index) => {
247
+ const isLast = index === filteredHistory.length - 1;
248
+ const isExpanded = expandedActionId === item.id;
249
+ return (<react_native_1.View key={item.id} style={timelineStyles.timelineItem}>
250
+ {/* Visual Line */}
251
+ <react_native_1.View style={[timelineStyles.verticalLine, isLast && { bottom: '50%' }]}/>
252
+ <react_native_1.View style={timelineStyles.circleIndicator}>
253
+ <react_native_1.View style={timelineStyles.circleInner}/>
254
+ </react_native_1.View>
255
+
256
+ {/* Card */}
257
+ <react_native_1.Pressable onPress={() => toggleExpand(item.id)} style={[
258
+ timelineStyles.card,
259
+ isExpanded && { borderColor: AppColors_1.AppColors.purple, backgroundColor: AppColors_1.AppColors.purpleShade50 },
260
+ ]}>
261
+ <react_native_1.View style={timelineStyles.cardHeader}>
262
+ <react_native_1.View style={timelineStyles.typeBadge}>
263
+ <react_native_1.Text style={timelineStyles.typeText}>{item.type}</react_native_1.Text>
264
+ </react_native_1.View>
265
+ <react_native_1.Text style={timelineStyles.timestamp}>{item.timestamp}</react_native_1.Text>
266
+ </react_native_1.View>
267
+
268
+ {item.affectedSlices.length > 0 && (<react_native_1.View style={timelineStyles.slicesRow}>
269
+ <react_native_1.Text style={timelineStyles.slicesLabel}>Affected:</react_native_1.Text>
270
+ {item.affectedSlices.map(slice => (<react_native_1.View key={slice} style={timelineStyles.slicePill}>
271
+ <react_native_1.Text style={timelineStyles.sliceText}>{slice}</react_native_1.Text>
272
+ </react_native_1.View>))}
273
+ </react_native_1.View>)}
274
+
275
+ {isExpanded && (<react_native_1.View style={timelineStyles.payloadContainer}>
276
+ <react_native_1.Text style={timelineStyles.payloadTitle}>Payload</react_native_1.Text>
277
+ {item.payload !== null && typeof item.payload === 'object' ? (<ReduxValueNode name="action.payload" value={item.payload} level={0} search={search}/>) : (<react_native_1.Text style={timelineStyles.primitivePayload}>
278
+ {item.payload === null ? 'null' : String(item.payload)}
279
+ </react_native_1.Text>)}
280
+ </react_native_1.View>)}
281
+ </react_native_1.Pressable>
282
+ </react_native_1.View>);
283
+ })}
284
+ </react_native_1.View>)}
285
+ </react_native_1.View>);
286
+ };
287
+ exports.ReduxActionTimeline = ReduxActionTimeline;
288
+ const reduxValueStyles = react_native_1.StyleSheet.create({
289
+ treeNodeBlock: {
290
+ marginTop: 4,
291
+ },
292
+ treeRow: {
293
+ flexDirection: 'row',
294
+ alignItems: 'center',
295
+ paddingVertical: 3,
296
+ gap: 4,
297
+ position: 'relative',
298
+ },
299
+ treeLeafConnector: {
300
+ position: 'absolute',
301
+ left: -12,
302
+ top: '50%',
303
+ width: 8,
304
+ height: 1,
305
+ borderBottomWidth: 1,
306
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
307
+ opacity: 0.5,
308
+ },
309
+ treeChildrenContainer: {
310
+ paddingLeft: 14,
311
+ borderLeftWidth: 1,
312
+ borderLeftColor: AppColors_1.AppColors.dividerColor,
313
+ marginLeft: 6,
314
+ },
315
+ chevronWrap: {
316
+ width: 10,
317
+ height: 10,
318
+ alignItems: 'center',
319
+ justifyContent: 'center',
320
+ },
321
+ keyText: {
322
+ fontFamily: AppFonts_1.AppFonts.interMedium,
323
+ fontSize: 11.5,
324
+ color: AppColors_1.AppColors.grayTextStrong,
325
+ },
326
+ colonText: {
327
+ color: AppColors_1.AppColors.grayTextWeak,
328
+ },
329
+ valText: {
330
+ fontFamily: AppFonts_1.AppFonts.interRegular,
331
+ fontSize: 11.5,
332
+ },
333
+ summaryText: {
334
+ fontFamily: AppFonts_1.AppFonts.interRegular,
335
+ fontSize: 11,
336
+ color: AppColors_1.AppColors.grayTextWeak,
337
+ },
338
+ });
339
+ const timelineStyles = react_native_1.StyleSheet.create({
340
+ container: {
341
+ flex: 1,
342
+ },
343
+ headerRow: {
344
+ flexDirection: 'row',
345
+ alignItems: 'center',
346
+ justifyContent: 'space-between',
347
+ marginBottom: 12,
348
+ },
349
+ headerTitle: {
350
+ fontFamily: AppFonts_1.AppFonts.interBold,
351
+ fontSize: 14,
352
+ color: AppColors_1.AppColors.primaryBlack,
353
+ },
354
+ clearBtn: {
355
+ backgroundColor: 'rgba(239, 68, 68, 0.08)',
356
+ borderColor: 'rgba(239, 68, 68, 0.2)',
357
+ borderWidth: 1,
358
+ paddingHorizontal: 8,
359
+ paddingVertical: 4,
360
+ borderRadius: 6,
361
+ },
362
+ clearBtnText: {
363
+ fontFamily: AppFonts_1.AppFonts.interBold,
364
+ fontSize: 10,
365
+ color: '#EF4444',
366
+ },
367
+ emptyContainer: {
368
+ paddingVertical: 32,
369
+ alignItems: 'center',
370
+ justifyContent: 'center',
371
+ },
372
+ emptyText: {
373
+ fontFamily: AppFonts_1.AppFonts.interRegular,
374
+ fontSize: 12,
375
+ color: AppColors_1.AppColors.grayTextWeak,
376
+ textAlign: 'center',
377
+ lineHeight: 18,
378
+ },
379
+ listContainer: {
380
+ paddingLeft: 12,
381
+ },
382
+ timelineItem: {
383
+ position: 'relative',
384
+ paddingLeft: 20,
385
+ marginBottom: 12,
386
+ },
387
+ verticalLine: {
388
+ position: 'absolute',
389
+ left: 4,
390
+ top: 0,
391
+ bottom: -12,
392
+ width: 1,
393
+ backgroundColor: AppColors_1.AppColors.dividerColor,
394
+ },
395
+ circleIndicator: {
396
+ position: 'absolute',
397
+ left: 0,
398
+ top: 10,
399
+ width: 9,
400
+ height: 9,
401
+ borderRadius: 4.5,
402
+ backgroundColor: AppColors_1.AppColors.purpleShade50,
403
+ borderWidth: 1,
404
+ borderColor: AppColors_1.AppColors.purple,
405
+ alignItems: 'center',
406
+ justifyContent: 'center',
407
+ },
408
+ circleInner: {
409
+ width: 3,
410
+ height: 3,
411
+ borderRadius: 1.5,
412
+ backgroundColor: AppColors_1.AppColors.purple,
413
+ },
414
+ card: {
415
+ backgroundColor: AppColors_1.AppColors.primaryLight,
416
+ borderWidth: 1,
417
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
418
+ borderRadius: 8,
419
+ padding: 10,
420
+ },
421
+ cardHeader: {
422
+ flexDirection: 'row',
423
+ alignItems: 'center',
424
+ justifyContent: 'space-between',
425
+ gap: 12,
426
+ },
427
+ typeBadge: {
428
+ backgroundColor: 'rgba(104,75,155,0.08)',
429
+ borderColor: 'rgba(104,75,155,0.18)',
430
+ borderWidth: 1,
431
+ borderRadius: 6,
432
+ paddingHorizontal: 6,
433
+ paddingVertical: 2.5,
434
+ flexShrink: 1,
435
+ },
436
+ typeText: {
437
+ fontFamily: AppFonts_1.AppFonts.interBold,
438
+ fontSize: 11,
439
+ color: AppColors_1.AppColors.purple,
440
+ },
441
+ timestamp: {
442
+ fontFamily: AppFonts_1.AppFonts.interRegular,
443
+ fontSize: 10,
444
+ color: AppColors_1.AppColors.grayTextWeak,
445
+ },
446
+ slicesRow: {
447
+ flexDirection: 'row',
448
+ alignItems: 'center',
449
+ flexWrap: 'wrap',
450
+ gap: 4,
451
+ marginTop: 6,
452
+ },
453
+ slicesLabel: {
454
+ fontFamily: AppFonts_1.AppFonts.interMedium,
455
+ fontSize: 10,
456
+ color: AppColors_1.AppColors.grayTextWeak,
457
+ marginRight: 2,
458
+ },
459
+ slicePill: {
460
+ backgroundColor: AppColors_1.AppColors.grayBackground,
461
+ borderColor: AppColors_1.AppColors.dividerColor,
462
+ borderWidth: 1,
463
+ borderRadius: 4,
464
+ paddingHorizontal: 4,
465
+ paddingVertical: 1,
466
+ },
467
+ sliceText: {
468
+ fontFamily: AppFonts_1.AppFonts.interMedium,
469
+ fontSize: 9,
470
+ color: AppColors_1.AppColors.grayText,
471
+ },
472
+ payloadContainer: {
473
+ marginTop: 10,
474
+ borderTopWidth: 1,
475
+ borderTopColor: AppColors_1.AppColors.dividerColor,
476
+ paddingTop: 8,
477
+ },
478
+ payloadTitle: {
479
+ fontFamily: AppFonts_1.AppFonts.interBold,
480
+ fontSize: 10,
481
+ color: AppColors_1.AppColors.grayTextWeak,
482
+ textTransform: 'uppercase',
483
+ marginBottom: 4,
484
+ },
485
+ primitivePayload: {
486
+ fontFamily: AppFonts_1.AppFonts.interRegular,
487
+ fontSize: 11,
488
+ color: AppColors_1.AppColors.grayTextStrong,
489
+ },
490
+ });
491
+ const styles = react_native_1.StyleSheet.create({
492
+ container: {
493
+ flex: 1,
494
+ },
495
+ storeHeader: {
496
+ flexDirection: 'row',
497
+ alignItems: 'center',
498
+ backgroundColor: AppColors_1.AppColors.purple,
499
+ borderRadius: 8,
500
+ paddingVertical: 10,
501
+ paddingHorizontal: 12,
502
+ gap: 8,
503
+ },
504
+ chevronWrap: {
505
+ width: 12,
506
+ height: 12,
507
+ alignItems: 'center',
508
+ justifyContent: 'center',
509
+ },
510
+ storeTitle: {
511
+ fontFamily: AppFonts_1.AppFonts.interBold,
512
+ fontSize: 14,
513
+ color: '#FFFFFF',
514
+ },
515
+ badge: {
516
+ backgroundColor: 'rgba(255,255,255,0.2)',
517
+ paddingHorizontal: 8,
518
+ paddingVertical: 2,
519
+ borderRadius: 12,
520
+ marginLeft: 'auto',
521
+ },
522
+ badgeText: {
523
+ fontFamily: AppFonts_1.AppFonts.interBold,
524
+ fontSize: 10,
525
+ color: '#FFFFFF',
526
+ },
527
+ storeChildren: {
528
+ paddingLeft: 12,
529
+ marginTop: 4,
530
+ },
531
+ reducerContainer: {
532
+ position: 'relative',
533
+ paddingLeft: 16,
534
+ paddingVertical: 4,
535
+ },
536
+ reducerVerticalLine: {
537
+ position: 'absolute',
538
+ left: 0,
539
+ top: 0,
540
+ bottom: 0,
541
+ width: 1,
542
+ backgroundColor: AppColors_1.AppColors.dividerColor,
543
+ },
544
+ reducerHorizontalLine: {
545
+ position: 'absolute',
546
+ left: -16,
547
+ top: '50%',
548
+ width: 16,
549
+ height: 1,
550
+ backgroundColor: AppColors_1.AppColors.dividerColor,
551
+ },
552
+ reducerHeader: {
553
+ flexDirection: 'row',
554
+ alignItems: 'center',
555
+ paddingVertical: 6,
556
+ gap: 6,
557
+ },
558
+ iconWrap: {
559
+ width: 18,
560
+ height: 18,
561
+ borderRadius: 4,
562
+ backgroundColor: AppColors_1.AppColors.purpleShade50,
563
+ alignItems: 'center',
564
+ justifyContent: 'center',
565
+ },
566
+ reducerText: {
567
+ fontFamily: AppFonts_1.AppFonts.interBold,
568
+ fontSize: 13,
569
+ color: AppColors_1.AppColors.primaryBlack,
570
+ },
571
+ reducerChildren: {
572
+ paddingLeft: 20,
573
+ position: 'relative',
574
+ marginTop: 4,
575
+ gap: 10,
576
+ },
577
+ childrenVerticalLine: {
578
+ position: 'absolute',
579
+ left: 8,
580
+ top: 0,
581
+ bottom: 16,
582
+ width: 1,
583
+ backgroundColor: AppColors_1.AppColors.dividerColor,
584
+ },
585
+ childItem: {
586
+ flexDirection: 'row',
587
+ alignItems: 'flex-start',
588
+ gap: 8,
589
+ position: 'relative',
590
+ paddingLeft: 12,
591
+ },
592
+ childHorizontalLine: {
593
+ position: 'absolute',
594
+ left: -12,
595
+ top: 10,
596
+ width: 12,
597
+ height: 1,
598
+ backgroundColor: AppColors_1.AppColors.dividerColor,
599
+ },
600
+ childLabel: {
601
+ fontFamily: AppFonts_1.AppFonts.interBold,
602
+ fontSize: 11.5,
603
+ color: AppColors_1.AppColors.grayText,
604
+ marginTop: 2,
605
+ },
606
+ actionTypeBadge: {
607
+ backgroundColor: '#FCE7F3',
608
+ borderColor: '#FBCFE8',
609
+ borderWidth: 1,
610
+ borderRadius: 6,
611
+ paddingHorizontal: 6,
612
+ paddingVertical: 2,
613
+ },
614
+ actionTypeText: {
615
+ fontFamily: AppFonts_1.AppFonts.interBold,
616
+ fontSize: 10.5,
617
+ color: '#BE185D',
618
+ },
619
+ noActionText: {
620
+ fontFamily: AppFonts_1.AppFonts.interRegular,
621
+ fontSize: 11,
622
+ color: AppColors_1.AppColors.grayTextWeak,
623
+ },
624
+ timestampText: {
625
+ fontFamily: AppFonts_1.AppFonts.interRegular,
626
+ fontSize: 9.5,
627
+ color: AppColors_1.AppColors.grayTextWeak,
628
+ marginTop: 2,
629
+ },
630
+ });
@@ -37,8 +37,22 @@ const react_1 = __importStar(require("react"));
37
37
  const react_native_1 = require("react-native");
38
38
  const TouchableScale = ({ onPress, style, children, hitSlop, disabled, }) => {
39
39
  const scale = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
40
+ const flattenedStyle = react_native_1.StyleSheet.flatten(style) || {};
41
+ const layoutStyle = {
42
+ flex: flattenedStyle.flex,
43
+ flexDirection: flattenedStyle.flexDirection,
44
+ alignItems: flattenedStyle.alignItems,
45
+ justifyContent: flattenedStyle.justifyContent,
46
+ flexWrap: flattenedStyle.flexWrap,
47
+ alignSelf: flattenedStyle.alignSelf,
48
+ flexGrow: flattenedStyle.flexGrow,
49
+ flexShrink: flattenedStyle.flexShrink,
50
+ gap: flattenedStyle.gap,
51
+ };
40
52
  return (<react_native_1.Pressable disabled={disabled} style={style} onPressIn={() => react_native_1.Animated.spring(scale, { toValue: 0.94, useNativeDriver: true }).start()} onPressOut={() => react_native_1.Animated.spring(scale, { toValue: 1, useNativeDriver: true }).start()} onPress={onPress} hitSlop={hitSlop}>
41
- <react_native_1.Animated.View style={{ transform: [{ scale }] }}>{children}</react_native_1.Animated.View>
53
+ <react_native_1.Animated.View style={[{ transform: [{ scale }] }, layoutStyle]}>
54
+ {children}
55
+ </react_native_1.Animated.View>
42
56
  </react_native_1.Pressable>);
43
57
  };
44
58
  exports.default = TouchableScale;
@@ -45,8 +45,8 @@ const NetworkIcons_1 = require("./NetworkIcons");
45
45
  // Stylesheet
46
46
  const AppColors_1 = require("../styles/AppColors");
47
47
  const styles_1 = __importDefault(require("../styles"));
48
- const TreeNode = react_1.default.memo(function TreeNode({ data, name, level = 0, search, forceOpen, }) {
49
- const [localOpen, setLocalOpen] = (0, react_1.useState)(level < 1);
48
+ const TreeNode = react_1.default.memo(function TreeNode({ data, name, level = 0, search, forceOpen, defaultExpandDepth, }) {
49
+ const [localOpen, setLocalOpen] = (0, react_1.useState)(level < (defaultExpandDepth ?? 1));
50
50
  const open = forceOpen !== undefined ? forceOpen : localOpen;
51
51
  const isObject = typeof data === 'object' && data !== null;
52
52
  const isArray = Array.isArray(data);
@@ -132,7 +132,7 @@ const TreeNode = react_1.default.memo(function TreeNode({ data, name, level = 0,
132
132
  </react_native_1.Pressable>
133
133
 
134
134
  {open &&
135
- entries.map(([k, v]) => (<TreeNode key={String(k)} name={k} data={v} level={level + 1} search={search} forceOpen={forceOpen}/>))}
135
+ entries.map(([k, v]) => (<TreeNode key={String(k)} name={k} data={v} level={level + 1} search={search} forceOpen={forceOpen} defaultExpandDepth={defaultExpandDepth}/>))}
136
136
 
137
137
  {open && <react_native_1.Text style={styles_1.default.codeSyntax}>{isArray ? ']' : '}'}</react_native_1.Text>}
138
138
  </react_native_1.View>);