react-native-inapp-inspector 2.3.25 → 2.4.1
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 +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +9 -6
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +18 -22
- package/dist/commonjs/components/Inspector/ConsoleTab.js +13 -16
- package/dist/commonjs/components/Inspector/CrashDetail.js +7 -6
- package/dist/commonjs/components/Inspector/CrashTab.js +23 -23
- package/dist/commonjs/components/Inspector/DebuggingTab.js +6 -6
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +77 -43
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +67 -29
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +18 -28
- package/dist/commonjs/components/Inspector/SettingsPanel.js +253 -105
- package/dist/commonjs/components/Inspector/StorageTab.js +40 -40
- package/dist/commonjs/components/Inspector/TabBar.js +9 -8
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +77 -90
- package/dist/commonjs/components/LogCard.js +9 -6
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +12 -8
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -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 +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/index.d.ts +5 -2
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/types/enums.d.ts +30 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +28 -25
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +36 -40
- package/dist/esm/components/Inspector/ConsoleTab.js +52 -55
- package/dist/esm/components/Inspector/CrashDetail.js +11 -10
- package/dist/esm/components/Inspector/CrashTab.js +23 -23
- package/dist/esm/components/Inspector/DebuggingTab.js +10 -10
- package/dist/esm/components/Inspector/DeviceInfoTab.js +208 -174
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +100 -62
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +136 -134
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +109 -119
- package/dist/esm/components/Inspector/SettingsPanel.js +406 -258
- package/dist/esm/components/Inspector/StorageTab.js +174 -174
- package/dist/esm/components/Inspector/TabBar.js +28 -27
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +101 -114
- package/dist/esm/components/LogCard.js +25 -22
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/memoryManager.d.ts +2 -1
- package/dist/esm/helpers/memoryManager.js +1 -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 +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/types/enums.d.ts +30 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -10
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import{useCallback as
|
|
1
|
+
import{useCallback as W,useEffect as H,useRef as M,useState as k}from"react";import{Animated as v,PanResponder as le,Platform as X,StyleSheet as ce,Text as A,TouchableOpacity as Se,useWindowDimensions as xe,View as S}from"react-native";import _ from"react-native-linear-gradient";import{useInspector as Re}from"./InspectorContext";import $ from"../TouchableScale";import Ce from"../AppHeaderLogo";import Te from"../BrandCircleIcon";import{AndroidIcon as Ie,AppleIcon as Ve,CameraIcon as Pe,CloseWhite as Be,MaximizeIcon as Me,NpmIcon as Ae,VideoCameraIcon as $e}from"../NetworkIcons";import{ScreenCapture as z}from"../../capture";import{triggerNativeHaptic as x}from"../../native/NativeInspector";import{showToast as C}from"../../helpers/toast";import{getAppName as Ee,getAppVersionAndBuild as Le}from"../../helpers";import{LIB_VERSION as Oe}from"../../constants";import{AppColors as i}from"../../styles/AppColors";import{AppFonts as G}from"../../styles/AppFonts";import D from"../../styles";import{useTranslation as We}from"../../i18n";import{MediaPreviewModal as De}from"./MediaPreviewModal";const Fe=()=>{const{setVisible:P,isMinimized:Y,setIsMinimized:E,appIcon:J,fabPan:K,fabPanResponder:Q,fabDraggedRef:U,pulseAnim:Z,fabShineAnim:N,refreshMediaCount:T}=Re(),{width:ee}=xe(),{t:o}=We(),[te]=k(()=>Le().formatted),[a,L]=k(!1),[re,F]=k(0),I=M(null),[j,B]=k(null),n=M(new v.ValueXY({x:0,y:0})).current,O=M({x:0,y:0});H(()=>{const e=n.x.addListener(V=>O.current.x=V.value),r=n.y.addListener(V=>O.current.y=V.value);return()=>{n.x.removeListener(e),n.y.removeListener(r)}},[n]);const R=M(!1),ie=M(le.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,r)=>Math.abs(r.dx)>4||Math.abs(r.dy)>4,onPanResponderGrant:()=>{R.current=!0,n.setOffset({x:O.current.x,y:O.current.y}),n.setValue({x:0,y:0})},onPanResponderMove:v.event([null,{dx:n.x,dy:n.y}],{useNativeDriver:!1}),onPanResponderRelease:()=>{n.flattenOffset(),setTimeout(()=>{R.current=!1},50)},onPanResponderTerminate:()=>{n.flattenOffset(),R.current=!1}})).current;H(()=>{z.isRecording().then(e=>{L(!!e)}).catch(()=>{})},[]),H(()=>(a?(F(0),I.current=setInterval(()=>{F(e=>e+1)},1e3)):(I.current&&(clearInterval(I.current),I.current=null),F(0)),()=>{I.current&&clearInterval(I.current)}),[a]);const oe=W(async()=>{if(!R.current)try{x("light");const e=await z.takeScreenshot({format:"png",quality:.9,hideInspector:!0});if(e){x("success");const r={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};B(r),T?.().catch(()=>{}),C(o("header.screenshotCaptured","Screenshot captured"))}else C(o("header.screenshotFailed","Failed to capture screenshot"))}catch{C(o("header.screenshotError","Error capturing screenshot"))}},[T,o]),ne=W(async()=>{if(!R.current)try{if(a){x("medium");const e=await z.stopRecording();if(L(!1),e){x("success");const r={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};B(r),T?.().catch(()=>{}),C(o("header.recordingSaved",{duration:(e.durationMs/1e3).toFixed(1),defaultValue:`Recording saved (${(e.durationMs/1e3).toFixed(1)}s)`}))}}else x("medium"),await z.startRecording({fps:24,audioSource:"none"})?(L(!0),C(o("header.recordingStarted","Recording started"))):C(o("header.recordingStartFailed","Failed to start recording"))}catch{C(o("header.recordingError","Error during screen recording")),L(!1)}},[a,T,o]),q=W(()=>{R.current||(x("light"),E?.(!1),P(!0))},[E,P]),ae=W(()=>{R.current||(x("light"),E?.(!1),P(!1))},[E,P]),se=e=>{const r=Math.floor(e/60),V=e%60;return`${r}:${V<10?"0":""}${V}`};return<>
|
|
2
2
|
|
|
3
|
-
{
|
|
3
|
+
{Y?<v.View style={[t.playerContainer,{transform:n.getTranslateTransform()}]}{...ie.panHandlers}>
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<_ colors={[i.indigo600,i.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={t.gradientBg}pointerEvents="none"/>
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
<S pointerEvents="none"style={t.playerShineClip}>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
</
|
|
9
|
+
<v.View style={[t.playerShineStreak,{transform:[{translateX:N.interpolate({inputRange:[0,1],outputRange:[-80,ee+80]})},{rotate:"28deg"}]}]}>
|
|
10
|
+
<_ colors={["rgba(255, 255, 255, 0)","rgba(255, 255, 255, 0.18)","rgba(255, 255, 255, 0.70)","rgba(255, 255, 255, 1)","rgba(255, 255, 255, 0.70)","rgba(255, 255, 255, 0.18)","rgba(255, 255, 255, 0)"]}locations={[0,.22,.44,.5,.56,.78,1]}start={{x:0,y:.5}}end={{x:1,y:.5}}style={{flex:1}}/>
|
|
11
|
+
</v.View>
|
|
12
12
|
</S>
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
<Se activeOpacity={.75}onPress={
|
|
16
|
-
<Ce size={36}customIcon={
|
|
15
|
+
<Se activeOpacity={.75}onPress={q}style={t.brandSection}accessibilityRole="button"accessibilityLabel={o("mediaGallery.expand","Expand Inspector")}>
|
|
16
|
+
<Ce size={36}customIcon={J}/>
|
|
17
17
|
<S style={t.titleWrapper}>
|
|
18
|
-
<
|
|
18
|
+
<A style={t.appTitle}numberOfLines={1}>
|
|
19
19
|
{Ee()}
|
|
20
|
-
</
|
|
20
|
+
</A>
|
|
21
21
|
<S style={t.versionRow}>
|
|
22
22
|
|
|
23
23
|
<S style={t.versionChip}>
|
|
24
|
-
{
|
|
25
|
-
<
|
|
26
|
-
{
|
|
27
|
-
</
|
|
24
|
+
{X.OS==="ios"?<Ve color={`${i.white}E6`}size={9}/>:<Ie color={`${i.white}E6`}size={9}/>}
|
|
25
|
+
<A style={t.versionChipText}numberOfLines={1}>
|
|
26
|
+
{te}
|
|
27
|
+
</A>
|
|
28
28
|
</S>
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
<S style={t.versionChip}>
|
|
32
32
|
<Ae size={9}color={i.npmRedLight}/>
|
|
33
|
-
<
|
|
34
|
-
v{
|
|
35
|
-
</
|
|
33
|
+
<A style={t.versionChipText}numberOfLines={1}>
|
|
34
|
+
v{Oe}
|
|
35
|
+
</A>
|
|
36
36
|
</S>
|
|
37
37
|
</S>
|
|
38
38
|
</S>
|
|
@@ -41,45 +41,44 @@ import{useCallback as O,useEffect as F,useRef as B,useState as W}from"react";imp
|
|
|
41
41
|
|
|
42
42
|
<S style={t.actionsRow}>
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
<$ onPress={oe}hitSlop={{top:6,bottom:6,left:4,right:4}}style={t.actionBtn}>
|
|
45
45
|
<Pe size={12}color={i.white}/>
|
|
46
|
-
<
|
|
46
|
+
<A style={t.actionText}>
|
|
47
47
|
{o("header.photo","Photo")}
|
|
48
|
-
</
|
|
49
|
-
|
|
48
|
+
</A>
|
|
49
|
+
</$>
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
<$ onPress={ne}hitSlop={{top:6,bottom:6,left:4,right:4}}style={[t.actionBtn,a&&t.recordingBtnActive]}>
|
|
53
53
|
{a?<S style={t.recordingDot}/>:<$e size={12}color={i.white}/>}
|
|
54
|
-
<
|
|
55
|
-
{a?`${o("header.rec","REC")} ${
|
|
56
|
-
</
|
|
57
|
-
|
|
54
|
+
<A style={[t.actionText,a&&{color:i.red300}]}>
|
|
55
|
+
{a?`${o("header.rec","REC")} ${se(re)}`:o("header.record","Record")}
|
|
56
|
+
</A>
|
|
57
|
+
</$>
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
<$ onPress={q}hitSlop={{top:6,bottom:6,left:4,right:4}}accessibilityRole="button"accessibilityLabel={o("common.expand","Expand")}style={t.actionBtnSquare}>
|
|
61
61
|
<Me size={12}color={i.white}/>
|
|
62
|
-
|
|
62
|
+
</$>
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
<$ onPress={ae}hitSlop={{top:6,bottom:6,left:4,right:6}}accessibilityRole="button"accessibilityLabel={o("common.close","Close")}style={t.actionBtnSquare}>
|
|
66
66
|
<Be size={10}color={i.white}/>
|
|
67
|
-
|
|
67
|
+
</$>
|
|
68
68
|
</S>
|
|
69
|
-
</
|
|
70
|
-
|
|
71
|
-
<
|
|
69
|
+
</v.View>:<v.View style={[D.fabWrapper,{transform:K.getTranslateTransform()}]}{...Q.panHandlers}>
|
|
70
|
+
<$ style={{alignItems:"center",justifyContent:"center"}}onPress={()=>{U.current||(x("light"),P(!0))}}hitSlop={10}>
|
|
71
|
+
<v.View style={[D.fabPulseRing,{transform:[{scale:Z}]}]}/>
|
|
72
72
|
<Te size={62}/>
|
|
73
73
|
|
|
74
|
-
<S pointerEvents="none"style={
|
|
75
|
-
<
|
|
76
|
-
<
|
|
77
|
-
</
|
|
74
|
+
<S pointerEvents="none"style={D.fabShineClip}>
|
|
75
|
+
<v.View style={[D.fabShineStreak,{transform:[{translateX:N.interpolate({inputRange:[0,1],outputRange:[-48,96]})},{rotate:"25deg"}]}]}>
|
|
76
|
+
<_ colors={["rgba(255, 255, 255, 0)","rgba(255, 255, 255, 0.25)","rgba(255, 255, 255, 0.95)","rgba(255, 255, 255, 0.25)","rgba(255, 255, 255, 0)"]}locations={[0,.25,.5,.75,1]}start={{x:0,y:.5}}end={{x:1,y:.5}}style={{flex:1}}/>
|
|
77
|
+
</v.View>
|
|
78
78
|
</S>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</s.View>}
|
|
79
|
+
</$>
|
|
80
|
+
</v.View>}
|
|
82
81
|
|
|
83
82
|
|
|
84
|
-
<
|
|
85
|
-
</>},t=
|
|
83
|
+
<De item={j}visible={!!j}onClose={()=>B(null)}onDelete={async e=>{await z.deleteMedia(e.uri),T?.().catch(()=>{}),B(null)}}onConvertToGif={async e=>{const r=await z.convertToGif(e.uri,{fps:12,width:480});r&&(T?.().catch(()=>{}),B({id:`anim_${r.timestamp}.gif`,type:"gif",format:"gif",uri:r.uri,filename:r.uri.split("/").pop()||`anim_${r.timestamp}.gif`,sizeBytes:r.sizeBytes,timestamp:r.timestamp,durationMs:r.durationMs}))}}/>
|
|
84
|
+
</>},t=ce.create({playerContainer:{position:"absolute",bottom:X.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:G.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:G.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:G.interSemiBold,fontSize:10.5,color:i.white}});export default Fe;
|