react-native-debug-toolkit 2.0.0 → 2.1.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 (228) hide show
  1. package/README.md +72 -72
  2. package/README.zh-CN.md +209 -0
  3. package/lib/commonjs/components/ClipboardTab.js +15 -16
  4. package/lib/commonjs/components/ClipboardTab.js.map +1 -1
  5. package/lib/commonjs/components/ConsoleLogTab.js +69 -202
  6. package/lib/commonjs/components/ConsoleLogTab.js.map +1 -1
  7. package/lib/commonjs/components/DebugPanel.js +230 -0
  8. package/lib/commonjs/components/DebugPanel.js.map +1 -0
  9. package/lib/commonjs/components/DebugView.js +66 -0
  10. package/lib/commonjs/components/DebugView.js.map +1 -0
  11. package/lib/commonjs/components/EnvironmentTab.js +22 -23
  12. package/lib/commonjs/components/EnvironmentTab.js.map +1 -1
  13. package/lib/commonjs/components/FeatureTabBar.js +182 -0
  14. package/lib/commonjs/components/FeatureTabBar.js.map +1 -0
  15. package/lib/commonjs/components/FloatIcon.js +187 -0
  16. package/lib/commonjs/components/FloatIcon.js.map +1 -0
  17. package/lib/commonjs/components/FloatPanelView.js +140 -723
  18. package/lib/commonjs/components/FloatPanelView.js.map +1 -1
  19. package/lib/commonjs/components/NavigationLogTab.js +8 -8
  20. package/lib/commonjs/components/NavigationLogTab.js.map +1 -1
  21. package/lib/commonjs/components/NetworkLogTab.js +179 -350
  22. package/lib/commonjs/components/NetworkLogTab.js.map +1 -1
  23. package/lib/commonjs/components/ThirdPartyLibsTab.js +8 -8
  24. package/lib/commonjs/components/ThirdPartyLibsTab.js.map +1 -1
  25. package/lib/commonjs/components/TrackLogTab.js +106 -248
  26. package/lib/commonjs/components/TrackLogTab.js.map +1 -1
  27. package/lib/commonjs/components/ZustandLogTab.js +148 -288
  28. package/lib/commonjs/components/ZustandLogTab.js.map +1 -1
  29. package/lib/commonjs/components/shared/CollapsibleSection.js +4 -4
  30. package/lib/commonjs/components/shared/CollapsibleSection.js.map +1 -1
  31. package/lib/commonjs/components/shared/CopyButton.js +3 -3
  32. package/lib/commonjs/components/shared/CopyButton.js.map +1 -1
  33. package/lib/commonjs/components/shared/LogListScreen.js +174 -0
  34. package/lib/commonjs/components/shared/LogListScreen.js.map +1 -0
  35. package/lib/commonjs/core/DebugToolkit.js +92 -112
  36. package/lib/commonjs/core/DebugToolkit.js.map +1 -1
  37. package/lib/commonjs/core/DebugToolkitProvider.js +30 -28
  38. package/lib/commonjs/core/DebugToolkitProvider.js.map +1 -1
  39. package/lib/commonjs/features/ClipboardFeature.js +6 -2
  40. package/lib/commonjs/features/ClipboardFeature.js.map +1 -1
  41. package/lib/commonjs/features/ConsoleLogFeature.js +66 -49
  42. package/lib/commonjs/features/ConsoleLogFeature.js.map +1 -1
  43. package/lib/commonjs/features/EnvironmentFeature.js +5 -13
  44. package/lib/commonjs/features/EnvironmentFeature.js.map +1 -1
  45. package/lib/commonjs/features/NavigationLogFeature.js +17 -38
  46. package/lib/commonjs/features/NavigationLogFeature.js.map +1 -1
  47. package/lib/commonjs/features/NetworkFeature.js +35 -256
  48. package/lib/commonjs/features/NetworkFeature.js.map +1 -1
  49. package/lib/commonjs/features/TrackFeature.js +17 -38
  50. package/lib/commonjs/features/TrackFeature.js.map +1 -1
  51. package/lib/commonjs/features/ZustandLogFeature.js +21 -38
  52. package/lib/commonjs/features/ZustandLogFeature.js.map +1 -1
  53. package/lib/commonjs/hooks/useNavigationLogger.js.map +1 -1
  54. package/lib/commonjs/index.js +7 -20
  55. package/lib/commonjs/index.js.map +1 -1
  56. package/lib/commonjs/initialize.js +19 -96
  57. package/lib/commonjs/initialize.js.map +1 -1
  58. package/lib/commonjs/interceptors/networkInterceptor.js +466 -0
  59. package/lib/commonjs/interceptors/networkInterceptor.js.map +1 -0
  60. package/lib/commonjs/utils/colors.js +48 -0
  61. package/lib/commonjs/utils/colors.js.map +1 -0
  62. package/lib/commonjs/utils/createChannelFeature.js +48 -0
  63. package/lib/commonjs/utils/createChannelFeature.js.map +1 -0
  64. package/lib/commonjs/utils/layout.js +8 -0
  65. package/lib/commonjs/utils/layout.js.map +1 -0
  66. package/lib/commonjs/utils/urlRewriterRegistry.js +14 -0
  67. package/lib/commonjs/utils/urlRewriterRegistry.js.map +1 -0
  68. package/lib/module/components/ClipboardTab.js +8 -8
  69. package/lib/module/components/ClipboardTab.js.map +1 -1
  70. package/lib/module/components/ConsoleLogTab.js +66 -199
  71. package/lib/module/components/ConsoleLogTab.js.map +1 -1
  72. package/lib/module/components/DebugPanel.js +225 -0
  73. package/lib/module/components/DebugPanel.js.map +1 -0
  74. package/lib/module/components/DebugView.js +61 -0
  75. package/lib/module/components/DebugView.js.map +1 -0
  76. package/lib/module/components/EnvironmentTab.js +3 -3
  77. package/lib/module/components/EnvironmentTab.js.map +1 -1
  78. package/lib/module/components/FeatureTabBar.js +177 -0
  79. package/lib/module/components/FeatureTabBar.js.map +1 -0
  80. package/lib/module/components/FloatIcon.js +182 -0
  81. package/lib/module/components/FloatIcon.js.map +1 -0
  82. package/lib/module/components/FloatPanelView.js +141 -723
  83. package/lib/module/components/FloatPanelView.js.map +1 -1
  84. package/lib/module/components/NavigationLogTab.js +1 -1
  85. package/lib/module/components/NavigationLogTab.js.map +1 -1
  86. package/lib/module/components/NetworkLogTab.js +167 -338
  87. package/lib/module/components/NetworkLogTab.js.map +1 -1
  88. package/lib/module/components/ThirdPartyLibsTab.js +1 -1
  89. package/lib/module/components/ThirdPartyLibsTab.js.map +1 -1
  90. package/lib/module/components/TrackLogTab.js +94 -236
  91. package/lib/module/components/TrackLogTab.js.map +1 -1
  92. package/lib/module/components/ZustandLogTab.js +136 -276
  93. package/lib/module/components/ZustandLogTab.js.map +1 -1
  94. package/lib/module/components/shared/CollapsibleSection.js +1 -1
  95. package/lib/module/components/shared/CollapsibleSection.js.map +1 -1
  96. package/lib/module/components/shared/CopyButton.js +1 -1
  97. package/lib/module/components/shared/CopyButton.js.map +1 -1
  98. package/lib/module/components/shared/LogListScreen.js +169 -0
  99. package/lib/module/components/shared/LogListScreen.js.map +1 -0
  100. package/lib/module/core/DebugToolkit.js +92 -111
  101. package/lib/module/core/DebugToolkit.js.map +1 -1
  102. package/lib/module/core/DebugToolkitProvider.js +31 -29
  103. package/lib/module/core/DebugToolkitProvider.js.map +1 -1
  104. package/lib/module/features/ClipboardFeature.js +6 -2
  105. package/lib/module/features/ClipboardFeature.js.map +1 -1
  106. package/lib/module/features/ConsoleLogFeature.js +65 -49
  107. package/lib/module/features/ConsoleLogFeature.js.map +1 -1
  108. package/lib/module/features/EnvironmentFeature.js +5 -13
  109. package/lib/module/features/EnvironmentFeature.js.map +1 -1
  110. package/lib/module/features/NavigationLogFeature.js +16 -38
  111. package/lib/module/features/NavigationLogFeature.js.map +1 -1
  112. package/lib/module/features/NetworkFeature.js +34 -255
  113. package/lib/module/features/NetworkFeature.js.map +1 -1
  114. package/lib/module/features/TrackFeature.js +16 -38
  115. package/lib/module/features/TrackFeature.js.map +1 -1
  116. package/lib/module/features/ZustandLogFeature.js +22 -38
  117. package/lib/module/features/ZustandLogFeature.js.map +1 -1
  118. package/lib/module/hooks/useNavigationLogger.js.map +1 -1
  119. package/lib/module/index.js +2 -3
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/initialize.js +19 -95
  122. package/lib/module/initialize.js.map +1 -1
  123. package/lib/module/interceptors/networkInterceptor.js +460 -0
  124. package/lib/module/interceptors/networkInterceptor.js.map +1 -0
  125. package/lib/module/utils/colors.js +43 -0
  126. package/lib/module/utils/colors.js.map +1 -0
  127. package/lib/module/utils/createChannelFeature.js +44 -0
  128. package/lib/module/utils/createChannelFeature.js.map +1 -0
  129. package/lib/module/utils/layout.js +4 -0
  130. package/lib/module/utils/layout.js.map +1 -0
  131. package/lib/module/utils/urlRewriterRegistry.js +10 -0
  132. package/lib/module/utils/urlRewriterRegistry.js.map +1 -0
  133. package/lib/typescript/src/components/ClipboardTab.d.ts.map +1 -1
  134. package/lib/typescript/src/components/ConsoleLogTab.d.ts.map +1 -1
  135. package/lib/typescript/src/components/DebugPanel.d.ts +9 -0
  136. package/lib/typescript/src/components/DebugPanel.d.ts.map +1 -0
  137. package/lib/typescript/src/components/DebugView.d.ts +19 -0
  138. package/lib/typescript/src/components/DebugView.d.ts.map +1 -0
  139. package/lib/typescript/src/components/EnvironmentTab.d.ts.map +1 -1
  140. package/lib/typescript/src/components/FeatureTabBar.d.ts +13 -0
  141. package/lib/typescript/src/components/FeatureTabBar.d.ts.map +1 -0
  142. package/lib/typescript/src/components/FloatIcon.d.ts +12 -0
  143. package/lib/typescript/src/components/FloatIcon.d.ts.map +1 -0
  144. package/lib/typescript/src/components/FloatPanelView.d.ts +4 -59
  145. package/lib/typescript/src/components/FloatPanelView.d.ts.map +1 -1
  146. package/lib/typescript/src/components/NetworkLogTab.d.ts.map +1 -1
  147. package/lib/typescript/src/components/ThirdPartyLibsTab.d.ts.map +1 -1
  148. package/lib/typescript/src/components/TrackLogTab.d.ts.map +1 -1
  149. package/lib/typescript/src/components/ZustandLogTab.d.ts.map +1 -1
  150. package/lib/typescript/src/components/shared/LogListScreen.d.ts +21 -0
  151. package/lib/typescript/src/components/shared/LogListScreen.d.ts.map +1 -0
  152. package/lib/typescript/src/core/DebugToolkit.d.ts +11 -18
  153. package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
  154. package/lib/typescript/src/core/DebugToolkitProvider.d.ts +2 -5
  155. package/lib/typescript/src/core/DebugToolkitProvider.d.ts.map +1 -1
  156. package/lib/typescript/src/features/ClipboardFeature.d.ts +4 -0
  157. package/lib/typescript/src/features/ClipboardFeature.d.ts.map +1 -1
  158. package/lib/typescript/src/features/ConsoleLogFeature.d.ts +2 -0
  159. package/lib/typescript/src/features/ConsoleLogFeature.d.ts.map +1 -1
  160. package/lib/typescript/src/features/EnvironmentFeature.d.ts.map +1 -1
  161. package/lib/typescript/src/features/NavigationLogFeature.d.ts +2 -0
  162. package/lib/typescript/src/features/NavigationLogFeature.d.ts.map +1 -1
  163. package/lib/typescript/src/features/NetworkFeature.d.ts +7 -20
  164. package/lib/typescript/src/features/NetworkFeature.d.ts.map +1 -1
  165. package/lib/typescript/src/features/TrackFeature.d.ts +2 -0
  166. package/lib/typescript/src/features/TrackFeature.d.ts.map +1 -1
  167. package/lib/typescript/src/features/ZustandLogFeature.d.ts +2 -0
  168. package/lib/typescript/src/features/ZustandLogFeature.d.ts.map +1 -1
  169. package/lib/typescript/src/hooks/useNavigationLogger.d.ts +1 -8
  170. package/lib/typescript/src/hooks/useNavigationLogger.d.ts.map +1 -1
  171. package/lib/typescript/src/index.d.ts +5 -5
  172. package/lib/typescript/src/index.d.ts.map +1 -1
  173. package/lib/typescript/src/initialize.d.ts +3 -22
  174. package/lib/typescript/src/initialize.d.ts.map +1 -1
  175. package/lib/typescript/src/interceptors/networkInterceptor.d.ts +18 -0
  176. package/lib/typescript/src/interceptors/networkInterceptor.d.ts.map +1 -0
  177. package/lib/typescript/src/types/index.d.ts +26 -29
  178. package/lib/typescript/src/types/index.d.ts.map +1 -1
  179. package/lib/typescript/src/utils/colors.d.ts +21 -0
  180. package/lib/typescript/src/utils/colors.d.ts.map +1 -0
  181. package/lib/typescript/src/utils/createChannelFeature.d.ts +18 -0
  182. package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -0
  183. package/lib/typescript/src/utils/layout.d.ts +2 -0
  184. package/lib/typescript/src/utils/layout.d.ts.map +1 -0
  185. package/lib/typescript/src/utils/urlRewriterRegistry.d.ts +7 -0
  186. package/lib/typescript/src/utils/urlRewriterRegistry.d.ts.map +1 -0
  187. package/package.json +5 -1
  188. package/src/components/ClipboardTab.tsx +8 -8
  189. package/src/components/ConsoleLogTab.tsx +49 -163
  190. package/src/components/DebugPanel.tsx +215 -0
  191. package/src/components/DebugView.tsx +80 -0
  192. package/src/components/EnvironmentTab.tsx +3 -3
  193. package/src/components/FeatureTabBar.tsx +204 -0
  194. package/src/components/FloatIcon.tsx +171 -0
  195. package/src/components/FloatPanelView.tsx +135 -647
  196. package/src/components/NavigationLogTab.tsx +1 -1
  197. package/src/components/NetworkLogTab.tsx +128 -269
  198. package/src/components/ThirdPartyLibsTab.tsx +3 -3
  199. package/src/components/TrackLogTab.tsx +53 -188
  200. package/src/components/ZustandLogTab.tsx +79 -181
  201. package/src/components/shared/CollapsibleSection.tsx +1 -1
  202. package/src/components/shared/CopyButton.tsx +1 -1
  203. package/src/components/shared/LogListScreen.tsx +164 -0
  204. package/src/core/DebugToolkit.tsx +114 -138
  205. package/src/core/DebugToolkitProvider.tsx +32 -38
  206. package/src/features/ClipboardFeature.ts +6 -2
  207. package/src/features/ConsoleLogFeature.ts +66 -68
  208. package/src/features/EnvironmentFeature.ts +5 -13
  209. package/src/features/NavigationLogFeature.ts +12 -42
  210. package/src/features/NetworkFeature.ts +43 -405
  211. package/src/features/TrackFeature.ts +14 -49
  212. package/src/features/ZustandLogFeature.ts +16 -42
  213. package/src/hooks/useNavigationLogger.ts +1 -6
  214. package/src/index.ts +5 -9
  215. package/src/initialize.ts +28 -120
  216. package/src/interceptors/networkInterceptor.ts +646 -0
  217. package/src/types/index.ts +25 -36
  218. package/src/utils/colors.ts +38 -0
  219. package/src/utils/createChannelFeature.ts +55 -0
  220. package/src/utils/layout.ts +1 -0
  221. package/src/utils/urlRewriterRegistry.ts +10 -0
  222. package/lib/commonjs/utils/constants.js +0 -135
  223. package/lib/commonjs/utils/constants.js.map +0 -1
  224. package/lib/module/utils/constants.js +0 -130
  225. package/lib/module/utils/constants.js.map +0 -1
  226. package/lib/typescript/src/utils/constants.d.ts +0 -96
  227. package/lib/typescript/src/utils/constants.d.ts.map +0 -1
  228. package/src/utils/constants.ts +0 -91
@@ -8,25 +8,23 @@ export type BuiltInFeatureName =
8
8
  | 'zustand'
9
9
  | 'navigation'
10
10
  | 'track'
11
- | 'thirdPartyLibs'
12
11
  | 'environment'
13
12
  | 'clipboard';
14
13
 
14
+ /** Props passed to a feature's renderContent component */
15
15
  export interface DebugFeatureRenderProps<TData = unknown> {
16
16
  data: TData[];
17
17
  feature: DebugFeature<TData>;
18
18
  }
19
19
 
20
- export type DebugFeatureRenderer<TData = unknown> = ComponentType<
21
- DebugFeatureRenderProps<TData>
22
- >;
20
+ /**
21
+ * Type-erased feature for heterogeneous collections.
22
+ * Individual features should use `DebugFeature<TData>` with their specific data type.
23
+ * This alias is only for places that hold features of multiple types.
24
+ */
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ export type AnyDebugFeature = DebugFeature<any>;
23
27
 
24
- export type DebugFeatureFactory = () => DebugFeature<any>;
25
-
26
- export type DebugFeatureInput =
27
- | BuiltInFeatureName
28
- | DebugFeature<any>
29
- | DebugFeatureFactory;
30
28
 
31
29
  /** Base interface all debug features must implement */
32
30
  export interface DebugFeature<TData = unknown> {
@@ -37,7 +35,7 @@ export interface DebugFeature<TData = unknown> {
37
35
  clear?: () => void;
38
36
  cleanup: () => void;
39
37
  subscribe?: (listener: DebugFeatureListener) => () => void;
40
- renderContent?: DebugFeatureRenderer<TData>;
38
+ renderContent?: ComponentType<DebugFeatureRenderProps<TData>>;
41
39
  badge?: () => { label: string; color: string } | null;
42
40
  }
43
41
 
@@ -96,18 +94,6 @@ export interface TrackLogEntry {
96
94
  [key: string]: unknown;
97
95
  }
98
96
 
99
- export interface ThirdPartyLib {
100
- id: string;
101
- name: string;
102
- description: string;
103
- platform: 'ios' | 'android' | 'both';
104
- actions: Array<{
105
- id: string;
106
- label: string;
107
- onPress: () => void;
108
- }>;
109
- }
110
-
111
97
  export interface EnvironmentConfig {
112
98
  id: string;
113
99
  label: string;
@@ -120,19 +106,22 @@ export interface EnvironmentState {
120
106
  currentEnvironmentId: string | null;
121
107
  }
122
108
 
123
- export interface DebugToolkitConfig {
124
- features?: DebugFeatureInput[];
125
- enabled?: boolean;
126
- /** Maximum number of log entries per feature (default: 200) */
127
- maxLogsPerFeature?: number;
109
+ export interface NavigationContainerRef {
110
+ getCurrentRoute?: () => { name?: string } | undefined;
111
+ getRootState?: () => unknown;
112
+ addListener: (event: string, callback: () => void) => () => void;
128
113
  }
129
114
 
130
- export interface DebugToolkitAPI {
131
- readonly features: ReadonlyArray<DebugFeature<any>>;
132
- addFeature: (feature: DebugFeature<any>) => void;
133
- removeFeature: (name: string) => void;
134
- showPanel: () => void;
135
- hidePanel: () => void;
136
- clearAll: () => void;
137
- destroy: () => void;
115
+ export interface ThirdPartyLibAction {
116
+ id: string;
117
+ label: string;
118
+ onPress: () => void;
119
+ }
120
+
121
+ export interface ThirdPartyLib {
122
+ id: string;
123
+ name: string;
124
+ description: string;
125
+ platform: 'ios' | 'android' | 'both';
126
+ actions: ThirdPartyLibAction[];
138
127
  }
@@ -0,0 +1,38 @@
1
+ // Apple iOS System Color Palette
2
+ export const Colors = {
3
+ // System
4
+ primary: '#007AFF',
5
+ text: '#1C1C1E',
6
+ textSecondary: '#8E8E93',
7
+ textLight: '#C7C7CC',
8
+ border: '#E5E5EA',
9
+ background: '#F2F2F7',
10
+ surface: '#FFFFFF',
11
+
12
+ // Semantic
13
+ success: '#34C759',
14
+ error: '#FF3B30',
15
+ warning: '#FF9500',
16
+ info: '#5AC8FA',
17
+
18
+ // Accent
19
+ purple: '#AF52DE',
20
+
21
+ // HTTP Method Colors
22
+ get: '#007AFF',
23
+ post: '#34C759',
24
+ put: '#FF9500',
25
+ delete: '#FF3B30',
26
+ patch: '#5AC8FA',
27
+ } as const;
28
+
29
+ export function getMethodColor(method: string): string {
30
+ switch (method.toUpperCase()) {
31
+ case 'GET': return Colors.get;
32
+ case 'POST': return Colors.post;
33
+ case 'PUT': return Colors.put;
34
+ case 'DELETE': return Colors.delete;
35
+ case 'PATCH': return Colors.patch;
36
+ default: return Colors.textSecondary;
37
+ }
38
+ }
@@ -0,0 +1,55 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { DebugFeature, DebugFeatureListener, DebugFeatureRenderProps } from '../types';
3
+ import type { EventChannel } from './createEventChannel';
4
+ import { createObservableStore } from './createObservableStore';
5
+
6
+ const DEFAULT_MAX_LOGS = 200;
7
+
8
+ /**
9
+ * Generic factory for features that subscribe to an event channel.
10
+ * Eliminates boilerplate across channel-based features (Track, Navigation, Zustand).
11
+ *
12
+ * @param getChannel - Function returning the current channel (supports test resets)
13
+ * @param toEntry - Maps a payload + auto-generated id to a typed log entry
14
+ * @param options - Feature name, label, render component, and optional maxLogs
15
+ */
16
+ export function createChannelFeature<TPayload, TEntry>(
17
+ getChannel: () => EventChannel<TPayload>,
18
+ toEntry: (payload: TPayload, id: string) => TEntry,
19
+ options: {
20
+ name: string;
21
+ label: string;
22
+ renderContent?: ComponentType<DebugFeatureRenderProps<TEntry>>;
23
+ maxLogs?: number;
24
+ },
25
+ ): DebugFeature<TEntry> {
26
+ const maxLogs = options.maxLogs ?? DEFAULT_MAX_LOGS;
27
+ const logStore = createObservableStore<TEntry>();
28
+ let nextId = 0;
29
+ let initialized = false;
30
+ let unsubscribe: (() => void) | null = null;
31
+
32
+ return {
33
+ name: options.name,
34
+ label: options.label,
35
+ renderContent: options.renderContent,
36
+ setup: () => {
37
+ if (initialized) return;
38
+ unsubscribe = getChannel().subscribe((payload) => {
39
+ logStore.push(toEntry(payload, String(nextId++)), maxLogs);
40
+ });
41
+ initialized = true;
42
+ },
43
+ getData: () => logStore.getData(),
44
+ clear: () => {
45
+ logStore.clear();
46
+ },
47
+ cleanup: () => {
48
+ unsubscribe?.();
49
+ unsubscribe = null;
50
+ logStore.clear();
51
+ initialized = false;
52
+ },
53
+ subscribe: (listener: DebugFeatureListener) => logStore.subscribe(listener),
54
+ };
55
+ }
@@ -0,0 +1 @@
1
+ export const ICON_SIZE = 52;
@@ -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,135 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getMethodColor = exports.Typography = exports.Spacing = exports.Radius = exports.Layout = exports.Colors = void 0;
7
- var _reactNative = require("react-native");
8
- const {
9
- width: screenWidth,
10
- height: screenHeight
11
- } = _reactNative.Dimensions.get('window');
12
- const Layout = exports.Layout = {
13
- screenWidth,
14
- screenHeight,
15
- iconSize: 52
16
- };
17
-
18
- // Apple iOS System Color Palette
19
- const Colors = exports.Colors = {
20
- // System
21
- primary: '#007AFF',
22
- text: '#1C1C1E',
23
- textSecondary: '#8E8E93',
24
- textLight: '#C7C7CC',
25
- border: '#E5E5EA',
26
- opaqueSeparator: '#C6C6C8',
27
- background: '#F2F2F7',
28
- surface: '#FFFFFF',
29
- // Semantic
30
- success: '#34C759',
31
- error: '#FF3B30',
32
- warning: '#FF9500',
33
- info: '#5AC8FA',
34
- // iOS Accent Colors
35
- blue: '#007AFF',
36
- green: '#34C759',
37
- indigo: '#5856D6',
38
- orange: '#FF9500',
39
- pink: '#FF2D55',
40
- purple: '#AF52DE',
41
- red: '#FF3B30',
42
- teal: '#5AC8FA',
43
- yellow: '#FFCC00',
44
- // HTTP Method Colors
45
- get: '#007AFF',
46
- post: '#34C759',
47
- put: '#FF9500',
48
- delete: '#FF3B30',
49
- patch: '#5AC8FA'
50
- };
51
- const getMethodColor = method => {
52
- switch (method.toUpperCase()) {
53
- case 'GET':
54
- return Colors.get;
55
- case 'POST':
56
- return Colors.post;
57
- case 'PUT':
58
- return Colors.put;
59
- case 'DELETE':
60
- return Colors.delete;
61
- case 'PATCH':
62
- return Colors.patch;
63
- default:
64
- return Colors.textSecondary;
65
- }
66
- };
67
-
68
- // iOS 8pt Grid Spacing
69
- exports.getMethodColor = getMethodColor;
70
- const Spacing = exports.Spacing = {
71
- xs: 4,
72
- sm: 8,
73
- md: 12,
74
- lg: 16,
75
- xl: 20,
76
- xxl: 24
77
- };
78
-
79
- // iOS Border Radius
80
- const Radius = exports.Radius = {
81
- sm: 8,
82
- md: 12,
83
- lg: 16,
84
- xl: 20,
85
- full: 999
86
- };
87
-
88
- // iOS Typography Scale
89
- const Typography = exports.Typography = {
90
- largeTitle: {
91
- fontSize: 34,
92
- fontWeight: '700'
93
- },
94
- title1: {
95
- fontSize: 28,
96
- fontWeight: '700'
97
- },
98
- title2: {
99
- fontSize: 22,
100
- fontWeight: '700'
101
- },
102
- title3: {
103
- fontSize: 20,
104
- fontWeight: '600'
105
- },
106
- headline: {
107
- fontSize: 17,
108
- fontWeight: '600'
109
- },
110
- body: {
111
- fontSize: 17,
112
- fontWeight: '400'
113
- },
114
- callout: {
115
- fontSize: 16,
116
- fontWeight: '400'
117
- },
118
- subheadline: {
119
- fontSize: 15,
120
- fontWeight: '400'
121
- },
122
- footnote: {
123
- fontSize: 13,
124
- fontWeight: '400'
125
- },
126
- caption1: {
127
- fontSize: 12,
128
- fontWeight: '400'
129
- },
130
- caption2: {
131
- fontSize: 11,
132
- fontWeight: '400'
133
- }
134
- };
135
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","width","screenWidth","height","screenHeight","Dimensions","get","Layout","exports","iconSize","Colors","primary","text","textSecondary","textLight","border","opaqueSeparator","background","surface","success","error","warning","info","blue","green","indigo","orange","pink","purple","red","teal","yellow","post","put","delete","patch","getMethodColor","method","toUpperCase","Spacing","xs","sm","md","lg","xl","xxl","Radius","full","Typography","largeTitle","fontSize","fontWeight","title1","title2","title3","headline","body","callout","subheadline","footnote","caption1","caption2"],"sourceRoot":"../../../src","sources":["utils/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAM;EAAEC,KAAK,EAAEC,WAAW;EAAEC,MAAM,EAAEC;AAAa,CAAC,GAAGC,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC;AAEtE,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBL,WAAW;EACXE,YAAY;EACZK,QAAQ,EAAE;AACZ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C,UAAU,EAAE;EAAe;AACvD,CAAU","ignoreList":[]}
@@ -1,130 +0,0 @@
1
- "use strict";
2
-
3
- import { Dimensions } from 'react-native';
4
- const {
5
- width: screenWidth,
6
- height: screenHeight
7
- } = Dimensions.get('window');
8
- export const Layout = {
9
- screenWidth,
10
- screenHeight,
11
- iconSize: 52
12
- };
13
-
14
- // Apple iOS System Color Palette
15
- export const Colors = {
16
- // System
17
- primary: '#007AFF',
18
- text: '#1C1C1E',
19
- textSecondary: '#8E8E93',
20
- textLight: '#C7C7CC',
21
- border: '#E5E5EA',
22
- opaqueSeparator: '#C6C6C8',
23
- background: '#F2F2F7',
24
- surface: '#FFFFFF',
25
- // Semantic
26
- success: '#34C759',
27
- error: '#FF3B30',
28
- warning: '#FF9500',
29
- info: '#5AC8FA',
30
- // iOS Accent Colors
31
- blue: '#007AFF',
32
- green: '#34C759',
33
- indigo: '#5856D6',
34
- orange: '#FF9500',
35
- pink: '#FF2D55',
36
- purple: '#AF52DE',
37
- red: '#FF3B30',
38
- teal: '#5AC8FA',
39
- yellow: '#FFCC00',
40
- // HTTP Method Colors
41
- get: '#007AFF',
42
- post: '#34C759',
43
- put: '#FF9500',
44
- delete: '#FF3B30',
45
- patch: '#5AC8FA'
46
- };
47
- export const getMethodColor = method => {
48
- switch (method.toUpperCase()) {
49
- case 'GET':
50
- return Colors.get;
51
- case 'POST':
52
- return Colors.post;
53
- case 'PUT':
54
- return Colors.put;
55
- case 'DELETE':
56
- return Colors.delete;
57
- case 'PATCH':
58
- return Colors.patch;
59
- default:
60
- return Colors.textSecondary;
61
- }
62
- };
63
-
64
- // iOS 8pt Grid Spacing
65
- export const Spacing = {
66
- xs: 4,
67
- sm: 8,
68
- md: 12,
69
- lg: 16,
70
- xl: 20,
71
- xxl: 24
72
- };
73
-
74
- // iOS Border Radius
75
- export const Radius = {
76
- sm: 8,
77
- md: 12,
78
- lg: 16,
79
- xl: 20,
80
- full: 999
81
- };
82
-
83
- // iOS Typography Scale
84
- export const Typography = {
85
- largeTitle: {
86
- fontSize: 34,
87
- fontWeight: '700'
88
- },
89
- title1: {
90
- fontSize: 28,
91
- fontWeight: '700'
92
- },
93
- title2: {
94
- fontSize: 22,
95
- fontWeight: '700'
96
- },
97
- title3: {
98
- fontSize: 20,
99
- fontWeight: '600'
100
- },
101
- headline: {
102
- fontSize: 17,
103
- fontWeight: '600'
104
- },
105
- body: {
106
- fontSize: 17,
107
- fontWeight: '400'
108
- },
109
- callout: {
110
- fontSize: 16,
111
- fontWeight: '400'
112
- },
113
- subheadline: {
114
- fontSize: 15,
115
- fontWeight: '400'
116
- },
117
- footnote: {
118
- fontSize: 13,
119
- fontWeight: '400'
120
- },
121
- caption1: {
122
- fontSize: 12,
123
- fontWeight: '400'
124
- },
125
- caption2: {
126
- fontSize: 11,
127
- fontWeight: '400'
128
- }
129
- };
130
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Dimensions","width","screenWidth","height","screenHeight","get","Layout","iconSize","Colors","primary","text","textSecondary","textLight","border","opaqueSeparator","background","surface","success","error","warning","info","blue","green","indigo","orange","pink","purple","red","teal","yellow","post","put","delete","patch","getMethodColor","method","toUpperCase","Spacing","xs","sm","md","lg","xl","xxl","Radius","full","Typography","largeTitle","fontSize","fontWeight","title1","title2","title3","headline","body","callout","subheadline","footnote","caption1","caption2"],"sourceRoot":"../../../src","sources":["utils/constants.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,MAAM;EAAEC,KAAK,EAAEC,WAAW;EAAEC,MAAM,EAAEC;AAAa,CAAC,GAAGJ,UAAU,CAACK,GAAG,CAAC,QAAQ,CAAC;AAE7E,OAAO,MAAMC,MAAM,GAAG;EACpBJ,WAAW;EACXE,YAAY;EACZG,QAAQ,EAAE;AACZ,CAAU;;AAEV;AACA,OAAO,MAAMC,MAAM,GAAG;EACpB;EACAC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,aAAa,EAAE,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;EACpBL,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNG,IAAI,EAAE;AACR,CAAU;;AAEV;AACA,OAAO,MAAMC,UAAU,GAAG;EACxBC,UAAU,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACxDC,MAAM,EAAE;IAAEF,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACpDE,MAAM,EAAE;IAAEH,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACpDG,MAAM,EAAE;IAAEJ,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACpDI,QAAQ,EAAE;IAAEL,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACtDK,IAAI,EAAE;IAAEN,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EAClDM,OAAO,EAAE;IAAEP,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACrDO,WAAW,EAAE;IAAER,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACzDQ,QAAQ,EAAE;IAAET,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACtDS,QAAQ,EAAE;IAAEV,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe,CAAC;EACtDU,QAAQ,EAAE;IAAEX,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAe;AACvD,CAAU","ignoreList":[]}
@@ -1,96 +0,0 @@
1
- export declare const Layout: {
2
- readonly screenWidth: number;
3
- readonly screenHeight: number;
4
- readonly iconSize: 52;
5
- };
6
- export declare const Colors: {
7
- readonly primary: "#007AFF";
8
- readonly text: "#1C1C1E";
9
- readonly textSecondary: "#8E8E93";
10
- readonly textLight: "#C7C7CC";
11
- readonly border: "#E5E5EA";
12
- readonly opaqueSeparator: "#C6C6C8";
13
- readonly background: "#F2F2F7";
14
- readonly surface: "#FFFFFF";
15
- readonly success: "#34C759";
16
- readonly error: "#FF3B30";
17
- readonly warning: "#FF9500";
18
- readonly info: "#5AC8FA";
19
- readonly blue: "#007AFF";
20
- readonly green: "#34C759";
21
- readonly indigo: "#5856D6";
22
- readonly orange: "#FF9500";
23
- readonly pink: "#FF2D55";
24
- readonly purple: "#AF52DE";
25
- readonly red: "#FF3B30";
26
- readonly teal: "#5AC8FA";
27
- readonly yellow: "#FFCC00";
28
- readonly get: "#007AFF";
29
- readonly post: "#34C759";
30
- readonly put: "#FF9500";
31
- readonly delete: "#FF3B30";
32
- readonly patch: "#5AC8FA";
33
- };
34
- export declare const getMethodColor: (method: string) => string;
35
- export declare const Spacing: {
36
- readonly xs: 4;
37
- readonly sm: 8;
38
- readonly md: 12;
39
- readonly lg: 16;
40
- readonly xl: 20;
41
- readonly xxl: 24;
42
- };
43
- export declare const Radius: {
44
- readonly sm: 8;
45
- readonly md: 12;
46
- readonly lg: 16;
47
- readonly xl: 20;
48
- readonly full: 999;
49
- };
50
- export declare const Typography: {
51
- readonly largeTitle: {
52
- readonly fontSize: 34;
53
- readonly fontWeight: "700";
54
- };
55
- readonly title1: {
56
- readonly fontSize: 28;
57
- readonly fontWeight: "700";
58
- };
59
- readonly title2: {
60
- readonly fontSize: 22;
61
- readonly fontWeight: "700";
62
- };
63
- readonly title3: {
64
- readonly fontSize: 20;
65
- readonly fontWeight: "600";
66
- };
67
- readonly headline: {
68
- readonly fontSize: 17;
69
- readonly fontWeight: "600";
70
- };
71
- readonly body: {
72
- readonly fontSize: 17;
73
- readonly fontWeight: "400";
74
- };
75
- readonly callout: {
76
- readonly fontSize: 16;
77
- readonly fontWeight: "400";
78
- };
79
- readonly subheadline: {
80
- readonly fontSize: 15;
81
- readonly fontWeight: "400";
82
- };
83
- readonly footnote: {
84
- readonly fontSize: 13;
85
- readonly fontWeight: "400";
86
- };
87
- readonly caption1: {
88
- readonly fontSize: 12;
89
- readonly fontWeight: "400";
90
- };
91
- readonly caption2: {
92
- readonly fontSize: 11;
93
- readonly fontWeight: "400";
94
- };
95
- };
96
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCT,CAAC;AAEX,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,MAS/C,CAAC;AAGF,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYb,CAAC"}
@@ -1,91 +0,0 @@
1
- import { Dimensions } from 'react-native';
2
-
3
- const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
4
-
5
- export const Layout = {
6
- screenWidth,
7
- screenHeight,
8
- iconSize: 52,
9
- } as const;
10
-
11
- // Apple iOS System Color Palette
12
- export const Colors = {
13
- // System
14
- primary: '#007AFF',
15
- text: '#1C1C1E',
16
- textSecondary: '#8E8E93',
17
- textLight: '#C7C7CC',
18
- border: '#E5E5EA',
19
- opaqueSeparator: '#C6C6C8',
20
- background: '#F2F2F7',
21
- surface: '#FFFFFF',
22
-
23
- // Semantic
24
- success: '#34C759',
25
- error: '#FF3B30',
26
- warning: '#FF9500',
27
- info: '#5AC8FA',
28
-
29
- // iOS Accent Colors
30
- blue: '#007AFF',
31
- green: '#34C759',
32
- indigo: '#5856D6',
33
- orange: '#FF9500',
34
- pink: '#FF2D55',
35
- purple: '#AF52DE',
36
- red: '#FF3B30',
37
- teal: '#5AC8FA',
38
- yellow: '#FFCC00',
39
-
40
- // HTTP Method Colors
41
- get: '#007AFF',
42
- post: '#34C759',
43
- put: '#FF9500',
44
- delete: '#FF3B30',
45
- patch: '#5AC8FA',
46
- } as const;
47
-
48
- export const getMethodColor = (method: string): string => {
49
- switch (method.toUpperCase()) {
50
- case 'GET': return Colors.get;
51
- case 'POST': return Colors.post;
52
- case 'PUT': return Colors.put;
53
- case 'DELETE': return Colors.delete;
54
- case 'PATCH': return Colors.patch;
55
- default: return Colors.textSecondary;
56
- }
57
- };
58
-
59
- // iOS 8pt Grid Spacing
60
- export const Spacing = {
61
- xs: 4,
62
- sm: 8,
63
- md: 12,
64
- lg: 16,
65
- xl: 20,
66
- xxl: 24,
67
- } as const;
68
-
69
- // iOS Border Radius
70
- export const Radius = {
71
- sm: 8,
72
- md: 12,
73
- lg: 16,
74
- xl: 20,
75
- full: 999,
76
- } as const;
77
-
78
- // iOS Typography Scale
79
- export const Typography = {
80
- largeTitle: { fontSize: 34, fontWeight: '700' as const },
81
- title1: { fontSize: 28, fontWeight: '700' as const },
82
- title2: { fontSize: 22, fontWeight: '700' as const },
83
- title3: { fontSize: 20, fontWeight: '600' as const },
84
- headline: { fontSize: 17, fontWeight: '600' as const },
85
- body: { fontSize: 17, fontWeight: '400' as const },
86
- callout: { fontSize: 16, fontWeight: '400' as const },
87
- subheadline: { fontSize: 15, fontWeight: '400' as const },
88
- footnote: { fontSize: 13, fontWeight: '400' as const },
89
- caption1: { fontSize: 12, fontWeight: '400' as const },
90
- caption2: { fontSize: 11, fontWeight: '400' as const },
91
- } as const;