react-native-inapp-inspector 1.1.18 → 1.1.20
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/commonjs/styles/index.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/styles/index.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,757 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const react_native_1 = require("react-native");
|
|
8
|
-
const InspectorContext_1 = require("./InspectorContext");
|
|
9
|
-
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
10
|
-
const AnimatedEntrance_1 = __importDefault(require("../AnimatedEntrance"));
|
|
11
|
-
const EmptyState_1 = __importDefault(require("../EmptyState"));
|
|
12
|
-
const HighlightText_1 = __importDefault(require("../HighlightText"));
|
|
13
|
-
const CodeSnippet_1 = __importDefault(require("../CodeSnippet"));
|
|
14
|
-
const CopyButton_1 = __importDefault(require("../CopyButton"));
|
|
15
|
-
const styles_1 = __importDefault(require("../../styles"));
|
|
16
|
-
const AppColors_1 = require("../../styles/AppColors");
|
|
17
|
-
const AppFonts_1 = require("../../styles/AppFonts");
|
|
18
|
-
const webViewLogger_1 = require("../../customHooks/webViewLogger");
|
|
19
|
-
const NetworkIcons_1 = require("../NetworkIcons");
|
|
20
|
-
let OriginalWebView = null;
|
|
21
|
-
try {
|
|
22
|
-
const RNWebView = require('react-native-webview');
|
|
23
|
-
OriginalWebView = RNWebView.WebView || RNWebView.default;
|
|
24
|
-
}
|
|
25
|
-
catch (e) {
|
|
26
|
-
// Silent fail
|
|
27
|
-
}
|
|
28
|
-
const previewInspectScript = `
|
|
29
|
-
(function() {
|
|
30
|
-
var style = document.createElement('style');
|
|
31
|
-
style.innerHTML = '* { cursor: pointer !important; }';
|
|
32
|
-
document.head.appendChild(style);
|
|
33
|
-
|
|
34
|
-
document.addEventListener('click', function(e) {
|
|
35
|
-
var el = e.target;
|
|
36
|
-
if (!el) return;
|
|
37
|
-
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
e.stopPropagation();
|
|
40
|
-
|
|
41
|
-
var oldOutline = el.style.outline;
|
|
42
|
-
var oldTransition = el.style.transition;
|
|
43
|
-
el.style.transition = 'outline 0.15s ease';
|
|
44
|
-
el.style.outline = '3px solid #684B9B';
|
|
45
|
-
setTimeout(function() {
|
|
46
|
-
el.style.outline = oldOutline;
|
|
47
|
-
el.style.transition = oldTransition;
|
|
48
|
-
}, 600);
|
|
49
|
-
|
|
50
|
-
var tagName = el.tagName.toLowerCase();
|
|
51
|
-
var searchStr = '<' + tagName;
|
|
52
|
-
|
|
53
|
-
if (el.id) {
|
|
54
|
-
searchStr += ' id="' + el.id + '"';
|
|
55
|
-
} else if (el.className && typeof el.className === 'string') {
|
|
56
|
-
var firstClass = el.className.trim().split(/\\s+/)[0];
|
|
57
|
-
if (firstClass) {
|
|
58
|
-
searchStr += ' class="' + firstClass;
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
var text = (el.textContent || '').trim().substring(0, 25);
|
|
62
|
-
if (text) {
|
|
63
|
-
searchStr = text;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (window.ReactNativeWebView && window.ReactNativeWebView.postMessage) {
|
|
68
|
-
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
69
|
-
type: 'preview-inspect',
|
|
70
|
-
tagName: tagName,
|
|
71
|
-
id: el.id || '',
|
|
72
|
-
className: typeof el.className === 'string' ? el.className : '',
|
|
73
|
-
searchStr: searchStr
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
76
|
-
}, true);
|
|
77
|
-
})();
|
|
78
|
-
true;
|
|
79
|
-
`;
|
|
80
|
-
const WebViewTab = () => {
|
|
81
|
-
const { webViewNavHistory, webViewSearch, webViewSubTab, setWebViewSubTab, webViewLogs, webViewHtml, webViewCss, webViewJs, webViewHtmlUrl, htmlSubTab, setHtmlSubTab, isHtmlTabReady, inspectedElement, setInspectedElement, getSearchTermForTab, filteredNavHistory, isDark, } = (0, InspectorContext_1.useInspector)();
|
|
82
|
-
if (webViewNavHistory.length === 0) {
|
|
83
|
-
return (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
84
|
-
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
85
|
-
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
86
|
-
</react_native_1.View>
|
|
87
|
-
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
88
|
-
No WebView Activity
|
|
89
|
-
</react_native_1.Text>
|
|
90
|
-
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
91
|
-
Load a webpage within a connected WebView component to
|
|
92
|
-
inspect pages, page source, and console logs.
|
|
93
|
-
</react_native_1.Text>
|
|
94
|
-
</react_native_1.View>);
|
|
95
|
-
}
|
|
96
|
-
return (<react_native_1.View style={{ flex: 1 }}>
|
|
97
|
-
{/* ─── Current Page Address Bar (Now on top) ─── */}
|
|
98
|
-
{(() => {
|
|
99
|
-
const currentUrl = webViewNavHistory[0]?.url;
|
|
100
|
-
if (!currentUrl)
|
|
101
|
-
return null;
|
|
102
|
-
return (<react_native_1.View style={{
|
|
103
|
-
paddingHorizontal: 12,
|
|
104
|
-
paddingTop: 6,
|
|
105
|
-
paddingBottom: 6,
|
|
106
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
107
|
-
borderBottomWidth: 1,
|
|
108
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
109
|
-
}}>
|
|
110
|
-
<react_native_1.View style={{
|
|
111
|
-
flexDirection: 'row',
|
|
112
|
-
alignItems: 'center',
|
|
113
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
114
|
-
borderRadius: 8,
|
|
115
|
-
borderWidth: 1.5,
|
|
116
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
117
|
-
paddingHorizontal: 10,
|
|
118
|
-
paddingVertical: 5,
|
|
119
|
-
gap: 8,
|
|
120
|
-
}}>
|
|
121
|
-
{/* Left: Lock and HTTPS label */}
|
|
122
|
-
<react_native_1.View style={{
|
|
123
|
-
flexDirection: 'row',
|
|
124
|
-
alignItems: 'center',
|
|
125
|
-
gap: 4,
|
|
126
|
-
}}>
|
|
127
|
-
<react_native_1.Text style={{ fontSize: 11 }}>🔒</react_native_1.Text>
|
|
128
|
-
<react_native_1.Text style={{
|
|
129
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
130
|
-
fontSize: 9.5,
|
|
131
|
-
color: AppColors_1.AppColors.greenColor,
|
|
132
|
-
letterSpacing: 0.5,
|
|
133
|
-
}}>
|
|
134
|
-
HTTPS
|
|
135
|
-
</react_native_1.Text>
|
|
136
|
-
</react_native_1.View>
|
|
137
|
-
<react_native_1.View style={{
|
|
138
|
-
width: 1.5,
|
|
139
|
-
height: 12,
|
|
140
|
-
backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
141
|
-
}}/>
|
|
142
|
-
|
|
143
|
-
{/* Middle: URL text (Address style) */}
|
|
144
|
-
<react_native_1.View style={{ flex: 1 }}>
|
|
145
|
-
<HighlightText_1.default text={currentUrl} search={webViewSearch} numberOfLines={1} ellipsizeMode="tail" style={{
|
|
146
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
147
|
-
fontSize: 11.5,
|
|
148
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
149
|
-
}} highlightStyle={styles_1.default.highlight} detectLinks={false}/>
|
|
150
|
-
</react_native_1.View>
|
|
151
|
-
|
|
152
|
-
{/* Right: Copy Button */}
|
|
153
|
-
<CopyButton_1.default value={currentUrl} label="URL"/>
|
|
154
|
-
|
|
155
|
-
{/* Right: Globe Icon button to open browser */}
|
|
156
|
-
<TouchableScale_1.default onPress={() => react_native_1.Linking.openURL(currentUrl)} hitSlop={8} style={{
|
|
157
|
-
width: 26,
|
|
158
|
-
height: 26,
|
|
159
|
-
borderRadius: 13,
|
|
160
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
161
|
-
borderWidth: 1,
|
|
162
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
163
|
-
alignItems: 'center',
|
|
164
|
-
justifyContent: 'center',
|
|
165
|
-
}}>
|
|
166
|
-
<NetworkIcons_1.GlobeIcon size={11} color={AppColors_1.AppColors.purple}/>
|
|
167
|
-
</TouchableScale_1.default>
|
|
168
|
-
</react_native_1.View>
|
|
169
|
-
</react_native_1.View>);
|
|
170
|
-
})()}
|
|
171
|
-
|
|
172
|
-
{/* ─── WebView Sub-Tabs (Now below Address Bar) ─── */}
|
|
173
|
-
<react_native_1.View style={{
|
|
174
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
175
|
-
borderBottomWidth: 1,
|
|
176
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
177
|
-
paddingVertical: 6,
|
|
178
|
-
}}>
|
|
179
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
180
|
-
paddingHorizontal: 12,
|
|
181
|
-
flexDirection: 'row',
|
|
182
|
-
gap: 8,
|
|
183
|
-
}}>
|
|
184
|
-
{/* Sub-tab 1: Preview */}
|
|
185
|
-
<react_native_1.Pressable style={[
|
|
186
|
-
{
|
|
187
|
-
paddingVertical: 6,
|
|
188
|
-
paddingHorizontal: 14,
|
|
189
|
-
borderRadius: 8,
|
|
190
|
-
alignItems: 'center',
|
|
191
|
-
flexDirection: 'row',
|
|
192
|
-
gap: 6,
|
|
193
|
-
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
194
|
-
borderWidth: 1,
|
|
195
|
-
borderColor: 'transparent',
|
|
196
|
-
},
|
|
197
|
-
webViewSubTab === 'preview' && {
|
|
198
|
-
backgroundColor: AppColors_1.AppColors.purple,
|
|
199
|
-
borderColor: AppColors_1.AppColors.purple,
|
|
200
|
-
},
|
|
201
|
-
]} onPress={() => {
|
|
202
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
203
|
-
setWebViewSubTab('preview');
|
|
204
|
-
}}>
|
|
205
|
-
<NetworkIcons_1.EyeIcon color={webViewSubTab === 'preview'
|
|
206
|
-
? '#FFFFFF'
|
|
207
|
-
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
208
|
-
<react_native_1.Text style={{
|
|
209
|
-
fontFamily: webViewSubTab === 'preview'
|
|
210
|
-
? AppFonts_1.AppFonts.interBold
|
|
211
|
-
: AppFonts_1.AppFonts.interMedium,
|
|
212
|
-
fontSize: 12,
|
|
213
|
-
color: webViewSubTab === 'preview'
|
|
214
|
-
? '#FFFFFF'
|
|
215
|
-
: AppColors_1.AppColors.grayTextStrong,
|
|
216
|
-
}}>
|
|
217
|
-
Preview
|
|
218
|
-
</react_native_1.Text>
|
|
219
|
-
</react_native_1.Pressable>
|
|
220
|
-
|
|
221
|
-
{/* Sub-tab 2: Page Source */}
|
|
222
|
-
<react_native_1.Pressable style={[
|
|
223
|
-
{
|
|
224
|
-
paddingVertical: 6,
|
|
225
|
-
paddingHorizontal: 14,
|
|
226
|
-
borderRadius: 8,
|
|
227
|
-
alignItems: 'center',
|
|
228
|
-
flexDirection: 'row',
|
|
229
|
-
gap: 6,
|
|
230
|
-
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
231
|
-
borderWidth: 1,
|
|
232
|
-
borderColor: 'transparent',
|
|
233
|
-
},
|
|
234
|
-
webViewSubTab === 'html' && {
|
|
235
|
-
backgroundColor: AppColors_1.AppColors.purple,
|
|
236
|
-
borderColor: AppColors_1.AppColors.purple,
|
|
237
|
-
},
|
|
238
|
-
]} onPress={() => {
|
|
239
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
240
|
-
setWebViewSubTab('html');
|
|
241
|
-
}}>
|
|
242
|
-
<NetworkIcons_1.HtmlIcon color={webViewSubTab === 'html'
|
|
243
|
-
? '#FFFFFF'
|
|
244
|
-
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
245
|
-
<react_native_1.Text style={{
|
|
246
|
-
fontFamily: webViewSubTab === 'html'
|
|
247
|
-
? AppFonts_1.AppFonts.interBold
|
|
248
|
-
: AppFonts_1.AppFonts.interMedium,
|
|
249
|
-
fontSize: 12,
|
|
250
|
-
color: webViewSubTab === 'html'
|
|
251
|
-
? '#FFFFFF'
|
|
252
|
-
: AppColors_1.AppColors.grayTextStrong,
|
|
253
|
-
}}>
|
|
254
|
-
Page Source
|
|
255
|
-
</react_native_1.Text>
|
|
256
|
-
</react_native_1.Pressable>
|
|
257
|
-
|
|
258
|
-
{/* Sub-tab 3: History */}
|
|
259
|
-
<react_native_1.Pressable style={[
|
|
260
|
-
{
|
|
261
|
-
paddingVertical: 6,
|
|
262
|
-
paddingHorizontal: 14,
|
|
263
|
-
borderRadius: 8,
|
|
264
|
-
alignItems: 'center',
|
|
265
|
-
flexDirection: 'row',
|
|
266
|
-
gap: 6,
|
|
267
|
-
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
268
|
-
borderWidth: 1,
|
|
269
|
-
borderColor: 'transparent',
|
|
270
|
-
},
|
|
271
|
-
webViewSubTab === 'navigation' && {
|
|
272
|
-
backgroundColor: AppColors_1.AppColors.purple,
|
|
273
|
-
borderColor: AppColors_1.AppColors.purple,
|
|
274
|
-
},
|
|
275
|
-
]} onPress={() => {
|
|
276
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
277
|
-
setWebViewSubTab('navigation');
|
|
278
|
-
}}>
|
|
279
|
-
<NetworkIcons_1.ClockIcon color={webViewSubTab === 'navigation'
|
|
280
|
-
? '#FFFFFF'
|
|
281
|
-
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
282
|
-
<react_native_1.Text style={{
|
|
283
|
-
fontFamily: webViewSubTab === 'navigation'
|
|
284
|
-
? AppFonts_1.AppFonts.interBold
|
|
285
|
-
: AppFonts_1.AppFonts.interMedium,
|
|
286
|
-
fontSize: 12,
|
|
287
|
-
color: webViewSubTab === 'navigation'
|
|
288
|
-
? '#FFFFFF'
|
|
289
|
-
: AppColors_1.AppColors.grayTextStrong,
|
|
290
|
-
}}>
|
|
291
|
-
History ({webViewNavHistory.length})
|
|
292
|
-
</react_native_1.Text>
|
|
293
|
-
</react_native_1.Pressable>
|
|
294
|
-
|
|
295
|
-
{/* Sub-tab 4: Console */}
|
|
296
|
-
<react_native_1.Pressable style={[
|
|
297
|
-
{
|
|
298
|
-
paddingVertical: 6,
|
|
299
|
-
paddingHorizontal: 14,
|
|
300
|
-
borderRadius: 8,
|
|
301
|
-
alignItems: 'center',
|
|
302
|
-
flexDirection: 'row',
|
|
303
|
-
gap: 6,
|
|
304
|
-
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
305
|
-
borderWidth: 1,
|
|
306
|
-
borderColor: 'transparent',
|
|
307
|
-
},
|
|
308
|
-
webViewSubTab === 'console' && {
|
|
309
|
-
backgroundColor: AppColors_1.AppColors.purple,
|
|
310
|
-
borderColor: AppColors_1.AppColors.purple,
|
|
311
|
-
},
|
|
312
|
-
]} onPress={() => {
|
|
313
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
314
|
-
setWebViewSubTab('console');
|
|
315
|
-
}}>
|
|
316
|
-
<NetworkIcons_1.TerminalIcon color={webViewSubTab === 'console'
|
|
317
|
-
? '#FFFFFF'
|
|
318
|
-
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
319
|
-
<react_native_1.Text style={{
|
|
320
|
-
fontFamily: webViewSubTab === 'console'
|
|
321
|
-
? AppFonts_1.AppFonts.interBold
|
|
322
|
-
: AppFonts_1.AppFonts.interMedium,
|
|
323
|
-
fontSize: 12,
|
|
324
|
-
color: webViewSubTab === 'console'
|
|
325
|
-
? '#FFFFFF'
|
|
326
|
-
: AppColors_1.AppColors.grayTextStrong,
|
|
327
|
-
}}>
|
|
328
|
-
Console ({webViewLogs.length})
|
|
329
|
-
</react_native_1.Text>
|
|
330
|
-
</react_native_1.Pressable>
|
|
331
|
-
</react_native_1.ScrollView>
|
|
332
|
-
</react_native_1.View>
|
|
333
|
-
|
|
334
|
-
{webViewSubTab === 'html' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
335
|
-
{webViewHtml || webViewCss || webViewJs ? (<react_native_1.View style={{ flex: 1 }}>
|
|
336
|
-
{/* Clear Inspect Banner */}
|
|
337
|
-
{inspectedElement && (<react_native_1.View style={{
|
|
338
|
-
flexDirection: 'row',
|
|
339
|
-
alignItems: 'center',
|
|
340
|
-
justifyContent: 'space-between',
|
|
341
|
-
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
342
|
-
paddingHorizontal: 12,
|
|
343
|
-
paddingVertical: 6,
|
|
344
|
-
borderBottomWidth: 1,
|
|
345
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
346
|
-
}}>
|
|
347
|
-
<react_native_1.Text style={{
|
|
348
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
349
|
-
fontSize: 11.5,
|
|
350
|
-
color: AppColors_1.AppColors.purple,
|
|
351
|
-
flex: 1,
|
|
352
|
-
}}>
|
|
353
|
-
Inspecting element:{' '}
|
|
354
|
-
<react_native_1.Text style={{
|
|
355
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
356
|
-
}}>
|
|
357
|
-
<{inspectedElement.tagName}
|
|
358
|
-
{inspectedElement.id
|
|
359
|
-
? ` id="${inspectedElement.id}"`
|
|
360
|
-
: ''}
|
|
361
|
-
{inspectedElement.className
|
|
362
|
-
? ` class="${inspectedElement.className
|
|
363
|
-
.trim()
|
|
364
|
-
.split(/\s+/)[0]}"`
|
|
365
|
-
: ''}
|
|
366
|
-
>
|
|
367
|
-
</react_native_1.Text>
|
|
368
|
-
</react_native_1.Text>
|
|
369
|
-
<react_native_1.Pressable onPress={() => setInspectedElement(null)} style={{
|
|
370
|
-
paddingHorizontal: 8,
|
|
371
|
-
paddingVertical: 4,
|
|
372
|
-
}}>
|
|
373
|
-
<react_native_1.Text style={{
|
|
374
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
375
|
-
fontSize: 11,
|
|
376
|
-
color: AppColors_1.AppColors.purple,
|
|
377
|
-
}}>
|
|
378
|
-
Clear Inspect
|
|
379
|
-
</react_native_1.Text>
|
|
380
|
-
</react_native_1.Pressable>
|
|
381
|
-
</react_native_1.View>)}
|
|
382
|
-
|
|
383
|
-
{/* Inner sub-tabs inside HTML source view */}
|
|
384
|
-
<react_native_1.View style={{
|
|
385
|
-
flexDirection: 'row',
|
|
386
|
-
borderBottomWidth: 1,
|
|
387
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
388
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
389
|
-
paddingHorizontal: 12,
|
|
390
|
-
gap: 12,
|
|
391
|
-
}}>
|
|
392
|
-
{['html', 'css', 'javascript'].map(tab => {
|
|
393
|
-
const active = htmlSubTab === tab;
|
|
394
|
-
const label = tab === 'html'
|
|
395
|
-
? 'HTML'
|
|
396
|
-
: tab === 'css'
|
|
397
|
-
? 'CSS'
|
|
398
|
-
: 'JavaScript';
|
|
399
|
-
const activeColor = tab === 'html'
|
|
400
|
-
? '#EA580C' // Orange
|
|
401
|
-
: tab === 'css'
|
|
402
|
-
? '#2563EB' // Blue
|
|
403
|
-
: '#D97706'; // Dark Yellow/Amber
|
|
404
|
-
return (<react_native_1.Pressable key={tab} onPress={() => {
|
|
405
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
406
|
-
setHtmlSubTab(tab);
|
|
407
|
-
}} style={{
|
|
408
|
-
paddingVertical: 8,
|
|
409
|
-
paddingHorizontal: 4,
|
|
410
|
-
borderBottomWidth: 2,
|
|
411
|
-
borderBottomColor: active
|
|
412
|
-
? activeColor
|
|
413
|
-
: 'transparent',
|
|
414
|
-
flexDirection: 'row',
|
|
415
|
-
alignItems: 'center',
|
|
416
|
-
gap: 4,
|
|
417
|
-
}}>
|
|
418
|
-
{tab === 'html' && (<NetworkIcons_1.HtmlIcon color={active
|
|
419
|
-
? activeColor
|
|
420
|
-
: AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
421
|
-
{tab === 'css' && (<NetworkIcons_1.CssIcon color={active
|
|
422
|
-
? activeColor
|
|
423
|
-
: AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
424
|
-
{tab === 'javascript' && (<NetworkIcons_1.JsIcon color={active
|
|
425
|
-
? activeColor
|
|
426
|
-
: AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
427
|
-
<react_native_1.Text style={{
|
|
428
|
-
fontFamily: active
|
|
429
|
-
? AppFonts_1.AppFonts.interBold
|
|
430
|
-
: AppFonts_1.AppFonts.interMedium,
|
|
431
|
-
fontSize: 13,
|
|
432
|
-
color: active
|
|
433
|
-
? activeColor
|
|
434
|
-
: AppColors_1.AppColors.grayTextWeak,
|
|
435
|
-
}}>
|
|
436
|
-
{label}
|
|
437
|
-
</react_native_1.Text>
|
|
438
|
-
</react_native_1.Pressable>);
|
|
439
|
-
})}
|
|
440
|
-
</react_native_1.View>
|
|
441
|
-
<react_native_1.View style={{ flex: 1, padding: 12 }}>
|
|
442
|
-
{!isHtmlTabReady ? (<react_native_1.View style={{
|
|
443
|
-
flex: 1,
|
|
444
|
-
justifyContent: 'center',
|
|
445
|
-
alignItems: 'center',
|
|
446
|
-
minHeight: 200,
|
|
447
|
-
}}>
|
|
448
|
-
<react_native_1.ActivityIndicator size="large" color={AppColors_1.AppColors.purple}/>
|
|
449
|
-
</react_native_1.View>) : htmlSubTab === 'html' ? (webViewHtml ? (<CodeSnippet_1.default code={webViewHtml} language="html" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
450
|
-
fontFamily: 'monospace',
|
|
451
|
-
fontSize: 11,
|
|
452
|
-
color: '#94A3B8',
|
|
453
|
-
padding: 12,
|
|
454
|
-
}}>
|
|
455
|
-
No HTML content captured.
|
|
456
|
-
</react_native_1.Text>)) : htmlSubTab === 'css' ? (webViewCss ? (<CodeSnippet_1.default code={webViewCss} language="css" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
457
|
-
fontFamily: 'monospace',
|
|
458
|
-
fontSize: 11,
|
|
459
|
-
color: '#94A3B8',
|
|
460
|
-
padding: 12,
|
|
461
|
-
}}>
|
|
462
|
-
No CSS styles detected on this page.
|
|
463
|
-
</react_native_1.Text>)) : webViewJs ? (<CodeSnippet_1.default code={webViewJs} language="javascript" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
464
|
-
fontFamily: 'monospace',
|
|
465
|
-
fontSize: 11,
|
|
466
|
-
color: '#94A3B8',
|
|
467
|
-
padding: 12,
|
|
468
|
-
}}>
|
|
469
|
-
No scripts detected on this page.
|
|
470
|
-
</react_native_1.Text>)}
|
|
471
|
-
</react_native_1.View>
|
|
472
|
-
</react_native_1.View>) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
473
|
-
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
474
|
-
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
475
|
-
</react_native_1.View>
|
|
476
|
-
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
477
|
-
No Page Source Captured
|
|
478
|
-
</react_native_1.Text>
|
|
479
|
-
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
480
|
-
Load a page in the WebView to inspect its
|
|
481
|
-
HTML, CSS, or Javascript source.
|
|
482
|
-
</react_native_1.Text>
|
|
483
|
-
</react_native_1.View>)}
|
|
484
|
-
</react_native_1.View>) : webViewSubTab === 'navigation' ? (<react_native_1.FlatList data={filteredNavHistory} keyExtractor={(item, index) => `${index}-${item.timestamp}`} style={{
|
|
485
|
-
flex: 1,
|
|
486
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
487
|
-
}} ListHeaderComponent={<react_native_1.View style={{
|
|
488
|
-
paddingHorizontal: 16,
|
|
489
|
-
paddingTop: 12,
|
|
490
|
-
paddingBottom: 8,
|
|
491
|
-
}}>
|
|
492
|
-
<react_native_1.Text style={styles_1.default.resultCount}>
|
|
493
|
-
Navigation History ({webViewNavHistory.length}
|
|
494
|
-
)
|
|
495
|
-
</react_native_1.Text>
|
|
496
|
-
</react_native_1.View>} renderItem={({ item, index, }) => {
|
|
497
|
-
const isLatest = index === 0;
|
|
498
|
-
const formatNavTime = (ts) => {
|
|
499
|
-
const d = new Date(ts);
|
|
500
|
-
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
501
|
-
};
|
|
502
|
-
return (<AnimatedEntrance_1.default index={index} distance={8} style={{
|
|
503
|
-
marginHorizontal: 16,
|
|
504
|
-
marginVertical: 6,
|
|
505
|
-
borderRadius: 12,
|
|
506
|
-
borderWidth: 1,
|
|
507
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
508
|
-
backgroundColor: isLatest
|
|
509
|
-
? AppColors_1.AppColors.purpleShade50
|
|
510
|
-
: AppColors_1.AppColors.primaryLight,
|
|
511
|
-
padding: 14,
|
|
512
|
-
flexDirection: 'row',
|
|
513
|
-
alignItems: 'center',
|
|
514
|
-
justifyContent: 'space-between',
|
|
515
|
-
gap: 12,
|
|
516
|
-
shadowColor: '#000000',
|
|
517
|
-
shadowOffset: { width: 0, height: 2 },
|
|
518
|
-
shadowOpacity: isDark ? 0.2 : 0.04,
|
|
519
|
-
shadowRadius: 4,
|
|
520
|
-
elevation: 2,
|
|
521
|
-
}}>
|
|
522
|
-
<react_native_1.View style={{ flex: 1, gap: 8 }}>
|
|
523
|
-
{/* Top row: Title and Badge */}
|
|
524
|
-
<react_native_1.View style={{
|
|
525
|
-
flexDirection: 'row',
|
|
526
|
-
alignItems: 'center',
|
|
527
|
-
gap: 8,
|
|
528
|
-
flexWrap: 'wrap',
|
|
529
|
-
}}>
|
|
530
|
-
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={{
|
|
531
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
532
|
-
fontSize: 14,
|
|
533
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
534
|
-
flexShrink: 1,
|
|
535
|
-
}}>
|
|
536
|
-
{item.title || 'Untitled Page'}
|
|
537
|
-
</react_native_1.Text>
|
|
538
|
-
{isLatest && (<react_native_1.View style={{
|
|
539
|
-
flexDirection: 'row',
|
|
540
|
-
alignItems: 'center',
|
|
541
|
-
gap: 4,
|
|
542
|
-
backgroundColor: AppColors_1.AppColors.greenStatus,
|
|
543
|
-
paddingHorizontal: 8,
|
|
544
|
-
paddingVertical: 3,
|
|
545
|
-
borderRadius: 12,
|
|
546
|
-
}}>
|
|
547
|
-
<react_native_1.View style={{
|
|
548
|
-
width: 6,
|
|
549
|
-
height: 6,
|
|
550
|
-
borderRadius: 3,
|
|
551
|
-
backgroundColor: AppColors_1.AppColors.greenBaggageText,
|
|
552
|
-
}}/>
|
|
553
|
-
<react_native_1.Text style={{
|
|
554
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
555
|
-
fontSize: 9.5,
|
|
556
|
-
color: AppColors_1.AppColors.greenBaggageText,
|
|
557
|
-
}}>
|
|
558
|
-
Active
|
|
559
|
-
</react_native_1.Text>
|
|
560
|
-
</react_native_1.View>)}
|
|
561
|
-
</react_native_1.View>
|
|
562
|
-
|
|
563
|
-
{/* Middle row: URL with Globe Icon */}
|
|
564
|
-
<react_native_1.View style={{
|
|
565
|
-
flexDirection: 'row',
|
|
566
|
-
alignItems: 'center',
|
|
567
|
-
gap: 6,
|
|
568
|
-
}}>
|
|
569
|
-
<NetworkIcons_1.GlobeIcon size={12} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
570
|
-
<HighlightText_1.default text={item.url} search={webViewSearch} numberOfLines={2} ellipsizeMode="tail" style={{
|
|
571
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
572
|
-
fontSize: 12,
|
|
573
|
-
color: AppColors_1.AppColors.grayText,
|
|
574
|
-
flex: 1,
|
|
575
|
-
}} highlightStyle={styles_1.default.highlight} detectLinks={true}/>
|
|
576
|
-
</react_native_1.View>
|
|
577
|
-
|
|
578
|
-
{/* Bottom row: Time */}
|
|
579
|
-
<react_native_1.View style={{
|
|
580
|
-
flexDirection: 'row',
|
|
581
|
-
alignItems: 'center',
|
|
582
|
-
gap: 6,
|
|
583
|
-
}}>
|
|
584
|
-
<NetworkIcons_1.ClockIcon size={11} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
585
|
-
<react_native_1.Text style={{
|
|
586
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
587
|
-
fontSize: 11,
|
|
588
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
589
|
-
}}>
|
|
590
|
-
{formatNavTime(item.timestamp)}
|
|
591
|
-
</react_native_1.Text>
|
|
592
|
-
</react_native_1.View>
|
|
593
|
-
</react_native_1.View>
|
|
594
|
-
<CopyButton_1.default value={item.url} label="URL"/>
|
|
595
|
-
</AnimatedEntrance_1.default>);
|
|
596
|
-
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={webViewSearch.length > 0}/>} contentContainerStyle={[
|
|
597
|
-
styles_1.default.listContent,
|
|
598
|
-
filteredNavHistory.length === 0 && {
|
|
599
|
-
flexGrow: 1,
|
|
600
|
-
},
|
|
601
|
-
]} keyboardShouldPersistTaps="handled"/>) : webViewSubTab === 'console' ? (<react_native_1.View style={{
|
|
602
|
-
flex: 1,
|
|
603
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
604
|
-
}}>
|
|
605
|
-
{webViewLogs.length > 0 ? (<react_native_1.FlatList data={webViewLogs} keyExtractor={(item) => String(item.id)} style={{ flex: 1 }} ListHeaderComponent={<react_native_1.View style={{
|
|
606
|
-
paddingHorizontal: 16,
|
|
607
|
-
paddingTop: 12,
|
|
608
|
-
paddingBottom: 8,
|
|
609
|
-
flexDirection: 'row',
|
|
610
|
-
justifyContent: 'space-between',
|
|
611
|
-
alignItems: 'center',
|
|
612
|
-
}}>
|
|
613
|
-
<react_native_1.Text style={styles_1.default.resultCount}>
|
|
614
|
-
Console Logs ({webViewLogs.length})
|
|
615
|
-
</react_native_1.Text>
|
|
616
|
-
<TouchableScale_1.default onPress={() => (0, webViewLogger_1.clearWebViewData)()} style={{
|
|
617
|
-
padding: 6,
|
|
618
|
-
borderRadius: 6,
|
|
619
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
620
|
-
borderWidth: 1,
|
|
621
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
622
|
-
}}>
|
|
623
|
-
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={14}/>
|
|
624
|
-
</TouchableScale_1.default>
|
|
625
|
-
</react_native_1.View>} renderItem={({ item }) => {
|
|
626
|
-
const logColor = item.type === 'error'
|
|
627
|
-
? AppColors_1.AppColors.errorColor
|
|
628
|
-
: item.type === 'warn'
|
|
629
|
-
? AppColors_1.AppColors.warningIconGold
|
|
630
|
-
: item.type === 'info'
|
|
631
|
-
? AppColors_1.AppColors.skyBlue
|
|
632
|
-
: AppColors_1.AppColors.grayTextWeak;
|
|
633
|
-
const bgColor = item.type === 'error'
|
|
634
|
-
? 'rgba(255, 46, 87, 0.06)'
|
|
635
|
-
: item.type === 'warn'
|
|
636
|
-
? 'rgba(191, 162, 82, 0.08)'
|
|
637
|
-
: AppColors_1.AppColors.primaryLight;
|
|
638
|
-
const d = new Date(item.timestamp);
|
|
639
|
-
const timeStr = `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
640
|
-
return (<AnimatedEntrance_1.default index={item.id} distance={8} style={{
|
|
641
|
-
marginHorizontal: 12,
|
|
642
|
-
marginVertical: 3,
|
|
643
|
-
borderRadius: 8,
|
|
644
|
-
borderWidth: 1,
|
|
645
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
646
|
-
borderLeftWidth: 3,
|
|
647
|
-
borderLeftColor: logColor,
|
|
648
|
-
backgroundColor: bgColor,
|
|
649
|
-
padding: 10,
|
|
650
|
-
flexDirection: 'row',
|
|
651
|
-
gap: 8,
|
|
652
|
-
alignItems: 'flex-start',
|
|
653
|
-
}}>
|
|
654
|
-
<react_native_1.View style={{ paddingTop: 1 }}>
|
|
655
|
-
<NetworkIcons_1.TerminalIcon color={logColor} size={11}/>
|
|
656
|
-
</react_native_1.View>
|
|
657
|
-
<react_native_1.View style={{ flex: 1, gap: 3 }}>
|
|
658
|
-
<react_native_1.View style={{
|
|
659
|
-
flexDirection: 'row',
|
|
660
|
-
alignItems: 'center',
|
|
661
|
-
justifyContent: 'space-between',
|
|
662
|
-
}}>
|
|
663
|
-
<react_native_1.Text style={{
|
|
664
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
665
|
-
fontSize: 10,
|
|
666
|
-
color: logColor,
|
|
667
|
-
textTransform: 'uppercase',
|
|
668
|
-
letterSpacing: 0.5,
|
|
669
|
-
}}>
|
|
670
|
-
{item.type}
|
|
671
|
-
</react_native_1.Text>
|
|
672
|
-
<react_native_1.Text style={{
|
|
673
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
674
|
-
fontSize: 10,
|
|
675
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
676
|
-
}}>
|
|
677
|
-
{timeStr}
|
|
678
|
-
</react_native_1.Text>
|
|
679
|
-
</react_native_1.View>
|
|
680
|
-
<react_native_1.Text style={{
|
|
681
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
682
|
-
fontSize: 12,
|
|
683
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
684
|
-
lineHeight: 16,
|
|
685
|
-
}}>
|
|
686
|
-
{item.message}
|
|
687
|
-
</react_native_1.Text>
|
|
688
|
-
</react_native_1.View>
|
|
689
|
-
</AnimatedEntrance_1.default>);
|
|
690
|
-
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={7} contentContainerStyle={[
|
|
691
|
-
styles_1.default.listContent,
|
|
692
|
-
webViewLogs.length === 0 && { flexGrow: 1 },
|
|
693
|
-
]}/>) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
694
|
-
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
695
|
-
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
696
|
-
</react_native_1.View>
|
|
697
|
-
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
698
|
-
No Console Logs
|
|
699
|
-
</react_native_1.Text>
|
|
700
|
-
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
701
|
-
Console logs from the WebView will appear
|
|
702
|
-
here.
|
|
703
|
-
</react_native_1.Text>
|
|
704
|
-
</react_native_1.View>)}
|
|
705
|
-
</react_native_1.View>) : (<react_native_1.View style={{
|
|
706
|
-
flex: 1,
|
|
707
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
708
|
-
}}>
|
|
709
|
-
{webViewHtml ? (OriginalWebView ? (<OriginalWebView source={{
|
|
710
|
-
html: webViewHtml,
|
|
711
|
-
baseUrl: webViewHtmlUrl,
|
|
712
|
-
}} injectedJavaScript={previewInspectScript} onMessage={(event) => {
|
|
713
|
-
try {
|
|
714
|
-
const data = JSON.parse(event.nativeEvent.data);
|
|
715
|
-
if (data.type === 'preview-inspect') {
|
|
716
|
-
setInspectedElement({
|
|
717
|
-
tagName: data.tagName,
|
|
718
|
-
id: data.id,
|
|
719
|
-
className: data.className,
|
|
720
|
-
searchStr: data.searchStr,
|
|
721
|
-
});
|
|
722
|
-
setWebViewSubTab('html');
|
|
723
|
-
setHtmlSubTab('html');
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
catch (err) { }
|
|
727
|
-
}} style={{ flex: 1 }}/>) : (<react_native_1.View style={{
|
|
728
|
-
flex: 1,
|
|
729
|
-
justifyContent: 'center',
|
|
730
|
-
alignItems: 'center',
|
|
731
|
-
padding: 20,
|
|
732
|
-
}}>
|
|
733
|
-
<react_native_1.Text style={{
|
|
734
|
-
color: AppColors_1.AppColors.grayText,
|
|
735
|
-
textAlign: 'center',
|
|
736
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
737
|
-
}}>
|
|
738
|
-
react-native-webview is not installed in the
|
|
739
|
-
target project. Install it to enable Preview
|
|
740
|
-
mode.
|
|
741
|
-
</react_native_1.Text>
|
|
742
|
-
</react_native_1.View>)) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
743
|
-
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
744
|
-
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
745
|
-
</react_native_1.View>
|
|
746
|
-
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
747
|
-
No Preview Available
|
|
748
|
-
</react_native_1.Text>
|
|
749
|
-
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
750
|
-
Load a page in the WebView to see its visual
|
|
751
|
-
preview.
|
|
752
|
-
</react_native_1.Text>
|
|
753
|
-
</react_native_1.View>)}
|
|
754
|
-
</react_native_1.View>)}
|
|
755
|
-
</react_native_1.View>);
|
|
756
|
-
};
|
|
757
|
-
exports.default = WebViewTab;
|