react-native-inapp-inspector 1.1.18 → 1.1.19
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/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/package.json +2 -4
- package/assets/banner_dark.svg +0 -186
- package/assets/banner_light.svg +0 -186
- package/assets/icon_circle.svg +0 -148
- package/assets/icon_square.svg +0 -148
- package/assets/social_preview.png +0 -0
- package/assets/walkthrough.gif +0 -0
- package/dist/commonjs/assets/svgAssets.d.ts +0 -3
- package/dist/commonjs/assets/svgAssets.js +0 -17
- package/dist/commonjs/components/AnalyticsTabView.d.ts +0 -15
- package/dist/commonjs/components/AnalyticsTabView.js +0 -157
- package/dist/commonjs/components/ApiDetailView.d.ts +0 -22
- package/dist/commonjs/components/ApiDetailView.js +0 -304
- package/dist/commonjs/components/ApisTabView.d.ts +0 -33
- package/dist/commonjs/components/ApisTabView.js +0 -235
- package/dist/commonjs/components/ConsoleLogDetailView.d.ts +0 -9
- package/dist/commonjs/components/ConsoleLogDetailView.js +0 -278
- package/dist/commonjs/components/ConsoleLogsTabView.d.ts +0 -24
- package/dist/commonjs/components/ConsoleLogsTabView.js +0 -354
- package/dist/commonjs/components/FloatingBubble.d.ts +0 -14
- package/dist/commonjs/components/FloatingBubble.js +0 -75
- package/dist/commonjs/components/Inspector/InsightsDashboard.d.ts +0 -3
- package/dist/commonjs/components/Inspector/InsightsDashboard.js +0 -619
- package/dist/commonjs/components/Inspector/WebViewTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/WebViewTab.js +0 -757
- package/dist/commonjs/components/InspectorHeader.d.ts +0 -19
- package/dist/commonjs/components/InspectorHeader.js +0 -329
- package/dist/commonjs/components/InspectorTabBar.d.ts +0 -16
- package/dist/commonjs/components/InspectorTabBar.js +0 -90
- package/dist/commonjs/components/NavigationTracker.d.ts +0 -7
- package/dist/commonjs/components/NavigationTracker.js +0 -76
- package/dist/commonjs/components/ReduxTabView.d.ts +0 -9
- package/dist/commonjs/components/ReduxTabView.js +0 -56
- package/dist/commonjs/components/ReduxTreeView.d.ts +0 -16
- package/dist/commonjs/components/ReduxTreeView.js +0 -1257
- package/dist/commonjs/components/SettingsView.d.ts +0 -13
- package/dist/commonjs/components/SettingsView.js +0 -328
- package/dist/commonjs/customHooks/webViewLogger.d.ts +0 -24
- package/dist/commonjs/customHooks/webViewLogger.js +0 -452
- package/dist/commonjs/enums/index.d.ts +0 -39
- package/dist/commonjs/enums/index.js +0 -50
- package/dist/commonjs/i18n/en.json +0 -144
- package/dist/esm/assets/svgAssets.d.ts +0 -3
- package/dist/esm/assets/svgAssets.js +0 -14
- package/dist/esm/components/AnalyticsTabView.d.ts +0 -15
- package/dist/esm/components/AnalyticsTabView.js +0 -151
- package/dist/esm/components/ApiDetailView.d.ts +0 -22
- package/dist/esm/components/ApiDetailView.js +0 -264
- package/dist/esm/components/ApisTabView.d.ts +0 -33
- package/dist/esm/components/ApisTabView.js +0 -196
- package/dist/esm/components/ConsoleLogDetailView.d.ts +0 -9
- package/dist/esm/components/ConsoleLogDetailView.js +0 -271
- package/dist/esm/components/ConsoleLogsTabView.d.ts +0 -24
- package/dist/esm/components/ConsoleLogsTabView.js +0 -348
- package/dist/esm/components/FloatingBubble.d.ts +0 -14
- package/dist/esm/components/FloatingBubble.js +0 -68
- package/dist/esm/components/Inspector/InsightsDashboard.d.ts +0 -3
- package/dist/esm/components/Inspector/InsightsDashboard.js +0 -614
- package/dist/esm/components/Inspector/WebViewTab.d.ts +0 -3
- package/dist/esm/components/Inspector/WebViewTab.js +0 -752
- package/dist/esm/components/InspectorHeader.d.ts +0 -19
- package/dist/esm/components/InspectorHeader.js +0 -323
- package/dist/esm/components/InspectorTabBar.d.ts +0 -16
- package/dist/esm/components/InspectorTabBar.js +0 -84
- package/dist/esm/components/NavigationTracker.d.ts +0 -7
- package/dist/esm/components/NavigationTracker.js +0 -39
- package/dist/esm/components/ReduxTabView.d.ts +0 -9
- package/dist/esm/components/ReduxTabView.js +0 -50
- package/dist/esm/components/ReduxTreeView.d.ts +0 -16
- package/dist/esm/components/ReduxTreeView.js +0 -1218
- package/dist/esm/components/SettingsView.d.ts +0 -13
- package/dist/esm/components/SettingsView.js +0 -321
- package/dist/esm/customHooks/webViewLogger.d.ts +0 -24
- package/dist/esm/customHooks/webViewLogger.js +0 -405
- package/dist/esm/enums/index.d.ts +0 -39
- package/dist/esm/enums/index.js +0 -47
- package/dist/esm/i18n/en.json +0 -144
- package/example/.bundle/config +0 -2
- package/example/.eslintrc.js +0 -4
- package/example/.prettierrc.js +0 -5
- package/example/.watchmanconfig +0 -1
- package/example/App.tsx +0 -879
- package/example/Gemfile +0 -17
- package/example/README.md +0 -53
- package/example/__tests__/App.test.tsx +0 -13
- package/example/android/app/build.gradle +0 -147
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/main/AndroidManifest.xml +0 -27
- package/example/android/app/src/main/java/com/example/MainActivity.kt +0 -22
- package/example/android/app/src/main/java/com/example/MainApplication.kt +0 -52
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/build.gradle +0 -48
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/example/android/gradle.properties +0 -45
- package/example/android/gradlew +0 -248
- package/example/android/gradlew.bat +0 -98
- package/example/android/settings.gradle +0 -25
- package/example/app.json +0 -4
- package/example/assets/app_icon.png +0 -0
- package/example/babel.config.js +0 -3
- package/example/guidance/Video-WalkThrough.mp4 +0 -0
- package/example/index.js +0 -9
- package/example/ios/.xcode.env +0 -11
- package/example/ios/Podfile +0 -34
- package/example/ios/Podfile.lock +0 -2303
- package/example/ios/example/AppDelegate.swift +0 -48
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +0 -62
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/example/ios/example/Images.xcassets/Contents.json +0 -6
- package/example/ios/example/Info.plist +0 -60
- package/example/ios/example/LaunchScreen.storyboard +0 -47
- package/example/ios/example/PrivacyInfo.xcprivacy +0 -37
- package/example/ios/example.xcodeproj/project.pbxproj +0 -498
- package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +0 -88
- package/example/ios/example.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/jest.config.js +0 -3
- package/example/metro.config.js +0 -45
- package/example/package-lock.json +0 -13508
- package/example/package.json +0 -54
- package/example/polyfill.js +0 -13
- package/example/tsconfig.json +0 -8
- package/fonts/Inter/Inter.ttc +0 -0
- package/fonts/Inter/InterVariable-Italic.ttf +0 -0
- package/fonts/Inter/InterVariable.ttf +0 -0
- package/fonts/Inter/LICENSE.txt +0 -92
- package/fonts/Inter/extras/otf/Inter-Black.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-BlackItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Bold.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-BoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraBold.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraLight.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraLightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Italic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Light.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-LightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Medium.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-MediumItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Regular.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-SemiBold.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-SemiBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Thin.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ThinItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Black.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-BlackItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Bold.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-BoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraBold.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraLight.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraLightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Italic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Light.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-LightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Medium.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-MediumItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Regular.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-SemiBold.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-SemiBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Thin.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ThinItalic.otf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Black.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-BlackItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Bold.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-BoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraLight.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraLightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Italic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Light.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-LightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Medium.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-MediumItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Regular.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-SemiBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-SemiBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Thin.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ThinItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Black.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-BlackItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Bold.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-BoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraLight.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraLightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Italic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Light.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-LightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Medium.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-MediumItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Regular.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-SemiBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-SemiBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Thin.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ThinItalic.ttf +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Black.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Bold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Italic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Light.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Medium.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Regular.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Thin.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ThinItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Black.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-BlackItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Bold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-BoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraLight.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Italic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Light.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-LightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Medium.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-MediumItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Regular.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-SemiBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Thin.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ThinItalic.woff2 +0 -0
- package/fonts/Inter/help.txt +0 -165
- package/fonts/Inter/web/Inter-Black.woff2 +0 -0
- package/fonts/Inter/web/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Bold.woff2 +0 -0
- package/fonts/Inter/web/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Italic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Light.woff2 +0 -0
- package/fonts/Inter/web/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Medium.woff2 +0 -0
- package/fonts/Inter/web/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Regular.woff2 +0 -0
- package/fonts/Inter/web/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter/web/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Thin.woff2 +0 -0
- package/fonts/Inter/web/Inter-ThinItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Black.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-BlackItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Bold.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-BoldItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraBold.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraLight.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Italic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Light.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-LightItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Medium.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-MediumItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Regular.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-SemiBold.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Thin.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ThinItalic.woff2 +0 -0
- package/fonts/Inter/web/InterVariable-Italic.woff2 +0 -0
- package/fonts/Inter/web/InterVariable.woff2 +0 -0
- package/fonts/Inter/web/inter.css +0 -148
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ActiveTab } from '../types';
|
|
3
|
-
interface SettingsViewProps {
|
|
4
|
-
headerTopPadding: number;
|
|
5
|
-
activeTab?: ActiveTab;
|
|
6
|
-
defaultTab: ActiveTab;
|
|
7
|
-
tabVisibility: Record<string, boolean>;
|
|
8
|
-
onCloseSettings: () => void;
|
|
9
|
-
onUpdateTabVisibility: (key: ActiveTab, val: boolean) => void;
|
|
10
|
-
onSetDefaultTab: (key: ActiveTab) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const SettingsView: React.FC<SettingsViewProps>;
|
|
13
|
-
export default SettingsView;
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Alert, Pressable, ScrollView, Switch, Text, View, } from 'react-native';
|
|
3
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import TouchableScale from './TouchableScale';
|
|
6
|
-
import { WhiteBackNavigation, SunIcon, MoonIcon, SignalIcon, TerminalIcon, AnalyticsIcon, GlobeIcon, TrashIcon, } from './NetworkIcons';
|
|
7
|
-
import { AppColors } from '../styles/AppColors';
|
|
8
|
-
import { AppFonts } from '../styles/AppFonts';
|
|
9
|
-
import { toggleGlobalTheme } from '../styles';
|
|
10
|
-
import { saveSettings, isPersistentStorageAvailable, clearPersistedSettings, } from '../helpers/settingsStore';
|
|
11
|
-
export const SettingsView = ({ headerTopPadding, defaultTab, tabVisibility, onCloseSettings, onUpdateTabVisibility, onSetDefaultTab, }) => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
const [themeMode, setThemeMode] = React.useState(AppColors.primaryLight === AppColors.white ? 'light' : 'dark');
|
|
14
|
-
const handleToggleTheme = () => {
|
|
15
|
-
const nextIsDark = themeMode !== 'dark';
|
|
16
|
-
toggleGlobalTheme(nextIsDark);
|
|
17
|
-
const newTheme = nextIsDark ? 'dark' : 'light';
|
|
18
|
-
setThemeMode(newTheme);
|
|
19
|
-
saveSettings({ isDark: nextIsDark, theme: newTheme });
|
|
20
|
-
};
|
|
21
|
-
const renderSettingRow = (opts) => {
|
|
22
|
-
return (<Pressable onPress={opts.onPress} disabled={!opts.onPress} style={{
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
alignItems: 'center',
|
|
25
|
-
justifyContent: 'space-between',
|
|
26
|
-
paddingVertical: 12,
|
|
27
|
-
paddingHorizontal: 16,
|
|
28
|
-
borderBottomWidth: 1,
|
|
29
|
-
borderBottomColor: AppColors.dividerColor,
|
|
30
|
-
}}>
|
|
31
|
-
<View style={{
|
|
32
|
-
flexDirection: 'row',
|
|
33
|
-
alignItems: 'center',
|
|
34
|
-
gap: 12,
|
|
35
|
-
flex: 1,
|
|
36
|
-
marginRight: 8,
|
|
37
|
-
}}>
|
|
38
|
-
<View style={{
|
|
39
|
-
width: 32,
|
|
40
|
-
height: 32,
|
|
41
|
-
borderRadius: 8,
|
|
42
|
-
backgroundColor: AppColors.grayBackground,
|
|
43
|
-
alignItems: 'center',
|
|
44
|
-
justifyContent: 'center',
|
|
45
|
-
}}>
|
|
46
|
-
{opts.icon}
|
|
47
|
-
</View>
|
|
48
|
-
<View style={{ flex: 1 }}>
|
|
49
|
-
<Text style={{
|
|
50
|
-
fontFamily: AppFonts.interBold,
|
|
51
|
-
fontSize: 13,
|
|
52
|
-
color: AppColors.primaryBlack,
|
|
53
|
-
}}>
|
|
54
|
-
{opts.title}
|
|
55
|
-
</Text>
|
|
56
|
-
{opts.description ? (<Text style={{
|
|
57
|
-
fontFamily: AppFonts.interRegular,
|
|
58
|
-
fontSize: 11,
|
|
59
|
-
color: AppColors.grayTextWeak,
|
|
60
|
-
marginTop: 2,
|
|
61
|
-
}}>
|
|
62
|
-
{opts.description}
|
|
63
|
-
</Text>) : null}
|
|
64
|
-
</View>
|
|
65
|
-
</View>
|
|
66
|
-
{opts.rightComponent}
|
|
67
|
-
</Pressable>);
|
|
68
|
-
};
|
|
69
|
-
return (<View style={{ flex: 1, backgroundColor: AppColors.grayBackground }}>
|
|
70
|
-
<LinearGradient colors={[AppColors.purple, '#6B4EFF']} style={{ paddingTop: headerTopPadding, paddingBottom: 16 }}>
|
|
71
|
-
<View style={{
|
|
72
|
-
flexDirection: 'row',
|
|
73
|
-
alignItems: 'center',
|
|
74
|
-
paddingHorizontal: 16,
|
|
75
|
-
gap: 12,
|
|
76
|
-
}}>
|
|
77
|
-
<TouchableScale onPress={onCloseSettings} hitSlop={15} style={{
|
|
78
|
-
width: 36,
|
|
79
|
-
height: 36,
|
|
80
|
-
borderRadius: 18,
|
|
81
|
-
alignItems: 'center',
|
|
82
|
-
justifyContent: 'center',
|
|
83
|
-
backgroundColor: 'rgba(255,255,255,0.18)',
|
|
84
|
-
}}>
|
|
85
|
-
<WhiteBackNavigation />
|
|
86
|
-
</TouchableScale>
|
|
87
|
-
<Text style={{
|
|
88
|
-
fontFamily: AppFonts.interBold,
|
|
89
|
-
fontSize: 18,
|
|
90
|
-
color: AppColors.white,
|
|
91
|
-
}}>
|
|
92
|
-
{t('settings.title')}
|
|
93
|
-
</Text>
|
|
94
|
-
</View>
|
|
95
|
-
</LinearGradient>
|
|
96
|
-
|
|
97
|
-
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ paddingBottom: 32, gap: 16, paddingTop: 16 }}>
|
|
98
|
-
{/* Theme Settings */}
|
|
99
|
-
<View style={{
|
|
100
|
-
backgroundColor: AppColors.primaryLight,
|
|
101
|
-
marginHorizontal: 16,
|
|
102
|
-
borderRadius: 12,
|
|
103
|
-
borderWidth: 1,
|
|
104
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
105
|
-
overflow: 'hidden',
|
|
106
|
-
}}>
|
|
107
|
-
<View style={{
|
|
108
|
-
paddingHorizontal: 16,
|
|
109
|
-
paddingVertical: 10,
|
|
110
|
-
backgroundColor: AppColors.grayBackground,
|
|
111
|
-
borderBottomWidth: 1,
|
|
112
|
-
borderBottomColor: AppColors.dividerColor,
|
|
113
|
-
}}>
|
|
114
|
-
<Text style={{
|
|
115
|
-
fontFamily: AppFonts.interBold,
|
|
116
|
-
fontSize: 11,
|
|
117
|
-
color: AppColors.grayTextWeak,
|
|
118
|
-
letterSpacing: 0.5,
|
|
119
|
-
}}>
|
|
120
|
-
{t('settings.appearance')}
|
|
121
|
-
</Text>
|
|
122
|
-
</View>
|
|
123
|
-
{renderSettingRow({
|
|
124
|
-
icon: themeMode === 'dark' ? (<MoonIcon color={AppColors.purple} size={16}/>) : (<SunIcon color={AppColors.lightOrange} size={16}/>),
|
|
125
|
-
title: t('settings.dark_mode'),
|
|
126
|
-
description: t('settings.dark_mode_desc'),
|
|
127
|
-
rightComponent: (<Switch value={themeMode === 'dark'} onValueChange={handleToggleTheme} trackColor={{
|
|
128
|
-
false: AppColors.grayBorderSecondary,
|
|
129
|
-
true: AppColors.purple,
|
|
130
|
-
}}/>),
|
|
131
|
-
})}
|
|
132
|
-
</View>
|
|
133
|
-
|
|
134
|
-
{/* Module Visibility Settings */}
|
|
135
|
-
<View style={{
|
|
136
|
-
backgroundColor: AppColors.primaryLight,
|
|
137
|
-
marginHorizontal: 16,
|
|
138
|
-
borderRadius: 12,
|
|
139
|
-
borderWidth: 1,
|
|
140
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
141
|
-
overflow: 'hidden',
|
|
142
|
-
}}>
|
|
143
|
-
<View style={{
|
|
144
|
-
paddingHorizontal: 16,
|
|
145
|
-
paddingVertical: 10,
|
|
146
|
-
backgroundColor: AppColors.grayBackground,
|
|
147
|
-
borderBottomWidth: 1,
|
|
148
|
-
borderBottomColor: AppColors.dividerColor,
|
|
149
|
-
}}>
|
|
150
|
-
<Text style={{
|
|
151
|
-
fontFamily: AppFonts.interBold,
|
|
152
|
-
fontSize: 11,
|
|
153
|
-
color: AppColors.grayTextWeak,
|
|
154
|
-
letterSpacing: 0.5,
|
|
155
|
-
}}>
|
|
156
|
-
{t('settings.module_visibility')}
|
|
157
|
-
</Text>
|
|
158
|
-
</View>
|
|
159
|
-
|
|
160
|
-
{renderSettingRow({
|
|
161
|
-
icon: <SignalIcon color={AppColors.purple} size={16}/>,
|
|
162
|
-
title: t('settings.apis_tab'),
|
|
163
|
-
description: t('settings.apis_tab_desc'),
|
|
164
|
-
rightComponent: (<Switch value={tabVisibility.apis !== false} onValueChange={val => onUpdateTabVisibility('apis', val)} trackColor={{
|
|
165
|
-
false: AppColors.grayBorderSecondary,
|
|
166
|
-
true: AppColors.purple,
|
|
167
|
-
}}/>),
|
|
168
|
-
})}
|
|
169
|
-
|
|
170
|
-
{renderSettingRow({
|
|
171
|
-
icon: <TerminalIcon color={AppColors.purple} size={16}/>,
|
|
172
|
-
title: t('settings.logs_tab'),
|
|
173
|
-
description: t('settings.logs_tab_desc'),
|
|
174
|
-
rightComponent: (<Switch value={tabVisibility.logs !== false} onValueChange={val => onUpdateTabVisibility('logs', val)} trackColor={{
|
|
175
|
-
false: AppColors.grayBorderSecondary,
|
|
176
|
-
true: AppColors.purple,
|
|
177
|
-
}}/>),
|
|
178
|
-
})}
|
|
179
|
-
|
|
180
|
-
{renderSettingRow({
|
|
181
|
-
icon: <AnalyticsIcon color={AppColors.purple} size={16}/>,
|
|
182
|
-
title: t('settings.analytics_tab'),
|
|
183
|
-
description: t('settings.analytics_tab_desc'),
|
|
184
|
-
rightComponent: (<Switch value={tabVisibility.analytics !== false} onValueChange={val => onUpdateTabVisibility('analytics', val)} trackColor={{
|
|
185
|
-
false: AppColors.grayBorderSecondary,
|
|
186
|
-
true: AppColors.purple,
|
|
187
|
-
}}/>),
|
|
188
|
-
})}
|
|
189
|
-
|
|
190
|
-
{renderSettingRow({
|
|
191
|
-
icon: <TerminalIcon color={AppColors.purple} size={16}/>,
|
|
192
|
-
title: t('settings.redux_tab'),
|
|
193
|
-
description: t('settings.redux_tab_desc'),
|
|
194
|
-
rightComponent: (<Switch value={tabVisibility.redux !== false} onValueChange={val => onUpdateTabVisibility('redux', val)} trackColor={{
|
|
195
|
-
false: AppColors.grayBorderSecondary,
|
|
196
|
-
true: AppColors.purple,
|
|
197
|
-
}}/>),
|
|
198
|
-
})}
|
|
199
|
-
</View>
|
|
200
|
-
|
|
201
|
-
{/* Landing Tab Preference */}
|
|
202
|
-
<View style={{
|
|
203
|
-
backgroundColor: AppColors.primaryLight,
|
|
204
|
-
marginHorizontal: 16,
|
|
205
|
-
borderRadius: 12,
|
|
206
|
-
borderWidth: 1,
|
|
207
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
208
|
-
overflow: 'hidden',
|
|
209
|
-
}}>
|
|
210
|
-
<View style={{
|
|
211
|
-
paddingHorizontal: 16,
|
|
212
|
-
paddingVertical: 10,
|
|
213
|
-
backgroundColor: AppColors.grayBackground,
|
|
214
|
-
borderBottomWidth: 1,
|
|
215
|
-
borderBottomColor: AppColors.dividerColor,
|
|
216
|
-
}}>
|
|
217
|
-
<Text style={{
|
|
218
|
-
fontFamily: AppFonts.interBold,
|
|
219
|
-
fontSize: 11,
|
|
220
|
-
color: AppColors.grayTextWeak,
|
|
221
|
-
letterSpacing: 0.5,
|
|
222
|
-
}}>
|
|
223
|
-
{t('settings.default_landing_tab')}
|
|
224
|
-
</Text>
|
|
225
|
-
</View>
|
|
226
|
-
{['apis', 'logs', 'analytics', 'redux'].map(tabKey => {
|
|
227
|
-
if (!tabVisibility[tabKey])
|
|
228
|
-
return null;
|
|
229
|
-
const isSelected = defaultTab === tabKey;
|
|
230
|
-
return (<TouchableScale key={tabKey} onPress={() => onSetDefaultTab(tabKey)} style={{
|
|
231
|
-
flexDirection: 'row',
|
|
232
|
-
alignItems: 'center',
|
|
233
|
-
justifyContent: 'space-between',
|
|
234
|
-
paddingVertical: 12,
|
|
235
|
-
paddingHorizontal: 16,
|
|
236
|
-
borderBottomWidth: 1,
|
|
237
|
-
borderBottomColor: AppColors.dividerColor,
|
|
238
|
-
backgroundColor: isSelected
|
|
239
|
-
? 'rgba(107, 78, 255, 0.05)'
|
|
240
|
-
: AppColors.primaryLight,
|
|
241
|
-
}}>
|
|
242
|
-
<Text style={{
|
|
243
|
-
fontFamily: isSelected
|
|
244
|
-
? AppFonts.interBold
|
|
245
|
-
: AppFonts.interMedium,
|
|
246
|
-
fontSize: 13,
|
|
247
|
-
color: isSelected
|
|
248
|
-
? AppColors.purple
|
|
249
|
-
: AppColors.primaryBlack,
|
|
250
|
-
}}>
|
|
251
|
-
{tabKey.toUpperCase()} Tab
|
|
252
|
-
</Text>
|
|
253
|
-
<View style={{
|
|
254
|
-
width: 18,
|
|
255
|
-
height: 18,
|
|
256
|
-
borderRadius: 9,
|
|
257
|
-
borderWidth: isSelected ? 5 : 2,
|
|
258
|
-
borderColor: isSelected
|
|
259
|
-
? AppColors.purple
|
|
260
|
-
: AppColors.grayBorderSecondary,
|
|
261
|
-
}}/>
|
|
262
|
-
</TouchableScale>);
|
|
263
|
-
})}
|
|
264
|
-
</View>
|
|
265
|
-
|
|
266
|
-
{/* Storage & Persistence Settings */}
|
|
267
|
-
<View style={{
|
|
268
|
-
backgroundColor: AppColors.primaryLight,
|
|
269
|
-
marginHorizontal: 16,
|
|
270
|
-
borderRadius: 12,
|
|
271
|
-
borderWidth: 1,
|
|
272
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
273
|
-
overflow: 'hidden',
|
|
274
|
-
}}>
|
|
275
|
-
<View style={{
|
|
276
|
-
paddingHorizontal: 16,
|
|
277
|
-
paddingVertical: 10,
|
|
278
|
-
backgroundColor: AppColors.grayBackground,
|
|
279
|
-
borderBottomWidth: 1,
|
|
280
|
-
borderBottomColor: AppColors.dividerColor,
|
|
281
|
-
}}>
|
|
282
|
-
<Text style={{
|
|
283
|
-
fontFamily: AppFonts.interBold,
|
|
284
|
-
fontSize: 11,
|
|
285
|
-
color: AppColors.grayTextWeak,
|
|
286
|
-
letterSpacing: 0.5,
|
|
287
|
-
}}>
|
|
288
|
-
{t('settings.storage_persistence')}
|
|
289
|
-
</Text>
|
|
290
|
-
</View>
|
|
291
|
-
{renderSettingRow({
|
|
292
|
-
icon: <GlobeIcon color={AppColors.purple} size={16}/>,
|
|
293
|
-
title: t('settings.custom_storage'),
|
|
294
|
-
description: isPersistentStorageAvailable()
|
|
295
|
-
? t('settings.custom_storage_active')
|
|
296
|
-
: t('settings.custom_storage_memory'),
|
|
297
|
-
})}
|
|
298
|
-
|
|
299
|
-
{renderSettingRow({
|
|
300
|
-
icon: <TrashIcon color={AppColors.errorColor} size={16}/>,
|
|
301
|
-
title: t('settings.reset_settings'),
|
|
302
|
-
description: t('settings.reset_settings_desc'),
|
|
303
|
-
onPress: () => {
|
|
304
|
-
Alert.alert(t('settings.reset_confirm_title'), t('settings.reset_confirm_msg'), [
|
|
305
|
-
{ text: t('header.cancel'), style: 'cancel' },
|
|
306
|
-
{
|
|
307
|
-
text: t('settings.reset'),
|
|
308
|
-
style: 'destructive',
|
|
309
|
-
onPress: () => {
|
|
310
|
-
clearPersistedSettings();
|
|
311
|
-
Alert.alert(t('settings.reset'), t('settings.reset_done'));
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
]);
|
|
315
|
-
},
|
|
316
|
-
})}
|
|
317
|
-
</View>
|
|
318
|
-
</ScrollView>
|
|
319
|
-
</View>);
|
|
320
|
-
};
|
|
321
|
-
export default SettingsView;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface WebViewLog {
|
|
3
|
-
id: number;
|
|
4
|
-
type: 'log' | 'info' | 'warn' | 'error';
|
|
5
|
-
message: string;
|
|
6
|
-
timestamp: number;
|
|
7
|
-
}
|
|
8
|
-
export interface WebViewNavState {
|
|
9
|
-
url: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
timestamp: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const WebView: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
14
|
-
export declare const addWebViewLog: (type: "log" | "info" | "warn" | "error", message: string) => void;
|
|
15
|
-
export declare const addWebViewNav: (url: string, title?: string) => void;
|
|
16
|
-
export declare const addWebViewHtml: (url: string, html: string, css?: string, js?: string) => void;
|
|
17
|
-
export declare const getWebViewLogs: () => WebViewLog[];
|
|
18
|
-
export declare const getWebViewNavHistory: () => WebViewNavState[];
|
|
19
|
-
export declare const getWebViewHtml: () => string;
|
|
20
|
-
export declare const getWebViewCss: () => string;
|
|
21
|
-
export declare const getWebViewJs: () => string;
|
|
22
|
-
export declare const getWebViewHtmlUrl: () => string;
|
|
23
|
-
export declare const clearWebViewData: () => void;
|
|
24
|
-
export declare const subscribeWebView: (cb: () => void) => () => void;
|