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,305 +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, ZustandLogEntry } from '../types';
|
|
10
|
-
|
|
11
|
-
const getActionColor = (action: string): string => {
|
|
12
|
-
if (action.includes('add') || action.includes('create')) return '#34C759';
|
|
13
|
-
if (action.includes('remove') || action.includes('delete')) return '#FF3B30';
|
|
14
|
-
if (action.includes('update') || action.includes('set')) return '#007AFF';
|
|
15
|
-
return '#AF52DE';
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const getActionBgColor = (action: string): string => {
|
|
19
|
-
if (action.includes('add') || action.includes('create')) return 'rgba(52,199,89,0.1)';
|
|
20
|
-
if (action.includes('remove') || action.includes('delete')) return 'rgba(255,59,48,0.1)';
|
|
21
|
-
if (action.includes('update') || action.includes('set')) return 'rgba(0,122,255,0.1)';
|
|
22
|
-
return 'rgba(175,82,222,0.1)';
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const ZustandLogTab: React.FC<DebugFeatureRenderProps<ZustandLogEntry>> = React.memo(({
|
|
26
|
-
data,
|
|
27
|
-
}) => {
|
|
28
|
-
const [selected, setSelected] = useState<ZustandLogEntry | null>(null);
|
|
29
|
-
const { detailTranslateX, listTranslateX, listOpacity } = useSlideDetailAnimation(selected);
|
|
30
|
-
|
|
31
|
-
const renderItem = ({ item }: { item: ZustandLogEntry }) => (
|
|
32
|
-
<TouchableOpacity style={s.card} onPress={() => setSelected(item)} activeOpacity={0.6}>
|
|
33
|
-
<View style={s.cardRow}>
|
|
34
|
-
<View style={[s.actionIcon, { backgroundColor: getActionBgColor(item.action) }]}>
|
|
35
|
-
<View style={[s.actionDot, { backgroundColor: getActionColor(item.action) }]} />
|
|
36
|
-
</View>
|
|
37
|
-
<View style={s.cardContent}>
|
|
38
|
-
<View style={s.cardMeta}>
|
|
39
|
-
<Text style={s.action}>{item.action}</Text>
|
|
40
|
-
{item.storeName && (
|
|
41
|
-
<View style={s.storeBadge}>
|
|
42
|
-
<Text style={s.storeBadgeText}>{item.storeName}</Text>
|
|
43
|
-
</View>
|
|
44
|
-
)}
|
|
45
|
-
</View>
|
|
46
|
-
<Text style={s.time}>{new Date(item.timestamp).toLocaleTimeString()}</Text>
|
|
47
|
-
</View>
|
|
48
|
-
{item.actionCompleteTime != null && (
|
|
49
|
-
<View style={s.durationBadge}>
|
|
50
|
-
<Text style={s.durationText}>{item.actionCompleteTime}ms</Text>
|
|
51
|
-
</View>
|
|
52
|
-
)}
|
|
53
|
-
</View>
|
|
54
|
-
</TouchableOpacity>
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
const findChanges = (prev: unknown, next: unknown): string[] => {
|
|
58
|
-
if (typeof prev !== 'object' || typeof next !== 'object' || !prev || !next) return [];
|
|
59
|
-
const allKeys = new Set([...Object.keys(prev as object), ...Object.keys(next as object)]);
|
|
60
|
-
const changed: string[] = [];
|
|
61
|
-
allKeys.forEach((key) => {
|
|
62
|
-
const pv = (prev as Record<string, unknown>)[key];
|
|
63
|
-
const nv = (next as Record<string, unknown>)[key];
|
|
64
|
-
if (safeStringify(pv) !== safeStringify(nv)) changed.push(key);
|
|
65
|
-
});
|
|
66
|
-
return changed;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<View style={s.container}>
|
|
71
|
-
{/* List */}
|
|
72
|
-
<Animated.View style={[s.listWrap, selected ? { opacity: listOpacity, transform: [{ translateX: listTranslateX }] } : null]}>
|
|
73
|
-
{data.length === 0 ? (
|
|
74
|
-
<View style={s.emptyContainer}>
|
|
75
|
-
<Text style={s.emptyIcon}>~</Text>
|
|
76
|
-
<Text style={s.empty}>No Zustand state changes</Text>
|
|
77
|
-
</View>
|
|
78
|
-
) : (
|
|
79
|
-
<FlatList
|
|
80
|
-
data={[...data].reverse()}
|
|
81
|
-
renderItem={renderItem}
|
|
82
|
-
keyExtractor={(item) => item.id}
|
|
83
|
-
contentContainerStyle={s.listContent}
|
|
84
|
-
initialNumToRender={20}
|
|
85
|
-
maxToRenderPerBatch={10}
|
|
86
|
-
windowSize={5}
|
|
87
|
-
removeClippedSubviews={true}
|
|
88
|
-
/>
|
|
89
|
-
)}
|
|
90
|
-
</Animated.View>
|
|
91
|
-
|
|
92
|
-
{/* Detail (push navigation) */}
|
|
93
|
-
{selected && (
|
|
94
|
-
<Animated.View style={[s.detailOverlay, { transform: [{ translateX: detailTranslateX }] }]}>
|
|
95
|
-
<View style={s.detailWrap}>
|
|
96
|
-
<View style={s.detailHeader}>
|
|
97
|
-
<TouchableOpacity onPress={() => setSelected(null)} style={s.backBtn} activeOpacity={0.6}>
|
|
98
|
-
<Text style={s.backIcon}>‹</Text>
|
|
99
|
-
<Text style={s.backText}>Back</Text>
|
|
100
|
-
</TouchableOpacity>
|
|
101
|
-
<View style={s.detailHeaderCenter}>
|
|
102
|
-
<Text style={[s.detailAction, { color: getActionColor(selected.action) }]}>
|
|
103
|
-
{selected.action}
|
|
104
|
-
</Text>
|
|
105
|
-
{selected.storeName && (
|
|
106
|
-
<View style={s.storeBadge}>
|
|
107
|
-
<Text style={s.storeBadgeText}>{selected.storeName}</Text>
|
|
108
|
-
</View>
|
|
109
|
-
)}
|
|
110
|
-
</View>
|
|
111
|
-
</View>
|
|
112
|
-
<ScrollView style={s.detailBody} contentContainerStyle={s.detailBodyContent}>
|
|
113
|
-
{/* Meta */}
|
|
114
|
-
<View style={s.metaCard}>
|
|
115
|
-
<View style={s.metaItem}>
|
|
116
|
-
<Text style={s.metaLabel}>Time</Text>
|
|
117
|
-
<Text style={s.metaValue}>
|
|
118
|
-
{new Date(selected.timestamp).toLocaleString()}
|
|
119
|
-
</Text>
|
|
120
|
-
</View>
|
|
121
|
-
{selected.actionCompleteTime != null && (
|
|
122
|
-
<View style={s.metaDivider} />
|
|
123
|
-
)}
|
|
124
|
-
{selected.actionCompleteTime != null && (
|
|
125
|
-
<View style={s.metaItem}>
|
|
126
|
-
<Text style={s.metaLabel}>Duration</Text>
|
|
127
|
-
<Text style={s.metaValue}>{selected.actionCompleteTime}ms</Text>
|
|
128
|
-
</View>
|
|
129
|
-
)}
|
|
130
|
-
</View>
|
|
131
|
-
|
|
132
|
-
{/* Changed keys */}
|
|
133
|
-
{(() => {
|
|
134
|
-
const changes = findChanges(selected.prevState, selected.nextState);
|
|
135
|
-
if (changes.length === 0) return null;
|
|
136
|
-
return (
|
|
137
|
-
<View style={s.changesCard}>
|
|
138
|
-
<Text style={s.changesTitle}>Changed Keys</Text>
|
|
139
|
-
<View style={s.changesTags}>
|
|
140
|
-
{changes.map((key) => (
|
|
141
|
-
<View key={key} style={s.changeTag}>
|
|
142
|
-
<Text style={s.changeTagText}>{key}</Text>
|
|
143
|
-
</View>
|
|
144
|
-
))}
|
|
145
|
-
</View>
|
|
146
|
-
</View>
|
|
147
|
-
);
|
|
148
|
-
})()}
|
|
149
|
-
|
|
150
|
-
{/* Previous State */}
|
|
151
|
-
<CollapsibleSection title="Previous State">
|
|
152
|
-
<View style={s.sectionWithCopy}>
|
|
153
|
-
<CopyButton text={safeStringify(selected.prevState, 2)} label="Previous State" />
|
|
154
|
-
<JsonView data={selected.prevState} maxHeight={250} />
|
|
155
|
-
</View>
|
|
156
|
-
</CollapsibleSection>
|
|
157
|
-
|
|
158
|
-
{/* Next State */}
|
|
159
|
-
<CollapsibleSection title="Next State" initiallyExpanded>
|
|
160
|
-
<View style={s.sectionWithCopy}>
|
|
161
|
-
<CopyButton text={safeStringify(selected.nextState, 2)} label="Next State" />
|
|
162
|
-
<JsonView data={selected.nextState} maxHeight={250} />
|
|
163
|
-
</View>
|
|
164
|
-
</CollapsibleSection>
|
|
165
|
-
</ScrollView>
|
|
166
|
-
</View>
|
|
167
|
-
</Animated.View>
|
|
168
|
-
)}
|
|
169
|
-
</View>
|
|
170
|
-
);
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
const s = StyleSheet.create({
|
|
174
|
-
container: { flex: 1, backgroundColor: Colors.background },
|
|
175
|
-
listWrap: {
|
|
176
|
-
position: 'absolute',
|
|
177
|
-
top: 0,
|
|
178
|
-
left: 0,
|
|
179
|
-
right: 0,
|
|
180
|
-
bottom: 0,
|
|
181
|
-
},
|
|
182
|
-
listContent: { padding: 12 },
|
|
183
|
-
|
|
184
|
-
// Empty
|
|
185
|
-
emptyContainer: { flex: 1, alignItems: 'center', justifyContent: 'center' },
|
|
186
|
-
emptyIcon: { fontSize: 40, color: Colors.textLight, marginBottom: 4 },
|
|
187
|
-
empty: { textAlign: 'center', color: Colors.textLight, fontSize: 14 },
|
|
188
|
-
|
|
189
|
-
// Card
|
|
190
|
-
card: {
|
|
191
|
-
backgroundColor: Colors.surface,
|
|
192
|
-
borderRadius: 12,
|
|
193
|
-
marginBottom: 8,
|
|
194
|
-
overflow: 'hidden',
|
|
195
|
-
},
|
|
196
|
-
cardRow: { flexDirection: 'row', padding: 14, alignItems: 'center' },
|
|
197
|
-
actionIcon: {
|
|
198
|
-
width: 28,
|
|
199
|
-
height: 28,
|
|
200
|
-
borderRadius: 8,
|
|
201
|
-
alignItems: 'center',
|
|
202
|
-
justifyContent: 'center',
|
|
203
|
-
marginRight: 12,
|
|
204
|
-
},
|
|
205
|
-
actionDot: { width: 8, height: 8, borderRadius: 4 },
|
|
206
|
-
cardContent: { flex: 1 },
|
|
207
|
-
cardMeta: { flexDirection: 'row', alignItems: 'center', gap: 8, marginBottom: 3 },
|
|
208
|
-
action: { fontSize: 15, fontWeight: '600', color: Colors.text },
|
|
209
|
-
storeBadge: {
|
|
210
|
-
backgroundColor: 'rgba(0,122,255,0.08)',
|
|
211
|
-
paddingHorizontal: 8,
|
|
212
|
-
paddingVertical: 2,
|
|
213
|
-
borderRadius: 4,
|
|
214
|
-
},
|
|
215
|
-
storeBadgeText: { fontSize: 11, color: Colors.primary, fontWeight: '600' },
|
|
216
|
-
time: { fontSize: 12, color: Colors.textSecondary },
|
|
217
|
-
durationBadge: {
|
|
218
|
-
backgroundColor: Colors.background,
|
|
219
|
-
borderRadius: 8,
|
|
220
|
-
paddingHorizontal: 8,
|
|
221
|
-
paddingVertical: 4,
|
|
222
|
-
},
|
|
223
|
-
durationText: { fontSize: 12, color: Colors.textSecondary, fontWeight: '500' },
|
|
224
|
-
|
|
225
|
-
// Detail (push navigation)
|
|
226
|
-
detailOverlay: {
|
|
227
|
-
position: 'absolute',
|
|
228
|
-
top: 0,
|
|
229
|
-
left: 0,
|
|
230
|
-
right: 0,
|
|
231
|
-
bottom: 0,
|
|
232
|
-
backgroundColor: Colors.background,
|
|
233
|
-
},
|
|
234
|
-
detailWrap: { flex: 1, backgroundColor: Colors.background },
|
|
235
|
-
detailHeader: {
|
|
236
|
-
flexDirection: 'row',
|
|
237
|
-
alignItems: 'center',
|
|
238
|
-
paddingHorizontal: 8,
|
|
239
|
-
paddingVertical: 10,
|
|
240
|
-
backgroundColor: Colors.surface,
|
|
241
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
242
|
-
borderBottomColor: Colors.border,
|
|
243
|
-
},
|
|
244
|
-
backBtn: {
|
|
245
|
-
flexDirection: 'row',
|
|
246
|
-
alignItems: 'center',
|
|
247
|
-
paddingHorizontal: 6,
|
|
248
|
-
paddingVertical: 4,
|
|
249
|
-
borderRadius: 8,
|
|
250
|
-
marginRight: 8,
|
|
251
|
-
},
|
|
252
|
-
backIcon: {
|
|
253
|
-
fontSize: 24,
|
|
254
|
-
fontWeight: '300',
|
|
255
|
-
color: Colors.primary,
|
|
256
|
-
marginTop: -2,
|
|
257
|
-
marginRight: 2,
|
|
258
|
-
},
|
|
259
|
-
backText: {
|
|
260
|
-
fontSize: 16,
|
|
261
|
-
color: Colors.primary,
|
|
262
|
-
fontWeight: '500',
|
|
263
|
-
},
|
|
264
|
-
detailHeaderCenter: {
|
|
265
|
-
flexDirection: 'row',
|
|
266
|
-
alignItems: 'center',
|
|
267
|
-
gap: 10,
|
|
268
|
-
flex: 1,
|
|
269
|
-
},
|
|
270
|
-
detailAction: { fontSize: 17, fontWeight: '700' },
|
|
271
|
-
detailBody: { flex: 1 },
|
|
272
|
-
detailBodyContent: { padding: 12, paddingBottom: 40 },
|
|
273
|
-
sectionWithCopy: { gap: 8 },
|
|
274
|
-
|
|
275
|
-
// Meta
|
|
276
|
-
metaCard: {
|
|
277
|
-
backgroundColor: Colors.surface,
|
|
278
|
-
borderRadius: 12,
|
|
279
|
-
padding: 14,
|
|
280
|
-
marginBottom: 8,
|
|
281
|
-
flexDirection: 'row',
|
|
282
|
-
alignItems: 'center',
|
|
283
|
-
},
|
|
284
|
-
metaItem: { flex: 1 },
|
|
285
|
-
metaDivider: { width: 1, height: 28, backgroundColor: Colors.border, marginHorizontal: 12 },
|
|
286
|
-
metaLabel: { fontSize: 11, color: Colors.textSecondary, fontWeight: '600', textTransform: 'uppercase', marginBottom: 2 },
|
|
287
|
-
metaValue: { fontSize: 14, color: Colors.text, fontWeight: '500' },
|
|
288
|
-
|
|
289
|
-
// Changes
|
|
290
|
-
changesCard: {
|
|
291
|
-
backgroundColor: Colors.surface,
|
|
292
|
-
borderRadius: 12,
|
|
293
|
-
padding: 14,
|
|
294
|
-
marginBottom: 8,
|
|
295
|
-
},
|
|
296
|
-
changesTitle: { fontSize: 13, fontWeight: '600', color: Colors.textSecondary, marginBottom: 10 },
|
|
297
|
-
changesTags: { flexDirection: 'row', flexWrap: 'wrap', gap: 6 },
|
|
298
|
-
changeTag: {
|
|
299
|
-
backgroundColor: 'rgba(0,122,255,0.08)',
|
|
300
|
-
paddingHorizontal: 10,
|
|
301
|
-
paddingVertical: 4,
|
|
302
|
-
borderRadius: 6,
|
|
303
|
-
},
|
|
304
|
-
changeTagText: { fontSize: 12, color: Colors.primary, fontWeight: '600' },
|
|
305
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ClipboardTab } from '../components/ClipboardTab';
|
|
2
|
-
import type { DebugFeature } from '../types';
|
|
3
|
-
|
|
4
|
-
export const createClipboardFeature = (): DebugFeature<void> => ({
|
|
5
|
-
name: 'clipboard',
|
|
6
|
-
label: 'Clipboard',
|
|
7
|
-
renderContent: ClipboardTab,
|
|
8
|
-
setup: () => {},
|
|
9
|
-
getData: () => [],
|
|
10
|
-
cleanup: () => {},
|
|
11
|
-
});
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { ConsoleLogTab } from '../components/ConsoleLogTab';
|
|
2
|
-
import type { ConsoleLogEntry, DebugFeature } from '../types';
|
|
3
|
-
import { createEventChannel } from '../utils/createEventChannel';
|
|
4
|
-
import { createObservableStore } from '../utils/createObservableStore';
|
|
5
|
-
|
|
6
|
-
type ConsoleLogPayload = Omit<ConsoleLogEntry, 'id'>;
|
|
7
|
-
|
|
8
|
-
const DEFAULT_MAX_LOGS = 200;
|
|
9
|
-
const consoleChannel = createEventChannel<ConsoleLogPayload>();
|
|
10
|
-
const originalConsole: Partial<Record<ConsoleLogEntry['level'], (...args: unknown[]) => void>> =
|
|
11
|
-
{};
|
|
12
|
-
const LEVELS: ConsoleLogEntry['level'][] = ['log', 'info', 'warn', 'error'];
|
|
13
|
-
|
|
14
|
-
let consoleCaptureRefCount = 0;
|
|
15
|
-
|
|
16
|
-
function stopConsoleCapture(): void {
|
|
17
|
-
consoleCaptureRefCount = Math.max(0, consoleCaptureRefCount - 1);
|
|
18
|
-
|
|
19
|
-
if (consoleCaptureRefCount > 0) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
LEVELS.forEach((level) => {
|
|
24
|
-
const originalMethod = originalConsole[level];
|
|
25
|
-
|
|
26
|
-
if (!originalMethod) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
console[level] = originalMethod;
|
|
31
|
-
delete originalConsole[level];
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function startConsoleCapture(): () => void {
|
|
36
|
-
consoleCaptureRefCount += 1;
|
|
37
|
-
|
|
38
|
-
if (consoleCaptureRefCount > 1) {
|
|
39
|
-
return () => {
|
|
40
|
-
stopConsoleCapture();
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
LEVELS.forEach((level) => {
|
|
45
|
-
originalConsole[level] = console[level];
|
|
46
|
-
|
|
47
|
-
console[level] = (...args: unknown[]) => {
|
|
48
|
-
originalConsole[level]?.apply(console, args);
|
|
49
|
-
// Skip DebugToolkit's own copy-to-computer logs to avoid Console tab noise
|
|
50
|
-
if (level === 'log' && typeof args[0] === 'string' && args[0].startsWith('[DebugToolkit:Copy]')) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
consoleChannel.emit({
|
|
54
|
-
timestamp: Date.now(),
|
|
55
|
-
level,
|
|
56
|
-
data: args,
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
return () => {
|
|
62
|
-
stopConsoleCapture();
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface ConsoleFeatureConfig {
|
|
67
|
-
/** Maximum number of console logs to keep (default: 200) */
|
|
68
|
-
maxLogs?: number;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export const createConsoleLogFeature = (config?: ConsoleFeatureConfig): DebugFeature<ConsoleLogEntry> => {
|
|
72
|
-
const maxLogs = config?.maxLogs ?? DEFAULT_MAX_LOGS;
|
|
73
|
-
const logStore = createObservableStore<ConsoleLogEntry>();
|
|
74
|
-
let nextId = 0;
|
|
75
|
-
let initialized = false;
|
|
76
|
-
let unsubscribeLogs: (() => void) | null = null;
|
|
77
|
-
let stopCapture: (() => void) | null = null;
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
name: 'console',
|
|
81
|
-
label: 'Console',
|
|
82
|
-
renderContent: ConsoleLogTab,
|
|
83
|
-
setup: () => {
|
|
84
|
-
if (initialized) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
unsubscribeLogs = consoleChannel.subscribe((entry) => {
|
|
89
|
-
logStore.push(
|
|
90
|
-
{
|
|
91
|
-
...entry,
|
|
92
|
-
id: String(nextId++),
|
|
93
|
-
},
|
|
94
|
-
maxLogs,
|
|
95
|
-
);
|
|
96
|
-
});
|
|
97
|
-
stopCapture = startConsoleCapture();
|
|
98
|
-
initialized = true;
|
|
99
|
-
},
|
|
100
|
-
getData: () => logStore.getData(),
|
|
101
|
-
clear: () => {
|
|
102
|
-
logStore.clear();
|
|
103
|
-
},
|
|
104
|
-
cleanup: () => {
|
|
105
|
-
if (!initialized) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
unsubscribeLogs?.();
|
|
110
|
-
unsubscribeLogs = null;
|
|
111
|
-
stopCapture?.();
|
|
112
|
-
stopCapture = null;
|
|
113
|
-
logStore.clear();
|
|
114
|
-
initialized = false;
|
|
115
|
-
},
|
|
116
|
-
subscribe: (listener) => logStore.subscribe(listener),
|
|
117
|
-
};
|
|
118
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { NavigationLogTab } from '../components/NavigationLogTab';
|
|
2
|
-
import type { DebugFeature, NavigationLogEntry } from '../types';
|
|
3
|
-
import { createEventChannel } from '../utils/createEventChannel';
|
|
4
|
-
import { createObservableStore } from '../utils/createObservableStore';
|
|
5
|
-
|
|
6
|
-
type NavigationLogPayload = Omit<NavigationLogEntry, 'id'>;
|
|
7
|
-
|
|
8
|
-
const DEFAULT_MAX_LOGS = 200;
|
|
9
|
-
const navigationChannel = createEventChannel<NavigationLogPayload>();
|
|
10
|
-
|
|
11
|
-
export const addNavigationLog = (
|
|
12
|
-
action: string,
|
|
13
|
-
from: string,
|
|
14
|
-
to: string,
|
|
15
|
-
startTime?: number,
|
|
16
|
-
duration?: number,
|
|
17
|
-
debugLog?: string,
|
|
18
|
-
): void => {
|
|
19
|
-
navigationChannel.emit({
|
|
20
|
-
timestamp: Date.now(),
|
|
21
|
-
action,
|
|
22
|
-
from,
|
|
23
|
-
to,
|
|
24
|
-
startTime,
|
|
25
|
-
duration,
|
|
26
|
-
debugLog,
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export interface NavigationFeatureConfig {
|
|
31
|
-
/** Maximum number of navigation logs to keep (default: 200) */
|
|
32
|
-
maxLogs?: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const createNavigationLogFeature = (config?: NavigationFeatureConfig): DebugFeature<NavigationLogEntry> => {
|
|
36
|
-
const maxLogs = config?.maxLogs ?? DEFAULT_MAX_LOGS;
|
|
37
|
-
const logStore = createObservableStore<NavigationLogEntry>();
|
|
38
|
-
let nextId = 0;
|
|
39
|
-
let unsubscribeLogs: (() => void) | null = null;
|
|
40
|
-
let initialized = false;
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
name: 'navigation',
|
|
44
|
-
label: 'Navigation',
|
|
45
|
-
renderContent: NavigationLogTab,
|
|
46
|
-
setup: () => {
|
|
47
|
-
if (initialized) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
unsubscribeLogs = navigationChannel.subscribe((entry) => {
|
|
52
|
-
logStore.push(
|
|
53
|
-
{
|
|
54
|
-
...entry,
|
|
55
|
-
id: String(nextId++),
|
|
56
|
-
},
|
|
57
|
-
maxLogs,
|
|
58
|
-
);
|
|
59
|
-
});
|
|
60
|
-
initialized = true;
|
|
61
|
-
},
|
|
62
|
-
getData: () => logStore.getData(),
|
|
63
|
-
clear: () => {
|
|
64
|
-
logStore.clear();
|
|
65
|
-
},
|
|
66
|
-
cleanup: () => {
|
|
67
|
-
unsubscribeLogs?.();
|
|
68
|
-
unsubscribeLogs = null;
|
|
69
|
-
logStore.clear();
|
|
70
|
-
initialized = false;
|
|
71
|
-
},
|
|
72
|
-
subscribe: (listener) => logStore.subscribe(listener),
|
|
73
|
-
};
|
|
74
|
-
};
|