react-native-debug-toolkit 2.0.0 → 2.2.0

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 (443) hide show
  1. package/README.md +82 -120
  2. package/README.zh-CN.md +171 -0
  3. package/lib/commonjs/core/DebugToolkit.js +117 -115
  4. package/lib/commonjs/core/DebugToolkit.js.map +1 -1
  5. package/lib/commonjs/core/DebugToolkitProvider.js +38 -30
  6. package/lib/commonjs/core/DebugToolkitProvider.js.map +1 -1
  7. package/lib/commonjs/core/initialize.js +84 -0
  8. package/lib/commonjs/core/initialize.js.map +1 -0
  9. package/lib/commonjs/{components → features/clipboard}/ClipboardTab.js +16 -17
  10. package/lib/commonjs/features/clipboard/ClipboardTab.js.map +1 -0
  11. package/lib/commonjs/features/{ClipboardFeature.js → clipboard/index.js} +9 -5
  12. package/lib/commonjs/features/clipboard/index.js.map +1 -0
  13. package/lib/commonjs/features/console/ConsoleLogTab.js +162 -0
  14. package/lib/commonjs/features/console/ConsoleLogTab.js.map +1 -0
  15. package/lib/commonjs/features/console/index.js +118 -0
  16. package/lib/commonjs/features/console/index.js.map +1 -0
  17. package/lib/commonjs/{components → features/environment}/EnvironmentTab.js +24 -25
  18. package/lib/commonjs/features/environment/EnvironmentTab.js.map +1 -0
  19. package/lib/commonjs/features/{EnvironmentFeature.js → environment/index.js} +22 -25
  20. package/lib/commonjs/features/environment/index.js.map +1 -0
  21. package/lib/commonjs/{components → features/navigation}/NavigationLogTab.js +11 -10
  22. package/lib/commonjs/features/navigation/NavigationLogTab.js.map +1 -0
  23. package/lib/commonjs/features/navigation/index.js +39 -0
  24. package/lib/commonjs/features/navigation/index.js.map +1 -0
  25. package/lib/commonjs/{hooks → features/navigation}/useNavigationLogger.js +3 -3
  26. package/lib/commonjs/features/navigation/useNavigationLogger.js.map +1 -0
  27. package/lib/commonjs/features/network/NetworkLogTab.js +405 -0
  28. package/lib/commonjs/features/network/NetworkLogTab.js.map +1 -0
  29. package/lib/commonjs/features/network/index.js +96 -0
  30. package/lib/commonjs/features/network/index.js.map +1 -0
  31. package/lib/commonjs/features/network/networkInterceptor.js +261 -0
  32. package/lib/commonjs/features/network/networkInterceptor.js.map +1 -0
  33. package/lib/commonjs/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.js +10 -9
  34. package/lib/commonjs/features/thirdPartyLibs/ThirdPartyLibsTab.js.map +1 -0
  35. package/lib/commonjs/features/{ThirdPartyLibsFeature.js → thirdPartyLibs/index.js} +8 -8
  36. package/lib/commonjs/features/thirdPartyLibs/index.js.map +1 -0
  37. package/lib/commonjs/{native/NativeDebugLibs.js → features/thirdPartyLibs/nativeDebugLibs.js} +1 -1
  38. package/lib/commonjs/features/thirdPartyLibs/nativeDebugLibs.js.map +1 -0
  39. package/lib/commonjs/features/track/TrackLogTab.js +230 -0
  40. package/lib/commonjs/features/track/TrackLogTab.js.map +1 -0
  41. package/lib/commonjs/features/track/index.js +39 -0
  42. package/lib/commonjs/features/track/index.js.map +1 -0
  43. package/lib/commonjs/features/zustand/ZustandLogTab.js +311 -0
  44. package/lib/commonjs/features/zustand/ZustandLogTab.js.map +1 -0
  45. package/lib/commonjs/features/zustand/index.js +59 -0
  46. package/lib/commonjs/features/zustand/index.js.map +1 -0
  47. package/lib/commonjs/index.js +27 -40
  48. package/lib/commonjs/index.js.map +1 -1
  49. package/lib/commonjs/types/environment.js +2 -0
  50. package/lib/commonjs/types/environment.js.map +1 -0
  51. package/lib/commonjs/types/feature.js +6 -0
  52. package/lib/commonjs/types/feature.js.map +1 -0
  53. package/lib/commonjs/types/index.js +0 -4
  54. package/lib/commonjs/types/logs.js +2 -0
  55. package/lib/commonjs/types/logs.js.map +1 -0
  56. package/lib/commonjs/types/navigation.js +2 -0
  57. package/lib/commonjs/types/navigation.js.map +1 -0
  58. package/lib/commonjs/types/thirdPartyLibs.js +2 -0
  59. package/lib/commonjs/types/thirdPartyLibs.js.map +1 -0
  60. package/lib/commonjs/ui/DebugView.js +66 -0
  61. package/lib/commonjs/ui/DebugView.js.map +1 -0
  62. package/lib/commonjs/ui/floating/FloatIcon.js +240 -0
  63. package/lib/commonjs/ui/floating/FloatIcon.js.map +1 -0
  64. package/lib/commonjs/ui/panel/DebugPanel.js +230 -0
  65. package/lib/commonjs/ui/panel/DebugPanel.js.map +1 -0
  66. package/lib/commonjs/ui/panel/FeatureTabBar.js +182 -0
  67. package/lib/commonjs/ui/panel/FeatureTabBar.js.map +1 -0
  68. package/lib/commonjs/ui/panel/FloatPanelView.js +238 -0
  69. package/lib/commonjs/ui/panel/FloatPanelView.js.map +1 -0
  70. package/lib/commonjs/{components → ui}/shared/CollapsibleSection.js +4 -4
  71. package/lib/commonjs/ui/shared/CollapsibleSection.js.map +1 -0
  72. package/lib/commonjs/{components → ui}/shared/CopyButton.js +3 -3
  73. package/lib/commonjs/ui/shared/CopyButton.js.map +1 -0
  74. package/lib/commonjs/ui/shared/JsonView.js.map +1 -0
  75. package/lib/commonjs/ui/shared/LogListScreen.js +174 -0
  76. package/lib/commonjs/ui/shared/LogListScreen.js.map +1 -0
  77. package/lib/commonjs/ui/shared/useSlideDetailAnimation.js.map +1 -0
  78. package/lib/commonjs/ui/theme/colors.js +43 -0
  79. package/lib/commonjs/ui/theme/colors.js.map +1 -0
  80. package/lib/commonjs/ui/theme/layout.js +8 -0
  81. package/lib/commonjs/ui/theme/layout.js.map +1 -0
  82. package/lib/commonjs/utils/createChannelFeature.js +62 -0
  83. package/lib/commonjs/utils/createChannelFeature.js.map +1 -0
  84. package/lib/commonjs/utils/createObservableStore.js +5 -0
  85. package/lib/commonjs/utils/createObservableStore.js.map +1 -1
  86. package/lib/commonjs/utils/createPersistedObservableStore.js +71 -0
  87. package/lib/commonjs/utils/createPersistedObservableStore.js.map +1 -0
  88. package/lib/commonjs/utils/debugPreferences.js +52 -0
  89. package/lib/commonjs/utils/debugPreferences.js.map +1 -0
  90. package/lib/commonjs/utils/urlRewriterRegistry.js +14 -0
  91. package/lib/commonjs/utils/urlRewriterRegistry.js.map +1 -0
  92. package/lib/module/core/DebugToolkit.js +117 -114
  93. package/lib/module/core/DebugToolkit.js.map +1 -1
  94. package/lib/module/core/DebugToolkitProvider.js +39 -31
  95. package/lib/module/core/DebugToolkitProvider.js.map +1 -1
  96. package/lib/module/core/initialize.js +80 -0
  97. package/lib/module/core/initialize.js.map +1 -0
  98. package/lib/module/{components → features/clipboard}/ClipboardTab.js +9 -9
  99. package/lib/module/features/clipboard/ClipboardTab.js.map +1 -0
  100. package/lib/module/features/clipboard/index.js +16 -0
  101. package/lib/module/features/clipboard/index.js.map +1 -0
  102. package/lib/module/features/console/ConsoleLogTab.js +157 -0
  103. package/lib/module/features/console/ConsoleLogTab.js.map +1 -0
  104. package/lib/module/features/console/index.js +112 -0
  105. package/lib/module/features/console/index.js.map +1 -0
  106. package/lib/module/{components → features/environment}/EnvironmentTab.js +5 -5
  107. package/lib/module/features/environment/EnvironmentTab.js.map +1 -0
  108. package/lib/module/features/{EnvironmentFeature.js → environment/index.js} +22 -25
  109. package/lib/module/features/environment/index.js.map +1 -0
  110. package/lib/module/{components → features/navigation}/NavigationLogTab.js +4 -3
  111. package/lib/module/features/navigation/NavigationLogTab.js.map +1 -0
  112. package/lib/module/features/navigation/index.js +32 -0
  113. package/lib/module/features/navigation/index.js.map +1 -0
  114. package/lib/module/{hooks → features/navigation}/useNavigationLogger.js +2 -2
  115. package/lib/module/features/navigation/useNavigationLogger.js.map +1 -0
  116. package/lib/module/features/network/NetworkLogTab.js +400 -0
  117. package/lib/module/features/network/NetworkLogTab.js.map +1 -0
  118. package/lib/module/features/network/index.js +90 -0
  119. package/lib/module/features/network/index.js.map +1 -0
  120. package/lib/module/features/network/networkInterceptor.js +256 -0
  121. package/lib/module/features/network/networkInterceptor.js.map +1 -0
  122. package/lib/module/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.js +3 -2
  123. package/lib/module/features/thirdPartyLibs/ThirdPartyLibsTab.js.map +1 -0
  124. package/lib/module/features/{ThirdPartyLibsFeature.js → thirdPartyLibs/index.js} +4 -4
  125. package/lib/module/features/thirdPartyLibs/index.js.map +1 -0
  126. package/lib/module/{native/NativeDebugLibs.js → features/thirdPartyLibs/nativeDebugLibs.js} +1 -1
  127. package/lib/module/features/thirdPartyLibs/nativeDebugLibs.js.map +1 -0
  128. package/lib/module/features/track/TrackLogTab.js +225 -0
  129. package/lib/module/features/track/TrackLogTab.js.map +1 -0
  130. package/lib/module/features/track/index.js +32 -0
  131. package/lib/module/features/track/index.js.map +1 -0
  132. package/lib/module/features/zustand/ZustandLogTab.js +306 -0
  133. package/lib/module/features/zustand/ZustandLogTab.js.map +1 -0
  134. package/lib/module/features/zustand/index.js +53 -0
  135. package/lib/module/features/zustand/index.js.map +1 -0
  136. package/lib/module/index.js +11 -12
  137. package/lib/module/index.js.map +1 -1
  138. package/lib/module/types/environment.js +2 -0
  139. package/lib/module/types/environment.js.map +1 -0
  140. package/lib/module/types/feature.js +4 -0
  141. package/lib/module/types/feature.js.map +1 -0
  142. package/lib/module/types/index.js +0 -2
  143. package/lib/module/types/logs.js +2 -0
  144. package/lib/module/types/logs.js.map +1 -0
  145. package/lib/module/types/navigation.js +2 -0
  146. package/lib/module/types/navigation.js.map +1 -0
  147. package/lib/module/types/thirdPartyLibs.js +2 -0
  148. package/lib/module/types/thirdPartyLibs.js.map +1 -0
  149. package/lib/module/ui/DebugView.js +61 -0
  150. package/lib/module/ui/DebugView.js.map +1 -0
  151. package/lib/module/ui/floating/FloatIcon.js +235 -0
  152. package/lib/module/ui/floating/FloatIcon.js.map +1 -0
  153. package/lib/module/ui/panel/DebugPanel.js +225 -0
  154. package/lib/module/ui/panel/DebugPanel.js.map +1 -0
  155. package/lib/module/ui/panel/FeatureTabBar.js +177 -0
  156. package/lib/module/ui/panel/FeatureTabBar.js.map +1 -0
  157. package/lib/module/ui/panel/FloatPanelView.js +233 -0
  158. package/lib/module/ui/panel/FloatPanelView.js.map +1 -0
  159. package/lib/module/{components → ui}/shared/CollapsibleSection.js +1 -1
  160. package/lib/module/ui/shared/CollapsibleSection.js.map +1 -0
  161. package/lib/module/{components → ui}/shared/CopyButton.js +1 -1
  162. package/lib/module/ui/shared/CopyButton.js.map +1 -0
  163. package/lib/module/ui/shared/JsonView.js.map +1 -0
  164. package/lib/module/ui/shared/LogListScreen.js +169 -0
  165. package/lib/module/ui/shared/LogListScreen.js.map +1 -0
  166. package/lib/module/ui/shared/useSlideDetailAnimation.js.map +1 -0
  167. package/lib/module/ui/theme/colors.js +38 -0
  168. package/lib/module/ui/theme/colors.js.map +1 -0
  169. package/lib/module/ui/theme/layout.js +4 -0
  170. package/lib/module/ui/theme/layout.js.map +1 -0
  171. package/lib/module/utils/createChannelFeature.js +58 -0
  172. package/lib/module/utils/createChannelFeature.js.map +1 -0
  173. package/lib/module/utils/createObservableStore.js +5 -0
  174. package/lib/module/utils/createObservableStore.js.map +1 -1
  175. package/lib/module/utils/createPersistedObservableStore.js +67 -0
  176. package/lib/module/utils/createPersistedObservableStore.js.map +1 -0
  177. package/lib/module/utils/debugPreferences.js +46 -0
  178. package/lib/module/utils/debugPreferences.js.map +1 -0
  179. package/lib/module/utils/urlRewriterRegistry.js +10 -0
  180. package/lib/module/utils/urlRewriterRegistry.js.map +1 -0
  181. package/lib/typescript/src/core/DebugToolkit.d.ts +17 -20
  182. package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
  183. package/lib/typescript/src/core/DebugToolkitProvider.d.ts +4 -7
  184. package/lib/typescript/src/core/DebugToolkitProvider.d.ts.map +1 -1
  185. package/lib/typescript/src/core/initialize.d.ts +32 -0
  186. package/lib/typescript/src/core/initialize.d.ts.map +1 -0
  187. package/lib/typescript/src/features/clipboard/ClipboardTab.d.ts +4 -0
  188. package/lib/typescript/src/features/clipboard/ClipboardTab.d.ts.map +1 -0
  189. package/lib/typescript/src/features/clipboard/index.d.ts +7 -0
  190. package/lib/typescript/src/features/clipboard/index.d.ts.map +1 -0
  191. package/lib/typescript/src/{components → features/console}/ConsoleLogTab.d.ts +2 -2
  192. package/lib/typescript/src/features/console/ConsoleLogTab.d.ts.map +1 -0
  193. package/lib/typescript/src/features/console/index.d.ts +9 -0
  194. package/lib/typescript/src/features/console/index.d.ts.map +1 -0
  195. package/lib/typescript/src/{components → features/environment}/EnvironmentTab.d.ts +1 -1
  196. package/lib/typescript/src/features/environment/EnvironmentTab.d.ts.map +1 -0
  197. package/lib/typescript/src/features/{EnvironmentFeature.d.ts → environment/index.d.ts} +2 -2
  198. package/lib/typescript/src/features/environment/index.d.ts.map +1 -0
  199. package/lib/typescript/src/{components → features/navigation}/NavigationLogTab.d.ts +2 -2
  200. package/lib/typescript/src/features/navigation/NavigationLogTab.d.ts.map +1 -0
  201. package/lib/typescript/src/features/{NavigationLogFeature.d.ts → navigation/index.d.ts} +5 -3
  202. package/lib/typescript/src/features/navigation/index.d.ts.map +1 -0
  203. package/lib/typescript/src/{hooks → features/navigation}/useNavigationLogger.d.ts +1 -8
  204. package/lib/typescript/src/features/navigation/useNavigationLogger.d.ts.map +1 -0
  205. package/lib/typescript/src/{components → features/network}/NetworkLogTab.d.ts +2 -2
  206. package/lib/typescript/src/features/network/NetworkLogTab.d.ts.map +1 -0
  207. package/lib/typescript/src/features/network/index.d.ts +15 -0
  208. package/lib/typescript/src/features/network/index.d.ts.map +1 -0
  209. package/lib/typescript/src/features/network/networkInterceptor.d.ts +19 -0
  210. package/lib/typescript/src/features/network/networkInterceptor.d.ts.map +1 -0
  211. package/lib/typescript/src/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.d.ts +2 -2
  212. package/lib/typescript/src/features/thirdPartyLibs/ThirdPartyLibsTab.d.ts.map +1 -0
  213. package/lib/typescript/src/features/thirdPartyLibs/index.d.ts +3 -0
  214. package/lib/typescript/src/features/thirdPartyLibs/index.d.ts.map +1 -0
  215. package/lib/typescript/src/{native/NativeDebugLibs.d.ts → features/thirdPartyLibs/nativeDebugLibs.d.ts} +1 -1
  216. package/lib/typescript/src/features/thirdPartyLibs/nativeDebugLibs.d.ts.map +1 -0
  217. package/lib/typescript/src/{components → features/track}/TrackLogTab.d.ts +2 -2
  218. package/lib/typescript/src/features/track/TrackLogTab.d.ts.map +1 -0
  219. package/lib/typescript/src/features/{TrackFeature.d.ts → track/index.d.ts} +5 -3
  220. package/lib/typescript/src/features/track/index.d.ts.map +1 -0
  221. package/lib/typescript/src/{components → features/zustand}/ZustandLogTab.d.ts +2 -2
  222. package/lib/typescript/src/features/zustand/ZustandLogTab.d.ts.map +1 -0
  223. package/lib/typescript/src/features/{ZustandLogFeature.d.ts → zustand/index.d.ts} +5 -3
  224. package/lib/typescript/src/features/zustand/index.d.ts.map +1 -0
  225. package/lib/typescript/src/index.d.ts +20 -20
  226. package/lib/typescript/src/index.d.ts.map +1 -1
  227. package/lib/typescript/src/types/environment.d.ts +11 -0
  228. package/lib/typescript/src/types/environment.d.ts.map +1 -0
  229. package/lib/typescript/src/types/feature.d.ts +23 -0
  230. package/lib/typescript/src/types/feature.d.ts.map +1 -0
  231. package/lib/typescript/src/types/index.d.ts +5 -111
  232. package/lib/typescript/src/types/index.d.ts.map +1 -1
  233. package/lib/typescript/src/types/logs.d.ts +51 -0
  234. package/lib/typescript/src/types/logs.d.ts.map +1 -0
  235. package/lib/typescript/src/types/navigation.d.ts +8 -0
  236. package/lib/typescript/src/types/navigation.d.ts.map +1 -0
  237. package/lib/typescript/src/types/thirdPartyLibs.d.ts +13 -0
  238. package/lib/typescript/src/types/thirdPartyLibs.d.ts.map +1 -0
  239. package/lib/typescript/src/ui/DebugView.d.ts +19 -0
  240. package/lib/typescript/src/ui/DebugView.d.ts.map +1 -0
  241. package/lib/typescript/src/ui/floating/FloatIcon.d.ts +12 -0
  242. package/lib/typescript/src/ui/floating/FloatIcon.d.ts.map +1 -0
  243. package/lib/typescript/src/ui/panel/DebugPanel.d.ts +9 -0
  244. package/lib/typescript/src/ui/panel/DebugPanel.d.ts.map +1 -0
  245. package/lib/typescript/src/ui/panel/FeatureTabBar.d.ts +13 -0
  246. package/lib/typescript/src/ui/panel/FeatureTabBar.d.ts.map +1 -0
  247. package/lib/typescript/src/ui/panel/FloatPanelView.d.ts +12 -0
  248. package/lib/typescript/src/ui/panel/FloatPanelView.d.ts.map +1 -0
  249. package/lib/typescript/src/ui/shared/CollapsibleSection.d.ts.map +1 -0
  250. package/lib/typescript/src/ui/shared/CopyButton.d.ts.map +1 -0
  251. package/lib/typescript/src/ui/shared/JsonView.d.ts.map +1 -0
  252. package/lib/typescript/src/ui/shared/LogListScreen.d.ts +21 -0
  253. package/lib/typescript/src/ui/shared/LogListScreen.d.ts.map +1 -0
  254. package/lib/typescript/src/ui/shared/useSlideDetailAnimation.d.ts.map +1 -0
  255. package/lib/typescript/src/ui/theme/colors.d.ts +21 -0
  256. package/lib/typescript/src/ui/theme/colors.d.ts.map +1 -0
  257. package/lib/typescript/src/ui/theme/layout.d.ts +2 -0
  258. package/lib/typescript/src/ui/theme/layout.d.ts.map +1 -0
  259. package/lib/typescript/src/utils/createChannelFeature.d.ts +27 -0
  260. package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -0
  261. package/lib/typescript/src/utils/createObservableStore.d.ts +1 -0
  262. package/lib/typescript/src/utils/createObservableStore.d.ts.map +1 -1
  263. package/lib/typescript/src/utils/createPersistedObservableStore.d.ts +15 -0
  264. package/lib/typescript/src/utils/createPersistedObservableStore.d.ts.map +1 -0
  265. package/lib/typescript/src/utils/debugPreferences.d.ts +10 -0
  266. package/lib/typescript/src/utils/debugPreferences.d.ts.map +1 -0
  267. package/lib/typescript/src/utils/urlRewriterRegistry.d.ts +7 -0
  268. package/lib/typescript/src/utils/urlRewriterRegistry.d.ts.map +1 -0
  269. package/package.json +5 -1
  270. package/src/core/DebugToolkit.tsx +144 -142
  271. package/src/core/DebugToolkitProvider.tsx +44 -43
  272. package/src/core/initialize.ts +122 -0
  273. package/src/{components → features/clipboard}/ClipboardTab.tsx +10 -10
  274. package/src/features/clipboard/index.ts +15 -0
  275. package/src/features/console/ConsoleLogTab.tsx +95 -0
  276. package/src/features/console/index.ts +119 -0
  277. package/src/{components → features/environment}/EnvironmentTab.tsx +7 -7
  278. package/src/features/{EnvironmentFeature.ts → environment/index.ts} +27 -25
  279. package/src/{components → features/navigation}/NavigationLogTab.tsx +6 -5
  280. package/src/features/navigation/index.ts +44 -0
  281. package/src/{hooks → features/navigation}/useNavigationLogger.ts +3 -8
  282. package/src/features/network/NetworkLogTab.tsx +271 -0
  283. package/src/features/network/index.ts +113 -0
  284. package/src/features/network/networkInterceptor.ts +311 -0
  285. package/src/{components → features/thirdPartyLibs}/ThirdPartyLibsTab.tsx +6 -5
  286. package/src/features/{ThirdPartyLibsFeature.ts → thirdPartyLibs/index.ts} +5 -5
  287. package/src/features/track/TrackLogTab.tsx +110 -0
  288. package/src/features/track/index.ts +41 -0
  289. package/src/features/zustand/ZustandLogTab.tsx +203 -0
  290. package/src/features/{ZustandLogFeature.ts → zustand/index.ts} +19 -45
  291. package/src/index.ts +20 -24
  292. package/src/types/environment.ts +11 -0
  293. package/src/types/feature.ts +32 -0
  294. package/src/types/index.ts +29 -138
  295. package/src/types/logs.ts +54 -0
  296. package/src/types/navigation.ts +5 -0
  297. package/src/types/thirdPartyLibs.ts +13 -0
  298. package/src/ui/DebugView.tsx +80 -0
  299. package/src/ui/floating/FloatIcon.tsx +202 -0
  300. package/src/ui/panel/DebugPanel.tsx +215 -0
  301. package/src/ui/panel/FeatureTabBar.tsx +204 -0
  302. package/src/ui/panel/FloatPanelView.tsx +227 -0
  303. package/src/{components → ui}/shared/CollapsibleSection.tsx +1 -1
  304. package/src/{components → ui}/shared/CopyButton.tsx +1 -1
  305. package/src/ui/shared/LogListScreen.tsx +164 -0
  306. package/src/ui/theme/colors.ts +33 -0
  307. package/src/ui/theme/layout.ts +1 -0
  308. package/src/utils/createChannelFeature.ts +80 -0
  309. package/src/utils/createObservableStore.ts +6 -0
  310. package/src/utils/createPersistedObservableStore.ts +76 -0
  311. package/src/utils/debugPreferences.ts +48 -0
  312. package/src/utils/urlRewriterRegistry.ts +10 -0
  313. package/lib/commonjs/components/ClipboardTab.js.map +0 -1
  314. package/lib/commonjs/components/ConsoleLogTab.js +0 -295
  315. package/lib/commonjs/components/ConsoleLogTab.js.map +0 -1
  316. package/lib/commonjs/components/EnvironmentTab.js.map +0 -1
  317. package/lib/commonjs/components/FloatPanelView.js +0 -797
  318. package/lib/commonjs/components/FloatPanelView.js.map +0 -1
  319. package/lib/commonjs/components/NavigationLogTab.js.map +0 -1
  320. package/lib/commonjs/components/NetworkLogTab.js +0 -575
  321. package/lib/commonjs/components/NetworkLogTab.js.map +0 -1
  322. package/lib/commonjs/components/ThirdPartyLibsTab.js.map +0 -1
  323. package/lib/commonjs/components/TrackLogTab.js +0 -372
  324. package/lib/commonjs/components/TrackLogTab.js.map +0 -1
  325. package/lib/commonjs/components/ZustandLogTab.js +0 -451
  326. package/lib/commonjs/components/ZustandLogTab.js.map +0 -1
  327. package/lib/commonjs/components/shared/CollapsibleSection.js.map +0 -1
  328. package/lib/commonjs/components/shared/CopyButton.js.map +0 -1
  329. package/lib/commonjs/components/shared/JsonView.js.map +0 -1
  330. package/lib/commonjs/features/ClipboardFeature.js.map +0 -1
  331. package/lib/commonjs/features/ConsoleLogFeature.js +0 -98
  332. package/lib/commonjs/features/ConsoleLogFeature.js.map +0 -1
  333. package/lib/commonjs/features/EnvironmentFeature.js.map +0 -1
  334. package/lib/commonjs/features/NavigationLogFeature.js +0 -60
  335. package/lib/commonjs/features/NavigationLogFeature.js.map +0 -1
  336. package/lib/commonjs/features/NetworkFeature.js +0 -328
  337. package/lib/commonjs/features/NetworkFeature.js.map +0 -1
  338. package/lib/commonjs/features/ThirdPartyLibsFeature.js.map +0 -1
  339. package/lib/commonjs/features/TrackFeature.js +0 -55
  340. package/lib/commonjs/features/TrackFeature.js.map +0 -1
  341. package/lib/commonjs/features/ZustandLogFeature.js +0 -76
  342. package/lib/commonjs/features/ZustandLogFeature.js.map +0 -1
  343. package/lib/commonjs/hooks/useNavigationLogger.js.map +0 -1
  344. package/lib/commonjs/hooks/useSlideDetailAnimation.js.map +0 -1
  345. package/lib/commonjs/initialize.js +0 -161
  346. package/lib/commonjs/initialize.js.map +0 -1
  347. package/lib/commonjs/native/NativeDebugLibs.js.map +0 -1
  348. package/lib/commonjs/utils/constants.js +0 -135
  349. package/lib/commonjs/utils/constants.js.map +0 -1
  350. package/lib/module/components/ClipboardTab.js.map +0 -1
  351. package/lib/module/components/ConsoleLogTab.js +0 -290
  352. package/lib/module/components/ConsoleLogTab.js.map +0 -1
  353. package/lib/module/components/EnvironmentTab.js.map +0 -1
  354. package/lib/module/components/FloatPanelView.js +0 -791
  355. package/lib/module/components/FloatPanelView.js.map +0 -1
  356. package/lib/module/components/NavigationLogTab.js.map +0 -1
  357. package/lib/module/components/NetworkLogTab.js +0 -570
  358. package/lib/module/components/NetworkLogTab.js.map +0 -1
  359. package/lib/module/components/ThirdPartyLibsTab.js.map +0 -1
  360. package/lib/module/components/TrackLogTab.js +0 -367
  361. package/lib/module/components/TrackLogTab.js.map +0 -1
  362. package/lib/module/components/ZustandLogTab.js +0 -446
  363. package/lib/module/components/ZustandLogTab.js.map +0 -1
  364. package/lib/module/components/shared/CollapsibleSection.js.map +0 -1
  365. package/lib/module/components/shared/CopyButton.js.map +0 -1
  366. package/lib/module/components/shared/JsonView.js.map +0 -1
  367. package/lib/module/features/ClipboardFeature.js +0 -12
  368. package/lib/module/features/ClipboardFeature.js.map +0 -1
  369. package/lib/module/features/ConsoleLogFeature.js +0 -93
  370. package/lib/module/features/ConsoleLogFeature.js.map +0 -1
  371. package/lib/module/features/EnvironmentFeature.js.map +0 -1
  372. package/lib/module/features/NavigationLogFeature.js +0 -54
  373. package/lib/module/features/NavigationLogFeature.js.map +0 -1
  374. package/lib/module/features/NetworkFeature.js +0 -322
  375. package/lib/module/features/NetworkFeature.js.map +0 -1
  376. package/lib/module/features/ThirdPartyLibsFeature.js.map +0 -1
  377. package/lib/module/features/TrackFeature.js +0 -49
  378. package/lib/module/features/TrackFeature.js.map +0 -1
  379. package/lib/module/features/ZustandLogFeature.js +0 -69
  380. package/lib/module/features/ZustandLogFeature.js.map +0 -1
  381. package/lib/module/hooks/useNavigationLogger.js.map +0 -1
  382. package/lib/module/hooks/useSlideDetailAnimation.js.map +0 -1
  383. package/lib/module/initialize.js +0 -156
  384. package/lib/module/initialize.js.map +0 -1
  385. package/lib/module/native/NativeDebugLibs.js.map +0 -1
  386. package/lib/module/utils/constants.js +0 -130
  387. package/lib/module/utils/constants.js.map +0 -1
  388. package/lib/typescript/src/components/ClipboardTab.d.ts +0 -4
  389. package/lib/typescript/src/components/ClipboardTab.d.ts.map +0 -1
  390. package/lib/typescript/src/components/ConsoleLogTab.d.ts.map +0 -1
  391. package/lib/typescript/src/components/EnvironmentTab.d.ts.map +0 -1
  392. package/lib/typescript/src/components/FloatPanelView.d.ts +0 -64
  393. package/lib/typescript/src/components/FloatPanelView.d.ts.map +0 -1
  394. package/lib/typescript/src/components/NavigationLogTab.d.ts.map +0 -1
  395. package/lib/typescript/src/components/NetworkLogTab.d.ts.map +0 -1
  396. package/lib/typescript/src/components/ThirdPartyLibsTab.d.ts.map +0 -1
  397. package/lib/typescript/src/components/TrackLogTab.d.ts.map +0 -1
  398. package/lib/typescript/src/components/ZustandLogTab.d.ts.map +0 -1
  399. package/lib/typescript/src/components/shared/CollapsibleSection.d.ts.map +0 -1
  400. package/lib/typescript/src/components/shared/CopyButton.d.ts.map +0 -1
  401. package/lib/typescript/src/components/shared/JsonView.d.ts.map +0 -1
  402. package/lib/typescript/src/features/ClipboardFeature.d.ts +0 -3
  403. package/lib/typescript/src/features/ClipboardFeature.d.ts.map +0 -1
  404. package/lib/typescript/src/features/ConsoleLogFeature.d.ts +0 -7
  405. package/lib/typescript/src/features/ConsoleLogFeature.d.ts.map +0 -1
  406. package/lib/typescript/src/features/EnvironmentFeature.d.ts.map +0 -1
  407. package/lib/typescript/src/features/NavigationLogFeature.d.ts.map +0 -1
  408. package/lib/typescript/src/features/NetworkFeature.d.ts +0 -28
  409. package/lib/typescript/src/features/NetworkFeature.d.ts.map +0 -1
  410. package/lib/typescript/src/features/ThirdPartyLibsFeature.d.ts +0 -3
  411. package/lib/typescript/src/features/ThirdPartyLibsFeature.d.ts.map +0 -1
  412. package/lib/typescript/src/features/TrackFeature.d.ts.map +0 -1
  413. package/lib/typescript/src/features/ZustandLogFeature.d.ts.map +0 -1
  414. package/lib/typescript/src/hooks/useNavigationLogger.d.ts.map +0 -1
  415. package/lib/typescript/src/hooks/useSlideDetailAnimation.d.ts.map +0 -1
  416. package/lib/typescript/src/initialize.d.ts +0 -51
  417. package/lib/typescript/src/initialize.d.ts.map +0 -1
  418. package/lib/typescript/src/native/NativeDebugLibs.d.ts.map +0 -1
  419. package/lib/typescript/src/utils/constants.d.ts +0 -96
  420. package/lib/typescript/src/utils/constants.d.ts.map +0 -1
  421. package/src/components/ConsoleLogTab.tsx +0 -209
  422. package/src/components/FloatPanelView.tsx +0 -714
  423. package/src/components/NetworkLogTab.tsx +0 -411
  424. package/src/components/TrackLogTab.tsx +0 -245
  425. package/src/components/ZustandLogTab.tsx +0 -305
  426. package/src/features/ClipboardFeature.ts +0 -11
  427. package/src/features/ConsoleLogFeature.ts +0 -118
  428. package/src/features/NavigationLogFeature.ts +0 -74
  429. package/src/features/NetworkFeature.ts +0 -488
  430. package/src/features/TrackFeature.ts +0 -69
  431. package/src/initialize.ts +0 -214
  432. package/src/utils/constants.ts +0 -91
  433. /package/lib/commonjs/{components → ui}/shared/JsonView.js +0 -0
  434. /package/lib/commonjs/{hooks → ui/shared}/useSlideDetailAnimation.js +0 -0
  435. /package/lib/module/{components → ui}/shared/JsonView.js +0 -0
  436. /package/lib/module/{hooks → ui/shared}/useSlideDetailAnimation.js +0 -0
  437. /package/lib/typescript/src/{components → ui}/shared/CollapsibleSection.d.ts +0 -0
  438. /package/lib/typescript/src/{components → ui}/shared/CopyButton.d.ts +0 -0
  439. /package/lib/typescript/src/{components → ui}/shared/JsonView.d.ts +0 -0
  440. /package/lib/typescript/src/{hooks → ui/shared}/useSlideDetailAnimation.d.ts +0 -0
  441. /package/src/{native/NativeDebugLibs.ts → features/thirdPartyLibs/nativeDebugLibs.ts} +0 -0
  442. /package/src/{components → ui}/shared/JsonView.tsx +0 -0
  443. /package/src/{hooks → ui/shared}/useSlideDetailAnimation.ts +0 -0
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useRef } from 'react';
4
+ import { View, Text, StyleSheet, Animated, PanResponder, Pressable, useWindowDimensions } from 'react-native';
5
+ import { Colors } from '../theme/colors';
6
+ import { ICON_SIZE } from '../theme/layout';
7
+ import { getPreference, setPreference, KEYS } from '../../utils/debugPreferences';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const EDGE_MARGIN = 16;
10
+ export function FloatIcon({
11
+ visible,
12
+ onPress,
13
+ badge
14
+ }) {
15
+ const {
16
+ width: screenWidth,
17
+ height: screenHeight
18
+ } = useWindowDimensions();
19
+ const defaultX = screenWidth - ICON_SIZE - EDGE_MARGIN;
20
+ const defaultY = screenHeight / 2 - ICON_SIZE / 2;
21
+ const pan = useRef(new Animated.ValueXY({
22
+ x: defaultX,
23
+ y: defaultY
24
+ })).current;
25
+ const scale = useRef(new Animated.Value(1)).current;
26
+ const lastPosition = useRef({
27
+ x: defaultX,
28
+ y: defaultY
29
+ });
30
+ const positionLoaded = useRef(false);
31
+
32
+ // Restore saved position
33
+ useEffect(() => {
34
+ let mounted = true;
35
+ getPreference(KEYS.fabPosition).then(saved => {
36
+ if (!mounted || !saved) return;
37
+ try {
38
+ const pos = JSON.parse(saved);
39
+ const x = Math.max(0, Math.min(pos.x, screenWidth - ICON_SIZE));
40
+ const y = Math.max(0, Math.min(pos.y, screenHeight - ICON_SIZE));
41
+ lastPosition.current = {
42
+ x,
43
+ y
44
+ };
45
+ pan.setValue({
46
+ x,
47
+ y
48
+ });
49
+ positionLoaded.current = true;
50
+ } catch {
51
+ // ignore bad data
52
+ }
53
+ });
54
+ return () => {
55
+ mounted = false;
56
+ };
57
+ }, [screenWidth, screenHeight, pan]);
58
+ const panResponder = useRef(PanResponder.create({
59
+ onStartShouldSetPanResponder: () => true,
60
+ onMoveShouldSetPanResponder: () => true,
61
+ onPanResponderGrant: () => {
62
+ Animated.spring(scale, {
63
+ toValue: 0.9,
64
+ friction: 5,
65
+ useNativeDriver: true
66
+ }).start();
67
+ },
68
+ onPanResponderMove: (_, gs) => {
69
+ const x = Math.max(0, Math.min(lastPosition.current.x + gs.dx, screenWidth - ICON_SIZE));
70
+ const y = Math.max(0, Math.min(lastPosition.current.y + gs.dy, screenHeight - ICON_SIZE));
71
+ pan.setValue({
72
+ x,
73
+ y
74
+ });
75
+ },
76
+ onPanResponderRelease: (_, gs) => {
77
+ if (Math.abs(gs.dx) < 5 && Math.abs(gs.dy) < 5) {
78
+ Animated.spring(scale, {
79
+ toValue: 1,
80
+ friction: 5,
81
+ useNativeDriver: true
82
+ }).start();
83
+ onPress();
84
+ return;
85
+ }
86
+ Animated.spring(scale, {
87
+ toValue: 1,
88
+ friction: 5,
89
+ useNativeDriver: true
90
+ }).start();
91
+
92
+ // Snap to nearest edge
93
+ const rawX = lastPosition.current.x + gs.dx;
94
+ const midX = screenWidth / 2 - ICON_SIZE / 2;
95
+ const snappedX = rawX < midX ? EDGE_MARGIN : screenWidth - ICON_SIZE - EDGE_MARGIN;
96
+ const finalY = Math.max(0, Math.min(lastPosition.current.y + gs.dy, screenHeight - ICON_SIZE));
97
+ lastPosition.current = {
98
+ x: snappedX,
99
+ y: finalY
100
+ };
101
+ Animated.spring(pan, {
102
+ toValue: {
103
+ x: snappedX,
104
+ y: finalY
105
+ },
106
+ friction: 7,
107
+ tension: 40,
108
+ useNativeDriver: true
109
+ }).start();
110
+
111
+ // Persist
112
+ setPreference(KEYS.fabPosition, JSON.stringify({
113
+ x: snappedX,
114
+ y: finalY
115
+ }));
116
+ },
117
+ onPanResponderTerminate: (_, gs) => {
118
+ const snappedX = lastPosition.current.x + gs.dx < screenWidth / 2 - ICON_SIZE / 2 ? EDGE_MARGIN : screenWidth - ICON_SIZE - EDGE_MARGIN;
119
+ const finalY = Math.max(0, Math.min(lastPosition.current.y + gs.dy, screenHeight - ICON_SIZE));
120
+ lastPosition.current = {
121
+ x: snappedX,
122
+ y: finalY
123
+ };
124
+ }
125
+ })).current;
126
+ return /*#__PURE__*/_jsx(Animated.View, {
127
+ pointerEvents: visible ? 'auto' : 'none',
128
+ style: [styles.root, {
129
+ transform: [{
130
+ translateX: pan.x
131
+ }, {
132
+ translateY: pan.y
133
+ }, {
134
+ scale
135
+ }],
136
+ opacity: visible ? 1 : 0
137
+ }],
138
+ ...panResponder.panHandlers,
139
+ children: /*#__PURE__*/_jsxs(Pressable, {
140
+ onPress: onPress,
141
+ style: styles.inner,
142
+ children: [/*#__PURE__*/_jsxs(View, {
143
+ style: styles.iconGrid,
144
+ children: [/*#__PURE__*/_jsxs(View, {
145
+ style: styles.iconRow,
146
+ children: [/*#__PURE__*/_jsx(View, {
147
+ style: [styles.iconCell, {
148
+ backgroundColor: Colors.primary
149
+ }]
150
+ }), /*#__PURE__*/_jsx(View, {
151
+ style: [styles.iconCell, {
152
+ backgroundColor: Colors.success
153
+ }]
154
+ })]
155
+ }), /*#__PURE__*/_jsxs(View, {
156
+ style: styles.iconRow,
157
+ children: [/*#__PURE__*/_jsx(View, {
158
+ style: [styles.iconCell, {
159
+ backgroundColor: Colors.warning
160
+ }]
161
+ }), /*#__PURE__*/_jsx(View, {
162
+ style: [styles.iconCell, {
163
+ backgroundColor: Colors.purple
164
+ }]
165
+ })]
166
+ })]
167
+ }), badge && /*#__PURE__*/_jsx(View, {
168
+ style: [styles.badge, {
169
+ backgroundColor: badge.color
170
+ }],
171
+ children: /*#__PURE__*/_jsx(Text, {
172
+ style: styles.badgeText,
173
+ children: badge.label
174
+ })
175
+ })]
176
+ })
177
+ });
178
+ }
179
+ const styles = StyleSheet.create({
180
+ root: {
181
+ position: 'absolute',
182
+ width: ICON_SIZE,
183
+ height: ICON_SIZE,
184
+ borderRadius: ICON_SIZE / 2,
185
+ backgroundColor: '#FFFFFF',
186
+ elevation: 6,
187
+ shadowColor: '#000',
188
+ shadowOffset: {
189
+ width: 0,
190
+ height: 2
191
+ },
192
+ shadowOpacity: 0.12,
193
+ shadowRadius: 8
194
+ },
195
+ inner: {
196
+ width: '100%',
197
+ height: '100%',
198
+ alignItems: 'center',
199
+ justifyContent: 'center'
200
+ },
201
+ iconGrid: {
202
+ width: 22,
203
+ height: 22,
204
+ justifyContent: 'space-between'
205
+ },
206
+ iconRow: {
207
+ flexDirection: 'row',
208
+ justifyContent: 'space-between'
209
+ },
210
+ iconCell: {
211
+ width: 8,
212
+ height: 8,
213
+ borderRadius: 2.5
214
+ },
215
+ badge: {
216
+ position: 'absolute',
217
+ top: -4,
218
+ right: -4,
219
+ minWidth: 20,
220
+ height: 18,
221
+ borderRadius: 9,
222
+ paddingHorizontal: 5,
223
+ alignItems: 'center',
224
+ justifyContent: 'center',
225
+ borderWidth: 2,
226
+ borderColor: '#FFF',
227
+ elevation: 4
228
+ },
229
+ badgeText: {
230
+ color: '#FFF',
231
+ fontSize: 9,
232
+ fontWeight: '700'
233
+ }
234
+ });
235
+ //# sourceMappingURL=FloatIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useRef","View","Text","StyleSheet","Animated","PanResponder","Pressable","useWindowDimensions","Colors","ICON_SIZE","getPreference","setPreference","KEYS","jsx","_jsx","jsxs","_jsxs","EDGE_MARGIN","FloatIcon","visible","onPress","badge","width","screenWidth","height","screenHeight","defaultX","defaultY","pan","ValueXY","x","y","current","scale","Value","lastPosition","positionLoaded","mounted","fabPosition","then","saved","pos","JSON","parse","Math","max","min","setValue","panResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","spring","toValue","friction","useNativeDriver","start","onPanResponderMove","_","gs","dx","dy","onPanResponderRelease","abs","rawX","midX","snappedX","finalY","tension","stringify","onPanResponderTerminate","pointerEvents","style","styles","root","transform","translateX","translateY","opacity","panHandlers","children","inner","iconGrid","iconRow","iconCell","backgroundColor","primary","success","warning","purple","color","badgeText","label","position","borderRadius","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","alignItems","justifyContent","flexDirection","top","right","minWidth","paddingHorizontal","borderWidth","borderColor","fontSize","fontWeight"],"sourceRoot":"../../../../src","sources":["ui/floating/FloatIcon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,YAAY,EACZC,SAAS,EACTC,mBAAmB,QACd,cAAc;AACrB,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,aAAa,EAAEC,aAAa,EAAEC,IAAI,QAAQ,8BAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElF,MAAMC,WAAW,GAAG,EAAE;AAQtB,OAAO,SAASC,SAASA,CAAC;EAAEC,OAAO;EAAEC,OAAO;EAAEC;AAAsB,CAAC,EAAE;EACrE,MAAM;IAAEC,KAAK,EAAEC,WAAW;IAAEC,MAAM,EAAEC;EAAa,CAAC,GAAGlB,mBAAmB,CAAC,CAAC;EAC1E,MAAMmB,QAAQ,GAAGH,WAAW,GAAGd,SAAS,GAAGQ,WAAW;EACtD,MAAMU,QAAQ,GAAGF,YAAY,GAAG,CAAC,GAAGhB,SAAS,GAAG,CAAC;EAEjD,MAAMmB,GAAG,GAAG5B,MAAM,CAAC,IAAII,QAAQ,CAACyB,OAAO,CAAC;IAAEC,CAAC,EAAEJ,QAAQ;IAAEK,CAAC,EAAEJ;EAAS,CAAC,CAAC,CAAC,CAACK,OAAO;EAC9E,MAAMC,KAAK,GAAGjC,MAAM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E;IAAE,CAAC;IACrC2E,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDlB,KAAK,EAAE;IACL5D,KAAK,EAAE,MAAM;IACbE,MAAM,EAAE,MAAM;IACd6E,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDnB,QAAQ,EAAE;IACR7D,KAAK,EAAE,EAAE;IACTE,MAAM,EAAE,EAAE;IACV8E,cAAc,EAAE;EAClB,CAAC;EACDlB,OAAO,EAAE;IACPmB,aAAa,EAAE,KAAK;IACpBD,cAAc,EAAE;EAClB,CAAC;EACDjB,QAAQ,EAAE;IACR/D,KAAK,EAAE,CAAC;IACRE,MAAM,EAAE,CAAC;IACTuE,YAAY,EAAE;EAChB,CAAC;EACD1E,KAAK,EAAE;IACLyE,QAAQ,EAAE,UAAU;IACpBU,GAAG,EAAE,CAAC,CAAC;IACPC,KAAK,EAAE,CAAC,CAAC;IACTC,QAAQ,EAAE,EAAE;IACZlF,MAAM,EAAE,EAAE;IACVuE,YAAY,EAAE,CAAC;IACfY,iBAAiB,EAAE,CAAC;IACpBN,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBM,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,MAAM;IACnBb,SAAS,EAAE;EACb,CAAC;EACDJ,SAAS,EAAE;IACTD,KAAK,EAAE,MAAM;IACbmB,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+
3
+ import React, { useCallback, useEffect, useRef } from 'react';
4
+ import { View, Text, StyleSheet, Animated, PanResponder, Pressable, TouchableOpacity, useWindowDimensions } from 'react-native';
5
+ import { Colors } from '../theme/colors';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export function DebugPanel({
8
+ onClose,
9
+ onClearAll,
10
+ children
11
+ }) {
12
+ const {
13
+ height: screenHeight
14
+ } = useWindowDimensions();
15
+ const panelTranslateY = useRef(new Animated.Value(screenHeight)).current;
16
+ const backdropOpacity = useRef(new Animated.Value(0)).current;
17
+ useEffect(() => {
18
+ requestAnimationFrame(() => {
19
+ Animated.parallel([Animated.spring(panelTranslateY, {
20
+ toValue: 0,
21
+ friction: 8,
22
+ tension: 65,
23
+ useNativeDriver: true
24
+ }), Animated.timing(backdropOpacity, {
25
+ toValue: 1,
26
+ duration: 250,
27
+ useNativeDriver: true
28
+ })]).start();
29
+ });
30
+ }, [panelTranslateY, backdropOpacity]);
31
+ const closePanel = useCallback(() => {
32
+ Animated.parallel([Animated.spring(panelTranslateY, {
33
+ toValue: screenHeight,
34
+ friction: 8,
35
+ tension: 65,
36
+ useNativeDriver: true
37
+ }), Animated.timing(backdropOpacity, {
38
+ toValue: 0,
39
+ duration: 200,
40
+ useNativeDriver: true
41
+ })]).start(() => onClose());
42
+ }, [panelTranslateY, backdropOpacity, onClose, screenHeight]);
43
+ const panelResponder = useRef(PanResponder.create({
44
+ onStartShouldSetPanResponder: () => true,
45
+ onMoveShouldSetPanResponder: (_, gs) => gs.dy > 5,
46
+ onPanResponderMove: (_, gs) => {
47
+ if (gs.dy > 0) {
48
+ panelTranslateY.setValue(gs.dy);
49
+ backdropOpacity.setValue(Math.max(0, 1 - gs.dy / 200));
50
+ }
51
+ },
52
+ onPanResponderRelease: (_, gs) => {
53
+ if (gs.dy > 100) {
54
+ closePanel();
55
+ } else {
56
+ Animated.spring(panelTranslateY, {
57
+ toValue: 0,
58
+ friction: 8,
59
+ tension: 50,
60
+ useNativeDriver: true
61
+ }).start();
62
+ Animated.timing(backdropOpacity, {
63
+ toValue: 1,
64
+ duration: 200,
65
+ useNativeDriver: true
66
+ }).start();
67
+ }
68
+ }
69
+ })).current;
70
+ return /*#__PURE__*/_jsxs(View, {
71
+ style: styles.container,
72
+ children: [/*#__PURE__*/_jsx(Animated.View, {
73
+ style: [styles.backdrop, {
74
+ opacity: backdropOpacity
75
+ }],
76
+ children: /*#__PURE__*/_jsx(Pressable, {
77
+ style: styles.backdropPressable,
78
+ onPress: closePanel
79
+ })
80
+ }), /*#__PURE__*/_jsxs(Animated.View, {
81
+ style: [styles.panel, {
82
+ transform: [{
83
+ translateY: panelTranslateY
84
+ }]
85
+ }],
86
+ children: [/*#__PURE__*/_jsxs(View, {
87
+ ...panelResponder.panHandlers,
88
+ children: [/*#__PURE__*/_jsx(View, {
89
+ style: styles.dragHandle,
90
+ children: /*#__PURE__*/_jsx(View, {
91
+ style: styles.dragIndicator
92
+ })
93
+ }), /*#__PURE__*/_jsxs(View, {
94
+ style: styles.header,
95
+ children: [/*#__PURE__*/_jsx(Text, {
96
+ style: styles.headerTitle,
97
+ children: "Debug Toolkit"
98
+ }), /*#__PURE__*/_jsxs(View, {
99
+ style: styles.headerButtons,
100
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
101
+ onPress: () => {
102
+ onClearAll();
103
+ closePanel();
104
+ },
105
+ style: styles.clearButton,
106
+ activeOpacity: 0.6,
107
+ children: /*#__PURE__*/_jsx(Text, {
108
+ style: styles.clearButtonText,
109
+ children: "Clear"
110
+ })
111
+ }), /*#__PURE__*/_jsx(Pressable, {
112
+ onPress: closePanel,
113
+ style: styles.closeButton,
114
+ children: /*#__PURE__*/_jsx(Text, {
115
+ style: styles.closeButtonText,
116
+ children: "\u2715"
117
+ })
118
+ })]
119
+ })]
120
+ })]
121
+ }), /*#__PURE__*/_jsx(View, {
122
+ style: styles.panelContent,
123
+ children: children
124
+ })]
125
+ })]
126
+ });
127
+ }
128
+ const styles = StyleSheet.create({
129
+ container: {
130
+ position: 'absolute',
131
+ top: 0,
132
+ left: 0,
133
+ right: 0,
134
+ bottom: 0,
135
+ justifyContent: 'flex-end'
136
+ },
137
+ backdrop: {
138
+ position: 'absolute',
139
+ top: 0,
140
+ left: 0,
141
+ right: 0,
142
+ bottom: 0,
143
+ backgroundColor: 'rgba(0,0,0,0.35)'
144
+ },
145
+ backdropPressable: {
146
+ flex: 1
147
+ },
148
+ panel: {
149
+ width: '100%',
150
+ height: '90%',
151
+ backgroundColor: Colors.background,
152
+ borderTopLeftRadius: 28,
153
+ borderTopRightRadius: 28,
154
+ overflow: 'hidden',
155
+ elevation: 24,
156
+ shadowColor: '#000',
157
+ shadowOffset: {
158
+ width: 0,
159
+ height: -4
160
+ },
161
+ shadowOpacity: 0.08,
162
+ shadowRadius: 12
163
+ },
164
+ dragHandle: {
165
+ width: '100%',
166
+ height: 28,
167
+ alignItems: 'center',
168
+ justifyContent: 'center',
169
+ backgroundColor: Colors.surface
170
+ },
171
+ dragIndicator: {
172
+ width: 40,
173
+ height: 4,
174
+ borderRadius: 2,
175
+ backgroundColor: Colors.textLight
176
+ },
177
+ panelContent: {
178
+ flex: 1
179
+ },
180
+ header: {
181
+ flexDirection: 'row',
182
+ justifyContent: 'space-between',
183
+ alignItems: 'center',
184
+ paddingHorizontal: 20,
185
+ paddingTop: 6,
186
+ paddingBottom: 10,
187
+ backgroundColor: Colors.surface
188
+ },
189
+ headerTitle: {
190
+ fontSize: 17,
191
+ fontWeight: '600',
192
+ color: Colors.text
193
+ },
194
+ headerButtons: {
195
+ flexDirection: 'row',
196
+ alignItems: 'center',
197
+ gap: 12
198
+ },
199
+ clearButton: {
200
+ paddingHorizontal: 12,
201
+ paddingVertical: 6,
202
+ borderRadius: 8,
203
+ backgroundColor: `${Colors.error}0F`
204
+ },
205
+ clearButtonText: {
206
+ color: Colors.error,
207
+ fontSize: 14,
208
+ fontWeight: '500'
209
+ },
210
+ closeButton: {
211
+ width: 30,
212
+ height: 30,
213
+ borderRadius: 15,
214
+ backgroundColor: Colors.background,
215
+ alignItems: 'center',
216
+ justifyContent: 'center'
217
+ },
218
+ closeButtonText: {
219
+ fontSize: 16,
220
+ fontWeight: '400',
221
+ color: Colors.textSecondary,
222
+ lineHeight: 16
223
+ }
224
+ });
225
+ //# sourceMappingURL=DebugPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useEffect","useRef","View","Text","StyleSheet","Animated","PanResponder","Pressable","TouchableOpacity","useWindowDimensions","Colors","jsx","_jsx","jsxs","_jsxs","DebugPanel","onClose","onClearAll","children","height","screenHeight","panelTranslateY","Value","current","backdropOpacity","requestAnimationFrame","parallel","spring","toValue","friction","tension","useNativeDriver","timing","duration","start","closePanel","panelResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","_","gs","dy","onPanResponderMove","setValue","Math","max","onPanResponderRelease","style","styles","container","backdrop","opacity","backdropPressable","onPress","panel","transform","translateY","panHandlers","dragHandle","dragIndicator","header","headerTitle","headerButtons","clearButton","activeOpacity","clearButtonText","closeButton","closeButtonText","panelContent","position","top","left","right","bottom","justifyContent","backgroundColor","flex","width","background","borderTopLeftRadius","borderTopRightRadius","overflow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","alignItems","surface","borderRadius","textLight","flexDirection","paddingHorizontal","paddingTop","paddingBottom","fontSize","fontWeight","color","text","gap","paddingVertical","error","textSecondary","lineHeight"],"sourceRoot":"../../../../src","sources":["ui/panel/DebugPanel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC7D,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,YAAY,EACZC,SAAS,EACTC,gBAAgB,EAChBC,mBAAmB,QACd,cAAc;AACrB,SAASC,MAAM,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQzC,OAAO,SAASC,UAAUA,CAAC;EAAEC,OAAO;EAAEC,UAAU;EAAEC;AAA0B,CAAC,EAAE;EAC7E,MAAM;IAAEC,MAAM,EAAEC;EAAa,CAAC,GAAGX,mBAAmB,CAAC,CAAC;EACtD,MAAMY,eAAe,GAAGpB,MAAM,CAAC,IAAII,QAAQ,CAACiB,KAAK,CAACF,YAAY,CAAC,CAAC,CA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AAM,CAAC6F,aAAa;IAC3BC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+
3
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
4
+ import { View, Text, StyleSheet, Animated, ScrollView, TouchableOpacity } from 'react-native';
5
+ import { Colors } from '../theme/colors';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export function FeatureTabBar({
8
+ tabs,
9
+ activeIndex,
10
+ onSelectTab
11
+ }) {
12
+ const [underlineWidth, setUnderlineWidth] = useState(0);
13
+ const underlineTranslateX = useRef(new Animated.Value(0)).current;
14
+ const tabScrollViewRef = useRef(null);
15
+ const tabLayouts = useRef([]);
16
+ const tabScrollOffset = useRef(0);
17
+ const tabViewportWidth = useRef(0);
18
+ const tabContentWidth = useRef(0);
19
+ const underlineInit = useRef(false);
20
+ const isSwitching = useRef(false);
21
+ const maxTabScroll = useCallback(() => Math.max(0, tabContentWidth.current - tabViewportWidth.current), []);
22
+ const clampScroll = useCallback(offset => Math.min(Math.max(0, offset), maxTabScroll()), [maxTabScroll]);
23
+ const getTabScrollTarget = useCallback(index => {
24
+ const layout = tabLayouts.current[index];
25
+ return layout ? clampScroll(layout.x - 60) : clampScroll(tabScrollOffset.current);
26
+ }, [clampScroll]);
27
+ const animateUnderline = useCallback((index, scrollOffset) => {
28
+ const layout = tabLayouts.current[index];
29
+ if (!layout) return;
30
+ const offsetX = clampScroll(scrollOffset ?? tabScrollOffset.current);
31
+ setUnderlineWidth(layout.width);
32
+ Animated.spring(underlineTranslateX, {
33
+ toValue: layout.x - offsetX,
34
+ friction: 7,
35
+ tension: 50,
36
+ useNativeDriver: true
37
+ }).start();
38
+ }, [clampScroll, underlineTranslateX]);
39
+ const syncUnderlineToActiveTab = useCallback(() => {
40
+ const layout = tabLayouts.current[activeIndex];
41
+ if (!layout) return;
42
+ const clamped = clampScroll(tabScrollOffset.current);
43
+ if (clamped !== tabScrollOffset.current) tabScrollOffset.current = clamped;
44
+ underlineTranslateX.setValue(layout.x - clamped);
45
+ setUnderlineWidth(layout.width);
46
+ }, [activeIndex, clampScroll, underlineTranslateX]);
47
+ const tryInit = useCallback(() => {
48
+ if (underlineInit.current || tabViewportWidth.current <= 0 || tabContentWidth.current <= 0) return;
49
+ const layout = tabLayouts.current[activeIndex];
50
+ if (!layout) return;
51
+ const target = getTabScrollTarget(activeIndex);
52
+ tabScrollOffset.current = target;
53
+ tabScrollViewRef.current?.scrollTo({
54
+ x: target,
55
+ animated: false
56
+ });
57
+ underlineTranslateX.setValue(layout.x - target);
58
+ setUnderlineWidth(layout.width);
59
+ underlineInit.current = true;
60
+ }, [activeIndex, getTabScrollTarget, underlineTranslateX]);
61
+ const handleSelectTab = useCallback(index => {
62
+ if (isSwitching.current || index === activeIndex) return;
63
+ isSwitching.current = true;
64
+ const layout = tabLayouts.current[index];
65
+ if (layout) {
66
+ const target = getTabScrollTarget(index);
67
+ tabScrollOffset.current = target;
68
+ tabScrollViewRef.current?.scrollTo({
69
+ x: target,
70
+ animated: true
71
+ });
72
+ animateUnderline(index, target);
73
+ }
74
+ onSelectTab(index);
75
+ setTimeout(() => {
76
+ isSwitching.current = false;
77
+ }, 350);
78
+ }, [activeIndex, animateUnderline, getTabScrollTarget, onSelectTab]);
79
+
80
+ // React to external activeIndex changes (e.g. swipe-to-switch)
81
+ useEffect(() => {
82
+ if (!underlineInit.current) return;
83
+ const layout = tabLayouts.current[activeIndex];
84
+ if (!layout) return;
85
+ const target = getTabScrollTarget(activeIndex);
86
+ tabScrollOffset.current = target;
87
+ tabScrollViewRef.current?.scrollTo({
88
+ x: target,
89
+ animated: true
90
+ });
91
+ animateUnderline(activeIndex, target);
92
+ }, [activeIndex, animateUnderline, getTabScrollTarget]);
93
+ return /*#__PURE__*/_jsxs(View, {
94
+ style: styles.container,
95
+ children: [/*#__PURE__*/_jsx(ScrollView, {
96
+ ref: tabScrollViewRef,
97
+ horizontal: true,
98
+ showsHorizontalScrollIndicator: false,
99
+ contentContainerStyle: styles.scrollContent,
100
+ onLayout: e => {
101
+ tabViewportWidth.current = e.nativeEvent.layout.width;
102
+ tryInit();
103
+ },
104
+ onContentSizeChange: width => {
105
+ tabContentWidth.current = width;
106
+ tryInit();
107
+ },
108
+ onScroll: e => {
109
+ tabScrollOffset.current = clampScroll(e.nativeEvent.contentOffset.x);
110
+ if (!isSwitching.current) syncUnderlineToActiveTab();
111
+ },
112
+ scrollEventThrottle: 16,
113
+ children: tabs.map((tab, index) => /*#__PURE__*/_jsx(TouchableOpacity, {
114
+ style: styles.tab,
115
+ onPress: () => handleSelectTab(index),
116
+ activeOpacity: 0.7,
117
+ onLayout: e => {
118
+ const {
119
+ x,
120
+ width
121
+ } = e.nativeEvent.layout;
122
+ tabLayouts.current[index] = {
123
+ x,
124
+ width
125
+ };
126
+ if (index === activeIndex) tryInit();
127
+ },
128
+ children: /*#__PURE__*/_jsx(Text, {
129
+ style: [styles.tabText, activeIndex === index && styles.activeTabText],
130
+ numberOfLines: 1,
131
+ children: tab.label
132
+ })
133
+ }, tab.id))
134
+ }), /*#__PURE__*/_jsx(Animated.View, {
135
+ style: [styles.underline, {
136
+ width: underlineWidth,
137
+ transform: [{
138
+ translateX: underlineTranslateX
139
+ }]
140
+ }]
141
+ })]
142
+ });
143
+ }
144
+ const styles = StyleSheet.create({
145
+ container: {
146
+ backgroundColor: Colors.surface,
147
+ borderBottomWidth: StyleSheet.hairlineWidth,
148
+ borderBottomColor: Colors.border
149
+ },
150
+ scrollContent: {
151
+ paddingHorizontal: 20,
152
+ flexDirection: 'row'
153
+ },
154
+ tab: {
155
+ paddingVertical: 10,
156
+ paddingHorizontal: 14,
157
+ marginRight: 8
158
+ },
159
+ tabText: {
160
+ fontSize: 14,
161
+ fontWeight: '500',
162
+ color: Colors.textLight
163
+ },
164
+ activeTabText: {
165
+ color: Colors.primary,
166
+ fontWeight: '600'
167
+ },
168
+ underline: {
169
+ position: 'absolute',
170
+ bottom: 0,
171
+ left: 0,
172
+ height: 2.5,
173
+ borderRadius: 1.25,
174
+ backgroundColor: Colors.primary
175
+ }
176
+ });
177
+ //# sourceMappingURL=FeatureTabBar.js.map