react-native-inapp-inspector 2.5.13 → 2.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +0 -8
  2. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +118 -31
  3. package/dist/commonjs/components/Inspector/ConsoleExportModal.js +1 -1
  4. package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
  5. package/dist/commonjs/components/Inspector/FabLauncher.js +3 -3
  6. package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -30
  7. package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
  8. package/dist/commonjs/components/Inspector/NetworkExportModal.js +4 -4
  9. package/dist/commonjs/components/Inspector/NetworkTab.js +51 -51
  10. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
  11. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
  12. package/dist/commonjs/components/Inspector/SettingsPanel.js +40 -41
  13. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
  14. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
  15. package/dist/commonjs/components/Inspector/TabBar.js +9 -15
  16. package/dist/commonjs/components/LogCard.js +7 -7
  17. package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
  18. package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
  19. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
  20. package/dist/commonjs/constants/telemetryConfig.js +1 -1
  21. package/dist/commonjs/constants/version.d.ts +1 -1
  22. package/dist/commonjs/constants/version.js +1 -1
  23. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  24. package/dist/commonjs/helpers/shareFormatter.js +14 -14
  25. package/dist/commonjs/index.d.ts +1 -1
  26. package/dist/commonjs/index.js +3 -3
  27. package/dist/commonjs/native/NativeInspector.d.ts +2 -0
  28. package/dist/commonjs/native/NativeInspector.js +1 -1
  29. package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
  30. package/dist/commonjs/styles/AppFonts.d.ts +4 -0
  31. package/dist/commonjs/styles/AppFonts.js +1 -1
  32. package/dist/commonjs/styles/index.d.ts +2 -0
  33. package/dist/commonjs/styles/index.js +1 -1
  34. package/dist/commonjs/types/enums.d.ts +0 -2
  35. package/dist/commonjs/types/enums.js +1 -1
  36. package/dist/commonjs/types/interfaces.d.ts +1 -1
  37. package/dist/esm/components/Inspector/ConsoleExportModal.js +1 -1
  38. package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
  39. package/dist/esm/components/Inspector/FabLauncher.js +42 -42
  40. package/dist/esm/components/Inspector/InspectorHeader.js +50 -50
  41. package/dist/esm/components/Inspector/MainScreen.js +87 -124
  42. package/dist/esm/components/Inspector/NetworkExportModal.js +1 -1
  43. package/dist/esm/components/Inspector/NetworkTab.js +83 -83
  44. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
  45. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
  46. package/dist/esm/components/Inspector/SettingsPanel.js +106 -107
  47. package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
  48. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
  49. package/dist/esm/components/Inspector/TabBar.js +35 -41
  50. package/dist/esm/components/LogCard.js +53 -53
  51. package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
  52. package/dist/esm/components/SkeletonPlaceholder.js +42 -11
  53. package/dist/esm/constants/telemetryConfig.d.ts +3 -3
  54. package/dist/esm/constants/telemetryConfig.js +1 -1
  55. package/dist/esm/constants/version.d.ts +1 -1
  56. package/dist/esm/constants/version.js +1 -1
  57. package/dist/esm/helpers/remoteConfig.js +1 -1
  58. package/dist/esm/helpers/shareFormatter.js +14 -14
  59. package/dist/esm/index.d.ts +1 -1
  60. package/dist/esm/index.js +8 -8
  61. package/dist/esm/native/NativeInspector.d.ts +2 -0
  62. package/dist/esm/native/NativeInspector.js +1 -1
  63. package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
  64. package/dist/esm/styles/AppFonts.d.ts +4 -0
  65. package/dist/esm/styles/AppFonts.js +1 -1
  66. package/dist/esm/styles/index.d.ts +2 -0
  67. package/dist/esm/styles/index.js +1 -1
  68. package/dist/esm/types/enums.d.ts +0 -2
  69. package/dist/esm/types/enums.js +1 -1
  70. package/dist/esm/types/interfaces.d.ts +1 -1
  71. package/ios/NetworkInspectorModule.mm +288 -325
  72. package/package.json +1 -1
  73. package/src/native/NativeInspector.ts +30 -0
  74. package/src/native/NativeNetworkInspector.ts +2 -0
  75. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  76. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  77. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  78. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  79. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  80. package/android/.gradle/8.9/gc.properties +0 -0
  81. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  82. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  83. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  84. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  85. package/android/.gradle/9.2.0/gc.properties +0 -0
  86. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  87. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  88. package/android/.gradle/vcs-1/gc.properties +0 -0
  89. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  90. package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +0 -8
  91. package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +0 -76
  92. package/dist/commonjs/components/Inspector/DebuggingTab.d.ts +0 -3
  93. package/dist/commonjs/components/Inspector/DebuggingTab.js +0 -197
  94. package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
  95. package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +0 -97
  96. package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +0 -2
  97. package/dist/commonjs/components/Inspector/UiInspectorDetail.js +0 -485
  98. package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +0 -2
  99. package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +0 -199
  100. package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +0 -2
  101. package/dist/commonjs/components/Inspector/UiInspectorTab.js +0 -117
  102. package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
  103. package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +0 -148
  104. package/dist/commonjs/components/Inspector/index.d.ts +0 -28
  105. package/dist/commonjs/components/Inspector/index.js +0 -1
  106. package/dist/commonjs/customHooks/uiInspectorManager.d.ts +0 -22
  107. package/dist/commonjs/customHooks/uiInspectorManager.js +0 -1
  108. package/dist/commonjs/helpers/uiInspectorEngine.d.ts +0 -62
  109. package/dist/commonjs/helpers/uiInspectorEngine.js +0 -19
  110. package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +0 -8
  111. package/dist/esm/components/Inspector/BoxModelVisualizer.js +0 -76
  112. package/dist/esm/components/Inspector/DebuggingTab.d.ts +0 -3
  113. package/dist/esm/components/Inspector/DebuggingTab.js +0 -197
  114. package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
  115. package/dist/esm/components/Inspector/UiA11yAuditPanel.js +0 -97
  116. package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +0 -2
  117. package/dist/esm/components/Inspector/UiInspectorDetail.js +0 -422
  118. package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +0 -2
  119. package/dist/esm/components/Inspector/UiInspectorOverlay.js +0 -138
  120. package/dist/esm/components/Inspector/UiInspectorTab.d.ts +0 -2
  121. package/dist/esm/components/Inspector/UiInspectorTab.js +0 -117
  122. package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
  123. package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +0 -148
  124. package/dist/esm/components/Inspector/index.d.ts +0 -28
  125. package/dist/esm/components/Inspector/index.js +0 -1
  126. package/dist/esm/customHooks/uiInspectorManager.d.ts +0 -22
  127. package/dist/esm/customHooks/uiInspectorManager.js +0 -1
  128. package/dist/esm/helpers/uiInspectorEngine.d.ts +0 -48
  129. package/dist/esm/helpers/uiInspectorEngine.js +0 -19
@@ -1,422 +0,0 @@
1
- import qe,{useRef as Qe,useState as Y}from"react";import{Dimensions as Ze,Image as Ie,Modal as _e,ScrollView as Q,StyleSheet as ze,Text as C,TextInput as Ct,TouchableOpacity as A,View as T}from"react-native";import{useInspector as gt}from"./InspectorContext";import{auditAccessibility as ut,categorizeStyles as ht,extractBoxModel as Tt,generateCssSnippet as Ee,generateFullJsxSegmentSnippet as Ft,generateStyleSheetSnippet as Z}from"../../helpers/uiInspectorEngine";import{BoxModelVisualizer as St}from"./BoxModelVisualizer";import{UiA11yAuditPanel as Bt}from"./UiA11yAuditPanel";import It from"../JsonViewer";import _ from"../TouchableScale";import{AccessibilityIcon as zt,BoxModelIcon as Et,ChevronIcon as Re,CloseIcon as Ae,CodeBracketsIcon as Ce,CopyIcon as O,LayersIcon as Rt,SearchIcon as Pe}from"../NetworkIcons";import{AppColors as f}from"../../styles/AppColors";import{AppFonts as F}from"../../styles/AppFonts";import{triggerNativeHaptic as D}from"../../native/NativeInspector";import{showToast as G}from"../../helpers/toast";import U from"@react-native-clipboard/clipboard";export const UiInspectorDetail=()=>{const{selectedUiElement:M,setSelectedUiElement:ge,uiActiveSubTab:V,setUiActiveSubTab:He}=gt(),[$,Le]=Y(""),[De,q]=Y(!1),[Ve,ue]=Y(null),[v,he]=Y("rn"),ve=Qe(null);if(!M)return null;const{componentName:z,hierarchy:W,props:X,flattenedStyles:je,boxModel:E,a11y:Ne,layout:B,snapshotUri:J}=M,K=Ze.get("window"),Te=K.width*K.height,Fe=B.width*B.height,Me=Te>0?(Fe/Te*100).toFixed(1):"0.0",We=B.height>0?(B.width/B.height).toFixed(2):"1.00",P={...je},R=ht(P),Oe=typeof z=="string"&&(z.startsWith("RCT")||["View","Text","Image","ScrollView","TextInput","Modal"].includes(z)),k=Ft(z,X,P),fe=()=>{U.setString(k.code),D(),G("Copied full JSX to clipboard")},Ge=()=>{k.sourceFile&&(U.setString(`${k.sourceFile}:${k.lineNumber||1}`),D(),G("Copied source location"))},we=()=>{const w=v==="rn"?Z(z,P):Ee(z,P);U.setString(w),D(),G(v==="rn"?"Copied StyleSheet":"Copied CSS")},Ue=()=>{U.setString(JSON.stringify(X,null,2)),D(),G("Copied props as JSON")},$e=(w,x)=>{U.setString(String(x)),D(),ue(w),G(`Copied "${w}: ${x}"`),setTimeout(()=>ue(null),1500)},xe=w=>{if(w.componentName===z)return;D();const x=w.props||{},S=w.styles||(x.style?ze.flatten(x.style):{})||{},I=w.layout||{...B,width:S.width||B.width,height:S.height||B.height},H=Tt(S,I),L=ut(x,I,S);ge({...M,componentName:w.componentName,displayName:w.displayName,props:x,originalStyles:S,flattenedStyles:S,tweakedStyles:{},layout:I,boxModel:H,a11y:L})},Xe=(w,x)=>{if(typeof x!="string")return!1;const S=w.toLowerCase();return S.includes("color")||S.includes("background")||x.startsWith("#")||x.startsWith("rgb")||x.startsWith("hsl")},j=(w,x,S,I)=>{const H=Object.entries(x);return H.length===0?null:<T key={w}style={[e.styleGroupCard,{borderLeftColor:I}]}>
2
- <T style={e.styleGroupHeader}>
3
- <T style={e.styleGroupTitleRow}>
4
- <C style={e.styleGroupIcon}>{S}</C>
5
- <C style={[e.styleGroupTitle,{color:I}]}>{w.toUpperCase()}</C>
6
- </T>
7
- <T style={[e.styleGroupBadge,{backgroundColor:`${I}18`}]}>
8
- <C style={[e.styleGroupBadgeText,{color:I}]}>{H.length}</C>
9
- </T>
10
- </T>
11
-
12
- <T style={e.styleRowsContainer}>
13
- {H.map(([L,N])=>{const Be=Xe(L,N),Ye=Ve===L;return<A key={L}activeOpacity={.7}style={[e.styleRow,Ye&&e.styleRowCopied]}onPress={()=>$e(L,N)}>
14
- <C style={e.stylePropKey}>{L}</C>
15
- <T style={e.styleValueContainer}>
16
- {Be&&<T style={[e.colorSwatchPreview,{backgroundColor:String(N)}]}/>}
17
- <C style={[e.stylePropValue,Be&&e.stylePropColorValue]}>
18
- {typeof N=="object"?JSON.stringify(N):String(N)}
19
- </C>
20
- {typeof N=="number"&&<C style={e.styleUnitText}>pt</C>}
21
- </T>
22
- </A>})}
23
- </T>
24
- </T>},Se=Object.entries(X).filter(([w,x])=>{if(!$)return!0;const S=$.toLowerCase();return w.toLowerCase().includes(S)||String(x).toLowerCase().includes(S)}),Je=[{key:"styles",label:"Styles",icon:Rt},{key:"jsx",label:"JSX Code",icon:Ce},{key:"boxmodel",label:"Box Model",icon:Et},{key:"tree",label:`Hierarchy (${W.length})`,icon:Re},{key:"props",label:`Props (${Object.keys(X).length})`,icon:Pe},{key:"a11y",label:"A11y",icon:zt}],Ke=Object.keys(R.layout).length>0||Object.keys(R.spacing).length>0||Object.keys(R.appearance).length>0||Object.keys(R.typography).length>0||Object.keys(R.borders).length>0||Object.keys(R.transforms).length>0||Object.keys(R.other).length>0;return<T style={e.container}>
25
-
26
- <T style={e.topControlBar}>
27
- <T style={e.elementTagRow}>
28
- <T style={e.componentPill}>
29
- <C style={e.componentTagBracket}>&lt;</C>
30
- <C style={e.componentTagName}>{z}</C>
31
- <C style={e.componentTagBracket}> /&gt;</C>
32
- <T style={e.typeBadge}>
33
- <C style={e.typeBadgeText}>
34
- {Oe?"Native":"React"}
35
- </C>
36
- </T>
37
- </T>
38
-
39
-
40
- <Q horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.breadcrumbScroll}>
41
- {W.map((w,x)=>{const S=x===W.length-1||w.componentName===z;return<qe.Fragment key={w.id||x}>
42
- <Re color="#94A3B8"size={8}direction="right"/>
43
- <A style={[e.crumbChip,S&&e.crumbChipActive]}onPress={()=>xe(w)}>
44
- <C style={[e.crumbChipText,S&&e.crumbChipTextActive]}numberOfLines={1}>
45
- {w.displayName}
46
- </C>
47
- </A>
48
- </qe.Fragment>})}
49
- </Q>
50
- </T>
51
-
52
- <T style={e.topActions}>
53
- <_ style={e.quickActionBtn}onPress={fe}>
54
- <Ce color={f.brandPurple}size={11}/>
55
- <C style={e.quickActionBtnText}>JSX</C>
56
- </_>
57
- <_ style={e.closeBtn}onPress={()=>{D(),ge(null)}}>
58
- <Ae color={f.slate600}size={12}/>
59
- </_>
60
- </T>
61
- </T>
62
-
63
-
64
- <_e visible={De}transparent animationType="fade"onRequestClose={()=>q(!1)}>
65
- <T style={e.modalBackdrop}>
66
- <T style={e.modalCard}>
67
- <T style={e.modalHeader}>
68
- <C style={e.modalTitle}>
69
- &lt;{z}&gt; Preview ({Math.round(B.width)} × {Math.round(B.height)} pt)
70
- </C>
71
- <A style={e.modalCloseBtn}onPress={()=>q(!1)}>
72
- <Ae color={f.white}size={15}/>
73
- </A>
74
- </T>
75
- {J&&<T style={e.modalImageContainer}>
76
- <Ie source={{uri:J}}style={e.modalImage}resizeMode="contain"/>
77
- </T>}
78
- </T>
79
- </T>
80
- </_e>
81
-
82
-
83
- <T style={e.subTabBarWrapper}>
84
- <Q ref={ve}horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.subTabBarContent}>
85
- {Je.map(w=>{const x=V===w.key,S=w.icon;return<A key={w.key}style={[e.subTabItem,x&&e.subTabItemActive]}onPress={()=>{D(),He(w.key)}}>
86
- <S color={x?f.white:"#64748B"}size={12}/>
87
- <C style={[e.subTabText,x&&e.subTabTextActive]}>
88
- {w.label}
89
- </C>
90
- </A>})}
91
- </Q>
92
- </T>
93
-
94
-
95
- <Q style={e.tabScrollContent}contentContainerStyle={e.tabScrollInner}showsVerticalScrollIndicator={!1}>
96
-
97
- {V==="styles"&&<T style={e.stylesTabContainer}>
98
-
99
- <T style={e.heroSnapshotCard}>
100
- <T style={e.heroImageFrame}>
101
- {J?<A activeOpacity={.9}style={e.heroImageTouchable}onPress={()=>q(!0)}>
102
- <Ie source={{uri:J}}style={e.heroImage}resizeMode="contain"/>
103
- <T style={e.zoomGlassBadge}>
104
- <C style={e.zoomGlassBadgeText}>🔍 Zoom Lightbox</C>
105
- </T>
106
- </A>:<T style={e.heroPlaceholder}>
107
- <C style={e.heroPlaceholderIcon}>🎨</C>
108
- <C style={e.heroPlaceholderText}>Rendered Component Frame</C>
109
- </T>}
110
- </T>
111
-
112
-
113
- <T style={e.metricsGrid}>
114
- <T style={e.metricCell}>
115
- <C style={e.metricCellLabel}>WIDTH</C>
116
- <C style={e.metricCellValue}>{Math.round(B.width)}<C style={e.metricUnit}> pt</C></C>
117
- </T>
118
- <T style={e.metricCell}>
119
- <C style={e.metricCellLabel}>HEIGHT</C>
120
- <C style={e.metricCellValue}>{Math.round(B.height)}<C style={e.metricUnit}> pt</C></C>
121
- </T>
122
- <T style={e.metricCell}>
123
- <C style={e.metricCellLabel}>PAGE X</C>
124
- <C style={e.metricCellValue}>{Math.round(B.pageX)}<C style={e.metricUnit}> pt</C></C>
125
- </T>
126
- <T style={e.metricCell}>
127
- <C style={e.metricCellLabel}>PAGE Y</C>
128
- <C style={e.metricCellValue}>{Math.round(B.pageY)}<C style={e.metricUnit}> pt</C></C>
129
- </T>
130
- </T>
131
-
132
-
133
- <T style={e.specsBar}>
134
- <T style={e.specsTag}>
135
- <C style={e.specsTagLabel}>Coverage</C>
136
- <C style={e.specsTagVal}>{Me}% ({We}:1)</C>
137
- </T>
138
- <T style={e.specsTag}>
139
- <C style={e.specsTagLabel}>Tag ID</C>
140
- <C style={e.specsTagVal}>{M.nativeTag?`#${M.nativeTag}`:"Virtual Fiber"}</C>
141
- </T>
142
- </T>
143
- </T>
144
-
145
-
146
- <T style={e.computedLayoutCard}>
147
- <T style={e.computedLayoutHeader}>
148
- <C style={e.computedLayoutTitle}>⚡ COMPUTED CONSTRAINTS</C>
149
- <C style={e.computedLayoutSub}>Resolved Frame & Insets</C>
150
- </T>
151
- <T style={e.computedGrid}>
152
- <T style={e.computedItem}>
153
- <C style={e.computedItemKey}>Display</C>
154
- <C style={e.computedItemVal}>{P.display||"flex"}</C>
155
- </T>
156
- <T style={e.computedItem}>
157
- <C style={e.computedItemKey}>Position</C>
158
- <C style={e.computedItemVal}>{P.position||"relative"}</C>
159
- </T>
160
- <T style={e.computedItem}>
161
- <C style={e.computedItemKey}>Flex Direction</C>
162
- <C style={e.computedItemVal}>{P.flexDirection||"column"}</C>
163
- </T>
164
- <T style={e.computedItem}>
165
- <C style={e.computedItemKey}>Box Sizing</C>
166
- <C style={e.computedItemVal}>border-box</C>
167
- </T>
168
- </T>
169
- </T>
170
-
171
-
172
- {Ke&&<>
173
- {j("Flex Layout",R.layout,"\u26A1","#8B5CF6")}
174
- {j("Spacing & Margins",R.spacing,"\u{1F4E6}","#10B981")}
175
- {j("Appearance & Color",R.appearance,"\u{1F3A8}","#F43F5E")}
176
- {j("Typography",R.typography,"\u{1F524}","#F59E0B")}
177
- {j("Borders & Corners",R.borders,"\u{1F532}","#0D9488")}
178
- {j("Transforms",R.transforms,"\u{1F504}","#EC4899")}
179
- {j("Other Properties",R.other,"\u2699\uFE0F","#64748B")}
180
- </>}
181
-
182
-
183
- <T style={e.codeSnippetCard}>
184
- <T style={e.codeSnippetHeader}>
185
- <T style={e.codeSnippetTabs}>
186
- <A style={[e.codeFormatBtn,v==="rn"&&e.codeFormatBtnActive]}onPress={()=>he("rn")}>
187
- <C style={[e.codeFormatBtnText,v==="rn"&&e.codeFormatBtnTextActive]}>
188
- React Native StyleSheet
189
- </C>
190
- </A>
191
- <A style={[e.codeFormatBtn,v==="css"&&e.codeFormatBtnActive]}onPress={()=>he("css")}>
192
- <C style={[e.codeFormatBtnText,v==="css"&&e.codeFormatBtnTextActive]}>
193
- Web CSS
194
- </C>
195
- </A>
196
- </T>
197
-
198
- <A style={e.codeCopyBtn}onPress={we}>
199
- <O color={f.brandPurple}size={11}/>
200
- <C style={e.codeCopyBtnText}>Copy</C>
201
- </A>
202
- </T>
203
- <T style={e.codeSnippetBody}>
204
- <C style={e.codeSnippetText}numberOfLines={14}>
205
- {v==="rn"?Z(z,P):Ee(z,P)}
206
- </C>
207
- </T>
208
- </T>
209
- </T>}
210
-
211
-
212
- {V==="jsx"&&<T style={e.jsxTabContainer}>
213
-
214
- <T style={e.sourceLocationCard}>
215
- <T style={e.sourceLocationHeader}>
216
- <C style={e.sourceLocationTitle}>📍 CODEBASE LOCATION</C>
217
- {k.sourceFile&&<A style={e.copyPathBtn}onPress={Ge}>
218
- <O color={f.brandPurple}size={11}/>
219
- <C style={e.copyPathBtnText}>Copy Path</C>
220
- </A>}
221
- </T>
222
- <T style={e.sourceLocationBody}>
223
- <C style={e.sourceLocationText}>
224
- {k.sourceLocation||(k.sourceFile?`${k.sourceFile}:${k.lineNumber||1}`:`${z}.tsx (Rendered React Node)`)}
225
- </C>
226
- {k.lineNumber!=null&&<T style={e.lineNumberBadge}>
227
- <C style={e.lineNumberBadgeText}>Line {k.lineNumber}</C>
228
- </T>}
229
- </T>
230
- </T>
231
-
232
-
233
- <T style={e.jsxCodeCard}>
234
- <T style={e.jsxCodeHeader}>
235
- <T style={e.jsxCodeTitleRow}>
236
- <Ce color={f.brandPurple}size={14}/>
237
- <C style={e.jsxCodeTitle}>FULL JSX CODE</C>
238
- </T>
239
- <A style={e.jsxCopyActionBtn}onPress={fe}>
240
- <O color={f.white}size={11}/>
241
- <C style={e.jsxCopyActionBtnText}>Copy JSX</C>
242
- </A>
243
- </T>
244
-
245
- <T style={e.jsxCodeBody}>
246
- <C style={e.jsxCodeContent}selectable>
247
- {k.code}
248
- </C>
249
- </T>
250
- </T>
251
-
252
-
253
- <T style={e.codeSnippetCard}>
254
- <T style={e.codeSnippetHeader}>
255
- <C style={e.connectedStyleTitle}>🎨 CONNECTED STYLESHEET</C>
256
- <A style={e.codeCopyBtn}onPress={we}>
257
- <O color={f.brandPurple}size={11}/>
258
- <C style={e.codeCopyBtnText}>Copy Styles</C>
259
- </A>
260
- </T>
261
- <T style={e.codeSnippetBody}>
262
- <C style={e.codeSnippetText}numberOfLines={14}>
263
- {Z(z,P)}
264
- </C>
265
- </T>
266
- </T>
267
- </T>}
268
-
269
-
270
- {V==="boxmodel"&&<T style={e.boxModelTabContainer}>
271
- <T style={e.boxModelCard}>
272
- <C style={e.boxModelSectionTitle}>📦 VISUAL BOX MODEL (CSS METRICS)</C>
273
- <St boxModel={E}/>
274
- </T>
275
-
276
-
277
- <T style={e.boxModelMetricsTable}>
278
- <C style={e.tableTitle}>SPACING SUMMARY</C>
279
- <T style={e.tableRow}>
280
- <C style={e.tableHeaderCell}>Layer</C>
281
- <C style={e.tableHeaderCell}>Top</C>
282
- <C style={e.tableHeaderCell}>Right</C>
283
- <C style={e.tableHeaderCell}>Bottom</C>
284
- <C style={e.tableHeaderCell}>Left</C>
285
- </T>
286
- <T style={e.tableRow}>
287
- <C style={[e.tableCell,{color:"#D97706",fontFamily:F.bold}]}>Margin</C>
288
- <C style={e.tableCell}>{E.margin.top} pt</C>
289
- <C style={e.tableCell}>{E.margin.right} pt</C>
290
- <C style={e.tableCell}>{E.margin.bottom} pt</C>
291
- <C style={e.tableCell}>{E.margin.left} pt</C>
292
- </T>
293
- <T style={e.tableRow}>
294
- <C style={[e.tableCell,{color:"#CA8A04",fontFamily:F.bold}]}>Border</C>
295
- <C style={e.tableCell}>{E.border.top} pt</C>
296
- <C style={e.tableCell}>{E.border.right} pt</C>
297
- <C style={e.tableCell}>{E.border.bottom} pt</C>
298
- <C style={e.tableCell}>{E.border.left} pt</C>
299
- </T>
300
- <T style={e.tableRow}>
301
- <C style={[e.tableCell,{color:"#059669",fontFamily:F.bold}]}>Padding</C>
302
- <C style={e.tableCell}>{E.padding.top} pt</C>
303
- <C style={e.tableCell}>{E.padding.right} pt</C>
304
- <C style={e.tableCell}>{E.padding.bottom} pt</C>
305
- <C style={e.tableCell}>{E.padding.left} pt</C>
306
- </T>
307
- <T style={e.tableRow}>
308
- <C style={[e.tableCell,{color:"#4F46E5",fontFamily:F.bold}]}>Content</C>
309
- <C style={[e.tableCell,{flex:4}]}>
310
- {E.content.width} × {E.content.height} pt (Area: {Math.round(Fe)} pt²)
311
- </C>
312
- </T>
313
- </T>
314
-
315
-
316
- <T style={e.insetsCard}>
317
- <C style={e.tableTitle}>SCREEN INSETS & EDGES</C>
318
- <T style={e.insetsGrid}>
319
- <T style={e.insetRow}>
320
- <C style={e.insetLabel}>Distance from Screen Top:</C>
321
- <C style={e.insetValue}>{Math.round(B.pageY)} pt</C>
322
- </T>
323
- <T style={e.insetRow}>
324
- <C style={e.insetLabel}>Distance from Screen Left:</C>
325
- <C style={e.insetValue}>{Math.round(B.pageX)} pt</C>
326
- </T>
327
- <T style={e.insetRow}>
328
- <C style={e.insetLabel}>Distance from Screen Bottom:</C>
329
- <C style={e.insetValue}>
330
- {Math.max(0,Math.round(K.height-(B.pageY+B.height)))} pt
331
- </C>
332
- </T>
333
- <T style={e.insetRow}>
334
- <C style={e.insetLabel}>Distance from Screen Right:</C>
335
- <C style={e.insetValue}>
336
- {Math.max(0,Math.round(K.width-(B.pageX+B.width)))} pt
337
- </C>
338
- </T>
339
- </T>
340
- </T>
341
- </T>}
342
-
343
-
344
- {V==="tree"&&<T style={e.treeTabContainer}>
345
- <T style={e.treeHeaderCard}>
346
- <C style={e.treeHeaderTitle}>COMPONENT ANCESTOR TREE</C>
347
- <C style={e.treeHeaderSubtitle}>
348
- Tap any parent or child node in the hierarchy to inspect its styles, props, and box model.
349
- </C>
350
- </T>
351
-
352
- <T style={e.treeList}>
353
- {W.map((w,x)=>{const S=x===W.length-1||w.componentName===z,I=x;return<A key={w.id||x}activeOpacity={.7}style={[e.treeItemCard,{marginLeft:I*14},S&&e.treeItemCardActive]}onPress={()=>xe(w)}>
354
- <T style={e.treeItemTopRow}>
355
- <T style={e.treeTagRow}>
356
- <T style={[e.depthBadge,S&&e.depthBadgeActive]}>
357
- <C style={[e.depthBadgeText,S&&e.depthBadgeTextActive]}>
358
- L{I}
359
- </C>
360
- </T>
361
- <C style={[e.treeTagName,S&&e.treeTagNameActive]}>
362
- &lt;{w.displayName}&gt;
363
- </C>
364
- </T>
365
-
366
- {S?<T style={e.activePillBadge}>
367
- <C style={e.activePillBadgeText}>CURRENT</C>
368
- </T>:<T style={e.inspectArrowBtn}>
369
- <C style={e.inspectArrowBtnText}>Inspect →</C>
370
- </T>}
371
- </T>
372
-
373
- {w.layout&&<T style={e.treeItemBottomRow}>
374
- <C style={e.treeItemMetric}>
375
- Frame: {Math.round(w.layout.width)} × {Math.round(w.layout.height)} pt
376
- </C>
377
- {w.isHostComponent&&<C style={e.treeItemHostBadge}>Native</C>}
378
- </T>}
379
- </A>})}
380
- </T>
381
- </T>}
382
-
383
-
384
- {V==="props"&&<T style={e.propsTabContainer}>
385
- <T style={e.propsSearchRow}>
386
- <T style={e.searchBar}>
387
- <Pe color={f.slate400}size={14}/>
388
- <Ct style={e.searchInput}placeholder="Filter props by name or value..."placeholderTextColor={f.slate400}value={$}onChangeText={Le}/>
389
- </T>
390
-
391
- <_ style={e.copyPropsBtn}onPress={Ue}>
392
- <O color={f.white}size={11}/>
393
- <C style={e.copyPropsBtnText}>Copy All</C>
394
- </_>
395
- </T>
396
-
397
- {Se.length===0?<T style={e.emptyPropsBox}>
398
- <C style={e.emptyPropsText}>No props match "{$}"</C>
399
- </T>:<T style={e.propsList}>
400
- {Se.map(([w,x])=>{const S=typeof x,I=S==="function",H=S==="object"&&x!==null,L=!I&&!H;return<T key={w}style={e.propItemCard}>
401
- <T style={e.propHeader}>
402
- <C style={e.propKeyName}>{w}</C>
403
- <T style={[e.typeBadgePrimary,I&&e.typeBadgeFn,H&&e.typeBadgeObj,L&&e.typeBadgePrim]}>
404
- <C style={e.typeBadgePrimaryText}>
405
- {I?"function":H?"object":S}
406
- </C>
407
- </T>
408
- </T>
409
-
410
- {H?<T style={e.jsonViewerWrapper}>
411
- <It data={x}defaultExpandDepth={1}/>
412
- </T>:<C style={e.propValueText}numberOfLines={3}>
413
- {I?"\u0192 () { [native / custom handler] }":String(x)}
414
- </C>}
415
- </T>})}
416
- </T>}
417
- </T>}
418
-
419
-
420
- {V==="a11y"&&<Bt a11y={Ne}/>}
421
- </Q>
422
- </T>};const e=ze.create({container:{flex:1,backgroundColor:"#F8FAFC"},topControlBar:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:f.white,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:"#E2E8F0"},elementTagRow:{flex:1,flexDirection:"row",alignItems:"center",gap:6,marginRight:8},componentPill:{flexDirection:"row",alignItems:"center",backgroundColor:"#EEF2FF",paddingHorizontal:8,paddingVertical:4,borderRadius:6,borderWidth:1,borderColor:"#C7D2FE"},componentTagBracket:{fontSize:12,fontFamily:F.bold,color:"#D97706"},componentTagName:{fontSize:12,fontFamily:F.bold,color:f.brandPurple,paddingHorizontal:2},typeBadge:{backgroundColor:"#FFFFFF",paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,marginLeft:5,borderWidth:1,borderColor:"#E2E8F0"},typeBadgeText:{fontSize:9,fontFamily:F.semiBold,color:"#64748B"},breadcrumbScroll:{alignItems:"center",gap:4},crumbChip:{paddingHorizontal:6,paddingVertical:2.5,borderRadius:4,backgroundColor:"#F1F5F9"},crumbChipActive:{backgroundColor:f.brandPurple},crumbChipText:{fontSize:10,fontFamily:F.medium,color:"#64748B"},crumbChipTextActive:{color:f.white,fontFamily:F.bold},topActions:{flexDirection:"row",alignItems:"center",gap:6},quickActionBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:"#EEF2FF",paddingHorizontal:8,paddingVertical:4,borderRadius:6,borderWidth:1,borderColor:"#C7D2FE"},quickActionBtnText:{fontSize:10,fontFamily:F.bold,color:f.brandPurple},closeBtn:{padding:5,borderRadius:6,backgroundColor:"#F1F5F9",borderWidth:1,borderColor:"#E2E8F0"},subTabBarWrapper:{backgroundColor:f.white,borderBottomWidth:1,borderBottomColor:"#E2E8F0",paddingVertical:6},subTabBarContent:{paddingHorizontal:10,gap:6,alignItems:"center"},subTabItem:{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:5,borderRadius:7,backgroundColor:"#F1F5F9",gap:4.5,borderWidth:1,borderColor:"#E2E8F0"},subTabItemActive:{backgroundColor:f.brandPurple,borderColor:"#4338CA",shadowColor:f.brandPurple,shadowOffset:{width:0,height:1.5},shadowOpacity:.2,shadowRadius:2,elevation:2},subTabText:{fontSize:11,fontFamily:F.medium,color:"#475569"},subTabTextActive:{color:f.white,fontFamily:F.bold},tabScrollContent:{flex:1},tabScrollInner:{padding:12,paddingBottom:32},stylesTabContainer:{gap:10},heroSnapshotCard:{backgroundColor:f.white,borderRadius:12,borderWidth:1,borderColor:"#E2E8F0",overflow:"hidden",shadowColor:"#0F172A",shadowOffset:{width:0,height:2},shadowOpacity:.06,shadowRadius:4,elevation:2},heroImageFrame:{width:"100%",height:125,backgroundColor:"#0F172A",justifyContent:"center",alignItems:"center",position:"relative"},heroImageTouchable:{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",padding:10},heroImage:{width:"100%",height:"100%"},zoomGlassBadge:{position:"absolute",top:8,right:8,backgroundColor:"rgba(15, 23, 42, 0.75)",paddingHorizontal:8,paddingVertical:3.5,borderRadius:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.2)"},zoomGlassBadgeText:{fontSize:9.5,fontFamily:F.bold,color:"#FFFFFF"},heroPlaceholder:{alignItems:"center",justifyContent:"center"},heroPlaceholderIcon:{fontSize:24,marginBottom:4},heroPlaceholderText:{fontSize:10,fontFamily:F.bold,color:"#94A3B8"},metricsGrid:{flexDirection:"row",borderTopWidth:1,borderTopColor:"#E2E8F0",backgroundColor:"#FFFFFF"},metricCell:{flex:1,paddingVertical:8,paddingHorizontal:6,alignItems:"center",borderRightWidth:1,borderRightColor:"#F1F5F9"},metricCellLabel:{fontSize:8.5,fontFamily:F.bold,color:"#94A3B8",letterSpacing:.5},metricCellValue:{fontSize:12.5,fontFamily:F.bold,color:"#0F172A",marginTop:2},metricUnit:{fontSize:9,fontFamily:F.regular,color:"#64748B"},specsBar:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#F8FAFC",paddingHorizontal:12,paddingVertical:6.5,borderTopWidth:1,borderTopColor:"#E2E8F0"},specsTag:{flexDirection:"row",alignItems:"center",gap:4},specsTagLabel:{fontSize:9.5,fontFamily:F.medium,color:"#64748B"},specsTagVal:{fontSize:9.5,fontFamily:F.bold,color:"#0F172A"},computedLayoutCard:{backgroundColor:f.white,borderRadius:10,padding:12,borderWidth:1,borderColor:"#E2E8F0"},computedLayoutHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:6,borderBottomWidth:1,borderBottomColor:"#F1F5F9"},computedLayoutTitle:{fontSize:10.5,fontFamily:F.bold,color:"#6366F1",letterSpacing:.6},computedLayoutSub:{fontSize:9.5,fontFamily:F.medium,color:"#94A3B8"},computedGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},computedItem:{width:"48%",backgroundColor:"#F8FAFC",paddingHorizontal:8,paddingVertical:6,borderRadius:6,borderWidth:1,borderColor:"#E2E8F0",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},computedItemKey:{fontSize:10,fontFamily:F.medium,color:"#64748B"},computedItemVal:{fontSize:10.5,fontFamily:F.bold,color:"#0F172A"},styleGroupCard:{backgroundColor:f.white,borderRadius:10,padding:12,borderWidth:1,borderColor:"#E2E8F0",borderLeftWidth:3.5,shadowColor:"#0F172A",shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:2,elevation:1},styleGroupHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:6,borderBottomWidth:1,borderBottomColor:"#F1F5F9"},styleGroupTitleRow:{flexDirection:"row",alignItems:"center",gap:6},styleGroupIcon:{fontSize:13},styleGroupTitle:{fontSize:11,fontFamily:F.bold,letterSpacing:.6},styleGroupBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:10},styleGroupBadgeText:{fontSize:9.5,fontFamily:F.bold},styleRowsContainer:{gap:2},styleRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:4.5,paddingHorizontal:6,borderRadius:6},styleRowCopied:{backgroundColor:"#ECFDF5"},stylePropKey:{fontSize:11.5,fontFamily:F.medium,color:"#475569"},styleValueContainer:{flexDirection:"row",alignItems:"center",gap:6},colorSwatchPreview:{width:13,height:13,borderRadius:3,borderWidth:1,borderColor:"rgba(0,0,0,0.15)"},stylePropValue:{fontSize:11.5,fontFamily:F.semiBold,color:"#0F172A"},stylePropColorValue:{fontFamily:F.bold,color:"#6366F1"},styleUnitText:{fontSize:9.5,fontFamily:F.regular,color:"#94A3B8"},codeSnippetCard:{backgroundColor:"#F8FAFC",borderRadius:10,borderWidth:1,borderColor:"#E2E8F0",overflow:"hidden"},codeSnippetHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:10,paddingVertical:6,borderBottomWidth:1,borderBottomColor:"#E2E8F0",backgroundColor:"#EEF2FF"},codeSnippetTabs:{flexDirection:"row",gap:4},codeFormatBtn:{paddingHorizontal:8,paddingVertical:3,borderRadius:5},codeFormatBtnActive:{backgroundColor:f.white,shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.1,shadowRadius:1,elevation:1},codeFormatBtnText:{fontSize:9.5,fontFamily:F.medium,color:"#64748B"},codeFormatBtnTextActive:{color:f.brandPurple,fontFamily:F.bold},codeCopyBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:f.white,paddingHorizontal:8,paddingVertical:3,borderRadius:5,borderWidth:1,borderColor:"#C7D2FE"},codeCopyBtnText:{fontSize:10,fontFamily:F.bold,color:f.brandPurple},codeSnippetBody:{padding:10,backgroundColor:"#FFFFFF"},codeSnippetText:{fontSize:11,fontFamily:"Courier",color:"#334155",lineHeight:16},jsxTabContainer:{gap:12},sourceLocationCard:{backgroundColor:f.white,borderRadius:10,borderWidth:1,borderColor:"#E2E8F0",overflow:"hidden"},sourceLocationHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#EEF2FF",paddingHorizontal:12,paddingVertical:7,borderBottomWidth:1,borderBottomColor:"#E0E7FF"},sourceLocationTitle:{fontSize:10,fontFamily:F.bold,color:f.brandPurple,letterSpacing:.6},copyPathBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:f.white,paddingHorizontal:7,paddingVertical:2.5,borderRadius:4,borderWidth:1,borderColor:"#C7D2FE"},copyPathBtnText:{fontSize:9.5,fontFamily:F.bold,color:f.brandPurple},sourceLocationBody:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:10},sourceLocationText:{flex:1,fontSize:11.5,fontFamily:F.bold,color:"#1E293B"},lineNumberBadge:{backgroundColor:"#F1F5F9",paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:"#E2E8F0"},lineNumberBadgeText:{fontSize:9.5,fontFamily:F.semiBold,color:"#64748B"},jsxCodeCard:{backgroundColor:f.white,borderRadius:10,borderWidth:1,borderColor:"#C7D2FE",overflow:"hidden"},jsxCodeHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#EEF2FF",paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:"#E0E7FF"},jsxCodeTitleRow:{flexDirection:"row",alignItems:"center",gap:6},jsxCodeTitle:{fontSize:10.5,fontFamily:F.bold,color:f.brandPurple,letterSpacing:.6},jsxCopyActionBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:f.brandPurple,paddingHorizontal:9,paddingVertical:4,borderRadius:6},jsxCopyActionBtnText:{fontSize:10.5,fontFamily:F.bold,color:f.white},jsxCodeBody:{padding:12,backgroundColor:"#FAF5FF"},jsxCodeContent:{fontSize:12,fontFamily:"Courier",color:"#4C1D95",lineHeight:18},connectedStyleTitle:{fontSize:10,fontFamily:F.bold,color:f.brandPurple,letterSpacing:.6},boxModelTabContainer:{gap:12},boxModelCard:{backgroundColor:f.white,borderRadius:10,padding:12,borderWidth:1,borderColor:"#E2E8F0"},boxModelSectionTitle:{fontSize:10.5,fontFamily:F.bold,color:"#64748B",letterSpacing:.5,marginBottom:8},boxModelMetricsTable:{backgroundColor:f.white,borderRadius:10,padding:12,borderWidth:1,borderColor:"#E2E8F0"},tableTitle:{fontSize:10,fontFamily:F.bold,color:"#64748B",letterSpacing:.5,marginBottom:8},tableRow:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:"#F1F5F9",paddingVertical:6},tableHeaderCell:{flex:1,fontSize:10,fontFamily:F.bold,color:"#94A3B8",textAlign:"center"},tableCell:{flex:1,fontSize:11,fontFamily:F.medium,color:"#334155",textAlign:"center"},insetsCard:{backgroundColor:f.white,borderRadius:10,padding:12,borderWidth:1,borderColor:"#E2E8F0"},insetsGrid:{gap:6},insetRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:4,borderBottomWidth:1,borderBottomColor:"#F8FAFC"},insetLabel:{fontSize:11,fontFamily:F.medium,color:"#64748B"},insetValue:{fontSize:11.5,fontFamily:F.bold,color:"#0F172A"},treeTabContainer:{gap:10},treeHeaderCard:{backgroundColor:f.white,borderRadius:10,padding:12,borderWidth:1,borderColor:"#E2E8F0"},treeHeaderTitle:{fontSize:10.5,fontFamily:F.bold,color:"#64748B",letterSpacing:.5,marginBottom:4},treeHeaderSubtitle:{fontSize:11,fontFamily:F.regular,color:"#94A3B8",lineHeight:16},treeList:{gap:6},treeItemCard:{backgroundColor:f.white,borderRadius:8,padding:10,borderWidth:1,borderColor:"#E2E8F0"},treeItemCardActive:{backgroundColor:"#EEF2FF",borderColor:"#6366F1",borderLeftWidth:3.5,borderLeftColor:f.brandPurple},treeItemTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},treeTagRow:{flexDirection:"row",alignItems:"center",gap:6},depthBadge:{backgroundColor:"#F1F5F9",paddingHorizontal:5,paddingVertical:2,borderRadius:4},depthBadgeActive:{backgroundColor:f.brandPurple},depthBadgeText:{fontSize:9,fontFamily:F.bold,color:"#64748B"},depthBadgeTextActive:{color:f.white},treeTagName:{fontSize:12,fontFamily:F.bold,color:"#334155"},treeTagNameActive:{color:f.brandPurple},activePillBadge:{backgroundColor:"#10B98118",paddingHorizontal:6,paddingVertical:2,borderRadius:4},activePillBadgeText:{fontSize:9,fontFamily:F.bold,color:"#059669"},inspectArrowBtn:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:"#F8FAFC"},inspectArrowBtnText:{fontSize:10,fontFamily:F.medium,color:"#64748B"},treeItemBottomRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:6,paddingTop:4,borderTopWidth:1,borderTopColor:"#F1F5F9"},treeItemMetric:{fontSize:9.5,fontFamily:F.regular,color:"#94A3B8"},treeItemHostBadge:{fontSize:9,fontFamily:F.semiBold,color:"#6366F1"},propsTabContainer:{gap:10},propsSearchRow:{flexDirection:"row",gap:8,alignItems:"center"},searchBar:{flex:1,flexDirection:"row",alignItems:"center",gap:8,backgroundColor:f.white,paddingHorizontal:10,borderRadius:8,borderWidth:1,borderColor:"#E2E8F0",height:36},searchInput:{flex:1,fontSize:11.5,fontFamily:F.regular,color:"#0F172A",padding:0},copyPropsBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:f.brandPurple,paddingHorizontal:10,height:36,borderRadius:8},copyPropsBtnText:{fontSize:10.5,fontFamily:F.bold,color:f.white},emptyPropsBox:{padding:24,alignItems:"center",backgroundColor:f.white,borderRadius:8,borderWidth:1,borderColor:"#E2E8F0"},emptyPropsText:{fontSize:12,fontFamily:F.medium,color:"#94A3B8"},propsList:{gap:6},propItemCard:{backgroundColor:f.white,borderRadius:8,padding:10,borderWidth:1,borderColor:"#E2E8F0"},propHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:4},propKeyName:{fontSize:12,fontFamily:F.bold,color:"#1E293B"},typeBadgePrimary:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:"#F1F5F9"},typeBadgeFn:{backgroundColor:"#EEF2FF"},typeBadgeObj:{backgroundColor:"#FEF3C7"},typeBadgePrim:{backgroundColor:"#ECFDF5"},typeBadgePrimaryText:{fontSize:9,fontFamily:F.bold,color:"#475569"},propValueText:{fontSize:11,fontFamily:"Courier",color:"#334155",marginTop:2},jsonViewerWrapper:{marginTop:4},modalBackdrop:{flex:1,backgroundColor:"rgba(15, 23, 42, 0.85)",justifyContent:"center",alignItems:"center",padding:20},modalCard:{width:"100%",maxHeight:"80%",backgroundColor:"#1E293B",borderRadius:14,overflow:"hidden",borderWidth:1,borderColor:"#334155"},modalHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:14,paddingVertical:10,borderBottomWidth:1,borderBottomColor:"#334155"},modalTitle:{fontSize:12,fontFamily:F.bold,color:f.white},modalCloseBtn:{padding:4},modalImageContainer:{padding:12,alignItems:"center",justifyContent:"center"},modalImage:{width:"100%",height:260}});
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const UiInspectorOverlay: React.FC;
@@ -1,138 +0,0 @@
1
- import ye,{useCallback as pe,useRef as be,useState as U}from"react";import{Dimensions as fe,PanResponder as Be,Platform as xe,ScrollView as Me,StyleSheet as E,Text as B,TouchableOpacity as O,View as M}from"react-native";import{useInspector as we}from"./InspectorContext";import{createInspectedElement as Ce,extractBoxModel as Se,getDynamicInspectorDataForPoint as Fe,auditAccessibility as ve}from"../../helpers/uiInspectorEngine";import{ActiveTab as Pe}from"../../types";import{AppColors as P}from"../../styles/AppColors";import{AppFonts as S}from"../../styles/AppFonts";import{CloseIcon as Ie,LayersIcon as Te,RulerIcon as Ae}from"../NetworkIcons";import J from"../TouchableScale";import{takeNativeScreenshot as oe,triggerNativeHaptic as T}from"../../native/NativeInspector";export const UiInspectorOverlay=()=>{const{isInspectModeActive:ne,setIsInspectModeActive:K,selectedUiElement:t,setSelectedUiElement:V,showAlignmentGrid:W,setShowAlignmentGrid:ie,showDistanceGuides:ae,setShowDistanceGuides:Re,setVisible:re,switchActiveTab:le}=we(),[q,de]=U("top"),[N,Q]=U(!1),[se,G]=U(null),R=fe.get("window"),Z=pe(async x=>{const{pageX:F,pageY:v,locationX:I,locationY:Y}=x.nativeEvent,A=F??I??0,$=v??Y??0;try{const w=await Fe(A,$);if(w&&w.layout&&(w.layout.width>0||w.layout.height>0)){try{const te=await oe({rect:{x:Math.max(0,w.layout.pageX),y:Math.max(0,w.layout.pageY),width:Math.max(1,w.layout.width),height:Math.max(1,w.layout.height)},quality:.95,format:"png"});te?.uri&&(w.snapshotUri=te.uri)}catch{}G({x:w.layout.x,y:w.layout.y,width:w.layout.width,height:w.layout.height,componentName:w.displayName||w.componentName}),V(w),T();return}}catch{}const D=Math.round(Math.min(R.width-32,Math.max(48,A>R.width/2?(R.width-A)*1.5:A*1.5))),k=44,L=Math.max(0,Math.min(A-D/2,R.width-D)),H=Math.max(0,Math.min($-k/2,R.height-k));let ee;try{const w=await oe({rect:{x:Math.max(0,L),y:Math.max(0,H),width:Math.max(1,D),height:Math.max(1,k)},quality:.95,format:"png"});w?.uri&&(ee=w.uri)}catch{}const ce=Ce("View",{accessible:!0,style:{position:"absolute",left:Math.round(L),top:Math.round(H),width:D,height:k}},{x:Math.round(L),y:Math.round(H),width:D,height:k,pageX:Math.round(L),pageY:Math.round(H)},void 0,void 0,ee);G({x:Math.round(L),y:Math.round(H),width:D,height:k,componentName:"View"}),V(ce),T()},[R,V]),he=be(Be.create({onStartShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponder:()=>!0,onPanResponderGrant:x=>Z(x),onPanResponderMove:x=>Z(x)})).current;if(!ne)return null;const C=se||(t?{x:t.layout.pageX,y:t.layout.pageY,width:t.layout.width,height:t.layout.height,componentName:t.componentName}:null),X=t?.hierarchy||[],ue=t?.flattenedStyles||{},z=t?.boxModel||{margin:{top:0,right:0,bottom:0,left:0},border:{top:0,right:0,bottom:0,left:0},padding:{top:0,right:0,bottom:0,left:0},content:{width:t?.layout.width||0,height:t?.layout.height||0}},_=Object.entries(ue).filter(([x,F])=>F==null||typeof F=="object"?!1:["overflow","fontSize","fontWeight","color","letterSpacing","lineHeight","backgroundColor","borderRadius","flexDirection","justifyContent","alignItems","flex","opacity","zIndex"].includes(x)),ge=x=>{if(!t||x.componentName===t.componentName)return;T();const F=x.props||{},v=x.styles||(F.style?E.flatten(F.style):{})||{},I=x.layout||{...t.layout,width:v.width||t.layout.width,height:v.height||t.layout.height},Y=Se(v,I),A=ve(F,I,v);V({...t,componentName:x.componentName,displayName:x.displayName,props:F,originalStyles:v,flattenedStyles:v,tweakedStyles:{},layout:I,boxModel:Y,a11y:A}),G({x:I.x??t.layout.x,y:I.y??t.layout.y,width:I.width,height:I.height,componentName:x.displayName||x.componentName})},me=()=>{T(),K(!1),le(Pe.Ui),re(!0)};return<M style={[E.absoluteFill,e.overlayContainer]}pointerEvents="box-none">
2
-
3
- <M style={E.absoluteFill}{...he.panHandlers}/>
4
-
5
-
6
- {W&&<M style={[E.absoluteFill,e.gridPattern]}pointerEvents="none"/>}
7
-
8
-
9
- {t&&<M style={[e.devToolsHudContainer,q==="top"?e.hudTop:e.hudBottom]}pointerEvents="box-none">
10
-
11
- <M style={e.hudBreadcrumbBar}>
12
- <Me horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.hudBreadcrumbContent}>
13
- {X.length>0?X.map((x,F)=>{const v=F===X.length-1||x.componentName===t.componentName;return<ye.Fragment key={x.id||F}>
14
- {F>0&&<B style={e.hudDotSeparator}>•</B>}
15
- <O style={[e.hudBreadcrumbChip,v&&e.hudBreadcrumbChipActive]}onPress={()=>ge(x)}>
16
- <B style={[e.hudBreadcrumbText,v&&e.hudBreadcrumbTextActive]}>
17
- {x.displayName||x.componentName}
18
- </B>
19
- </O>
20
- </ye.Fragment>}):<M style={e.hudBreadcrumbChipActive}>
21
- <B style={e.hudBreadcrumbTextActive}>
22
- {t.componentName}
23
- </B>
24
- </M>}
25
- </Me>
26
-
27
-
28
- <O style={e.hudFlipBtn}onPress={()=>{T(),de(q==="top"?"bottom":"top")}}>
29
- <B style={e.hudFlipBtnText}>🔄</B>
30
- </O>
31
- </M>
32
-
33
-
34
- <M style={e.hudBodyRow}pointerEvents="none">
35
-
36
- <M style={e.hudStylesColumn}>
37
- {_.length>0?_.slice(0,7).map(([x,F])=><M key={x}style={e.hudStyleRow}>
38
- <B style={e.hudStyleKey}>{x}:</B>
39
- <B style={e.hudStyleVal}numberOfLines={1}>
40
- {String(F)}
41
- </B>
42
- </M>):<M style={e.hudStyleRow}>
43
- <B style={e.hudStyleKey}>layout:</B>
44
- <B style={e.hudStyleVal}>default</B>
45
- </M>}
46
- </M>
47
-
48
-
49
- <M style={e.hudBoxModelWrapper}>
50
- <M style={e.boxModelMarginLayer}>
51
- <B style={e.boxModelMarginLabel}>margin</B>
52
- <B style={e.boxModelInsetTop}>{z.margin.top}</B>
53
- <B style={e.boxModelInsetRight}>{z.margin.right}</B>
54
- <B style={e.boxModelInsetBottom}>{z.margin.bottom}</B>
55
- <B style={e.boxModelInsetLeft}>{z.margin.left}</B>
56
-
57
- <M style={e.boxModelPaddingLayer}>
58
- <B style={e.boxModelPaddingLabel}>padding</B>
59
- <B style={e.boxModelInsetTop}>{z.padding.top}</B>
60
- <B style={e.boxModelInsetRight}>{z.padding.right}</B>
61
- <B style={e.boxModelInsetBottom}>{z.padding.bottom}</B>
62
- <B style={e.boxModelInsetLeft}>{z.padding.left}</B>
63
-
64
- <M style={e.boxModelContentLayer}>
65
- <B style={e.boxModelCoords}>
66
- ({Math.round(t.layout.pageX)},{" "}
67
- {Math.round(t.layout.pageY)})
68
- </B>
69
- <B style={e.boxModelDimensions}>
70
- {Math.round(t.layout.width)} ×{" "}
71
- {Math.round(t.layout.height)}
72
- </B>
73
- </M>
74
- </M>
75
- </M>
76
- </M>
77
- </M>
78
- </M>}
79
-
80
-
81
- {C&&<M pointerEvents="none"style={[e.highlightBox,{top:C.y,left:C.x,width:C.width,height:C.height}]}>
82
-
83
- <M style={e.contentTint}/>
84
-
85
-
86
- <M style={[e.elementBadge,C.y<50?e.elementBadgeBottom:e.elementBadgeTop]}>
87
- <B style={e.elementBadgeTag}>&lt;{C.componentName}&gt;</B>
88
- <B style={e.elementBadgeDim}>
89
- {Math.round(C.width)} × {Math.round(C.height)} pt
90
- </B>
91
- </M>
92
- </M>}
93
-
94
-
95
- {ae&&C&&<M style={E.absoluteFill}pointerEvents="none">
96
-
97
- <M style={[e.guideLineV,{top:0,left:C.x+C.width/2,height:C.y}]}>
98
- <B style={e.guideBadge}>{Math.round(C.y)} pt</B>
99
- </M>
100
-
101
-
102
- <M style={[e.guideLineH,{top:C.y+C.height/2,left:0,width:C.x}]}>
103
- <B style={e.guideBadge}>{Math.round(C.x)} pt</B>
104
- </M>
105
- </M>}
106
-
107
-
108
- <M style={e.hudToolbar}>
109
- <M style={e.hudLeftGroup}>
110
- <O style={[e.modePillBtn,!N&&e.modePillBtnActive]}onPress={()=>{T(),Q(!1)}}>
111
- <B style={[e.modePillText,!N&&e.modePillTextActive]}>
112
- Inspect
113
- </B>
114
- </O>
115
-
116
- <O style={[e.modePillBtn,N&&e.modePillBtnActive]}onPress={()=>{T(),Q(!N)}}>
117
- <B style={[e.modePillText,N&&e.modePillTextActive]}>
118
- Touchables
119
- </B>
120
- </O>
121
- </M>
122
-
123
- <M style={e.hudActions}>
124
- <J style={[e.hudBtn,W&&e.hudBtnActive]}onPress={()=>{T(),ie(!W)}}>
125
- <Ae color={W?P.white:"#CBD5E1"}size={14}/>
126
- </J>
127
-
128
- {t&&<J style={[e.hudBtn,e.hudBtnPrimary]}onPress={me}>
129
- <Te color={P.white}size={13}/>
130
- <B style={e.hudBtnPrimaryText}>Full JSX & Specs</B>
131
- </J>}
132
-
133
- <J style={[e.hudBtn,e.hudBtnClose]}onPress={()=>{T(),K(!1)}}>
134
- <Ie color={P.white}size={13}/>
135
- </J>
136
- </M>
137
- </M>
138
- </M>};const e=E.create({overlayContainer:{zIndex:99999999,elevation:99999999},gridPattern:{backgroundColor:"transparent",borderWidth:0,opacity:.15},devToolsHudContainer:{position:"absolute",left:0,right:0,backgroundColor:"rgba(15, 23, 42, 0.88)",paddingTop:xe.OS==="ios"?44:20,paddingBottom:10,paddingHorizontal:12,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.12)",zIndex:999999999,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.4,shadowRadius:8,elevation:12},hudTop:{top:0},hudBottom:{bottom:60,borderTopWidth:1,borderTopColor:"rgba(255, 255, 255, 0.12)",paddingTop:10},hudBreadcrumbBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:8},hudBreadcrumbContent:{alignItems:"center",gap:4,paddingRight:10},hudDotSeparator:{color:"#94A3B8",fontSize:12,paddingHorizontal:2},hudBreadcrumbChip:{paddingHorizontal:6,paddingVertical:2.5,borderRadius:4},hudBreadcrumbChipActive:{backgroundColor:"rgba(255, 255, 255, 0.18)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.35)"},hudBreadcrumbText:{color:"#CBD5E1",fontSize:11,fontFamily:S.medium},hudBreadcrumbTextActive:{color:"#FFFFFF",fontFamily:S.bold},hudFlipBtn:{padding:4,borderRadius:4,backgroundColor:"rgba(255, 255, 255, 0.12)"},hudFlipBtnText:{fontSize:12},hudBodyRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",marginTop:4},hudStylesColumn:{flex:1,paddingRight:8,gap:2},hudStyleRow:{flexDirection:"row",alignItems:"center",gap:4},hudStyleKey:{color:"#94A3B8",fontSize:10,fontFamily:S.regular},hudStyleVal:{color:"#F8FAFC",fontSize:10,fontFamily:S.bold},hudBoxModelWrapper:{width:140,height:90,alignItems:"center",justifyContent:"center"},boxModelMarginLayer:{width:"100%",height:"100%",borderWidth:1,borderColor:"rgba(245, 158, 11, 0.6)",backgroundColor:"rgba(245, 158, 11, 0.08)",borderRadius:4,alignItems:"center",justifyContent:"center",position:"relative",padding:12},boxModelMarginLabel:{position:"absolute",top:2,left:4,fontSize:8,fontFamily:S.bold,color:"#F59E0B"},boxModelPaddingLayer:{width:"100%",height:"100%",borderWidth:1,borderColor:"rgba(251, 191, 36, 0.6)",backgroundColor:"rgba(251, 191, 36, 0.08)",borderRadius:3,alignItems:"center",justifyContent:"center",position:"relative",padding:6},boxModelPaddingLabel:{position:"absolute",top:1,left:3,fontSize:7.5,fontFamily:S.bold,color:"#FBBF24"},boxModelContentLayer:{alignItems:"center",justifyContent:"center"},boxModelCoords:{color:"#FACC15",fontSize:8,fontFamily:S.bold},boxModelDimensions:{color:"#FACC15",fontSize:9,fontFamily:S.bold},boxModelInsetTop:{position:"absolute",top:1,alignSelf:"center",fontSize:7.5,color:"#CBD5E1",fontFamily:S.medium},boxModelInsetBottom:{position:"absolute",bottom:1,alignSelf:"center",fontSize:7.5,color:"#CBD5E1",fontFamily:S.medium},boxModelInsetLeft:{position:"absolute",left:2,alignSelf:"center",fontSize:7.5,color:"#CBD5E1",fontFamily:S.medium},boxModelInsetRight:{position:"absolute",right:2,alignSelf:"center",fontSize:7.5,color:"#CBD5E1",fontFamily:S.medium},highlightBox:{position:"absolute",borderWidth:1.5,borderColor:"#4F46E5",backgroundColor:"rgba(79, 70, 229, 0.15)",borderRadius:4,zIndex:100},contentTint:{flex:1,backgroundColor:"rgba(16, 185, 129, 0.1)",margin:3,borderRadius:2,borderWidth:1,borderColor:"rgba(16, 185, 129, 0.35)",borderStyle:"dashed"},elementBadge:{position:"absolute",flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(15, 23, 42, 0.85)",paddingHorizontal:7,paddingVertical:3.5,borderRadius:5,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.2)"},elementBadgeTop:{top:-26,left:0},elementBadgeBottom:{bottom:-26,left:0},elementBadgeTag:{fontSize:10.5,fontFamily:S.bold,color:"#818CF8"},elementBadgeDim:{fontSize:9.5,fontFamily:S.medium,color:"#E2E8F0"},guideLineV:{position:"absolute",width:1,backgroundColor:"#EF4444",alignItems:"center",justifyContent:"center"},guideLineH:{position:"absolute",height:1,backgroundColor:"#EF4444",alignItems:"center",justifyContent:"center"},guideBadge:{backgroundColor:"#EF4444",color:P.white,fontSize:9,fontFamily:S.bold,paddingHorizontal:4,paddingVertical:1,borderRadius:3},hudToolbar:{position:"absolute",bottom:24,left:14,right:14,backgroundColor:"rgba(15, 23, 42, 0.92)",borderRadius:12,paddingHorizontal:12,paddingVertical:8,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.4,shadowRadius:8,elevation:10},hudLeftGroup:{flexDirection:"row",alignItems:"center",gap:4},modePillBtn:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:"rgba(255, 255, 255, 0.08)"},modePillBtnActive:{backgroundColor:P.brandPurple},modePillText:{fontSize:10.5,fontFamily:S.medium,color:"#94A3B8"},modePillTextActive:{color:P.white,fontFamily:S.bold},hudActions:{flexDirection:"row",alignItems:"center",gap:6},hudBtn:{paddingHorizontal:8,paddingVertical:5,borderRadius:6,backgroundColor:"rgba(255, 255, 255, 0.1)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",alignItems:"center",justifyContent:"center"},hudBtnActive:{backgroundColor:P.brandPurple,borderColor:P.brandPurple},hudBtnPrimary:{flexDirection:"row",gap:4,backgroundColor:P.brandPurple,borderColor:P.brandPurple},hudBtnPrimaryText:{fontSize:10.5,fontFamily:S.bold,color:P.white},hudBtnClose:{backgroundColor:"#E11D48",borderColor:"#E11D48"}});
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const UiInspectorTab: React.FC;