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 _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert as ze,Platform as tt,Pressable as U,ScrollView as Z,StyleSheet as rt,Text as C,TextInput as Tt,ToastAndroid as Oe,TouchableOpacity as Ne,View as T}from"react-native";import{useTranslation as ht}from"../../i18n";import{useInspector as wt}from"./InspectorContext";import He from"../SegmentedTabs";import K from"../JsonViewer";import Me from"../DiffViewer";import Ee from"../CopyButton";import Ct from"../ShareButton";import St from"../TouchableScale";import Bt from"../HighlightText";import Vt from"../AnimatedEntrance";import{getActionHistory as zt}from"../../customHooks/reduxLogger";import{getSize as q,openInVSCode as _,parseStackLine as je}from"../../helpers";import{shareReduxReport as It}from"../../helpers/shareFormatter";import{getCustomStorage as $e}from"../../helpers/settingsStore";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{TerminalIcon as Je,SearchIcon as Pt,ClearIcon as Wt,ClockIcon as Ie,LayersIcon as Ge,TrashIcon as Ue,ForwardChevronIcon as Rt,LiveStateIcon as Ke,TimelineIcon as Te,StorageIcon as Ce,MetadataIcon as Ft,BoltIcon as Pe,AtomIcon as Dt,ScreenIcon as At,ListenerIcon as Lt,DocIcon as We,ExternalLinkIcon as Se,CodeBracketsIcon as Ot}from"../NetworkIcons";const qe=
|
|
1
|
+
import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert as ze,Platform as tt,Pressable as U,ScrollView as Z,StyleSheet as rt,Text as C,TextInput as Tt,ToastAndroid as Oe,TouchableOpacity as Ne,View as T}from"react-native";import{useTranslation as ht}from"../../i18n";import{useInspector as wt}from"./InspectorContext";import He from"../SegmentedTabs";import K from"../JsonViewer";import Me from"../DiffViewer";import Ee from"../CopyButton";import Ct from"../ShareButton";import St from"../TouchableScale";import Bt from"../HighlightText";import Vt from"../AnimatedEntrance";import{getActionHistory as zt}from"../../customHooks/reduxLogger";import{getSize as q,openInVSCode as _,parseStackLine as je}from"../../helpers";import{shareReduxReport as It}from"../../helpers/shareFormatter";import{getCustomStorage as $e}from"../../helpers/settingsStore";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{TerminalIcon as Je,SearchIcon as Pt,ClearIcon as Wt,ClockIcon as Ie,LayersIcon as Ge,TrashIcon as Ue,ForwardChevronIcon as Rt,LiveStateIcon as Ke,TimelineIcon as Te,StorageIcon as Ce,MetadataIcon as Ft,BoltIcon as Pe,AtomIcon as Dt,ScreenIcon as At,ListenerIcon as Lt,DocIcon as We,ExternalLinkIcon as Se,CodeBracketsIcon as Ot}from"../NetworkIcons";const qe=V=>{switch(V){case"saga":return{label:"SAGA",renderIcon:(D,F=9)=><Dt color={D}size={F}/>,bg:e.purple100,text:e.brandPurple,border:e.purple200};case"thunk":return{label:"THUNK",renderIcon:(D,F=9)=><Pe color={D}size={F}/>,bg:e.amber100,text:e.amber800Warm,border:e.amber200};case"epic":return{label:"EPIC",renderIcon:(D,F=9)=><Je color={D}size={F}/>,bg:e.sky100,text:e.sky600,border:e.sky400};case"listener":return{label:"LISTENER",renderIcon:(D,F=9)=><Lt color={D}size={F}/>,bg:e.teal100,text:e.teal700,border:e.teal400};case"component":return{label:"UI DISPATCH",renderIcon:(D,F=9)=><At color={D}size={F}/>,bg:e.sky100,text:e.sky600,border:e.sky400};default:return{label:"DISPATCH",renderIcon:(D,F=9)=><Pe color={D}size={F}/>,bg:e.slate100,text:e.slate700,border:e.slate200}}},Nt=_e.memo(()=>{const{t:V}=ht(),{reduxState:D,reduxLastActionMap:F,selectedReduxSlice:W,selectedReduxAction:z}=wt(),[A,Re]=E(""),[O,Fe]=E("live"),[Q,Qe]=E("payload"),[ve,De]=E("raw"),[Xe,Ye]=E(null),[J,G]=E(!1),[X,N]=E(null),ke=Ve(()=>zt(),[F]),j=Ve(()=>W?ke.filter(B=>!B.affectedSlices||B.affectedSlices.length===0?!0:B.affectedSlices.includes(W)):ke,[ke,W]),Ae=Ve(()=>{if(!A.trim())return j;const B=A.toLowerCase();return j.filter(R=>R.type.toLowerCase().includes(B)||R.callerFile&&R.callerFile.toLowerCase().includes(B)||R.payload&&JSON.stringify(R.payload).toLowerCase().includes(B))},[j,A]);et(()=>{if(!W)return;async function B(){try{const R=$e();if(!R){G(!1),N(null);return}let v=await R.getItem(`persist:${W}`);if(v){try{N(JSON.parse(v))}catch{N(v)}G(!0);return}let I=await R.getItem("persist:root");if(I){const S=JSON.parse(I);if(S&&S[W]!==void 0){const P=S[W];try{N(typeof P=="string"?JSON.parse(P):P)}catch{N(P)}G(!0);return}}}catch{}G(!1),N(null)}B()},[W]);const Le=()=>{W&&ze.alert(V("redux.clearPersistedTitle","Clear Persisted State"),V("redux.clearPersistedMessage",'Are you sure you want to delete persisted storage for slice "{{slice}}"?').replace("{{slice}}",W||""),[{text:V("common.cancel","Cancel"),style:"cancel"},{text:"Delete",style:"destructive",onPress:async()=>{try{const B=$e();if(!B)return;typeof B.removeItem=="function"?await B.removeItem(`persist:${W}`):await B.setItem(`persist:${W}`,""),G(!1),N(null),Fe("live"),tt.OS==="android"?Oe.show("Persisted state cleared",Oe.SHORT):ze.alert(V("redux.clearedPersisted","Persisted state has been cleared."))}catch{ze.alert(V("common.failed","Failed"),V("redux.clearPersistedError","Failed to clear persisted state."))}}}])};if(W!=null){const B=D?.[W],R=B&&typeof B=="object"?Object.keys(B).length:typeof B<"u"?1:0,v=F[W],I=[{key:"live",label:V("redux.liveState","Live State"),icon:S=><Ke color={S?e.white:e.grayText}size={12}/>},{key:"timeline",label:`${V("redux.timeline","Timeline")} (${j.length})`,icon:S=><Te color={S?e.white:e.grayText}size={12}/>},{key:"persisted",label:J?V("redux.persisted","Persisted"):V("redux.storage","Storage"),icon:S=><Ce color={S?e.white:e.grayText}size={12}/>},{key:"metadata",label:V("redux.metadata","Metadata"),icon:S=><Ft color={S?e.white:e.grayText}size={12}/>}];return<T style={{flex:1,backgroundColor:e.grayBackground}}>
|
|
2
2
|
|
|
3
3
|
<T style={t.infoBar}>
|
|
4
4
|
<T style={t.infoTopRow}>
|
|
5
5
|
<T style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap",flex:1,minWidth:0}}>
|
|
6
6
|
<T style={[t.methodBadge,{backgroundColor:e.indigo600Alt}]}>
|
|
7
7
|
<C style={t.methodBadgeText}>
|
|
8
|
-
{
|
|
8
|
+
{V("redux.slice","SLICE")}
|
|
9
9
|
</C>
|
|
10
10
|
</T>
|
|
11
11
|
<C style={t.sliceNameText}numberOfLines={1}>
|
|
@@ -14,23 +14,23 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
14
14
|
{J?<T style={t.persistedChip}>
|
|
15
15
|
<Ce color={e.emerald700}size={10}/>
|
|
16
16
|
<C style={t.persistedChipText}>
|
|
17
|
-
{
|
|
17
|
+
{V("redux.persisted","Persisted").toUpperCase()}
|
|
18
18
|
</C>
|
|
19
19
|
</T>:<T style={t.inMemoryChip}>
|
|
20
20
|
<C style={t.inMemoryChipText}>
|
|
21
|
-
{
|
|
21
|
+
{V("redux.inMemory","In-Memory").toUpperCase()}
|
|
22
22
|
</C>
|
|
23
23
|
</T>}
|
|
24
|
-
{
|
|
24
|
+
{v?.timestamp&&<T style={t.timePill}>
|
|
25
25
|
<Ie color={e.violet600}size={10}/>
|
|
26
26
|
<C style={t.timeText}>
|
|
27
|
-
{
|
|
27
|
+
{v.timestamp}
|
|
28
28
|
</C>
|
|
29
29
|
</T>}
|
|
30
30
|
</T>
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
<Ee value={()=>O==="live"?B:X}label={
|
|
33
|
+
<Ee value={()=>O==="live"?B:X}label={V("redux.sliceJson","Slice JSON")}/>
|
|
34
34
|
</T>
|
|
35
35
|
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
38
38
|
<T style={[t.statPill,{backgroundColor:e.indigo50,borderColor:e.indigo400}]}>
|
|
39
39
|
<Ge color={e.indigo600Alt}size={11}/>
|
|
40
40
|
<C style={[t.statLabel,{color:e.indigo600Alt}]}>
|
|
41
|
-
{
|
|
41
|
+
{V("redux.keys","Keys")}:
|
|
42
42
|
</C>
|
|
43
43
|
<C style={[t.statValue,{color:e.indigo600Alt}]}>
|
|
44
44
|
{R}
|
|
@@ -46,7 +46,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
46
46
|
</T>
|
|
47
47
|
<T style={[t.statPill,{backgroundColor:e.sky100,borderColor:e.sky400}]}>
|
|
48
48
|
<C style={[t.statLabel,{color:e.sky600}]}>
|
|
49
|
-
{
|
|
49
|
+
{V("redux.size","Size")}:
|
|
50
50
|
</C>
|
|
51
51
|
<C style={[t.statValue,{color:e.sky600}]}>
|
|
52
52
|
{q(B)}
|
|
@@ -55,25 +55,25 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
55
55
|
<T style={[t.statPill,{backgroundColor:e.purple100,borderColor:e.purple200}]}>
|
|
56
56
|
<Te color={e.violet600}size={11}/>
|
|
57
57
|
<C style={[t.statLabel,{color:e.brandPurple}]}>
|
|
58
|
-
{
|
|
58
|
+
{V("redux.timeline","Timeline")}:
|
|
59
59
|
</C>
|
|
60
60
|
<C style={[t.statValue,{color:e.brandPurple}]}>
|
|
61
61
|
{j.length}
|
|
62
62
|
</C>
|
|
63
63
|
</T>
|
|
64
|
-
{
|
|
64
|
+
{v&&<T style={[t.statPill,{backgroundColor:e.amber100,borderColor:e.amber200,flexShrink:1,maxWidth:160}]}>
|
|
65
65
|
<Pe color={e.amber800Warm}size={11}/>
|
|
66
66
|
<C style={[t.statLabel,{color:e.amber800Warm}]}>
|
|
67
|
-
{
|
|
67
|
+
{V("redux.last","Last")}:
|
|
68
68
|
</C>
|
|
69
69
|
<C style={[t.statValue,{color:e.amber800Warm,flexShrink:1}]}numberOfLines={1}>
|
|
70
|
-
{
|
|
70
|
+
{v.type}
|
|
71
71
|
</C>
|
|
72
72
|
</T>}
|
|
73
73
|
</T>
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
<He tabs={I}activeKey={O}onChange={S=>
|
|
76
|
+
<He tabs={I}activeKey={O}onChange={S=>Fe(S)}style={{marginTop:10}}/>
|
|
77
77
|
</T>
|
|
78
78
|
|
|
79
79
|
|
|
@@ -125,7 +125,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
125
125
|
<T style={{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0}}>
|
|
126
126
|
<We color={e.sky600}size={10}/>
|
|
127
127
|
<C style={{fontFamily:k.interMedium,fontSize:9.5,color:e.grayTextWeak}}>
|
|
128
|
-
{
|
|
128
|
+
{V("redux.triggeredFrom","Triggered From:")}
|
|
129
129
|
</C>
|
|
130
130
|
<C style={{fontFamily:k.interBold,fontSize:9.5,color:e.sky600}}numberOfLines={1}>
|
|
131
131
|
{Ze}:{S.callerLine||1}
|
|
@@ -135,7 +135,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
135
135
|
<U onPress={()=>_(S.callerFile,S.callerLine,S.callerCol)}hitSlop={8}style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.sky100,paddingHorizontal:5,paddingVertical:2,borderRadius:4}}>
|
|
136
136
|
<Se color={e.sky600}size={9}/>
|
|
137
137
|
<C style={{fontFamily:k.interBold,fontSize:8.5,color:e.sky600}}>
|
|
138
|
-
{
|
|
138
|
+
{V("redux.openInEditor","Open in Editor")}
|
|
139
139
|
</C>
|
|
140
140
|
</U>
|
|
141
141
|
</T>}
|
|
@@ -145,7 +145,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
145
145
|
|
|
146
146
|
{S.stack?<T style={{marginBottom:12}}>
|
|
147
147
|
<C style={t.expandedSectionTitle}>
|
|
148
|
-
{
|
|
148
|
+
{V("redux.callStack","Call Stack Trace")}:
|
|
149
149
|
</C>
|
|
150
150
|
<T style={{backgroundColor:e.grayBackground,borderRadius:8,padding:8,borderWidth:1,borderColor:e.dividerColor,gap:4}}>
|
|
151
151
|
{S.stack.split(`
|
|
@@ -167,18 +167,18 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
167
167
|
|
|
168
168
|
{S.payload!==void 0&&<T style={{marginBottom:12}}>
|
|
169
169
|
<C style={t.expandedSectionTitle}>
|
|
170
|
-
{
|
|
170
|
+
{V("redux.actionPayload","Action Payload:")}
|
|
171
171
|
</C>
|
|
172
172
|
<K data={S.payload}search={A}forceOpen={!0}wrap={!0}/>
|
|
173
173
|
</T>}
|
|
174
174
|
|
|
175
175
|
<C style={t.expandedSectionTitle}>
|
|
176
|
-
{
|
|
176
|
+
{V("redux.stateChangesDiff","State Changes (Diff):")}
|
|
177
177
|
</C>
|
|
178
178
|
<Me oldData={S.prevState?.[W]||{}}newData={S.nextState?.[W]||{}}forceOpen={!0}/>
|
|
179
179
|
</T>:<T style={t.collapsedPrompt}>
|
|
180
180
|
<C style={t.collapsedPromptText}>
|
|
181
|
-
{
|
|
181
|
+
{V("redux.tapToInspectAction","Tap to inspect action payload & diff changes")}
|
|
182
182
|
</C>
|
|
183
183
|
<Rt color={e.grayTextWeak}size={12}/>
|
|
184
184
|
</T>}
|
|
@@ -186,7 +186,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
186
186
|
</Vt>})}
|
|
187
187
|
</Z>:O==="metadata"?<Z style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
188
188
|
<T style={t.metadataCard}>
|
|
189
|
-
{[{label:"Slice Name",value:W},{label:"Root Keys Count",value:`${R} keys`},{label:"In-Memory State Size",value:q(B)},{label:"Persistence Status",value:J?`Persisted (${q(X)})`:"Not Persisted (In-Memory)"},{label:"Dispatched Actions History",value:`${j.length} recorded actions`},{label:"Last Dispatched Action",value:
|
|
189
|
+
{[{label:"Slice Name",value:W},{label:"Root Keys Count",value:`${R} keys`},{label:"In-Memory State Size",value:q(B)},{label:"Persistence Status",value:J?`Persisted (${q(X)})`:"Not Persisted (In-Memory)"},{label:"Dispatched Actions History",value:`${j.length} recorded actions`},{label:"Last Dispatched Action",value:v?v.type:"None"},{label:"Last Action Timestamp",value:v?v.timestamp:"Initial"}].map((S,P)=><T key={P}style={[t.metaRow,P===6&&{borderBottomWidth:0}]}>
|
|
190
190
|
<C style={t.metaLabel}>{S.label}</C>
|
|
191
191
|
<C style={t.metaValue}selectable numberOfLines={2}>
|
|
192
192
|
{S.value}
|
|
@@ -219,7 +219,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
219
219
|
</T>
|
|
220
220
|
</T>
|
|
221
221
|
<T style={{flex:1,marginTop:8}}>
|
|
222
|
-
<K data={X}search={A}forceOpen={A.length>0?!0:void 0}mode={
|
|
222
|
+
<K data={X}search={A}forceOpen={A.length>0?!0:void 0}mode={ve}onModeChange={De}fullHeight={!0}wrap={!0}/>
|
|
223
223
|
</T>
|
|
224
224
|
</T>:<T style={t.emptyBox}>
|
|
225
225
|
<Ce color={e.grayTextWeak}size={32}/>
|
|
@@ -232,16 +232,16 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
232
232
|
</C>
|
|
233
233
|
</T>}
|
|
234
234
|
</T>:<T style={{flex:1,padding:10}}>
|
|
235
|
-
<K data={B}search={A}forceOpen={A.length>0?!0:void 0}mode={
|
|
235
|
+
<K data={B}search={A}forceOpen={A.length>0?!0:void 0}mode={ve}onModeChange={De}fullHeight={!0}wrap={!0}/>
|
|
236
236
|
</T>}
|
|
237
|
-
</T>}if(
|
|
237
|
+
</T>}if(z!=null){const B=qe(z.originType),R=z.callerFile?z.callerFile.split("/").pop():null,v=[{key:"payload",label:V("redux.payload","Payload"),icon:I=><Ot color={I?e.white:e.grayText}size={12}/>},{key:"diff",label:V("redux.diff","State Diff"),icon:I=><Te color={I?e.white:e.grayText}size={12}/>},{key:"stack",label:V("redux.callStack","Call Stack"),icon:I=><We color={I?e.white:e.grayText}size={12}/>},{key:"raw",label:"Raw Action",icon:I=><Ke color={I?e.white:e.grayText}size={12}/>}];return<T style={{flex:1,backgroundColor:e.grayBackground}}>
|
|
238
238
|
|
|
239
239
|
<T style={t.infoBar}>
|
|
240
240
|
<T style={t.infoTopRow}>
|
|
241
241
|
<T style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap",flex:1,minWidth:0}}>
|
|
242
242
|
<T style={t.actionBadge}>
|
|
243
243
|
<C style={t.actionBadgeText}>
|
|
244
|
-
#{
|
|
244
|
+
#{z.id}
|
|
245
245
|
</C>
|
|
246
246
|
</T>
|
|
247
247
|
|
|
@@ -252,32 +252,32 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
252
252
|
</C>
|
|
253
253
|
</T>
|
|
254
254
|
<C style={t.sliceNameText}numberOfLines={1}>
|
|
255
|
-
{
|
|
255
|
+
{z.type}
|
|
256
256
|
</C>
|
|
257
|
-
{
|
|
257
|
+
{z.timestamp&&<T style={t.timePill}>
|
|
258
258
|
<Ie color={e.purple}size={10}/>
|
|
259
259
|
<C style={t.timeText}>
|
|
260
|
-
{
|
|
260
|
+
{z.timestamp}
|
|
261
261
|
</C>
|
|
262
262
|
</T>}
|
|
263
263
|
</T>
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
<T style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
267
|
-
<Ct onShare={()=>It(
|
|
268
|
-
<Ee value={()=>
|
|
267
|
+
<Ct onShare={()=>It(z)}/>
|
|
268
|
+
<Ee value={()=>z}label="Copy Action"/>
|
|
269
269
|
</T>
|
|
270
270
|
</T>
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
<T style={t.subStatsRow}>
|
|
274
|
-
{
|
|
274
|
+
{z.affectedSlices&&z.affectedSlices.length>0&&<T style={[t.statPill,{backgroundColor:e.indigo50,borderColor:e.indigo400}]}>
|
|
275
275
|
<Ge color={e.indigo600Alt}size={11}/>
|
|
276
276
|
<C style={[t.statLabel,{color:e.indigo600Alt}]}>
|
|
277
277
|
Slices:
|
|
278
278
|
</C>
|
|
279
279
|
<C style={[t.statValue,{color:e.indigo600Alt}]}>
|
|
280
|
-
{
|
|
280
|
+
{z.affectedSlices.join(", ")}
|
|
281
281
|
</C>
|
|
282
282
|
</T>}
|
|
283
283
|
<T style={[t.statPill,{backgroundColor:e.sky100,borderColor:e.sky400}]}>
|
|
@@ -285,24 +285,24 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
285
285
|
Payload Size:
|
|
286
286
|
</C>
|
|
287
287
|
<C style={[t.statValue,{color:e.sky600}]}>
|
|
288
|
-
{q(
|
|
288
|
+
{q(z.payload)}
|
|
289
289
|
</C>
|
|
290
290
|
</T>
|
|
291
291
|
</T>
|
|
292
292
|
|
|
293
293
|
|
|
294
|
-
{
|
|
294
|
+
{z.callerFile&&<T style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:8,paddingHorizontal:8,paddingVertical:4,backgroundColor:e.grayBackground,borderRadius:6,borderWidth:1,borderColor:e.dividerColor}}>
|
|
295
295
|
<T style={{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0}}>
|
|
296
296
|
<We color={e.sky600}size={10}/>
|
|
297
297
|
<C style={{fontFamily:k.interMedium,fontSize:9.5,color:e.grayTextWeak}}>
|
|
298
298
|
Triggered from:
|
|
299
299
|
</C>
|
|
300
300
|
<C style={{fontFamily:k.interBold,fontSize:9.5,color:e.sky600}}numberOfLines={1}>
|
|
301
|
-
{R}:{
|
|
301
|
+
{R}:{z.callerLine||1}
|
|
302
302
|
</C>
|
|
303
303
|
</T>
|
|
304
304
|
|
|
305
|
-
<U onPress={()=>_(
|
|
305
|
+
<U onPress={()=>_(z.callerFile,z.callerLine,z.callerCol)}hitSlop={8}style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.sky100,paddingHorizontal:5,paddingVertical:2,borderRadius:4}}>
|
|
306
306
|
<Se color={e.sky600}size={9}/>
|
|
307
307
|
<C style={{fontFamily:k.interBold,fontSize:8.5,color:e.sky600}}>
|
|
308
308
|
Open in Editor
|
|
@@ -311,24 +311,24 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
311
311
|
</T>}
|
|
312
312
|
|
|
313
313
|
|
|
314
|
-
<He tabs={
|
|
314
|
+
<He tabs={v}activeKey={Q}onChange={I=>Qe(I)}style={{marginTop:10}}/>
|
|
315
315
|
</T>
|
|
316
316
|
|
|
317
317
|
|
|
318
318
|
{Q==="payload"?<T style={{flex:1,padding:10}}>
|
|
319
|
-
{
|
|
319
|
+
{z.payload!==void 0?<K data={z.payload}search={A}forceOpen={!0}fullHeight={!0}wrap={!0}/>:<T style={t.emptyBox}>
|
|
320
320
|
<C style={t.emptyBoxText}>
|
|
321
321
|
This action has no payload dispatched.
|
|
322
322
|
</C>
|
|
323
323
|
</T>}
|
|
324
324
|
</T>:Q==="diff"?<Z style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
325
|
-
<Me oldData={
|
|
325
|
+
<Me oldData={z.prevState||{}}newData={z.nextState||{}}forceOpen={!0}/>
|
|
326
326
|
</Z>:Q==="stack"?<Z style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
327
|
-
{
|
|
327
|
+
{z.stack?<T style={{backgroundColor:e.white,borderRadius:10,padding:10,borderWidth:1,borderColor:e.dividerColor}}>
|
|
328
328
|
<C style={t.expandedSectionTitle}>
|
|
329
329
|
Dispatched from call stack:
|
|
330
330
|
</C>
|
|
331
|
-
{
|
|
331
|
+
{z.stack.split(`
|
|
332
332
|
`).map(I=>I.trim()).filter(I=>I.length>0&&!I.includes("reduxLogger")&&!I.includes("inspectorReduxMiddleware")).map((I,S)=>{const P=je(I,S===0),H=P.frameType==="app";return<U key={S}onPress={()=>{P.fileName!=="Unknown"&&_(P.fullPath||P.fileName,P.lineNumber,P.columnNumber)}}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:5,borderBottomWidth:.5,borderBottomColor:e.dividerColor}}>
|
|
333
333
|
<T style={{flex:1,minWidth:0}}>
|
|
334
334
|
<C style={{fontFamily:H?k.interBold:k.interRegular,fontSize:10.5,color:H?e.primaryBlack:e.grayTextWeak}}numberOfLines={1}>
|
|
@@ -347,7 +347,7 @@ import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert
|
|
|
347
347
|
</C>
|
|
348
348
|
</T>}
|
|
349
349
|
</Z>:<T style={{flex:1,padding:10}}>
|
|
350
|
-
<K data={
|
|
350
|
+
<K data={z}forceOpen={!0}fullHeight={!0}wrap={!0}/>
|
|
351
351
|
</T>}
|
|
352
352
|
</T>}return<T style={t.emptyBox}>
|
|
353
353
|
<Je color={e.purple}size={32}/>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import ee,{useCallback as
|
|
1
|
+
import ee,{useCallback as Le,useMemo as N,useRef as Pe,useState as te}from"react";import{FlatList as De,Platform as Fe,Pressable as Ce,StyleSheet as Ee,Text as S,TextInput as We,TouchableOpacity as Oe,View as C}from"react-native";import{useTranslation as Me}from"../../i18n";import{useInspector as je}from"./InspectorContext";import Ne from"../TouchableScale";import $e from"../AnimatedEntrance";import Ue from"../EmptyState";import Ge from"../EndOfListFooter";import Te from"../HighlightText";import{getSize as Se,openInVSCode as _e,getCleanCallerDisplay as Ze}from"../../helpers";import O from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as R}from"../../styles/AppFonts";import{getActionHistory as Ke}from"../../customHooks/reduxLogger";import{TerminalIcon as Ie,SearchIcon as Je,ClearIcon as Qe,LayersIcon as Xe,ClockIcon as Ye,SizeIcon as Ct,ForwardChevronIcon as Tt,SortArrowIcon as St,BoltIcon as U,AtomIcon as It,ScreenIcon as At,ListenerIcon as Rt,DocIcon as Vt,LoadingSpinnerIcon as Bt,CircleAlertIcon as Ht,TextAaIcon as Lt}from"../NetworkIcons";const Ae=L=>{switch(L){case"saga":return{label:"SAGA",renderIcon:(A,z=9)=><U color={A}size={z}/>,bg:e.purple100,text:e.brandPurple,border:e.purple200};case"thunk":return{label:"THUNK",renderIcon:(A,z=9)=><It color={A}size={z}/>,bg:e.amber100,text:e.amber800Warm,border:e.amber200};case"ui":return{label:"UI",renderIcon:(A,z=9)=><At color={A}size={z}/>,bg:e.sky100,text:e.sky600,border:e.sky400};case"listener":return{label:"LISTENER",renderIcon:(A,z=9)=><Rt color={A}size={z}/>,bg:e.teal100,text:e.teal700,border:e.teal400};default:return{label:"DIRECT",renderIcon:(A,z=9)=><U color={A}size={z}/>,bg:e.slate100,text:e.slate700,border:e.slate200}}},Re=50,ze=10,Pt=ee.memo(()=>{const{t:L}=Me(),{reduxState:A,reduxLastActionMap:z,reduxSearch:k,setReduxSearch:G,setSelectedReduxSlice:Z}=je(),K=Pe(null),[q,J]=te(Re),[P,ke]=te("latest");ee.useEffect(()=>{J(Re),K.current?.scrollToOffset({offset:0,animated:!1})},[k,P]);const Ve=N(()=>Se(A),[A]),Q=N(()=>Ke(),[z]),$=N(()=>!A||typeof A!="object"?[]:Object.keys(A).map(I=>{const T=A[I],B=Array.isArray(T),j=T&&typeof T=="object";let F="Primitive",H=0;B?(H=T.length,F=`Array [${H}]`):j?(H=Object.keys(T).length,F=`Object {${H}}`):typeof T<"u"&&(H=1,F=typeof T);let E="live",v;j&&(T.loading===!0||T.isLoading===!0||T.status==="loading"||T.status==="pending"?(E="loading",v="Loading"):T.error||T.hasError||T.status==="error"||T.status==="failed"?(E="error",v=typeof T.error=="string"?T.error:"Error"):H===0&&(E="empty",v="Empty"));const V=z[I],Be=V?.updatedAt||0,He=Q.filter(W=>!W.affectedSlices||W.affectedSlices.length===0?!0:W.affectedSlices.includes(I)).length;let X;if(V){let W;if(V.payload!==void 0&&V.payload!==null)try{if(typeof V.payload=="object"){const Y=Object.keys(V.payload);W=`{ ${Y.slice(0,3).join(", ")}${Y.length>3?"...":""} }`}else W=String(V.payload)}catch{}X={type:V.type,timestamp:V.timestamp,updatedAt:V.updatedAt,payloadPreview:W,originType:V.originType,callerFile:V.callerFile,callerLine:V.callerLine,callerCol:V.callerCol}}return{id:`slice-${I}`,name:I,keysCount:H,sizeStr:Se(T),typeLabel:F,status:E,statusMessage:v,timelineCount:He,lastAction:X,updatedAt:Be}}),[A,z,Q]),D=N(()=>{let t=$;if(k&&k.trim().length>0){const I=k.trim().toLowerCase().split(/\s+/).filter(Boolean);t=t.filter(T=>{const B=A?A[T.name]:null,j=[T.name||"",T.lastAction?.type||"",T.lastAction?.payloadPreview||"",T.lastAction?.originType||"",T.status||"",T.statusMessage||"",B?typeof B=="string"?B:JSON.stringify(B):""].join(" ").toLowerCase();return I.every(F=>j.includes(F))})}return[...t].sort((I,T)=>P==="latest"&&T.updatedAt!==I.updatedAt?T.updatedAt-I.updatedAt:I.name.localeCompare(T.name))},[$,k,P,A]),_=N(()=>D.slice(0,q),[D,q]),M=N(()=>{const t=Object.values(z);return t.length===0?null:t.reduce((I,T)=>I?(T.updatedAt||0)>(I.updatedAt||0)?T:I:T,null)},[z]),ve=Le(({item:t,index:I})=>{const T=t.updatedAt>0&&Date.now()-t.updatedAt<5e3,B=t.status==="error"?e.errorColor:t.status==="loading"?e.warningIconGold:t.status==="empty"?e.grayTextWeak:e.greenColor,j=t.status==="error"?e.red100:t.status==="loading"?e.amber100:t.status==="empty"?e.grayBackground:e.emeraldBg,F=t.status==="error"?e.errorBorder:t.status==="loading"?e.amber200:t.status==="empty"?e.dividerColor:e.emeraldBorder,H=t.status==="error"?e.red600:t.status==="loading"?e.amber800Warm:t.status==="empty"?e.grayTextWeak:e.emerald700,E=t.lastAction?.callerFile?Ze(t.lastAction.callerFile):null;return<$e index={I}distance={8}>
|
|
2
2
|
<C style={o.cardContainer}>
|
|
3
|
-
<Ne onPress={()=>{Z(t.name)}}style={[o.card,{borderLeftWidth:3.5,borderLeftColor:
|
|
3
|
+
<Ne onPress={()=>{Z(t.name)}}style={[o.card,{borderLeftWidth:3.5,borderLeftColor:B,backgroundColor:t.status==="error"?e.errorCardBg:e.white},T&&o.cardRecentlyUpdated]}>
|
|
4
4
|
<C style={o.cardBody}>
|
|
5
5
|
|
|
6
6
|
<C style={o.cardHeaderRow}>
|
|
7
7
|
<C style={o.cardHeaderLeft}>
|
|
8
|
-
<S style={o.serialNumber}>#{
|
|
8
|
+
<S style={o.serialNumber}>#{I+1}</S>
|
|
9
9
|
<C style={[o.methodBadge,{backgroundColor:e.violet600}]}>
|
|
10
10
|
<S style={o.methodBadgeText}>REDUX</S>
|
|
11
11
|
</C>
|
|
@@ -15,7 +15,7 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
15
15
|
</S>
|
|
16
16
|
</C>
|
|
17
17
|
|
|
18
|
-
{t.lastAction?.originType&&(()=>{const v=
|
|
18
|
+
{t.lastAction?.originType&&(()=>{const v=Ae(t.lastAction.originType);return<C style={[o.chip,{backgroundColor:v.bg,borderColor:v.border}]}>
|
|
19
19
|
{v.renderIcon(v.text,8.5)}
|
|
20
20
|
<S style={[o.chipText,{color:v.text}]}>
|
|
21
21
|
{v.label}
|
|
@@ -25,8 +25,8 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
25
25
|
|
|
26
26
|
<C style={o.cardHeaderRight}>
|
|
27
27
|
<C style={[o.statusPill,{backgroundColor:j,borderColor:F}]}>
|
|
28
|
-
{t.status==="loading"?<
|
|
29
|
-
<S style={[o.statusPillText,{color:
|
|
28
|
+
{t.status==="loading"?<Bt color={e.amber800Warm}size={10}/>:t.status==="error"?<Ht color={e.red600}size={10}/>:t.status==="empty"?null:<C style={o.liveDot}/>}
|
|
29
|
+
<S style={[o.statusPillText,{color:H}]}>
|
|
30
30
|
{t.status==="loading"?"Loading":t.status==="error"?t.statusMessage||"Error":t.status==="empty"?"Empty":"Live"}
|
|
31
31
|
</S>
|
|
32
32
|
</C>
|
|
@@ -46,7 +46,7 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
46
46
|
</C>}
|
|
47
47
|
</C>
|
|
48
48
|
<C style={o.actionPreviewRow}>
|
|
49
|
-
<
|
|
49
|
+
<Ie color={e.grayTextWeak}size={10}/>
|
|
50
50
|
{t.lastAction?<Te text={t.lastAction.type+(t.lastAction.payloadPreview?` \xB7 ${t.lastAction.payloadPreview}`:"")}search={k}style={o.actionPreviewText}highlightStyle={o.highlight}numberOfLines={1}/>:<S style={o.actionPreviewEmptyText}numberOfLines={1}>
|
|
51
51
|
Initial state (no actions dispatched yet)
|
|
52
52
|
</S>}
|
|
@@ -87,27 +87,27 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
<C style={o.waterfallContainer}>
|
|
90
|
-
<C style={[o.waterfallBar,{backgroundColor:
|
|
90
|
+
<C style={[o.waterfallBar,{backgroundColor:B,width:T?"100%":"35%"}]}/>
|
|
91
91
|
</C>
|
|
92
92
|
</Ne>
|
|
93
93
|
</C>
|
|
94
|
-
</$e>},[k,Z]);return
|
|
94
|
+
</$e>},[k,Z]);return A?<C style={{flex:1,backgroundColor:e.grayBackground}}>
|
|
95
95
|
|
|
96
96
|
<C style={o.overviewCard}>
|
|
97
97
|
<C style={o.statCol}>
|
|
98
|
-
<S style={o.statHeading}>{
|
|
98
|
+
<S style={o.statHeading}>{L("redux.activeSlices","ACTIVE SLICES")}</S>
|
|
99
99
|
<S style={o.statBigVal}>{$.length}</S>
|
|
100
100
|
</C>
|
|
101
101
|
<C style={o.statDivider}/>
|
|
102
102
|
<C style={o.statCol}>
|
|
103
|
-
<S style={o.statHeading}>{
|
|
103
|
+
<S style={o.statHeading}>{L("redux.totalState","TOTAL STATE")}</S>
|
|
104
104
|
<S style={o.statBigVal}>{Ve}</S>
|
|
105
105
|
</C>
|
|
106
106
|
<C style={o.statDivider}/>
|
|
107
107
|
<C style={[o.statCol,{flex:1.6}]}>
|
|
108
108
|
<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
109
|
-
<S style={o.statHeading}>{
|
|
110
|
-
{M?.originType&&(()=>{const t=
|
|
109
|
+
<S style={o.statHeading}>{L("redux.lastActionHeader","LAST ACTION")}</S>
|
|
110
|
+
{M?.originType&&(()=>{const t=Ae(M.originType);return<C style={{flexDirection:"row",alignItems:"center",gap:2,backgroundColor:t.bg,paddingHorizontal:4,paddingVertical:1,borderRadius:3}}>
|
|
111
111
|
{t.renderIcon(t.text,8)}
|
|
112
112
|
<S style={{fontFamily:R.interBold,fontSize:7.5,color:t.text}}>
|
|
113
113
|
{t.label}
|
|
@@ -128,7 +128,7 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
128
128
|
<C style={o.searchRow}>
|
|
129
129
|
<C style={O.searchContainer}>
|
|
130
130
|
<Je color={e.grayTextWeak}size={15}/>
|
|
131
|
-
<
|
|
131
|
+
<We accessible={!0}accessibilityRole="search"accessibilityLabel="Search Redux slices or actions"accessibilityHint="Type to filter state slices in real time"placeholder={L("redux.searchPlaceholder","Search state or actions...")}placeholderTextColor={e.grayTextWeak}value={k}onChangeText={G}style={O.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
132
132
|
{k.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
133
133
|
<C style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
134
134
|
<S style={{color:e.purple,fontSize:9.5,fontFamily:R.interBold}}>
|
|
@@ -142,9 +142,9 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
142
142
|
</C>
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
<
|
|
145
|
+
<Oe accessible={!0}accessibilityRole="button"accessibilityLabel={`Sort order: ${P==="latest"?"Recently updated first":"Alphabetical A to Z"}`}accessibilityHint="Switches sorting between recently updated and alphabetical"style={[O.toolbarBtn,P==="latest"&&{backgroundColor:`${e.brandPurple}1F`,borderColor:e.brandPurple}]}onPress={()=>ke(t=>t==="latest"?"alpha":"latest")}hitSlop={6}>
|
|
146
146
|
<St color={P==="latest"?e.brandPurple:e.grayTextStrong}size={16}/>
|
|
147
|
-
</
|
|
147
|
+
</Oe>
|
|
148
148
|
</C>
|
|
149
149
|
|
|
150
150
|
<C style={o.headerSubRow}>
|
|
@@ -152,7 +152,7 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
152
152
|
Showing {D.length} of {$.length} state slices
|
|
153
153
|
</S>
|
|
154
154
|
<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
155
|
-
{P==="latest"?<U color={e.brandPurple}size={11}/>:<
|
|
155
|
+
{P==="latest"?<U color={e.brandPurple}size={11}/>:<Lt color={e.brandPurple}size={11}/>}
|
|
156
156
|
<S style={o.sortLabel}>
|
|
157
157
|
{P==="latest"?"Newest Updates First":"Alphabetical (A-Z)"}
|
|
158
158
|
</S>
|
|
@@ -161,13 +161,13 @@ import ee,{useCallback as Be,useMemo as N,useRef as Pe,useState as te}from"react
|
|
|
161
161
|
</C>
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
<De ref={K}data={_}keyExtractor={t=>t.id}renderItem={ve}getItemLayout={(t,
|
|
164
|
+
<De ref={K}data={_}keyExtractor={t=>t.id}renderItem={ve}getItemLayout={(t,I)=>({length:126,offset:126*I,index:I})}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}ListEmptyComponent={<Ue isSearch={k.trim().length>0}searchQuery={k}onClearSearch={()=>G("")}customTitle={k.trim().length>0?"No Matching Slices":"No Redux State Detected"}customSub={k.trim().length>0?`No Redux slices match "${k}"`:"Attach the Redux store or dispatch actions to see state slices."}/>}ListFooterComponent={D.length>0?<Ge count={_.length}totalCount={D.length}label="slices"loadMoreStep={ze}hasMore={_.length<D.length}onLoadMore={()=>J(t=>t+ze)}/>:null}contentContainerStyle={[o.listContent,D.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
165
165
|
</C>:<C style={O.emptyContainer}>
|
|
166
166
|
<C style={O.emptyIconWrap}>
|
|
167
|
-
<
|
|
167
|
+
<Ie color={e.purple}size={32}/>
|
|
168
168
|
</C>
|
|
169
|
-
<S style={O.emptyTitle}>{
|
|
169
|
+
<S style={O.emptyTitle}>{L("redux.noStoreConnected","No Redux Store Connected")}</S>
|
|
170
170
|
<S style={O.emptySub}>
|
|
171
|
-
{
|
|
171
|
+
{L("redux.connectStoreTip","Call connectReduxStore(store) or use inspectorReduxMiddleware at app initialization.")}
|
|
172
172
|
</S>
|
|
173
|
-
</C>}),o=
|
|
173
|
+
</C>}),o=Ee.create({overviewCard:{flexDirection:"row",alignItems:"center",backgroundColor:e.white,marginHorizontal:12,marginTop:10,borderRadius:12,padding:12,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.primaryBlack,shadowOffset:{width:0,height:1},shadowOpacity:.03,shadowRadius:3,elevation:1},statCol:{flex:1},statDivider:{width:1,height:28,backgroundColor:e.dividerColor,marginHorizontal:8},statHeading:{fontFamily:R.interBold,fontSize:9,color:e.grayTextWeak,letterSpacing:.5},statBigVal:{fontFamily:R.interBold,fontSize:14,color:e.primaryBlack,marginTop:2},statLastAction:{fontFamily:R.interBold,fontSize:11,color:e.purple,marginTop:2},statLastTime:{fontFamily:R.interRegular,fontSize:9.5,color:e.grayTextWeak},toolbarContainer:{backgroundColor:e.white,borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingHorizontal:12,paddingTop:8,paddingBottom:6,marginTop:8},searchRow:{flexDirection:"row",alignItems:"center",gap:8},headerSubRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:6,paddingHorizontal:2},resultCount:{fontFamily:R.interMedium,fontSize:11,color:e.grayTextWeak},sortLabel:{fontFamily:R.interMedium,fontSize:10.5,color:e.brandPurple},listContent:{paddingVertical:8,paddingBottom:36},cardContainer:{paddingHorizontal:10,paddingVertical:4,height:126},card:{backgroundColor:e.white,borderRadius:10,borderWidth:1,borderColor:e.grayBorderSecondary,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:2.5,elevation:1.5,height:118,overflow:"hidden"},cardRecentlyUpdated:{borderColor:`${e.brandPurple}66`,backgroundColor:e.purpleTintBg},cardBody:{paddingHorizontal:12,paddingTop:9,paddingBottom:7,flex:1,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22,gap:6},cardHeaderLeft:{flexDirection:"row",alignItems:"center",gap:6,flex:1,minWidth:0},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},serialNumber:{fontFamily:R.interBold,fontSize:10.5,lineHeight:13,color:e.grayTextWeak},methodBadge:{paddingHorizontal:5.5,paddingVertical:2,borderRadius:4,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:R.interBold,color:e.white,fontSize:9,lineHeight:12,letterSpacing:.4},chip:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:R.interBold,fontSize:8.5,lineHeight:11,letterSpacing:.3},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},liveDot:{width:6,height:6,borderRadius:3,backgroundColor:e.emerald500},statusPillText:{fontFamily:R.interBold,fontSize:9.5,lineHeight:12},cardMainRow:{height:48,minHeight:48,maxHeight:48,justifyContent:"space-between",gap:3},sliceNameRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6},sliceNameText:{fontFamily:R.interBold,fontSize:12.5,lineHeight:16,color:e.primaryBlack,flex:1},actionCountChip:{flexDirection:"row",alignItems:"center",gap:2.5,backgroundColor:`${e.violet600}14`,borderColor:`${e.violet600}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},actionCountChipText:{fontFamily:R.interBold,fontSize:8.5,lineHeight:11,color:e.violet600},actionPreviewRow:{flexDirection:"row",alignItems:"center",gap:4.5,minHeight:15},actionPreviewText:{fontFamily:Fe.select({ios:"Menlo",default:"monospace"}),fontSize:10,lineHeight:13,color:e.grayTextWeak,flex:1},actionPreviewEmptyText:{fontFamily:R.interRegular,fontSize:10,lineHeight:13,color:e.slate400,fontStyle:"italic",flex:1},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:6},footerLeft:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:0},footerTimestampText:{fontFamily:R.interRegular,fontSize:10,lineHeight:13,color:e.slate400},callerChip:{flexDirection:"row",alignItems:"center",gap:2.5,backgroundColor:e.sky100,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3,borderWidth:.5,borderColor:e.sky400,marginLeft:4},callerChipText:{fontFamily:R.interMedium,fontSize:8.5,lineHeight:11,color:e.sky600},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.violetSoftBg,borderColor:e.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:R.interBold,color:e.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:e.graySurface,borderRadius:1.5,overflow:"hidden"},waterfallBar:{height:"100%",borderRadius:1.5},highlight:{backgroundColor:e.yellowHighlight,color:e.primaryBlack,borderRadius:2}});export default Pt;
|