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,164 @@
1
+ import React, { useMemo, useState } from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ FlatList,
6
+ TouchableOpacity,
7
+ StyleSheet,
8
+ Animated,
9
+ } from 'react-native';
10
+ import { Colors } from '../theme/colors';
11
+ import { useSlideDetailAnimation } from './useSlideDetailAnimation';
12
+
13
+ interface LogListItem {
14
+ id: string;
15
+ }
16
+
17
+ interface LogListScreenProps<T extends LogListItem> {
18
+ data: T[];
19
+ renderRow: (item: T) => React.ReactElement;
20
+ renderListHeader?: () => React.ReactElement;
21
+ renderDetailHeader?: (item: T) => React.ReactNode;
22
+ renderDetailBody: (item: T) => React.ReactElement;
23
+ emptyText: string;
24
+ reversed?: boolean;
25
+ }
26
+
27
+ /**
28
+ * Shared list→detail screen with slide animation.
29
+ * Handles: selected state, FlatList, empty state, back button, push navigation.
30
+ * Each tab provides renderRow, renderDetailBody, and optional renderDetailHeader.
31
+ */
32
+ export function LogListScreen<T extends LogListItem>({
33
+ data,
34
+ renderRow,
35
+ renderListHeader,
36
+ renderDetailHeader,
37
+ renderDetailBody,
38
+ emptyText,
39
+ reversed = true,
40
+ }: LogListScreenProps<T>) {
41
+ const [selected, setSelected] = useState<T | null>(null);
42
+ const { detailTranslateX, listTranslateX, listOpacity } = useSlideDetailAnimation(selected);
43
+
44
+ const displayData = useMemo(
45
+ () => (reversed ? [...data].reverse() : data),
46
+ [data, reversed],
47
+ );
48
+
49
+ return (
50
+ <View style={styles.container}>
51
+ {/* List */}
52
+ <Animated.View
53
+ style={[
54
+ styles.listWrap,
55
+ selected
56
+ ? { opacity: listOpacity, transform: [{ translateX: listTranslateX }] }
57
+ : null,
58
+ ]}
59
+ >
60
+ {renderListHeader?.()}
61
+ {displayData.length === 0 ? (
62
+ <View style={styles.emptyContainer}>
63
+ <Text style={styles.emptyIcon}>~</Text>
64
+ <Text style={styles.empty}>{emptyText}</Text>
65
+ </View>
66
+ ) : (
67
+ <FlatList
68
+ data={displayData}
69
+ renderItem={({ item }) => (
70
+ <TouchableOpacity
71
+ style={styles.card}
72
+ onPress={() => setSelected(item)}
73
+ activeOpacity={0.6}
74
+ >
75
+ {renderRow(item)}
76
+ </TouchableOpacity>
77
+ )}
78
+ keyExtractor={(item) => item.id}
79
+ contentContainerStyle={styles.listContent}
80
+ initialNumToRender={20}
81
+ maxToRenderPerBatch={10}
82
+ windowSize={5}
83
+ removeClippedSubviews={true}
84
+ />
85
+ )}
86
+ </Animated.View>
87
+
88
+ {/* Detail */}
89
+ {selected && (
90
+ <Animated.View
91
+ style={[styles.detailOverlay, { transform: [{ translateX: detailTranslateX }] }]}
92
+ >
93
+ <View style={styles.detailWrap}>
94
+ <View style={styles.detailHeader}>
95
+ <TouchableOpacity
96
+ onPress={() => setSelected(null)}
97
+ style={styles.backBtn}
98
+ activeOpacity={0.6}
99
+ >
100
+ <Text style={styles.backIcon}>‹</Text>
101
+ <Text style={styles.backText}>Back</Text>
102
+ </TouchableOpacity>
103
+ {renderDetailHeader?.(selected)}
104
+ </View>
105
+ {renderDetailBody(selected)}
106
+ </View>
107
+ </Animated.View>
108
+ )}
109
+ </View>
110
+ );
111
+ }
112
+
113
+ const styles = StyleSheet.create({
114
+ container: { flex: 1, backgroundColor: Colors.background },
115
+ listWrap: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 },
116
+ listContent: { padding: 12 },
117
+ emptyContainer: { flex: 1, alignItems: 'center', justifyContent: 'center' },
118
+ emptyIcon: { fontSize: 40, color: Colors.textLight, marginBottom: 4 },
119
+ empty: { textAlign: 'center', color: Colors.textLight, fontSize: 14 },
120
+ card: {
121
+ backgroundColor: Colors.surface,
122
+ borderRadius: 12,
123
+ marginBottom: 8,
124
+ overflow: 'hidden',
125
+ },
126
+ detailOverlay: {
127
+ position: 'absolute',
128
+ top: 0,
129
+ left: 0,
130
+ right: 0,
131
+ bottom: 0,
132
+ backgroundColor: Colors.background,
133
+ },
134
+ detailWrap: { flex: 1, backgroundColor: Colors.background },
135
+ detailHeader: {
136
+ flexDirection: 'row',
137
+ alignItems: 'center',
138
+ paddingHorizontal: 8,
139
+ paddingVertical: 10,
140
+ backgroundColor: Colors.surface,
141
+ borderBottomWidth: StyleSheet.hairlineWidth,
142
+ borderBottomColor: Colors.border,
143
+ gap: 8,
144
+ },
145
+ backBtn: {
146
+ flexDirection: 'row',
147
+ alignItems: 'center',
148
+ paddingHorizontal: 6,
149
+ paddingVertical: 4,
150
+ borderRadius: 8,
151
+ },
152
+ backIcon: {
153
+ fontSize: 24,
154
+ fontWeight: '300',
155
+ color: Colors.primary,
156
+ marginTop: -2,
157
+ marginRight: 2,
158
+ },
159
+ backText: {
160
+ fontSize: 16,
161
+ color: Colors.primary,
162
+ fontWeight: '500',
163
+ },
164
+ });
@@ -0,0 +1,33 @@
1
+ export const Colors = {
2
+ primary: '#007AFF',
3
+ text: '#1C1C1E',
4
+ textSecondary: '#8E8E93',
5
+ textLight: '#C7C7CC',
6
+ border: '#E5E5EA',
7
+ background: '#F2F2F7',
8
+ surface: '#FFFFFF',
9
+
10
+ success: '#34C759',
11
+ error: '#FF3B30',
12
+ warning: '#FF9500',
13
+ info: '#5AC8FA',
14
+
15
+ purple: '#AF52DE',
16
+
17
+ get: '#007AFF',
18
+ post: '#34C759',
19
+ put: '#FF9500',
20
+ delete: '#FF3B30',
21
+ patch: '#5AC8FA',
22
+ } as const;
23
+
24
+ export function getMethodColor(method: string): string {
25
+ switch (method.toUpperCase()) {
26
+ case 'GET': return Colors.get;
27
+ case 'POST': return Colors.post;
28
+ case 'PUT': return Colors.put;
29
+ case 'DELETE': return Colors.delete;
30
+ case 'PATCH': return Colors.patch;
31
+ default: return Colors.textSecondary;
32
+ }
33
+ }
@@ -0,0 +1 @@
1
+ export const ICON_SIZE = 52;
@@ -0,0 +1,80 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { DebugFeature, DebugFeatureListener, DebugFeatureRenderProps } from '../types';
3
+ import type { EventChannel } from './createEventChannel';
4
+ import { createObservableStore, type ObservableStore } from './createObservableStore';
5
+ import { createPersistedObservableStore } from './createPersistedObservableStore';
6
+
7
+ const DEFAULT_MAX_LOGS = 200;
8
+
9
+ export interface ChannelFeaturePersistConfig<TEntry> {
10
+ storageKey: string;
11
+ maxPersist: number;
12
+ debounceMs?: number;
13
+ serialize?: (entry: TEntry) => unknown;
14
+ }
15
+
16
+ /**
17
+ * Generic factory for features that subscribe to an event channel.
18
+ * Eliminates boilerplate across channel-based features (Track, Navigation, Zustand).
19
+ *
20
+ * @param getChannel - Function returning the current channel (supports test resets)
21
+ * @param toEntry - Maps a payload + auto-generated id to a typed log entry
22
+ * @param options - Feature name, label, render component, and optional maxLogs
23
+ */
24
+ export function createChannelFeature<TPayload, TEntry extends { id?: string }>(
25
+ getChannel: () => EventChannel<TPayload>,
26
+ toEntry: (payload: TPayload, id: string) => TEntry,
27
+ options: {
28
+ name: string;
29
+ label: string;
30
+ renderContent?: ComponentType<DebugFeatureRenderProps<TEntry[]>>;
31
+ maxLogs?: number;
32
+ persist?: ChannelFeaturePersistConfig<TEntry>;
33
+ },
34
+ ): DebugFeature<TEntry[]> {
35
+ const maxLogs = options.maxLogs ?? DEFAULT_MAX_LOGS;
36
+ let nextId = 0;
37
+ let logStore: ObservableStore<TEntry>;
38
+ let getId: () => string;
39
+
40
+ if (options.persist) {
41
+ const persisted = createPersistedObservableStore<TEntry>({
42
+ storageKey: options.persist.storageKey,
43
+ maxPersist: options.persist.maxPersist,
44
+ debounceMs: options.persist.debounceMs,
45
+ serialize: options.persist.serialize,
46
+ });
47
+ logStore = persisted;
48
+ getId = () => persisted.nextId();
49
+ } else {
50
+ logStore = createObservableStore<TEntry>();
51
+ getId = () => String(nextId++);
52
+ }
53
+
54
+ let initialized = false;
55
+ let unsubscribe: (() => void) | null = null;
56
+
57
+ return {
58
+ name: options.name,
59
+ label: options.label,
60
+ renderContent: options.renderContent,
61
+ setup: () => {
62
+ if (initialized) return;
63
+ unsubscribe = getChannel().subscribe((payload) => {
64
+ logStore.push(toEntry(payload, getId()), maxLogs);
65
+ });
66
+ initialized = true;
67
+ },
68
+ getSnapshot: () => logStore.getData(),
69
+ clear: () => {
70
+ logStore.clear();
71
+ },
72
+ cleanup: () => {
73
+ unsubscribe?.();
74
+ unsubscribe = null;
75
+ logStore.clear();
76
+ initialized = false;
77
+ },
78
+ subscribe: (listener: DebugFeatureListener) => logStore.subscribe(listener),
79
+ };
80
+ }
@@ -3,6 +3,7 @@ export type StoreListener = () => void;
3
3
  export interface ObservableStore<T> {
4
4
  getData: () => T[];
5
5
  push: (item: T, maxEntries?: number) => void;
6
+ pushBatch: (items: T[]) => void;
6
7
  clear: () => void;
7
8
  subscribe: (listener: StoreListener) => () => void;
8
9
  }
@@ -25,6 +26,11 @@ export function createObservableStore<T>(): ObservableStore<T> {
25
26
  }
26
27
  notify();
27
28
  },
29
+ pushBatch: (items) => {
30
+ if (items.length === 0) return;
31
+ data = [...data, ...items];
32
+ notify();
33
+ },
28
34
  clear: () => {
29
35
  if (data.length === 0) {
30
36
  return;
@@ -0,0 +1,76 @@
1
+ import { createObservableStore, type ObservableStore } from './createObservableStore';
2
+ import { getPreference, setPreference } from './debugPreferences';
3
+
4
+ export interface PersistedStoreOptions<T> {
5
+ storageKey: string;
6
+ maxPersist: number;
7
+ debounceMs?: number;
8
+ serialize?: (entry: T) => unknown;
9
+ }
10
+
11
+ export interface PersistedObservableStore<T> extends ObservableStore<T> {
12
+ /** Returns the next auto-incrementing ID and advances the counter. */
13
+ nextId: () => string;
14
+ }
15
+
16
+ export function createPersistedObservableStore<T extends { id?: string }>(
17
+ options: PersistedStoreOptions<T>,
18
+ ): PersistedObservableStore<T> {
19
+ const { storageKey, maxPersist, debounceMs = 2000, serialize } = options;
20
+ const store = createObservableStore<T>();
21
+ let writeTimer: ReturnType<typeof setTimeout> | null = null;
22
+ let idCounter = 0;
23
+
24
+ // Restore from storage (single notify via pushBatch)
25
+ getPreference(storageKey).then((raw) => {
26
+ if (!raw) return;
27
+ try {
28
+ const entries = JSON.parse(raw) as T[];
29
+ if (!Array.isArray(entries)) return;
30
+ const restored = entries.slice(-maxPersist);
31
+ store.pushBatch(restored);
32
+ // Fix ID counter to avoid collision with restored entries
33
+ let max = 0;
34
+ for (const e of restored) {
35
+ const n = parseInt(e.id ?? '', 10);
36
+ if (!isNaN(n) && n >= max) max = n + 1;
37
+ }
38
+ idCounter = max;
39
+ } catch {
40
+ // ignore corrupt data
41
+ }
42
+ });
43
+
44
+ function scheduleWrite(): void {
45
+ if (writeTimer !== null) clearTimeout(writeTimer);
46
+ writeTimer = setTimeout(() => {
47
+ writeTimer = null;
48
+ const data = store.getData().slice(-maxPersist);
49
+ const toStore = serialize ? data.map(serialize) : data;
50
+ try {
51
+ setPreference(storageKey, JSON.stringify(toStore));
52
+ } catch {
53
+ // stringify failed (circular refs, etc) — skip write
54
+ }
55
+ }, debounceMs);
56
+ }
57
+
58
+ return {
59
+ getData: store.getData,
60
+ push: (item, maxEntries) => {
61
+ store.push(item, maxEntries);
62
+ scheduleWrite();
63
+ },
64
+ pushBatch: store.pushBatch,
65
+ clear: () => {
66
+ store.clear();
67
+ if (writeTimer !== null) {
68
+ clearTimeout(writeTimer);
69
+ writeTimer = null;
70
+ }
71
+ setPreference(storageKey, '[]');
72
+ },
73
+ subscribe: store.subscribe,
74
+ nextId: () => String(idCounter++),
75
+ };
76
+ }
@@ -0,0 +1,48 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
+ type AsyncStorageLike = { getItem: (k: string) => Promise<string | null>; setItem: (k: string, v: string) => Promise<void> };
3
+
4
+ const memoryStore = new Map<string, string>();
5
+
6
+ function loadAsyncStorage(): AsyncStorageLike | null {
7
+ try {
8
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
9
+ const mod = require('@react-native-async-storage/async-storage');
10
+ if (mod && typeof mod.getItem === 'function') return mod;
11
+ return null;
12
+ } catch {
13
+ return null;
14
+ }
15
+ }
16
+
17
+ export async function setPreference(key: string, value: string): Promise<void> {
18
+ memoryStore.set(key, value);
19
+ const AsyncStorage = loadAsyncStorage();
20
+ if (AsyncStorage) {
21
+ try {
22
+ await AsyncStorage.setItem(key, value);
23
+ } catch {
24
+ // degrade to memory only
25
+ }
26
+ }
27
+ }
28
+
29
+ export async function getPreference(key: string): Promise<string | null> {
30
+ const AsyncStorage = loadAsyncStorage();
31
+ if (AsyncStorage) {
32
+ try {
33
+ const val = await AsyncStorage.getItem(key);
34
+ if (val !== null) return val;
35
+ } catch {
36
+ // fall through to memory
37
+ }
38
+ }
39
+ return memoryStore.get(key) ?? null;
40
+ }
41
+
42
+ export const KEYS = {
43
+ fabPosition: '@react_native_debug_toolkit/fab_position',
44
+ lastTab: '@react_native_debug_toolkit/last_tab',
45
+ consoleLogs: '@react_native_debug_toolkit/console_logs',
46
+ networkLogs: '@react_native_debug_toolkit/network_logs',
47
+ trackLogs: '@react_native_debug_toolkit/track_logs',
48
+ } as const;
@@ -0,0 +1,10 @@
1
+ type UrlRewriter = (url: string) => string;
2
+
3
+ let current: UrlRewriter | null = null;
4
+
5
+ export const urlRewriter = {
6
+ get: (): UrlRewriter | null => current,
7
+ set: (rewriter: UrlRewriter | null): void => {
8
+ current = rewriter;
9
+ },
10
+ };
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_constants","_copyToComputer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ClipboardTab","text","setText","useState","feedback","setFeedback","handleCopy","useCallback","result","copyToComputer","label","method","setTimeout","jsxs","View","style","s","container","children","jsx","TextInput","input","value","onChangeText","placeholder","placeholderTextColor","Colors","textLight","multiline","textAlignVertical","footer","TouchableOpacity","copyBtn","onPress","activeOpacity","Text","copyBtnText","hint","exports","StyleSheet","create","flex","backgroundColor","background","padding","Spacing","md","surface","borderRadius","Radius","fontSize","color","lineHeight","paddingTop","sm","minHeight","alignItems","paddingHorizontal","paddingVertical","primary","fontWeight"],"sourceRoot":"../../../src","sources":["components/ClipboardTab.tsx"],"mappings":"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","ignoreList":[]}