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
|
@@ -1,109 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
data: TData[];
|
|
7
|
-
feature: DebugFeature<TData>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Type-erased feature for heterogeneous collections.
|
|
11
|
-
* Individual features should use `DebugFeature<TData>` with their specific data type.
|
|
12
|
-
* This alias is only for places that hold features of multiple types.
|
|
13
|
-
*/
|
|
14
|
-
export type AnyDebugFeature = DebugFeature<any>;
|
|
15
|
-
/** Base interface all debug features must implement */
|
|
16
|
-
export interface DebugFeature<TData = unknown> {
|
|
17
|
-
name: string;
|
|
18
|
-
label: string;
|
|
19
|
-
setup: () => void;
|
|
20
|
-
getData: () => TData[];
|
|
21
|
-
clear?: () => void;
|
|
22
|
-
cleanup: () => void;
|
|
23
|
-
subscribe?: (listener: DebugFeatureListener) => () => void;
|
|
24
|
-
renderContent?: ComponentType<DebugFeatureRenderProps<TData>>;
|
|
25
|
-
badge?: () => {
|
|
26
|
-
label: string;
|
|
27
|
-
color: string;
|
|
28
|
-
} | null;
|
|
29
|
-
}
|
|
30
|
-
export interface NetworkLogEntry {
|
|
31
|
-
id: string;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
duration?: number;
|
|
34
|
-
request: {
|
|
35
|
-
url: string;
|
|
36
|
-
method: string;
|
|
37
|
-
headers?: Record<string, string>;
|
|
38
|
-
body?: unknown;
|
|
39
|
-
};
|
|
40
|
-
response?: {
|
|
41
|
-
status: number;
|
|
42
|
-
statusText?: string;
|
|
43
|
-
headers?: Record<string, string>;
|
|
44
|
-
data?: unknown;
|
|
45
|
-
success?: boolean;
|
|
46
|
-
};
|
|
47
|
-
error?: string;
|
|
48
|
-
}
|
|
49
|
-
export interface ConsoleLogEntry {
|
|
50
|
-
id: string;
|
|
51
|
-
timestamp: number;
|
|
52
|
-
level: 'log' | 'info' | 'warn' | 'error';
|
|
53
|
-
data: unknown[];
|
|
54
|
-
}
|
|
55
|
-
export interface ZustandLogEntry {
|
|
56
|
-
id: string;
|
|
57
|
-
timestamp: number;
|
|
58
|
-
action: string;
|
|
59
|
-
prevState: unknown;
|
|
60
|
-
nextState: unknown;
|
|
61
|
-
actionCompleteTime?: number;
|
|
62
|
-
storeName?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface NavigationLogEntry {
|
|
65
|
-
id: string;
|
|
66
|
-
timestamp: number;
|
|
67
|
-
action: string;
|
|
68
|
-
from: string;
|
|
69
|
-
to: string;
|
|
70
|
-
startTime?: number;
|
|
71
|
-
duration?: number;
|
|
72
|
-
debugLog?: string;
|
|
73
|
-
}
|
|
74
|
-
export interface TrackLogEntry {
|
|
75
|
-
id: string;
|
|
76
|
-
timestamp: number;
|
|
77
|
-
eventName: string;
|
|
78
|
-
[key: string]: unknown;
|
|
79
|
-
}
|
|
80
|
-
export interface EnvironmentConfig {
|
|
81
|
-
id: string;
|
|
82
|
-
label: string;
|
|
83
|
-
host: string;
|
|
84
|
-
color?: string;
|
|
85
|
-
}
|
|
86
|
-
export interface EnvironmentState {
|
|
87
|
-
environments: EnvironmentConfig[];
|
|
88
|
-
currentEnvironmentId: string | null;
|
|
89
|
-
}
|
|
90
|
-
export interface NavigationContainerRef {
|
|
91
|
-
getCurrentRoute?: () => {
|
|
92
|
-
name?: string;
|
|
93
|
-
} | undefined;
|
|
94
|
-
getRootState?: () => unknown;
|
|
95
|
-
addListener: (event: string, callback: () => void) => () => void;
|
|
96
|
-
}
|
|
97
|
-
export interface ThirdPartyLibAction {
|
|
98
|
-
id: string;
|
|
99
|
-
label: string;
|
|
100
|
-
onPress: () => void;
|
|
101
|
-
}
|
|
102
|
-
export interface ThirdPartyLib {
|
|
103
|
-
id: string;
|
|
104
|
-
name: string;
|
|
105
|
-
description: string;
|
|
106
|
-
platform: 'ios' | 'android' | 'both';
|
|
107
|
-
actions: ThirdPartyLibAction[];
|
|
108
|
-
}
|
|
1
|
+
export type { AnyDebugFeature, BuiltInFeatureName, DebugFeature, DebugFeatureListener, DebugFeatureRenderProps, } from './feature';
|
|
2
|
+
export type { ConsoleLogEntry, NavigationLogEntry, NetworkLogEntry, TrackLogEntry, ZustandLogEntry, } from './logs';
|
|
3
|
+
export type { EnvironmentConfig, EnvironmentState, } from './environment';
|
|
4
|
+
export type { NavigationContainerRef, } from './navigation';
|
|
5
|
+
export type { ThirdPartyLib, ThirdPartyLibAction, } from './thirdPartyLibs';
|
|
109
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,QAAQ,CAAC;AAEhB,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,aAAa,EACb,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface NetworkLogEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
timestamp: number;
|
|
4
|
+
duration?: number;
|
|
5
|
+
request: {
|
|
6
|
+
url: string;
|
|
7
|
+
method: string;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
body?: unknown;
|
|
10
|
+
};
|
|
11
|
+
response?: {
|
|
12
|
+
status: number;
|
|
13
|
+
statusText?: string;
|
|
14
|
+
headers?: Record<string, string>;
|
|
15
|
+
data?: unknown;
|
|
16
|
+
success?: boolean;
|
|
17
|
+
};
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ConsoleLogEntry {
|
|
21
|
+
id: string;
|
|
22
|
+
timestamp: number;
|
|
23
|
+
level: 'log' | 'info' | 'warn' | 'error';
|
|
24
|
+
data: unknown[];
|
|
25
|
+
}
|
|
26
|
+
export interface ZustandLogEntry {
|
|
27
|
+
id: string;
|
|
28
|
+
timestamp: number;
|
|
29
|
+
action: string;
|
|
30
|
+
prevState: unknown;
|
|
31
|
+
nextState: unknown;
|
|
32
|
+
actionCompleteTime?: number;
|
|
33
|
+
storeName?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface NavigationLogEntry {
|
|
36
|
+
id: string;
|
|
37
|
+
timestamp: number;
|
|
38
|
+
action: string;
|
|
39
|
+
from: string;
|
|
40
|
+
to: string;
|
|
41
|
+
startTime?: number;
|
|
42
|
+
duration?: number;
|
|
43
|
+
debugLog?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface TrackLogEntry {
|
|
46
|
+
id: string;
|
|
47
|
+
timestamp: number;
|
|
48
|
+
eventName: string;
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../../src/types/logs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACzC,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../src/types/navigation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACtD,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAClE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ThirdPartyLibAction {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
onPress: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface ThirdPartyLib {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
platform: 'ios' | 'android' | 'both';
|
|
11
|
+
actions: ThirdPartyLibAction[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=thirdPartyLibs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thirdPartyLibs.d.ts","sourceRoot":"","sources":["../../../../src/types/thirdPartyLibs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IACrC,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FeatureConfigs } from '../initialize';
|
|
2
|
+
import type { FeatureConfigs } from '../core/initialize';
|
|
3
3
|
import type { EnvironmentConfig, NavigationContainerRef } from '../types';
|
|
4
4
|
export interface DebugViewProps {
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugView.d.ts","sourceRoot":"","sources":["../../../../src/ui/DebugView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAI1E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACnC,mDAAmD;IACnD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAC/D,sDAAsD;IACtD,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAeD,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,OAAO,GACR,EAAE,cAAc,qBAoChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatIcon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/floating/FloatIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAgBjD,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAChD;AAED,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,cAAc,qBA6HpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/panel/DebugPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAa9D,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,eAAe,qBAwG5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureTabBar.d.ts","sourceRoot":"","sources":["../../../../../src/ui/panel/FeatureTabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAWxE,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,kBAAkB,qBAmJnF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AnyDebugFeature } from '../../types';
|
|
3
|
+
interface FloatPanelViewProps {
|
|
4
|
+
features: AnyDebugFeature[];
|
|
5
|
+
panelOpen: boolean;
|
|
6
|
+
onOpenPanel: () => void;
|
|
7
|
+
onClosePanel: () => void;
|
|
8
|
+
onClearAll: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function FloatPanelView({ features, panelOpen, onOpenPanel, onClosePanel, onClearAll }: FloatPanelViewProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=FloatPanelView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatPanelView.d.ts","sourceRoot":"","sources":["../../../../../src/ui/panel/FloatPanelView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAC;AASnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAiCnD,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,mBAAmB,qBA4JjH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleSection.d.ts","sourceRoot":"","sources":["../../../../../src/ui/shared/CollapsibleSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/shared/CopyButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,UAAU,eAAe;IACvB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+BhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonView.d.ts","sourceRoot":"","sources":["../../../../../src/ui/shared/JsonView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAgBnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogListScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/shared/LogListScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,kBAAkB,CAAC,CAAC,SAAS,WAAW;IAChD,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;IAC3C,gBAAgB,CAAC,EAAE,MAAM,KAAK,CAAC,YAAY,CAAC;IAC5C,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAClD,gBAAgB,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EAAE,EACnD,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,QAAe,GAChB,EAAE,kBAAkB,CAAC,CAAC,CAAC,qBAuEvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSlideDetailAnimation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/shared/useSlideDetailAnimation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,QAAQ,EAAE,CAAC,GAAG,IAAI,GACjB;IACD,gBAAgB,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACzD,cAAc,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACvD,WAAW,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;CACrD,CA+BA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../src/ui/theme/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAqBT,CAAC;AAEX,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CASrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/ui/theme/layout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAK,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { DebugFeature, DebugFeatureRenderProps } from '../types';
|
|
3
3
|
import type { EventChannel } from './createEventChannel';
|
|
4
|
+
export interface ChannelFeaturePersistConfig<TEntry> {
|
|
5
|
+
storageKey: string;
|
|
6
|
+
maxPersist: number;
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
serialize?: (entry: TEntry) => unknown;
|
|
9
|
+
}
|
|
4
10
|
/**
|
|
5
11
|
* Generic factory for features that subscribe to an event channel.
|
|
6
12
|
* Eliminates boilerplate across channel-based features (Track, Navigation, Zustand).
|
|
@@ -9,10 +15,13 @@ import type { EventChannel } from './createEventChannel';
|
|
|
9
15
|
* @param toEntry - Maps a payload + auto-generated id to a typed log entry
|
|
10
16
|
* @param options - Feature name, label, render component, and optional maxLogs
|
|
11
17
|
*/
|
|
12
|
-
export declare function createChannelFeature<TPayload, TEntry
|
|
18
|
+
export declare function createChannelFeature<TPayload, TEntry extends {
|
|
19
|
+
id?: string;
|
|
20
|
+
}>(getChannel: () => EventChannel<TPayload>, toEntry: (payload: TPayload, id: string) => TEntry, options: {
|
|
13
21
|
name: string;
|
|
14
22
|
label: string;
|
|
15
|
-
renderContent?: ComponentType<DebugFeatureRenderProps<TEntry>>;
|
|
23
|
+
renderContent?: ComponentType<DebugFeatureRenderProps<TEntry[]>>;
|
|
16
24
|
maxLogs?: number;
|
|
17
|
-
|
|
25
|
+
persist?: ChannelFeaturePersistConfig<TEntry>;
|
|
26
|
+
}): DebugFeature<TEntry[]>;
|
|
18
27
|
//# sourceMappingURL=createChannelFeature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createChannelFeature.d.ts","sourceRoot":"","sources":["../../../../src/utils/createChannelFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAwB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"createChannelFeature.d.ts","sourceRoot":"","sources":["../../../../src/utils/createChannelFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAwB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,MAAM,WAAW,2BAA2B,CAAC,MAAM;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3E,UAAU,EAAE,MAAM,YAAY,CAAC,QAAQ,CAAC,EACxC,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,EAClD,OAAO,EAAE;IACP,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC;CAC/C,GACA,YAAY,CAAC,MAAM,EAAE,CAAC,CA8CxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createObservableStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/createObservableStore.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AAEvC,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,MAAM,IAAI,CAAC;CACpD;AAED,wBAAgB,qBAAqB,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"createObservableStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/createObservableStore.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AAEvC,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAChC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,MAAM,IAAI,CAAC;CACpD;AAED,wBAAgB,qBAAqB,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC,CAqC7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ObservableStore } from './createObservableStore';
|
|
2
|
+
export interface PersistedStoreOptions<T> {
|
|
3
|
+
storageKey: string;
|
|
4
|
+
maxPersist: number;
|
|
5
|
+
debounceMs?: number;
|
|
6
|
+
serialize?: (entry: T) => unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface PersistedObservableStore<T> extends ObservableStore<T> {
|
|
9
|
+
/** Returns the next auto-incrementing ID and advances the counter. */
|
|
10
|
+
nextId: () => string;
|
|
11
|
+
}
|
|
12
|
+
export declare function createPersistedObservableStore<T extends {
|
|
13
|
+
id?: string;
|
|
14
|
+
}>(options: PersistedStoreOptions<T>): PersistedObservableStore<T>;
|
|
15
|
+
//# sourceMappingURL=createPersistedObservableStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPersistedObservableStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/createPersistedObservableStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGtF,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACrE,sEAAsE;IACtE,MAAM,EAAE,MAAM,MAAM,CAAC;CACtB;AAED,wBAAgB,8BAA8B,CAAC,CAAC,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EACtE,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAChC,wBAAwB,CAAC,CAAC,CAAC,CA0D7B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function setPreference(key: string, value: string): Promise<void>;
|
|
2
|
+
export declare function getPreference(key: string): Promise<string | null>;
|
|
3
|
+
export declare const KEYS: {
|
|
4
|
+
readonly fabPosition: "@react_native_debug_toolkit/fab_position";
|
|
5
|
+
readonly lastTab: "@react_native_debug_toolkit/last_tab";
|
|
6
|
+
readonly consoleLogs: "@react_native_debug_toolkit/console_logs";
|
|
7
|
+
readonly networkLogs: "@react_native_debug_toolkit/network_logs";
|
|
8
|
+
readonly trackLogs: "@react_native_debug_toolkit/track_logs";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=debugPreferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debugPreferences.d.ts","sourceRoot":"","sources":["../../../../src/utils/debugPreferences.ts"],"names":[],"mappings":"AAgBA,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAU7E;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWvE;AAED,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-debug-toolkit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A dev-only floating debug panel for React Native with network, console, Zustand, navigation, and event logs",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -4,7 +4,8 @@ type Listener = () => void;
|
|
|
4
4
|
|
|
5
5
|
const listeners = new Set<Listener>();
|
|
6
6
|
let _features: AnyDebugFeature[] = [];
|
|
7
|
-
let
|
|
7
|
+
let _launcherVisible = false;
|
|
8
|
+
let _panelOpen = false;
|
|
8
9
|
let _enabled = true;
|
|
9
10
|
|
|
10
11
|
function notify(): void {
|
|
@@ -35,15 +36,15 @@ export const DebugToolkit = {
|
|
|
35
36
|
return _enabled;
|
|
36
37
|
},
|
|
37
38
|
|
|
38
|
-
get
|
|
39
|
-
return
|
|
39
|
+
get launcherVisible(): boolean {
|
|
40
|
+
return _launcherVisible;
|
|
40
41
|
},
|
|
41
42
|
|
|
42
43
|
setEnabled(enabled: boolean): void {
|
|
43
44
|
if (_enabled === enabled) return;
|
|
44
45
|
_enabled = enabled;
|
|
45
46
|
if (!enabled) {
|
|
46
|
-
|
|
47
|
+
_launcherVisible = false;
|
|
47
48
|
_features.forEach(cleanupFeature);
|
|
48
49
|
_features = [];
|
|
49
50
|
}
|
|
@@ -111,13 +112,14 @@ export const DebugToolkit = {
|
|
|
111
112
|
cleanupFeature(feature);
|
|
112
113
|
_features = _features.filter((f) => f.name !== name);
|
|
113
114
|
if (_features.length === 0) {
|
|
114
|
-
|
|
115
|
+
_launcherVisible = false;
|
|
115
116
|
}
|
|
116
117
|
notify();
|
|
117
118
|
},
|
|
118
119
|
|
|
119
120
|
reset(): void {
|
|
120
|
-
|
|
121
|
+
_launcherVisible = false;
|
|
122
|
+
_panelOpen = false;
|
|
121
123
|
_features.forEach(cleanupFeature);
|
|
122
124
|
_features = [];
|
|
123
125
|
notify();
|
|
@@ -127,14 +129,38 @@ export const DebugToolkit = {
|
|
|
127
129
|
return _features.length > 0;
|
|
128
130
|
},
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
get panelOpen(): boolean {
|
|
133
|
+
return _panelOpen;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
openPanel(): void {
|
|
137
|
+
if (!_enabled || _panelOpen) return;
|
|
138
|
+
_panelOpen = true;
|
|
139
|
+
notify();
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
closePanel(): void {
|
|
143
|
+
if (!_panelOpen) return;
|
|
144
|
+
_panelOpen = false;
|
|
145
|
+
notify();
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
togglePanel(): void {
|
|
149
|
+
if (_panelOpen) {
|
|
150
|
+
DebugToolkit.closePanel();
|
|
151
|
+
} else {
|
|
152
|
+
DebugToolkit.openPanel();
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
showLauncher(): void {
|
|
131
157
|
if (!_enabled) return;
|
|
132
|
-
|
|
158
|
+
_launcherVisible = true;
|
|
133
159
|
notify();
|
|
134
160
|
},
|
|
135
161
|
|
|
136
|
-
|
|
137
|
-
|
|
162
|
+
hideLauncher(): void {
|
|
163
|
+
_launcherVisible = false;
|
|
138
164
|
notify();
|
|
139
165
|
},
|
|
140
166
|
|
|
@@ -144,7 +170,7 @@ export const DebugToolkit = {
|
|
|
144
170
|
},
|
|
145
171
|
|
|
146
172
|
destroy(): void {
|
|
147
|
-
|
|
173
|
+
DebugToolkit.reset();
|
|
148
174
|
listeners.clear();
|
|
149
175
|
},
|
|
150
176
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React, { createContext, useCallback, useContext, useEffect, useMemo, useState, type ReactNode } from 'react';
|
|
2
2
|
import { DebugToolkit } from './DebugToolkit';
|
|
3
|
-
import { FloatPanelView } from '../
|
|
3
|
+
import { FloatPanelView } from '../ui/panel/FloatPanelView';
|
|
4
4
|
import type { AnyDebugFeature } from '../types';
|
|
5
5
|
|
|
6
6
|
interface ToolkitContextValue {
|
|
7
7
|
features: AnyDebugFeature[];
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
showLauncher: () => void;
|
|
9
|
+
hideLauncher: () => void;
|
|
10
10
|
clearAll: () => void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const ToolkitContext = createContext<ToolkitContextValue | null>(null);
|
|
14
14
|
|
|
15
15
|
interface ProviderState {
|
|
16
|
-
|
|
16
|
+
launcherVisible: boolean;
|
|
17
|
+
panelOpen: boolean;
|
|
17
18
|
features: AnyDebugFeature[];
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -23,7 +24,8 @@ interface DebugToolkitProviderProps {
|
|
|
23
24
|
|
|
24
25
|
export function DebugToolkitProvider({ children }: DebugToolkitProviderProps) {
|
|
25
26
|
const [state, setState] = useState<ProviderState>(() => ({
|
|
26
|
-
|
|
27
|
+
launcherVisible: DebugToolkit.launcherVisible,
|
|
28
|
+
panelOpen: DebugToolkit.panelOpen,
|
|
27
29
|
features: DebugToolkit.features,
|
|
28
30
|
}));
|
|
29
31
|
|
|
@@ -31,39 +33,44 @@ export function DebugToolkitProvider({ children }: DebugToolkitProviderProps) {
|
|
|
31
33
|
// Sync current state — initializeDebugToolkit() may have been called
|
|
32
34
|
// in a child useEffect that runs before this parent effect subscribes.
|
|
33
35
|
setState({
|
|
34
|
-
|
|
36
|
+
launcherVisible: DebugToolkit.launcherVisible,
|
|
37
|
+
panelOpen: DebugToolkit.panelOpen,
|
|
35
38
|
features: DebugToolkit.features,
|
|
36
39
|
});
|
|
37
40
|
|
|
38
41
|
const unsubscribe = DebugToolkit.subscribe(() => {
|
|
39
42
|
setState({
|
|
40
|
-
|
|
43
|
+
launcherVisible: DebugToolkit.launcherVisible,
|
|
44
|
+
panelOpen: DebugToolkit.panelOpen,
|
|
41
45
|
features: DebugToolkit.features,
|
|
42
46
|
});
|
|
43
47
|
});
|
|
44
48
|
return unsubscribe;
|
|
45
49
|
}, []);
|
|
46
50
|
|
|
47
|
-
const
|
|
48
|
-
const
|
|
51
|
+
const showLauncher = useCallback(() => { DebugToolkit.showLauncher(); }, []);
|
|
52
|
+
const hideLauncher = useCallback(() => { DebugToolkit.hideLauncher(); }, []);
|
|
49
53
|
const clearAll = useCallback(() => { DebugToolkit.clearAll(); }, []);
|
|
50
54
|
|
|
51
55
|
const contextValue = useMemo<ToolkitContextValue>(
|
|
52
56
|
() => ({
|
|
53
57
|
features: state.features,
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
showLauncher,
|
|
59
|
+
hideLauncher,
|
|
56
60
|
clearAll,
|
|
57
61
|
}),
|
|
58
|
-
[state.features,
|
|
62
|
+
[state.features, showLauncher, hideLauncher, clearAll],
|
|
59
63
|
);
|
|
60
64
|
|
|
61
65
|
return (
|
|
62
66
|
<ToolkitContext.Provider value={contextValue}>
|
|
63
67
|
{children}
|
|
64
|
-
{state.
|
|
68
|
+
{state.launcherVisible && (
|
|
65
69
|
<FloatPanelView
|
|
66
70
|
features={state.features}
|
|
71
|
+
panelOpen={state.panelOpen}
|
|
72
|
+
onOpenPanel={() => DebugToolkit.openPanel()}
|
|
73
|
+
onClosePanel={() => DebugToolkit.closePanel()}
|
|
67
74
|
onClearAll={() => DebugToolkit.clearAll()}
|
|
68
75
|
/>
|
|
69
76
|
)}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { DebugToolkit } from './
|
|
2
|
-
import { createNetworkFeature } from '
|
|
3
|
-
import type { NetworkFeatureConfig } from '
|
|
4
|
-
import { createConsoleLogFeature } from '
|
|
5
|
-
import type { ConsoleFeatureConfig } from '
|
|
6
|
-
import { createZustandLogFeature } from '
|
|
7
|
-
import type { ZustandFeatureConfig } from '
|
|
8
|
-
import { createNavigationLogFeature } from '
|
|
9
|
-
import type { NavigationFeatureConfig } from '
|
|
10
|
-
import { createTrackFeature } from '
|
|
11
|
-
import type { TrackFeatureConfig } from '
|
|
12
|
-
import { createEnvironmentFeature } from '
|
|
13
|
-
import { createClipboardFeature } from '
|
|
14
|
-
import type { AnyDebugFeature, BuiltInFeatureName } from '
|
|
1
|
+
import { DebugToolkit } from './DebugToolkit';
|
|
2
|
+
import { createNetworkFeature } from '../features/network';
|
|
3
|
+
import type { NetworkFeatureConfig } from '../features/network';
|
|
4
|
+
import { createConsoleLogFeature } from '../features/console';
|
|
5
|
+
import type { ConsoleFeatureConfig } from '../features/console';
|
|
6
|
+
import { createZustandLogFeature } from '../features/zustand';
|
|
7
|
+
import type { ZustandFeatureConfig } from '../features/zustand';
|
|
8
|
+
import { createNavigationLogFeature } from '../features/navigation';
|
|
9
|
+
import type { NavigationFeatureConfig } from '../features/navigation';
|
|
10
|
+
import { createTrackFeature } from '../features/track';
|
|
11
|
+
import type { TrackFeatureConfig } from '../features/track';
|
|
12
|
+
import { createEnvironmentFeature } from '../features/environment';
|
|
13
|
+
import { createClipboardFeature } from '../features/clipboard';
|
|
14
|
+
import type { AnyDebugFeature, BuiltInFeatureName } from '../types';
|
|
15
15
|
|
|
16
16
|
const isDebugMode = __DEV__;
|
|
17
17
|
|
|
@@ -109,9 +109,9 @@ export function initializeDebugToolkit(
|
|
|
109
109
|
DebugToolkit.replaceFeatures(resolvedFeatures);
|
|
110
110
|
|
|
111
111
|
if (DebugToolkit.hasFeatures()) {
|
|
112
|
-
DebugToolkit.
|
|
112
|
+
DebugToolkit.showLauncher();
|
|
113
113
|
} else {
|
|
114
|
-
DebugToolkit.
|
|
114
|
+
DebugToolkit.hideLauncher();
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
return DebugToolkit;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import { View, Text, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { Colors } from '
|
|
4
|
-
import { copyToComputer } from '
|
|
5
|
-
import type { DebugFeatureRenderProps } from '
|
|
3
|
+
import { Colors } from '../../ui/theme/colors';
|
|
4
|
+
import { copyToComputer } from '../../utils/copyToComputer';
|
|
5
|
+
import type { DebugFeatureRenderProps } from '../../types';
|
|
6
6
|
|
|
7
|
-
export const ClipboardTab: React.FC<DebugFeatureRenderProps<
|
|
7
|
+
export const ClipboardTab: React.FC<DebugFeatureRenderProps<null>> = React.memo(() => {
|
|
8
8
|
const [text, setText] = useState('');
|
|
9
9
|
const [feedback, setFeedback] = useState<string | null>(null);
|
|
10
10
|
|