react-native-inapp-inspector 2.2.2 → 2.2.4
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.
- package/dist/commonjs/components/AnalyticsDetail.js +5 -1
- package/dist/commonjs/components/AnalyticsEventCard.js +2 -1
- package/dist/commonjs/components/DiffViewer.js +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +22 -0
- package/dist/commonjs/components/Inspector/DeviceInfoTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +835 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +12 -14
- package/dist/commonjs/components/Inspector/LogDetail.js +6 -3
- package/dist/commonjs/components/Inspector/MainScreen.js +7 -3
- package/dist/commonjs/components/Inspector/NetworkTab.js +92 -15
- package/dist/commonjs/components/Inspector/PerformanceTab.js +38 -12
- package/dist/commonjs/components/Inspector/SettingsPanel.js +440 -229
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +892 -0
- package/dist/commonjs/components/Inspector/TabBar.js +14 -0
- package/dist/commonjs/components/Inspector/TelemetryConsentModal.js +11 -2
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +4 -1
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +30 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +44 -22
- package/dist/commonjs/customHooks/storageInspector.d.ts +67 -0
- package/dist/commonjs/customHooks/storageInspector.js +486 -0
- package/dist/commonjs/i18n/locales/en.json +8 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +16 -1
- package/dist/commonjs/storage.d.ts +5 -0
- package/dist/commonjs/storage.js +18 -0
- package/dist/commonjs/types/enums.d.ts +5 -0
- package/dist/commonjs/types/enums.js +5 -0
- package/dist/esm/components/AnalyticsDetail.js +6 -2
- package/dist/esm/components/AnalyticsEventCard.js +2 -1
- package/dist/esm/components/DiffViewer.js +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +22 -0
- package/dist/esm/components/Inspector/DeviceInfoTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceInfoTab.js +796 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +13 -15
- package/dist/esm/components/Inspector/LogDetail.js +7 -4
- package/dist/esm/components/Inspector/MainScreen.js +7 -3
- package/dist/esm/components/Inspector/NetworkTab.js +93 -16
- package/dist/esm/components/Inspector/PerformanceTab.js +39 -13
- package/dist/esm/components/Inspector/SettingsPanel.js +441 -230
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +853 -0
- package/dist/esm/components/Inspector/TabBar.js +15 -1
- package/dist/esm/components/Inspector/TelemetryConsentModal.js +11 -2
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +4 -1
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +23 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +44 -22
- package/dist/esm/customHooks/storageInspector.d.ts +67 -0
- package/dist/esm/customHooks/storageInspector.js +469 -0
- package/dist/esm/i18n/locales/en.json +8 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/storage.d.ts +5 -0
- package/dist/esm/storage.js +5 -0
- package/dist/esm/types/enums.d.ts +5 -0
- package/dist/esm/types/enums.js +5 -0
- package/package.json +9 -1
- package/src/analytics.ts +35 -0
- package/src/bundle.ts +25 -0
- package/src/components/AnalyticsDetail.tsx +870 -0
- package/src/components/AnalyticsEventCard.tsx +442 -0
- package/src/components/AnalyticsGraph.tsx +583 -0
- package/src/components/AnimatedEntrance.tsx +64 -0
- package/src/components/AppHeaderLogo.tsx +109 -0
- package/src/components/BrandCircleIcon.tsx +144 -0
- package/src/components/BrandSquareIcon.tsx +144 -0
- package/src/components/CodeSnippet.tsx +725 -0
- package/src/components/ConsoleLogCard.tsx +628 -0
- package/src/components/CopyButton.tsx +87 -0
- package/src/components/DiffViewer.tsx +82 -0
- package/src/components/DomainHeader.tsx +237 -0
- package/src/components/EmptyState.tsx +73 -0
- package/src/components/EndOfListFooter.tsx +100 -0
- package/src/components/ErrorBoundary.tsx +688 -0
- package/src/components/HeadersSection.tsx +192 -0
- package/src/components/HighlightText.tsx +100 -0
- package/src/components/Inspector/AnalyticsFilterModal.tsx +1250 -0
- package/src/components/Inspector/AnalyticsTab.tsx +1336 -0
- package/src/components/Inspector/BundleTab.tsx +4760 -0
- package/src/components/Inspector/ConsoleTab.tsx +702 -0
- package/src/components/Inspector/CrashDetail.tsx +941 -0
- package/src/components/Inspector/CrashFilterModal.tsx +721 -0
- package/src/components/Inspector/CrashTab.tsx +871 -0
- package/src/components/Inspector/DeviceInfoTab.tsx +1204 -0
- package/src/components/Inspector/FabLauncher.tsx +80 -0
- package/src/components/Inspector/InspectorContext.tsx +28 -0
- package/src/components/Inspector/InspectorHeader.tsx +972 -0
- package/src/components/Inspector/LogDetail.tsx +1431 -0
- package/src/components/Inspector/MainScreen.tsx +262 -0
- package/src/components/Inspector/NavigationTracker.tsx +13 -0
- package/src/components/Inspector/NetworkDetail.tsx +794 -0
- package/src/components/Inspector/NetworkTab.tsx +1183 -0
- package/src/components/Inspector/NpmUpdateToast.tsx +392 -0
- package/src/components/Inspector/PerformanceTab.tsx +1928 -0
- package/src/components/Inspector/ReduxDetail.tsx +1651 -0
- package/src/components/Inspector/ReduxTab.tsx +954 -0
- package/src/components/Inspector/SettingsPanel.tsx +3447 -0
- package/src/components/Inspector/StorageTab.tsx +1048 -0
- package/src/components/Inspector/TabBar.tsx +207 -0
- package/src/components/Inspector/TelemetryConsentModal.tsx +416 -0
- package/src/components/Inspector/UpdateAvailableModal.tsx +557 -0
- package/src/components/JsonViewer.tsx +486 -0
- package/src/components/LogCard.tsx +491 -0
- package/src/components/LogSyntaxHighlighter.tsx +178 -0
- package/src/components/MetaAccordion.tsx +340 -0
- package/src/components/MiniBarChart.tsx +42 -0
- package/src/components/MiniLineChart.tsx +33 -0
- package/src/components/NetworkIcons.tsx +2221 -0
- package/src/components/SectionHeader.tsx +113 -0
- package/src/components/SegmentedTabs.tsx +83 -0
- package/src/components/Slider.tsx +300 -0
- package/src/components/SourcePageCard.tsx +148 -0
- package/src/components/Toast.tsx +131 -0
- package/src/components/TouchableScale.tsx +91 -0
- package/src/components/TreeNode.tsx +186 -0
- package/src/console.ts +24 -0
- package/src/constants/index.ts +38 -0
- package/src/constants/version.ts +3 -0
- package/src/crash.ts +32 -0
- package/src/customHooks/analyticsLogger.ts +336 -0
- package/src/customHooks/bundleAnalyzer.ts +1256 -0
- package/src/customHooks/consoleLogger.ts +497 -0
- package/src/customHooks/crashHandler.ts +944 -0
- package/src/customHooks/logFilters.ts +32 -0
- package/src/customHooks/networkLogger.ts +419 -0
- package/src/customHooks/performanceTracker.ts +1014 -0
- package/src/customHooks/reduxLogger.ts +406 -0
- package/src/customHooks/storageInspector.ts +509 -0
- package/src/customHooks/useAccordion.tsx +60 -0
- package/src/decorators/index.ts +184 -0
- package/src/helpers/gaAnalyticsRegistry.ts +204 -0
- package/src/helpers/index.ts +860 -0
- package/src/helpers/memoryManager.ts +138 -0
- package/src/helpers/searchQueryParser.ts +283 -0
- package/src/helpers/settingsStore.ts +171 -0
- package/src/helpers/telemetry.ts +505 -0
- package/src/helpers/toast.ts +17 -0
- package/src/i18n/index.ts +69 -0
- package/src/i18n/locales/en.json +1058 -0
- package/src/index.tsx +2356 -0
- package/src/native/NativeInspector.ts +397 -0
- package/src/native/NativeNetworkInspector.ts +24 -0
- package/src/network.ts +22 -0
- package/src/performance.ts +38 -0
- package/src/redux.ts +23 -0
- package/src/storage.ts +18 -0
- package/src/styles/AppColors.ts +408 -0
- package/src/styles/AppFonts.ts +8 -0
- package/src/styles/common.ts +209 -0
- package/src/styles/index.ts +1570 -0
- package/src/types/enums.ts +199 -0
- package/src/types/index.ts +34 -0
- package/src/types/interfaces.ts +515 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
const LightColors = {
|
|
2
|
+
// ─── Core (Thai Airways Royal Palette) ───
|
|
3
|
+
primaryLight: '#FFFFFF',
|
|
4
|
+
purple: '#5C2D91', // Thai Royal Purple
|
|
5
|
+
purpleShade50: '#F8F4FC', // Orchid Silk Tint
|
|
6
|
+
offerPurple: '#9B2677', // Thai Orchid Magenta
|
|
7
|
+
grayBorderSecondary: '#E2DFEB',
|
|
8
|
+
grayBackground: '#F8F7FB', // Pearl White Surface
|
|
9
|
+
grayText: '#625D73',
|
|
10
|
+
grayTextWeak: '#8F8A9E',
|
|
11
|
+
greenColor: '#10B981',
|
|
12
|
+
graySurface: '#E2DFEB',
|
|
13
|
+
skyBlue: '#2563EB',
|
|
14
|
+
primaryBlack: '#211B30', // Royal Midnight Dark
|
|
15
|
+
grayTextStrong: '#211B30',
|
|
16
|
+
dividerColor: '#EBE7F2',
|
|
17
|
+
warningIconGold: '#C5A059', // Thai Orchid Gold
|
|
18
|
+
shadowColorString: '#211B30',
|
|
19
|
+
errorColor: '#E11D48',
|
|
20
|
+
lightOrange: '#E5C158', // Thai Warm Gold Light
|
|
21
|
+
darkOrange: '#B89758', // Thai Silk Gold
|
|
22
|
+
successGreen: '#10B981',
|
|
23
|
+
purpleShade700: '#481E78', // Thai Deep Violet
|
|
24
|
+
greenStatus: '#D1FAE5',
|
|
25
|
+
greenBaggageText: '#059669',
|
|
26
|
+
paleYellow: '#F7E9C4', // Thai Pale Gold
|
|
27
|
+
|
|
28
|
+
// ─── Brand / UI ───
|
|
29
|
+
white: '#FFFFFF',
|
|
30
|
+
black: '#000000',
|
|
31
|
+
brandPurple: '#4B1B7D', // Iconic Thai Airways Purple
|
|
32
|
+
liveGreen: '#10B981',
|
|
33
|
+
firebaseOrange: '#D97706',
|
|
34
|
+
greenA400: '#00E676',
|
|
35
|
+
|
|
36
|
+
// ─── Code / Slate ───
|
|
37
|
+
slate900: '#171226',
|
|
38
|
+
slate700: '#332C4A',
|
|
39
|
+
slate600: '#4D446B',
|
|
40
|
+
slate500: '#6E648D',
|
|
41
|
+
slate400: '#948BAF',
|
|
42
|
+
slate200: '#E4DFEE',
|
|
43
|
+
slate100: '#F3F0F8',
|
|
44
|
+
slate50: '#F9F7FC',
|
|
45
|
+
gray700: '#373147',
|
|
46
|
+
gray300: '#D5D0E0',
|
|
47
|
+
highlightYellow: '#FDE047',
|
|
48
|
+
yellowHighlight: '#FFE44D',
|
|
49
|
+
|
|
50
|
+
// ─── Status / Syntax ───
|
|
51
|
+
teal600: '#0D9488',
|
|
52
|
+
cyan600: '#0891B2',
|
|
53
|
+
sky600: '#0284C7',
|
|
54
|
+
blue500: '#3B82F6',
|
|
55
|
+
blue600: '#2563EB',
|
|
56
|
+
blue700: '#1D4ED8',
|
|
57
|
+
blue800: '#1E40AF',
|
|
58
|
+
indigo600: '#4F46E5',
|
|
59
|
+
violet600: '#7C3AED',
|
|
60
|
+
violet500: '#8B5CF6',
|
|
61
|
+
purpleText: '#5C2D91',
|
|
62
|
+
pink600: '#9B2677',
|
|
63
|
+
rose600: '#E11D48',
|
|
64
|
+
orange600: '#EA580C',
|
|
65
|
+
amber500: '#C5A059',
|
|
66
|
+
amber600: '#B89758',
|
|
67
|
+
amber700: '#A17D3B',
|
|
68
|
+
amber800: '#785A1D',
|
|
69
|
+
green500: '#22C55E',
|
|
70
|
+
green600: '#16A34A',
|
|
71
|
+
green700: '#15803D',
|
|
72
|
+
green800: '#166534',
|
|
73
|
+
emerald500: '#10B981',
|
|
74
|
+
emerald600: '#059669',
|
|
75
|
+
grey600: '#616161',
|
|
76
|
+
redErrorText: '#991B1B',
|
|
77
|
+
materialGreen: '#2E7D32',
|
|
78
|
+
googleBlue: '#4285F4',
|
|
79
|
+
googleGreen: '#34A853',
|
|
80
|
+
googleOrange: '#F57C00',
|
|
81
|
+
googleRed: '#E53935',
|
|
82
|
+
googlePurple: '#5C2D91',
|
|
83
|
+
googleTeal: '#00897B',
|
|
84
|
+
|
|
85
|
+
// ─── NPM / Package / Tailwind Spectrum Helpers ───
|
|
86
|
+
npmRed: '#CB3837',
|
|
87
|
+
npmRedTint: '#CB383714',
|
|
88
|
+
npmRedBorder: '#CB383733',
|
|
89
|
+
npmDark: '#20232A',
|
|
90
|
+
reactCyan: '#61DAFB',
|
|
91
|
+
pink500: '#EC4899',
|
|
92
|
+
pink400: '#F472B6',
|
|
93
|
+
rose500: '#F43F5E',
|
|
94
|
+
sky500: '#0EA5E9',
|
|
95
|
+
sky400: '#38BDF8',
|
|
96
|
+
indigo500: '#6366F1',
|
|
97
|
+
purple500: '#8B5CF6',
|
|
98
|
+
purple400: '#A78BFA',
|
|
99
|
+
fuchsia500: '#D946EF',
|
|
100
|
+
emerald400: '#34D399',
|
|
101
|
+
amber400: '#FBBF24',
|
|
102
|
+
orange500: '#F97316',
|
|
103
|
+
red500: '#EF4444',
|
|
104
|
+
teal400: '#2DD4BF',
|
|
105
|
+
teal500: '#14B8A6',
|
|
106
|
+
lime500: '#84CC16',
|
|
107
|
+
yellow400: '#FACC15',
|
|
108
|
+
yellow500: '#EAB308',
|
|
109
|
+
slate800: '#1E293B',
|
|
110
|
+
slate850: '#0F172A',
|
|
111
|
+
|
|
112
|
+
// ─── Bundle / Extended Spectrum ───
|
|
113
|
+
reanimatedNavy: '#001A72',
|
|
114
|
+
expoViolet: '#5A29E4',
|
|
115
|
+
hermesPurple: '#5B44E0',
|
|
116
|
+
cyan500: '#06B6D4',
|
|
117
|
+
indigo400: '#818CF8',
|
|
118
|
+
indigo600Alt: '#4F46E5',
|
|
119
|
+
purple800: '#6B21A8',
|
|
120
|
+
purple900: '#581C87',
|
|
121
|
+
purple50: '#FAF5FF',
|
|
122
|
+
purple100: '#F3E8FF',
|
|
123
|
+
purple200: '#E9D5FF',
|
|
124
|
+
rose700: '#BE123C',
|
|
125
|
+
red600: '#DC2626',
|
|
126
|
+
red50: '#FFFBFB',
|
|
127
|
+
red100: '#FEE2E2',
|
|
128
|
+
amber100: '#FEF3C7',
|
|
129
|
+
amber200: '#FDE68A',
|
|
130
|
+
amber800Warm: '#B45309',
|
|
131
|
+
yellow200: '#FEF08A',
|
|
132
|
+
yellow800: '#854D0E',
|
|
133
|
+
green100: '#DCFCE7',
|
|
134
|
+
emerald100: '#D1FAE5',
|
|
135
|
+
emerald700: '#047857',
|
|
136
|
+
pink100: '#FCE7F3',
|
|
137
|
+
sky100: '#E0F2FE',
|
|
138
|
+
teal100: '#CCFBF1',
|
|
139
|
+
teal700: '#0F766E',
|
|
140
|
+
purple700: '#6D28D9',
|
|
141
|
+
indigo50: '#EEF2FF',
|
|
142
|
+
gray100: '#F3F4F6',
|
|
143
|
+
gray200: '#E5E7EB',
|
|
144
|
+
gray500: '#6B7280',
|
|
145
|
+
gray600: '#4B5563',
|
|
146
|
+
|
|
147
|
+
// ─── Tint Backgrounds / Borders (Theme-Aware) ───
|
|
148
|
+
errorCardBg: '#FFF1F3',
|
|
149
|
+
warnCardBg: '#FDFBF4',
|
|
150
|
+
blueTintBg: '#EFF6FF',
|
|
151
|
+
purpleTintBg: '#F6F0FA',
|
|
152
|
+
purpleTint2: '#EFE7F7',
|
|
153
|
+
roseBg: '#FDF2F8',
|
|
154
|
+
roseBorder: '#FBCFE8',
|
|
155
|
+
errorBorder: '#FECDD3',
|
|
156
|
+
amberBg: '#FDF8EE',
|
|
157
|
+
amberBorder: '#E8D6AC',
|
|
158
|
+
emeraldBg: '#ECFDF5',
|
|
159
|
+
emeraldBorder: '#A7F3D0',
|
|
160
|
+
blueBg: '#EFF6FF',
|
|
161
|
+
blueBorder: '#BFDBFE',
|
|
162
|
+
greenBg: '#F0FDF4',
|
|
163
|
+
greenBorder: '#BBF7D0',
|
|
164
|
+
purpleBg: '#F6F0FA',
|
|
165
|
+
purpleBorder: '#E4D5F2',
|
|
166
|
+
greyBg: '#F5F4F8',
|
|
167
|
+
greyBorder: '#E3DFEC',
|
|
168
|
+
paperBg: '#FBF9FC',
|
|
169
|
+
contentBg: '#F8F7FB',
|
|
170
|
+
|
|
171
|
+
// ─── Toast / Glass / Chip Tokens ───
|
|
172
|
+
toastBg: '#0F172AEE',
|
|
173
|
+
toastBorder: '#33415588',
|
|
174
|
+
mintGreenBg: '#ECFDF5',
|
|
175
|
+
mintGreenBorder: '#A7F3D0',
|
|
176
|
+
mintGreenText: '#059669',
|
|
177
|
+
amberWarmBg: '#FFFBEB',
|
|
178
|
+
amberWarmBorder: '#FDE68A',
|
|
179
|
+
amberWarmText: '#92400E',
|
|
180
|
+
violetSoftBg: '#EDE9FE',
|
|
181
|
+
violetSoftBorder: '#DDD6FE',
|
|
182
|
+
violetSoftText: '#7C3AED',
|
|
183
|
+
skySoftBg: '#E0F2FE',
|
|
184
|
+
skySoftBorder: '#BAE6FD',
|
|
185
|
+
skySoftText: '#0284C7',
|
|
186
|
+
|
|
187
|
+
// ─── Domain Colors (Thai Airways Themed) ───
|
|
188
|
+
domainColors: [
|
|
189
|
+
'#5C2D91',
|
|
190
|
+
'#9B2677',
|
|
191
|
+
'#C5A059',
|
|
192
|
+
'#4B1B7D',
|
|
193
|
+
'#0D9488',
|
|
194
|
+
'#2563EB',
|
|
195
|
+
'#B89758',
|
|
196
|
+
'#059669',
|
|
197
|
+
'#3B1359',
|
|
198
|
+
'#D1208A',
|
|
199
|
+
],
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const DarkColors = {
|
|
203
|
+
primaryLight: '#1C1628', // Thai Dark Card
|
|
204
|
+
purple: '#B68FE8', // Luminous Thai Orchid
|
|
205
|
+
purpleShade50: '#2A1C3E',
|
|
206
|
+
offerPurple: '#F472B6',
|
|
207
|
+
grayBorderSecondary: '#362C4E',
|
|
208
|
+
grayBackground: '#130F1F', // Thai Airways Midnight Sky
|
|
209
|
+
grayText: '#A197B8',
|
|
210
|
+
grayTextWeak: '#756C8C',
|
|
211
|
+
greenColor: '#34D399',
|
|
212
|
+
graySurface: '#362C4E',
|
|
213
|
+
skyBlue: '#60A5FA',
|
|
214
|
+
primaryBlack: '#F7F5FC',
|
|
215
|
+
grayTextStrong: '#F7F5FC',
|
|
216
|
+
dividerColor: '#2B2240',
|
|
217
|
+
warningIconGold: '#E5C158', // Thai Luminous Gold
|
|
218
|
+
shadowColorString: '#000000',
|
|
219
|
+
errorColor: '#F87171',
|
|
220
|
+
lightOrange: '#FDE68A',
|
|
221
|
+
darkOrange: '#D4AF37',
|
|
222
|
+
successGreen: '#34D399',
|
|
223
|
+
purpleShade700: '#8E4DBE',
|
|
224
|
+
greenStatus: '#064E3B',
|
|
225
|
+
greenBaggageText: '#34D399',
|
|
226
|
+
paleYellow: '#78350F',
|
|
227
|
+
|
|
228
|
+
white: '#FFFFFF',
|
|
229
|
+
black: '#000000',
|
|
230
|
+
brandPurple: '#7B3DB8',
|
|
231
|
+
liveGreen: '#34D399',
|
|
232
|
+
firebaseOrange: '#F59E0B',
|
|
233
|
+
greenA400: '#00E676',
|
|
234
|
+
|
|
235
|
+
slate900: '#0B0813',
|
|
236
|
+
slate700: '#261F38',
|
|
237
|
+
slate600: '#3D3357',
|
|
238
|
+
slate500: '#5C4F7F',
|
|
239
|
+
slate400: '#8E82B0',
|
|
240
|
+
slate200: '#C7BEDE',
|
|
241
|
+
slate100: '#E4DFEE',
|
|
242
|
+
slate50: '#F3F0F8',
|
|
243
|
+
gray700: '#312847',
|
|
244
|
+
gray300: '#C7BEDE',
|
|
245
|
+
highlightYellow: '#FDE047',
|
|
246
|
+
yellowHighlight: '#FFE44D',
|
|
247
|
+
|
|
248
|
+
teal600: '#0D9488',
|
|
249
|
+
cyan600: '#0891B2',
|
|
250
|
+
sky600: '#0284C7',
|
|
251
|
+
blue500: '#3B82F6',
|
|
252
|
+
blue600: '#2563EB',
|
|
253
|
+
blue700: '#1D4ED8',
|
|
254
|
+
blue800: '#1E40AF',
|
|
255
|
+
indigo600: '#6366F1',
|
|
256
|
+
violet600: '#8B5CF6',
|
|
257
|
+
violet500: '#A78BFA',
|
|
258
|
+
purpleText: '#C084FC',
|
|
259
|
+
pink600: '#F472B6',
|
|
260
|
+
rose600: '#FB7185',
|
|
261
|
+
orange600: '#FB923C',
|
|
262
|
+
amber500: '#E5C158',
|
|
263
|
+
amber600: '#D4AF37',
|
|
264
|
+
amber700: '#C5A059',
|
|
265
|
+
amber800: '#B89758',
|
|
266
|
+
green500: '#22C55E',
|
|
267
|
+
|
|
268
|
+
// ─── Toast / Glass / Chip Tokens (Dark) ───
|
|
269
|
+
toastBg: '#1E293BEE',
|
|
270
|
+
toastBorder: '#47556988',
|
|
271
|
+
mintGreenBg: '#064E3B66',
|
|
272
|
+
mintGreenBorder: '#05966988',
|
|
273
|
+
mintGreenText: '#34D399',
|
|
274
|
+
amberWarmBg: '#451A0366',
|
|
275
|
+
amberWarmBorder: '#D9770688',
|
|
276
|
+
amberWarmText: '#FCD34D',
|
|
277
|
+
violetSoftBg: '#3B076466',
|
|
278
|
+
violetSoftBorder: '#7C3AED88',
|
|
279
|
+
violetSoftText: '#C084FC',
|
|
280
|
+
skySoftBg: '#082F4966',
|
|
281
|
+
skySoftBorder: '#0284C788',
|
|
282
|
+
skySoftText: '#38BDF8',
|
|
283
|
+
green600: '#16A34A',
|
|
284
|
+
green700: '#15803D',
|
|
285
|
+
green800: '#166534',
|
|
286
|
+
emerald500: '#10B981',
|
|
287
|
+
emerald600: '#059669',
|
|
288
|
+
grey600: '#756C8C',
|
|
289
|
+
redErrorText: '#FCA5A5',
|
|
290
|
+
materialGreen: '#2E7D32',
|
|
291
|
+
googleBlue: '#60A5FA',
|
|
292
|
+
googleGreen: '#34D399',
|
|
293
|
+
googleOrange: '#FBBF24',
|
|
294
|
+
googleRed: '#F87171',
|
|
295
|
+
googlePurple: '#C084FC',
|
|
296
|
+
googleTeal: '#2DD4BF',
|
|
297
|
+
|
|
298
|
+
// ─── NPM / Package / Tailwind Spectrum Helpers ───
|
|
299
|
+
npmRed: '#CB3837',
|
|
300
|
+
npmRedTint: '#CB383714',
|
|
301
|
+
npmRedBorder: '#CB383733',
|
|
302
|
+
npmDark: '#20232A',
|
|
303
|
+
reactCyan: '#61DAFB',
|
|
304
|
+
pink500: '#EC4899',
|
|
305
|
+
pink400: '#F472B6',
|
|
306
|
+
rose500: '#F43F5E',
|
|
307
|
+
sky500: '#0EA5E9',
|
|
308
|
+
sky400: '#38BDF8',
|
|
309
|
+
indigo500: '#6366F1',
|
|
310
|
+
purple500: '#8B5CF6',
|
|
311
|
+
purple400: '#A78BFA',
|
|
312
|
+
fuchsia500: '#D946EF',
|
|
313
|
+
emerald400: '#34D399',
|
|
314
|
+
amber400: '#FBBF24',
|
|
315
|
+
orange500: '#F97316',
|
|
316
|
+
red500: '#EF4444',
|
|
317
|
+
teal400: '#2DD4BF',
|
|
318
|
+
teal500: '#14B8A6',
|
|
319
|
+
lime500: '#84CC16',
|
|
320
|
+
yellow400: '#FACC15',
|
|
321
|
+
yellow500: '#EAB308',
|
|
322
|
+
slate800: '#1E293B',
|
|
323
|
+
slate850: '#0F172A',
|
|
324
|
+
|
|
325
|
+
// ─── Bundle / Extended Spectrum ───
|
|
326
|
+
reanimatedNavy: '#6B8CFF',
|
|
327
|
+
expoViolet: '#A78BFA',
|
|
328
|
+
hermesPurple: '#9B8AFF',
|
|
329
|
+
cyan500: '#22D3EE',
|
|
330
|
+
indigo400: '#A5B4FC',
|
|
331
|
+
indigo600Alt: '#818CF8',
|
|
332
|
+
purple800: '#C084FC',
|
|
333
|
+
purple900: '#A855F7',
|
|
334
|
+
purple50: '#2D1B40',
|
|
335
|
+
purple100: '#3B2252',
|
|
336
|
+
purple200: '#4C2D6B',
|
|
337
|
+
rose700: '#FB7185',
|
|
338
|
+
red600: '#F87171',
|
|
339
|
+
red50: '#34151B',
|
|
340
|
+
red100: '#451A1A',
|
|
341
|
+
amber100: '#422D0D',
|
|
342
|
+
amber200: '#5C3D0F',
|
|
343
|
+
amber800Warm: '#FBBF24',
|
|
344
|
+
yellow200: '#5C3D0F',
|
|
345
|
+
yellow800: '#FBBF24',
|
|
346
|
+
green100: '#122D1B',
|
|
347
|
+
emerald100: '#122D25',
|
|
348
|
+
emerald700: '#34D399',
|
|
349
|
+
pink100: '#341626',
|
|
350
|
+
sky100: '#0C2744',
|
|
351
|
+
teal100: '#134E4A',
|
|
352
|
+
teal700: '#2DD4BF',
|
|
353
|
+
purple700: '#8B5CF6',
|
|
354
|
+
indigo50: '#1E1B3A',
|
|
355
|
+
gray100: '#2A2438',
|
|
356
|
+
gray200: '#362C4E',
|
|
357
|
+
gray500: '#A197B8',
|
|
358
|
+
gray600: '#8F8A9E',
|
|
359
|
+
|
|
360
|
+
errorCardBg: '#34151B',
|
|
361
|
+
warnCardBg: '#342B16',
|
|
362
|
+
blueTintBg: '#15243B',
|
|
363
|
+
purpleTintBg: '#281B3B',
|
|
364
|
+
purpleTint2: '#32224A',
|
|
365
|
+
roseBg: '#341626',
|
|
366
|
+
roseBorder: '#782352',
|
|
367
|
+
errorBorder: '#782330',
|
|
368
|
+
amberBg: '#342914',
|
|
369
|
+
amberBorder: '#785E22',
|
|
370
|
+
emeraldBg: '#122D25',
|
|
371
|
+
emeraldBorder: '#236952',
|
|
372
|
+
blueBg: '#13243D',
|
|
373
|
+
blueBorder: '#234978',
|
|
374
|
+
greenBg: '#122D1B',
|
|
375
|
+
greenBorder: '#236939',
|
|
376
|
+
purpleBg: '#2D1B40',
|
|
377
|
+
purpleBorder: '#62358F',
|
|
378
|
+
greyBg: '#1C1628',
|
|
379
|
+
greyBorder: '#362C4E',
|
|
380
|
+
paperBg: '#181224',
|
|
381
|
+
contentBg: '#130F1F',
|
|
382
|
+
|
|
383
|
+
domainColors: [
|
|
384
|
+
'#B68FE8',
|
|
385
|
+
'#F472B6',
|
|
386
|
+
'#E5C158',
|
|
387
|
+
'#8E4DBE',
|
|
388
|
+
'#2DD4BF',
|
|
389
|
+
'#60A5FA',
|
|
390
|
+
'#D4AF37',
|
|
391
|
+
'#34D399',
|
|
392
|
+
'#A78BFA',
|
|
393
|
+
'#FB7185',
|
|
394
|
+
],
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export const getThemeColors = (isDark: boolean) => {
|
|
398
|
+
return isDark ? DarkColors : LightColors;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
export const AppColors = {} as typeof LightColors;
|
|
402
|
+
Object.assign(AppColors, LightColors);
|
|
403
|
+
|
|
404
|
+
export const updateAppColorsTheme = (isDark: boolean) => {
|
|
405
|
+
Object.assign(AppColors, getThemeColors(isDark));
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
export default AppColors;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {AppFonts} from './AppFonts';
|
|
3
|
+
import {AppColors} from './AppColors';
|
|
4
|
+
|
|
5
|
+
// Shared styles for the Inspector UI (repeated patterns + page-level layout).
|
|
6
|
+
// Built dynamically so dark-mode colors stay in sync with toggleGlobalTheme()
|
|
7
|
+
// (see rebuildCommonStyles wired into styles/index.ts).
|
|
8
|
+
|
|
9
|
+
const commonStyles: Record<string, any> = {};
|
|
10
|
+
|
|
11
|
+
const buildCommonStyles = (colors: any) => {
|
|
12
|
+
const newStyles = StyleSheet.create({
|
|
13
|
+
// ─── Layout ──────────────────────────────────────────────────────────────
|
|
14
|
+
pageContainer: {
|
|
15
|
+
flex: 1,
|
|
16
|
+
backgroundColor: colors.grayBackground,
|
|
17
|
+
},
|
|
18
|
+
listHeader: {
|
|
19
|
+
paddingHorizontal: 16,
|
|
20
|
+
paddingTop: 12,
|
|
21
|
+
paddingBottom: 8,
|
|
22
|
+
},
|
|
23
|
+
rowCenter: {
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
gap: 6,
|
|
27
|
+
},
|
|
28
|
+
rowCenterWrap: {
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
gap: 8,
|
|
32
|
+
flexWrap: 'wrap',
|
|
33
|
+
},
|
|
34
|
+
rowSpaceBetween: {
|
|
35
|
+
flexDirection: 'row',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'space-between',
|
|
38
|
+
gap: 8,
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
// ─── Cards / rows ────────────────────────────────────────────────────────
|
|
42
|
+
card: {
|
|
43
|
+
backgroundColor: colors.primaryLight,
|
|
44
|
+
borderRadius: 12,
|
|
45
|
+
borderWidth: 1,
|
|
46
|
+
borderColor: colors.grayBorderSecondary,
|
|
47
|
+
},
|
|
48
|
+
listCard: {
|
|
49
|
+
marginHorizontal: 16,
|
|
50
|
+
marginVertical: 6,
|
|
51
|
+
borderRadius: 12,
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderColor: colors.grayBorderSecondary,
|
|
54
|
+
backgroundColor: colors.primaryLight,
|
|
55
|
+
padding: 14,
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
justifyContent: 'space-between',
|
|
59
|
+
gap: 12,
|
|
60
|
+
shadowColor: colors.black,
|
|
61
|
+
shadowOffset: {width: 0, height: 2},
|
|
62
|
+
shadowOpacity: 0.04,
|
|
63
|
+
shadowRadius: 4,
|
|
64
|
+
elevation: 2,
|
|
65
|
+
},
|
|
66
|
+
consoleRow: {
|
|
67
|
+
marginHorizontal: 12,
|
|
68
|
+
marginVertical: 3,
|
|
69
|
+
borderRadius: 8,
|
|
70
|
+
borderWidth: 1,
|
|
71
|
+
borderColor: colors.grayBorderSecondary,
|
|
72
|
+
padding: 10,
|
|
73
|
+
flexDirection: 'row',
|
|
74
|
+
gap: 8,
|
|
75
|
+
alignItems: 'flex-start',
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
// ─── Search bar ──────────────────────────────────────────────────────────
|
|
79
|
+
searchBar: {
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
backgroundColor: colors.grayBackground,
|
|
83
|
+
borderRadius: 8,
|
|
84
|
+
marginHorizontal: 16,
|
|
85
|
+
marginTop: 16,
|
|
86
|
+
marginBottom: 12,
|
|
87
|
+
paddingHorizontal: 10,
|
|
88
|
+
borderWidth: 1,
|
|
89
|
+
borderColor: colors.dividerColor,
|
|
90
|
+
height: 36,
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// ─── Tabs / pills ────────────────────────────────────────────────────────
|
|
94
|
+
tabBarStrip: {
|
|
95
|
+
backgroundColor: colors.primaryLight,
|
|
96
|
+
borderBottomWidth: 1,
|
|
97
|
+
borderBottomColor: colors.dividerColor,
|
|
98
|
+
paddingVertical: 6,
|
|
99
|
+
},
|
|
100
|
+
subTabPill: {
|
|
101
|
+
paddingVertical: 6,
|
|
102
|
+
paddingHorizontal: 14,
|
|
103
|
+
borderRadius: 8,
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
flexDirection: 'row',
|
|
106
|
+
gap: 6,
|
|
107
|
+
backgroundColor: `${colors.black}08`,
|
|
108
|
+
borderWidth: 1,
|
|
109
|
+
borderColor: 'transparent',
|
|
110
|
+
},
|
|
111
|
+
subTabPillActive: {
|
|
112
|
+
backgroundColor: colors.purple,
|
|
113
|
+
borderColor: colors.purple,
|
|
114
|
+
},
|
|
115
|
+
subTabPillText: {
|
|
116
|
+
fontFamily: AppFonts.interMedium,
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
color: colors.grayTextStrong,
|
|
119
|
+
},
|
|
120
|
+
subTabPillTextActive: {
|
|
121
|
+
fontFamily: AppFonts.interBold,
|
|
122
|
+
fontSize: 12,
|
|
123
|
+
color: colors.white,
|
|
124
|
+
},
|
|
125
|
+
innerTab: {
|
|
126
|
+
paddingVertical: 8,
|
|
127
|
+
paddingHorizontal: 4,
|
|
128
|
+
borderBottomWidth: 2,
|
|
129
|
+
borderBottomColor: 'transparent',
|
|
130
|
+
flexDirection: 'row',
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
gap: 4,
|
|
133
|
+
},
|
|
134
|
+
countBadge: {
|
|
135
|
+
minWidth: 20,
|
|
136
|
+
height: 18,
|
|
137
|
+
borderRadius: 9,
|
|
138
|
+
paddingHorizontal: 5,
|
|
139
|
+
alignItems: 'center',
|
|
140
|
+
justifyContent: 'center',
|
|
141
|
+
backgroundColor: colors.grayBackground,
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
// ─── Header / address bar ────────────────────────────────────────────────
|
|
145
|
+
addressBar: {
|
|
146
|
+
paddingHorizontal: 12,
|
|
147
|
+
paddingTop: 6,
|
|
148
|
+
paddingBottom: 6,
|
|
149
|
+
backgroundColor: colors.primaryLight,
|
|
150
|
+
borderBottomWidth: 1,
|
|
151
|
+
borderBottomColor: colors.dividerColor,
|
|
152
|
+
},
|
|
153
|
+
addressBarInner: {
|
|
154
|
+
flexDirection: 'row',
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
backgroundColor: colors.grayBackground,
|
|
157
|
+
borderRadius: 8,
|
|
158
|
+
borderWidth: 1.5,
|
|
159
|
+
borderColor: colors.grayBorderSecondary,
|
|
160
|
+
paddingHorizontal: 10,
|
|
161
|
+
paddingVertical: 5,
|
|
162
|
+
gap: 8,
|
|
163
|
+
},
|
|
164
|
+
inspectBanner: {
|
|
165
|
+
flexDirection: 'row',
|
|
166
|
+
alignItems: 'center',
|
|
167
|
+
justifyContent: 'space-between',
|
|
168
|
+
backgroundColor: colors.purpleShade50,
|
|
169
|
+
paddingHorizontal: 12,
|
|
170
|
+
paddingVertical: 6,
|
|
171
|
+
borderBottomWidth: 1,
|
|
172
|
+
borderBottomColor: colors.dividerColor,
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
// ─── Badges / buttons ────────────────────────────────────────────────────
|
|
176
|
+
badgeActive: {
|
|
177
|
+
flexDirection: 'row',
|
|
178
|
+
alignItems: 'center',
|
|
179
|
+
gap: 4,
|
|
180
|
+
backgroundColor: colors.greenStatus,
|
|
181
|
+
paddingHorizontal: 8,
|
|
182
|
+
paddingVertical: 3,
|
|
183
|
+
borderRadius: 12,
|
|
184
|
+
},
|
|
185
|
+
iconButton: {
|
|
186
|
+
width: 26,
|
|
187
|
+
height: 26,
|
|
188
|
+
borderRadius: 13,
|
|
189
|
+
backgroundColor: colors.grayBackground,
|
|
190
|
+
borderWidth: 1,
|
|
191
|
+
borderColor: colors.grayBorderSecondary,
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
justifyContent: 'center',
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// Clear old keys and copy new ones (keeps the exported object identity).
|
|
198
|
+
Object.keys(commonStyles).forEach(key => delete commonStyles[key]);
|
|
199
|
+
Object.assign(commonStyles, newStyles);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// Initial build
|
|
203
|
+
buildCommonStyles(AppColors);
|
|
204
|
+
|
|
205
|
+
export const rebuildCommonStyles = (colors: any) => {
|
|
206
|
+
buildCommonStyles(colors);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export default commonStyles;
|