@buoy-gg/storage 1.7.2

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 (187) hide show
  1. package/README.md +607 -0
  2. package/lib/commonjs/index.js +34 -0
  3. package/lib/commonjs/package.json +1 -0
  4. package/lib/commonjs/preset.js +94 -0
  5. package/lib/commonjs/storage/components/DiffViewer/DiffOptionsPanel.js +356 -0
  6. package/lib/commonjs/storage/components/DiffViewer/TreeDiffViewer.js +29 -0
  7. package/lib/commonjs/storage/components/DiffViewer/components/DiffSummary.js +121 -0
  8. package/lib/commonjs/storage/components/DiffViewer/modes/ThemedSplitView.js +419 -0
  9. package/lib/commonjs/storage/components/DiffViewer/themes/diffThemes.js +122 -0
  10. package/lib/commonjs/storage/components/GameUIStorageBrowser.js +924 -0
  11. package/lib/commonjs/storage/components/GameUIStorageStats.js +746 -0
  12. package/lib/commonjs/storage/components/MMKVInstanceInfoPanel.js +257 -0
  13. package/lib/commonjs/storage/components/MMKVInstanceSelector.js +418 -0
  14. package/lib/commonjs/storage/components/SelectionActionBar.js +224 -0
  15. package/lib/commonjs/storage/components/StorageActionButtons.js +239 -0
  16. package/lib/commonjs/storage/components/StorageActions.js +192 -0
  17. package/lib/commonjs/storage/components/StorageBrowserMode.js +31 -0
  18. package/lib/commonjs/storage/components/StorageEventDetailContent.js +1025 -0
  19. package/lib/commonjs/storage/components/StorageEventFilterView.js +141 -0
  20. package/lib/commonjs/storage/components/StorageEventListener.js +357 -0
  21. package/lib/commonjs/storage/components/StorageEventsSection.js +24 -0
  22. package/lib/commonjs/storage/components/StorageFilterCards.js +345 -0
  23. package/lib/commonjs/storage/components/StorageFilterViewV2.js +42 -0
  24. package/lib/commonjs/storage/components/StorageKeyCard.js +516 -0
  25. package/lib/commonjs/storage/components/StorageKeyRow.js +356 -0
  26. package/lib/commonjs/storage/components/StorageKeySection.js +105 -0
  27. package/lib/commonjs/storage/components/StorageKeyStats.js +344 -0
  28. package/lib/commonjs/storage/components/StorageModalWithTabs.js +871 -0
  29. package/lib/commonjs/storage/components/StorageSection.js +43 -0
  30. package/lib/commonjs/storage/hooks/useAsyncStorageKeys.js +126 -0
  31. package/lib/commonjs/storage/hooks/useMMKVInstances.js +221 -0
  32. package/lib/commonjs/storage/hooks/useMMKVKeys.js +362 -0
  33. package/lib/commonjs/storage/hooks/useTickEverySecond.js +21 -0
  34. package/lib/commonjs/storage/index.js +148 -0
  35. package/lib/commonjs/storage/types.js +5 -0
  36. package/lib/commonjs/storage/utils/AsyncStorageListener.js +510 -0
  37. package/lib/commonjs/storage/utils/MMKVInstanceRegistry.js +202 -0
  38. package/lib/commonjs/storage/utils/MMKVListener.js +380 -0
  39. package/lib/commonjs/storage/utils/clearAllStorage.js +47 -0
  40. package/lib/commonjs/storage/utils/index.js +180 -0
  41. package/lib/commonjs/storage/utils/lineDiff.js +363 -0
  42. package/lib/commonjs/storage/utils/mmkvAvailability.js +62 -0
  43. package/lib/commonjs/storage/utils/mmkvTypeDetection.js +139 -0
  44. package/lib/commonjs/storage/utils/objectDiff.js +157 -0
  45. package/lib/commonjs/storage/utils/safeAsyncStorage.js +140 -0
  46. package/lib/commonjs/storage/utils/storageActionHelpers.js +46 -0
  47. package/lib/commonjs/storage/utils/storageQueryUtils.js +35 -0
  48. package/lib/commonjs/storage/utils/valueType.js +18 -0
  49. package/lib/module/index.js +7 -0
  50. package/lib/module/preset.js +89 -0
  51. package/lib/module/storage/components/DiffViewer/DiffOptionsPanel.js +352 -0
  52. package/lib/module/storage/components/DiffViewer/TreeDiffViewer.js +25 -0
  53. package/lib/module/storage/components/DiffViewer/components/DiffSummary.js +117 -0
  54. package/lib/module/storage/components/DiffViewer/modes/ThemedSplitView.js +415 -0
  55. package/lib/module/storage/components/DiffViewer/themes/diffThemes.js +118 -0
  56. package/lib/module/storage/components/GameUIStorageBrowser.js +922 -0
  57. package/lib/module/storage/components/GameUIStorageStats.js +742 -0
  58. package/lib/module/storage/components/MMKVInstanceInfoPanel.js +253 -0
  59. package/lib/module/storage/components/MMKVInstanceSelector.js +414 -0
  60. package/lib/module/storage/components/SelectionActionBar.js +221 -0
  61. package/lib/module/storage/components/StorageActionButtons.js +236 -0
  62. package/lib/module/storage/components/StorageActions.js +189 -0
  63. package/lib/module/storage/components/StorageBrowserMode.js +27 -0
  64. package/lib/module/storage/components/StorageEventDetailContent.js +1020 -0
  65. package/lib/module/storage/components/StorageEventFilterView.js +137 -0
  66. package/lib/module/storage/components/StorageEventListener.js +354 -0
  67. package/lib/module/storage/components/StorageEventsSection.js +20 -0
  68. package/lib/module/storage/components/StorageFilterCards.js +341 -0
  69. package/lib/module/storage/components/StorageFilterViewV2.js +38 -0
  70. package/lib/module/storage/components/StorageKeyCard.js +513 -0
  71. package/lib/module/storage/components/StorageKeyRow.js +353 -0
  72. package/lib/module/storage/components/StorageKeySection.js +101 -0
  73. package/lib/module/storage/components/StorageKeyStats.js +340 -0
  74. package/lib/module/storage/components/StorageModalWithTabs.js +867 -0
  75. package/lib/module/storage/components/StorageSection.js +40 -0
  76. package/lib/module/storage/hooks/useAsyncStorageKeys.js +121 -0
  77. package/lib/module/storage/hooks/useMMKVInstances.js +216 -0
  78. package/lib/module/storage/hooks/useMMKVKeys.js +359 -0
  79. package/lib/module/storage/hooks/useTickEverySecond.js +18 -0
  80. package/lib/module/storage/index.js +25 -0
  81. package/lib/module/storage/types.js +3 -0
  82. package/lib/module/storage/utils/AsyncStorageListener.js +500 -0
  83. package/lib/module/storage/utils/MMKVInstanceRegistry.js +196 -0
  84. package/lib/module/storage/utils/MMKVListener.js +367 -0
  85. package/lib/module/storage/utils/clearAllStorage.js +42 -0
  86. package/lib/module/storage/utils/index.js +22 -0
  87. package/lib/module/storage/utils/lineDiff.js +359 -0
  88. package/lib/module/storage/utils/mmkvAvailability.js +56 -0
  89. package/lib/module/storage/utils/mmkvTypeDetection.js +133 -0
  90. package/lib/module/storage/utils/objectDiff.js +153 -0
  91. package/lib/module/storage/utils/safeAsyncStorage.js +134 -0
  92. package/lib/module/storage/utils/storageActionHelpers.js +42 -0
  93. package/lib/module/storage/utils/storageQueryUtils.js +30 -0
  94. package/lib/module/storage/utils/valueType.js +14 -0
  95. package/lib/typescript/index.d.ts +3 -0
  96. package/lib/typescript/index.d.ts.map +1 -0
  97. package/lib/typescript/preset.d.ts +90 -0
  98. package/lib/typescript/preset.d.ts.map +1 -0
  99. package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts +18 -0
  100. package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts.map +1 -0
  101. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts +7 -0
  102. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts.map +1 -0
  103. package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts +12 -0
  104. package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts.map +1 -0
  105. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts +13 -0
  106. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts.map +1 -0
  107. package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts +64 -0
  108. package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts.map +1 -0
  109. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts +16 -0
  110. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -0
  111. package/lib/typescript/storage/components/GameUIStorageStats.d.ts +7 -0
  112. package/lib/typescript/storage/components/GameUIStorageStats.d.ts.map +1 -0
  113. package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts +42 -0
  114. package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts.map +1 -0
  115. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts +35 -0
  116. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts.map +1 -0
  117. package/lib/typescript/storage/components/SelectionActionBar.d.ts +21 -0
  118. package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +1 -0
  119. package/lib/typescript/storage/components/StorageActionButtons.d.ts +21 -0
  120. package/lib/typescript/storage/components/StorageActionButtons.d.ts.map +1 -0
  121. package/lib/typescript/storage/components/StorageActions.d.ts +10 -0
  122. package/lib/typescript/storage/components/StorageActions.d.ts.map +1 -0
  123. package/lib/typescript/storage/components/StorageBrowserMode.d.ts +18 -0
  124. package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +1 -0
  125. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts +40 -0
  126. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts.map +1 -0
  127. package/lib/typescript/storage/components/StorageEventFilterView.d.ts +11 -0
  128. package/lib/typescript/storage/components/StorageEventFilterView.d.ts.map +1 -0
  129. package/lib/typescript/storage/components/StorageEventListener.d.ts +6 -0
  130. package/lib/typescript/storage/components/StorageEventListener.d.ts.map +1 -0
  131. package/lib/typescript/storage/components/StorageEventsSection.d.ts +7 -0
  132. package/lib/typescript/storage/components/StorageEventsSection.d.ts.map +1 -0
  133. package/lib/typescript/storage/components/StorageFilterCards.d.ts +36 -0
  134. package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +1 -0
  135. package/lib/typescript/storage/components/StorageFilterViewV2.d.ts +9 -0
  136. package/lib/typescript/storage/components/StorageFilterViewV2.d.ts.map +1 -0
  137. package/lib/typescript/storage/components/StorageKeyCard.d.ts +17 -0
  138. package/lib/typescript/storage/components/StorageKeyCard.d.ts.map +1 -0
  139. package/lib/typescript/storage/components/StorageKeyRow.d.ts +15 -0
  140. package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -0
  141. package/lib/typescript/storage/components/StorageKeySection.d.ts +25 -0
  142. package/lib/typescript/storage/components/StorageKeySection.d.ts.map +1 -0
  143. package/lib/typescript/storage/components/StorageKeyStats.d.ts +15 -0
  144. package/lib/typescript/storage/components/StorageKeyStats.d.ts.map +1 -0
  145. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts +13 -0
  146. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +1 -0
  147. package/lib/typescript/storage/components/StorageSection.d.ts +10 -0
  148. package/lib/typescript/storage/components/StorageSection.d.ts.map +1 -0
  149. package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts +10 -0
  150. package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts.map +1 -0
  151. package/lib/typescript/storage/hooks/useMMKVInstances.d.ts +114 -0
  152. package/lib/typescript/storage/hooks/useMMKVInstances.d.ts.map +1 -0
  153. package/lib/typescript/storage/hooks/useMMKVKeys.d.ts +94 -0
  154. package/lib/typescript/storage/hooks/useMMKVKeys.d.ts.map +1 -0
  155. package/lib/typescript/storage/hooks/useTickEverySecond.d.ts +6 -0
  156. package/lib/typescript/storage/hooks/useTickEverySecond.d.ts.map +1 -0
  157. package/lib/typescript/storage/index.d.ts +15 -0
  158. package/lib/typescript/storage/index.d.ts.map +1 -0
  159. package/lib/typescript/storage/types.d.ts +41 -0
  160. package/lib/typescript/storage/types.d.ts.map +1 -0
  161. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts +195 -0
  162. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +1 -0
  163. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts +224 -0
  164. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts.map +1 -0
  165. package/lib/typescript/storage/utils/MMKVListener.d.ts +218 -0
  166. package/lib/typescript/storage/utils/MMKVListener.d.ts.map +1 -0
  167. package/lib/typescript/storage/utils/clearAllStorage.d.ts +11 -0
  168. package/lib/typescript/storage/utils/clearAllStorage.d.ts.map +1 -0
  169. package/lib/typescript/storage/utils/index.d.ts +8 -0
  170. package/lib/typescript/storage/utils/index.d.ts.map +1 -0
  171. package/lib/typescript/storage/utils/lineDiff.d.ts +34 -0
  172. package/lib/typescript/storage/utils/lineDiff.d.ts.map +1 -0
  173. package/lib/typescript/storage/utils/mmkvAvailability.d.ts +23 -0
  174. package/lib/typescript/storage/utils/mmkvAvailability.d.ts.map +1 -0
  175. package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts +71 -0
  176. package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts.map +1 -0
  177. package/lib/typescript/storage/utils/objectDiff.d.ts +35 -0
  178. package/lib/typescript/storage/utils/objectDiff.d.ts.map +1 -0
  179. package/lib/typescript/storage/utils/safeAsyncStorage.d.ts +56 -0
  180. package/lib/typescript/storage/utils/safeAsyncStorage.d.ts.map +1 -0
  181. package/lib/typescript/storage/utils/storageActionHelpers.d.ts +5 -0
  182. package/lib/typescript/storage/utils/storageActionHelpers.d.ts.map +1 -0
  183. package/lib/typescript/storage/utils/storageQueryUtils.d.ts +6 -0
  184. package/lib/typescript/storage/utils/storageQueryUtils.d.ts.map +1 -0
  185. package/lib/typescript/storage/utils/valueType.d.ts +3 -0
  186. package/lib/typescript/storage/utils/valueType.d.ts.map +1 -0
  187. package/package.json +68 -0
@@ -0,0 +1,742 @@
1
+ "use strict";
2
+
3
+ import { useEffect, useRef } from "react";
4
+ import { StyleSheet, View, Text, Animated } from "react-native";
5
+ import { Database, Shield, AlertCircle, CheckCircle2, XCircle, Eye, Zap, gameUIColors, macOSColors } from "@buoy-gg/shared-ui";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ // Use macOS colors
8
+ const gameColors = {
9
+ ...gameUIColors,
10
+ ...macOSColors.semantic,
11
+ primary: macOSColors.text.primary,
12
+ secondary: macOSColors.text.secondary,
13
+ muted: macOSColors.text.muted,
14
+ panel: macOSColors.background.card,
15
+ border: macOSColors.border.default,
16
+ online: macOSColors.semantic.success,
17
+ storage: macOSColors.semantic.debug,
18
+ optional: macOSColors.semantic.debug
19
+ };
20
+
21
+ // Storage type configurations with game UI colors
22
+ const storageTypeData = [{
23
+ key: "valid",
24
+ label: "VALID KEYS",
25
+ subtitle: "Stored correctly",
26
+ icon: CheckCircle2,
27
+ color: gameColors.online
28
+ }, {
29
+ key: "missing",
30
+ label: "MISSING KEYS",
31
+ subtitle: "Required but absent",
32
+ icon: AlertCircle,
33
+ color: gameColors.error
34
+ }, {
35
+ key: "wrongValue",
36
+ label: "VALUE ERROR",
37
+ subtitle: "Incorrect data",
38
+ icon: XCircle,
39
+ color: gameColors.warning
40
+ }, {
41
+ key: "wrongType",
42
+ label: "TYPE ERROR",
43
+ subtitle: "Wrong format",
44
+ icon: Zap,
45
+ color: gameColors.info
46
+ }, {
47
+ key: "optional",
48
+ label: "AUXILIARY DATA",
49
+ subtitle: "Optional storage",
50
+ icon: Eye,
51
+ color: gameColors.optional
52
+ }];
53
+
54
+ // Storage backend types
55
+ const backendTypeData = [{
56
+ key: "mmkv",
57
+ label: "MMKV",
58
+ subtitle: "High-speed memory",
59
+ icon: Zap,
60
+ color: gameColors.info
61
+ }, {
62
+ key: "async",
63
+ label: "ASYNC STORAGE",
64
+ subtitle: "Standard persistence",
65
+ icon: Database,
66
+ color: gameColors.storage
67
+ }, {
68
+ key: "secure",
69
+ label: "SECURE VAULT",
70
+ subtitle: "Encrypted storage",
71
+ icon: Shield,
72
+ color: gameColors.online
73
+ }];
74
+ export function GameUIStorageStats({
75
+ stats
76
+ }) {
77
+ const {
78
+ totalCount,
79
+ missingCount,
80
+ wrongValueCount,
81
+ wrongTypeCount,
82
+ presentRequiredCount,
83
+ optionalCount,
84
+ mmkvCount,
85
+ asyncCount,
86
+ secureCount
87
+ } = stats;
88
+
89
+ // Minimal animation values - only for status indicator
90
+ const statusPulse = useRef(new Animated.Value(1)).current;
91
+ useEffect(() => {
92
+ // Simple status pulse for critical states only
93
+ if (missingCount > 0 || wrongValueCount > 0 || wrongTypeCount > 0) {
94
+ Animated.loop(Animated.sequence([Animated.timing(statusPulse, {
95
+ toValue: 1,
96
+ duration: 1500,
97
+ useNativeDriver: true
98
+ }), Animated.timing(statusPulse, {
99
+ toValue: 0.6,
100
+ duration: 1500,
101
+ useNativeDriver: true
102
+ })])).start();
103
+ } else {
104
+ Animated.timing(statusPulse, {
105
+ toValue: 1,
106
+ duration: 300,
107
+ useNativeDriver: true
108
+ }).start();
109
+ }
110
+ }, [missingCount, wrongValueCount, wrongTypeCount, statusPulse]);
111
+ const statusPulseStyle = {
112
+ opacity: statusPulse
113
+ };
114
+
115
+ // Calculate storage health
116
+ const requiredTotal = presentRequiredCount + missingCount + wrongValueCount + wrongTypeCount;
117
+ const healthPercentage = requiredTotal > 0 ? Math.round(presentRequiredCount / requiredTotal * 100) : 100;
118
+ const healthStatus = healthPercentage >= 90 ? "OPTIMAL" : healthPercentage >= 70 ? "WARNING" : "CRITICAL";
119
+ const healthColor = healthPercentage >= 90 ? gameColors.online : healthPercentage >= 70 ? gameColors.warning : gameColors.error;
120
+
121
+ // If no storage keys at all, show minimal UI
122
+ if (totalCount === 0) {
123
+ return /*#__PURE__*/_jsxs(View, {
124
+ style: styles.mainPanel,
125
+ children: [/*#__PURE__*/_jsxs(View, {
126
+ style: styles.headerBar,
127
+ children: [/*#__PURE__*/_jsxs(View, {
128
+ style: styles.headerLeft,
129
+ children: [/*#__PURE__*/_jsx(Text, {
130
+ style: styles.headerTitle,
131
+ children: "STORAGE OVERVIEW"
132
+ }), /*#__PURE__*/_jsx(Text, {
133
+ style: styles.headerSubtitle,
134
+ children: "Persistent app data on device"
135
+ })]
136
+ }), /*#__PURE__*/_jsxs(View, {
137
+ style: styles.statusIndicator,
138
+ children: [/*#__PURE__*/_jsx(View, {
139
+ style: [styles.statusDot, {
140
+ backgroundColor: gameColors.muted
141
+ }]
142
+ }), /*#__PURE__*/_jsx(Text, {
143
+ style: styles.statusText,
144
+ children: "EMPTY"
145
+ })]
146
+ })]
147
+ }), /*#__PURE__*/_jsxs(View, {
148
+ style: styles.emptyState,
149
+ children: [/*#__PURE__*/_jsx(Text, {
150
+ style: styles.emptyIcon,
151
+ children: "\uD83D\uDCE6"
152
+ }), /*#__PURE__*/_jsx(Text, {
153
+ style: styles.emptyTitle,
154
+ children: "NO DATA STORED"
155
+ }), /*#__PURE__*/_jsx(Text, {
156
+ style: styles.emptySubtitle,
157
+ children: "Your app has not saved any data yet"
158
+ })]
159
+ })]
160
+ });
161
+ }
162
+ return /*#__PURE__*/_jsxs(View, {
163
+ style: styles.mainPanel,
164
+ children: [/*#__PURE__*/_jsxs(View, {
165
+ style: styles.headerBar,
166
+ children: [/*#__PURE__*/_jsxs(View, {
167
+ style: styles.headerLeft,
168
+ children: [/*#__PURE__*/_jsx(Text, {
169
+ style: styles.headerTitle,
170
+ children: "STORAGE OVERVIEW"
171
+ }), /*#__PURE__*/_jsx(Text, {
172
+ style: styles.headerSubtitle,
173
+ children: "Persistent app data on device"
174
+ })]
175
+ }), /*#__PURE__*/_jsxs(Animated.View, {
176
+ style: [styles.statusIndicator, statusPulseStyle],
177
+ children: [/*#__PURE__*/_jsx(View, {
178
+ style: [styles.statusDot, {
179
+ backgroundColor: healthColor
180
+ }]
181
+ }), /*#__PURE__*/_jsx(Text, {
182
+ style: [styles.statusText, {
183
+ color: healthColor
184
+ }],
185
+ children: healthStatus
186
+ })]
187
+ })]
188
+ }), /*#__PURE__*/_jsxs(View, {
189
+ style: styles.healthSection,
190
+ children: [/*#__PURE__*/_jsxs(View, {
191
+ style: styles.healthHeader,
192
+ children: [/*#__PURE__*/_jsx(Text, {
193
+ style: styles.healthLabel,
194
+ children: "DATA INTEGRITY"
195
+ }), /*#__PURE__*/_jsxs(Text, {
196
+ style: [styles.healthPercentage, {
197
+ color: healthColor
198
+ }],
199
+ children: [healthPercentage, "%"]
200
+ })]
201
+ }), /*#__PURE__*/_jsxs(View, {
202
+ style: styles.healthBarContainer,
203
+ children: [/*#__PURE__*/_jsx(View, {
204
+ style: styles.healthBarBg,
205
+ children: /*#__PURE__*/_jsx(Animated.View, {
206
+ style: [styles.healthBarFill, {
207
+ width: `${healthPercentage}%`,
208
+ backgroundColor: healthColor,
209
+ shadowColor: healthColor
210
+ }]
211
+ })
212
+ }), /*#__PURE__*/_jsx(View, {
213
+ style: styles.healthGridOverlay
214
+ })]
215
+ })]
216
+ }), /*#__PURE__*/_jsx(View, {
217
+ style: styles.statsGrid,
218
+ children: storageTypeData.map((item, index) => {
219
+ let count = 0;
220
+ let isActive = false;
221
+ switch (item.key) {
222
+ case "valid":
223
+ count = presentRequiredCount;
224
+ isActive = count > 0;
225
+ break;
226
+ case "missing":
227
+ count = missingCount;
228
+ isActive = count > 0;
229
+ break;
230
+ case "wrongValue":
231
+ count = wrongValueCount;
232
+ isActive = count > 0;
233
+ break;
234
+ case "wrongType":
235
+ count = wrongTypeCount;
236
+ isActive = count > 0;
237
+ break;
238
+ case "optional":
239
+ count = optionalCount;
240
+ isActive = count > 0;
241
+ break;
242
+ }
243
+ if (!isActive) return null;
244
+ const IconComponent = item.icon;
245
+ const isError = item.key === "missing" || item.key === "wrongValue" || item.key === "wrongType";
246
+ return /*#__PURE__*/_jsxs(Animated.View, {
247
+ style: [styles.statCard, {
248
+ borderColor: item.color + "40"
249
+ }, isError && styles.statCardError],
250
+ children: [/*#__PURE__*/_jsx(View, {
251
+ style: [styles.cardGlow, {
252
+ backgroundColor: item.color + "10"
253
+ }]
254
+ }), /*#__PURE__*/_jsxs(View, {
255
+ style: styles.cardHeader,
256
+ children: [/*#__PURE__*/_jsx(View, {
257
+ style: [styles.iconWrapper, {
258
+ backgroundColor: item.color + "15"
259
+ }],
260
+ children: /*#__PURE__*/_jsx(IconComponent, {
261
+ size: 14,
262
+ color: item.color
263
+ })
264
+ }), /*#__PURE__*/_jsxs(View, {
265
+ style: styles.cardInfo,
266
+ children: [/*#__PURE__*/_jsx(Text, {
267
+ style: [styles.cardLabel, {
268
+ color: item.color
269
+ }],
270
+ children: item.label
271
+ }), /*#__PURE__*/_jsx(Text, {
272
+ style: styles.cardSubtitle,
273
+ children: item.subtitle
274
+ })]
275
+ })]
276
+ }), /*#__PURE__*/_jsxs(View, {
277
+ style: styles.cardStats,
278
+ children: [/*#__PURE__*/_jsx(Text, {
279
+ style: [styles.statNumber, {
280
+ color: item.color
281
+ }],
282
+ children: count.toString().padStart(2, "0")
283
+ }), /*#__PURE__*/_jsx(View, {
284
+ style: [styles.statBar, {
285
+ backgroundColor: item.color + "20"
286
+ }],
287
+ children: /*#__PURE__*/_jsx(View, {
288
+ style: [styles.statBarFill, {
289
+ width: `${count / totalCount * 100}%`,
290
+ backgroundColor: item.color
291
+ }]
292
+ })
293
+ })]
294
+ }), /*#__PURE__*/_jsx(View, {
295
+ style: [styles.cornerIndicator, styles.cornerTL, {
296
+ backgroundColor: item.color
297
+ }]
298
+ }), /*#__PURE__*/_jsx(View, {
299
+ style: [styles.cornerIndicator, styles.cornerBR, {
300
+ backgroundColor: item.color
301
+ }]
302
+ })]
303
+ }, item.key);
304
+ })
305
+ }), (mmkvCount > 0 || asyncCount > 0 || secureCount > 0) && /*#__PURE__*/_jsxs(View, {
306
+ style: styles.backendSection,
307
+ children: [/*#__PURE__*/_jsx(Text, {
308
+ style: styles.backendTitle,
309
+ children: "MEMORY BANKS"
310
+ }), /*#__PURE__*/_jsx(View, {
311
+ style: styles.backendGrid,
312
+ children: backendTypeData.map(backend => {
313
+ let count = 0;
314
+ switch (backend.key) {
315
+ case "mmkv":
316
+ count = mmkvCount;
317
+ break;
318
+ case "async":
319
+ count = asyncCount;
320
+ break;
321
+ case "secure":
322
+ count = secureCount;
323
+ break;
324
+ }
325
+ if (count === 0) return null;
326
+ const IconComponent = backend.icon;
327
+ const percentage = totalCount > 0 ? Math.round(count / totalCount * 100) : 0;
328
+ return /*#__PURE__*/_jsxs(View, {
329
+ style: styles.backendItem,
330
+ children: [/*#__PURE__*/_jsx(View, {
331
+ style: [styles.backendIcon, {
332
+ backgroundColor: backend.color + "15"
333
+ }],
334
+ children: /*#__PURE__*/_jsx(IconComponent, {
335
+ size: 12,
336
+ color: backend.color
337
+ })
338
+ }), /*#__PURE__*/_jsxs(View, {
339
+ style: styles.backendInfo,
340
+ children: [/*#__PURE__*/_jsx(Text, {
341
+ style: [styles.backendLabel, {
342
+ color: backend.color
343
+ }],
344
+ children: backend.label
345
+ }), /*#__PURE__*/_jsx(Text, {
346
+ style: styles.backendSubtitle,
347
+ children: backend.subtitle
348
+ })]
349
+ }), /*#__PURE__*/_jsxs(View, {
350
+ style: styles.backendStats,
351
+ children: [/*#__PURE__*/_jsx(Text, {
352
+ style: [styles.backendCount, {
353
+ color: backend.color
354
+ }],
355
+ children: count
356
+ }), /*#__PURE__*/_jsxs(Text, {
357
+ style: styles.backendPercent,
358
+ children: [percentage, "%"]
359
+ })]
360
+ })]
361
+ }, backend.key);
362
+ })
363
+ })]
364
+ }), /*#__PURE__*/_jsxs(View, {
365
+ style: styles.bottomBar,
366
+ children: [/*#__PURE__*/_jsxs(View, {
367
+ style: styles.bottomStats,
368
+ children: [/*#__PURE__*/_jsx(Text, {
369
+ style: styles.bottomStatLabel,
370
+ children: "TOTAL KEYS"
371
+ }), /*#__PURE__*/_jsx(Text, {
372
+ style: styles.bottomStatValue,
373
+ children: totalCount
374
+ })]
375
+ }), /*#__PURE__*/_jsx(View, {
376
+ style: styles.bottomDivider
377
+ }), /*#__PURE__*/_jsxs(View, {
378
+ style: styles.bottomStats,
379
+ children: [/*#__PURE__*/_jsx(Text, {
380
+ style: styles.bottomStatLabel,
381
+ children: "VALID"
382
+ }), /*#__PURE__*/_jsx(Text, {
383
+ style: [styles.bottomStatValue, {
384
+ color: gameColors.online
385
+ }],
386
+ children: presentRequiredCount + optionalCount
387
+ })]
388
+ }), /*#__PURE__*/_jsx(View, {
389
+ style: styles.bottomDivider
390
+ }), /*#__PURE__*/_jsxs(View, {
391
+ style: styles.bottomStats,
392
+ children: [/*#__PURE__*/_jsx(Text, {
393
+ style: styles.bottomStatLabel,
394
+ children: "ISSUES"
395
+ }), /*#__PURE__*/_jsx(Text, {
396
+ style: [styles.bottomStatValue, {
397
+ color: gameColors.error
398
+ }],
399
+ children: missingCount + wrongValueCount + wrongTypeCount
400
+ })]
401
+ })]
402
+ }), /*#__PURE__*/_jsx(View, {
403
+ style: styles.techPattern,
404
+ children: /*#__PURE__*/_jsx(Text, {
405
+ style: styles.techText,
406
+ children: "<DATA>"
407
+ })
408
+ })]
409
+ });
410
+ }
411
+ const styles = StyleSheet.create({
412
+ mainPanel: {
413
+ backgroundColor: gameColors.panel,
414
+ borderRadius: 16,
415
+ padding: 16,
416
+ marginBottom: 16,
417
+ borderWidth: 1,
418
+ borderColor: gameColors.border,
419
+ overflow: "hidden",
420
+ position: "relative"
421
+ },
422
+ // Header
423
+ headerBar: {
424
+ flexDirection: "row",
425
+ justifyContent: "space-between",
426
+ alignItems: "center",
427
+ marginBottom: 20,
428
+ paddingBottom: 12,
429
+ borderBottomWidth: 1,
430
+ borderBottomColor: "rgba(255, 255, 255, 0.1)"
431
+ },
432
+ headerLeft: {
433
+ gap: 2
434
+ },
435
+ headerTitle: {
436
+ fontSize: 14,
437
+ fontWeight: "700",
438
+ color: gameColors.primary,
439
+ fontFamily: "monospace",
440
+ letterSpacing: 2
441
+ },
442
+ headerSubtitle: {
443
+ fontSize: 9,
444
+ color: gameColors.secondary,
445
+ fontFamily: "monospace",
446
+ letterSpacing: 1
447
+ },
448
+ statusIndicator: {
449
+ flexDirection: "row",
450
+ alignItems: "center",
451
+ gap: 6
452
+ },
453
+ statusDot: {
454
+ width: 6,
455
+ height: 6,
456
+ borderRadius: 3,
457
+ shadowOffset: {
458
+ width: 0,
459
+ height: 0
460
+ },
461
+ shadowOpacity: 0.8,
462
+ shadowRadius: 4
463
+ },
464
+ statusText: {
465
+ fontSize: 10,
466
+ fontWeight: "600",
467
+ fontFamily: "monospace",
468
+ letterSpacing: 1
469
+ },
470
+ // Health section
471
+ healthSection: {
472
+ marginBottom: 20
473
+ },
474
+ healthHeader: {
475
+ flexDirection: "row",
476
+ justifyContent: "space-between",
477
+ alignItems: "center",
478
+ marginBottom: 8
479
+ },
480
+ healthLabel: {
481
+ fontSize: 10,
482
+ color: gameColors.secondary,
483
+ fontFamily: "monospace",
484
+ letterSpacing: 1
485
+ },
486
+ healthPercentage: {
487
+ fontSize: 16,
488
+ fontWeight: "700",
489
+ fontFamily: "monospace",
490
+ textShadowOffset: {
491
+ width: 0,
492
+ height: 0
493
+ },
494
+ textShadowRadius: 8
495
+ },
496
+ healthBarContainer: {
497
+ position: "relative"
498
+ },
499
+ healthBarBg: {
500
+ height: 6,
501
+ backgroundColor: "rgba(255, 255, 255, 0.05)",
502
+ borderRadius: 3,
503
+ overflow: "hidden"
504
+ },
505
+ healthBarFill: {
506
+ height: "100%",
507
+ borderRadius: 3,
508
+ shadowOffset: {
509
+ width: 0,
510
+ height: 0
511
+ },
512
+ shadowOpacity: 0.6,
513
+ shadowRadius: 8
514
+ },
515
+ healthGridOverlay: {
516
+ ...StyleSheet.absoluteFillObject,
517
+ opacity: 0.1,
518
+ borderWidth: 1,
519
+ borderColor: "rgba(255, 255, 255, 0.1)",
520
+ borderRadius: 3
521
+ },
522
+ // Stats grid
523
+ statsGrid: {
524
+ gap: 12,
525
+ marginBottom: 16
526
+ },
527
+ statCard: {
528
+ backgroundColor: "rgba(0, 0, 0, 0.4)",
529
+ borderRadius: 12,
530
+ borderWidth: 1,
531
+ padding: 12,
532
+ position: "relative",
533
+ overflow: "hidden"
534
+ },
535
+ statCardError: {
536
+ backgroundColor: "rgba(255, 0, 0, 0.02)"
537
+ },
538
+ cardGlow: {
539
+ ...StyleSheet.absoluteFillObject,
540
+ opacity: 0.3
541
+ },
542
+ cardHeader: {
543
+ flexDirection: "row",
544
+ alignItems: "center",
545
+ gap: 10,
546
+ marginBottom: 10
547
+ },
548
+ iconWrapper: {
549
+ width: 28,
550
+ height: 28,
551
+ borderRadius: 6,
552
+ justifyContent: "center",
553
+ alignItems: "center"
554
+ },
555
+ cardInfo: {
556
+ flex: 1
557
+ },
558
+ cardLabel: {
559
+ fontSize: 11,
560
+ fontWeight: "700",
561
+ fontFamily: "monospace",
562
+ letterSpacing: 1,
563
+ textShadowOffset: {
564
+ width: 0,
565
+ height: 0
566
+ },
567
+ textShadowRadius: 4
568
+ },
569
+ cardSubtitle: {
570
+ fontSize: 9,
571
+ color: gameColors.secondary,
572
+ fontFamily: "monospace",
573
+ marginTop: 1
574
+ },
575
+ cardStats: {
576
+ flexDirection: "row",
577
+ alignItems: "center",
578
+ gap: 10
579
+ },
580
+ statNumber: {
581
+ fontSize: 24,
582
+ fontWeight: "700",
583
+ fontFamily: "monospace",
584
+ minWidth: 40,
585
+ textShadowOffset: {
586
+ width: 0,
587
+ height: 0
588
+ },
589
+ textShadowRadius: 10
590
+ },
591
+ statBar: {
592
+ flex: 1,
593
+ height: 4,
594
+ borderRadius: 2,
595
+ overflow: "hidden"
596
+ },
597
+ statBarFill: {
598
+ height: "100%",
599
+ borderRadius: 2
600
+ },
601
+ cornerIndicator: {
602
+ position: "absolute",
603
+ width: 8,
604
+ height: 1,
605
+ opacity: 0.6
606
+ },
607
+ cornerTL: {
608
+ top: 0,
609
+ left: 0,
610
+ width: 1,
611
+ height: 8
612
+ },
613
+ cornerBR: {
614
+ bottom: 0,
615
+ right: 0,
616
+ width: 1,
617
+ height: 8
618
+ },
619
+ // Backend section
620
+ backendSection: {
621
+ marginBottom: 16
622
+ },
623
+ backendTitle: {
624
+ fontSize: 10,
625
+ color: gameColors.secondary,
626
+ fontFamily: "monospace",
627
+ letterSpacing: 1,
628
+ marginBottom: 12
629
+ },
630
+ backendGrid: {
631
+ gap: 8
632
+ },
633
+ backendItem: {
634
+ flexDirection: "row",
635
+ alignItems: "center",
636
+ backgroundColor: "rgba(255, 255, 255, 0.02)",
637
+ borderRadius: 8,
638
+ padding: 10,
639
+ borderWidth: 1,
640
+ borderColor: "rgba(255, 255, 255, 0.05)"
641
+ },
642
+ backendIcon: {
643
+ width: 24,
644
+ height: 24,
645
+ borderRadius: 4,
646
+ justifyContent: "center",
647
+ alignItems: "center",
648
+ marginRight: 10
649
+ },
650
+ backendInfo: {
651
+ flex: 1
652
+ },
653
+ backendLabel: {
654
+ fontSize: 10,
655
+ fontWeight: "600",
656
+ fontFamily: "monospace",
657
+ letterSpacing: 0.5
658
+ },
659
+ backendSubtitle: {
660
+ fontSize: 8,
661
+ color: gameColors.muted,
662
+ fontFamily: "monospace"
663
+ },
664
+ backendStats: {
665
+ alignItems: "flex-end"
666
+ },
667
+ backendCount: {
668
+ fontSize: 14,
669
+ fontWeight: "700",
670
+ fontFamily: "monospace"
671
+ },
672
+ backendPercent: {
673
+ fontSize: 9,
674
+ color: gameColors.muted,
675
+ fontFamily: "monospace"
676
+ },
677
+ // Bottom bar
678
+ bottomBar: {
679
+ flexDirection: "row",
680
+ alignItems: "center",
681
+ paddingTop: 12,
682
+ borderTopWidth: 1,
683
+ borderTopColor: "rgba(255, 255, 255, 0.1)"
684
+ },
685
+ bottomStats: {
686
+ flex: 1,
687
+ alignItems: "center"
688
+ },
689
+ bottomStatLabel: {
690
+ fontSize: 8,
691
+ color: gameColors.muted,
692
+ fontFamily: "monospace",
693
+ letterSpacing: 1,
694
+ marginBottom: 2
695
+ },
696
+ bottomStatValue: {
697
+ fontSize: 14,
698
+ fontWeight: "700",
699
+ color: gameColors.primary,
700
+ fontFamily: "monospace"
701
+ },
702
+ bottomDivider: {
703
+ width: 1,
704
+ height: 20,
705
+ backgroundColor: "rgba(255, 255, 255, 0.1)"
706
+ },
707
+ // Empty state
708
+ emptyState: {
709
+ paddingVertical: 40,
710
+ alignItems: "center",
711
+ gap: 8
712
+ },
713
+ emptyIcon: {
714
+ fontSize: 32,
715
+ color: gameColors.muted,
716
+ marginBottom: 8
717
+ },
718
+ emptyTitle: {
719
+ fontSize: 12,
720
+ color: gameColors.secondary,
721
+ fontFamily: "monospace",
722
+ letterSpacing: 2
723
+ },
724
+ emptySubtitle: {
725
+ fontSize: 10,
726
+ color: gameColors.muted,
727
+ fontFamily: "monospace"
728
+ },
729
+ // Tech decoration
730
+ techPattern: {
731
+ position: "absolute",
732
+ top: 16,
733
+ right: 16,
734
+ opacity: 0.03
735
+ },
736
+ techText: {
737
+ fontSize: 8,
738
+ fontFamily: "monospace",
739
+ color: gameColors.info,
740
+ letterSpacing: 1
741
+ }
742
+ });