react-native-inapp-inspector 2.5.13 → 2.5.15
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 +0 -8
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +118 -31
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
- package/dist/commonjs/components/Inspector/FabLauncher.js +3 -3
- package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -30
- package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
- package/dist/commonjs/components/Inspector/NetworkExportModal.js +4 -4
- package/dist/commonjs/components/Inspector/NetworkTab.js +51 -51
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
- package/dist/commonjs/components/Inspector/SettingsPanel.js +40 -41
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/components/Inspector/TabBar.js +9 -15
- package/dist/commonjs/components/LogCard.js +7 -7
- package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.js +14 -14
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +2 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/commonjs/styles/AppFonts.d.ts +4 -0
- package/dist/commonjs/styles/AppFonts.js +1 -1
- package/dist/commonjs/styles/index.d.ts +2 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -2
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +1 -1
- package/dist/esm/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
- package/dist/esm/components/Inspector/FabLauncher.js +42 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +50 -50
- package/dist/esm/components/Inspector/MainScreen.js +87 -124
- package/dist/esm/components/Inspector/NetworkExportModal.js +1 -1
- package/dist/esm/components/Inspector/NetworkTab.js +83 -83
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
- package/dist/esm/components/Inspector/SettingsPanel.js +106 -107
- package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
- package/dist/esm/components/Inspector/TabBar.js +35 -41
- package/dist/esm/components/LogCard.js +53 -53
- package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/SkeletonPlaceholder.js +42 -11
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/shareFormatter.js +14 -14
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/native/NativeInspector.d.ts +2 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/esm/styles/AppFonts.d.ts +4 -0
- package/dist/esm/styles/AppFonts.js +1 -1
- package/dist/esm/styles/index.d.ts +2 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -2
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +1 -1
- package/ios/NetworkInspectorModule.mm +288 -325
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +30 -0
- package/src/native/NativeNetworkInspector.ts +2 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +0 -8
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +0 -76
- package/dist/commonjs/components/Inspector/DebuggingTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/DebuggingTab.js +0 -197
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +0 -97
- package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorDetail.js +0 -485
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +0 -199
- package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorTab.js +0 -117
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +0 -148
- package/dist/commonjs/components/Inspector/index.d.ts +0 -28
- package/dist/commonjs/components/Inspector/index.js +0 -1
- package/dist/commonjs/customHooks/uiInspectorManager.d.ts +0 -22
- package/dist/commonjs/customHooks/uiInspectorManager.js +0 -1
- package/dist/commonjs/helpers/uiInspectorEngine.d.ts +0 -62
- package/dist/commonjs/helpers/uiInspectorEngine.js +0 -19
- package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +0 -8
- package/dist/esm/components/Inspector/BoxModelVisualizer.js +0 -76
- package/dist/esm/components/Inspector/DebuggingTab.d.ts +0 -3
- package/dist/esm/components/Inspector/DebuggingTab.js +0 -197
- package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
- package/dist/esm/components/Inspector/UiA11yAuditPanel.js +0 -97
- package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorDetail.js +0 -422
- package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorOverlay.js +0 -138
- package/dist/esm/components/Inspector/UiInspectorTab.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorTab.js +0 -117
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +0 -148
- package/dist/esm/components/Inspector/index.d.ts +0 -28
- package/dist/esm/components/Inspector/index.js +0 -1
- package/dist/esm/customHooks/uiInspectorManager.d.ts +0 -22
- package/dist/esm/customHooks/uiInspectorManager.js +0 -1
- package/dist/esm/helpers/uiInspectorEngine.d.ts +0 -48
- package/dist/esm/helpers/uiInspectorEngine.js +0 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-inapp-inspector",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.15",
|
|
4
4
|
"description": "The zero-config, all-in-one in-app debugger & network logger for React Native & Expo (Flipper / Chucker alternative). Inspect Network (fetch/Axios/GraphQL), Console logs with Metro Symbolication, Redux State, Firebase Analytics, Storage (AsyncStorage/MMKV), Hardware Telemetry, and JS Bundle size directly on device.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -126,6 +126,36 @@ export const subscribeNativeCrashes = (
|
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Retrieves the recorded crash log from the last fatal native exception (if any).
|
|
131
|
+
*/
|
|
132
|
+
export const getLastNativeCrash = async (): Promise<NativeCrashEvent | null> => {
|
|
133
|
+
if (!NativeModule || !NativeModule.getLastNativeCrash) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
try {
|
|
137
|
+
const crash = await NativeModule.getLastNativeCrash();
|
|
138
|
+
return (crash as NativeCrashEvent) || null;
|
|
139
|
+
} catch {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Clears the persisted native crash record from local cache storage.
|
|
146
|
+
*/
|
|
147
|
+
export const clearLastNativeCrash = async (): Promise<boolean> => {
|
|
148
|
+
if (!NativeModule || !NativeModule.clearLastNativeCrash) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
const result = await NativeModule.clearLastNativeCrash();
|
|
153
|
+
return !!result;
|
|
154
|
+
} catch {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
129
159
|
export interface FloatingButtonOptions {
|
|
130
160
|
size?: number;
|
|
131
161
|
x?: number;
|
|
@@ -3,6 +3,8 @@ import {TurboModuleRegistry} from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
export interface Spec extends TurboModule {
|
|
5
5
|
enableNativeCrashProtection(): Promise<boolean>;
|
|
6
|
+
getLastNativeCrash(): Promise<Object | null>;
|
|
7
|
+
clearLastNativeCrash(): Promise<boolean>;
|
|
6
8
|
getDeviceMetrics(): Promise<Object>;
|
|
7
9
|
showFloatingButton(options: Object): Promise<boolean>;
|
|
8
10
|
hideFloatingButton(): Promise<boolean>;
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
arguments=--init-script /var/folders/77/7l8qyhy91k1cyjht91zz_vs00000gp/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/77/7l8qyhy91k1cyjht91zz_vs00000gp/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle --init-script /var/folders/77/7l8qyhy91k1cyjht91zz_vs00000gp/T/861a75667e10803d304a058d833cb7404195ca44013d0d61d3b653eb084379b8.gradle --init-script /var/folders/77/7l8qyhy91k1cyjht91zz_vs00000gp/T/68eb1b6516fe21c6fbba58e63c99c3207ccfc918360613709367eecde56fa77f.gradle --init-script /var/folders/77/7l8qyhy91k1cyjht91zz_vs00000gp/T/da64152279c70a8b4f3de4ca9ea66fd3b3405b7aca4e1f20f2d08e5593aa1ce1.gradle
|
|
2
|
-
auto.sync=false
|
|
3
|
-
build.scans.enabled=false
|
|
4
|
-
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
|
|
5
|
-
connection.project.dir=
|
|
6
|
-
eclipse.preferences.version=1
|
|
7
|
-
gradle.user.home=
|
|
8
|
-
java.home=/Users/vengateswaran/Library/Java/JavaVirtualMachines/ms-17.0.14/Contents/Home
|
|
9
|
-
jvm.arguments=
|
|
10
|
-
offline.mode=false
|
|
11
|
-
override.workspace.settings=true
|
|
12
|
-
show.console.view=true
|
|
13
|
-
show.executions.view=true
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.BoxModelVisualizer=void 0;const react_1=__importDefault(require("react")),react_native_1=require("react-native"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),BoxModelVisualizer=({boxModel:e,compact:a=!1})=>{const{margin:t,border:o,padding:i,content:r}=e;return<react_native_1.View style={visualizerStyles.container}>
|
|
2
|
-
|
|
3
|
-
<react_native_1.View style={visualizerStyles.marginBox}>
|
|
4
|
-
<react_native_1.View style={visualizerStyles.labelRow}>
|
|
5
|
-
<react_native_1.Text style={visualizerStyles.boxLabelMargin}>MARGIN</react_native_1.Text>
|
|
6
|
-
</react_native_1.View>
|
|
7
|
-
<react_native_1.Text style={visualizerStyles.valueTop}>{t.top}</react_native_1.Text>
|
|
8
|
-
|
|
9
|
-
<react_native_1.View style={visualizerStyles.middleRow}>
|
|
10
|
-
<react_native_1.Text style={visualizerStyles.valueLeft}>{t.left}</react_native_1.Text>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<react_native_1.View style={visualizerStyles.borderBox}>
|
|
14
|
-
<react_native_1.View style={visualizerStyles.labelRow}>
|
|
15
|
-
<react_native_1.Text style={visualizerStyles.boxLabelBorder}>BORDER</react_native_1.Text>
|
|
16
|
-
</react_native_1.View>
|
|
17
|
-
<react_native_1.Text style={visualizerStyles.valueTop}>{o.top}</react_native_1.Text>
|
|
18
|
-
|
|
19
|
-
<react_native_1.View style={visualizerStyles.middleRow}>
|
|
20
|
-
<react_native_1.Text style={visualizerStyles.valueLeft}>{o.left}</react_native_1.Text>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<react_native_1.View style={visualizerStyles.paddingBox}>
|
|
24
|
-
<react_native_1.View style={visualizerStyles.labelRow}>
|
|
25
|
-
<react_native_1.Text style={visualizerStyles.boxLabelPadding}>PADDING</react_native_1.Text>
|
|
26
|
-
</react_native_1.View>
|
|
27
|
-
<react_native_1.Text style={visualizerStyles.valueTop}>{i.top}</react_native_1.Text>
|
|
28
|
-
|
|
29
|
-
<react_native_1.View style={visualizerStyles.middleRow}>
|
|
30
|
-
<react_native_1.Text style={visualizerStyles.valueLeft}>{i.left}</react_native_1.Text>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<react_native_1.View style={visualizerStyles.contentBox}>
|
|
34
|
-
<react_native_1.Text style={visualizerStyles.contentDimensions}>
|
|
35
|
-
{r.width} × {r.height}
|
|
36
|
-
</react_native_1.Text>
|
|
37
|
-
</react_native_1.View>
|
|
38
|
-
|
|
39
|
-
<react_native_1.Text style={visualizerStyles.valueRight}>{i.right}</react_native_1.Text>
|
|
40
|
-
</react_native_1.View>
|
|
41
|
-
|
|
42
|
-
<react_native_1.Text style={visualizerStyles.valueBottom}>{i.bottom}</react_native_1.Text>
|
|
43
|
-
</react_native_1.View>
|
|
44
|
-
|
|
45
|
-
<react_native_1.Text style={visualizerStyles.valueRight}>{o.right}</react_native_1.Text>
|
|
46
|
-
</react_native_1.View>
|
|
47
|
-
|
|
48
|
-
<react_native_1.Text style={visualizerStyles.valueBottom}>{o.bottom}</react_native_1.Text>
|
|
49
|
-
</react_native_1.View>
|
|
50
|
-
|
|
51
|
-
<react_native_1.Text style={visualizerStyles.valueRight}>{t.right}</react_native_1.Text>
|
|
52
|
-
</react_native_1.View>
|
|
53
|
-
|
|
54
|
-
<react_native_1.Text style={visualizerStyles.valueBottom}>{t.bottom}</react_native_1.Text>
|
|
55
|
-
</react_native_1.View>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{!a&&<react_native_1.View style={visualizerStyles.legendContainer}>
|
|
59
|
-
<react_native_1.View style={visualizerStyles.legendItem}>
|
|
60
|
-
<react_native_1.View style={[visualizerStyles.legendSwatch,{backgroundColor:"#F59E0B2B",borderColor:"#F59E0B"}]}/>
|
|
61
|
-
<react_native_1.Text style={visualizerStyles.legendText}>Margin</react_native_1.Text>
|
|
62
|
-
</react_native_1.View>
|
|
63
|
-
<react_native_1.View style={visualizerStyles.legendItem}>
|
|
64
|
-
<react_native_1.View style={[visualizerStyles.legendSwatch,{backgroundColor:"#FDE0473D",borderColor:"#EAB308"}]}/>
|
|
65
|
-
<react_native_1.Text style={visualizerStyles.legendText}>Border</react_native_1.Text>
|
|
66
|
-
</react_native_1.View>
|
|
67
|
-
<react_native_1.View style={visualizerStyles.legendItem}>
|
|
68
|
-
<react_native_1.View style={[visualizerStyles.legendSwatch,{backgroundColor:"#10B9812B",borderColor:"#10B981"}]}/>
|
|
69
|
-
<react_native_1.Text style={visualizerStyles.legendText}>Padding</react_native_1.Text>
|
|
70
|
-
</react_native_1.View>
|
|
71
|
-
<react_native_1.View style={visualizerStyles.legendItem}>
|
|
72
|
-
<react_native_1.View style={[visualizerStyles.legendSwatch,{backgroundColor:"#4F46E52B",borderColor:"#4F46E5"}]}/>
|
|
73
|
-
<react_native_1.Text style={visualizerStyles.legendText}>Content</react_native_1.Text>
|
|
74
|
-
</react_native_1.View>
|
|
75
|
-
</react_native_1.View>}
|
|
76
|
-
</react_native_1.View>};exports.BoxModelVisualizer=BoxModelVisualizer;const visualizerStyles=react_native_1.StyleSheet.create({container:{alignItems:"center",marginVertical:8},marginBox:{width:"100%",backgroundColor:"#F59E0B1A",borderWidth:1,borderColor:"#F59E0B66",borderRadius:8,padding:6,alignItems:"center"},borderBox:{flex:1,backgroundColor:"#FDE04724",borderWidth:1,borderColor:"#EAB30877",borderRadius:6,padding:6,alignItems:"center",marginHorizontal:4},paddingBox:{flex:1,backgroundColor:"#10B9811A",borderWidth:1,borderColor:"#10B98166",borderRadius:4,padding:6,alignItems:"center",marginHorizontal:4},contentBox:{flex:1,backgroundColor:"#4F46E524",borderWidth:1,borderColor:"#4F46E577",borderRadius:3,paddingVertical:12,paddingHorizontal:8,alignItems:"center",justifyContent:"center",marginHorizontal:4,minHeight:40},labelRow:{position:"absolute",top:3,left:6},boxLabelMargin:{fontSize:9,fontFamily:AppFonts_1.AppFonts.medium,color:"#D97706",letterSpacing:.5},boxLabelBorder:{fontSize:9,fontFamily:AppFonts_1.AppFonts.medium,color:"#CA8A04",letterSpacing:.5},boxLabelPadding:{fontSize:9,fontFamily:AppFonts_1.AppFonts.medium,color:"#059669",letterSpacing:.5},middleRow:{flexDirection:"row",alignItems:"center",width:"100%",marginVertical:2},valueTop:{fontSize:11,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.grayText,marginBottom:2},valueBottom:{fontSize:11,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.grayText,marginTop:2},valueLeft:{fontSize:11,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.grayText,marginRight:2},valueRight:{fontSize:11,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.grayText,marginLeft:2},contentDimensions:{fontSize:12,fontFamily:AppFonts_1.AppFonts.bold,color:AppColors_1.AppColors.brandPurple},legendContainer:{flexDirection:"row",justifyContent:"center",gap:16,marginTop:12},legendItem:{flexDirection:"row",alignItems:"center",gap:6},legendSwatch:{width:12,height:12,borderRadius:3,borderWidth:1},legendText:{fontSize:11,fontFamily:AppFonts_1.AppFonts.medium,color:AppColors_1.AppColors.grayTextWeak}});
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,n,a){a===void 0&&(a=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,r)}):(function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var a=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(a[a.length]=r);return a},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var a=e(t),r=0;r<a.length;r++)a[r]!=="default"&&__createBinding(n,t,a[r]);return __setModuleDefault(n,t),n}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DebuggingTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),QRCodeView_1=__importDefault(require("../QRCodeView")),TouchableScale_1=__importDefault(require("../TouchableScale")),toast_1=require("../../helpers/toast"),NativeInspector_1=require("../../native/NativeInspector"),NetworkIcons_1=require("../NetworkIcons"),react_native_svg_1=__importStar(require("react-native-svg")),TerminalConsoleIcon=({color:e=AppColors_1.AppColors.purple,size:t=13})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
2
|
-
<react_native_svg_1.Path d="M4 17l6-6-6-6M12 19h8"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
3
|
-
</react_native_svg_1.default>,DebuggingTab=()=>{const{t:e}=(0,i18n_1.useTranslation)(),t=(0,react_1.useMemo)(()=>{const i=react_native_1.NativeModules.SourceCode?.scriptURL||"";let s="localhost",o=8081;try{if(i.includes("://")){const d=i.split("://")[1].split("/")[0];if(d.includes(":")){const u=d.split(":");s=u[0];const b=parseInt(u[1],10);isNaN(b)||(o=b)}else s=d}}catch{}return{host:s,port:o,scriptURL:i}},[]),[n,a]=(0,react_1.useState)(()=>t.host&&t.host!=="localhost"&&t.host!=="127.0.0.1"&&t.host!=="10.0.2.2"?t.host:"192.168.1.2"),[r,B]=(0,react_1.useState)(t.port||8083),[V,m]=(0,react_1.useState)("app-debug.apk"),[T,x]=(0,react_1.useState)(null),[g,v]=(0,react_1.useState)("assembleRelease"),[f,k]=(0,react_1.useState)(!0),[l,w]=(0,react_1.useState)({status:"idle",scheme:"assembleRelease",clean:!0,progress:0,currentTask:"",error:null,apkName:null,apkSize:null}),p=(0,react_1.useRef)(null),_=(0,react_1.useRef)(new react_native_1.Animated.Value(0)).current,[A,I]=(0,react_1.useState)(!0),S=(0,react_1.useRef)(null);(0,react_1.useEffect)(()=>{react_native_1.Animated.timing(_,{toValue:Math.max(0,Math.min(100,l.progress)),duration:350,useNativeDriver:!1}).start()},[l.progress,_]),(0,react_1.useEffect)(()=>{l.logs&&l.logs.length>0&&setTimeout(()=>{S.current?.scrollToEnd({animated:!0})},50)},[l.logs]);const C=(0,react_1.useCallback)(async()=>{const i=Array.from(new Set([t.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),s=Array.from(new Set([t.port,8083,8081,8082].filter(Boolean)));for(const o of i)for(const h of s)try{const d=new AbortController,u=setTimeout(()=>d.abort(),1200),b=await fetch(`http://${o}:${h}/__inapp_inspector/apk-info`,{signal:d.signal});if(clearTimeout(u),b.ok){const c=await b.json();c.hostIp&&c.hostIp!=="127.0.0.1"&&c.hostIp!=="localhost"&&c.hostIp!=="10.0.2.2"&&a(c.hostIp),c.port&&B(c.port),c.apkName&&m(c.apkName),c.apkSize&&x((c.apkSize/(1024*1024)).toFixed(1));return}}catch{}},[t.host,t.port]);(0,react_1.useEffect)(()=>{C()},[C]),(0,react_1.useEffect)(()=>()=>{p.current&&clearInterval(p.current)},[]);const R=(0,react_1.useCallback)(()=>{p.current&&clearInterval(p.current);const i=t.host||"10.0.2.2";p.current=setInterval(async()=>{try{const s=await fetch(`http://${i}:${r}/__inapp_inspector/build-status`);if(s.ok){const o=await s.json();w(o),o.status==="completed"?(p.current&&clearInterval(p.current),(0,NativeInspector_1.triggerNativeHaptic)("success"),(0,toast_1.showToast)(e("debugging.buildSuccess","APK Build Generated Successfully!")),o.apkSize&&x((o.apkSize/(1024*1024)).toFixed(1)),o.apkName&&m(o.apkName),C()):o.status==="failed"&&(p.current&&clearInterval(p.current),(0,NativeInspector_1.triggerNativeHaptic)("error"),(0,toast_1.showToast)(e("debugging.buildFailed",{error:o.error||"Gradle error"})))}}catch{}},1e3)},[t.host,r,C]),F=async()=>{(0,NativeInspector_1.triggerNativeHaptic)("medium"),w({status:"running",scheme:g,clean:f,progress:5,currentTask:f?"Cleaning build cache...":"Initializing build...",error:null,apkName:null,apkSize:null});const i=Array.from(new Set([t.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),s=Array.from(new Set([r,8083,8081,8082].filter(Boolean)));let o=!1;for(const h of i)for(const d of s)try{const u=new AbortController,b=setTimeout(()=>u.abort(),2e3),c=await fetch(`http://${h}:${d}/__inapp_inspector/build-apk?scheme=${g}&clean=${f}`,{signal:u.signal});if(clearTimeout(b),c.ok){o=!0,R();return}}catch{}o||w(h=>({...h,status:"failed",error:"Cannot reach build server. Ensure npm start or npm run serve-apk is running on host."}))},D=async()=>{(0,NativeInspector_1.triggerNativeHaptic)("warning"),p.current&&clearInterval(p.current);const i=Array.from(new Set([t.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),s=Array.from(new Set([r,8083,8081,8082].filter(Boolean)));for(const o of i)for(const h of s)try{const d=new AbortController,u=setTimeout(()=>d.abort(),1500);await fetch(`http://${o}:${h}/__inapp_inspector/stop-build`,{signal:d.signal}),clearTimeout(u)}catch{}w(o=>({...o,status:"idle",currentTask:e("debugging.buildCancelled","Build cancelled by user"),logs:[...o.logs||[],`[Build] ${e("debugging.buildCancelled","Build cancelled by user")}.`]})),(0,toast_1.showToast)(e("debugging.buildCancelled","Build cancelled"))},z=`http://${n}:${r}/${V.replace(/^\/+/,"")}`,y=l.status==="running";return<react_native_1.ScrollView style={styles.scrollArea}contentContainerStyle={styles.scrollContent}showsVerticalScrollIndicator={!1}>
|
|
4
|
-
|
|
5
|
-
<react_native_1.View style={styles.heroCard}>
|
|
6
|
-
<react_native_1.View style={styles.heroHeader}>
|
|
7
|
-
<react_native_1.View style={styles.heroIconWrap}>
|
|
8
|
-
<NetworkIcons_1.AndroidIcon size={20}color={AppColors_1.AppColors.white}/>
|
|
9
|
-
</react_native_1.View>
|
|
10
|
-
<react_native_1.View style={{flex:1,minWidth:0}}>
|
|
11
|
-
<react_native_1.Text style={styles.heroTitle}numberOfLines={1}>
|
|
12
|
-
{e("debugging.apkInstallerTitle","Multi-Device APK Installer")}
|
|
13
|
-
</react_native_1.Text>
|
|
14
|
-
<react_native_1.Text style={styles.heroSubtitle}numberOfLines={1}>
|
|
15
|
-
{e("debugging.apkInstallerSubtitle","Scan QR code with another Android device to download")}
|
|
16
|
-
</react_native_1.Text>
|
|
17
|
-
</react_native_1.View>
|
|
18
|
-
<react_native_1.View style={styles.heroBadge}>
|
|
19
|
-
<react_native_1.View style={styles.pulseDot}/>
|
|
20
|
-
<react_native_1.Text style={styles.heroBadgeText}>{e("debugging.liveMetro","Live Metro")}</react_native_1.Text>
|
|
21
|
-
</react_native_1.View>
|
|
22
|
-
</react_native_1.View>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<react_native_1.View style={styles.heroMetricsStrip}>
|
|
26
|
-
<react_native_1.View style={styles.heroMetricItem}>
|
|
27
|
-
<react_native_1.Text style={styles.heroMetricLabel}>HOST IP</react_native_1.Text>
|
|
28
|
-
<react_native_1.Text style={styles.heroMetricValue}numberOfLines={1}>
|
|
29
|
-
{n}
|
|
30
|
-
</react_native_1.Text>
|
|
31
|
-
</react_native_1.View>
|
|
32
|
-
<react_native_1.View style={styles.heroMetricDivider}/>
|
|
33
|
-
<react_native_1.View style={styles.heroMetricItem}>
|
|
34
|
-
<react_native_1.Text style={styles.heroMetricLabel}>PORT</react_native_1.Text>
|
|
35
|
-
<react_native_1.Text style={styles.heroMetricValue}>{r}</react_native_1.Text>
|
|
36
|
-
</react_native_1.View>
|
|
37
|
-
<react_native_1.View style={styles.heroMetricDivider}/>
|
|
38
|
-
<react_native_1.View style={styles.heroMetricItem}>
|
|
39
|
-
<react_native_1.Text style={styles.heroMetricLabel}>APK SIZE</react_native_1.Text>
|
|
40
|
-
<react_native_1.Text style={[styles.heroMetricValue,{color:T?AppColors_1.AppColors.emerald500:AppColors_1.AppColors.grayTextWeak}]}>
|
|
41
|
-
{T?`${T} MB`:"Detected"}
|
|
42
|
-
</react_native_1.Text>
|
|
43
|
-
</react_native_1.View>
|
|
44
|
-
<react_native_1.View style={styles.heroMetricDivider}/>
|
|
45
|
-
<react_native_1.View style={styles.heroMetricItem}>
|
|
46
|
-
<react_native_1.Text style={styles.heroMetricLabel}>STATUS</react_native_1.Text>
|
|
47
|
-
<react_native_1.Text style={[styles.heroMetricValue,{color:AppColors_1.AppColors.emerald500}]}>
|
|
48
|
-
Ready
|
|
49
|
-
</react_native_1.Text>
|
|
50
|
-
</react_native_1.View>
|
|
51
|
-
</react_native_1.View>
|
|
52
|
-
</react_native_1.View>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<react_native_1.View style={styles.sectionCard}>
|
|
56
|
-
<react_native_1.View style={styles.sectionHeaderRow}>
|
|
57
|
-
<react_native_1.Text style={styles.sectionTitle}>{e("debugging.qrCodeTitle","QR CODE & DIRECT DOWNLOAD")}</react_native_1.Text>
|
|
58
|
-
<react_native_1.TouchableOpacity activeOpacity={.7}onPress={C}style={styles.refreshBtn}>
|
|
59
|
-
<NetworkIcons_1.RepeatIcon size={12}color={AppColors_1.AppColors.purple}/>
|
|
60
|
-
<react_native_1.Text style={styles.refreshBtnText}>Refresh</react_native_1.Text>
|
|
61
|
-
</react_native_1.TouchableOpacity>
|
|
62
|
-
</react_native_1.View>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<react_native_1.View style={styles.qrCenteredWrapper}>
|
|
66
|
-
<react_native_1.View style={styles.qrInnerFrame}>
|
|
67
|
-
<QRCodeView_1.default value={z}size={235}color={AppColors_1.AppColors.primaryBlack}backgroundColor={AppColors_1.AppColors.white}/>
|
|
68
|
-
</react_native_1.View>
|
|
69
|
-
</react_native_1.View>
|
|
70
|
-
</react_native_1.View>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<react_native_1.View style={styles.sectionCard}>
|
|
74
|
-
<react_native_1.View style={styles.sectionHeaderRow}>
|
|
75
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
76
|
-
<NetworkIcons_1.BoltIcon size={13}color={AppColors_1.AppColors.purple}/>
|
|
77
|
-
<react_native_1.Text style={styles.sectionTitle}>{e("debugging.buildGeneratorTitle","BUILD GENERATOR (GRADLE)")}</react_native_1.Text>
|
|
78
|
-
</react_native_1.View>
|
|
79
|
-
{l.status==="completed"&&<react_native_1.View style={styles.completedBadge}>
|
|
80
|
-
<NetworkIcons_1.CheckIcon size={10}color={AppColors_1.AppColors.emerald500}/>
|
|
81
|
-
<react_native_1.Text style={styles.completedBadgeText}>{e("debugging.ready100","100% Ready")}</react_native_1.Text>
|
|
82
|
-
</react_native_1.View>}
|
|
83
|
-
</react_native_1.View>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<react_native_1.View style={styles.subTabStrip}>
|
|
87
|
-
<react_native_1.TouchableOpacity disabled={y}activeOpacity={.7}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),v("assembleRelease")}}style={[styles.subTabItem,g==="assembleRelease"&&styles.subTabItemActive]}>
|
|
88
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
89
|
-
<NetworkIcons_1.BoltIcon size={12}color={g==="assembleRelease"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>
|
|
90
|
-
<react_native_1.Text style={[styles.subTabText,g==="assembleRelease"&&styles.subTabTextActive]}>
|
|
91
|
-
{e("debugging.releaseBuild","Release (assembleRelease)")}
|
|
92
|
-
</react_native_1.Text>
|
|
93
|
-
</react_native_1.View>
|
|
94
|
-
</react_native_1.TouchableOpacity>
|
|
95
|
-
|
|
96
|
-
<react_native_1.TouchableOpacity disabled={y}activeOpacity={.7}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),v("assembleDebug")}}style={[styles.subTabItem,g==="assembleDebug"&&styles.subTabItemActive]}>
|
|
97
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
98
|
-
<NetworkIcons_1.WrenchIcon size={12}color={g==="assembleDebug"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>
|
|
99
|
-
<react_native_1.Text style={[styles.subTabText,g==="assembleDebug"&&styles.subTabTextActive]}>
|
|
100
|
-
{e("debugging.debugBuild","Debug (assembleDebug)")}
|
|
101
|
-
</react_native_1.Text>
|
|
102
|
-
</react_native_1.View>
|
|
103
|
-
</react_native_1.TouchableOpacity>
|
|
104
|
-
</react_native_1.View>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<react_native_1.TouchableOpacity disabled={y}activeOpacity={.7}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),k(!f)}}style={styles.cleanRow}>
|
|
108
|
-
<react_native_1.View style={[styles.checkboxBox,f&&styles.checkboxBoxActive]}>
|
|
109
|
-
{f&&<NetworkIcons_1.CheckIcon size={11}color={AppColors_1.AppColors.white}/>}
|
|
110
|
-
</react_native_1.View>
|
|
111
|
-
<react_native_1.Text style={styles.cleanLabel}>
|
|
112
|
-
Clean build cache <react_native_1.Text style={styles.cleanCode}>{e("debugging.cleanBuild","(./gradlew clean)")}</react_native_1.Text>
|
|
113
|
-
</react_native_1.Text>
|
|
114
|
-
</react_native_1.TouchableOpacity>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{y&&<react_native_1.View style={styles.progressContainer}>
|
|
118
|
-
<react_native_1.View style={styles.progressTopRow}>
|
|
119
|
-
<react_native_1.View style={styles.progressTaskGroup}>
|
|
120
|
-
<react_native_1.ActivityIndicator size="small"color={AppColors_1.AppColors.purple}/>
|
|
121
|
-
<react_native_1.Text style={styles.progressTaskText}numberOfLines={1}>
|
|
122
|
-
{l.currentTask||"Executing Gradle tasks..."}
|
|
123
|
-
</react_native_1.Text>
|
|
124
|
-
</react_native_1.View>
|
|
125
|
-
<react_native_1.Text style={styles.progressPercentageText}>
|
|
126
|
-
{l.progress}%
|
|
127
|
-
</react_native_1.Text>
|
|
128
|
-
</react_native_1.View>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<react_native_1.View style={styles.progressBarTrack}>
|
|
132
|
-
<react_native_1.Animated.View style={[styles.progressBarFill,{width:_.interpolate({inputRange:[0,100],outputRange:["5%","100%"]})}]}/>
|
|
133
|
-
</react_native_1.View>
|
|
134
|
-
</react_native_1.View>}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
{l.status==="failed"&&<react_native_1.View style={styles.errorContainer}>
|
|
138
|
-
<NetworkIcons_1.CircleXIcon size={13}color={AppColors_1.AppColors.errorColor}/>
|
|
139
|
-
<react_native_1.Text style={styles.errorText}numberOfLines={2}>
|
|
140
|
-
{l.error||"Build execution failed."}
|
|
141
|
-
</react_native_1.Text>
|
|
142
|
-
</react_native_1.View>}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
{(l.logs&&l.logs.length>0||y)&&<react_native_1.View style={styles.consoleContainer}>
|
|
146
|
-
<react_native_1.View style={styles.consoleHeaderRow}>
|
|
147
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
148
|
-
<TerminalConsoleIcon color={AppColors_1.AppColors.sky400}size={12}/>
|
|
149
|
-
<react_native_1.Text style={styles.consoleHeaderTitle}>{e("debugging.gradleVerboseOutput","GRADLE VERBOSE OUTPUT")}</react_native_1.Text>
|
|
150
|
-
</react_native_1.View>
|
|
151
|
-
<react_native_1.TouchableOpacity activeOpacity={.7}onPress={()=>I(!A)}style={styles.consoleToggleBtn}>
|
|
152
|
-
<react_native_1.Text style={styles.consoleToggleText}>
|
|
153
|
-
{A?"Hide Console":"Show Console"}
|
|
154
|
-
</react_native_1.Text>
|
|
155
|
-
</react_native_1.TouchableOpacity>
|
|
156
|
-
</react_native_1.View>
|
|
157
|
-
|
|
158
|
-
{A&&<react_native_1.ScrollView ref={S}style={styles.consoleLogBox}contentContainerStyle={styles.consoleLogContent}nestedScrollEnabled showsVerticalScrollIndicator>
|
|
159
|
-
{l.logs&&l.logs.length>0?l.logs.map((i,s)=>{let o=AppColors_1.AppColors.slate400;return i.startsWith("> Task :")?o=AppColors_1.AppColors.sky400:i.includes("BUILD SUCCESSFUL")?o=AppColors_1.AppColors.buildSuccessGreen:i.includes("FAILURE")||i.includes("error:")?o=AppColors_1.AppColors.buildFailureRed:i.includes("UP-TO-DATE")&&(o=AppColors_1.AppColors.purple400),<react_native_1.Text key={s}style={[styles.consoleLogLine,{color:o}]}>
|
|
160
|
-
{i}
|
|
161
|
-
</react_native_1.Text>}):<react_native_1.Text style={styles.consoleLogPlaceholder}>
|
|
162
|
-
{e("debugging.waitingForGradle","Waiting for Gradle daemon output...")}
|
|
163
|
-
</react_native_1.Text>}
|
|
164
|
-
</react_native_1.ScrollView>}
|
|
165
|
-
</react_native_1.View>}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
{y?<react_native_1.View style={styles.buildingActionsRow}>
|
|
169
|
-
<react_native_1.View style={styles.buildingStatusPill}>
|
|
170
|
-
<react_native_1.ActivityIndicator size="small"color={AppColors_1.AppColors.purple}/>
|
|
171
|
-
<react_native_1.Text style={styles.buildingStatusPillText}numberOfLines={1}>
|
|
172
|
-
Building ({l.progress}%)
|
|
173
|
-
</react_native_1.Text>
|
|
174
|
-
</react_native_1.View>
|
|
175
|
-
|
|
176
|
-
<TouchableScale_1.default onPress={D}style={styles.stopBtn}>
|
|
177
|
-
<NetworkIcons_1.CircleXIcon size={13}color={AppColors_1.AppColors.white}/>
|
|
178
|
-
<react_native_1.Text style={styles.stopBtnText}>{e("debugging.stopBuild","Stop Build")}</react_native_1.Text>
|
|
179
|
-
</TouchableScale_1.default>
|
|
180
|
-
</react_native_1.View>:<TouchableScale_1.default onPress={F}style={styles.generateBtn}>
|
|
181
|
-
<react_native_1.View style={styles.ctaContentRow}>
|
|
182
|
-
<NetworkIcons_1.SparkleIcon size={14}color={AppColors_1.AppColors.white}/>
|
|
183
|
-
<react_native_1.Text style={styles.generateBtnText}>
|
|
184
|
-
{f?"Clean & Generate Build":"Generate Build"}
|
|
185
|
-
</react_native_1.Text>
|
|
186
|
-
</react_native_1.View>
|
|
187
|
-
</TouchableScale_1.default>}
|
|
188
|
-
</react_native_1.View>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<react_native_1.View style={styles.footerNoteRow}>
|
|
192
|
-
<NetworkIcons_1.InfoCircleIcon size={13}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
193
|
-
<react_native_1.Text style={styles.footerNoteText}>
|
|
194
|
-
{e("debugging.sameWifiNote","Ensure both Android devices are connected to the same Wi-Fi network.")}
|
|
195
|
-
</react_native_1.Text>
|
|
196
|
-
</react_native_1.View>
|
|
197
|
-
</react_native_1.ScrollView>};exports.DebuggingTab=DebuggingTab;const styles=react_native_1.StyleSheet.create({scrollArea:{flex:1,backgroundColor:AppColors_1.AppColors.contentBg},scrollContent:{padding:12,gap:12,paddingBottom:100},heroCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:14,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.04,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:1,gap:12},heroHeader:{flexDirection:"row",alignItems:"center",gap:10},heroIconWrap:{width:38,height:38,borderRadius:10,backgroundColor:AppColors_1.AppColors.purple,alignItems:"center",justifyContent:"center",shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},heroTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:15,color:AppColors_1.AppColors.primaryBlack,letterSpacing:-.2},heroSubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,marginTop:1},heroBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${AppColors_1.AppColors.emerald500}18`,paddingHorizontal:7,paddingVertical:3,borderRadius:6},pulseDot:{width:6,height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.emerald500},heroBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.emerald500},heroMetricsStrip:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,paddingVertical:8,paddingHorizontal:10},heroMetricItem:{flex:1,alignItems:"center",paddingHorizontal:2,minWidth:0},heroMetricLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.4},heroMetricValue:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.primaryBlack,marginTop:2},heroMetricDivider:{width:1,height:20,backgroundColor:AppColors_1.AppColors.dividerColor},sectionCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:14,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.03,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1,gap:12},sectionHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},sectionTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.8,textTransform:"uppercase"},refreshBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.purple}12`},refreshBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},qrCenteredWrapper:{alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.grayBackground,padding:12,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},qrInnerFrame:{backgroundColor:AppColors_1.AppColors.white,padding:6,borderRadius:8},urlBox:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,paddingLeft:10,paddingRight:6,paddingVertical:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:8},urlText:{flex:1,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.skyBlue},actionsRow:{flexDirection:"row",gap:10},actionBtnSecondary:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:9,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground},actionBtnSecondaryText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.grayTextStrong},actionBtnPrimary:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:9,borderRadius:10,backgroundColor:AppColors_1.AppColors.purple,shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},actionBtnPrimaryText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white},completedBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${AppColors_1.AppColors.emerald500}18`,paddingHorizontal:6,paddingVertical:2,borderRadius:5},completedBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.emerald500},subTabStrip:{flexDirection:"row",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,padding:2,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},subTabItem:{flex:1,paddingVertical:7,borderRadius:6,alignItems:"center",justifyContent:"center"},subTabItemActive:{backgroundColor:AppColors_1.AppColors.purple,shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.2,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},subTabText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayText},subTabTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.white},cleanRow:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:2},checkboxBox:{width:18,height:18,borderRadius:4,borderWidth:1.5,borderColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground,alignItems:"center",justifyContent:"center"},checkboxBoxActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},cleanLabel:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.grayTextStrong},cleanCode:{fontFamily:AppFonts_1.AppFonts.interRegular,color:AppColors_1.AppColors.grayTextWeak,fontSize:10.5},progressContainer:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,padding:10,gap:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},progressTopRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},progressTaskGroup:{flexDirection:"row",alignItems:"center",gap:6,flex:1,paddingRight:8},progressTaskText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.primaryBlack,flex:1},progressPercentageText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.purple},progressBarTrack:{width:"100%",height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.grayBorderSecondary,overflow:"hidden"},progressBarFill:{height:"100%",backgroundColor:AppColors_1.AppColors.purple,borderRadius:3},errorContainer:{flexDirection:"row",alignItems:"center",gap:6,backgroundColor:`${AppColors_1.AppColors.errorColor}12`,padding:8,borderRadius:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.errorColor}25`},errorText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.errorColor,flex:1},consoleContainer:{backgroundColor:AppColors_1.AppColors.slate900,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.slate800,overflow:"hidden",marginTop:4},consoleHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:AppColors_1.AppColors.slate800,paddingHorizontal:10,paddingVertical:6},consoleHeaderTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.sky400,letterSpacing:.5},consoleToggleBtn:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:"rgba(255,255,255,0.1)"},consoleToggleText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:9.5,color:AppColors_1.AppColors.slate400},consoleLogBox:{maxHeight:140,paddingHorizontal:10,paddingVertical:8},consoleLogContent:{gap:3},consoleLogLine:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:14},consoleLogPlaceholder:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.slate500,fontStyle:"italic"},generateBtn:{backgroundColor:AppColors_1.AppColors.purple,borderRadius:10,paddingVertical:10,alignItems:"center",justifyContent:"center",shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},generateBtnDisabled:{opacity:.7},buildingActionsRow:{flexDirection:"row",alignItems:"center",gap:10},buildingStatusPill:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderRadius:10,paddingVertical:10,borderWidth:1,borderColor:`${AppColors_1.AppColors.purple}30`},buildingStatusPillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.purple},stopBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,backgroundColor:AppColors_1.AppColors.errorColor,borderRadius:10,paddingHorizontal:16,paddingVertical:10,shadowColor:AppColors_1.AppColors.errorColor,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},stopBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white},ctaContentRow:{flexDirection:"row",alignItems:"center",gap:6},generateBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.white},footerNoteRow:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:8},footerNoteText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayTextWeak,textAlign:"center",flex:1}});exports.default=exports.DebuggingTab;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UiA11yAuditPanel=void 0;const react_1=__importDefault(require("react")),react_native_1=require("react-native"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),NetworkIcons_1=require("../NetworkIcons"),UiA11yAuditPanel=({a11y:t})=>{const{hasValidTouchTarget:r,touchTargetWidth:c,touchTargetHeight:d,recommendedMinSize:o,contrastRatio:a,contrastScore:e,textColor:p,backgroundColor:_,hasAccessibilityLabel:l,accessibilityRole:s,accessibilityHint:n,issues:i}=t;return<react_native_1.View style={styles.container}>
|
|
2
|
-
|
|
3
|
-
<react_native_1.View style={styles.card}>
|
|
4
|
-
<react_native_1.View style={styles.cardHeader}>
|
|
5
|
-
<react_native_1.View style={styles.cardTitleRow}>
|
|
6
|
-
<NetworkIcons_1.AccessibilityIcon color={AppColors_1.AppColors.brandPurple}size={18}/>
|
|
7
|
-
<react_native_1.Text style={styles.cardTitle}>Touch Target Size</react_native_1.Text>
|
|
8
|
-
</react_native_1.View>
|
|
9
|
-
<react_native_1.View style={[styles.badge,r?styles.badgeSuccess:styles.badgeWarning]}>
|
|
10
|
-
<react_native_1.Text style={[styles.badgeText,r?styles.badgeTextSuccess:styles.badgeTextWarning]}>
|
|
11
|
-
{r?"COMPLIANT":"SUB-OPTIMAL"}
|
|
12
|
-
</react_native_1.Text>
|
|
13
|
-
</react_native_1.View>
|
|
14
|
-
</react_native_1.View>
|
|
15
|
-
|
|
16
|
-
<react_native_1.View style={styles.metricRow}>
|
|
17
|
-
<react_native_1.View style={styles.metricItem}>
|
|
18
|
-
<react_native_1.Text style={styles.metricLabel}>Actual Size</react_native_1.Text>
|
|
19
|
-
<react_native_1.Text style={styles.metricValue}>
|
|
20
|
-
{Math.round(c)} × {Math.round(d)} pt
|
|
21
|
-
</react_native_1.Text>
|
|
22
|
-
</react_native_1.View>
|
|
23
|
-
<react_native_1.View style={styles.metricItem}>
|
|
24
|
-
<react_native_1.Text style={styles.metricLabel}>Target Guideline</react_native_1.Text>
|
|
25
|
-
<react_native_1.Text style={styles.metricValue}>
|
|
26
|
-
≥ {o} × {o} pt
|
|
27
|
-
</react_native_1.Text>
|
|
28
|
-
</react_native_1.View>
|
|
29
|
-
</react_native_1.View>
|
|
30
|
-
</react_native_1.View>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<react_native_1.View style={styles.card}>
|
|
34
|
-
<react_native_1.View style={styles.cardHeader}>
|
|
35
|
-
<react_native_1.View style={styles.cardTitleRow}>
|
|
36
|
-
<react_native_1.Text style={styles.cardTitle}>WCAG Color Contrast</react_native_1.Text>
|
|
37
|
-
</react_native_1.View>
|
|
38
|
-
<react_native_1.View style={[styles.badge,e==="AAA"||e==="AA"?styles.badgeSuccess:e==="Fail"?styles.badgeError:styles.badgeNeutral]}>
|
|
39
|
-
<react_native_1.Text style={[styles.badgeText,e==="AAA"||e==="AA"?styles.badgeTextSuccess:e==="Fail"?styles.badgeTextError:styles.badgeTextNeutral]}>
|
|
40
|
-
{e==="N/A"?"NOT APPLICABLE":`WCAG ${e}`}
|
|
41
|
-
</react_native_1.Text>
|
|
42
|
-
</react_native_1.View>
|
|
43
|
-
</react_native_1.View>
|
|
44
|
-
|
|
45
|
-
{a!==void 0?<react_native_1.View style={styles.contrastPreview}>
|
|
46
|
-
<react_native_1.View style={[styles.contrastSwatch,{backgroundColor:_||"#FFFFFF"}]}>
|
|
47
|
-
<react_native_1.Text style={[styles.contrastSampleText,{color:p||"#000000"}]}>
|
|
48
|
-
Sample Text
|
|
49
|
-
</react_native_1.Text>
|
|
50
|
-
</react_native_1.View>
|
|
51
|
-
<react_native_1.View style={styles.contrastDetails}>
|
|
52
|
-
<react_native_1.Text style={styles.contrastRatioValue}>{a}:1</react_native_1.Text>
|
|
53
|
-
<react_native_1.Text style={styles.contrastSubtext}>
|
|
54
|
-
{a>=7?"Passes AAA (Enhanced Contrast)":a>=4.5?"Passes AA (Minimum Standard)":"Fails AA (Low Contrast Warning)"}
|
|
55
|
-
</react_native_1.Text>
|
|
56
|
-
</react_native_1.View>
|
|
57
|
-
</react_native_1.View>:<react_native_1.Text style={styles.naSubtext}>
|
|
58
|
-
Text or background color is transparent or dynamically inherited.
|
|
59
|
-
</react_native_1.Text>}
|
|
60
|
-
</react_native_1.View>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<react_native_1.View style={styles.card}>
|
|
64
|
-
<react_native_1.Text style={[styles.cardTitle,{marginBottom:10}]}>Accessibility Attributes</react_native_1.Text>
|
|
65
|
-
|
|
66
|
-
<react_native_1.View style={styles.attributeRow}>
|
|
67
|
-
<react_native_1.Text style={styles.attributeLabel}>accessibilityLabel:</react_native_1.Text>
|
|
68
|
-
<react_native_1.Text style={[styles.attributeValue,!l&&{color:AppColors_1.AppColors.grayTextWeak,fontStyle:"italic"}]}>
|
|
69
|
-
{l?"Provided":"None specified"}
|
|
70
|
-
</react_native_1.Text>
|
|
71
|
-
</react_native_1.View>
|
|
72
|
-
|
|
73
|
-
<react_native_1.View style={styles.attributeRow}>
|
|
74
|
-
<react_native_1.Text style={styles.attributeLabel}>accessibilityRole:</react_native_1.Text>
|
|
75
|
-
<react_native_1.Text style={[styles.attributeValue,!s&&{color:AppColors_1.AppColors.grayTextWeak,fontStyle:"italic"}]}>
|
|
76
|
-
{s||"None"}
|
|
77
|
-
</react_native_1.Text>
|
|
78
|
-
</react_native_1.View>
|
|
79
|
-
|
|
80
|
-
{n&&<react_native_1.View style={styles.attributeRow}>
|
|
81
|
-
<react_native_1.Text style={styles.attributeLabel}>accessibilityHint:</react_native_1.Text>
|
|
82
|
-
<react_native_1.Text style={styles.attributeValue}>{n}</react_native_1.Text>
|
|
83
|
-
</react_native_1.View>}
|
|
84
|
-
</react_native_1.View>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
{i.length>0&&<react_native_1.View style={[styles.card,styles.issuesCard]}>
|
|
88
|
-
<react_native_1.View style={styles.issuesHeader}>
|
|
89
|
-
<NetworkIcons_1.AlertTriangleIcon color="#D97706"size={16}/>
|
|
90
|
-
<react_native_1.Text style={styles.issuesTitle}>Recommendations ({i.length})</react_native_1.Text>
|
|
91
|
-
</react_native_1.View>
|
|
92
|
-
{i.map((u,b)=><react_native_1.View key={b}style={styles.issueItem}>
|
|
93
|
-
<react_native_1.Text style={styles.issueBullet}>•</react_native_1.Text>
|
|
94
|
-
<react_native_1.Text style={styles.issueText}>{u}</react_native_1.Text>
|
|
95
|
-
</react_native_1.View>)}
|
|
96
|
-
</react_native_1.View>}
|
|
97
|
-
</react_native_1.View>};exports.UiA11yAuditPanel=UiA11yAuditPanel;const styles=react_native_1.StyleSheet.create({container:{gap:10,paddingVertical:4},card:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,padding:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},cardHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:10},cardTitleRow:{flexDirection:"row",alignItems:"center",gap:8},cardTitle:{fontSize:14,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.slate900},badge:{paddingHorizontal:8,paddingVertical:3,borderRadius:6},badgeSuccess:{backgroundColor:"#10B9811A",borderColor:"#10B98144",borderWidth:1},badgeWarning:{backgroundColor:"#F59E0B1A",borderColor:"#F59E0B44",borderWidth:1},badgeError:{backgroundColor:"#E11D481A",borderColor:"#E11D4844",borderWidth:1},badgeNeutral:{backgroundColor:AppColors_1.AppColors.slate100},badgeText:{fontSize:10,fontFamily:AppFonts_1.AppFonts.bold},badgeTextSuccess:{color:"#059669"},badgeTextWarning:{color:"#D97706"},badgeTextError:{color:"#E11D48"},badgeTextNeutral:{color:AppColors_1.AppColors.slate600},metricRow:{flexDirection:"row",gap:16},metricItem:{flex:1,backgroundColor:AppColors_1.AppColors.slate50,padding:10,borderRadius:8},metricLabel:{fontSize:11,fontFamily:AppFonts_1.AppFonts.medium,color:AppColors_1.AppColors.grayTextWeak,marginBottom:4},metricValue:{fontSize:13,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.slate900},contrastPreview:{flexDirection:"row",alignItems:"center",gap:12},contrastSwatch:{paddingVertical:12,paddingHorizontal:16,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},contrastSampleText:{fontSize:13,fontFamily:AppFonts_1.AppFonts.semiBold},contrastDetails:{flex:1},contrastRatioValue:{fontSize:16,fontFamily:AppFonts_1.AppFonts.bold,color:AppColors_1.AppColors.slate900},contrastSubtext:{fontSize:11,fontFamily:AppFonts_1.AppFonts.medium,color:AppColors_1.AppColors.grayTextWeak,marginTop:2},naSubtext:{fontSize:12,fontFamily:AppFonts_1.AppFonts.medium,color:AppColors_1.AppColors.grayTextWeak},attributeRow:{flexDirection:"row",justifyContent:"space-between",paddingVertical:6,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.slate100},attributeLabel:{fontSize:12,fontFamily:AppFonts_1.AppFonts.medium,color:AppColors_1.AppColors.slate600},attributeValue:{fontSize:12,fontFamily:AppFonts_1.AppFonts.semiBold,color:AppColors_1.AppColors.slate900},issuesCard:{backgroundColor:"#FEF3C722",borderColor:"#F59E0B44"},issuesHeader:{flexDirection:"row",alignItems:"center",gap:6,marginBottom:8},issuesTitle:{fontSize:13,fontFamily:AppFonts_1.AppFonts.semiBold,color:"#D97706"},issueItem:{flexDirection:"row",alignItems:"flex-start",gap:6,marginVertical:3},issueBullet:{fontSize:12,color:"#D97706"},issueText:{fontSize:12,fontFamily:AppFonts_1.AppFonts.medium,color:AppColors_1.AppColors.slate700,flex:1,lineHeight:16}});
|