react-native-debug-toolkit 2.1.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 +54 -92
- package/README.zh-CN.md +50 -88
- package/lib/commonjs/core/DebugToolkit.js +33 -11
- package/lib/commonjs/core/DebugToolkit.js.map +1 -1
- package/lib/commonjs/core/DebugToolkitProvider.js +18 -12
- package/lib/commonjs/core/DebugToolkitProvider.js.map +1 -1
- package/lib/commonjs/{initialize.js → core/initialize.js} +17 -17
- package/lib/commonjs/core/initialize.js.map +1 -0
- package/lib/commonjs/{components → features/clipboard}/ClipboardTab.js +2 -2
- package/lib/commonjs/features/clipboard/ClipboardTab.js.map +1 -0
- package/lib/commonjs/features/{ClipboardFeature.js → clipboard/index.js} +3 -3
- package/lib/commonjs/features/clipboard/index.js.map +1 -0
- package/lib/commonjs/{components → features/console}/ConsoleLogTab.js +9 -9
- package/lib/commonjs/features/console/ConsoleLogTab.js.map +1 -0
- package/lib/commonjs/features/{ConsoleLogFeature.js → console/index.js} +10 -7
- package/lib/commonjs/features/console/index.js.map +1 -0
- package/lib/commonjs/{components → features/environment}/EnvironmentTab.js +3 -3
- package/lib/commonjs/features/environment/EnvironmentTab.js.map +1 -0
- package/lib/commonjs/features/{EnvironmentFeature.js → environment/index.js} +18 -13
- package/lib/commonjs/features/environment/index.js.map +1 -0
- package/lib/commonjs/{components → features/navigation}/NavigationLogTab.js +4 -3
- package/lib/commonjs/features/navigation/NavigationLogTab.js.map +1 -0
- package/lib/commonjs/features/{NavigationLogFeature.js → navigation/index.js} +4 -4
- 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/{components → features/network}/NetworkLogTab.js +8 -7
- package/lib/commonjs/features/network/NetworkLogTab.js.map +1 -0
- package/lib/commonjs/features/{NetworkFeature.js → network/index.js} +20 -31
- 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 +3 -2
- 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/{components → features/track}/TrackLogTab.js +8 -8
- package/lib/commonjs/features/track/TrackLogTab.js.map +1 -0
- package/lib/commonjs/features/{TrackFeature.js → track/index.js} +10 -5
- package/lib/commonjs/features/track/index.js.map +1 -0
- package/lib/commonjs/{components → features/zustand}/ZustandLogTab.js +8 -8
- package/lib/commonjs/features/zustand/ZustandLogTab.js.map +1 -0
- package/lib/commonjs/features/{ZustandLogFeature.js → zustand/index.js} +4 -4
- package/lib/commonjs/features/zustand/index.js.map +1 -0
- package/lib/commonjs/index.js +21 -21
- 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/{components → ui}/DebugView.js +2 -2
- package/lib/commonjs/ui/DebugView.js.map +1 -0
- package/lib/commonjs/{components → ui/floating}/FloatIcon.js +65 -12
- package/lib/commonjs/ui/floating/FloatIcon.js.map +1 -0
- package/lib/commonjs/{components → ui/panel}/DebugPanel.js +4 -4
- package/lib/commonjs/ui/panel/DebugPanel.js.map +1 -0
- package/lib/commonjs/{components → ui/panel}/FeatureTabBar.js +1 -1
- package/lib/commonjs/ui/panel/FeatureTabBar.js.map +1 -0
- package/lib/commonjs/{components → ui/panel}/FloatPanelView.js +36 -12
- package/lib/commonjs/ui/panel/FloatPanelView.js.map +1 -0
- package/lib/commonjs/{components → ui}/shared/CollapsibleSection.js +1 -1
- package/lib/commonjs/ui/shared/CollapsibleSection.js.map +1 -0
- package/lib/commonjs/{components → ui}/shared/CopyButton.js +1 -1
- package/lib/commonjs/ui/shared/CopyButton.js.map +1 -0
- package/lib/commonjs/ui/shared/JsonView.js.map +1 -0
- package/lib/commonjs/{components → ui}/shared/LogListScreen.js +2 -2
- package/lib/commonjs/ui/shared/LogListScreen.js.map +1 -0
- package/lib/commonjs/ui/shared/useSlideDetailAnimation.js.map +1 -0
- package/lib/commonjs/{utils → ui/theme}/colors.js +0 -5
- package/lib/commonjs/ui/theme/colors.js.map +1 -0
- package/lib/commonjs/ui/theme/layout.js.map +1 -0
- package/lib/commonjs/utils/createChannelFeature.js +18 -4
- package/lib/commonjs/utils/createChannelFeature.js.map +1 -1
- 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/module/core/DebugToolkit.js +33 -11
- package/lib/module/core/DebugToolkit.js.map +1 -1
- package/lib/module/core/DebugToolkitProvider.js +18 -12
- package/lib/module/core/DebugToolkitProvider.js.map +1 -1
- package/lib/module/{initialize.js → core/initialize.js} +10 -10
- package/lib/module/core/initialize.js.map +1 -0
- package/lib/module/{components → features/clipboard}/ClipboardTab.js +2 -2
- package/lib/module/features/clipboard/ClipboardTab.js.map +1 -0
- package/lib/module/features/{ClipboardFeature.js → clipboard/index.js} +3 -3
- package/lib/module/features/clipboard/index.js.map +1 -0
- package/lib/module/{components → features/console}/ConsoleLogTab.js +9 -9
- package/lib/module/features/console/ConsoleLogTab.js.map +1 -0
- package/lib/module/features/{ConsoleLogFeature.js → console/index.js} +10 -7
- package/lib/module/features/console/index.js.map +1 -0
- package/lib/module/{components → features/environment}/EnvironmentTab.js +3 -3
- package/lib/module/features/environment/EnvironmentTab.js.map +1 -0
- package/lib/module/features/{EnvironmentFeature.js → environment/index.js} +18 -13
- 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/{NavigationLogFeature.js → navigation/index.js} +4 -4
- 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/{components → features/network}/NetworkLogTab.js +8 -7
- package/lib/module/features/network/NetworkLogTab.js.map +1 -0
- package/lib/module/features/{NetworkFeature.js → network/index.js} +20 -31
- 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/{components → features/track}/TrackLogTab.js +8 -8
- package/lib/module/features/track/TrackLogTab.js.map +1 -0
- package/lib/module/features/{TrackFeature.js → track/index.js} +10 -5
- package/lib/module/features/track/index.js.map +1 -0
- package/lib/module/{components → features/zustand}/ZustandLogTab.js +8 -8
- package/lib/module/features/zustand/ZustandLogTab.js.map +1 -0
- package/lib/module/features/{ZustandLogFeature.js → zustand/index.js} +4 -4
- package/lib/module/features/zustand/index.js.map +1 -0
- package/lib/module/index.js +11 -11
- 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/{components → ui}/DebugView.js +2 -2
- package/lib/module/ui/DebugView.js.map +1 -0
- package/lib/module/{components → ui/floating}/FloatIcon.js +66 -13
- package/lib/module/ui/floating/FloatIcon.js.map +1 -0
- package/lib/module/{components → ui/panel}/DebugPanel.js +4 -4
- package/lib/module/ui/panel/DebugPanel.js.map +1 -0
- package/lib/module/{components → ui/panel}/FeatureTabBar.js +1 -1
- package/lib/module/ui/panel/FeatureTabBar.js.map +1 -0
- package/lib/module/{components → ui/panel}/FloatPanelView.js +36 -12
- 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/{components → ui}/shared/LogListScreen.js +2 -2
- package/lib/module/ui/shared/LogListScreen.js.map +1 -0
- package/lib/module/ui/shared/useSlideDetailAnimation.js.map +1 -0
- package/lib/module/{utils → ui/theme}/colors.js +0 -5
- package/lib/module/ui/theme/colors.js.map +1 -0
- package/lib/module/ui/theme/layout.js.map +1 -0
- package/lib/module/utils/createChannelFeature.js +18 -4
- package/lib/module/utils/createChannelFeature.js.map +1 -1
- 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/typescript/src/core/DebugToolkit.d.ts +7 -3
- package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
- package/lib/typescript/src/core/DebugToolkitProvider.d.ts +2 -2
- package/lib/typescript/src/core/DebugToolkitProvider.d.ts.map +1 -1
- package/lib/typescript/src/{initialize.d.ts → core/initialize.d.ts} +7 -7
- 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/{ClipboardFeature.d.ts → clipboard/index.d.ts} +3 -3
- 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/{ConsoleLogFeature.d.ts → console/index.d.ts} +3 -3
- 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} +3 -3
- package/lib/typescript/src/features/navigation/index.d.ts.map +1 -0
- package/lib/typescript/src/{hooks → features/navigation}/useNavigationLogger.d.ts +1 -1
- 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} +3 -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} +3 -3
- package/lib/typescript/src/features/zustand/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +19 -19
- 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 -108
- 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/{components → ui}/DebugView.d.ts +1 -1
- package/lib/typescript/src/ui/DebugView.d.ts.map +1 -0
- package/lib/typescript/src/ui/floating/FloatIcon.d.ts.map +1 -0
- package/lib/typescript/src/ui/panel/DebugPanel.d.ts.map +1 -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.map +1 -0
- package/lib/typescript/src/ui/shared/useSlideDetailAnimation.d.ts.map +1 -0
- package/lib/typescript/src/ui/theme/colors.d.ts.map +1 -0
- package/lib/typescript/src/ui/theme/layout.d.ts.map +1 -0
- package/lib/typescript/src/utils/createChannelFeature.d.ts +12 -3
- package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -1
- 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/package.json +1 -1
- package/src/core/DebugToolkit.tsx +37 -11
- package/src/core/DebugToolkitProvider.tsx +20 -13
- package/src/{initialize.ts → core/initialize.ts} +16 -16
- package/src/{components → features/clipboard}/ClipboardTab.tsx +4 -4
- package/src/features/{ClipboardFeature.ts → clipboard/index.ts} +4 -4
- package/src/{components → features/console}/ConsoleLogTab.tsx +10 -10
- package/src/features/{ConsoleLogFeature.ts → console/index.ts} +11 -8
- package/src/{components → features/environment}/EnvironmentTab.tsx +5 -5
- package/src/features/{EnvironmentFeature.ts → environment/index.ts} +23 -13
- package/src/{components → features/navigation}/NavigationLogTab.tsx +6 -5
- package/src/features/{NavigationLogFeature.ts → navigation/index.ts} +5 -5
- package/src/{hooks → features/navigation}/useNavigationLogger.ts +3 -3
- package/src/{components → features/network}/NetworkLogTab.tsx +10 -9
- package/src/features/{NetworkFeature.ts → network/index.ts} +26 -39
- package/src/features/network/networkInterceptor.ts +311 -0
- package/src/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.tsx +5 -4
- package/src/features/{ThirdPartyLibsFeature.ts → thirdPartyLibs/index.ts} +5 -5
- package/src/{components → features/track}/TrackLogTab.tsx +9 -9
- package/src/features/{TrackFeature.ts → track/index.ts} +13 -6
- package/src/{components → features/zustand}/ZustandLogTab.tsx +10 -10
- package/src/features/{ZustandLogFeature.ts → zustand/index.ts} +5 -5
- package/src/index.ts +19 -19
- package/src/types/environment.ts +11 -0
- package/src/types/feature.ts +32 -0
- package/src/types/index.ts +29 -127
- package/src/types/logs.ts +54 -0
- package/src/types/navigation.ts +5 -0
- package/src/types/thirdPartyLibs.ts +13 -0
- package/src/{components → ui}/DebugView.tsx +3 -3
- package/src/{components → ui/floating}/FloatIcon.tsx +60 -29
- package/src/{components → ui/panel}/DebugPanel.tsx +4 -4
- package/src/{components → ui/panel}/FeatureTabBar.tsx +1 -1
- package/src/{components → ui/panel}/FloatPanelView.tsx +38 -13
- package/src/{components → ui}/shared/CollapsibleSection.tsx +1 -1
- package/src/{components → ui}/shared/CopyButton.tsx +1 -1
- package/src/{components → ui}/shared/LogListScreen.tsx +2 -2
- package/src/{utils → ui/theme}/colors.ts +0 -5
- package/src/utils/createChannelFeature.ts +32 -7
- package/src/utils/createObservableStore.ts +6 -0
- package/src/utils/createPersistedObservableStore.ts +76 -0
- package/src/utils/debugPreferences.ts +48 -0
- package/lib/commonjs/components/ClipboardTab.js.map +0 -1
- package/lib/commonjs/components/ConsoleLogTab.js.map +0 -1
- package/lib/commonjs/components/DebugPanel.js.map +0 -1
- package/lib/commonjs/components/DebugView.js.map +0 -1
- package/lib/commonjs/components/EnvironmentTab.js.map +0 -1
- package/lib/commonjs/components/FeatureTabBar.js.map +0 -1
- package/lib/commonjs/components/FloatIcon.js.map +0 -1
- package/lib/commonjs/components/FloatPanelView.js.map +0 -1
- package/lib/commonjs/components/NavigationLogTab.js.map +0 -1
- package/lib/commonjs/components/NetworkLogTab.js.map +0 -1
- package/lib/commonjs/components/ThirdPartyLibsTab.js.map +0 -1
- package/lib/commonjs/components/TrackLogTab.js.map +0 -1
- 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/components/shared/LogListScreen.js.map +0 -1
- package/lib/commonjs/features/ClipboardFeature.js.map +0 -1
- package/lib/commonjs/features/ConsoleLogFeature.js.map +0 -1
- package/lib/commonjs/features/EnvironmentFeature.js.map +0 -1
- package/lib/commonjs/features/NavigationLogFeature.js.map +0 -1
- package/lib/commonjs/features/NetworkFeature.js.map +0 -1
- package/lib/commonjs/features/ThirdPartyLibsFeature.js.map +0 -1
- package/lib/commonjs/features/TrackFeature.js.map +0 -1
- 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.map +0 -1
- package/lib/commonjs/interceptors/networkInterceptor.js +0 -466
- package/lib/commonjs/interceptors/networkInterceptor.js.map +0 -1
- package/lib/commonjs/native/NativeDebugLibs.js.map +0 -1
- package/lib/commonjs/utils/colors.js.map +0 -1
- package/lib/commonjs/utils/layout.js.map +0 -1
- package/lib/module/components/ClipboardTab.js.map +0 -1
- package/lib/module/components/ConsoleLogTab.js.map +0 -1
- package/lib/module/components/DebugPanel.js.map +0 -1
- package/lib/module/components/DebugView.js.map +0 -1
- package/lib/module/components/EnvironmentTab.js.map +0 -1
- package/lib/module/components/FeatureTabBar.js.map +0 -1
- package/lib/module/components/FloatIcon.js.map +0 -1
- package/lib/module/components/FloatPanelView.js.map +0 -1
- package/lib/module/components/NavigationLogTab.js.map +0 -1
- package/lib/module/components/NetworkLogTab.js.map +0 -1
- package/lib/module/components/ThirdPartyLibsTab.js.map +0 -1
- package/lib/module/components/TrackLogTab.js.map +0 -1
- 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/components/shared/LogListScreen.js.map +0 -1
- package/lib/module/features/ClipboardFeature.js.map +0 -1
- package/lib/module/features/ConsoleLogFeature.js.map +0 -1
- package/lib/module/features/EnvironmentFeature.js.map +0 -1
- package/lib/module/features/NavigationLogFeature.js.map +0 -1
- package/lib/module/features/NetworkFeature.js.map +0 -1
- package/lib/module/features/ThirdPartyLibsFeature.js.map +0 -1
- package/lib/module/features/TrackFeature.js.map +0 -1
- 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.map +0 -1
- package/lib/module/interceptors/networkInterceptor.js +0 -460
- package/lib/module/interceptors/networkInterceptor.js.map +0 -1
- package/lib/module/native/NativeDebugLibs.js.map +0 -1
- package/lib/module/utils/colors.js.map +0 -1
- package/lib/module/utils/layout.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/DebugPanel.d.ts.map +0 -1
- package/lib/typescript/src/components/DebugView.d.ts.map +0 -1
- package/lib/typescript/src/components/EnvironmentTab.d.ts.map +0 -1
- package/lib/typescript/src/components/FeatureTabBar.d.ts.map +0 -1
- package/lib/typescript/src/components/FloatIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/FloatPanelView.d.ts +0 -9
- 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/components/shared/LogListScreen.d.ts.map +0 -1
- package/lib/typescript/src/features/ClipboardFeature.d.ts.map +0 -1
- 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 -15
- 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.map +0 -1
- package/lib/typescript/src/interceptors/networkInterceptor.d.ts +0 -18
- package/lib/typescript/src/interceptors/networkInterceptor.d.ts.map +0 -1
- package/lib/typescript/src/native/NativeDebugLibs.d.ts.map +0 -1
- package/lib/typescript/src/utils/colors.d.ts.map +0 -1
- package/lib/typescript/src/utils/layout.d.ts.map +0 -1
- package/src/interceptors/networkInterceptor.ts +0 -646
- /package/lib/commonjs/{components → ui}/shared/JsonView.js +0 -0
- /package/lib/commonjs/{hooks → ui/shared}/useSlideDetailAnimation.js +0 -0
- /package/lib/commonjs/{utils → ui/theme}/layout.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/module/{utils → ui/theme}/layout.js +0 -0
- /package/lib/typescript/src/{components → ui/floating}/FloatIcon.d.ts +0 -0
- /package/lib/typescript/src/{components → ui/panel}/DebugPanel.d.ts +0 -0
- /package/lib/typescript/src/{components → ui/panel}/FeatureTabBar.d.ts +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/{components → ui}/shared/LogListScreen.d.ts +0 -0
- /package/lib/typescript/src/{hooks → ui/shared}/useSlideDetailAnimation.d.ts +0 -0
- /package/lib/typescript/src/{utils → ui/theme}/colors.d.ts +0 -0
- /package/lib/typescript/src/{utils → ui/theme}/layout.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
- /package/src/{utils → ui/theme}/layout.ts +0 -0
package/README.md
CHANGED
|
@@ -6,15 +6,19 @@ A dev-only floating debug panel for React Native — inspect network, console, s
|
|
|
6
6
|
|
|
7
7
|
> Zero impact on production builds (`__DEV__` only).
|
|
8
8
|
|
|
9
|
+
## Preview
|
|
10
|
+
|
|
11
|
+

|
|
9
12
|
## Features
|
|
10
13
|
|
|
11
|
-
- **Network** — Auto-intercepts fetch
|
|
14
|
+
- **Network** — Auto-intercepts fetch; axios via `axiosInstance` config, inspect requests & responses, copy as cURL
|
|
12
15
|
- **Console** — Capture `console.log / info / warn / error`
|
|
13
16
|
- **Zustand** — Log state transitions via middleware
|
|
14
17
|
- **Navigation** — Track route changes
|
|
15
18
|
- **Track** — Record custom analytics events
|
|
16
19
|
- **Environment** — Switch API hosts on the fly
|
|
17
20
|
- **Clipboard** — Paste text and copy to computer
|
|
21
|
+
- **Log Persistence** — Network, Console, Track logs survive app restarts (requires AsyncStorage)
|
|
18
22
|
|
|
19
23
|
## Installation
|
|
20
24
|
|
|
@@ -28,6 +32,14 @@ Optional — clipboard copy support:
|
|
|
28
32
|
npm install @react-native-clipboard/clipboard
|
|
29
33
|
```
|
|
30
34
|
|
|
35
|
+
Optional — FAB position & last tab persistence:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @react-native-async-storage/async-storage
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Without AsyncStorage these features degrade gracefully to in-memory state.
|
|
42
|
+
|
|
31
43
|
## Quick Start
|
|
32
44
|
|
|
33
45
|
```tsx
|
|
@@ -42,11 +54,21 @@ function App() {
|
|
|
42
54
|
}
|
|
43
55
|
```
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
A floating debug button appears in dev mode. Tap to open the panel, tap × or swipe down to close.
|
|
58
|
+
|
|
59
|
+
Network (fetch), console, navigation, zustand, track, and clipboard are enabled by default. To capture axios requests, pass your axios instance via the `axiosInstance` config option.
|
|
60
|
+
|
|
61
|
+
Disable specific features:
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<DebugView features={{ clipboard: false, zustand: false }}>
|
|
65
|
+
<AppContent />
|
|
66
|
+
</DebugView>
|
|
67
|
+
```
|
|
46
68
|
|
|
47
|
-
|
|
69
|
+
## Common Patterns
|
|
48
70
|
|
|
49
|
-
###
|
|
71
|
+
### Navigation Tracking
|
|
50
72
|
|
|
51
73
|
```tsx
|
|
52
74
|
import { useRef } from 'react';
|
|
@@ -65,7 +87,7 @@ function App() {
|
|
|
65
87
|
}
|
|
66
88
|
```
|
|
67
89
|
|
|
68
|
-
###
|
|
90
|
+
### Environment Switching
|
|
69
91
|
|
|
70
92
|
```tsx
|
|
71
93
|
<DebugView
|
|
@@ -78,41 +100,7 @@ function App() {
|
|
|
78
100
|
</DebugView>
|
|
79
101
|
```
|
|
80
102
|
|
|
81
|
-
###
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
<DebugView features={{ clipboard: false, zustand: false }}>
|
|
85
|
-
<AppContent />
|
|
86
|
-
</DebugView>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## `<DebugView>` Props
|
|
90
|
-
|
|
91
|
-
| Prop | Type | Default | Description |
|
|
92
|
-
|------|------|---------|-------------|
|
|
93
|
-
| `children` | `ReactNode` | — | App content |
|
|
94
|
-
| `features` | `Partial<FeatureConfigs>` | all enabled | Enable/disable features |
|
|
95
|
-
| `navigationRef` | `RefObject` | — | Navigation container ref |
|
|
96
|
-
| `environments` | `EnvironmentConfig[]` | — | Environment configs |
|
|
97
|
-
| `enabled` | `boolean` | `__DEV__` | Force enable/disable |
|
|
98
|
-
|
|
99
|
-
### Per-feature options
|
|
100
|
-
|
|
101
|
-
| Feature | Options |
|
|
102
|
-
|---------|---------|
|
|
103
|
-
| `network` | `maxLogs`, `blacklist` |
|
|
104
|
-
| `console` | `maxLogs` |
|
|
105
|
-
| `zustand` | `maxLogs` |
|
|
106
|
-
| `navigation` | `maxLogs` |
|
|
107
|
-
| `track` | `maxLogs` |
|
|
108
|
-
| `environment` | `EnvironmentConfig[]` |
|
|
109
|
-
| `clipboard` | — |
|
|
110
|
-
|
|
111
|
-
All `maxLogs` default to **200**.
|
|
112
|
-
|
|
113
|
-
## Usage Examples
|
|
114
|
-
|
|
115
|
-
### Zustand middleware
|
|
103
|
+
### Zustand Middleware
|
|
116
104
|
|
|
117
105
|
```tsx
|
|
118
106
|
import { zustandLogMiddleware } from 'react-native-debug-toolkit';
|
|
@@ -121,11 +109,12 @@ const useStore = create(
|
|
|
121
109
|
zustandLogMiddleware((set) => ({
|
|
122
110
|
count: 0,
|
|
123
111
|
increment: () => set((s) => ({ count: s.count + 1 }), false, 'increment'),
|
|
112
|
+
// ↑ merge ↑ action name (shown in debug panel)
|
|
124
113
|
}))
|
|
125
114
|
);
|
|
126
115
|
```
|
|
127
116
|
|
|
128
|
-
### Custom
|
|
117
|
+
### Custom Events
|
|
129
118
|
|
|
130
119
|
```tsx
|
|
131
120
|
import { addTrackLog } from 'react-native-debug-toolkit';
|
|
@@ -133,68 +122,40 @@ import { addTrackLog } from 'react-native-debug-toolkit';
|
|
|
133
122
|
addTrackLog({ eventName: 'button_click', buttonId: 'submit' });
|
|
134
123
|
```
|
|
135
124
|
|
|
136
|
-
###
|
|
137
|
-
|
|
138
|
-
```tsx
|
|
139
|
-
import { copyToComputer } from 'react-native-debug-toolkit';
|
|
140
|
-
|
|
141
|
-
await copyToComputer(jsonString);
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Advanced: Imperative API
|
|
145
|
-
|
|
146
|
-
For programmatic control outside React components:
|
|
125
|
+
### Network Blacklist & Axios
|
|
147
126
|
|
|
148
127
|
```tsx
|
|
149
|
-
import
|
|
128
|
+
import axios from 'axios';
|
|
150
129
|
|
|
151
|
-
const
|
|
152
|
-
features: { network: { maxLogs: 100 }, console: true },
|
|
153
|
-
enabled: true,
|
|
154
|
-
});
|
|
130
|
+
const api = axios.create({ baseURL: 'https://api.example.com' });
|
|
155
131
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
132
|
+
<DebugView
|
|
133
|
+
features={{
|
|
134
|
+
network: {
|
|
135
|
+
maxLogs: 100,
|
|
136
|
+
blacklist: ['/analytics', /\/healthcheck$/],
|
|
137
|
+
axiosInstance: api,
|
|
138
|
+
},
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<AppContent />
|
|
142
|
+
</DebugView>
|
|
159
143
|
```
|
|
160
144
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
| Method | Description |
|
|
164
|
-
|--------|-------------|
|
|
165
|
-
| `showPanel()` / `hidePanel()` | Toggle visibility |
|
|
166
|
-
| `clearAll()` | Clear all data |
|
|
167
|
-
| `addFeature(f)` / `removeFeature(name)` | Manage features at runtime |
|
|
168
|
-
| `destroy()` | Full teardown |
|
|
169
|
-
| `features` | Active features (read-only) |
|
|
145
|
+
## Imperative API
|
|
170
146
|
|
|
171
|
-
|
|
147
|
+
For programmatic control outside React (notifications, deep links, dev-only buttons):
|
|
172
148
|
|
|
173
149
|
```tsx
|
|
174
|
-
import
|
|
175
|
-
|
|
176
|
-
const myFeature: DebugFeature<MyData> = {
|
|
177
|
-
name: 'myFeature',
|
|
178
|
-
label: 'My Feature',
|
|
179
|
-
setup: () => { /* start capturing */ },
|
|
180
|
-
getData: () => myDataArray,
|
|
181
|
-
cleanup: () => { /* stop capturing */ },
|
|
182
|
-
clear: () => { /* reset data */ },
|
|
183
|
-
subscribe: (cb) => { emitter.on('change', cb); return () => emitter.off('change', cb); },
|
|
184
|
-
renderContent: MyFeatureTab,
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const toolkit = initializeDebugToolkit();
|
|
188
|
-
toolkit?.addFeature(myFeature);
|
|
189
|
-
```
|
|
150
|
+
import { DebugToolkit } from 'react-native-debug-toolkit';
|
|
190
151
|
|
|
191
|
-
|
|
152
|
+
DebugToolkit.openPanel();
|
|
153
|
+
DebugToolkit.clearAll();
|
|
154
|
+
DebugToolkit.showLauncher();
|
|
155
|
+
DebugToolkit.hideLauncher();
|
|
156
|
+
```
|
|
192
157
|
|
|
193
|
-
|
|
194
|
-
|--------|-------------|
|
|
195
|
-
| `safeStringify(value, space?)` | JSON stringify with circular-ref protection |
|
|
196
|
-
| `copyToComputer(content, options?)` | Copy content to computer |
|
|
197
|
-
| `logToComputer(...args)` | Log to computer console |
|
|
158
|
+
Full API: `DebugToolkit` is a singleton with `openPanel`, `closePanel`, `togglePanel`, `clearAll`, `showLauncher`, `hideLauncher`, `addFeature`, `removeFeature`, `destroy`, `features`, `panelOpen`. See TypeScript types for details.
|
|
198
159
|
|
|
199
160
|
## Peer Dependencies
|
|
200
161
|
|
|
@@ -203,6 +164,7 @@ toolkit?.addFeature(myFeature);
|
|
|
203
164
|
| react | >= 18.0.0 | Yes |
|
|
204
165
|
| react-native | >= 0.72.0 | Yes |
|
|
205
166
|
| @react-native-clipboard/clipboard | >= 1.0.0 | No |
|
|
167
|
+
| @react-native-async-storage/async-storage | >= 1.0.0 | No |
|
|
206
168
|
|
|
207
169
|
## License
|
|
208
170
|
|
package/README.zh-CN.md
CHANGED
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
> 生产环境零影响(仅在 `__DEV__` 模式下运行)。
|
|
8
8
|
|
|
9
|
+
## 预览
|
|
10
|
+
|
|
11
|
+

|
|
9
12
|
## 功能
|
|
10
13
|
|
|
11
|
-
- **Network** — 自动拦截 fetch
|
|
14
|
+
- **Network** — 自动拦截 fetch;axios 通过 `axiosInstance` 配置,查看请求与响应,复制为 cURL
|
|
12
15
|
- **Console** — 捕获 `console.log / info / warn / error`
|
|
13
16
|
- **Zustand** — 通过中间件记录状态变化
|
|
14
17
|
- **Navigation** — 追踪路由切换
|
|
15
18
|
- **Track** — 记录自定义埋点事件
|
|
16
19
|
- **Environment** — 运行时切换 API 环境
|
|
17
20
|
- **Clipboard** — 粘贴文本并复制到电脑
|
|
21
|
+
- **日志持久化** — Network、Console、Track 日志在应用重启后保留(需要 AsyncStorage)
|
|
18
22
|
|
|
19
23
|
## 安装
|
|
20
24
|
|
|
@@ -28,6 +32,14 @@ npm install react-native-debug-toolkit
|
|
|
28
32
|
npm install @react-native-clipboard/clipboard
|
|
29
33
|
```
|
|
30
34
|
|
|
35
|
+
可选 — FAB 位置与上次 Tab 持久化:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @react-native-async-storage/async-storage
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
未安装 AsyncStorage 时,这些功能会优雅降级为内存态。
|
|
42
|
+
|
|
31
43
|
## 快速开始
|
|
32
44
|
|
|
33
45
|
```tsx
|
|
@@ -42,9 +54,19 @@ function App() {
|
|
|
42
54
|
}
|
|
43
55
|
```
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
开发模式下出现浮动调试按钮。点击打开面板,点击 × 或下滑关闭。
|
|
58
|
+
|
|
59
|
+
网络(fetch)、控制台、导航、Zustand、埋点和剪贴板默认启用。如需捕获 axios 请求,通过 `axiosInstance` 配置项传入你的 axios 实例。
|
|
60
|
+
|
|
61
|
+
禁用特定功能:
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<DebugView features={{ clipboard: false, zustand: false }}>
|
|
65
|
+
<AppContent />
|
|
66
|
+
</DebugView>
|
|
67
|
+
```
|
|
46
68
|
|
|
47
|
-
|
|
69
|
+
## 常用模式
|
|
48
70
|
|
|
49
71
|
### 导航追踪
|
|
50
72
|
|
|
@@ -78,40 +100,6 @@ function App() {
|
|
|
78
100
|
</DebugView>
|
|
79
101
|
```
|
|
80
102
|
|
|
81
|
-
### 禁用特定功能
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
<DebugView features={{ clipboard: false, zustand: false }}>
|
|
85
|
-
<AppContent />
|
|
86
|
-
</DebugView>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## `<DebugView>` 属性
|
|
90
|
-
|
|
91
|
-
| 属性 | 类型 | 默认值 | 说明 |
|
|
92
|
-
|------|------|--------|------|
|
|
93
|
-
| `children` | `ReactNode` | — | 应用内容 |
|
|
94
|
-
| `features` | `Partial<FeatureConfigs>` | 全部启用 | 启用/禁用功能 |
|
|
95
|
-
| `navigationRef` | `RefObject` | — | 导航容器 ref |
|
|
96
|
-
| `environments` | `EnvironmentConfig[]` | — | 环境配置 |
|
|
97
|
-
| `enabled` | `boolean` | `__DEV__` | 强制启用/禁用 |
|
|
98
|
-
|
|
99
|
-
### 功能配置项
|
|
100
|
-
|
|
101
|
-
| 功能 | 配置项 |
|
|
102
|
-
|------|--------|
|
|
103
|
-
| `network` | `maxLogs`, `blacklist` |
|
|
104
|
-
| `console` | `maxLogs` |
|
|
105
|
-
| `zustand` | `maxLogs` |
|
|
106
|
-
| `navigation` | `maxLogs` |
|
|
107
|
-
| `track` | `maxLogs` |
|
|
108
|
-
| `environment` | `EnvironmentConfig[]` |
|
|
109
|
-
| `clipboard` | — |
|
|
110
|
-
|
|
111
|
-
所有 `maxLogs` 默认值为 **200**。
|
|
112
|
-
|
|
113
|
-
## 使用示例
|
|
114
|
-
|
|
115
103
|
### Zustand 中间件
|
|
116
104
|
|
|
117
105
|
```tsx
|
|
@@ -121,6 +109,7 @@ const useStore = create(
|
|
|
121
109
|
zustandLogMiddleware((set) => ({
|
|
122
110
|
count: 0,
|
|
123
111
|
increment: () => set((s) => ({ count: s.count + 1 }), false, 'increment'),
|
|
112
|
+
// ↑ merge ↑ action 名称(显示在调试面板)
|
|
124
113
|
}))
|
|
125
114
|
);
|
|
126
115
|
```
|
|
@@ -133,68 +122,40 @@ import { addTrackLog } from 'react-native-debug-toolkit';
|
|
|
133
122
|
addTrackLog({ eventName: 'button_click', buttonId: 'submit' });
|
|
134
123
|
```
|
|
135
124
|
|
|
136
|
-
###
|
|
137
|
-
|
|
138
|
-
```tsx
|
|
139
|
-
import { copyToComputer } from 'react-native-debug-toolkit';
|
|
140
|
-
|
|
141
|
-
await copyToComputer(jsonString);
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## 高级:命令式 API
|
|
145
|
-
|
|
146
|
-
用于 React 组件外的编程控制:
|
|
125
|
+
### 网络黑名单 & Axios
|
|
147
126
|
|
|
148
127
|
```tsx
|
|
149
|
-
import
|
|
128
|
+
import axios from 'axios';
|
|
150
129
|
|
|
151
|
-
const
|
|
152
|
-
features: { network: { maxLogs: 100 }, console: true },
|
|
153
|
-
enabled: true,
|
|
154
|
-
});
|
|
130
|
+
const api = axios.create({ baseURL: 'https://api.example.com' });
|
|
155
131
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
132
|
+
<DebugView
|
|
133
|
+
features={{
|
|
134
|
+
network: {
|
|
135
|
+
maxLogs: 100,
|
|
136
|
+
blacklist: ['/analytics', /\/healthcheck$/],
|
|
137
|
+
axiosInstance: api,
|
|
138
|
+
},
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<AppContent />
|
|
142
|
+
</DebugView>
|
|
159
143
|
```
|
|
160
144
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
| 方法 | 说明 |
|
|
164
|
-
|------|------|
|
|
165
|
-
| `showPanel()` / `hidePanel()` | 切换面板显示 |
|
|
166
|
-
| `clearAll()` | 清除所有数据 |
|
|
167
|
-
| `addFeature(f)` / `removeFeature(name)` | 运行时管理功能 |
|
|
168
|
-
| `destroy()` | 完全销毁 |
|
|
169
|
-
| `features` | 当前功能列表(只读) |
|
|
145
|
+
## 命令式 API
|
|
170
146
|
|
|
171
|
-
|
|
147
|
+
用于 React 外部的编程控制(通知、深度链接、开发专用按钮):
|
|
172
148
|
|
|
173
149
|
```tsx
|
|
174
|
-
import
|
|
175
|
-
|
|
176
|
-
const myFeature: DebugFeature<MyData> = {
|
|
177
|
-
name: 'myFeature',
|
|
178
|
-
label: '我的功能',
|
|
179
|
-
setup: () => { /* 开始捕获 */ },
|
|
180
|
-
getData: () => myDataArray,
|
|
181
|
-
cleanup: () => { /* 停止捕获 */ },
|
|
182
|
-
clear: () => { /* 重置数据 */ },
|
|
183
|
-
subscribe: (cb) => { emitter.on('change', cb); return () => emitter.off('change', cb); },
|
|
184
|
-
renderContent: MyFeatureTab,
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const toolkit = initializeDebugToolkit();
|
|
188
|
-
toolkit?.addFeature(myFeature);
|
|
189
|
-
```
|
|
150
|
+
import { DebugToolkit } from 'react-native-debug-toolkit';
|
|
190
151
|
|
|
191
|
-
|
|
152
|
+
DebugToolkit.openPanel();
|
|
153
|
+
DebugToolkit.clearAll();
|
|
154
|
+
DebugToolkit.showLauncher();
|
|
155
|
+
DebugToolkit.hideLauncher();
|
|
156
|
+
```
|
|
192
157
|
|
|
193
|
-
|
|
194
|
-
|------|------|
|
|
195
|
-
| `safeStringify(value, space?)` | JSON 序列化,自动处理循环引用 |
|
|
196
|
-
| `copyToComputer(content, options?)` | 复制内容到电脑 |
|
|
197
|
-
| `logToComputer(...args)` | 输出到电脑控制台 |
|
|
158
|
+
完整 API:`DebugToolkit` 是单例,提供 `openPanel`、`closePanel`、`togglePanel`、`clearAll`、`showLauncher`、`hideLauncher`、`addFeature`、`removeFeature`、`destroy`、`features`、`panelOpen`。详见 TypeScript 类型定义。
|
|
198
159
|
|
|
199
160
|
## 对等依赖
|
|
200
161
|
|
|
@@ -203,6 +164,7 @@ toolkit?.addFeature(myFeature);
|
|
|
203
164
|
| react | >= 18.0.0 | 是 |
|
|
204
165
|
| react-native | >= 0.72.0 | 是 |
|
|
205
166
|
| @react-native-clipboard/clipboard | >= 1.0.0 | 否 |
|
|
167
|
+
| @react-native-async-storage/async-storage | >= 1.0.0 | 否 |
|
|
206
168
|
|
|
207
169
|
## 许可证
|
|
208
170
|
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.DebugToolkit = void 0;
|
|
7
7
|
const listeners = new Set();
|
|
8
8
|
let _features = [];
|
|
9
|
-
let
|
|
9
|
+
let _launcherVisible = false;
|
|
10
|
+
let _panelOpen = false;
|
|
10
11
|
let _enabled = true;
|
|
11
12
|
function notify() {
|
|
12
13
|
listeners.forEach(l => l());
|
|
@@ -30,14 +31,14 @@ const DebugToolkit = exports.DebugToolkit = {
|
|
|
30
31
|
get enabled() {
|
|
31
32
|
return _enabled;
|
|
32
33
|
},
|
|
33
|
-
get
|
|
34
|
-
return
|
|
34
|
+
get launcherVisible() {
|
|
35
|
+
return _launcherVisible;
|
|
35
36
|
},
|
|
36
37
|
setEnabled(enabled) {
|
|
37
38
|
if (_enabled === enabled) return;
|
|
38
39
|
_enabled = enabled;
|
|
39
40
|
if (!enabled) {
|
|
40
|
-
|
|
41
|
+
_launcherVisible = false;
|
|
41
42
|
_features.forEach(cleanupFeature);
|
|
42
43
|
_features = [];
|
|
43
44
|
}
|
|
@@ -88,12 +89,13 @@ const DebugToolkit = exports.DebugToolkit = {
|
|
|
88
89
|
cleanupFeature(feature);
|
|
89
90
|
_features = _features.filter(f => f.name !== name);
|
|
90
91
|
if (_features.length === 0) {
|
|
91
|
-
|
|
92
|
+
_launcherVisible = false;
|
|
92
93
|
}
|
|
93
94
|
notify();
|
|
94
95
|
},
|
|
95
96
|
reset() {
|
|
96
|
-
|
|
97
|
+
_launcherVisible = false;
|
|
98
|
+
_panelOpen = false;
|
|
97
99
|
_features.forEach(cleanupFeature);
|
|
98
100
|
_features = [];
|
|
99
101
|
notify();
|
|
@@ -101,13 +103,33 @@ const DebugToolkit = exports.DebugToolkit = {
|
|
|
101
103
|
hasFeatures() {
|
|
102
104
|
return _features.length > 0;
|
|
103
105
|
},
|
|
104
|
-
|
|
106
|
+
get panelOpen() {
|
|
107
|
+
return _panelOpen;
|
|
108
|
+
},
|
|
109
|
+
openPanel() {
|
|
110
|
+
if (!_enabled || _panelOpen) return;
|
|
111
|
+
_panelOpen = true;
|
|
112
|
+
notify();
|
|
113
|
+
},
|
|
114
|
+
closePanel() {
|
|
115
|
+
if (!_panelOpen) return;
|
|
116
|
+
_panelOpen = false;
|
|
117
|
+
notify();
|
|
118
|
+
},
|
|
119
|
+
togglePanel() {
|
|
120
|
+
if (_panelOpen) {
|
|
121
|
+
DebugToolkit.closePanel();
|
|
122
|
+
} else {
|
|
123
|
+
DebugToolkit.openPanel();
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
showLauncher() {
|
|
105
127
|
if (!_enabled) return;
|
|
106
|
-
|
|
128
|
+
_launcherVisible = true;
|
|
107
129
|
notify();
|
|
108
130
|
},
|
|
109
|
-
|
|
110
|
-
|
|
131
|
+
hideLauncher() {
|
|
132
|
+
_launcherVisible = false;
|
|
111
133
|
notify();
|
|
112
134
|
},
|
|
113
135
|
clearAll() {
|
|
@@ -115,7 +137,7 @@ const DebugToolkit = exports.DebugToolkit = {
|
|
|
115
137
|
notify();
|
|
116
138
|
},
|
|
117
139
|
destroy() {
|
|
118
|
-
|
|
140
|
+
DebugToolkit.reset();
|
|
119
141
|
listeners.clear();
|
|
120
142
|
}
|
|
121
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["listeners","Set","_features","
|
|
1
|
+
{"version":3,"names":["listeners","Set","_features","_launcherVisible","_panelOpen","_enabled","notify","forEach","l","setupFeature","feature","setup","cleanupFeature","cleanup","DebugToolkit","exports","subscribe","listener","add","delete","features","enabled","launcherVisible","setEnabled","replaceFeatures","next","filter","f","i","arr","name","findIndex","item","prevMap","Map","map","nextMap","get","addFeature","existingIndex","existing","slice","removeFeature","find","length","reset","hasFeatures","panelOpen","openPanel","closePanel","togglePanel","showLauncher","hideLauncher","clearAll","clear","destroy"],"sourceRoot":"../../../src","sources":["core/DebugToolkit.tsx"],"mappings":";;;;;;AAIA,MAAMA,SAAS,GAAG,IAAIC,GAAG,CAAW,CAAC;AACrC,IAAIC,SAA4B,GAAG,EAAE;AACrC,IAAIC,gBAAgB,GAAG,KAAK;AAC5B,IAAIC,UAAU,GAAG,KAAK;AACtB,IAAIC,QAAQ,GAAG,IAAI;AAEnB,SAASC,MAAMA,CAAA,EAAS;EACtBN,SAAS,CAACO,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAAC,CAAC,CAAC;AAC/B;AAEA,SAASC,YAAYA,CAACC,OAAwB,EAAQ;EACpDA,OAAO,CAACC,KAAK,GAAG,CAAC;AACnB;AAEA,SAASC,cAAcA,CAACF,OAAwB,EAAQ;EACtDA,OAAO,CAACG,OAAO,GAAG,CAAC;AACrB;AAEO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,SAASA,CAACC,QAAkB,EAAc;IACxCjB,SAAS,CAACkB,GAAG,CAACD,QAAQ,CAAC;IACvB,OAAO,MAAM;MACXjB,SAAS,CAACmB,MAAM,CAACF,QAAQ,CAAC;IAC5B,CAAC;EACH,CAAC;EAED,IAAIG,QAAQA,CAAA,EAAsB;IAChC,OAAO,CAAC,GAAGlB,SAAS,CAAC;EACvB,CAAC;EAED,IAAImB,OAAOA,CAAA,EAAY;IACrB,OAAOhB,QAAQ;EACjB,CAAC;EAED,IAAIiB,eAAeA,CAAA,EAAY;IAC7B,OAAOnB,gBAAgB;EACzB,CAAC;EAEDoB,UAAUA,CAACF,OAAgB,EAAQ;IACjC,IAAIhB,QAAQ,KAAKgB,OAAO,EAAE;IAC1BhB,QAAQ,GAAGgB,OAAO;IAClB,IAAI,CAACA,OAAO,EAAE;MACZlB,gBAAgB,GAAG,KAAK;MACxBD,SAAS,CAACK,OAAO,CAACK,cAAc,CAAC;MACjCV,SAAS,G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nB;AACF,CAAC","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ exports.DebugToolkitProvider = DebugToolkitProvider;
|
|
|
7
7
|
exports.useDebugToolkit = useDebugToolkit;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _DebugToolkit = require("./DebugToolkit");
|
|
10
|
-
var _FloatPanelView = require("../
|
|
10
|
+
var _FloatPanelView = require("../ui/panel/FloatPanelView");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
13
|
const ToolkitContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
@@ -15,43 +15,49 @@ function DebugToolkitProvider({
|
|
|
15
15
|
children
|
|
16
16
|
}) {
|
|
17
17
|
const [state, setState] = (0, _react.useState)(() => ({
|
|
18
|
-
|
|
18
|
+
launcherVisible: _DebugToolkit.DebugToolkit.launcherVisible,
|
|
19
|
+
panelOpen: _DebugToolkit.DebugToolkit.panelOpen,
|
|
19
20
|
features: _DebugToolkit.DebugToolkit.features
|
|
20
21
|
}));
|
|
21
22
|
(0, _react.useEffect)(() => {
|
|
22
23
|
// Sync current state — initializeDebugToolkit() may have been called
|
|
23
24
|
// in a child useEffect that runs before this parent effect subscribes.
|
|
24
25
|
setState({
|
|
25
|
-
|
|
26
|
+
launcherVisible: _DebugToolkit.DebugToolkit.launcherVisible,
|
|
27
|
+
panelOpen: _DebugToolkit.DebugToolkit.panelOpen,
|
|
26
28
|
features: _DebugToolkit.DebugToolkit.features
|
|
27
29
|
});
|
|
28
30
|
const unsubscribe = _DebugToolkit.DebugToolkit.subscribe(() => {
|
|
29
31
|
setState({
|
|
30
|
-
|
|
32
|
+
launcherVisible: _DebugToolkit.DebugToolkit.launcherVisible,
|
|
33
|
+
panelOpen: _DebugToolkit.DebugToolkit.panelOpen,
|
|
31
34
|
features: _DebugToolkit.DebugToolkit.features
|
|
32
35
|
});
|
|
33
36
|
});
|
|
34
37
|
return unsubscribe;
|
|
35
38
|
}, []);
|
|
36
|
-
const
|
|
37
|
-
_DebugToolkit.DebugToolkit.
|
|
39
|
+
const showLauncher = (0, _react.useCallback)(() => {
|
|
40
|
+
_DebugToolkit.DebugToolkit.showLauncher();
|
|
38
41
|
}, []);
|
|
39
|
-
const
|
|
40
|
-
_DebugToolkit.DebugToolkit.
|
|
42
|
+
const hideLauncher = (0, _react.useCallback)(() => {
|
|
43
|
+
_DebugToolkit.DebugToolkit.hideLauncher();
|
|
41
44
|
}, []);
|
|
42
45
|
const clearAll = (0, _react.useCallback)(() => {
|
|
43
46
|
_DebugToolkit.DebugToolkit.clearAll();
|
|
44
47
|
}, []);
|
|
45
48
|
const contextValue = (0, _react.useMemo)(() => ({
|
|
46
49
|
features: state.features,
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
showLauncher,
|
|
51
|
+
hideLauncher,
|
|
49
52
|
clearAll
|
|
50
|
-
}), [state.features,
|
|
53
|
+
}), [state.features, showLauncher, hideLauncher, clearAll]);
|
|
51
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ToolkitContext.Provider, {
|
|
52
55
|
value: contextValue,
|
|
53
|
-
children: [children, state.
|
|
56
|
+
children: [children, state.launcherVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FloatPanelView.FloatPanelView, {
|
|
54
57
|
features: state.features,
|
|
58
|
+
panelOpen: state.panelOpen,
|
|
59
|
+
onOpenPanel: () => _DebugToolkit.DebugToolkit.openPanel(),
|
|
60
|
+
onClosePanel: () => _DebugToolkit.DebugToolkit.closePanel(),
|
|
55
61
|
onClearAll: () => _DebugToolkit.DebugToolkit.clearAll()
|
|
56
62
|
})]
|
|
57
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_DebugToolkit","_FloatPanelView","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ToolkitContext","createContext","DebugToolkitProvider","children","state","setState","useState","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_DebugToolkit","_FloatPanelView","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ToolkitContext","createContext","DebugToolkitProvider","children","state","setState","useState","launcherVisible","DebugToolkit","panelOpen","features","useEffect","unsubscribe","subscribe","showLauncher","useCallback","hideLauncher","clearAll","contextValue","useMemo","jsxs","Provider","value","jsx","FloatPanelView","onOpenPanel","openPanel","onClosePanel","closePanel","onClearAll","useDebugToolkit","context","useContext","Error"],"sourceRoot":"../../../src","sources":["core/DebugToolkitProvider.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAA4D,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAA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