react-native-debug-toolkit 2.0.0 → 2.2.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/README.md +82 -120
- package/README.zh-CN.md +171 -0
- package/lib/commonjs/core/DebugToolkit.js +117 -115
- package/lib/commonjs/core/DebugToolkit.js.map +1 -1
- package/lib/commonjs/core/DebugToolkitProvider.js +38 -30
- package/lib/commonjs/core/DebugToolkitProvider.js.map +1 -1
- package/lib/commonjs/core/initialize.js +84 -0
- package/lib/commonjs/core/initialize.js.map +1 -0
- package/lib/commonjs/{components → features/clipboard}/ClipboardTab.js +16 -17
- package/lib/commonjs/features/clipboard/ClipboardTab.js.map +1 -0
- package/lib/commonjs/features/{ClipboardFeature.js → clipboard/index.js} +9 -5
- package/lib/commonjs/features/clipboard/index.js.map +1 -0
- package/lib/commonjs/features/console/ConsoleLogTab.js +162 -0
- package/lib/commonjs/features/console/ConsoleLogTab.js.map +1 -0
- package/lib/commonjs/features/console/index.js +118 -0
- package/lib/commonjs/features/console/index.js.map +1 -0
- package/lib/commonjs/{components → features/environment}/EnvironmentTab.js +24 -25
- package/lib/commonjs/features/environment/EnvironmentTab.js.map +1 -0
- package/lib/commonjs/features/{EnvironmentFeature.js → environment/index.js} +22 -25
- package/lib/commonjs/features/environment/index.js.map +1 -0
- package/lib/commonjs/{components → features/navigation}/NavigationLogTab.js +11 -10
- package/lib/commonjs/features/navigation/NavigationLogTab.js.map +1 -0
- package/lib/commonjs/features/navigation/index.js +39 -0
- package/lib/commonjs/features/navigation/index.js.map +1 -0
- package/lib/commonjs/{hooks → features/navigation}/useNavigationLogger.js +3 -3
- package/lib/commonjs/features/navigation/useNavigationLogger.js.map +1 -0
- package/lib/commonjs/features/network/NetworkLogTab.js +405 -0
- package/lib/commonjs/features/network/NetworkLogTab.js.map +1 -0
- package/lib/commonjs/features/network/index.js +96 -0
- package/lib/commonjs/features/network/index.js.map +1 -0
- package/lib/commonjs/features/network/networkInterceptor.js +261 -0
- package/lib/commonjs/features/network/networkInterceptor.js.map +1 -0
- package/lib/commonjs/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.js +10 -9
- package/lib/commonjs/features/thirdPartyLibs/ThirdPartyLibsTab.js.map +1 -0
- package/lib/commonjs/features/{ThirdPartyLibsFeature.js → thirdPartyLibs/index.js} +8 -8
- package/lib/commonjs/features/thirdPartyLibs/index.js.map +1 -0
- package/lib/commonjs/{native/NativeDebugLibs.js → features/thirdPartyLibs/nativeDebugLibs.js} +1 -1
- package/lib/commonjs/features/thirdPartyLibs/nativeDebugLibs.js.map +1 -0
- package/lib/commonjs/features/track/TrackLogTab.js +230 -0
- package/lib/commonjs/features/track/TrackLogTab.js.map +1 -0
- package/lib/commonjs/features/track/index.js +39 -0
- package/lib/commonjs/features/track/index.js.map +1 -0
- package/lib/commonjs/features/zustand/ZustandLogTab.js +311 -0
- package/lib/commonjs/features/zustand/ZustandLogTab.js.map +1 -0
- package/lib/commonjs/features/zustand/index.js +59 -0
- package/lib/commonjs/features/zustand/index.js.map +1 -0
- package/lib/commonjs/index.js +27 -40
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types/environment.js +2 -0
- package/lib/commonjs/types/environment.js.map +1 -0
- package/lib/commonjs/types/feature.js +6 -0
- package/lib/commonjs/types/feature.js.map +1 -0
- package/lib/commonjs/types/index.js +0 -4
- package/lib/commonjs/types/logs.js +2 -0
- package/lib/commonjs/types/logs.js.map +1 -0
- package/lib/commonjs/types/navigation.js +2 -0
- package/lib/commonjs/types/navigation.js.map +1 -0
- package/lib/commonjs/types/thirdPartyLibs.js +2 -0
- package/lib/commonjs/types/thirdPartyLibs.js.map +1 -0
- package/lib/commonjs/ui/DebugView.js +66 -0
- package/lib/commonjs/ui/DebugView.js.map +1 -0
- package/lib/commonjs/ui/floating/FloatIcon.js +240 -0
- package/lib/commonjs/ui/floating/FloatIcon.js.map +1 -0
- package/lib/commonjs/ui/panel/DebugPanel.js +230 -0
- package/lib/commonjs/ui/panel/DebugPanel.js.map +1 -0
- package/lib/commonjs/ui/panel/FeatureTabBar.js +182 -0
- package/lib/commonjs/ui/panel/FeatureTabBar.js.map +1 -0
- package/lib/commonjs/ui/panel/FloatPanelView.js +238 -0
- package/lib/commonjs/ui/panel/FloatPanelView.js.map +1 -0
- package/lib/commonjs/{components → ui}/shared/CollapsibleSection.js +4 -4
- package/lib/commonjs/ui/shared/CollapsibleSection.js.map +1 -0
- package/lib/commonjs/{components → ui}/shared/CopyButton.js +3 -3
- package/lib/commonjs/ui/shared/CopyButton.js.map +1 -0
- package/lib/commonjs/ui/shared/JsonView.js.map +1 -0
- package/lib/commonjs/ui/shared/LogListScreen.js +174 -0
- package/lib/commonjs/ui/shared/LogListScreen.js.map +1 -0
- package/lib/commonjs/ui/shared/useSlideDetailAnimation.js.map +1 -0
- package/lib/commonjs/ui/theme/colors.js +43 -0
- package/lib/commonjs/ui/theme/colors.js.map +1 -0
- package/lib/commonjs/ui/theme/layout.js +8 -0
- package/lib/commonjs/ui/theme/layout.js.map +1 -0
- package/lib/commonjs/utils/createChannelFeature.js +62 -0
- package/lib/commonjs/utils/createChannelFeature.js.map +1 -0
- package/lib/commonjs/utils/createObservableStore.js +5 -0
- package/lib/commonjs/utils/createObservableStore.js.map +1 -1
- package/lib/commonjs/utils/createPersistedObservableStore.js +71 -0
- package/lib/commonjs/utils/createPersistedObservableStore.js.map +1 -0
- package/lib/commonjs/utils/debugPreferences.js +52 -0
- package/lib/commonjs/utils/debugPreferences.js.map +1 -0
- package/lib/commonjs/utils/urlRewriterRegistry.js +14 -0
- package/lib/commonjs/utils/urlRewriterRegistry.js.map +1 -0
- package/lib/module/core/DebugToolkit.js +117 -114
- package/lib/module/core/DebugToolkit.js.map +1 -1
- package/lib/module/core/DebugToolkitProvider.js +39 -31
- package/lib/module/core/DebugToolkitProvider.js.map +1 -1
- package/lib/module/core/initialize.js +80 -0
- package/lib/module/core/initialize.js.map +1 -0
- package/lib/module/{components → features/clipboard}/ClipboardTab.js +9 -9
- package/lib/module/features/clipboard/ClipboardTab.js.map +1 -0
- package/lib/module/features/clipboard/index.js +16 -0
- package/lib/module/features/clipboard/index.js.map +1 -0
- package/lib/module/features/console/ConsoleLogTab.js +157 -0
- package/lib/module/features/console/ConsoleLogTab.js.map +1 -0
- package/lib/module/features/console/index.js +112 -0
- package/lib/module/features/console/index.js.map +1 -0
- package/lib/module/{components → features/environment}/EnvironmentTab.js +5 -5
- package/lib/module/features/environment/EnvironmentTab.js.map +1 -0
- package/lib/module/features/{EnvironmentFeature.js → environment/index.js} +22 -25
- package/lib/module/features/environment/index.js.map +1 -0
- package/lib/module/{components → features/navigation}/NavigationLogTab.js +4 -3
- package/lib/module/features/navigation/NavigationLogTab.js.map +1 -0
- package/lib/module/features/navigation/index.js +32 -0
- package/lib/module/features/navigation/index.js.map +1 -0
- package/lib/module/{hooks → features/navigation}/useNavigationLogger.js +2 -2
- package/lib/module/features/navigation/useNavigationLogger.js.map +1 -0
- package/lib/module/features/network/NetworkLogTab.js +400 -0
- package/lib/module/features/network/NetworkLogTab.js.map +1 -0
- package/lib/module/features/network/index.js +90 -0
- package/lib/module/features/network/index.js.map +1 -0
- package/lib/module/features/network/networkInterceptor.js +256 -0
- package/lib/module/features/network/networkInterceptor.js.map +1 -0
- package/lib/module/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.js +3 -2
- package/lib/module/features/thirdPartyLibs/ThirdPartyLibsTab.js.map +1 -0
- package/lib/module/features/{ThirdPartyLibsFeature.js → thirdPartyLibs/index.js} +4 -4
- package/lib/module/features/thirdPartyLibs/index.js.map +1 -0
- package/lib/module/{native/NativeDebugLibs.js → features/thirdPartyLibs/nativeDebugLibs.js} +1 -1
- package/lib/module/features/thirdPartyLibs/nativeDebugLibs.js.map +1 -0
- package/lib/module/features/track/TrackLogTab.js +225 -0
- package/lib/module/features/track/TrackLogTab.js.map +1 -0
- package/lib/module/features/track/index.js +32 -0
- package/lib/module/features/track/index.js.map +1 -0
- package/lib/module/features/zustand/ZustandLogTab.js +306 -0
- package/lib/module/features/zustand/ZustandLogTab.js.map +1 -0
- package/lib/module/features/zustand/index.js +53 -0
- package/lib/module/features/zustand/index.js.map +1 -0
- package/lib/module/index.js +11 -12
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/environment.js +2 -0
- package/lib/module/types/environment.js.map +1 -0
- package/lib/module/types/feature.js +4 -0
- package/lib/module/types/feature.js.map +1 -0
- package/lib/module/types/index.js +0 -2
- package/lib/module/types/logs.js +2 -0
- package/lib/module/types/logs.js.map +1 -0
- package/lib/module/types/navigation.js +2 -0
- package/lib/module/types/navigation.js.map +1 -0
- package/lib/module/types/thirdPartyLibs.js +2 -0
- package/lib/module/types/thirdPartyLibs.js.map +1 -0
- package/lib/module/ui/DebugView.js +61 -0
- package/lib/module/ui/DebugView.js.map +1 -0
- package/lib/module/ui/floating/FloatIcon.js +235 -0
- package/lib/module/ui/floating/FloatIcon.js.map +1 -0
- package/lib/module/ui/panel/DebugPanel.js +225 -0
- package/lib/module/ui/panel/DebugPanel.js.map +1 -0
- package/lib/module/ui/panel/FeatureTabBar.js +177 -0
- package/lib/module/ui/panel/FeatureTabBar.js.map +1 -0
- package/lib/module/ui/panel/FloatPanelView.js +233 -0
- package/lib/module/ui/panel/FloatPanelView.js.map +1 -0
- package/lib/module/{components → ui}/shared/CollapsibleSection.js +1 -1
- package/lib/module/ui/shared/CollapsibleSection.js.map +1 -0
- package/lib/module/{components → ui}/shared/CopyButton.js +1 -1
- package/lib/module/ui/shared/CopyButton.js.map +1 -0
- package/lib/module/ui/shared/JsonView.js.map +1 -0
- package/lib/module/ui/shared/LogListScreen.js +169 -0
- package/lib/module/ui/shared/LogListScreen.js.map +1 -0
- package/lib/module/ui/shared/useSlideDetailAnimation.js.map +1 -0
- package/lib/module/ui/theme/colors.js +38 -0
- package/lib/module/ui/theme/colors.js.map +1 -0
- package/lib/module/ui/theme/layout.js +4 -0
- package/lib/module/ui/theme/layout.js.map +1 -0
- package/lib/module/utils/createChannelFeature.js +58 -0
- package/lib/module/utils/createChannelFeature.js.map +1 -0
- package/lib/module/utils/createObservableStore.js +5 -0
- package/lib/module/utils/createObservableStore.js.map +1 -1
- package/lib/module/utils/createPersistedObservableStore.js +67 -0
- package/lib/module/utils/createPersistedObservableStore.js.map +1 -0
- package/lib/module/utils/debugPreferences.js +46 -0
- package/lib/module/utils/debugPreferences.js.map +1 -0
- package/lib/module/utils/urlRewriterRegistry.js +10 -0
- package/lib/module/utils/urlRewriterRegistry.js.map +1 -0
- package/lib/typescript/src/core/DebugToolkit.d.ts +17 -20
- package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
- package/lib/typescript/src/core/DebugToolkitProvider.d.ts +4 -7
- package/lib/typescript/src/core/DebugToolkitProvider.d.ts.map +1 -1
- package/lib/typescript/src/core/initialize.d.ts +32 -0
- package/lib/typescript/src/core/initialize.d.ts.map +1 -0
- package/lib/typescript/src/features/clipboard/ClipboardTab.d.ts +4 -0
- package/lib/typescript/src/features/clipboard/ClipboardTab.d.ts.map +1 -0
- package/lib/typescript/src/features/clipboard/index.d.ts +7 -0
- package/lib/typescript/src/features/clipboard/index.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/console}/ConsoleLogTab.d.ts +2 -2
- package/lib/typescript/src/features/console/ConsoleLogTab.d.ts.map +1 -0
- package/lib/typescript/src/features/console/index.d.ts +9 -0
- package/lib/typescript/src/features/console/index.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/environment}/EnvironmentTab.d.ts +1 -1
- package/lib/typescript/src/features/environment/EnvironmentTab.d.ts.map +1 -0
- package/lib/typescript/src/features/{EnvironmentFeature.d.ts → environment/index.d.ts} +2 -2
- package/lib/typescript/src/features/environment/index.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/navigation}/NavigationLogTab.d.ts +2 -2
- package/lib/typescript/src/features/navigation/NavigationLogTab.d.ts.map +1 -0
- package/lib/typescript/src/features/{NavigationLogFeature.d.ts → navigation/index.d.ts} +5 -3
- package/lib/typescript/src/features/navigation/index.d.ts.map +1 -0
- package/lib/typescript/src/{hooks → features/navigation}/useNavigationLogger.d.ts +1 -8
- package/lib/typescript/src/features/navigation/useNavigationLogger.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/network}/NetworkLogTab.d.ts +2 -2
- package/lib/typescript/src/features/network/NetworkLogTab.d.ts.map +1 -0
- package/lib/typescript/src/features/network/index.d.ts +15 -0
- package/lib/typescript/src/features/network/index.d.ts.map +1 -0
- package/lib/typescript/src/features/network/networkInterceptor.d.ts +19 -0
- package/lib/typescript/src/features/network/networkInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.d.ts +2 -2
- package/lib/typescript/src/features/thirdPartyLibs/ThirdPartyLibsTab.d.ts.map +1 -0
- package/lib/typescript/src/features/thirdPartyLibs/index.d.ts +3 -0
- package/lib/typescript/src/features/thirdPartyLibs/index.d.ts.map +1 -0
- package/lib/typescript/src/{native/NativeDebugLibs.d.ts → features/thirdPartyLibs/nativeDebugLibs.d.ts} +1 -1
- package/lib/typescript/src/features/thirdPartyLibs/nativeDebugLibs.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/track}/TrackLogTab.d.ts +2 -2
- package/lib/typescript/src/features/track/TrackLogTab.d.ts.map +1 -0
- package/lib/typescript/src/features/{TrackFeature.d.ts → track/index.d.ts} +5 -3
- package/lib/typescript/src/features/track/index.d.ts.map +1 -0
- package/lib/typescript/src/{components → features/zustand}/ZustandLogTab.d.ts +2 -2
- package/lib/typescript/src/features/zustand/ZustandLogTab.d.ts.map +1 -0
- package/lib/typescript/src/features/{ZustandLogFeature.d.ts → zustand/index.d.ts} +5 -3
- package/lib/typescript/src/features/zustand/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +20 -20
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/environment.d.ts +11 -0
- package/lib/typescript/src/types/environment.d.ts.map +1 -0
- package/lib/typescript/src/types/feature.d.ts +23 -0
- package/lib/typescript/src/types/feature.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +5 -111
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/logs.d.ts +51 -0
- package/lib/typescript/src/types/logs.d.ts.map +1 -0
- package/lib/typescript/src/types/navigation.d.ts +8 -0
- package/lib/typescript/src/types/navigation.d.ts.map +1 -0
- package/lib/typescript/src/types/thirdPartyLibs.d.ts +13 -0
- package/lib/typescript/src/types/thirdPartyLibs.d.ts.map +1 -0
- package/lib/typescript/src/ui/DebugView.d.ts +19 -0
- package/lib/typescript/src/ui/DebugView.d.ts.map +1 -0
- package/lib/typescript/src/ui/floating/FloatIcon.d.ts +12 -0
- package/lib/typescript/src/ui/floating/FloatIcon.d.ts.map +1 -0
- package/lib/typescript/src/ui/panel/DebugPanel.d.ts +9 -0
- package/lib/typescript/src/ui/panel/DebugPanel.d.ts.map +1 -0
- package/lib/typescript/src/ui/panel/FeatureTabBar.d.ts +13 -0
- package/lib/typescript/src/ui/panel/FeatureTabBar.d.ts.map +1 -0
- package/lib/typescript/src/ui/panel/FloatPanelView.d.ts +12 -0
- package/lib/typescript/src/ui/panel/FloatPanelView.d.ts.map +1 -0
- package/lib/typescript/src/ui/shared/CollapsibleSection.d.ts.map +1 -0
- package/lib/typescript/src/ui/shared/CopyButton.d.ts.map +1 -0
- package/lib/typescript/src/ui/shared/JsonView.d.ts.map +1 -0
- package/lib/typescript/src/ui/shared/LogListScreen.d.ts +21 -0
- package/lib/typescript/src/ui/shared/LogListScreen.d.ts.map +1 -0
- package/lib/typescript/src/ui/shared/useSlideDetailAnimation.d.ts.map +1 -0
- package/lib/typescript/src/ui/theme/colors.d.ts +21 -0
- package/lib/typescript/src/ui/theme/colors.d.ts.map +1 -0
- package/lib/typescript/src/ui/theme/layout.d.ts +2 -0
- package/lib/typescript/src/ui/theme/layout.d.ts.map +1 -0
- package/lib/typescript/src/utils/createChannelFeature.d.ts +27 -0
- package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -0
- package/lib/typescript/src/utils/createObservableStore.d.ts +1 -0
- package/lib/typescript/src/utils/createObservableStore.d.ts.map +1 -1
- package/lib/typescript/src/utils/createPersistedObservableStore.d.ts +15 -0
- package/lib/typescript/src/utils/createPersistedObservableStore.d.ts.map +1 -0
- package/lib/typescript/src/utils/debugPreferences.d.ts +10 -0
- package/lib/typescript/src/utils/debugPreferences.d.ts.map +1 -0
- package/lib/typescript/src/utils/urlRewriterRegistry.d.ts +7 -0
- package/lib/typescript/src/utils/urlRewriterRegistry.d.ts.map +1 -0
- package/package.json +5 -1
- package/src/core/DebugToolkit.tsx +144 -142
- package/src/core/DebugToolkitProvider.tsx +44 -43
- package/src/core/initialize.ts +122 -0
- package/src/{components → features/clipboard}/ClipboardTab.tsx +10 -10
- package/src/features/clipboard/index.ts +15 -0
- package/src/features/console/ConsoleLogTab.tsx +95 -0
- package/src/features/console/index.ts +119 -0
- package/src/{components → features/environment}/EnvironmentTab.tsx +7 -7
- package/src/features/{EnvironmentFeature.ts → environment/index.ts} +27 -25
- package/src/{components → features/navigation}/NavigationLogTab.tsx +6 -5
- package/src/features/navigation/index.ts +44 -0
- package/src/{hooks → features/navigation}/useNavigationLogger.ts +3 -8
- package/src/features/network/NetworkLogTab.tsx +271 -0
- package/src/features/network/index.ts +113 -0
- package/src/features/network/networkInterceptor.ts +311 -0
- package/src/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.tsx +6 -5
- package/src/features/{ThirdPartyLibsFeature.ts → thirdPartyLibs/index.ts} +5 -5
- package/src/features/track/TrackLogTab.tsx +110 -0
- package/src/features/track/index.ts +41 -0
- package/src/features/zustand/ZustandLogTab.tsx +203 -0
- package/src/features/{ZustandLogFeature.ts → zustand/index.ts} +19 -45
- package/src/index.ts +20 -24
- package/src/types/environment.ts +11 -0
- package/src/types/feature.ts +32 -0
- package/src/types/index.ts +29 -138
- package/src/types/logs.ts +54 -0
- package/src/types/navigation.ts +5 -0
- package/src/types/thirdPartyLibs.ts +13 -0
- package/src/ui/DebugView.tsx +80 -0
- package/src/ui/floating/FloatIcon.tsx +202 -0
- package/src/ui/panel/DebugPanel.tsx +215 -0
- package/src/ui/panel/FeatureTabBar.tsx +204 -0
- package/src/ui/panel/FloatPanelView.tsx +227 -0
- package/src/{components → ui}/shared/CollapsibleSection.tsx +1 -1
- package/src/{components → ui}/shared/CopyButton.tsx +1 -1
- package/src/ui/shared/LogListScreen.tsx +164 -0
- package/src/ui/theme/colors.ts +33 -0
- package/src/ui/theme/layout.ts +1 -0
- package/src/utils/createChannelFeature.ts +80 -0
- package/src/utils/createObservableStore.ts +6 -0
- package/src/utils/createPersistedObservableStore.ts +76 -0
- package/src/utils/debugPreferences.ts +48 -0
- package/src/utils/urlRewriterRegistry.ts +10 -0
- package/lib/commonjs/components/ClipboardTab.js.map +0 -1
- package/lib/commonjs/components/ConsoleLogTab.js +0 -295
- package/lib/commonjs/components/ConsoleLogTab.js.map +0 -1
- package/lib/commonjs/components/EnvironmentTab.js.map +0 -1
- package/lib/commonjs/components/FloatPanelView.js +0 -797
- package/lib/commonjs/components/FloatPanelView.js.map +0 -1
- package/lib/commonjs/components/NavigationLogTab.js.map +0 -1
- package/lib/commonjs/components/NetworkLogTab.js +0 -575
- package/lib/commonjs/components/NetworkLogTab.js.map +0 -1
- package/lib/commonjs/components/ThirdPartyLibsTab.js.map +0 -1
- package/lib/commonjs/components/TrackLogTab.js +0 -372
- package/lib/commonjs/components/TrackLogTab.js.map +0 -1
- package/lib/commonjs/components/ZustandLogTab.js +0 -451
- package/lib/commonjs/components/ZustandLogTab.js.map +0 -1
- package/lib/commonjs/components/shared/CollapsibleSection.js.map +0 -1
- package/lib/commonjs/components/shared/CopyButton.js.map +0 -1
- package/lib/commonjs/components/shared/JsonView.js.map +0 -1
- package/lib/commonjs/features/ClipboardFeature.js.map +0 -1
- package/lib/commonjs/features/ConsoleLogFeature.js +0 -98
- package/lib/commonjs/features/ConsoleLogFeature.js.map +0 -1
- package/lib/commonjs/features/EnvironmentFeature.js.map +0 -1
- package/lib/commonjs/features/NavigationLogFeature.js +0 -60
- package/lib/commonjs/features/NavigationLogFeature.js.map +0 -1
- package/lib/commonjs/features/NetworkFeature.js +0 -328
- package/lib/commonjs/features/NetworkFeature.js.map +0 -1
- package/lib/commonjs/features/ThirdPartyLibsFeature.js.map +0 -1
- package/lib/commonjs/features/TrackFeature.js +0 -55
- package/lib/commonjs/features/TrackFeature.js.map +0 -1
- package/lib/commonjs/features/ZustandLogFeature.js +0 -76
- package/lib/commonjs/features/ZustandLogFeature.js.map +0 -1
- package/lib/commonjs/hooks/useNavigationLogger.js.map +0 -1
- package/lib/commonjs/hooks/useSlideDetailAnimation.js.map +0 -1
- package/lib/commonjs/initialize.js +0 -161
- package/lib/commonjs/initialize.js.map +0 -1
- package/lib/commonjs/native/NativeDebugLibs.js.map +0 -1
- package/lib/commonjs/utils/constants.js +0 -135
- package/lib/commonjs/utils/constants.js.map +0 -1
- package/lib/module/components/ClipboardTab.js.map +0 -1
- package/lib/module/components/ConsoleLogTab.js +0 -290
- package/lib/module/components/ConsoleLogTab.js.map +0 -1
- package/lib/module/components/EnvironmentTab.js.map +0 -1
- package/lib/module/components/FloatPanelView.js +0 -791
- package/lib/module/components/FloatPanelView.js.map +0 -1
- package/lib/module/components/NavigationLogTab.js.map +0 -1
- package/lib/module/components/NetworkLogTab.js +0 -570
- package/lib/module/components/NetworkLogTab.js.map +0 -1
- package/lib/module/components/ThirdPartyLibsTab.js.map +0 -1
- package/lib/module/components/TrackLogTab.js +0 -367
- package/lib/module/components/TrackLogTab.js.map +0 -1
- package/lib/module/components/ZustandLogTab.js +0 -446
- package/lib/module/components/ZustandLogTab.js.map +0 -1
- package/lib/module/components/shared/CollapsibleSection.js.map +0 -1
- package/lib/module/components/shared/CopyButton.js.map +0 -1
- package/lib/module/components/shared/JsonView.js.map +0 -1
- package/lib/module/features/ClipboardFeature.js +0 -12
- package/lib/module/features/ClipboardFeature.js.map +0 -1
- package/lib/module/features/ConsoleLogFeature.js +0 -93
- package/lib/module/features/ConsoleLogFeature.js.map +0 -1
- package/lib/module/features/EnvironmentFeature.js.map +0 -1
- package/lib/module/features/NavigationLogFeature.js +0 -54
- package/lib/module/features/NavigationLogFeature.js.map +0 -1
- package/lib/module/features/NetworkFeature.js +0 -322
- package/lib/module/features/NetworkFeature.js.map +0 -1
- package/lib/module/features/ThirdPartyLibsFeature.js.map +0 -1
- package/lib/module/features/TrackFeature.js +0 -49
- package/lib/module/features/TrackFeature.js.map +0 -1
- package/lib/module/features/ZustandLogFeature.js +0 -69
- package/lib/module/features/ZustandLogFeature.js.map +0 -1
- package/lib/module/hooks/useNavigationLogger.js.map +0 -1
- package/lib/module/hooks/useSlideDetailAnimation.js.map +0 -1
- package/lib/module/initialize.js +0 -156
- package/lib/module/initialize.js.map +0 -1
- package/lib/module/native/NativeDebugLibs.js.map +0 -1
- package/lib/module/utils/constants.js +0 -130
- package/lib/module/utils/constants.js.map +0 -1
- package/lib/typescript/src/components/ClipboardTab.d.ts +0 -4
- package/lib/typescript/src/components/ClipboardTab.d.ts.map +0 -1
- package/lib/typescript/src/components/ConsoleLogTab.d.ts.map +0 -1
- package/lib/typescript/src/components/EnvironmentTab.d.ts.map +0 -1
- package/lib/typescript/src/components/FloatPanelView.d.ts +0 -64
- package/lib/typescript/src/components/FloatPanelView.d.ts.map +0 -1
- package/lib/typescript/src/components/NavigationLogTab.d.ts.map +0 -1
- package/lib/typescript/src/components/NetworkLogTab.d.ts.map +0 -1
- package/lib/typescript/src/components/ThirdPartyLibsTab.d.ts.map +0 -1
- package/lib/typescript/src/components/TrackLogTab.d.ts.map +0 -1
- package/lib/typescript/src/components/ZustandLogTab.d.ts.map +0 -1
- package/lib/typescript/src/components/shared/CollapsibleSection.d.ts.map +0 -1
- package/lib/typescript/src/components/shared/CopyButton.d.ts.map +0 -1
- package/lib/typescript/src/components/shared/JsonView.d.ts.map +0 -1
- package/lib/typescript/src/features/ClipboardFeature.d.ts +0 -3
- package/lib/typescript/src/features/ClipboardFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/ConsoleLogFeature.d.ts +0 -7
- package/lib/typescript/src/features/ConsoleLogFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/EnvironmentFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/NavigationLogFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/NetworkFeature.d.ts +0 -28
- package/lib/typescript/src/features/NetworkFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/ThirdPartyLibsFeature.d.ts +0 -3
- package/lib/typescript/src/features/ThirdPartyLibsFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/TrackFeature.d.ts.map +0 -1
- package/lib/typescript/src/features/ZustandLogFeature.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useNavigationLogger.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useSlideDetailAnimation.d.ts.map +0 -1
- package/lib/typescript/src/initialize.d.ts +0 -51
- package/lib/typescript/src/initialize.d.ts.map +0 -1
- package/lib/typescript/src/native/NativeDebugLibs.d.ts.map +0 -1
- package/lib/typescript/src/utils/constants.d.ts +0 -96
- package/lib/typescript/src/utils/constants.d.ts.map +0 -1
- package/src/components/ConsoleLogTab.tsx +0 -209
- package/src/components/FloatPanelView.tsx +0 -714
- package/src/components/NetworkLogTab.tsx +0 -411
- package/src/components/TrackLogTab.tsx +0 -245
- package/src/components/ZustandLogTab.tsx +0 -305
- package/src/features/ClipboardFeature.ts +0 -11
- package/src/features/ConsoleLogFeature.ts +0 -118
- package/src/features/NavigationLogFeature.ts +0 -74
- package/src/features/NetworkFeature.ts +0 -488
- package/src/features/TrackFeature.ts +0 -69
- package/src/initialize.ts +0 -214
- package/src/utils/constants.ts +0 -91
- /package/lib/commonjs/{components → ui}/shared/JsonView.js +0 -0
- /package/lib/commonjs/{hooks → ui/shared}/useSlideDetailAnimation.js +0 -0
- /package/lib/module/{components → ui}/shared/JsonView.js +0 -0
- /package/lib/module/{hooks → ui/shared}/useSlideDetailAnimation.js +0 -0
- /package/lib/typescript/src/{components → ui}/shared/CollapsibleSection.d.ts +0 -0
- /package/lib/typescript/src/{components → ui}/shared/CopyButton.d.ts +0 -0
- /package/lib/typescript/src/{components → ui}/shared/JsonView.d.ts +0 -0
- /package/lib/typescript/src/{hooks → ui/shared}/useSlideDetailAnimation.d.ts +0 -0
- /package/src/{native/NativeDebugLibs.ts → features/thirdPartyLibs/nativeDebugLibs.ts} +0 -0
- /package/src/{components → ui}/shared/JsonView.tsx +0 -0
- /package/src/{hooks → ui/shared}/useSlideDetailAnimation.ts +0 -0
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
FlatList,
|
|
6
|
-
TouchableOpacity,
|
|
7
|
-
StyleSheet,
|
|
8
|
-
TextInput,
|
|
9
|
-
Animated,
|
|
10
|
-
ScrollView,
|
|
11
|
-
} from 'react-native';
|
|
12
|
-
import { Colors, getMethodColor } from '../utils/constants';
|
|
13
|
-
import { CollapsibleSection } from './shared/CollapsibleSection';
|
|
14
|
-
import { JsonView } from './shared/JsonView';
|
|
15
|
-
import { CopyButton } from './shared/CopyButton';
|
|
16
|
-
import { fmt } from '../utils/copyToComputer';
|
|
17
|
-
import type { DebugFeatureRenderProps, NetworkLogEntry } from '../types';
|
|
18
|
-
|
|
19
|
-
const formatSize = (data: unknown): string => {
|
|
20
|
-
if (!data) return '';
|
|
21
|
-
try {
|
|
22
|
-
const len = (typeof data === 'string' ? data : JSON.stringify(data)).length;
|
|
23
|
-
if (len < 1024) return `(${len} B)`;
|
|
24
|
-
if (len < 1024 * 1024) return `(${(len / 1024).toFixed(1)} KB)`;
|
|
25
|
-
return `(${(len / (1024 * 1024)).toFixed(1)} MB)`;
|
|
26
|
-
} catch {
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// --- Detail view (in-panel push) ---
|
|
32
|
-
const NetworkLogDetail: React.FC<{ log: NetworkLogEntry; onBack: () => void }> = ({
|
|
33
|
-
log,
|
|
34
|
-
onBack,
|
|
35
|
-
}) => {
|
|
36
|
-
const statusColor =
|
|
37
|
-
log.error || (log.response && log.response.status >= 400) ? Colors.error : Colors.success;
|
|
38
|
-
|
|
39
|
-
const curl = () => {
|
|
40
|
-
let c = `curl -X ${log.request.method} '${log.request.url}'`;
|
|
41
|
-
if (log.request.headers) {
|
|
42
|
-
Object.entries(log.request.headers).forEach(([k, v]) => (c += ` \\\n -H '${k}: ${v}'`));
|
|
43
|
-
}
|
|
44
|
-
if (log.request.body) {
|
|
45
|
-
c += ` \\\n -d '${typeof log.request.body === 'string' ? log.request.body : JSON.stringify(log.request.body)}'`;
|
|
46
|
-
}
|
|
47
|
-
return c;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<View style={s.detailWrap}>
|
|
52
|
-
<View style={s.detailHeader}>
|
|
53
|
-
<TouchableOpacity onPress={onBack} style={s.backBtn} activeOpacity={0.6}>
|
|
54
|
-
<Text style={s.backIcon}>‹</Text>
|
|
55
|
-
<Text style={s.backText}>Back</Text>
|
|
56
|
-
</TouchableOpacity>
|
|
57
|
-
<View style={s.detailHeaderCenter}>
|
|
58
|
-
<View style={[s.methodBadge, { backgroundColor: getMethodColor(log.request.method) }]}>
|
|
59
|
-
<Text style={s.methodBadgeText}>{log.request.method}</Text>
|
|
60
|
-
</View>
|
|
61
|
-
<View style={[s.statusPill, { backgroundColor: statusColor }]}>
|
|
62
|
-
<Text style={s.statusPillText}>{log.response?.status ?? 'ERR'}</Text>
|
|
63
|
-
</View>
|
|
64
|
-
{log.duration != null && (
|
|
65
|
-
<Text style={s.durationText}>{log.duration}ms</Text>
|
|
66
|
-
)}
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
69
|
-
<ScrollView style={s.detailBody} contentContainerStyle={s.detailBodyContent}>
|
|
70
|
-
{/* URL */}
|
|
71
|
-
<View style={s.urlCard}>
|
|
72
|
-
<Text style={s.urlText} selectable numberOfLines={3}>
|
|
73
|
-
{log.request.url}
|
|
74
|
-
</Text>
|
|
75
|
-
<CopyButton text={log.request.url} label="URL" />
|
|
76
|
-
</View>
|
|
77
|
-
|
|
78
|
-
{/* Request Body */}
|
|
79
|
-
<CollapsibleSection title="Request Body" initiallyExpanded>
|
|
80
|
-
{log.request.body != null ? (
|
|
81
|
-
<View style={s.sectionWithCopy}>
|
|
82
|
-
<CopyButton text={fmt(log.request.body)} label="Request Body" />
|
|
83
|
-
<JsonView data={log.request.body} maxHeight={250} />
|
|
84
|
-
</View>
|
|
85
|
-
) : (
|
|
86
|
-
<Text style={s.emptySection}>No request body</Text>
|
|
87
|
-
)}
|
|
88
|
-
</CollapsibleSection>
|
|
89
|
-
|
|
90
|
-
<CollapsibleSection title="Request Headers">
|
|
91
|
-
{log.request.headers ? (
|
|
92
|
-
<View style={s.sectionWithCopy}>
|
|
93
|
-
<CopyButton text={fmt(log.request.headers)} label="Request Headers" />
|
|
94
|
-
<JsonView data={log.request.headers} maxHeight={200} />
|
|
95
|
-
</View>
|
|
96
|
-
) : (
|
|
97
|
-
<Text style={s.emptySection}>No headers</Text>
|
|
98
|
-
)}
|
|
99
|
-
</CollapsibleSection>
|
|
100
|
-
|
|
101
|
-
{/* Response */}
|
|
102
|
-
<CollapsibleSection
|
|
103
|
-
title={`Response ${formatSize(log.response?.data)}`}
|
|
104
|
-
initiallyExpanded
|
|
105
|
-
>
|
|
106
|
-
{log.error && (
|
|
107
|
-
<View style={s.errorBox}>
|
|
108
|
-
<Text style={s.errorIcon}>⚠</Text>
|
|
109
|
-
<Text style={s.errorText}>{log.error}</Text>
|
|
110
|
-
</View>
|
|
111
|
-
)}
|
|
112
|
-
{log.response?.data != null ? (
|
|
113
|
-
<View style={s.sectionWithCopy}>
|
|
114
|
-
<CopyButton text={fmt(log.response.data)} label="Response Body" />
|
|
115
|
-
<JsonView data={log.response.data} maxHeight={300} />
|
|
116
|
-
</View>
|
|
117
|
-
) : (
|
|
118
|
-
<Text style={s.emptySection}>No response body</Text>
|
|
119
|
-
)}
|
|
120
|
-
</CollapsibleSection>
|
|
121
|
-
|
|
122
|
-
{log.response?.headers && (
|
|
123
|
-
<CollapsibleSection title="Response Headers">
|
|
124
|
-
<View style={s.sectionWithCopy}>
|
|
125
|
-
<CopyButton text={fmt(log.response.headers)} label="Response Headers" />
|
|
126
|
-
<JsonView data={log.response.headers} maxHeight={200} />
|
|
127
|
-
</View>
|
|
128
|
-
</CollapsibleSection>
|
|
129
|
-
)}
|
|
130
|
-
|
|
131
|
-
{/* cURL */}
|
|
132
|
-
<CollapsibleSection title="cURL">
|
|
133
|
-
<View style={s.sectionWithCopy}>
|
|
134
|
-
<CopyButton text={curl()} label="cURL" />
|
|
135
|
-
<View style={s.codeBlock}>
|
|
136
|
-
<Text style={s.codeText} selectable>{curl()}</Text>
|
|
137
|
-
</View>
|
|
138
|
-
</View>
|
|
139
|
-
</CollapsibleSection>
|
|
140
|
-
</ScrollView>
|
|
141
|
-
</View>
|
|
142
|
-
);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
// --- List view ---
|
|
146
|
-
export const NetworkLogTab: React.FC<DebugFeatureRenderProps<NetworkLogEntry>> = React.memo(({
|
|
147
|
-
data,
|
|
148
|
-
}) => {
|
|
149
|
-
const [selectedLog, setSelectedLog] = useState<NetworkLogEntry | null>(null);
|
|
150
|
-
const [search, setSearch] = useState('');
|
|
151
|
-
const slideAnim = useRef(new Animated.Value(0)).current;
|
|
152
|
-
const listSlideAnim = useRef(new Animated.Value(0)).current;
|
|
153
|
-
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
if (selectedLog) {
|
|
156
|
-
listSlideAnim.setValue(0);
|
|
157
|
-
Animated.parallel([
|
|
158
|
-
Animated.spring(slideAnim, { toValue: 1, friction: 9, tension: 60, useNativeDriver: true }),
|
|
159
|
-
Animated.spring(listSlideAnim, { toValue: 1, friction: 9, tension: 60, useNativeDriver: true }),
|
|
160
|
-
]).start();
|
|
161
|
-
} else {
|
|
162
|
-
slideAnim.setValue(0);
|
|
163
|
-
listSlideAnim.setValue(0);
|
|
164
|
-
}
|
|
165
|
-
}, [selectedLog]);
|
|
166
|
-
|
|
167
|
-
const detailTranslateX = slideAnim.interpolate({
|
|
168
|
-
inputRange: [0, 1],
|
|
169
|
-
outputRange: [300, 0],
|
|
170
|
-
});
|
|
171
|
-
const listTranslateX = listSlideAnim.interpolate({
|
|
172
|
-
inputRange: [0, 1],
|
|
173
|
-
outputRange: [0, -60],
|
|
174
|
-
});
|
|
175
|
-
const listOpacity = listSlideAnim.interpolate({
|
|
176
|
-
inputRange: [0, 1],
|
|
177
|
-
outputRange: [1, 0],
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
const filtered = search
|
|
181
|
-
? data.filter(
|
|
182
|
-
(l) =>
|
|
183
|
-
l.request.url.toLowerCase().includes(search.toLowerCase()) ||
|
|
184
|
-
l.request.method.toLowerCase().includes(search.toLowerCase()),
|
|
185
|
-
)
|
|
186
|
-
: data;
|
|
187
|
-
|
|
188
|
-
const sorted = [...filtered].sort(
|
|
189
|
-
(a, b) => b.timestamp - a.timestamp,
|
|
190
|
-
);
|
|
191
|
-
|
|
192
|
-
const renderItem = ({ item }: { item: NetworkLogEntry }) => {
|
|
193
|
-
const ok = !item.error && (!item.response || item.response.status < 400);
|
|
194
|
-
const sc = ok ? Colors.success : Colors.error;
|
|
195
|
-
return (
|
|
196
|
-
<TouchableOpacity style={s.card} onPress={() => setSelectedLog(item)} activeOpacity={0.6}>
|
|
197
|
-
<View style={s.cardRow}>
|
|
198
|
-
<View style={[s.statusIndicator, { backgroundColor: sc }]} />
|
|
199
|
-
<View style={s.cardBody}>
|
|
200
|
-
<View style={s.cardMeta}>
|
|
201
|
-
<Text style={[s.methodText, { color: getMethodColor(item.request.method) }]}>
|
|
202
|
-
{item.request.method}
|
|
203
|
-
</Text>
|
|
204
|
-
<View style={[s.miniPill, { backgroundColor: sc }]}>
|
|
205
|
-
<Text style={s.miniPillText}>{item.response?.status ?? 'ERR'}</Text>
|
|
206
|
-
</View>
|
|
207
|
-
{item.duration != null && <Text style={s.durationText}>{item.duration}ms</Text>}
|
|
208
|
-
</View>
|
|
209
|
-
<Text style={[s.url, !ok && { color: Colors.error }]} numberOfLines={2}>
|
|
210
|
-
{item.request.url}
|
|
211
|
-
</Text>
|
|
212
|
-
<Text style={s.time}>
|
|
213
|
-
{new Date(item.timestamp).toLocaleTimeString()}
|
|
214
|
-
</Text>
|
|
215
|
-
</View>
|
|
216
|
-
</View>
|
|
217
|
-
</TouchableOpacity>
|
|
218
|
-
);
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
return (
|
|
222
|
-
<View style={s.container}>
|
|
223
|
-
{/* List */}
|
|
224
|
-
<Animated.View style={[s.listWrap, selectedLog ? { opacity: listOpacity, transform: [{ translateX: listTranslateX }] } : null]}>
|
|
225
|
-
<View style={s.searchContainer}>
|
|
226
|
-
<View style={s.searchBar}>
|
|
227
|
-
<Text style={s.searchIcon}>⌕</Text>
|
|
228
|
-
<TextInput
|
|
229
|
-
style={s.search}
|
|
230
|
-
placeholder="Search URLs..."
|
|
231
|
-
placeholderTextColor={Colors.textLight}
|
|
232
|
-
value={search}
|
|
233
|
-
onChangeText={setSearch}
|
|
234
|
-
/>
|
|
235
|
-
</View>
|
|
236
|
-
</View>
|
|
237
|
-
{sorted.length === 0 ? (
|
|
238
|
-
<View style={s.emptyContainer}>
|
|
239
|
-
<Text style={s.emptyIcon}>~</Text>
|
|
240
|
-
<Text style={s.empty}>No HTTP requests logged</Text>
|
|
241
|
-
</View>
|
|
242
|
-
) : (
|
|
243
|
-
<FlatList
|
|
244
|
-
data={sorted}
|
|
245
|
-
renderItem={renderItem}
|
|
246
|
-
keyExtractor={(item) => item.id}
|
|
247
|
-
contentContainerStyle={s.listContent}
|
|
248
|
-
initialNumToRender={20}
|
|
249
|
-
maxToRenderPerBatch={10}
|
|
250
|
-
windowSize={5}
|
|
251
|
-
removeClippedSubviews={true}
|
|
252
|
-
/>
|
|
253
|
-
)}
|
|
254
|
-
</Animated.View>
|
|
255
|
-
|
|
256
|
-
{/* Detail (push navigation) */}
|
|
257
|
-
{selectedLog && (
|
|
258
|
-
<Animated.View style={[s.detailOverlay, { transform: [{ translateX: detailTranslateX }] }]}>
|
|
259
|
-
<NetworkLogDetail log={selectedLog} onBack={() => setSelectedLog(null)} />
|
|
260
|
-
</Animated.View>
|
|
261
|
-
)}
|
|
262
|
-
</View>
|
|
263
|
-
);
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
const s = StyleSheet.create({
|
|
267
|
-
container: { flex: 1, backgroundColor: Colors.background },
|
|
268
|
-
listWrap: {
|
|
269
|
-
position: 'absolute',
|
|
270
|
-
top: 0,
|
|
271
|
-
left: 0,
|
|
272
|
-
right: 0,
|
|
273
|
-
bottom: 0,
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
// Search
|
|
277
|
-
searchContainer: {
|
|
278
|
-
paddingHorizontal: 12,
|
|
279
|
-
paddingTop: 10,
|
|
280
|
-
paddingBottom: 6,
|
|
281
|
-
backgroundColor: Colors.background,
|
|
282
|
-
},
|
|
283
|
-
searchBar: {
|
|
284
|
-
flexDirection: 'row',
|
|
285
|
-
alignItems: 'center',
|
|
286
|
-
backgroundColor: Colors.surface,
|
|
287
|
-
borderRadius: 10,
|
|
288
|
-
paddingHorizontal: 10,
|
|
289
|
-
height: 38,
|
|
290
|
-
},
|
|
291
|
-
searchIcon: { fontSize: 16, color: Colors.textLight, marginRight: 6 },
|
|
292
|
-
search: {
|
|
293
|
-
flex: 1,
|
|
294
|
-
fontSize: 14,
|
|
295
|
-
color: Colors.text,
|
|
296
|
-
padding: 0,
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
// Empty
|
|
300
|
-
emptyContainer: { flex: 1, alignItems: 'center', justifyContent: 'center' },
|
|
301
|
-
emptyIcon: { fontSize: 40, color: Colors.textLight, marginBottom: 4 },
|
|
302
|
-
empty: { textAlign: 'center', color: Colors.textLight, fontSize: 14 },
|
|
303
|
-
|
|
304
|
-
// List
|
|
305
|
-
listContent: { padding: 12 },
|
|
306
|
-
card: {
|
|
307
|
-
backgroundColor: Colors.surface,
|
|
308
|
-
borderRadius: 12,
|
|
309
|
-
marginBottom: 8,
|
|
310
|
-
overflow: 'hidden',
|
|
311
|
-
},
|
|
312
|
-
cardRow: { flexDirection: 'row', padding: 14 },
|
|
313
|
-
statusIndicator: { width: 3, borderRadius: 2, marginRight: 12 },
|
|
314
|
-
cardBody: { flex: 1 },
|
|
315
|
-
cardMeta: { flexDirection: 'row', alignItems: 'center', marginBottom: 6, gap: 6 },
|
|
316
|
-
methodText: { fontSize: 13, fontWeight: '700' },
|
|
317
|
-
miniPill: { paddingHorizontal: 7, paddingVertical: 2, borderRadius: 4 },
|
|
318
|
-
miniPillText: { color: '#FFF', fontSize: 10, fontWeight: '700' },
|
|
319
|
-
durationText: { fontSize: 12, color: Colors.textSecondary, fontWeight: '500' },
|
|
320
|
-
url: { fontSize: 13, color: Colors.textSecondary, marginBottom: 4, lineHeight: 18 },
|
|
321
|
-
time: { fontSize: 11, color: Colors.textLight },
|
|
322
|
-
|
|
323
|
-
// Detail overlay
|
|
324
|
-
detailOverlay: {
|
|
325
|
-
position: 'absolute',
|
|
326
|
-
top: 0,
|
|
327
|
-
left: 0,
|
|
328
|
-
right: 0,
|
|
329
|
-
bottom: 0,
|
|
330
|
-
backgroundColor: Colors.background,
|
|
331
|
-
},
|
|
332
|
-
detailWrap: { flex: 1, backgroundColor: Colors.background },
|
|
333
|
-
detailHeader: {
|
|
334
|
-
flexDirection: 'row',
|
|
335
|
-
alignItems: 'center',
|
|
336
|
-
paddingHorizontal: 8,
|
|
337
|
-
paddingVertical: 10,
|
|
338
|
-
backgroundColor: Colors.surface,
|
|
339
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
340
|
-
borderBottomColor: Colors.border,
|
|
341
|
-
},
|
|
342
|
-
backBtn: {
|
|
343
|
-
flexDirection: 'row',
|
|
344
|
-
alignItems: 'center',
|
|
345
|
-
paddingHorizontal: 6,
|
|
346
|
-
paddingVertical: 4,
|
|
347
|
-
borderRadius: 8,
|
|
348
|
-
marginRight: 8,
|
|
349
|
-
},
|
|
350
|
-
backIcon: {
|
|
351
|
-
fontSize: 24,
|
|
352
|
-
fontWeight: '300',
|
|
353
|
-
color: Colors.primary,
|
|
354
|
-
marginTop: -2,
|
|
355
|
-
marginRight: 2,
|
|
356
|
-
},
|
|
357
|
-
backText: {
|
|
358
|
-
fontSize: 16,
|
|
359
|
-
color: Colors.primary,
|
|
360
|
-
fontWeight: '500',
|
|
361
|
-
},
|
|
362
|
-
detailHeaderCenter: {
|
|
363
|
-
flexDirection: 'row',
|
|
364
|
-
alignItems: 'center',
|
|
365
|
-
gap: 8,
|
|
366
|
-
flex: 1,
|
|
367
|
-
},
|
|
368
|
-
methodBadge: {
|
|
369
|
-
paddingHorizontal: 10,
|
|
370
|
-
paddingVertical: 4,
|
|
371
|
-
borderRadius: 6,
|
|
372
|
-
},
|
|
373
|
-
methodBadgeText: { color: '#FFF', fontSize: 12, fontWeight: '700' },
|
|
374
|
-
statusPill: { paddingHorizontal: 9, paddingVertical: 3, borderRadius: 6 },
|
|
375
|
-
statusPillText: { color: '#FFF', fontSize: 11, fontWeight: '700' },
|
|
376
|
-
detailBody: { flex: 1 },
|
|
377
|
-
detailBodyContent: { padding: 12, paddingBottom: 40 },
|
|
378
|
-
|
|
379
|
-
// Detail content
|
|
380
|
-
urlCard: {
|
|
381
|
-
flexDirection: 'row',
|
|
382
|
-
alignItems: 'center',
|
|
383
|
-
backgroundColor: Colors.surface,
|
|
384
|
-
borderRadius: 12,
|
|
385
|
-
padding: 14,
|
|
386
|
-
marginBottom: 8,
|
|
387
|
-
gap: 8,
|
|
388
|
-
},
|
|
389
|
-
urlText: { flex: 1, fontSize: 13, color: Colors.textSecondary, lineHeight: 18 },
|
|
390
|
-
sectionWithCopy: { gap: 8 },
|
|
391
|
-
emptySection: { fontSize: 13, color: Colors.textLight, paddingVertical: 4 },
|
|
392
|
-
errorBox: {
|
|
393
|
-
backgroundColor: 'rgba(255,59,48,0.06)',
|
|
394
|
-
borderWidth: 1,
|
|
395
|
-
borderColor: 'rgba(255,59,48,0.15)',
|
|
396
|
-
borderRadius: 10,
|
|
397
|
-
padding: 12,
|
|
398
|
-
marginBottom: 10,
|
|
399
|
-
flexDirection: 'row',
|
|
400
|
-
alignItems: 'flex-start',
|
|
401
|
-
gap: 8,
|
|
402
|
-
},
|
|
403
|
-
errorIcon: { fontSize: 14, color: Colors.error },
|
|
404
|
-
errorText: { flex: 1, fontSize: 13, color: Colors.error, lineHeight: 18 },
|
|
405
|
-
codeBlock: {
|
|
406
|
-
backgroundColor: '#1E1E2E',
|
|
407
|
-
borderRadius: 12,
|
|
408
|
-
padding: 12,
|
|
409
|
-
},
|
|
410
|
-
codeText: { fontFamily: 'Courier', fontSize: 12, color: '#CDD6F4', lineHeight: 18 },
|
|
411
|
-
});
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Text, FlatList, TouchableOpacity, StyleSheet, Animated, ScrollView } from 'react-native';
|
|
3
|
-
import { Colors } from '../utils/constants';
|
|
4
|
-
import { safeStringify } from '../utils/safeStringify';
|
|
5
|
-
import { CollapsibleSection } from './shared/CollapsibleSection';
|
|
6
|
-
import { JsonView } from './shared/JsonView';
|
|
7
|
-
import { CopyButton } from './shared/CopyButton';
|
|
8
|
-
import { useSlideDetailAnimation } from '../hooks/useSlideDetailAnimation';
|
|
9
|
-
import type { DebugFeatureRenderProps, TrackLogEntry } from '../types';
|
|
10
|
-
|
|
11
|
-
export const TrackLogTab: React.FC<DebugFeatureRenderProps<TrackLogEntry>> = React.memo(({
|
|
12
|
-
data,
|
|
13
|
-
}) => {
|
|
14
|
-
const [selected, setSelected] = useState<TrackLogEntry | null>(null);
|
|
15
|
-
const { detailTranslateX, listTranslateX, listOpacity } = useSlideDetailAnimation(selected);
|
|
16
|
-
|
|
17
|
-
const renderItem = ({ item }: { item: TrackLogEntry }) => (
|
|
18
|
-
<TouchableOpacity style={s.card} onPress={() => setSelected(item)} activeOpacity={0.6}>
|
|
19
|
-
<View style={s.cardRow}>
|
|
20
|
-
<View style={s.eventIcon}>
|
|
21
|
-
<Text style={s.eventIconText}>●</Text>
|
|
22
|
-
</View>
|
|
23
|
-
<View style={s.cardContent}>
|
|
24
|
-
<View style={s.cardHeader}>
|
|
25
|
-
<Text style={s.eventName}>{item.eventName}</Text>
|
|
26
|
-
<Text style={s.time}>{new Date(item.timestamp).toLocaleTimeString()}</Text>
|
|
27
|
-
</View>
|
|
28
|
-
<View style={s.previewRow}>
|
|
29
|
-
{Object.entries(item)
|
|
30
|
-
.filter(([k]) => k !== 'id' && k !== 'eventName' && k !== 'timestamp')
|
|
31
|
-
.slice(0, 2)
|
|
32
|
-
.map(([key, value]) => (
|
|
33
|
-
<View key={key} style={s.previewChip}>
|
|
34
|
-
<Text style={s.previewText} numberOfLines={1}>
|
|
35
|
-
<Text style={s.previewKey}>{key}</Text> {String(value ?? '').slice(0, 25)}
|
|
36
|
-
</Text>
|
|
37
|
-
</View>
|
|
38
|
-
))}
|
|
39
|
-
</View>
|
|
40
|
-
</View>
|
|
41
|
-
</View>
|
|
42
|
-
</TouchableOpacity>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
const extraProps = selected
|
|
46
|
-
? Object.entries(selected).filter(
|
|
47
|
-
([k, v]) => k !== 'id' && k !== 'eventName' && k !== 'timestamp' && v !== undefined && v !== null,
|
|
48
|
-
)
|
|
49
|
-
: [];
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<View style={s.container}>
|
|
53
|
-
{/* List */}
|
|
54
|
-
<Animated.View style={[s.listWrap, selected ? { opacity: listOpacity, transform: [{ translateX: listTranslateX }] } : null]}>
|
|
55
|
-
{data.length === 0 ? (
|
|
56
|
-
<View style={s.emptyContainer}>
|
|
57
|
-
<Text style={s.emptyIcon}>~</Text>
|
|
58
|
-
<Text style={s.empty}>No track events</Text>
|
|
59
|
-
</View>
|
|
60
|
-
) : (
|
|
61
|
-
<FlatList
|
|
62
|
-
data={[...data].reverse()}
|
|
63
|
-
renderItem={renderItem}
|
|
64
|
-
keyExtractor={(item) => item.id}
|
|
65
|
-
contentContainerStyle={s.listContent}
|
|
66
|
-
initialNumToRender={20}
|
|
67
|
-
maxToRenderPerBatch={10}
|
|
68
|
-
windowSize={5}
|
|
69
|
-
removeClippedSubviews={true}
|
|
70
|
-
/>
|
|
71
|
-
)}
|
|
72
|
-
</Animated.View>
|
|
73
|
-
|
|
74
|
-
{/* Detail (push navigation) */}
|
|
75
|
-
{selected && (
|
|
76
|
-
<Animated.View style={[s.detailOverlay, { transform: [{ translateX: detailTranslateX }] }]}>
|
|
77
|
-
<View style={s.detailWrap}>
|
|
78
|
-
<View style={s.detailHeader}>
|
|
79
|
-
<TouchableOpacity onPress={() => setSelected(null)} style={s.backBtn} activeOpacity={0.6}>
|
|
80
|
-
<Text style={s.backIcon}>‹</Text>
|
|
81
|
-
<Text style={s.backText}>Back</Text>
|
|
82
|
-
</TouchableOpacity>
|
|
83
|
-
<View style={s.eventBadge}>
|
|
84
|
-
<Text style={s.eventBadgeText}>{selected.eventName}</Text>
|
|
85
|
-
</View>
|
|
86
|
-
</View>
|
|
87
|
-
<ScrollView style={s.detailBody} contentContainerStyle={s.detailBodyContent}>
|
|
88
|
-
{/* Properties */}
|
|
89
|
-
<CollapsibleSection title="Properties" initiallyExpanded>
|
|
90
|
-
<View style={s.sectionWithCopy}>
|
|
91
|
-
<CopyButton text={safeStringify(Object.fromEntries(extraProps), 2)} label="Track Properties" />
|
|
92
|
-
<View style={s.propsGrid}>
|
|
93
|
-
{extraProps.map(([key, value]) => (
|
|
94
|
-
<View key={key} style={s.propRow}>
|
|
95
|
-
<Text style={s.propKey}>{key}</Text>
|
|
96
|
-
<Text style={s.propValue} selectable>
|
|
97
|
-
{typeof value === 'object' ? safeStringify(value) : String(value ?? '')}
|
|
98
|
-
</Text>
|
|
99
|
-
</View>
|
|
100
|
-
))}
|
|
101
|
-
</View>
|
|
102
|
-
</View>
|
|
103
|
-
</CollapsibleSection>
|
|
104
|
-
|
|
105
|
-
{/* Full JSON */}
|
|
106
|
-
<CollapsibleSection title="Full Event Data">
|
|
107
|
-
<View style={s.sectionWithCopy}>
|
|
108
|
-
<CopyButton text={safeStringify(selected, 2)} label="Track Event" />
|
|
109
|
-
<JsonView data={selected} maxHeight={300} />
|
|
110
|
-
</View>
|
|
111
|
-
</CollapsibleSection>
|
|
112
|
-
|
|
113
|
-
{/* Timing */}
|
|
114
|
-
<View style={s.timingCard}>
|
|
115
|
-
<Text style={s.timingLabel}>Time</Text>
|
|
116
|
-
<Text style={s.timingValue}>
|
|
117
|
-
{new Date(selected.timestamp).toLocaleString()}
|
|
118
|
-
</Text>
|
|
119
|
-
</View>
|
|
120
|
-
</ScrollView>
|
|
121
|
-
</View>
|
|
122
|
-
</Animated.View>
|
|
123
|
-
)}
|
|
124
|
-
</View>
|
|
125
|
-
);
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
const s = StyleSheet.create({
|
|
129
|
-
container: { flex: 1, backgroundColor: Colors.background },
|
|
130
|
-
listWrap: {
|
|
131
|
-
position: 'absolute',
|
|
132
|
-
top: 0,
|
|
133
|
-
left: 0,
|
|
134
|
-
right: 0,
|
|
135
|
-
bottom: 0,
|
|
136
|
-
},
|
|
137
|
-
listContent: { padding: 12 },
|
|
138
|
-
|
|
139
|
-
// Empty
|
|
140
|
-
emptyContainer: { flex: 1, alignItems: 'center', justifyContent: 'center' },
|
|
141
|
-
emptyIcon: { fontSize: 40, color: Colors.textLight, marginBottom: 4 },
|
|
142
|
-
empty: { textAlign: 'center', color: Colors.textLight, fontSize: 14 },
|
|
143
|
-
|
|
144
|
-
// Card
|
|
145
|
-
card: {
|
|
146
|
-
backgroundColor: Colors.surface,
|
|
147
|
-
borderRadius: 12,
|
|
148
|
-
marginBottom: 8,
|
|
149
|
-
overflow: 'hidden',
|
|
150
|
-
},
|
|
151
|
-
cardRow: { flexDirection: 'row', padding: 14, alignItems: 'flex-start' },
|
|
152
|
-
eventIcon: {
|
|
153
|
-
width: 28,
|
|
154
|
-
height: 28,
|
|
155
|
-
borderRadius: 8,
|
|
156
|
-
backgroundColor: 'rgba(175,82,222,0.1)',
|
|
157
|
-
alignItems: 'center',
|
|
158
|
-
justifyContent: 'center',
|
|
159
|
-
marginRight: 12,
|
|
160
|
-
marginTop: 1,
|
|
161
|
-
},
|
|
162
|
-
eventIconText: { color: Colors.purple, fontSize: 10 },
|
|
163
|
-
cardContent: { flex: 1 },
|
|
164
|
-
cardHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 6 },
|
|
165
|
-
eventName: { fontSize: 15, fontWeight: '600', color: Colors.text },
|
|
166
|
-
time: { fontSize: 12, color: Colors.textSecondary },
|
|
167
|
-
previewRow: { flexDirection: 'row', flexWrap: 'wrap', gap: 4 },
|
|
168
|
-
previewChip: {
|
|
169
|
-
backgroundColor: Colors.background,
|
|
170
|
-
borderRadius: 6,
|
|
171
|
-
paddingHorizontal: 8,
|
|
172
|
-
paddingVertical: 3,
|
|
173
|
-
},
|
|
174
|
-
previewText: { fontSize: 12, color: Colors.textSecondary, lineHeight: 16 },
|
|
175
|
-
previewKey: { fontWeight: '600', color: Colors.text },
|
|
176
|
-
|
|
177
|
-
// Detail (push navigation)
|
|
178
|
-
detailOverlay: {
|
|
179
|
-
position: 'absolute',
|
|
180
|
-
top: 0,
|
|
181
|
-
left: 0,
|
|
182
|
-
right: 0,
|
|
183
|
-
bottom: 0,
|
|
184
|
-
backgroundColor: Colors.background,
|
|
185
|
-
},
|
|
186
|
-
detailWrap: { flex: 1, backgroundColor: Colors.background },
|
|
187
|
-
detailHeader: {
|
|
188
|
-
flexDirection: 'row',
|
|
189
|
-
alignItems: 'center',
|
|
190
|
-
paddingHorizontal: 8,
|
|
191
|
-
paddingVertical: 10,
|
|
192
|
-
backgroundColor: Colors.surface,
|
|
193
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
194
|
-
borderBottomColor: Colors.border,
|
|
195
|
-
gap: 8,
|
|
196
|
-
},
|
|
197
|
-
backBtn: {
|
|
198
|
-
flexDirection: 'row',
|
|
199
|
-
alignItems: 'center',
|
|
200
|
-
paddingHorizontal: 6,
|
|
201
|
-
paddingVertical: 4,
|
|
202
|
-
borderRadius: 8,
|
|
203
|
-
},
|
|
204
|
-
backIcon: {
|
|
205
|
-
fontSize: 24,
|
|
206
|
-
fontWeight: '300',
|
|
207
|
-
color: Colors.primary,
|
|
208
|
-
marginTop: -2,
|
|
209
|
-
marginRight: 2,
|
|
210
|
-
},
|
|
211
|
-
backText: {
|
|
212
|
-
fontSize: 16,
|
|
213
|
-
color: Colors.primary,
|
|
214
|
-
fontWeight: '500',
|
|
215
|
-
},
|
|
216
|
-
eventBadge: {
|
|
217
|
-
backgroundColor: Colors.purple,
|
|
218
|
-
paddingHorizontal: 12,
|
|
219
|
-
paddingVertical: 5,
|
|
220
|
-
borderRadius: 8,
|
|
221
|
-
},
|
|
222
|
-
eventBadgeText: { color: '#FFF', fontSize: 14, fontWeight: '700' },
|
|
223
|
-
detailBody: { flex: 1 },
|
|
224
|
-
detailBodyContent: { padding: 12, paddingBottom: 40 },
|
|
225
|
-
sectionWithCopy: { gap: 8 },
|
|
226
|
-
|
|
227
|
-
// Properties
|
|
228
|
-
propsGrid: { gap: 12 },
|
|
229
|
-
propRow: {},
|
|
230
|
-
propKey: { fontSize: 13, fontWeight: '600', color: Colors.textSecondary, marginBottom: 3 },
|
|
231
|
-
propValue: { fontSize: 14, color: Colors.text, lineHeight: 20 },
|
|
232
|
-
|
|
233
|
-
// Timing
|
|
234
|
-
timingCard: {
|
|
235
|
-
backgroundColor: Colors.surface,
|
|
236
|
-
borderRadius: 12,
|
|
237
|
-
padding: 14,
|
|
238
|
-
flexDirection: 'row',
|
|
239
|
-
justifyContent: 'space-between',
|
|
240
|
-
alignItems: 'center',
|
|
241
|
-
marginTop: 4,
|
|
242
|
-
},
|
|
243
|
-
timingLabel: { fontSize: 13, color: Colors.textSecondary, fontWeight: '500' },
|
|
244
|
-
timingValue: { fontSize: 13, color: Colors.text },
|
|
245
|
-
});
|