react-native-inapp-inspector 2.4.1 → 2.4.2
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.ar.md +163 -0
- package/README.de.md +163 -0
- package/README.es.md +164 -0
- package/README.fr.md +163 -0
- package/README.hi.md +163 -0
- package/README.ja.md +180 -0
- package/README.ko.md +163 -0
- package/README.md +340 -243
- package/README.pt-BR.md +163 -0
- package/README.ru.md +163 -0
- package/README.zh-CN.md +387 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +82 -21
- package/assets/banner_dark.svg +186 -0
- package/assets/banner_light.svg +186 -0
- package/assets/icon_circle.svg +148 -0
- package/assets/icon_square.svg +369 -0
- package/assets/inapp_inspector_icon.gif +0 -0
- package/assets/inapp_inspector_icon_original.gif +0 -0
- package/assets/social_preview.png +0 -0
- package/assets/walkthrough.gif +0 -0
- package/dist/commonjs/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/commonjs/components/AnimatedBrandOwl.js +175 -0
- package/dist/commonjs/components/AppHeaderLogo.d.ts +1 -0
- package/dist/commonjs/components/AppHeaderLogo.js +7 -5
- package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
- package/dist/commonjs/components/BrandSquareIcon.js +139 -0
- package/dist/commonjs/components/ConsoleLogCard.d.ts +2 -1
- package/dist/commonjs/components/ConsoleLogCard.js +23 -39
- package/dist/commonjs/components/Inspector/AboutModal.js +44 -54
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +5 -5
- package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +32 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +11 -11
- package/dist/commonjs/components/Inspector/CrashTab.js +14 -12
- package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
- package/dist/commonjs/components/Inspector/FabLauncher.js +22 -30
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +90 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +46 -33
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +21 -19
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +85 -101
- package/dist/commonjs/components/Inspector/NetworkTab.js +50 -50
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/commonjs/components/Inspector/PushCard.d.ts +3 -2
- package/dist/commonjs/components/Inspector/PushCard.js +5 -4
- package/dist/commonjs/components/Inspector/PushDetail.js +32 -23
- package/dist/commonjs/components/Inspector/PushTab.js +12 -12
- package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
- package/dist/commonjs/components/Inspector/ReduxTab.js +5 -5
- package/dist/commonjs/components/Inspector/SettingsPanel.js +258 -139
- package/dist/commonjs/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SocketCard.js +116 -0
- package/dist/commonjs/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/SocketDetail.js +317 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/commonjs/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SocketTab.js +112 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +38 -36
- package/dist/commonjs/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/SupportModal.js +125 -0
- package/dist/commonjs/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SupportPage.js +227 -0
- package/dist/commonjs/components/Inspector/TabBar.js +24 -23
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +24 -24
- package/dist/commonjs/components/JsonViewer.js +7 -7
- package/dist/commonjs/components/LogCard.d.ts +3 -2
- package/dist/commonjs/components/LogCard.js +13 -13
- package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
- package/dist/commonjs/components/ModuleErrorBoundary.js +2 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +15 -0
- package/dist/commonjs/components/NetworkIcons.js +38 -3
- package/dist/commonjs/components/SegmentedTabs.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
- package/dist/commonjs/customHooks/socketLogger.js +2 -0
- package/dist/commonjs/helpers/index.js +3 -3
- package/dist/commonjs/helpers/memoryManager.d.ts +1 -0
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +5 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +3 -1
- package/dist/commonjs/helpers/shareFormatter.js +8 -7
- package/dist/commonjs/i18n/index.d.ts +99 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -0
- package/dist/commonjs/i18n/locales/it.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -0
- package/dist/commonjs/i18n/locales/mr.json +1 -0
- package/dist/commonjs/i18n/locales/nl.json +1 -0
- package/dist/commonjs/i18n/locales/pa.json +1 -0
- package/dist/commonjs/i18n/locales/pl.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -0
- package/dist/commonjs/i18n/locales/te.json +1 -0
- package/dist/commonjs/i18n/locales/tr.json +1 -0
- package/dist/commonjs/i18n/locales/vi.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +13 -13
- package/dist/commonjs/index.js +5 -4
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/socket.d.ts +4 -0
- package/dist/commonjs/socket.js +1 -0
- package/dist/commonjs/styles/index.d.ts +23 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +40 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +122 -1
- package/dist/esm/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/esm/components/AnimatedBrandOwl.js +175 -0
- package/dist/esm/components/AppHeaderLogo.d.ts +1 -0
- package/dist/esm/components/AppHeaderLogo.js +7 -5
- package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
- package/dist/esm/components/BrandSquareIcon.js +139 -0
- package/dist/esm/components/ConsoleLogCard.d.ts +2 -1
- package/dist/esm/components/ConsoleLogCard.js +61 -77
- package/dist/esm/components/Inspector/AboutModal.js +85 -95
- package/dist/esm/components/Inspector/AnalyticsTab.js +15 -15
- package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/esm/components/Inspector/ConfirmationModal.js +32 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +47 -47
- package/dist/esm/components/Inspector/CrashTab.js +34 -32
- package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
- package/dist/esm/components/Inspector/FabLauncher.js +50 -58
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +90 -0
- package/dist/esm/components/Inspector/MainScreen.js +123 -110
- package/dist/esm/components/Inspector/MediaGalleryTab.js +64 -62
- package/dist/esm/components/Inspector/MediaPreviewModal.js +107 -123
- package/dist/esm/components/Inspector/NetworkTab.js +90 -90
- package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/esm/components/Inspector/PushCard.d.ts +3 -2
- package/dist/esm/components/Inspector/PushCard.js +23 -22
- package/dist/esm/components/Inspector/PushDetail.js +34 -25
- package/dist/esm/components/Inspector/PushTab.js +23 -23
- package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
- package/dist/esm/components/Inspector/ReduxTab.js +22 -22
- package/dist/esm/components/Inspector/SettingsPanel.js +495 -376
- package/dist/esm/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/esm/components/Inspector/SocketCard.js +116 -0
- package/dist/esm/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/SocketDetail.js +317 -0
- package/dist/esm/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/esm/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/esm/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/esm/components/Inspector/SocketTab.js +112 -0
- package/dist/esm/components/Inspector/StorageTab.js +145 -143
- package/dist/esm/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/esm/components/Inspector/SupportModal.js +125 -0
- package/dist/esm/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/esm/components/Inspector/SupportPage.js +227 -0
- package/dist/esm/components/Inspector/TabBar.js +36 -35
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +22 -22
- package/dist/esm/components/JsonViewer.js +55 -55
- package/dist/esm/components/LogCard.d.ts +3 -2
- package/dist/esm/components/LogCard.js +60 -60
- package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
- package/dist/esm/components/ModuleErrorBoundary.js +23 -23
- package/dist/esm/components/NetworkIcons.d.ts +15 -0
- package/dist/esm/components/NetworkIcons.js +38 -3
- package/dist/esm/components/SegmentedTabs.js +7 -7
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/socketLogger.d.ts +26 -0
- package/dist/esm/customHooks/socketLogger.js +2 -0
- package/dist/esm/helpers/index.js +3 -3
- package/dist/esm/helpers/memoryManager.d.ts +1 -0
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +5 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +3 -1
- package/dist/esm/helpers/shareFormatter.js +8 -7
- package/dist/esm/i18n/index.d.ts +99 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -0
- package/dist/esm/i18n/locales/it.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -0
- package/dist/esm/i18n/locales/mr.json +1 -0
- package/dist/esm/i18n/locales/nl.json +1 -0
- package/dist/esm/i18n/locales/pa.json +1 -0
- package/dist/esm/i18n/locales/pl.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -0
- package/dist/esm/i18n/locales/te.json +1 -0
- package/dist/esm/i18n/locales/tr.json +1 -0
- package/dist/esm/i18n/locales/vi.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +13 -13
- package/dist/esm/index.js +8 -7
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/socket.d.ts +4 -0
- package/dist/esm/socket.js +1 -0
- package/dist/esm/styles/index.d.ts +23 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +40 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +122 -1
- package/ios/NetworkInspectorModule.mm +102 -12
- package/package.json +204 -2
- package/src/native/NativeInspector.ts +8 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{useState as M,useEffect as _,useMemo as We,useCallback as
|
|
2
|
-
<
|
|
3
|
-
</
|
|
1
|
+
import{useState as M,useEffect as _,useMemo as We,useCallback as ie,useRef as X}from"react";import{View as T,Text as C,ScrollView as Te,StyleSheet as Pe,NativeModules as He,TouchableOpacity as G,ActivityIndicator as Ce,Animated as Z}from"react-native";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import{useTranslation as $e}from"../../i18n";import Ne from"../QRCodeView";import Se from"../TouchableScale";import{showToast as J}from"../../helpers/toast";import{triggerNativeHaptic as H}from"../../native/NativeInspector";import{InfoCircleIcon as Ee,CheckIcon as Be,BoltIcon as Re,CircleXIcon as Ie,SparkleIcon as Ge,AndroidIcon as Ue,RepeatIcon as _e,WrenchIcon as Ke}from"../NetworkIcons";import Qe,{Path as Xe}from"react-native-svg";const Ze=({color:L=e.purple,size:R=13})=><Qe width={R}height={R}viewBox="0 0 24 24"fill="none">
|
|
2
|
+
<Xe d="M4 17l6-6-6-6M12 19h8"stroke={L}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
3
|
+
</Qe>;export const DebuggingTab=()=>{const{t:L}=$e(),R=We(()=>{const k=He.SourceCode?.scriptURL||"";let V="localhost",S=8081;try{if(k.includes("://")){const v=k.split("://")[1].split("/")[0];if(v.includes(":")){const A=v.split(":");V=A[0];const P=parseInt(A[1],10);isNaN(P)||(S=P)}else V=v}}catch{}return{host:V,port:S,scriptURL:k}},[]),[Y,Ve]=M(()=>R.host&&R.host!=="localhost"&&R.host!=="127.0.0.1"&&R.host!=="10.0.2.2"?R.host:"192.168.1.2"),[$,ze]=M(R.port||8083),[De,ee]=M("app-debug.apk"),[q,oe]=M(null),[F,te]=M("assembleRelease"),[W,ve]=M(!0),[I,U]=M({status:"idle",scheme:"assembleRelease",clean:!0,progress:0,currentTask:"",error:null,apkName:null,apkSize:null}),D=X(null),K=X(new Z.Value(0)).current,[Q,Ae]=M(!0),re=X(null);_(()=>{Z.timing(K,{toValue:Math.max(0,Math.min(100,I.progress)),duration:350,useNativeDriver:!1}).start()},[I.progress,K]),_(()=>{I.logs&&I.logs.length>0&&setTimeout(()=>{re.current?.scrollToEnd({animated:!0})},50)},[I.logs]);const E=ie(async()=>{const k=Array.from(new Set([R.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),V=Array.from(new Set([R.port,8083,8081,8082].filter(Boolean)));for(const S of k)for(const O of V)try{const v=new AbortController,A=setTimeout(()=>v.abort(),1200),P=await fetch(`http://${S}:${O}/__inapp_inspector/apk-info`,{signal:v.signal});if(clearTimeout(A),P.ok){const z=await P.json();z.hostIp&&z.hostIp!=="127.0.0.1"&&z.hostIp!=="localhost"&&z.hostIp!=="10.0.2.2"&&Ve(z.hostIp),z.port&&ze(z.port),z.apkName&&ee(z.apkName),z.apkSize&&oe((z.apkSize/(1024*1024)).toFixed(1));return}}catch{}},[R.host,R.port]);_(()=>{E()},[E]),_(()=>()=>{D.current&&clearInterval(D.current)},[]);const Fe=ie(()=>{D.current&&clearInterval(D.current);const k=R.host||"10.0.2.2";D.current=setInterval(async()=>{try{const V=await fetch(`http://${k}:${$}/__inapp_inspector/build-status`);if(V.ok){const S=await V.json();U(S),S.status==="completed"?(D.current&&clearInterval(D.current),H("success"),J(L("debugging.buildSuccess","APK Build Generated Successfully!")),S.apkSize&&oe((S.apkSize/(1024*1024)).toFixed(1)),S.apkName&&ee(S.apkName),E()):S.status==="failed"&&(D.current&&clearInterval(D.current),H("error"),J(L("debugging.buildFailed",{error:S.error||"Gradle error"})))}}catch{}},1e3)},[R.host,$,E]),Oe=async()=>{H("medium"),U({status:"running",scheme:F,clean:W,progress:5,currentTask:W?"Cleaning build cache...":"Initializing build...",error:null,apkName:null,apkSize:null});const k=Array.from(new Set([R.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),V=Array.from(new Set([$,8083,8081,8082].filter(Boolean)));let S=!1;for(const O of k)for(const v of V)try{const A=new AbortController,P=setTimeout(()=>A.abort(),2e3),z=await fetch(`http://${O}:${v}/__inapp_inspector/build-apk?scheme=${F}&clean=${W}`,{signal:A.signal});if(clearTimeout(P),z.ok){S=!0,Fe();return}}catch{}S||U(O=>({...O,status:"failed",error:"Cannot reach build server. Ensure npm start or npm run serve-apk is running on host."}))},Me=async()=>{H("warning"),D.current&&clearInterval(D.current);const k=Array.from(new Set([R.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),V=Array.from(new Set([$,8083,8081,8082].filter(Boolean)));for(const S of k)for(const O of V)try{const v=new AbortController,A=setTimeout(()=>v.abort(),1500);await fetch(`http://${S}:${O}/__inapp_inspector/stop-build`,{signal:v.signal}),clearTimeout(A)}catch{}U(S=>({...S,status:"idle",currentTask:L("debugging.buildCancelled","Build cancelled by user"),logs:[...S.logs||[],`[Build] ${L("debugging.buildCancelled","Build cancelled by user")}.`]})),J(L("debugging.buildCancelled","Build cancelled"))},Le=`http://${Y}:${$}/${De.replace(/^\/+/,"")}`,N=I.status==="running";return<Te style={o.scrollArea}contentContainerStyle={o.scrollContent}showsVerticalScrollIndicator={!1}>
|
|
4
4
|
|
|
5
5
|
<T style={o.heroCard}>
|
|
6
6
|
<T style={o.heroHeader}>
|
|
7
7
|
<T style={o.heroIconWrap}>
|
|
8
|
-
<
|
|
8
|
+
<Ue size={20}color={e.white}/>
|
|
9
9
|
</T>
|
|
10
10
|
<T style={{flex:1,minWidth:0}}>
|
|
11
11
|
<C style={o.heroTitle}numberOfLines={1}>
|
|
@@ -26,13 +26,13 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
26
26
|
<T style={o.heroMetricItem}>
|
|
27
27
|
<C style={o.heroMetricLabel}>HOST IP</C>
|
|
28
28
|
<C style={o.heroMetricValue}numberOfLines={1}>
|
|
29
|
-
{
|
|
29
|
+
{Y}
|
|
30
30
|
</C>
|
|
31
31
|
</T>
|
|
32
32
|
<T style={o.heroMetricDivider}/>
|
|
33
33
|
<T style={o.heroMetricItem}>
|
|
34
34
|
<C style={o.heroMetricLabel}>PORT</C>
|
|
35
|
-
<C style={o.heroMetricValue}>{
|
|
35
|
+
<C style={o.heroMetricValue}>{$}</C>
|
|
36
36
|
</T>
|
|
37
37
|
<T style={o.heroMetricDivider}/>
|
|
38
38
|
<T style={o.heroMetricItem}>
|
|
@@ -56,7 +56,7 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
56
56
|
<T style={o.sectionHeaderRow}>
|
|
57
57
|
<C style={o.sectionTitle}>QR CODE & DIRECT DOWNLOAD</C>
|
|
58
58
|
<G activeOpacity={.7}onPress={E}style={o.refreshBtn}>
|
|
59
|
-
<
|
|
59
|
+
<_e size={12}color={e.purple}/>
|
|
60
60
|
<C style={o.refreshBtnText}>Refresh</C>
|
|
61
61
|
</G>
|
|
62
62
|
</T>
|
|
@@ -64,7 +64,7 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
64
64
|
|
|
65
65
|
<T style={o.qrCenteredWrapper}>
|
|
66
66
|
<T style={o.qrInnerFrame}>
|
|
67
|
-
|
|
67
|
+
<Ne value={Le}size={235}color={e.primaryBlack}backgroundColor={e.white}/>
|
|
68
68
|
</T>
|
|
69
69
|
</T>
|
|
70
70
|
</T>
|
|
@@ -76,7 +76,7 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
76
76
|
<Re size={13}color={e.purple}/>
|
|
77
77
|
<C style={o.sectionTitle}>BUILD GENERATOR (GRADLE)</C>
|
|
78
78
|
</T>
|
|
79
|
-
{
|
|
79
|
+
{I.status==="completed"&&<T style={o.completedBadge}>
|
|
80
80
|
<Be size={10}color={e.emerald500}/>
|
|
81
81
|
<C style={o.completedBadgeText}>100% Ready</C>
|
|
82
82
|
</T>}
|
|
@@ -84,7 +84,7 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
<T style={o.subTabStrip}>
|
|
87
|
-
<G disabled={
|
|
87
|
+
<G disabled={N}activeOpacity={.7}onPress={()=>{H("light"),te("assembleRelease")}}style={[o.subTabItem,F==="assembleRelease"&&o.subTabItemActive]}>
|
|
88
88
|
<T style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
89
89
|
<Re size={12}color={F==="assembleRelease"?e.white:e.grayText}/>
|
|
90
90
|
<C style={[o.subTabText,F==="assembleRelease"&&o.subTabTextActive]}>
|
|
@@ -93,9 +93,9 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
93
93
|
</T>
|
|
94
94
|
</G>
|
|
95
95
|
|
|
96
|
-
<G disabled={
|
|
96
|
+
<G disabled={N}activeOpacity={.7}onPress={()=>{H("light"),te("assembleDebug")}}style={[o.subTabItem,F==="assembleDebug"&&o.subTabItemActive]}>
|
|
97
97
|
<T style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
98
|
-
<
|
|
98
|
+
<Ke size={12}color={F==="assembleDebug"?e.white:e.grayText}/>
|
|
99
99
|
<C style={[o.subTabText,F==="assembleDebug"&&o.subTabTextActive]}>
|
|
100
100
|
Debug (assembleDebug)
|
|
101
101
|
</C>
|
|
@@ -104,9 +104,9 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
104
104
|
</T>
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
<G disabled={
|
|
108
|
-
<T style={[o.checkboxBox,
|
|
109
|
-
{
|
|
107
|
+
<G disabled={N}activeOpacity={.7}onPress={()=>{H("light"),ve(!W)}}style={o.cleanRow}>
|
|
108
|
+
<T style={[o.checkboxBox,W&&o.checkboxBoxActive]}>
|
|
109
|
+
{W&&<Be size={11}color={e.white}/>}
|
|
110
110
|
</T>
|
|
111
111
|
<C style={o.cleanLabel}>
|
|
112
112
|
Clean build cache <C style={o.cleanCode}>(./gradlew clean)</C>
|
|
@@ -114,16 +114,16 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
114
114
|
</G>
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
{
|
|
117
|
+
{N&&<T style={o.progressContainer}>
|
|
118
118
|
<T style={o.progressTopRow}>
|
|
119
119
|
<T style={o.progressTaskGroup}>
|
|
120
120
|
<Ce size="small"color={e.purple}/>
|
|
121
121
|
<C style={o.progressTaskText}numberOfLines={1}>
|
|
122
|
-
{
|
|
122
|
+
{I.currentTask||"Executing Gradle tasks..."}
|
|
123
123
|
</C>
|
|
124
124
|
</T>
|
|
125
125
|
<C style={o.progressPercentageText}>
|
|
126
|
-
{
|
|
126
|
+
{I.progress}%
|
|
127
127
|
</C>
|
|
128
128
|
</T>
|
|
129
129
|
|
|
@@ -134,18 +134,18 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
134
134
|
</T>}
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
{
|
|
137
|
+
{I.status==="failed"&&<T style={o.errorContainer}>
|
|
138
138
|
<Ie size={13}color={e.errorColor}/>
|
|
139
139
|
<C style={o.errorText}numberOfLines={2}>
|
|
140
|
-
{
|
|
140
|
+
{I.error||"Build execution failed."}
|
|
141
141
|
</C>
|
|
142
142
|
</T>}
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
{(
|
|
145
|
+
{(I.logs&&I.logs.length>0||N)&&<T style={o.consoleContainer}>
|
|
146
146
|
<T style={o.consoleHeaderRow}>
|
|
147
147
|
<T style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
148
|
-
<
|
|
148
|
+
<Ze color={e.sky400}size={12}/>
|
|
149
149
|
<C style={o.consoleHeaderTitle}>GRADLE VERBOSE OUTPUT</C>
|
|
150
150
|
</T>
|
|
151
151
|
<G activeOpacity={.7}onPress={()=>Ae(!Q)}style={o.consoleToggleBtn}>
|
|
@@ -155,8 +155,8 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
155
155
|
</G>
|
|
156
156
|
</T>
|
|
157
157
|
|
|
158
|
-
{Q&&<Te ref={
|
|
159
|
-
{
|
|
158
|
+
{Q&&<Te ref={re}style={o.consoleLogBox}contentContainerStyle={o.consoleLogContent}nestedScrollEnabled showsVerticalScrollIndicator>
|
|
159
|
+
{I.logs&&I.logs.length>0?I.logs.map((k,V)=>{let S=e.slate400;return k.startsWith("> Task :")?S=e.sky400:k.includes("BUILD SUCCESSFUL")?S=e.buildSuccessGreen:k.includes("FAILURE")||k.includes("error:")?S=e.buildFailureRed:k.includes("UP-TO-DATE")&&(S=e.purple400),<C key={V}style={[o.consoleLogLine,{color:S}]}>
|
|
160
160
|
{k}
|
|
161
161
|
</C>}):<C style={o.consoleLogPlaceholder}>
|
|
162
162
|
Waiting for Gradle daemon output...
|
|
@@ -165,11 +165,11 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
165
165
|
</T>}
|
|
166
166
|
|
|
167
167
|
|
|
168
|
-
{
|
|
168
|
+
{N?<T style={o.buildingActionsRow}>
|
|
169
169
|
<T style={o.buildingStatusPill}>
|
|
170
170
|
<Ce size="small"color={e.purple}/>
|
|
171
171
|
<C style={o.buildingStatusPillText}numberOfLines={1}>
|
|
172
|
-
Building ({
|
|
172
|
+
Building ({I.progress}%)
|
|
173
173
|
</C>
|
|
174
174
|
</T>
|
|
175
175
|
|
|
@@ -179,9 +179,9 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
179
179
|
</Se>
|
|
180
180
|
</T>:<Se onPress={Oe}style={o.generateBtn}>
|
|
181
181
|
<T style={o.ctaContentRow}>
|
|
182
|
-
<
|
|
182
|
+
<Ge size={14}color={e.white}/>
|
|
183
183
|
<C style={o.generateBtnText}>
|
|
184
|
-
{
|
|
184
|
+
{W?"Clean & Generate Build":"Generate Build"}
|
|
185
185
|
</C>
|
|
186
186
|
</T>
|
|
187
187
|
</Se>}
|
|
@@ -189,7 +189,7 @@ import{useState as M,useEffect as _,useMemo as We,useCallback as re,useRef as X}
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
<T style={o.footerNoteRow}>
|
|
192
|
-
<
|
|
192
|
+
<Ee size={13}color={e.grayTextWeak}/>
|
|
193
193
|
<C style={o.footerNoteText}>
|
|
194
194
|
Ensure both Android devices are connected to the same Wi-Fi network.
|
|
195
195
|
</C>
|
|
@@ -1,84 +1,76 @@
|
|
|
1
|
-
import{useCallback as
|
|
1
|
+
import{useCallback as A,useEffect as E,useRef as I,useState as $}from"react";import{Animated as z,PanResponder as ce,Platform as q,StyleSheet as le,Text as P,TouchableOpacity as Se,useWindowDimensions as xe,View as S}from"react-native";import Re from"react-native-linear-gradient";import{useInspector as ve}from"./InspectorContext";import R from"../TouchableScale";import U from"../AppHeaderLogo";import{AndroidIcon as Ce,AppleIcon as Te,CameraIcon as Ie,CloseWhite as X,MaximizeIcon as Pe,NpmIcon as Be,VideoCameraIcon as Ve}from"../NetworkIcons";import{ScreenCapture as v}from"../../capture";import{triggerNativeHaptic as a}from"../../native/NativeInspector";import{showToast as c}from"../../helpers/toast";import{getAppName as Me,getAppVersionAndBuild as Ae}from"../../helpers";import{LIB_VERSION as $e}from"../../constants";import{AppColors as i}from"../../styles/AppColors";import{AppFonts as O}from"../../styles/AppFonts";import W from"../../styles";import{useTranslation as De}from"../../i18n";import{MediaPreviewModal as Le}from"./MediaPreviewModal";const Ee=()=>{const{setVisible:C,isMinimized:Y,setIsMinimized:B,dismissInspector:J,appIcon:F,fabPan:K,fabPanResponder:Q,fabDraggedRef:Z,pulseAnim:ee,fabShineAnim:Oe,refreshMediaCount:d,captureFps:k,captureScale:H,captureBitrate:D,captureMaxDurationSeconds:_,captureAudioMode:G}=ve(),{width:We}=xe(),{t:o}=De(),[te]=$(()=>Ae().formatted),[s,V]=$(!1),[re,L]=$(0),p=I(null),[N,T]=$(null),n=I(new z.ValueXY({x:0,y:0})).current,M=I({x:0,y:0});E(()=>{const e=n.x.addListener(m=>M.current.x=m.value),t=n.y.addListener(m=>M.current.y=m.value);return()=>{n.x.removeListener(e),n.y.removeListener(t)}},[n]);const l=I(!1),ie=I(ce.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,t)=>Math.abs(t.dx)>4||Math.abs(t.dy)>4,onPanResponderGrant:()=>{l.current=!0,n.setOffset({x:M.current.x,y:M.current.y}),n.setValue({x:0,y:0})},onPanResponderMove:z.event([null,{dx:n.x,dy:n.y}],{useNativeDriver:!1}),onPanResponderRelease:()=>{n.flattenOffset(),setTimeout(()=>{l.current=!1},50)},onPanResponderTerminate:()=>{n.flattenOffset(),l.current=!1}})).current;E(()=>{v.isRecording().then(e=>{V(!!e)}).catch(()=>{})},[]),E(()=>(s?(L(0),p.current=setInterval(()=>{L(e=>e+1)},1e3)):(p.current&&(clearInterval(p.current),p.current=null),L(0)),()=>{p.current&&clearInterval(p.current)}),[s]);const oe=A(async()=>{if(!l.current)try{a("light");const e=await v.takeScreenshot({format:"png",quality:.9,hideInspector:!0});if(e){a("success");const t={id:`screenshot_${e.timestamp}.png`,type:"image",format:e.format,uri:e.uri,filename:e.uri.split("/").pop()||`screenshot_${e.timestamp}.png`,sizeBytes:e.sizeBytes,timestamp:e.timestamp,width:e.width,height:e.height};T(t),d?.().catch(()=>{}),c(o("header.screenshotCaptured","Screenshot captured"))}else c(o("header.screenshotFailed","Failed to capture screenshot"))}catch{c(o("header.screenshotError","Error capturing screenshot"))}},[d,o]),ne=A(async()=>{if(!l.current)try{if(s){a("medium");const e=await v.stopRecording();if(V(!1),e){a("success");const t={id:`video_${e.timestamp}.${e.format}`,type:e.format==="gif"?"gif":"video",format:e.format,uri:e.uri,filename:e.uri.split("/").pop()||`video_${e.timestamp}.${e.format}`,sizeBytes:e.sizeBytes,timestamp:e.timestamp,durationMs:e.durationMs,width:e.width,height:e.height,hasAudio:e.hasAudio,thumbnailUri:e.thumbnailUri};T(t),d?.().catch(()=>{}),c(o("header.recordingSaved",{duration:(e.durationMs/1e3).toFixed(1),defaultValue:`Recording saved (${(e.durationMs/1e3).toFixed(1)}s)`}))}}else a("medium"),await v.startRecording({fps:k,scale:H,audioSource:G,bitrate:D>0?D:void 0,maxDurationSeconds:_})?(V(!0),c(o("header.recordingStarted","Recording started"))):c(o("header.recordingStartFailed","Failed to start recording"))}catch{c(o("header.recordingError","Error during screen recording")),V(!1)}},[s,k,H,D,_,G,d,o]),j=A(()=>{l.current||(a("light"),B?.(!1),C(!0))},[B,C]),ae=A(()=>{l.current||(a("light"),B?.(!1),C(!1))},[B,C]),se=e=>{const t=Math.floor(e/60),m=e%60;return`${t}:${m<10?"0":""}${m}`};return<>
|
|
2
2
|
|
|
3
|
-
{Y?<
|
|
3
|
+
{Y?<z.View style={[r.playerContainer,{transform:n.getTranslateTransform()}]}{...ie.panHandlers}>
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<Re colors={[i.indigo600,i.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={r.gradientBg}pointerEvents="none"/>
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<Se activeOpacity={.75}onPress={q}style={t.brandSection}accessibilityRole="button"accessibilityLabel={o("mediaGallery.expand","Expand Inspector")}>
|
|
16
|
-
<Ce size={36}customIcon={J}/>
|
|
17
|
-
<S style={t.titleWrapper}>
|
|
18
|
-
<A style={t.appTitle}numberOfLines={1}>
|
|
19
|
-
{Ee()}
|
|
20
|
-
</A>
|
|
21
|
-
<S style={t.versionRow}>
|
|
8
|
+
<Se activeOpacity={.75}onPress={j}style={r.brandSection}accessibilityRole="button"accessibilityLabel={o("mediaGallery.expand","Expand Inspector")}>
|
|
9
|
+
<U size={36}customIcon={F}shape="circle"/>
|
|
10
|
+
<S style={r.titleWrapper}>
|
|
11
|
+
<P style={r.appTitle}numberOfLines={1}>
|
|
12
|
+
{Me()}
|
|
13
|
+
</P>
|
|
14
|
+
<S style={r.versionRow}>
|
|
22
15
|
|
|
23
|
-
<S style={
|
|
24
|
-
{
|
|
25
|
-
<
|
|
16
|
+
<S style={r.versionChip}>
|
|
17
|
+
{q.OS==="ios"?<Te color={`${i.white}E6`}size={9}/>:<Ce color={`${i.white}E6`}size={9}/>}
|
|
18
|
+
<P style={r.versionChipText}numberOfLines={1}>
|
|
26
19
|
{te}
|
|
27
|
-
</
|
|
20
|
+
</P>
|
|
28
21
|
</S>
|
|
29
22
|
|
|
30
23
|
|
|
31
|
-
<S style={
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
v{
|
|
35
|
-
</
|
|
24
|
+
<S style={r.versionChip}>
|
|
25
|
+
<Be size={9}color={i.npmRedLight}/>
|
|
26
|
+
<P style={r.versionChipText}numberOfLines={1}>
|
|
27
|
+
v{$e}
|
|
28
|
+
</P>
|
|
36
29
|
</S>
|
|
37
30
|
</S>
|
|
38
31
|
</S>
|
|
39
32
|
</Se>
|
|
40
33
|
|
|
41
34
|
|
|
42
|
-
<S style={
|
|
35
|
+
<S style={r.actionsRow}>
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
<
|
|
37
|
+
<R onPress={oe}hitSlop={{top:6,bottom:6,left:4,right:4}}style={r.actionBtn}>
|
|
38
|
+
<Ie size={12}color={i.white}/>
|
|
39
|
+
<P style={r.actionText}>
|
|
47
40
|
{o("header.photo","Photo")}
|
|
48
|
-
</
|
|
49
|
-
|
|
41
|
+
</P>
|
|
42
|
+
</R>
|
|
50
43
|
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
<
|
|
55
|
-
{
|
|
56
|
-
</
|
|
57
|
-
|
|
45
|
+
<R onPress={ne}hitSlop={{top:6,bottom:6,left:4,right:4}}style={[r.actionBtn,s&&r.recordingBtnActive]}>
|
|
46
|
+
{s?<S style={r.recordingDot}/>:<Ve size={12}color={i.white}/>}
|
|
47
|
+
<P style={[r.actionText,s&&{color:i.red300}]}>
|
|
48
|
+
{s?`${o("header.rec","REC")} ${se(re)}`:o("header.record","Record")}
|
|
49
|
+
</P>
|
|
50
|
+
</R>
|
|
58
51
|
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
53
|
+
<R onPress={j}hitSlop={{top:6,bottom:6,left:4,right:4}}accessibilityRole="button"accessibilityLabel={o("common.expand","Expand")}style={r.actionBtnSquare}>
|
|
54
|
+
<Pe size={12}color={i.white}/>
|
|
55
|
+
</R>
|
|
63
56
|
|
|
64
57
|
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
58
|
+
<R onPress={ae}hitSlop={{top:6,bottom:6,left:4,right:6}}accessibilityRole="button"accessibilityLabel={o("common.close","Close")}style={r.actionBtnSquare}>
|
|
59
|
+
<X size={10}color={i.white}/>
|
|
60
|
+
</R>
|
|
68
61
|
</S>
|
|
69
|
-
</
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</v.View>}
|
|
62
|
+
</z.View>:<z.View style={[W.fabWrapper,{transform:K.getTranslateTransform()}]}{...Q.panHandlers}>
|
|
63
|
+
<R style={{alignItems:"center",justifyContent:"center"}}onPress={()=>{Z.current||(a("light"),C(!0))}}hitSlop={10}>
|
|
64
|
+
<z.View style={[W.fabPulseRing,{transform:[{scale:ee}]}]}/>
|
|
65
|
+
<U size={68}customIcon={F}shape="circle"/>
|
|
66
|
+
</R>
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<R accessible={!0}accessibilityRole="button"accessibilityLabel={o("common.close","Close")}onPress={()=>{a("medium"),J(),c(o("common.inspectorDismissed","In-App Inspector closed for this session"))}}hitSlop={8}style={W.fabCloseBadge}>
|
|
70
|
+
<X size={9.5}/>
|
|
71
|
+
</R>
|
|
72
|
+
</z.View>}
|
|
81
73
|
|
|
82
74
|
|
|
83
|
-
<
|
|
84
|
-
</>},
|
|
75
|
+
<Le item={N}visible={!!N}onClose={()=>T(null)}onDelete={async e=>{await v.deleteMedia(e.uri),d?.().catch(()=>{}),T(null)}}onConvertToGif={async e=>{const t=await v.convertToGif(e.uri,{fps:12,width:480});t&&(d?.().catch(()=>{}),T({id:`anim_${t.timestamp}.gif`,type:"gif",format:"gif",uri:t.uri,filename:t.uri.split("/").pop()||`anim_${t.timestamp}.gif`,sizeBytes:t.sizeBytes,timestamp:t.timestamp,durationMs:t.durationMs}))}}/>
|
|
76
|
+
</>},r=le.create({playerContainer:{position:"absolute",bottom:q.OS==="ios"?34:18,left:12,right:12,minHeight:58,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderRadius:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.28)",paddingHorizontal:12,paddingVertical:7,gap:8,zIndex:99999,elevation:25,shadowColor:i.indigo600,shadowOffset:{width:0,height:8},shadowOpacity:.45,shadowRadius:14,overflow:"hidden"},gradientBg:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:16},playerShineClip:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:16,overflow:"hidden"},playerShineStreak:{position:"absolute",top:-60,width:75,height:200},brandSection:{flexDirection:"row",alignItems:"center",gap:9,flex:1,minWidth:0,paddingVertical:2},titleWrapper:{flex:1,minWidth:0,justifyContent:"center",gap:2},appTitle:{fontFamily:O.interBold,fontSize:13.5,color:i.white,letterSpacing:-.2},versionRow:{flexDirection:"row",alignItems:"center",gap:4,minWidth:0},versionChip:{flexDirection:"row",alignItems:"center",backgroundColor:`${i.white}1F`,borderRadius:5,paddingHorizontal:5,paddingVertical:1.5,gap:3,borderWidth:1,borderColor:`${i.white}2E`,flexShrink:1,minWidth:0},versionChipText:{fontFamily:O.interMedium,fontSize:8.5,color:`${i.white}EB`,letterSpacing:.1},actionsRow:{flexDirection:"row",alignItems:"center",gap:4.5,flexShrink:0},actionBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:"rgba(255, 255, 255, 0.22)",paddingHorizontal:8,paddingVertical:5.5,borderRadius:7,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.32)"},actionBtnSquare:{alignItems:"center",justifyContent:"center",width:27,height:27,backgroundColor:"rgba(255, 255, 255, 0.22)",borderRadius:7,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.32)"},recordingBtnActive:{backgroundColor:"rgba(239, 68, 68, 0.32)",borderColor:i.red500},recordingDot:{width:6,height:6,borderRadius:3,backgroundColor:i.red500},actionText:{fontFamily:O.interSemiBold,fontSize:10.5,color:i.white}});export default Ee;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{useState as
|
|
1
|
+
import{useState as z}from"react";import{StyleSheet as R,Text as I,View as T,Pressable as S}from"react-native";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as C}from"../../styles/AppFonts";import{WarningTriangleIcon as B,ClearIcon as W}from"../NetworkIcons";import{t as A}from"../../i18n";export const FeatureUnderDevNotice=({featureName:w,compact:D=!1})=>{const[V,v]=z(!1);return V?null:<T style={[e.container,D&&e.containerCompact]}>
|
|
2
2
|
<T style={e.contentRow}>
|
|
3
3
|
<T style={e.badgeWrap}>
|
|
4
|
-
<
|
|
5
|
-
<I style={e.badgeText}>IN ACTIVE DEVELOPMENT</I>
|
|
4
|
+
<B color={t.warningIconGold}size={12}/>
|
|
5
|
+
<I style={e.badgeText}>{A("common.inActiveDevelopment","IN ACTIVE DEVELOPMENT")}</I>
|
|
6
6
|
</T>
|
|
7
7
|
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
</
|
|
8
|
+
<S onPress={()=>v(!0)}hitSlop={8}style={e.dismissBtn}accessible={!0}accessibilityRole="button"accessibilityLabel="Dismiss notice">
|
|
9
|
+
<W color={t.grayTextWeak}size={11}/>
|
|
10
|
+
</S>
|
|
11
11
|
</T>
|
|
12
12
|
|
|
13
13
|
<I style={e.messageText}>
|
|
@@ -15,4 +15,4 @@ import{useState as R}from"react";import{StyleSheet as S,Text as I,View as T,Pres
|
|
|
15
15
|
development. Results and metrics may vary in accuracy. We are continuously
|
|
16
16
|
improving this feature for upcoming releases.
|
|
17
17
|
</I>
|
|
18
|
-
</T>};const e=
|
|
18
|
+
</T>};const e=R.create({container:{marginHorizontal:12,marginTop:8,marginBottom:6,paddingHorizontal:12,paddingVertical:9,borderRadius:8,backgroundColor:`${t.warningIconGold}12`,borderWidth:1,borderColor:`${t.warningIconGold}30`},containerCompact:{marginTop:4,marginBottom:4,paddingVertical:7,paddingHorizontal:10},contentRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4},badgeWrap:{flexDirection:"row",alignItems:"center",gap:4.5},badgeText:{fontFamily:C.interBold,fontSize:9.5,color:t.warningIconGold,letterSpacing:.4},dismissBtn:{padding:2},messageText:{fontFamily:C.interRegular,fontSize:10.5,color:t.grayText,lineHeight:15}});export default FeatureUnderDevNotice;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CountryOption {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
flag: string;
|
|
6
|
+
badge?: string;
|
|
7
|
+
langCodes?: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const COUNTRY_OPTIONS: CountryOption[];
|
|
10
|
+
interface LanguageSelectorModalProps {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const LanguageSelectorModal: React.MemoExoticComponent<({ visible, onClose }: LanguageSelectorModalProps) => React.JSX.Element>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import U,{useState as L,useMemo as N}from"react";import{Modal as G,View as C,Text as S,TextInput as E,ScrollView as A,StyleSheet as B,Pressable as _,Platform as q,Dimensions as J}from"react-native";import R from"../TouchableScale";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import{GlobeIcon as K,CheckIcon as Y,CloseWhite as P}from"../NetworkIcons";import{useTranslation as Q,SUPPORTED_LANGUAGES as X,setLanguage as Z,getLanguage as ee}from"../../i18n";import{loadSettings as te,saveSettings as oe}from"../../helpers/settingsStore";import{triggerNativeHaptic as D}from"../../native/NativeInspector";import{showToast as re}from"../../helpers/toast";export const COUNTRY_OPTIONS=[{id:"all",name:"All",flag:"\u{1F310}",badge:"25"},{id:"in",name:"India",flag:"\u{1F1EE}\u{1F1F3}",badge:"38% Vol",langCodes:["hi","ta","te","kn","ml","bn","mr","gu","pa"]},{id:"us",name:"United States",flag:"\u{1F1FA}\u{1F1F8}",badge:"24% Vol",langCodes:["en","es"]},{id:"gb",name:"United Kingdom",flag:"\u{1F1EC}\u{1F1E7}",badge:"15% Vol",langCodes:["en"]},{id:"de",name:"Germany",flag:"\u{1F1E9}\u{1F1EA}",badge:"9% Vol",langCodes:["de"]},{id:"jp",name:"Japan",flag:"\u{1F1EF}\u{1F1F5}",badge:"6% Vol",langCodes:["ja"]},{id:"ca",name:"Canada",flag:"\u{1F1E8}\u{1F1E6}",badge:"5% Vol",langCodes:["en","fr"]},{id:"global",name:"Global / ROW",flag:"\u{1F310}",badge:"3% Vol",langCodes:["it","id","tr","vi","nl","pl","pt","ru","ar","zh","ko"]}],LanguageSelectorModal=U.memo(({visible:j,onClose:V})=>{const{t:k}=Q(),[w,z]=L(""),[x,H]=L("all"),M=ee(),v=t.primaryLight!==t.white,I=N(()=>COUNTRY_OPTIONS.find(o=>o.id===x)||COUNTRY_OPTIONS[0],[x]),W=N(()=>X.filter(o=>{if(x!=="all"&&I?.langCodes&&!I.langCodes.includes(o.code))return!1;if(!w.trim())return!0;const b=w.trim().toLowerCase();return o.name.toLowerCase().includes(b)||o.nativeName.toLowerCase().includes(b)||o.code.toLowerCase().includes(b)}),[w,x,I]),O=async(o,b,$)=>{D("light"),Z(o);try{const F=await te();oe({...F,language:o})}catch{}V(),z(""),re(`${b} ${$}`)};return<G visible={j}transparent={!0}animationType="slide"onRequestClose={V}>
|
|
2
|
+
<C style={e.overlay}>
|
|
3
|
+
|
|
4
|
+
<_ style={e.backdrop}onPress={V}accessibilityRole="button"accessibilityLabel="Close bottom sheet"/>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
<C style={[e.bottomSheet,{backgroundColor:v?t.npmDark:t.white}]}>
|
|
8
|
+
|
|
9
|
+
<C style={e.handleBarWrap}>
|
|
10
|
+
<C style={[e.handleBar,{backgroundColor:v?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.18)"}]}/>
|
|
11
|
+
</C>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<C style={e.header}>
|
|
15
|
+
<C style={e.headerTitleRow}>
|
|
16
|
+
<C style={e.globeIconWrap}>
|
|
17
|
+
<K size={16}color={t.blue600}/>
|
|
18
|
+
</C>
|
|
19
|
+
<C>
|
|
20
|
+
<S style={e.titleText}>
|
|
21
|
+
{k("settings.general.selectLanguage","Select Language")}
|
|
22
|
+
</S>
|
|
23
|
+
<S style={e.subTitleText}>
|
|
24
|
+
{k("settings.general.languageDescription","Choose preferred display language")}
|
|
25
|
+
</S>
|
|
26
|
+
</C>
|
|
27
|
+
</C>
|
|
28
|
+
<R onPress={V}hitSlop={10}style={e.closeBtn}>
|
|
29
|
+
<P size={12}color={t.grayText}/>
|
|
30
|
+
</R>
|
|
31
|
+
</C>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<C style={e.searchContainer}>
|
|
35
|
+
<E value={w}onChangeText={z}placeholder={k("common.search","Search language, country or code...")}placeholderTextColor={t.grayTextWeak}style={e.searchInput}autoCapitalize="none"autoCorrect={!1}clearButtonMode="while-editing"/>
|
|
36
|
+
{w.length>0&&<R onPress={()=>z("")}style={e.searchClearBtn}>
|
|
37
|
+
<P size={11}color={t.grayText}/>
|
|
38
|
+
</R>}
|
|
39
|
+
</C>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<C style={e.countryScrollWrap}>
|
|
43
|
+
<A horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.countryScrollContent}>
|
|
44
|
+
{COUNTRY_OPTIONS.map(o=>{const b=o.id===x;return<R key={o.id}onPress={()=>{D("light"),H(o.id)}}style={[e.countryChip,b&&e.countryChipActive]}>
|
|
45
|
+
<S style={e.countryChipFlag}>{o.flag}</S>
|
|
46
|
+
<S style={[e.countryChipText,b&&e.countryChipTextActive]}>
|
|
47
|
+
{o.name}
|
|
48
|
+
</S>
|
|
49
|
+
{o.badge&&<C style={[e.countryChipBadge,b&&e.countryChipBadgeActive]}>
|
|
50
|
+
<S style={[e.countryChipBadgeText,b&&e.countryChipBadgeTextActive]}>
|
|
51
|
+
{o.badge}
|
|
52
|
+
</S>
|
|
53
|
+
</C>}
|
|
54
|
+
</R>})}
|
|
55
|
+
</A>
|
|
56
|
+
</C>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<A style={e.scrollList}contentContainerStyle={e.scrollContent}showsVerticalScrollIndicator={!0}keyboardShouldPersistTaps="handled">
|
|
60
|
+
{W.length===0?<C style={e.emptyStateWrap}>
|
|
61
|
+
<S style={e.emptyStateText}>
|
|
62
|
+
{k("common.noMatches","No languages match your search")}
|
|
63
|
+
</S>
|
|
64
|
+
</C>:W.map(o=>{const b=o.code===M;return<R key={o.code}onPress={()=>O(o.code,o.flag,o.nativeName)}style={[e.langRow,b&&e.langRowSelected]}>
|
|
65
|
+
<C style={e.langRowLeft}>
|
|
66
|
+
<S style={e.langFlag}>{o.flag}</S>
|
|
67
|
+
<C style={e.langTextCol}>
|
|
68
|
+
<C style={e.langTitleRow}>
|
|
69
|
+
<S style={[e.langNativeName,b&&e.langNativeNameSelected]}>
|
|
70
|
+
{o.nativeName}
|
|
71
|
+
</S>
|
|
72
|
+
<C style={e.codePill}>
|
|
73
|
+
<S style={e.codePillText}>
|
|
74
|
+
{o.code.toUpperCase()}
|
|
75
|
+
</S>
|
|
76
|
+
</C>
|
|
77
|
+
</C>
|
|
78
|
+
<S style={e.langEnglishName}>
|
|
79
|
+
{o.name}
|
|
80
|
+
</S>
|
|
81
|
+
</C>
|
|
82
|
+
</C>
|
|
83
|
+
{b&&<C style={e.checkIconWrap}>
|
|
84
|
+
<Y size={13}color={t.white}/>
|
|
85
|
+
</C>}
|
|
86
|
+
</R>})}
|
|
87
|
+
</A>
|
|
88
|
+
</C>
|
|
89
|
+
</C>
|
|
90
|
+
</G>});const e=B.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.55)",justifyContent:"flex-end"},backdrop:{...B.absoluteFillObject},bottomSheet:{width:"100%",height:Math.min(Math.max(J.get("window").height*.7,480),580),borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:q.OS==="ios"?28:16,shadowColor:t.black,shadowOpacity:.25,shadowRadius:16,shadowOffset:{width:0,height:-4},elevation:12},handleBarWrap:{alignItems:"center",paddingVertical:6},handleBar:{width:38,height:4.5,borderRadius:2.5},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:10,borderBottomWidth:B.hairlineWidth,borderBottomColor:t.grayBorderSecondary},headerTitleRow:{flexDirection:"row",alignItems:"center",gap:10},globeIconWrap:{width:30,height:30,borderRadius:8,backgroundColor:`${t.blue600}14`,alignItems:"center",justifyContent:"center"},titleText:{fontFamily:T.interBold,fontSize:15,color:t.primaryBlack},subTitleText:{fontFamily:T.interRegular,fontSize:11,color:t.grayText,marginTop:1},closeBtn:{width:28,height:28,borderRadius:14,backgroundColor:t.grayBackground,alignItems:"center",justifyContent:"center"},closeBtnText:{fontFamily:T.interBold,fontSize:12,color:t.grayText},searchContainer:{flexDirection:"row",alignItems:"center",marginHorizontal:14,marginTop:10,marginBottom:6,paddingHorizontal:10,height:38,borderRadius:10,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.grayBorderSecondary},searchInput:{flex:1,height:"100%",fontSize:12.5,fontFamily:T.interRegular,color:t.primaryBlack,paddingVertical:0},searchClearBtn:{padding:4},searchClearText:{fontSize:12,color:t.grayText,fontFamily:T.interBold},countryScrollWrap:{borderBottomWidth:B.hairlineWidth,borderBottomColor:t.grayBorderSecondary,paddingVertical:6},countryScrollContent:{paddingHorizontal:14,gap:6,flexDirection:"row",alignItems:"center"},countryChip:{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:6,borderRadius:16,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.grayBorderSecondary,gap:5},countryChipActive:{backgroundColor:`${t.purple}14`,borderColor:`${t.purple}55`},countryChipFlag:{fontSize:13},countryChipText:{fontFamily:T.interMedium,fontSize:11.5,color:t.primaryBlack},countryChipTextActive:{fontFamily:T.interBold,color:t.purple},countryChipBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:8,backgroundColor:`${t.black}0A`},countryChipBadgeActive:{backgroundColor:`${t.purple}22`},countryChipBadgeText:{fontFamily:T.interSemiBold,fontSize:9.5,color:t.grayText},countryChipBadgeTextActive:{color:t.purple,fontFamily:T.interBold},scrollList:{flex:1},scrollContent:{paddingBottom:16},emptyStateWrap:{padding:30,alignItems:"center",justifyContent:"center"},emptyStateText:{fontFamily:T.interRegular,fontSize:12.5,color:t.grayText},langRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:12,borderBottomWidth:B.hairlineWidth,borderBottomColor:t.grayBorderSecondary},langRowSelected:{backgroundColor:`${t.purple}10`},langRowLeft:{flexDirection:"row",alignItems:"center",gap:12,flex:1},langFlag:{fontSize:20},langTextCol:{flex:1},langTitleRow:{flexDirection:"row",alignItems:"center",gap:6},langNativeName:{fontFamily:T.interSemiBold,fontSize:13.5,color:t.primaryBlack},langNativeNameSelected:{fontFamily:T.interBold,color:t.purple},codePill:{backgroundColor:`${t.purple}14`,paddingHorizontal:5,paddingVertical:1,borderRadius:4},codePillText:{fontSize:9.5,fontFamily:T.interBold,color:t.purple,letterSpacing:.5},langEnglishName:{fontFamily:T.interRegular,fontSize:11,color:t.grayText,marginTop:1},checkIconWrap:{width:22,height:22,borderRadius:11,backgroundColor:t.purple,alignItems:"center",justifyContent:"center"}});
|