react-native-prod-debugger 1.0.0
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/LICENSE +21 -0
- package/README.md +350 -0
- package/lib/commonjs/core/DebugBubble.js +139 -0
- package/lib/commonjs/core/DebugBubble.js.map +1 -0
- package/lib/commonjs/core/DebugOverlay.js +184 -0
- package/lib/commonjs/core/DebugOverlay.js.map +1 -0
- package/lib/commonjs/core/DebuggerProvider.js +174 -0
- package/lib/commonjs/core/DebuggerProvider.js.map +1 -0
- package/lib/commonjs/core/GestureDetector.js +83 -0
- package/lib/commonjs/core/GestureDetector.js.map +1 -0
- package/lib/commonjs/core/PluginRegistry.js +124 -0
- package/lib/commonjs/core/PluginRegistry.js.map +1 -0
- package/lib/commonjs/core/theme.js +50 -0
- package/lib/commonjs/core/theme.js.map +1 -0
- package/lib/commonjs/core/types.js +6 -0
- package/lib/commonjs/core/types.js.map +1 -0
- package/lib/commonjs/core/useDebugger.js +27 -0
- package/lib/commonjs/core/useDebugger.js.map +1 -0
- package/lib/commonjs/core/utils.js +239 -0
- package/lib/commonjs/core/utils.js.map +1 -0
- package/lib/commonjs/index.js +132 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/plugins/console/ConsoleInterceptor.js +103 -0
- package/lib/commonjs/plugins/console/ConsoleInterceptor.js.map +1 -0
- package/lib/commonjs/plugins/console/ConsoleViewerPlugin.js +269 -0
- package/lib/commonjs/plugins/console/ConsoleViewerPlugin.js.map +1 -0
- package/lib/commonjs/plugins/crashReporter/CrashReporterPlugin.js +363 -0
- package/lib/commonjs/plugins/crashReporter/CrashReporterPlugin.js.map +1 -0
- package/lib/commonjs/plugins/customActions/CustomActionsPlugin.js +218 -0
- package/lib/commonjs/plugins/customActions/CustomActionsPlugin.js.map +1 -0
- package/lib/commonjs/plugins/customActions/actionStore.js +46 -0
- package/lib/commonjs/plugins/customActions/actionStore.js.map +1 -0
- package/lib/commonjs/plugins/deepLinkTester/DeepLinkTesterPlugin.js +268 -0
- package/lib/commonjs/plugins/deepLinkTester/DeepLinkTesterPlugin.js.map +1 -0
- package/lib/commonjs/plugins/deviceInfo/DeviceInfoPlugin.js +184 -0
- package/lib/commonjs/plugins/deviceInfo/DeviceInfoPlugin.js.map +1 -0
- package/lib/commonjs/plugins/featureFlags/FeatureFlagsPlugin.js +381 -0
- package/lib/commonjs/plugins/featureFlags/FeatureFlagsPlugin.js.map +1 -0
- package/lib/commonjs/plugins/featureFlags/flagStore.js +125 -0
- package/lib/commonjs/plugins/featureFlags/flagStore.js.map +1 -0
- package/lib/commonjs/plugins/navigationInspector/NavigationInspectorPlugin.js +250 -0
- package/lib/commonjs/plugins/navigationInspector/NavigationInspectorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/navigationInspector/navigationStore.js +65 -0
- package/lib/commonjs/plugins/navigationInspector/navigationStore.js.map +1 -0
- package/lib/commonjs/plugins/network/NetworkInspectorPlugin.js +709 -0
- package/lib/commonjs/plugins/network/NetworkInspectorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/network/NetworkInterceptor.js +305 -0
- package/lib/commonjs/plugins/network/NetworkInterceptor.js.map +1 -0
- package/lib/commonjs/plugins/performance/PerformanceMonitorPlugin.js +261 -0
- package/lib/commonjs/plugins/performance/PerformanceMonitorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/remoteConfig/RemoteConfigPlugin.js +265 -0
- package/lib/commonjs/plugins/remoteConfig/RemoteConfigPlugin.js.map +1 -0
- package/lib/commonjs/plugins/remoteConfig/remoteConfigStore.js +50 -0
- package/lib/commonjs/plugins/remoteConfig/remoteConfigStore.js.map +1 -0
- package/lib/commonjs/plugins/stateInspector/StateInspectorPlugin.js +378 -0
- package/lib/commonjs/plugins/stateInspector/StateInspectorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/stateInspector/stateAdapterRegistry.js +62 -0
- package/lib/commonjs/plugins/stateInspector/stateAdapterRegistry.js.map +1 -0
- package/lib/commonjs/plugins/storageBrowser/StorageBrowserPlugin.js +496 -0
- package/lib/commonjs/plugins/storageBrowser/StorageBrowserPlugin.js.map +1 -0
- package/lib/commonjs/plugins/storageBrowser/storageAdapterRegistry.js +44 -0
- package/lib/commonjs/plugins/storageBrowser/storageAdapterRegistry.js.map +1 -0
- package/lib/commonjs/plugins/timeline/TimelinePlugin.js +294 -0
- package/lib/commonjs/plugins/timeline/TimelinePlugin.js.map +1 -0
- package/lib/commonjs/plugins/timeline/timelineStore.js +61 -0
- package/lib/commonjs/plugins/timeline/timelineStore.js.map +1 -0
- package/lib/module/core/DebugBubble.js +131 -0
- package/lib/module/core/DebugBubble.js.map +1 -0
- package/lib/module/core/DebugOverlay.js +176 -0
- package/lib/module/core/DebugOverlay.js.map +1 -0
- package/lib/module/core/DebuggerProvider.js +167 -0
- package/lib/module/core/DebuggerProvider.js.map +1 -0
- package/lib/module/core/GestureDetector.js +75 -0
- package/lib/module/core/GestureDetector.js.map +1 -0
- package/lib/module/core/PluginRegistry.js +116 -0
- package/lib/module/core/PluginRegistry.js.map +1 -0
- package/lib/module/core/theme.js +43 -0
- package/lib/module/core/theme.js.map +1 -0
- package/lib/module/core/types.js +2 -0
- package/lib/module/core/types.js.map +1 -0
- package/lib/module/core/useDebugger.js +21 -0
- package/lib/module/core/useDebugger.js.map +1 -0
- package/lib/module/core/utils.js +219 -0
- package/lib/module/core/utils.js.map +1 -0
- package/lib/module/index.js +44 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/plugins/console/ConsoleInterceptor.js +97 -0
- package/lib/module/plugins/console/ConsoleInterceptor.js.map +1 -0
- package/lib/module/plugins/console/ConsoleViewerPlugin.js +262 -0
- package/lib/module/plugins/console/ConsoleViewerPlugin.js.map +1 -0
- package/lib/module/plugins/crashReporter/CrashReporterPlugin.js +357 -0
- package/lib/module/plugins/crashReporter/CrashReporterPlugin.js.map +1 -0
- package/lib/module/plugins/customActions/CustomActionsPlugin.js +211 -0
- package/lib/module/plugins/customActions/CustomActionsPlugin.js.map +1 -0
- package/lib/module/plugins/customActions/actionStore.js +38 -0
- package/lib/module/plugins/customActions/actionStore.js.map +1 -0
- package/lib/module/plugins/deepLinkTester/DeepLinkTesterPlugin.js +261 -0
- package/lib/module/plugins/deepLinkTester/DeepLinkTesterPlugin.js.map +1 -0
- package/lib/module/plugins/deviceInfo/DeviceInfoPlugin.js +177 -0
- package/lib/module/plugins/deviceInfo/DeviceInfoPlugin.js.map +1 -0
- package/lib/module/plugins/featureFlags/FeatureFlagsPlugin.js +374 -0
- package/lib/module/plugins/featureFlags/FeatureFlagsPlugin.js.map +1 -0
- package/lib/module/plugins/featureFlags/flagStore.js +117 -0
- package/lib/module/plugins/featureFlags/flagStore.js.map +1 -0
- package/lib/module/plugins/navigationInspector/NavigationInspectorPlugin.js +243 -0
- package/lib/module/plugins/navigationInspector/NavigationInspectorPlugin.js.map +1 -0
- package/lib/module/plugins/navigationInspector/navigationStore.js +58 -0
- package/lib/module/plugins/navigationInspector/navigationStore.js.map +1 -0
- package/lib/module/plugins/network/NetworkInspectorPlugin.js +703 -0
- package/lib/module/plugins/network/NetworkInspectorPlugin.js.map +1 -0
- package/lib/module/plugins/network/NetworkInterceptor.js +299 -0
- package/lib/module/plugins/network/NetworkInterceptor.js.map +1 -0
- package/lib/module/plugins/performance/PerformanceMonitorPlugin.js +254 -0
- package/lib/module/plugins/performance/PerformanceMonitorPlugin.js.map +1 -0
- package/lib/module/plugins/remoteConfig/RemoteConfigPlugin.js +258 -0
- package/lib/module/plugins/remoteConfig/RemoteConfigPlugin.js.map +1 -0
- package/lib/module/plugins/remoteConfig/remoteConfigStore.js +43 -0
- package/lib/module/plugins/remoteConfig/remoteConfigStore.js.map +1 -0
- package/lib/module/plugins/stateInspector/StateInspectorPlugin.js +372 -0
- package/lib/module/plugins/stateInspector/StateInspectorPlugin.js.map +1 -0
- package/lib/module/plugins/stateInspector/stateAdapterRegistry.js +54 -0
- package/lib/module/plugins/stateInspector/stateAdapterRegistry.js.map +1 -0
- package/lib/module/plugins/storageBrowser/StorageBrowserPlugin.js +489 -0
- package/lib/module/plugins/storageBrowser/StorageBrowserPlugin.js.map +1 -0
- package/lib/module/plugins/storageBrowser/storageAdapterRegistry.js +36 -0
- package/lib/module/plugins/storageBrowser/storageAdapterRegistry.js.map +1 -0
- package/lib/module/plugins/timeline/TimelinePlugin.js +287 -0
- package/lib/module/plugins/timeline/TimelinePlugin.js.map +1 -0
- package/lib/module/plugins/timeline/timelineStore.js +54 -0
- package/lib/module/plugins/timeline/timelineStore.js.map +1 -0
- package/lib/typescript/core/DebugBubble.d.ts +22 -0
- package/lib/typescript/core/DebugBubble.d.ts.map +1 -0
- package/lib/typescript/core/DebugOverlay.d.ts +18 -0
- package/lib/typescript/core/DebugOverlay.d.ts.map +1 -0
- package/lib/typescript/core/DebuggerProvider.d.ts +25 -0
- package/lib/typescript/core/DebuggerProvider.d.ts.map +1 -0
- package/lib/typescript/core/GestureDetector.d.ts +20 -0
- package/lib/typescript/core/GestureDetector.d.ts.map +1 -0
- package/lib/typescript/core/PluginRegistry.d.ts +41 -0
- package/lib/typescript/core/PluginRegistry.d.ts.map +1 -0
- package/lib/typescript/core/theme.d.ts +11 -0
- package/lib/typescript/core/theme.d.ts.map +1 -0
- package/lib/typescript/core/types.d.ts +269 -0
- package/lib/typescript/core/types.d.ts.map +1 -0
- package/lib/typescript/core/useDebugger.d.ts +14 -0
- package/lib/typescript/core/useDebugger.d.ts.map +1 -0
- package/lib/typescript/core/utils.d.ts +46 -0
- package/lib/typescript/core/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +23 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/plugins/console/ConsoleInterceptor.d.ts +32 -0
- package/lib/typescript/plugins/console/ConsoleInterceptor.d.ts.map +1 -0
- package/lib/typescript/plugins/console/ConsoleViewerPlugin.d.ts +3 -0
- package/lib/typescript/plugins/console/ConsoleViewerPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/crashReporter/CrashReporterPlugin.d.ts +3 -0
- package/lib/typescript/plugins/crashReporter/CrashReporterPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/customActions/CustomActionsPlugin.d.ts +3 -0
- package/lib/typescript/plugins/customActions/CustomActionsPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/customActions/actionStore.d.ts +16 -0
- package/lib/typescript/plugins/customActions/actionStore.d.ts.map +1 -0
- package/lib/typescript/plugins/deepLinkTester/DeepLinkTesterPlugin.d.ts +3 -0
- package/lib/typescript/plugins/deepLinkTester/DeepLinkTesterPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/deviceInfo/DeviceInfoPlugin.d.ts +3 -0
- package/lib/typescript/plugins/deviceInfo/DeviceInfoPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/featureFlags/FeatureFlagsPlugin.d.ts +3 -0
- package/lib/typescript/plugins/featureFlags/FeatureFlagsPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/featureFlags/flagStore.d.ts +45 -0
- package/lib/typescript/plugins/featureFlags/flagStore.d.ts.map +1 -0
- package/lib/typescript/plugins/navigationInspector/NavigationInspectorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/navigationInspector/NavigationInspectorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/navigationInspector/navigationStore.d.ts +30 -0
- package/lib/typescript/plugins/navigationInspector/navigationStore.d.ts.map +1 -0
- package/lib/typescript/plugins/network/NetworkInspectorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/network/NetworkInspectorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/network/NetworkInterceptor.d.ts +42 -0
- package/lib/typescript/plugins/network/NetworkInterceptor.d.ts.map +1 -0
- package/lib/typescript/plugins/performance/PerformanceMonitorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/performance/PerformanceMonitorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/remoteConfig/RemoteConfigPlugin.d.ts +3 -0
- package/lib/typescript/plugins/remoteConfig/RemoteConfigPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/remoteConfig/remoteConfigStore.d.ts +20 -0
- package/lib/typescript/plugins/remoteConfig/remoteConfigStore.d.ts.map +1 -0
- package/lib/typescript/plugins/stateInspector/StateInspectorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/stateInspector/StateInspectorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/stateInspector/stateAdapterRegistry.d.ts +34 -0
- package/lib/typescript/plugins/stateInspector/stateAdapterRegistry.d.ts.map +1 -0
- package/lib/typescript/plugins/storageBrowser/StorageBrowserPlugin.d.ts +3 -0
- package/lib/typescript/plugins/storageBrowser/StorageBrowserPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/storageBrowser/storageAdapterRegistry.d.ts +16 -0
- package/lib/typescript/plugins/storageBrowser/storageAdapterRegistry.d.ts.map +1 -0
- package/lib/typescript/plugins/timeline/TimelinePlugin.d.ts +3 -0
- package/lib/typescript/plugins/timeline/TimelinePlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/timeline/timelineStore.d.ts +24 -0
- package/lib/typescript/plugins/timeline/timelineStore.d.ts.map +1 -0
- package/package.json +131 -0
- package/src/core/DebugBubble.tsx +149 -0
- package/src/core/DebugOverlay.tsx +211 -0
- package/src/core/DebuggerProvider.tsx +211 -0
- package/src/core/GestureDetector.tsx +95 -0
- package/src/core/PluginRegistry.ts +118 -0
- package/src/core/theme.ts +41 -0
- package/src/core/types.ts +339 -0
- package/src/core/useDebugger.ts +24 -0
- package/src/core/utils.ts +221 -0
- package/src/index.ts +67 -0
- package/src/plugins/console/ConsoleInterceptor.ts +110 -0
- package/src/plugins/console/ConsoleViewerPlugin.tsx +241 -0
- package/src/plugins/crashReporter/CrashReporterPlugin.tsx +316 -0
- package/src/plugins/customActions/CustomActionsPlugin.tsx +199 -0
- package/src/plugins/customActions/actionStore.ts +49 -0
- package/src/plugins/deepLinkTester/DeepLinkTesterPlugin.tsx +213 -0
- package/src/plugins/deviceInfo/DeviceInfoPlugin.tsx +153 -0
- package/src/plugins/featureFlags/FeatureFlagsPlugin.tsx +338 -0
- package/src/plugins/featureFlags/flagStore.ts +118 -0
- package/src/plugins/navigationInspector/NavigationInspectorPlugin.tsx +170 -0
- package/src/plugins/navigationInspector/navigationStore.ts +70 -0
- package/src/plugins/network/NetworkInspectorPlugin.tsx +598 -0
- package/src/plugins/network/NetworkInterceptor.ts +344 -0
- package/src/plugins/performance/PerformanceMonitorPlugin.tsx +194 -0
- package/src/plugins/remoteConfig/RemoteConfigPlugin.tsx +205 -0
- package/src/plugins/remoteConfig/remoteConfigStore.ts +48 -0
- package/src/plugins/stateInspector/StateInspectorPlugin.tsx +342 -0
- package/src/plugins/stateInspector/stateAdapterRegistry.ts +66 -0
- package/src/plugins/storageBrowser/StorageBrowserPlugin.tsx +410 -0
- package/src/plugins/storageBrowser/storageAdapterRegistry.ts +47 -0
- package/src/plugins/timeline/TimelinePlugin.tsx +242 -0
- package/src/plugins/timeline/timelineStore.ts +65 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import { View, Text, FlatList, TouchableOpacity, TextInput, StyleSheet, ActivityIndicator } from 'react-native';
|
|
3
|
+
import { remoteConfigStore } from './remoteConfigStore';
|
|
4
|
+
import { copyToClipboard, safeStringify, formatTimeAgo } from '../../core/utils';
|
|
5
|
+
const RemoteConfigPanel = ({
|
|
6
|
+
theme
|
|
7
|
+
}) => {
|
|
8
|
+
const [values, setValues] = useState([]);
|
|
9
|
+
const [loading, setLoading] = useState(false);
|
|
10
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
11
|
+
const [lastFetch, setLastFetch] = useState(null);
|
|
12
|
+
const [hasProvider, setHasProvider] = useState(false);
|
|
13
|
+
const [error, setError] = useState(null);
|
|
14
|
+
const fetchValues = useCallback(async () => {
|
|
15
|
+
const provider = remoteConfigStore.get();
|
|
16
|
+
if (!provider) return;
|
|
17
|
+
setLoading(true);
|
|
18
|
+
setError(null);
|
|
19
|
+
try {
|
|
20
|
+
const result = await provider.getAll();
|
|
21
|
+
setValues(result);
|
|
22
|
+
if (provider.getLastFetchTime) {
|
|
23
|
+
const time = await provider.getLastFetchTime();
|
|
24
|
+
setLastFetch(time);
|
|
25
|
+
}
|
|
26
|
+
} catch (err) {
|
|
27
|
+
setError(err instanceof Error ? err.message : 'Failed to fetch');
|
|
28
|
+
}
|
|
29
|
+
setLoading(false);
|
|
30
|
+
}, []);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const unsubscribe = remoteConfigStore.subscribe(() => {
|
|
33
|
+
setHasProvider(!!remoteConfigStore.get());
|
|
34
|
+
fetchValues();
|
|
35
|
+
});
|
|
36
|
+
setHasProvider(!!remoteConfigStore.get());
|
|
37
|
+
fetchValues();
|
|
38
|
+
return unsubscribe;
|
|
39
|
+
}, [fetchValues]);
|
|
40
|
+
const filteredValues = searchQuery ? values.filter(v => v.key.toLowerCase().includes(searchQuery.toLowerCase()) || String(v.value).toLowerCase().includes(searchQuery.toLowerCase())) : values;
|
|
41
|
+
if (!hasProvider) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
43
|
+
style: styles.emptyContainer
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
45
|
+
style: styles.emptyIcon
|
|
46
|
+
}, "\u2699\uFE0F"), /*#__PURE__*/React.createElement(Text, {
|
|
47
|
+
style: [styles.emptyTitle, {
|
|
48
|
+
color: theme.text
|
|
49
|
+
}]
|
|
50
|
+
}, "No Config Provider"), /*#__PURE__*/React.createElement(Text, {
|
|
51
|
+
style: [styles.emptyDesc, {
|
|
52
|
+
color: theme.textMuted
|
|
53
|
+
}]
|
|
54
|
+
}, "Register a provider:", '\n\n', /*#__PURE__*/React.createElement(Text, {
|
|
55
|
+
style: {
|
|
56
|
+
fontFamily: 'monospace',
|
|
57
|
+
color: theme.codeText
|
|
58
|
+
}
|
|
59
|
+
}, 'setRemoteConfigProvider({\n name: "Firebase",\n getAll: () => [...],\n})')));
|
|
60
|
+
}
|
|
61
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
62
|
+
style: styles.container
|
|
63
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
64
|
+
style: [styles.header, {
|
|
65
|
+
backgroundColor: theme.surface,
|
|
66
|
+
borderBottomColor: theme.border
|
|
67
|
+
}]
|
|
68
|
+
}, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
|
|
69
|
+
style: [styles.headerTitle, {
|
|
70
|
+
color: theme.text
|
|
71
|
+
}]
|
|
72
|
+
}, remoteConfigStore.get()?.name || 'Remote Config'), lastFetch && /*#__PURE__*/React.createElement(Text, {
|
|
73
|
+
style: [styles.lastFetch, {
|
|
74
|
+
color: theme.textMuted
|
|
75
|
+
}]
|
|
76
|
+
}, "Last fetched: ", formatTimeAgo(lastFetch))), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
77
|
+
onPress: fetchValues,
|
|
78
|
+
activeOpacity: 0.7
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
80
|
+
style: [styles.refreshBtn, {
|
|
81
|
+
color: theme.accent
|
|
82
|
+
}]
|
|
83
|
+
}, loading ? '...' : '↻ Refresh'))), /*#__PURE__*/React.createElement(View, {
|
|
84
|
+
style: [styles.searchContainer, {
|
|
85
|
+
backgroundColor: theme.surface
|
|
86
|
+
}]
|
|
87
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
88
|
+
style: [styles.searchInput, {
|
|
89
|
+
color: theme.text,
|
|
90
|
+
backgroundColor: theme.surfaceAlt,
|
|
91
|
+
borderColor: theme.border
|
|
92
|
+
}],
|
|
93
|
+
placeholder: "Search config...",
|
|
94
|
+
placeholderTextColor: theme.textMuted,
|
|
95
|
+
value: searchQuery,
|
|
96
|
+
onChangeText: setSearchQuery,
|
|
97
|
+
autoCapitalize: "none"
|
|
98
|
+
})), error && /*#__PURE__*/React.createElement(View, {
|
|
99
|
+
style: [styles.errorBanner, {
|
|
100
|
+
backgroundColor: `${theme.error}20`
|
|
101
|
+
}]
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
103
|
+
style: [styles.errorText, {
|
|
104
|
+
color: theme.error
|
|
105
|
+
}]
|
|
106
|
+
}, error)), loading && !values.length ? /*#__PURE__*/React.createElement(View, {
|
|
107
|
+
style: styles.loadingContainer
|
|
108
|
+
}, /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
109
|
+
color: theme.accent
|
|
110
|
+
})) : /*#__PURE__*/React.createElement(FlatList, {
|
|
111
|
+
data: filteredValues,
|
|
112
|
+
keyExtractor: item => item.key,
|
|
113
|
+
renderItem: ({
|
|
114
|
+
item
|
|
115
|
+
}) => /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
116
|
+
style: [styles.configRow, {
|
|
117
|
+
borderBottomColor: theme.border
|
|
118
|
+
}],
|
|
119
|
+
onLongPress: () => copyToClipboard(safeStringify(item.value, 0)),
|
|
120
|
+
activeOpacity: 0.7
|
|
121
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
122
|
+
style: styles.configInfo
|
|
123
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
124
|
+
style: [styles.configKey, {
|
|
125
|
+
color: theme.text
|
|
126
|
+
}]
|
|
127
|
+
}, item.key), /*#__PURE__*/React.createElement(Text, {
|
|
128
|
+
style: [styles.configSource, {
|
|
129
|
+
color: theme.textMuted
|
|
130
|
+
}]
|
|
131
|
+
}, item.source)), /*#__PURE__*/React.createElement(Text, {
|
|
132
|
+
style: [styles.configValue, {
|
|
133
|
+
color: theme.accent
|
|
134
|
+
}],
|
|
135
|
+
numberOfLines: 2
|
|
136
|
+
}, typeof item.value === 'object' ? JSON.stringify(item.value) : String(item.value))),
|
|
137
|
+
ListEmptyComponent: /*#__PURE__*/React.createElement(View, {
|
|
138
|
+
style: styles.emptyListContainer
|
|
139
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
140
|
+
style: [styles.emptyText, {
|
|
141
|
+
color: theme.textMuted
|
|
142
|
+
}]
|
|
143
|
+
}, searchQuery ? 'No matching config' : 'No config values'))
|
|
144
|
+
}));
|
|
145
|
+
};
|
|
146
|
+
const styles = StyleSheet.create({
|
|
147
|
+
container: {
|
|
148
|
+
flex: 1
|
|
149
|
+
},
|
|
150
|
+
emptyContainer: {
|
|
151
|
+
flex: 1,
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
justifyContent: 'center',
|
|
154
|
+
paddingHorizontal: 32
|
|
155
|
+
},
|
|
156
|
+
emptyIcon: {
|
|
157
|
+
fontSize: 48,
|
|
158
|
+
marginBottom: 16
|
|
159
|
+
},
|
|
160
|
+
emptyTitle: {
|
|
161
|
+
fontSize: 16,
|
|
162
|
+
fontWeight: '700',
|
|
163
|
+
marginBottom: 8
|
|
164
|
+
},
|
|
165
|
+
emptyDesc: {
|
|
166
|
+
fontSize: 13,
|
|
167
|
+
textAlign: 'center',
|
|
168
|
+
lineHeight: 20
|
|
169
|
+
},
|
|
170
|
+
header: {
|
|
171
|
+
flexDirection: 'row',
|
|
172
|
+
justifyContent: 'space-between',
|
|
173
|
+
alignItems: 'center',
|
|
174
|
+
paddingHorizontal: 12,
|
|
175
|
+
paddingVertical: 10,
|
|
176
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
177
|
+
},
|
|
178
|
+
headerTitle: {
|
|
179
|
+
fontSize: 14,
|
|
180
|
+
fontWeight: '700'
|
|
181
|
+
},
|
|
182
|
+
lastFetch: {
|
|
183
|
+
fontSize: 10,
|
|
184
|
+
marginTop: 2
|
|
185
|
+
},
|
|
186
|
+
refreshBtn: {
|
|
187
|
+
fontSize: 13,
|
|
188
|
+
fontWeight: '600'
|
|
189
|
+
},
|
|
190
|
+
searchContainer: {
|
|
191
|
+
paddingHorizontal: 12,
|
|
192
|
+
paddingVertical: 8
|
|
193
|
+
},
|
|
194
|
+
searchInput: {
|
|
195
|
+
height: 36,
|
|
196
|
+
borderRadius: 8,
|
|
197
|
+
paddingHorizontal: 12,
|
|
198
|
+
fontSize: 13,
|
|
199
|
+
borderWidth: 1
|
|
200
|
+
},
|
|
201
|
+
errorBanner: {
|
|
202
|
+
padding: 12,
|
|
203
|
+
marginHorizontal: 12,
|
|
204
|
+
borderRadius: 8,
|
|
205
|
+
marginBottom: 8
|
|
206
|
+
},
|
|
207
|
+
errorText: {
|
|
208
|
+
fontSize: 12,
|
|
209
|
+
fontWeight: '600'
|
|
210
|
+
},
|
|
211
|
+
loadingContainer: {
|
|
212
|
+
flex: 1,
|
|
213
|
+
alignItems: 'center',
|
|
214
|
+
justifyContent: 'center'
|
|
215
|
+
},
|
|
216
|
+
configRow: {
|
|
217
|
+
paddingHorizontal: 12,
|
|
218
|
+
paddingVertical: 10,
|
|
219
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
220
|
+
},
|
|
221
|
+
configInfo: {
|
|
222
|
+
flexDirection: 'row',
|
|
223
|
+
justifyContent: 'space-between',
|
|
224
|
+
alignItems: 'center',
|
|
225
|
+
marginBottom: 4
|
|
226
|
+
},
|
|
227
|
+
configKey: {
|
|
228
|
+
fontSize: 13,
|
|
229
|
+
fontWeight: '600',
|
|
230
|
+
flex: 1
|
|
231
|
+
},
|
|
232
|
+
configSource: {
|
|
233
|
+
fontSize: 10,
|
|
234
|
+
fontWeight: '500',
|
|
235
|
+
textTransform: 'uppercase'
|
|
236
|
+
},
|
|
237
|
+
configValue: {
|
|
238
|
+
fontSize: 12,
|
|
239
|
+
fontFamily: 'monospace'
|
|
240
|
+
},
|
|
241
|
+
emptyListContainer: {
|
|
242
|
+
alignItems: 'center',
|
|
243
|
+
paddingVertical: 40
|
|
244
|
+
},
|
|
245
|
+
emptyText: {
|
|
246
|
+
fontSize: 13
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
export function createRemoteConfigPlugin() {
|
|
250
|
+
return {
|
|
251
|
+
id: 'remote-config',
|
|
252
|
+
name: 'Config',
|
|
253
|
+
icon: '⚙️',
|
|
254
|
+
component: RemoteConfigPanel,
|
|
255
|
+
order: 50
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=RemoteConfigPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useEffect","useCallback","View","Text","FlatList","TouchableOpacity","TextInput","StyleSheet","ActivityIndicator","remoteConfigStore","copyToClipboard","safeStringify","formatTimeAgo","RemoteConfigPanel","theme","values","setValues","loading","setLoading","searchQuery","setSearchQuery","lastFetch","setLastFetch","hasProvider","setHasProvider","error","setError","fetchValues","provider","get","result","getAll","getLastFetchTime","time","err","Error","message","unsubscribe","subscribe","filteredValues","filter","v","key","toLowerCase","includes","String","value","createElement","style","styles","emptyContainer","emptyIcon","emptyTitle","color","text","emptyDesc","textMuted","fontFamily","codeText","container","header","backgroundColor","surface","borderBottomColor","border","headerTitle","name","onPress","activeOpacity","refreshBtn","accent","searchContainer","searchInput","surfaceAlt","borderColor","placeholder","placeholderTextColor","onChangeText","autoCapitalize","errorBanner","errorText","length","loadingContainer","data","keyExtractor","item","renderItem","configRow","onLongPress","configInfo","configKey","configSource","source","configValue","numberOfLines","JSON","stringify","ListEmptyComponent","emptyListContainer","emptyText","create","flex","alignItems","justifyContent","paddingHorizontal","fontSize","marginBottom","fontWeight","textAlign","lineHeight","flexDirection","paddingVertical","borderBottomWidth","hairlineWidth","marginTop","height","borderRadius","borderWidth","padding","marginHorizontal","textTransform","createRemoteConfigPlugin","id","icon","component","order"],"sourceRoot":"../../../../src","sources":["plugins/remoteConfig/RemoteConfigPlugin.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAQ,OAAO;AAC/D,SACEC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,iBAAiB,QACZ,cAAc;AAErB,SAASC,iBAAiB,QAAQ,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CAAC;EACjEZ,SAAS,EAAE;IAAEM,QAAQ,EAAE;EAAG;AAC5B,CAAC,CAAC;AAEF,OAAO,SAASgB,wBAAwBA,CAAA,EAAmB;EACzD,OAAO;IACLC,EAAE,EAAE,eAAe;IACnBxD,IAAI,EAAE,QAAQ;IACdyD,IAAI,EAAE,IAAI;IACVC,SAAS,EAAE/G,iBAAiB;IAC5BgH,KAAK,EAAE;EACT,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
class RemoteConfigStoreClass {
|
|
2
|
+
provider = null;
|
|
3
|
+
listeners = new Set();
|
|
4
|
+
|
|
5
|
+
/** Set the remote config provider. */
|
|
6
|
+
set(provider) {
|
|
7
|
+
this.provider = provider;
|
|
8
|
+
this.notify();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Get the current provider. */
|
|
12
|
+
get() {
|
|
13
|
+
return this.provider;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Remove the provider. */
|
|
17
|
+
remove() {
|
|
18
|
+
this.provider = null;
|
|
19
|
+
this.notify();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Subscribe to provider changes. */
|
|
23
|
+
subscribe(listener) {
|
|
24
|
+
this.listeners.add(listener);
|
|
25
|
+
return () => this.listeners.delete(listener);
|
|
26
|
+
}
|
|
27
|
+
notify() {
|
|
28
|
+
for (const l of this.listeners) {
|
|
29
|
+
try {
|
|
30
|
+
l();
|
|
31
|
+
} catch {
|
|
32
|
+
/* ignore */
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export const remoteConfigStore = new RemoteConfigStoreClass();
|
|
38
|
+
|
|
39
|
+
/** Set the remote config provider (e.g., Firebase). */
|
|
40
|
+
export function setRemoteConfigProvider(provider) {
|
|
41
|
+
remoteConfigStore.set(provider);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=remoteConfigStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RemoteConfigStoreClass","provider","listeners","Set","set","notify","get","remove","subscribe","listener","add","delete","l","remoteConfigStore","setRemoteConfigProvider"],"sourceRoot":"../../../../src","sources":["plugins/remoteConfig/remoteConfigStore.ts"],"mappings":"AAIA,MAAMA,sBAAsB,CAAC;EACnBC,QAAQ,GAAgC,IAAI;EAC5CC,SAAS,GAAkB,IAAIC,GAAG,CAAC,CAAC;;EAE5C;EACAC,GAAGA,CAACH,QAA8B,EAAQ;IACxC,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACI,MAAM,CAAC,CAAC;EACf;;EAEA;EACAC,GAAGA,CAAA,EAAgC;IACjC,OAAO,IAAI,CAACL,QAAQ;EACtB;;EAEA;EACAM,MAAMA,CAAA,EAAS;IACb,IAAI,CAACN,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACI,MAAM,CAAC,CAAC;EACf;;EAEA;EACAG,SAASA,CAACC,QAAkB,EAAc;IACxC,IAAI,CAACP,SAAS,CAACQ,GAAG,CAACD,QAAQ,CAAC;IAC5B,OAAO,MAAM,IAAI,CAACP,SAAS,CAACS,MAAM,CAACF,QAAQ,CAAC;EAC9C;EAEQJ,MAAMA,CAAA,EAAS;IACrB,KAAK,MAAMO,CAAC,IAAI,IAAI,CAACV,SAAS,EAAE;MAC9B,IAAI;QACFU,CAAC,CAAC,CAAC;MACL,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF;AACF;AAEA,OAAO,MAAMC,iBAAiB,GAAG,IAAIb,sBAAsB,CAAC,CAAC;;AAE7D;AACA,OAAO,SAASc,uBAAuBA,CAACb,QAA8B,EAAQ;EAC5EY,iBAAiB,CAACT,GAAG,CAACH,QAAQ,CAAC;AACjC","ignoreList":[]}
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, ScrollView, TextInput, StyleSheet } from 'react-native';
|
|
3
|
+
import { stateAdapterRegistry } from './stateAdapterRegistry';
|
|
4
|
+
import { safeStringify, copyToClipboard } from '../../core/utils';
|
|
5
|
+
|
|
6
|
+
// ─── JSON Tree Viewer ───────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
const JsonNode = /*#__PURE__*/React.memo(({
|
|
9
|
+
keyName,
|
|
10
|
+
value,
|
|
11
|
+
depth,
|
|
12
|
+
theme,
|
|
13
|
+
searchQuery
|
|
14
|
+
}) => {
|
|
15
|
+
const [expanded, setExpanded] = useState(depth < 2);
|
|
16
|
+
const isObject = typeof value === 'object' && value !== null;
|
|
17
|
+
const isArray = Array.isArray(value);
|
|
18
|
+
const entries = isObject ? Object.entries(value) : [];
|
|
19
|
+
const typeLabel = isArray ? `Array(${entries.length})` : `Object(${entries.length})`;
|
|
20
|
+
const matchesSearch = searchQuery && keyName.toLowerCase().includes(searchQuery.toLowerCase());
|
|
21
|
+
const valueDisplay = useMemo(() => {
|
|
22
|
+
if (value === null) return 'null';
|
|
23
|
+
if (value === undefined) return 'undefined';
|
|
24
|
+
if (typeof value === 'boolean') return value ? 'true' : 'false';
|
|
25
|
+
if (typeof value === 'number') return String(value);
|
|
26
|
+
if (typeof value === 'string') return `"${value.length > 100 ? value.slice(0, 100) + '…' : value}"`;
|
|
27
|
+
return null;
|
|
28
|
+
}, [value]);
|
|
29
|
+
const valueColor = useMemo(() => {
|
|
30
|
+
if (value === null || value === undefined) return theme.textMuted;
|
|
31
|
+
if (typeof value === 'boolean') return theme.accent;
|
|
32
|
+
if (typeof value === 'number') return theme.success;
|
|
33
|
+
if (typeof value === 'string') return theme.warning;
|
|
34
|
+
return theme.text;
|
|
35
|
+
}, [value, theme]);
|
|
36
|
+
if (!isObject) {
|
|
37
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
38
|
+
style: [styles.nodeRow, {
|
|
39
|
+
paddingLeft: depth * 16
|
|
40
|
+
}],
|
|
41
|
+
onLongPress: () => copyToClipboard(safeStringify(value, 0)),
|
|
42
|
+
activeOpacity: 0.7
|
|
43
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
44
|
+
style: [styles.nodeKey, {
|
|
45
|
+
color: matchesSearch ? theme.accent : theme.info
|
|
46
|
+
}]
|
|
47
|
+
}, keyName, ":", ' '), /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
style: [styles.nodeValue, {
|
|
49
|
+
color: valueColor
|
|
50
|
+
}]
|
|
51
|
+
}, valueDisplay));
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
54
|
+
style: [styles.nodeRow, {
|
|
55
|
+
paddingLeft: depth * 16
|
|
56
|
+
}],
|
|
57
|
+
onPress: () => setExpanded(!expanded),
|
|
58
|
+
onLongPress: () => copyToClipboard(safeStringify(value)),
|
|
59
|
+
activeOpacity: 0.7
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
61
|
+
style: [styles.nodeExpander, {
|
|
62
|
+
color: theme.textMuted
|
|
63
|
+
}]
|
|
64
|
+
}, expanded ? '▼' : '▶', ' '), /*#__PURE__*/React.createElement(Text, {
|
|
65
|
+
style: [styles.nodeKey, {
|
|
66
|
+
color: matchesSearch ? theme.accent : theme.info
|
|
67
|
+
}]
|
|
68
|
+
}, keyName), /*#__PURE__*/React.createElement(Text, {
|
|
69
|
+
style: [styles.nodeType, {
|
|
70
|
+
color: theme.textMuted
|
|
71
|
+
}]
|
|
72
|
+
}, " ", typeLabel)), expanded && entries.map(([key, val]) => /*#__PURE__*/React.createElement(JsonNode, {
|
|
73
|
+
key: key,
|
|
74
|
+
keyName: key,
|
|
75
|
+
value: val,
|
|
76
|
+
depth: depth + 1,
|
|
77
|
+
theme: theme,
|
|
78
|
+
searchQuery: searchQuery
|
|
79
|
+
})));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// ─── State Inspector Panel ──────────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
const StateInspectorPanel = ({
|
|
85
|
+
theme
|
|
86
|
+
}) => {
|
|
87
|
+
const [adapters, setAdapters] = useState(new Map());
|
|
88
|
+
const [states, setStates] = useState(new Map());
|
|
89
|
+
const [activeStore, setActiveStore] = useState(null);
|
|
90
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
91
|
+
const [, forceUpdate] = useState(0);
|
|
92
|
+
|
|
93
|
+
// Listen for adapter registry changes
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
const unsubscribe = stateAdapterRegistry.subscribe(() => {
|
|
96
|
+
setAdapters(stateAdapterRegistry.getAll());
|
|
97
|
+
});
|
|
98
|
+
setAdapters(stateAdapterRegistry.getAll());
|
|
99
|
+
return unsubscribe;
|
|
100
|
+
}, []);
|
|
101
|
+
|
|
102
|
+
// Subscribe to state changes from all adapters
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
const unsubscribers = [];
|
|
105
|
+
const refreshStates = () => {
|
|
106
|
+
const newStates = new Map();
|
|
107
|
+
for (const [id, adapter] of adapters) {
|
|
108
|
+
try {
|
|
109
|
+
newStates.set(id, adapter.getState());
|
|
110
|
+
} catch {
|
|
111
|
+
newStates.set(id, {
|
|
112
|
+
error: 'Failed to read state'
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
setStates(newStates);
|
|
117
|
+
};
|
|
118
|
+
refreshStates();
|
|
119
|
+
for (const [id, adapter] of adapters) {
|
|
120
|
+
if (adapter.subscribe) {
|
|
121
|
+
const unsub = adapter.subscribe(() => {
|
|
122
|
+
try {
|
|
123
|
+
setStates(prev => {
|
|
124
|
+
const next = new Map(prev);
|
|
125
|
+
next.set(id, adapter.getState());
|
|
126
|
+
return next;
|
|
127
|
+
});
|
|
128
|
+
} catch {
|
|
129
|
+
// ignore
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
unsubscribers.push(unsub);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return () => unsubscribers.forEach(u => u());
|
|
136
|
+
}, [adapters]);
|
|
137
|
+
const handleRefresh = useCallback(() => {
|
|
138
|
+
const newStates = new Map();
|
|
139
|
+
for (const [id, adapter] of adapters) {
|
|
140
|
+
try {
|
|
141
|
+
newStates.set(id, adapter.getState());
|
|
142
|
+
} catch {
|
|
143
|
+
newStates.set(id, {
|
|
144
|
+
error: 'Failed to read state'
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
setStates(newStates);
|
|
149
|
+
forceUpdate(n => n + 1);
|
|
150
|
+
}, [adapters]);
|
|
151
|
+
const handleCopyState = useCallback(storeId => {
|
|
152
|
+
const state = states.get(storeId);
|
|
153
|
+
if (state) copyToClipboard(safeStringify(state));
|
|
154
|
+
}, [states]);
|
|
155
|
+
const storeIds = useMemo(() => Array.from(adapters.keys()), [adapters]);
|
|
156
|
+
const activeStoreId = activeStore || storeIds[0] || null;
|
|
157
|
+
const activeState = activeStoreId ? states.get(activeStoreId) : null;
|
|
158
|
+
const activeAdapter = activeStoreId ? adapters.get(activeStoreId) : null;
|
|
159
|
+
if (storeIds.length === 0) {
|
|
160
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
161
|
+
style: styles.emptyContainer
|
|
162
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
163
|
+
style: [styles.emptyIcon]
|
|
164
|
+
}, "\uD83D\uDD0D"), /*#__PURE__*/React.createElement(Text, {
|
|
165
|
+
style: [styles.emptyTitle, {
|
|
166
|
+
color: theme.text
|
|
167
|
+
}]
|
|
168
|
+
}, "No State Stores Registered"), /*#__PURE__*/React.createElement(Text, {
|
|
169
|
+
style: [styles.emptyDesc, {
|
|
170
|
+
color: theme.textMuted
|
|
171
|
+
}]
|
|
172
|
+
}, "Register your stores using:", '\n\n', /*#__PURE__*/React.createElement(Text, {
|
|
173
|
+
style: {
|
|
174
|
+
fontFamily: 'monospace',
|
|
175
|
+
color: theme.codeText
|
|
176
|
+
}
|
|
177
|
+
}, 'setStateAdapter("redux", {\n name: "Redux Store",\n getState: () => store.getState(),\n subscribe: (cb) => store.subscribe(cb)\n})')));
|
|
178
|
+
}
|
|
179
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
180
|
+
style: styles.container
|
|
181
|
+
}, storeIds.length > 1 && /*#__PURE__*/React.createElement(ScrollView, {
|
|
182
|
+
horizontal: true,
|
|
183
|
+
showsHorizontalScrollIndicator: false,
|
|
184
|
+
style: [styles.storeBar, {
|
|
185
|
+
backgroundColor: theme.surface
|
|
186
|
+
}],
|
|
187
|
+
contentContainerStyle: styles.storeBarContent
|
|
188
|
+
}, storeIds.map(id => {
|
|
189
|
+
const adapter = adapters.get(id);
|
|
190
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
191
|
+
key: id,
|
|
192
|
+
style: [styles.storeChip, {
|
|
193
|
+
backgroundColor: id === activeStoreId ? theme.accent : theme.surfaceAlt,
|
|
194
|
+
borderColor: theme.border
|
|
195
|
+
}],
|
|
196
|
+
onPress: () => setActiveStore(id),
|
|
197
|
+
activeOpacity: 0.7
|
|
198
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
199
|
+
style: [styles.storeChipText, {
|
|
200
|
+
color: id === activeStoreId ? '#FFF' : theme.textSecondary
|
|
201
|
+
}]
|
|
202
|
+
}, adapter?.name || id));
|
|
203
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
204
|
+
style: [styles.actionBar, {
|
|
205
|
+
backgroundColor: theme.surface,
|
|
206
|
+
borderBottomColor: theme.border
|
|
207
|
+
}]
|
|
208
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
209
|
+
style: [styles.storeName, {
|
|
210
|
+
color: theme.text
|
|
211
|
+
}]
|
|
212
|
+
}, activeAdapter?.name || activeStoreId), /*#__PURE__*/React.createElement(View, {
|
|
213
|
+
style: styles.actionButtons
|
|
214
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
215
|
+
onPress: handleRefresh,
|
|
216
|
+
activeOpacity: 0.7,
|
|
217
|
+
style: styles.actionBtn
|
|
218
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
219
|
+
style: [styles.actionBtnText, {
|
|
220
|
+
color: theme.accent
|
|
221
|
+
}]
|
|
222
|
+
}, "\u21BB Refresh")), activeStoreId && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
223
|
+
onPress: () => handleCopyState(activeStoreId),
|
|
224
|
+
activeOpacity: 0.7,
|
|
225
|
+
style: styles.actionBtn
|
|
226
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
227
|
+
style: [styles.actionBtnText, {
|
|
228
|
+
color: theme.accent
|
|
229
|
+
}]
|
|
230
|
+
}, "Copy")))), /*#__PURE__*/React.createElement(View, {
|
|
231
|
+
style: [styles.searchContainer, {
|
|
232
|
+
backgroundColor: theme.surface
|
|
233
|
+
}]
|
|
234
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
235
|
+
style: [styles.searchInput, {
|
|
236
|
+
color: theme.text,
|
|
237
|
+
backgroundColor: theme.surfaceAlt,
|
|
238
|
+
borderColor: theme.border
|
|
239
|
+
}],
|
|
240
|
+
placeholder: "Search keys...",
|
|
241
|
+
placeholderTextColor: theme.textMuted,
|
|
242
|
+
value: searchQuery,
|
|
243
|
+
onChangeText: setSearchQuery,
|
|
244
|
+
autoCapitalize: "none"
|
|
245
|
+
})), /*#__PURE__*/React.createElement(ScrollView, {
|
|
246
|
+
style: styles.treeContainer
|
|
247
|
+
}, activeState && typeof activeState === 'object' ? Object.entries(activeState).map(([key, val]) => /*#__PURE__*/React.createElement(JsonNode, {
|
|
248
|
+
key: key,
|
|
249
|
+
keyName: key,
|
|
250
|
+
value: val,
|
|
251
|
+
depth: 0,
|
|
252
|
+
theme: theme,
|
|
253
|
+
searchQuery: searchQuery
|
|
254
|
+
})) : /*#__PURE__*/React.createElement(View, {
|
|
255
|
+
style: {
|
|
256
|
+
padding: 12
|
|
257
|
+
}
|
|
258
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
259
|
+
style: [styles.nodeValue, {
|
|
260
|
+
color: theme.text
|
|
261
|
+
}]
|
|
262
|
+
}, safeStringify(activeState)))));
|
|
263
|
+
};
|
|
264
|
+
const styles = StyleSheet.create({
|
|
265
|
+
container: {
|
|
266
|
+
flex: 1
|
|
267
|
+
},
|
|
268
|
+
emptyContainer: {
|
|
269
|
+
flex: 1,
|
|
270
|
+
alignItems: 'center',
|
|
271
|
+
justifyContent: 'center',
|
|
272
|
+
paddingHorizontal: 32
|
|
273
|
+
},
|
|
274
|
+
emptyIcon: {
|
|
275
|
+
fontSize: 48,
|
|
276
|
+
marginBottom: 16
|
|
277
|
+
},
|
|
278
|
+
emptyTitle: {
|
|
279
|
+
fontSize: 16,
|
|
280
|
+
fontWeight: '700',
|
|
281
|
+
marginBottom: 8
|
|
282
|
+
},
|
|
283
|
+
emptyDesc: {
|
|
284
|
+
fontSize: 13,
|
|
285
|
+
textAlign: 'center',
|
|
286
|
+
lineHeight: 20
|
|
287
|
+
},
|
|
288
|
+
storeBar: {
|
|
289
|
+
maxHeight: 44
|
|
290
|
+
},
|
|
291
|
+
storeBarContent: {
|
|
292
|
+
paddingHorizontal: 12,
|
|
293
|
+
paddingVertical: 8,
|
|
294
|
+
gap: 6
|
|
295
|
+
},
|
|
296
|
+
storeChip: {
|
|
297
|
+
paddingHorizontal: 12,
|
|
298
|
+
paddingVertical: 4,
|
|
299
|
+
borderRadius: 12,
|
|
300
|
+
borderWidth: 1
|
|
301
|
+
},
|
|
302
|
+
storeChipText: {
|
|
303
|
+
fontSize: 12,
|
|
304
|
+
fontWeight: '600'
|
|
305
|
+
},
|
|
306
|
+
actionBar: {
|
|
307
|
+
flexDirection: 'row',
|
|
308
|
+
justifyContent: 'space-between',
|
|
309
|
+
alignItems: 'center',
|
|
310
|
+
paddingHorizontal: 12,
|
|
311
|
+
paddingVertical: 8,
|
|
312
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
313
|
+
},
|
|
314
|
+
storeName: {
|
|
315
|
+
fontSize: 14,
|
|
316
|
+
fontWeight: '700'
|
|
317
|
+
},
|
|
318
|
+
actionButtons: {
|
|
319
|
+
flexDirection: 'row',
|
|
320
|
+
gap: 12
|
|
321
|
+
},
|
|
322
|
+
actionBtn: {},
|
|
323
|
+
actionBtnText: {
|
|
324
|
+
fontSize: 12,
|
|
325
|
+
fontWeight: '600'
|
|
326
|
+
},
|
|
327
|
+
searchContainer: {
|
|
328
|
+
paddingHorizontal: 12,
|
|
329
|
+
paddingVertical: 8
|
|
330
|
+
},
|
|
331
|
+
searchInput: {
|
|
332
|
+
height: 36,
|
|
333
|
+
borderRadius: 8,
|
|
334
|
+
paddingHorizontal: 12,
|
|
335
|
+
fontSize: 13,
|
|
336
|
+
borderWidth: 1
|
|
337
|
+
},
|
|
338
|
+
treeContainer: {
|
|
339
|
+
flex: 1
|
|
340
|
+
},
|
|
341
|
+
nodeRow: {
|
|
342
|
+
flexDirection: 'row',
|
|
343
|
+
alignItems: 'center',
|
|
344
|
+
paddingVertical: 4,
|
|
345
|
+
paddingRight: 12
|
|
346
|
+
},
|
|
347
|
+
nodeExpander: {
|
|
348
|
+
fontSize: 10
|
|
349
|
+
},
|
|
350
|
+
nodeKey: {
|
|
351
|
+
fontSize: 12,
|
|
352
|
+
fontWeight: '600'
|
|
353
|
+
},
|
|
354
|
+
nodeType: {
|
|
355
|
+
fontSize: 10,
|
|
356
|
+
fontStyle: 'italic'
|
|
357
|
+
},
|
|
358
|
+
nodeValue: {
|
|
359
|
+
fontSize: 12,
|
|
360
|
+
flex: 1
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
export function createStateInspectorPlugin() {
|
|
364
|
+
return {
|
|
365
|
+
id: 'state-inspector',
|
|
366
|
+
name: 'State',
|
|
367
|
+
icon: '🔍',
|
|
368
|
+
component: StateInspectorPanel,
|
|
369
|
+
order: 30
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
//# sourceMappingURL=StateInspectorPlugin.js.map
|