react-native-prod-debugger 1.0.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 (227) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +350 -0
  3. package/lib/commonjs/core/DebugBubble.js +139 -0
  4. package/lib/commonjs/core/DebugBubble.js.map +1 -0
  5. package/lib/commonjs/core/DebugOverlay.js +184 -0
  6. package/lib/commonjs/core/DebugOverlay.js.map +1 -0
  7. package/lib/commonjs/core/DebuggerProvider.js +174 -0
  8. package/lib/commonjs/core/DebuggerProvider.js.map +1 -0
  9. package/lib/commonjs/core/GestureDetector.js +83 -0
  10. package/lib/commonjs/core/GestureDetector.js.map +1 -0
  11. package/lib/commonjs/core/PluginRegistry.js +124 -0
  12. package/lib/commonjs/core/PluginRegistry.js.map +1 -0
  13. package/lib/commonjs/core/theme.js +50 -0
  14. package/lib/commonjs/core/theme.js.map +1 -0
  15. package/lib/commonjs/core/types.js +6 -0
  16. package/lib/commonjs/core/types.js.map +1 -0
  17. package/lib/commonjs/core/useDebugger.js +27 -0
  18. package/lib/commonjs/core/useDebugger.js.map +1 -0
  19. package/lib/commonjs/core/utils.js +239 -0
  20. package/lib/commonjs/core/utils.js.map +1 -0
  21. package/lib/commonjs/index.js +132 -0
  22. package/lib/commonjs/index.js.map +1 -0
  23. package/lib/commonjs/plugins/console/ConsoleInterceptor.js +103 -0
  24. package/lib/commonjs/plugins/console/ConsoleInterceptor.js.map +1 -0
  25. package/lib/commonjs/plugins/console/ConsoleViewerPlugin.js +269 -0
  26. package/lib/commonjs/plugins/console/ConsoleViewerPlugin.js.map +1 -0
  27. package/lib/commonjs/plugins/crashReporter/CrashReporterPlugin.js +363 -0
  28. package/lib/commonjs/plugins/crashReporter/CrashReporterPlugin.js.map +1 -0
  29. package/lib/commonjs/plugins/customActions/CustomActionsPlugin.js +218 -0
  30. package/lib/commonjs/plugins/customActions/CustomActionsPlugin.js.map +1 -0
  31. package/lib/commonjs/plugins/customActions/actionStore.js +46 -0
  32. package/lib/commonjs/plugins/customActions/actionStore.js.map +1 -0
  33. package/lib/commonjs/plugins/deepLinkTester/DeepLinkTesterPlugin.js +268 -0
  34. package/lib/commonjs/plugins/deepLinkTester/DeepLinkTesterPlugin.js.map +1 -0
  35. package/lib/commonjs/plugins/deviceInfo/DeviceInfoPlugin.js +184 -0
  36. package/lib/commonjs/plugins/deviceInfo/DeviceInfoPlugin.js.map +1 -0
  37. package/lib/commonjs/plugins/featureFlags/FeatureFlagsPlugin.js +381 -0
  38. package/lib/commonjs/plugins/featureFlags/FeatureFlagsPlugin.js.map +1 -0
  39. package/lib/commonjs/plugins/featureFlags/flagStore.js +125 -0
  40. package/lib/commonjs/plugins/featureFlags/flagStore.js.map +1 -0
  41. package/lib/commonjs/plugins/navigationInspector/NavigationInspectorPlugin.js +250 -0
  42. package/lib/commonjs/plugins/navigationInspector/NavigationInspectorPlugin.js.map +1 -0
  43. package/lib/commonjs/plugins/navigationInspector/navigationStore.js +65 -0
  44. package/lib/commonjs/plugins/navigationInspector/navigationStore.js.map +1 -0
  45. package/lib/commonjs/plugins/network/NetworkInspectorPlugin.js +709 -0
  46. package/lib/commonjs/plugins/network/NetworkInspectorPlugin.js.map +1 -0
  47. package/lib/commonjs/plugins/network/NetworkInterceptor.js +305 -0
  48. package/lib/commonjs/plugins/network/NetworkInterceptor.js.map +1 -0
  49. package/lib/commonjs/plugins/performance/PerformanceMonitorPlugin.js +261 -0
  50. package/lib/commonjs/plugins/performance/PerformanceMonitorPlugin.js.map +1 -0
  51. package/lib/commonjs/plugins/remoteConfig/RemoteConfigPlugin.js +265 -0
  52. package/lib/commonjs/plugins/remoteConfig/RemoteConfigPlugin.js.map +1 -0
  53. package/lib/commonjs/plugins/remoteConfig/remoteConfigStore.js +50 -0
  54. package/lib/commonjs/plugins/remoteConfig/remoteConfigStore.js.map +1 -0
  55. package/lib/commonjs/plugins/stateInspector/StateInspectorPlugin.js +378 -0
  56. package/lib/commonjs/plugins/stateInspector/StateInspectorPlugin.js.map +1 -0
  57. package/lib/commonjs/plugins/stateInspector/stateAdapterRegistry.js +62 -0
  58. package/lib/commonjs/plugins/stateInspector/stateAdapterRegistry.js.map +1 -0
  59. package/lib/commonjs/plugins/storageBrowser/StorageBrowserPlugin.js +496 -0
  60. package/lib/commonjs/plugins/storageBrowser/StorageBrowserPlugin.js.map +1 -0
  61. package/lib/commonjs/plugins/storageBrowser/storageAdapterRegistry.js +44 -0
  62. package/lib/commonjs/plugins/storageBrowser/storageAdapterRegistry.js.map +1 -0
  63. package/lib/commonjs/plugins/timeline/TimelinePlugin.js +294 -0
  64. package/lib/commonjs/plugins/timeline/TimelinePlugin.js.map +1 -0
  65. package/lib/commonjs/plugins/timeline/timelineStore.js +61 -0
  66. package/lib/commonjs/plugins/timeline/timelineStore.js.map +1 -0
  67. package/lib/module/core/DebugBubble.js +131 -0
  68. package/lib/module/core/DebugBubble.js.map +1 -0
  69. package/lib/module/core/DebugOverlay.js +176 -0
  70. package/lib/module/core/DebugOverlay.js.map +1 -0
  71. package/lib/module/core/DebuggerProvider.js +167 -0
  72. package/lib/module/core/DebuggerProvider.js.map +1 -0
  73. package/lib/module/core/GestureDetector.js +75 -0
  74. package/lib/module/core/GestureDetector.js.map +1 -0
  75. package/lib/module/core/PluginRegistry.js +116 -0
  76. package/lib/module/core/PluginRegistry.js.map +1 -0
  77. package/lib/module/core/theme.js +43 -0
  78. package/lib/module/core/theme.js.map +1 -0
  79. package/lib/module/core/types.js +2 -0
  80. package/lib/module/core/types.js.map +1 -0
  81. package/lib/module/core/useDebugger.js +21 -0
  82. package/lib/module/core/useDebugger.js.map +1 -0
  83. package/lib/module/core/utils.js +219 -0
  84. package/lib/module/core/utils.js.map +1 -0
  85. package/lib/module/index.js +44 -0
  86. package/lib/module/index.js.map +1 -0
  87. package/lib/module/plugins/console/ConsoleInterceptor.js +97 -0
  88. package/lib/module/plugins/console/ConsoleInterceptor.js.map +1 -0
  89. package/lib/module/plugins/console/ConsoleViewerPlugin.js +262 -0
  90. package/lib/module/plugins/console/ConsoleViewerPlugin.js.map +1 -0
  91. package/lib/module/plugins/crashReporter/CrashReporterPlugin.js +357 -0
  92. package/lib/module/plugins/crashReporter/CrashReporterPlugin.js.map +1 -0
  93. package/lib/module/plugins/customActions/CustomActionsPlugin.js +211 -0
  94. package/lib/module/plugins/customActions/CustomActionsPlugin.js.map +1 -0
  95. package/lib/module/plugins/customActions/actionStore.js +38 -0
  96. package/lib/module/plugins/customActions/actionStore.js.map +1 -0
  97. package/lib/module/plugins/deepLinkTester/DeepLinkTesterPlugin.js +261 -0
  98. package/lib/module/plugins/deepLinkTester/DeepLinkTesterPlugin.js.map +1 -0
  99. package/lib/module/plugins/deviceInfo/DeviceInfoPlugin.js +177 -0
  100. package/lib/module/plugins/deviceInfo/DeviceInfoPlugin.js.map +1 -0
  101. package/lib/module/plugins/featureFlags/FeatureFlagsPlugin.js +374 -0
  102. package/lib/module/plugins/featureFlags/FeatureFlagsPlugin.js.map +1 -0
  103. package/lib/module/plugins/featureFlags/flagStore.js +117 -0
  104. package/lib/module/plugins/featureFlags/flagStore.js.map +1 -0
  105. package/lib/module/plugins/navigationInspector/NavigationInspectorPlugin.js +243 -0
  106. package/lib/module/plugins/navigationInspector/NavigationInspectorPlugin.js.map +1 -0
  107. package/lib/module/plugins/navigationInspector/navigationStore.js +58 -0
  108. package/lib/module/plugins/navigationInspector/navigationStore.js.map +1 -0
  109. package/lib/module/plugins/network/NetworkInspectorPlugin.js +703 -0
  110. package/lib/module/plugins/network/NetworkInspectorPlugin.js.map +1 -0
  111. package/lib/module/plugins/network/NetworkInterceptor.js +299 -0
  112. package/lib/module/plugins/network/NetworkInterceptor.js.map +1 -0
  113. package/lib/module/plugins/performance/PerformanceMonitorPlugin.js +254 -0
  114. package/lib/module/plugins/performance/PerformanceMonitorPlugin.js.map +1 -0
  115. package/lib/module/plugins/remoteConfig/RemoteConfigPlugin.js +258 -0
  116. package/lib/module/plugins/remoteConfig/RemoteConfigPlugin.js.map +1 -0
  117. package/lib/module/plugins/remoteConfig/remoteConfigStore.js +43 -0
  118. package/lib/module/plugins/remoteConfig/remoteConfigStore.js.map +1 -0
  119. package/lib/module/plugins/stateInspector/StateInspectorPlugin.js +372 -0
  120. package/lib/module/plugins/stateInspector/StateInspectorPlugin.js.map +1 -0
  121. package/lib/module/plugins/stateInspector/stateAdapterRegistry.js +54 -0
  122. package/lib/module/plugins/stateInspector/stateAdapterRegistry.js.map +1 -0
  123. package/lib/module/plugins/storageBrowser/StorageBrowserPlugin.js +489 -0
  124. package/lib/module/plugins/storageBrowser/StorageBrowserPlugin.js.map +1 -0
  125. package/lib/module/plugins/storageBrowser/storageAdapterRegistry.js +36 -0
  126. package/lib/module/plugins/storageBrowser/storageAdapterRegistry.js.map +1 -0
  127. package/lib/module/plugins/timeline/TimelinePlugin.js +287 -0
  128. package/lib/module/plugins/timeline/TimelinePlugin.js.map +1 -0
  129. package/lib/module/plugins/timeline/timelineStore.js +54 -0
  130. package/lib/module/plugins/timeline/timelineStore.js.map +1 -0
  131. package/lib/typescript/core/DebugBubble.d.ts +22 -0
  132. package/lib/typescript/core/DebugBubble.d.ts.map +1 -0
  133. package/lib/typescript/core/DebugOverlay.d.ts +18 -0
  134. package/lib/typescript/core/DebugOverlay.d.ts.map +1 -0
  135. package/lib/typescript/core/DebuggerProvider.d.ts +25 -0
  136. package/lib/typescript/core/DebuggerProvider.d.ts.map +1 -0
  137. package/lib/typescript/core/GestureDetector.d.ts +20 -0
  138. package/lib/typescript/core/GestureDetector.d.ts.map +1 -0
  139. package/lib/typescript/core/PluginRegistry.d.ts +41 -0
  140. package/lib/typescript/core/PluginRegistry.d.ts.map +1 -0
  141. package/lib/typescript/core/theme.d.ts +11 -0
  142. package/lib/typescript/core/theme.d.ts.map +1 -0
  143. package/lib/typescript/core/types.d.ts +269 -0
  144. package/lib/typescript/core/types.d.ts.map +1 -0
  145. package/lib/typescript/core/useDebugger.d.ts +14 -0
  146. package/lib/typescript/core/useDebugger.d.ts.map +1 -0
  147. package/lib/typescript/core/utils.d.ts +46 -0
  148. package/lib/typescript/core/utils.d.ts.map +1 -0
  149. package/lib/typescript/index.d.ts +23 -0
  150. package/lib/typescript/index.d.ts.map +1 -0
  151. package/lib/typescript/plugins/console/ConsoleInterceptor.d.ts +32 -0
  152. package/lib/typescript/plugins/console/ConsoleInterceptor.d.ts.map +1 -0
  153. package/lib/typescript/plugins/console/ConsoleViewerPlugin.d.ts +3 -0
  154. package/lib/typescript/plugins/console/ConsoleViewerPlugin.d.ts.map +1 -0
  155. package/lib/typescript/plugins/crashReporter/CrashReporterPlugin.d.ts +3 -0
  156. package/lib/typescript/plugins/crashReporter/CrashReporterPlugin.d.ts.map +1 -0
  157. package/lib/typescript/plugins/customActions/CustomActionsPlugin.d.ts +3 -0
  158. package/lib/typescript/plugins/customActions/CustomActionsPlugin.d.ts.map +1 -0
  159. package/lib/typescript/plugins/customActions/actionStore.d.ts +16 -0
  160. package/lib/typescript/plugins/customActions/actionStore.d.ts.map +1 -0
  161. package/lib/typescript/plugins/deepLinkTester/DeepLinkTesterPlugin.d.ts +3 -0
  162. package/lib/typescript/plugins/deepLinkTester/DeepLinkTesterPlugin.d.ts.map +1 -0
  163. package/lib/typescript/plugins/deviceInfo/DeviceInfoPlugin.d.ts +3 -0
  164. package/lib/typescript/plugins/deviceInfo/DeviceInfoPlugin.d.ts.map +1 -0
  165. package/lib/typescript/plugins/featureFlags/FeatureFlagsPlugin.d.ts +3 -0
  166. package/lib/typescript/plugins/featureFlags/FeatureFlagsPlugin.d.ts.map +1 -0
  167. package/lib/typescript/plugins/featureFlags/flagStore.d.ts +45 -0
  168. package/lib/typescript/plugins/featureFlags/flagStore.d.ts.map +1 -0
  169. package/lib/typescript/plugins/navigationInspector/NavigationInspectorPlugin.d.ts +3 -0
  170. package/lib/typescript/plugins/navigationInspector/NavigationInspectorPlugin.d.ts.map +1 -0
  171. package/lib/typescript/plugins/navigationInspector/navigationStore.d.ts +30 -0
  172. package/lib/typescript/plugins/navigationInspector/navigationStore.d.ts.map +1 -0
  173. package/lib/typescript/plugins/network/NetworkInspectorPlugin.d.ts +3 -0
  174. package/lib/typescript/plugins/network/NetworkInspectorPlugin.d.ts.map +1 -0
  175. package/lib/typescript/plugins/network/NetworkInterceptor.d.ts +42 -0
  176. package/lib/typescript/plugins/network/NetworkInterceptor.d.ts.map +1 -0
  177. package/lib/typescript/plugins/performance/PerformanceMonitorPlugin.d.ts +3 -0
  178. package/lib/typescript/plugins/performance/PerformanceMonitorPlugin.d.ts.map +1 -0
  179. package/lib/typescript/plugins/remoteConfig/RemoteConfigPlugin.d.ts +3 -0
  180. package/lib/typescript/plugins/remoteConfig/RemoteConfigPlugin.d.ts.map +1 -0
  181. package/lib/typescript/plugins/remoteConfig/remoteConfigStore.d.ts +20 -0
  182. package/lib/typescript/plugins/remoteConfig/remoteConfigStore.d.ts.map +1 -0
  183. package/lib/typescript/plugins/stateInspector/StateInspectorPlugin.d.ts +3 -0
  184. package/lib/typescript/plugins/stateInspector/StateInspectorPlugin.d.ts.map +1 -0
  185. package/lib/typescript/plugins/stateInspector/stateAdapterRegistry.d.ts +34 -0
  186. package/lib/typescript/plugins/stateInspector/stateAdapterRegistry.d.ts.map +1 -0
  187. package/lib/typescript/plugins/storageBrowser/StorageBrowserPlugin.d.ts +3 -0
  188. package/lib/typescript/plugins/storageBrowser/StorageBrowserPlugin.d.ts.map +1 -0
  189. package/lib/typescript/plugins/storageBrowser/storageAdapterRegistry.d.ts +16 -0
  190. package/lib/typescript/plugins/storageBrowser/storageAdapterRegistry.d.ts.map +1 -0
  191. package/lib/typescript/plugins/timeline/TimelinePlugin.d.ts +3 -0
  192. package/lib/typescript/plugins/timeline/TimelinePlugin.d.ts.map +1 -0
  193. package/lib/typescript/plugins/timeline/timelineStore.d.ts +24 -0
  194. package/lib/typescript/plugins/timeline/timelineStore.d.ts.map +1 -0
  195. package/package.json +131 -0
  196. package/src/core/DebugBubble.tsx +149 -0
  197. package/src/core/DebugOverlay.tsx +211 -0
  198. package/src/core/DebuggerProvider.tsx +211 -0
  199. package/src/core/GestureDetector.tsx +95 -0
  200. package/src/core/PluginRegistry.ts +118 -0
  201. package/src/core/theme.ts +41 -0
  202. package/src/core/types.ts +339 -0
  203. package/src/core/useDebugger.ts +24 -0
  204. package/src/core/utils.ts +221 -0
  205. package/src/index.ts +67 -0
  206. package/src/plugins/console/ConsoleInterceptor.ts +110 -0
  207. package/src/plugins/console/ConsoleViewerPlugin.tsx +241 -0
  208. package/src/plugins/crashReporter/CrashReporterPlugin.tsx +316 -0
  209. package/src/plugins/customActions/CustomActionsPlugin.tsx +199 -0
  210. package/src/plugins/customActions/actionStore.ts +49 -0
  211. package/src/plugins/deepLinkTester/DeepLinkTesterPlugin.tsx +213 -0
  212. package/src/plugins/deviceInfo/DeviceInfoPlugin.tsx +153 -0
  213. package/src/plugins/featureFlags/FeatureFlagsPlugin.tsx +338 -0
  214. package/src/plugins/featureFlags/flagStore.ts +118 -0
  215. package/src/plugins/navigationInspector/NavigationInspectorPlugin.tsx +170 -0
  216. package/src/plugins/navigationInspector/navigationStore.ts +70 -0
  217. package/src/plugins/network/NetworkInspectorPlugin.tsx +598 -0
  218. package/src/plugins/network/NetworkInterceptor.ts +344 -0
  219. package/src/plugins/performance/PerformanceMonitorPlugin.tsx +194 -0
  220. package/src/plugins/remoteConfig/RemoteConfigPlugin.tsx +205 -0
  221. package/src/plugins/remoteConfig/remoteConfigStore.ts +48 -0
  222. package/src/plugins/stateInspector/StateInspectorPlugin.tsx +342 -0
  223. package/src/plugins/stateInspector/stateAdapterRegistry.ts +66 -0
  224. package/src/plugins/storageBrowser/StorageBrowserPlugin.tsx +410 -0
  225. package/src/plugins/storageBrowser/storageAdapterRegistry.ts +47 -0
  226. package/src/plugins/timeline/TimelinePlugin.tsx +242 -0
  227. package/src/plugins/timeline/timelineStore.ts +65 -0
@@ -0,0 +1,261 @@
1
+ import React, { useState, useCallback } from 'react';
2
+ import { View, Text, TouchableOpacity, TextInput, ScrollView, StyleSheet, Linking, Alert } from 'react-native';
3
+ const DeepLinkTesterPanel = ({
4
+ theme
5
+ }) => {
6
+ const [url, setUrl] = useState('');
7
+ const [history, setHistory] = useState([]);
8
+ const [presets, setPresets] = useState([]);
9
+ const handleOpen = useCallback(async () => {
10
+ if (!url.trim()) return;
11
+ try {
12
+ const canOpen = await Linking.canOpenURL(url);
13
+ if (canOpen) {
14
+ await Linking.openURL(url);
15
+ setHistory(prev => [{
16
+ url,
17
+ timestamp: Date.now(),
18
+ success: true
19
+ }, ...prev].slice(0, 20));
20
+ } else {
21
+ Alert.alert('Error', `Cannot open URL: ${url}`);
22
+ setHistory(prev => [{
23
+ url,
24
+ timestamp: Date.now(),
25
+ success: false
26
+ }, ...prev].slice(0, 20));
27
+ }
28
+ } catch (err) {
29
+ Alert.alert('Error', err instanceof Error ? err.message : 'Failed');
30
+ setHistory(prev => [{
31
+ url,
32
+ timestamp: Date.now(),
33
+ success: false
34
+ }, ...prev].slice(0, 20));
35
+ }
36
+ }, [url]);
37
+ const handleSavePreset = useCallback(() => {
38
+ if (!url.trim() || presets.includes(url)) return;
39
+ setPresets(prev => [url, ...prev]);
40
+ }, [url, presets]);
41
+ return /*#__PURE__*/React.createElement(ScrollView, {
42
+ style: styles.container
43
+ }, /*#__PURE__*/React.createElement(View, {
44
+ style: [styles.inputSection, {
45
+ backgroundColor: theme.surface
46
+ }]
47
+ }, /*#__PURE__*/React.createElement(Text, {
48
+ style: [styles.sectionTitle, {
49
+ color: theme.textSecondary
50
+ }]
51
+ }, "DEEP LINK URL"), /*#__PURE__*/React.createElement(TextInput, {
52
+ style: [styles.urlInput, {
53
+ color: theme.text,
54
+ backgroundColor: theme.surfaceAlt,
55
+ borderColor: theme.border
56
+ }],
57
+ value: url,
58
+ onChangeText: setUrl,
59
+ placeholder: "myapp://path/to/screen?param=value",
60
+ placeholderTextColor: theme.textMuted,
61
+ autoCapitalize: "none",
62
+ autoCorrect: false
63
+ }), /*#__PURE__*/React.createElement(View, {
64
+ style: styles.buttonRow
65
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
66
+ style: [styles.primaryBtn, {
67
+ backgroundColor: theme.accent
68
+ }],
69
+ onPress: handleOpen,
70
+ activeOpacity: 0.7
71
+ }, /*#__PURE__*/React.createElement(Text, {
72
+ style: styles.primaryBtnText
73
+ }, "\uD83D\uDD17 Open Link")), /*#__PURE__*/React.createElement(TouchableOpacity, {
74
+ style: [styles.secondaryBtn, {
75
+ borderColor: theme.border
76
+ }],
77
+ onPress: handleSavePreset,
78
+ activeOpacity: 0.7
79
+ }, /*#__PURE__*/React.createElement(Text, {
80
+ style: [styles.secondaryBtnText, {
81
+ color: theme.textSecondary
82
+ }]
83
+ }, "Save")))), /*#__PURE__*/React.createElement(View, {
84
+ style: [styles.section, {
85
+ backgroundColor: theme.surface
86
+ }]
87
+ }, /*#__PURE__*/React.createElement(Text, {
88
+ style: [styles.sectionTitle, {
89
+ color: theme.textSecondary
90
+ }]
91
+ }, "COMMON SCHEMES"), /*#__PURE__*/React.createElement(View, {
92
+ style: styles.schemeGrid
93
+ }, ['tel:+1234567890', 'mailto:test@example.com', 'sms:+1234567890', 'https://example.com', 'geo:37.7749,-122.4194'].map(scheme => /*#__PURE__*/React.createElement(TouchableOpacity, {
94
+ key: scheme,
95
+ style: [styles.schemeChip, {
96
+ backgroundColor: theme.surfaceAlt,
97
+ borderColor: theme.border
98
+ }],
99
+ onPress: () => setUrl(scheme),
100
+ activeOpacity: 0.7
101
+ }, /*#__PURE__*/React.createElement(Text, {
102
+ style: [styles.schemeText, {
103
+ color: theme.text
104
+ }],
105
+ numberOfLines: 1
106
+ }, scheme.length > 25 ? scheme.slice(0, 25) + '…' : scheme))))), presets.length > 0 && /*#__PURE__*/React.createElement(View, {
107
+ style: [styles.section, {
108
+ backgroundColor: theme.surface
109
+ }]
110
+ }, /*#__PURE__*/React.createElement(Text, {
111
+ style: [styles.sectionTitle, {
112
+ color: theme.textSecondary
113
+ }]
114
+ }, "SAVED PRESETS"), presets.map((preset, i) => /*#__PURE__*/React.createElement(TouchableOpacity, {
115
+ key: i,
116
+ style: [styles.presetRow, {
117
+ borderBottomColor: theme.border
118
+ }],
119
+ onPress: () => setUrl(preset),
120
+ activeOpacity: 0.7
121
+ }, /*#__PURE__*/React.createElement(Text, {
122
+ style: [styles.presetText, {
123
+ color: theme.accent
124
+ }],
125
+ numberOfLines: 1
126
+ }, preset)))), history.length > 0 && /*#__PURE__*/React.createElement(View, {
127
+ style: [styles.section, {
128
+ backgroundColor: theme.surface
129
+ }]
130
+ }, /*#__PURE__*/React.createElement(Text, {
131
+ style: [styles.sectionTitle, {
132
+ color: theme.textSecondary
133
+ }]
134
+ }, "HISTORY"), history.map((entry, i) => /*#__PURE__*/React.createElement(TouchableOpacity, {
135
+ key: i,
136
+ style: [styles.historyRow, {
137
+ borderBottomColor: theme.border
138
+ }],
139
+ onPress: () => setUrl(entry.url),
140
+ activeOpacity: 0.7
141
+ }, /*#__PURE__*/React.createElement(Text, {
142
+ style: [styles.historyStatus]
143
+ }, entry.success ? '✅' : '❌'), /*#__PURE__*/React.createElement(Text, {
144
+ style: [styles.historyUrl, {
145
+ color: theme.text
146
+ }],
147
+ numberOfLines: 1
148
+ }, entry.url)))), /*#__PURE__*/React.createElement(View, {
149
+ style: {
150
+ height: 40
151
+ }
152
+ }));
153
+ };
154
+ const styles = StyleSheet.create({
155
+ container: {
156
+ flex: 1
157
+ },
158
+ inputSection: {
159
+ margin: 12,
160
+ padding: 12,
161
+ borderRadius: 12
162
+ },
163
+ section: {
164
+ margin: 12,
165
+ marginTop: 0,
166
+ padding: 12,
167
+ borderRadius: 12
168
+ },
169
+ sectionTitle: {
170
+ fontSize: 11,
171
+ fontWeight: '700',
172
+ textTransform: 'uppercase',
173
+ letterSpacing: 1,
174
+ marginBottom: 8
175
+ },
176
+ urlInput: {
177
+ height: 44,
178
+ borderRadius: 8,
179
+ paddingHorizontal: 12,
180
+ fontSize: 14,
181
+ borderWidth: 1,
182
+ fontFamily: 'monospace'
183
+ },
184
+ buttonRow: {
185
+ flexDirection: 'row',
186
+ gap: 8,
187
+ marginTop: 12
188
+ },
189
+ primaryBtn: {
190
+ flex: 1,
191
+ height: 42,
192
+ borderRadius: 8,
193
+ alignItems: 'center',
194
+ justifyContent: 'center'
195
+ },
196
+ primaryBtnText: {
197
+ color: '#FFF',
198
+ fontSize: 14,
199
+ fontWeight: '700'
200
+ },
201
+ secondaryBtn: {
202
+ paddingHorizontal: 16,
203
+ height: 42,
204
+ borderRadius: 8,
205
+ alignItems: 'center',
206
+ justifyContent: 'center',
207
+ borderWidth: 1
208
+ },
209
+ secondaryBtnText: {
210
+ fontSize: 13,
211
+ fontWeight: '600'
212
+ },
213
+ schemeGrid: {
214
+ flexDirection: 'row',
215
+ flexWrap: 'wrap',
216
+ gap: 6
217
+ },
218
+ schemeChip: {
219
+ paddingHorizontal: 10,
220
+ paddingVertical: 6,
221
+ borderRadius: 8,
222
+ borderWidth: 1
223
+ },
224
+ schemeText: {
225
+ fontSize: 11,
226
+ fontFamily: 'monospace'
227
+ },
228
+ presetRow: {
229
+ paddingVertical: 10,
230
+ borderBottomWidth: StyleSheet.hairlineWidth
231
+ },
232
+ presetText: {
233
+ fontSize: 13,
234
+ fontFamily: 'monospace'
235
+ },
236
+ historyRow: {
237
+ flexDirection: 'row',
238
+ alignItems: 'center',
239
+ paddingVertical: 8,
240
+ borderBottomWidth: StyleSheet.hairlineWidth,
241
+ gap: 8
242
+ },
243
+ historyStatus: {
244
+ fontSize: 12
245
+ },
246
+ historyUrl: {
247
+ fontSize: 12,
248
+ fontFamily: 'monospace',
249
+ flex: 1
250
+ }
251
+ });
252
+ export function createDeepLinkTesterPlugin() {
253
+ return {
254
+ id: 'deep-link-tester',
255
+ name: 'Links',
256
+ icon: '🔗',
257
+ component: DeepLinkTesterPanel,
258
+ order: 120
259
+ };
260
+ }
261
+ //# sourceMappingURL=DeepLinkTesterPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useCallback","View","Text","TouchableOpacity","TextInput","ScrollView","StyleSheet","Linking","Alert","DeepLinkTesterPanel","theme","url","setUrl","history","setHistory","presets","setPresets","handleOpen","trim","canOpen","canOpenURL","openURL","prev","timestamp","Date","now","success","slice","alert","err","Error","message","handleSavePreset","includes","createElement","style","styles","container","inputSection","backgroundColor","surface","sectionTitle","color","textSecondary","urlInput","text","surfaceAlt","borderColor","border","value","onChangeText","placeholder","placeholderTextColor","textMuted","autoCapitalize","autoCorrect","buttonRow","primaryBtn","accent","onPress","activeOpacity","primaryBtnText","secondaryBtn","secondaryBtnText","section","schemeGrid","map","scheme","key","schemeChip","schemeText","numberOfLines","length","preset","i","presetRow","borderBottomColor","presetText","entry","historyRow","historyStatus","historyUrl","height","create","flex","margin","padding","borderRadius","marginTop","fontSize","fontWeight","textTransform","letterSpacing","marginBottom","paddingHorizontal","borderWidth","fontFamily","flexDirection","gap","alignItems","justifyContent","flexWrap","paddingVertical","borderBottomWidth","hairlineWidth","createDeepLinkTesterPlugin","id","name","icon","component","order"],"sourceRoot":"../../../../src","sources":["plugins/deepLinkTester/DeepLinkTesterPlugin.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SACEC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,UAAU,EACVC,OAAO,EACPC,KAAK,QACA,cAAc;AAGrB,MAAMC,mBAAmD,GAAGA,CAAC;EAAEC;AAAM,CAAC,KAAK;EACzE,MAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAGb,QAAQ,CAAC,EAAE,CAAC;EAClC,MAAM,CAACc,OAAO,EAAEC,UAAU,CAAC,GAAGf,QAAQ,CACpC,EACF,CAAC;EACD,MAAM,CAACgB,OAAO,EAAEC,UAAU,CAAC,GAAGjB,QAAQ,CAAW,EAAE,CAAC;EAEpD,M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-0,0 +1,177 @@
1
+ import React, { useMemo, useCallback } from 'react';
2
+ import { View, Text, ScrollView, TouchableOpacity, StyleSheet, Platform, Dimensions } from 'react-native';
3
+ import { copyToClipboard } from '../../core/utils';
4
+ const SCREEN = Dimensions.get('window');
5
+ const DeviceInfoPanel = ({
6
+ theme
7
+ }) => {
8
+ const info = useMemo(() => {
9
+ const items = [];
10
+
11
+ // Platform
12
+ items.push({
13
+ label: 'Platform',
14
+ value: Platform.OS,
15
+ group: 'Platform'
16
+ });
17
+ items.push({
18
+ label: 'OS Version',
19
+ value: String(Platform.Version),
20
+ group: 'Platform'
21
+ });
22
+ items.push({
23
+ label: 'Hermes',
24
+ value: typeof HermesInternal !== 'undefined' ? '✅ Enabled' : '❌ Disabled',
25
+ group: 'Platform'
26
+ });
27
+ items.push({
28
+ label: '__DEV__',
29
+ value: typeof __DEV__ !== 'undefined' && __DEV__ ? 'true' : 'false',
30
+ group: 'Platform'
31
+ });
32
+
33
+ // Screen
34
+ items.push({
35
+ label: 'Screen',
36
+ value: `${SCREEN.width} × ${SCREEN.height}`,
37
+ group: 'Display'
38
+ });
39
+ items.push({
40
+ label: 'Scale',
41
+ value: String(Dimensions.get('window').scale ?? 'N/A'),
42
+ group: 'Display'
43
+ });
44
+ items.push({
45
+ label: 'Font Scale',
46
+ value: String(Dimensions.get('window').fontScale ?? 'N/A'),
47
+ group: 'Display'
48
+ });
49
+
50
+ // Runtime
51
+ items.push({
52
+ label: 'Locale',
53
+ value: Platform.OS === 'ios' ? Platform.locale || 'Unknown' : 'Check via library',
54
+ group: 'Runtime'
55
+ });
56
+ return items;
57
+ }, []);
58
+ const handleCopyAll = useCallback(() => {
59
+ const text = info.map(i => `${i.label}: ${i.value}`).join('\n');
60
+ copyToClipboard(text);
61
+ }, [info]);
62
+ const groups = useMemo(() => {
63
+ const groupMap = new Map();
64
+ for (const item of info) {
65
+ const group = groupMap.get(item.group) || [];
66
+ group.push(item);
67
+ groupMap.set(item.group, group);
68
+ }
69
+ return groupMap;
70
+ }, [info]);
71
+ return /*#__PURE__*/React.createElement(ScrollView, {
72
+ style: styles.container
73
+ }, /*#__PURE__*/React.createElement(View, {
74
+ style: [styles.header, {
75
+ backgroundColor: theme.surface
76
+ }]
77
+ }, /*#__PURE__*/React.createElement(Text, {
78
+ style: [styles.headerTitle, {
79
+ color: theme.text
80
+ }]
81
+ }, "\uD83D\uDCF1 Device Info"), /*#__PURE__*/React.createElement(TouchableOpacity, {
82
+ onPress: handleCopyAll,
83
+ activeOpacity: 0.7
84
+ }, /*#__PURE__*/React.createElement(Text, {
85
+ style: [styles.copyAllBtn, {
86
+ color: theme.accent
87
+ }]
88
+ }, "Copy All"))), Array.from(groups.entries()).map(([groupName, items]) => /*#__PURE__*/React.createElement(View, {
89
+ key: groupName,
90
+ style: [styles.group, {
91
+ backgroundColor: theme.surface
92
+ }]
93
+ }, /*#__PURE__*/React.createElement(Text, {
94
+ style: [styles.groupTitle, {
95
+ color: theme.textSecondary
96
+ }]
97
+ }, groupName), items.map(item => /*#__PURE__*/React.createElement(TouchableOpacity, {
98
+ key: item.label,
99
+ style: [styles.infoRow, {
100
+ borderBottomColor: theme.border
101
+ }],
102
+ onLongPress: () => copyToClipboard(item.value),
103
+ activeOpacity: 0.7
104
+ }, /*#__PURE__*/React.createElement(Text, {
105
+ style: [styles.infoLabel, {
106
+ color: theme.textSecondary
107
+ }]
108
+ }, item.label), /*#__PURE__*/React.createElement(Text, {
109
+ style: [styles.infoValue, {
110
+ color: theme.text
111
+ }],
112
+ selectable: true
113
+ }, item.value))))));
114
+ };
115
+ const styles = StyleSheet.create({
116
+ container: {
117
+ flex: 1
118
+ },
119
+ header: {
120
+ flexDirection: 'row',
121
+ justifyContent: 'space-between',
122
+ alignItems: 'center',
123
+ paddingHorizontal: 12,
124
+ paddingVertical: 12
125
+ },
126
+ headerTitle: {
127
+ fontSize: 16,
128
+ fontWeight: '700'
129
+ },
130
+ copyAllBtn: {
131
+ fontSize: 13,
132
+ fontWeight: '600'
133
+ },
134
+ group: {
135
+ marginHorizontal: 12,
136
+ marginBottom: 12,
137
+ borderRadius: 12,
138
+ overflow: 'hidden'
139
+ },
140
+ groupTitle: {
141
+ fontSize: 12,
142
+ fontWeight: '700',
143
+ textTransform: 'uppercase',
144
+ letterSpacing: 1,
145
+ paddingHorizontal: 12,
146
+ paddingTop: 12,
147
+ paddingBottom: 4
148
+ },
149
+ infoRow: {
150
+ flexDirection: 'row',
151
+ justifyContent: 'space-between',
152
+ alignItems: 'center',
153
+ paddingHorizontal: 12,
154
+ paddingVertical: 10,
155
+ borderBottomWidth: StyleSheet.hairlineWidth
156
+ },
157
+ infoLabel: {
158
+ fontSize: 13,
159
+ flex: 1
160
+ },
161
+ infoValue: {
162
+ fontSize: 13,
163
+ fontWeight: '600',
164
+ flex: 1,
165
+ textAlign: 'right'
166
+ }
167
+ });
168
+ export function createDeviceInfoPlugin() {
169
+ return {
170
+ id: 'device-info',
171
+ name: 'Device',
172
+ icon: '📱',
173
+ component: DeviceInfoPanel,
174
+ order: 80
175
+ };
176
+ }
177
+ //# sourceMappingURL=DeviceInfoPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","useCallback","View","Text","ScrollView","TouchableOpacity","StyleSheet","Platform","Dimensions","copyToClipboard","SCREEN","get","DeviceInfoPanel","theme","info","items","push","label","value","OS","group","String","Version","HermesInternal","__DEV__","width","height","scale","fontScale","locale","handleCopyAll","text","map","i","join","groups","groupMap","Map","item","set","createElement","style","styles","container","header","backgroundColor","surface","headerTitle","color","onPress","activeOpacity","copyAllBtn","accent","Array","from","entries","groupName","key","groupTitle","textSecondary","infoRow","borderBottomColor","border","onLongPress","infoLabel","infoValue","selectable","create","flex","flexDirection","justifyContent","alignItems","paddingHorizontal","paddingVertical","fontSize","fontWeight","marginHorizontal","marginBottom","borderRadius","overflow","textTransform","letterSpacing","paddingTop","paddingBottom","borderBottomWidth","hairlineWidth","textAlign","createDeviceInfoPlugin","id","name","icon","component","order"],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