@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,340 @@
1
+ "use strict";
2
+
3
+ import { View, Text, StyleSheet } from "react-native";
4
+ import { AlertCircle, CheckCircle2, XCircle, Eye, Database, Shield } from "@buoy-gg/shared-ui";
5
+ import { getStorageTypeHexColor } from "../utils/storageQueryUtils";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ // Variable type configurations matching env vars design
8
+ const variableTypeData = [{
9
+ key: "valid",
10
+ label: "Valid Keys",
11
+ description: "Correctly stored and accessible",
12
+ icon: CheckCircle2,
13
+ color: "#10B981",
14
+ textColor: "#10B981",
15
+ bgColor: "rgba(16, 185, 129, 0.1)"
16
+ }, {
17
+ key: "missing",
18
+ label: "Missing Keys",
19
+ description: "Required but not found",
20
+ icon: AlertCircle,
21
+ color: "#EF4444",
22
+ textColor: "#EF4444",
23
+ bgColor: "rgba(239, 68, 68, 0.1)"
24
+ }, {
25
+ key: "wrongValue",
26
+ label: "Wrong Values",
27
+ description: "Stored but incorrect value",
28
+ icon: XCircle,
29
+ color: "#F97316",
30
+ textColor: "#F97316",
31
+ bgColor: "rgba(249, 115, 22, 0.1)"
32
+ }, {
33
+ key: "wrongType",
34
+ label: "Wrong Types",
35
+ description: "Value has incorrect data type",
36
+ icon: XCircle,
37
+ color: "#0891B2",
38
+ textColor: "#0891B2",
39
+ bgColor: "rgba(8, 145, 178, 0.1)"
40
+ }, {
41
+ key: "optional",
42
+ label: "Optional Keys",
43
+ description: "Available but not required",
44
+ icon: Eye,
45
+ color: "#8B5CF6",
46
+ textColor: "#8B5CF6",
47
+ bgColor: "rgba(139, 92, 246, 0.1)"
48
+ }];
49
+
50
+ // Storage type breakdown data
51
+ const storageTypeData = [{
52
+ key: "mmkv",
53
+ label: "MMKV",
54
+ description: "High-performance key-value storage",
55
+ icon: Database
56
+ }, {
57
+ key: "async",
58
+ label: "AsyncStorage",
59
+ description: "React Native async storage",
60
+ icon: Database
61
+ }, {
62
+ key: "secure",
63
+ label: "SecureStorage",
64
+ description: "Encrypted secure storage",
65
+ icon: Shield
66
+ }];
67
+
68
+ /**
69
+ * Storage key stats component following composition principles [[rule3]]
70
+ *
71
+ * Applied principles:
72
+ * - Decompose by Responsibility: Single purpose component for storage stats display
73
+ * - Prefer Composition over Configuration: Reuses patterns from EnvVarStats
74
+ * - Extract Reusable Logic: Shares visualization patterns with env vars
75
+ */
76
+ export function StorageKeyStatsSection({
77
+ stats
78
+ }) {
79
+ const {
80
+ totalCount,
81
+ missingCount,
82
+ wrongValueCount,
83
+ wrongTypeCount,
84
+ presentRequiredCount,
85
+ optionalCount,
86
+ mmkvCount,
87
+ asyncCount,
88
+ secureCount
89
+ } = stats;
90
+
91
+ // If no storage keys at all, show minimal stats
92
+ if (totalCount === 0) {
93
+ return /*#__PURE__*/_jsxs(View, {
94
+ style: styles.statsContainer,
95
+ children: [/*#__PURE__*/_jsx(Text, {
96
+ style: styles.sectionTitle,
97
+ children: "STORAGE BREAKDOWN"
98
+ }), /*#__PURE__*/_jsx(View, {
99
+ style: styles.emptyState,
100
+ children: /*#__PURE__*/_jsx(Text, {
101
+ style: styles.emptyStateText,
102
+ children: "No storage keys detected"
103
+ })
104
+ })]
105
+ });
106
+ }
107
+ return /*#__PURE__*/_jsxs(View, {
108
+ style: styles.statsContainer,
109
+ children: [/*#__PURE__*/_jsxs(View, {
110
+ style: styles.breakdownSection,
111
+ children: [/*#__PURE__*/_jsx(Text, {
112
+ style: styles.sectionTitle,
113
+ children: "KEY STATUS BREAKDOWN"
114
+ }), /*#__PURE__*/_jsx(View, {
115
+ style: styles.breakdownList,
116
+ children: variableTypeData.map(item => {
117
+ let count = 0;
118
+ let shouldShow = false;
119
+ switch (item.key) {
120
+ case "valid":
121
+ count = presentRequiredCount;
122
+ shouldShow = count > 0;
123
+ break;
124
+ case "missing":
125
+ count = missingCount;
126
+ shouldShow = count > 0;
127
+ break;
128
+ case "wrongValue":
129
+ count = wrongValueCount;
130
+ shouldShow = count > 0;
131
+ break;
132
+ case "wrongType":
133
+ count = wrongTypeCount;
134
+ shouldShow = count > 0;
135
+ break;
136
+ case "optional":
137
+ count = optionalCount;
138
+ shouldShow = count > 0;
139
+ break;
140
+ }
141
+ if (!shouldShow) return null;
142
+ const percentage = totalCount > 0 ? (count / totalCount * 100).toFixed(1) : "0";
143
+ const IconComponent = item.icon;
144
+ return /*#__PURE__*/_jsx(View, {
145
+ style: styles.breakdownItem,
146
+ children: /*#__PURE__*/_jsxs(View, {
147
+ style: styles.breakdownItemRow,
148
+ children: [/*#__PURE__*/_jsxs(View, {
149
+ style: styles.breakdownItemLeft,
150
+ children: [/*#__PURE__*/_jsx(View, {
151
+ style: [styles.breakdownIcon, {
152
+ backgroundColor: item.bgColor
153
+ }],
154
+ children: /*#__PURE__*/_jsx(IconComponent, {
155
+ size: 14,
156
+ color: item.color
157
+ })
158
+ }), /*#__PURE__*/_jsxs(View, {
159
+ style: styles.breakdownItemInfo,
160
+ children: [/*#__PURE__*/_jsx(Text, {
161
+ style: styles.breakdownItemLabel,
162
+ children: item.label
163
+ }), /*#__PURE__*/_jsx(Text, {
164
+ style: styles.breakdownItemDesc,
165
+ children: item.description
166
+ })]
167
+ })]
168
+ }), /*#__PURE__*/_jsxs(View, {
169
+ style: styles.breakdownItemRight,
170
+ children: [/*#__PURE__*/_jsx(Text, {
171
+ style: [styles.breakdownCount, {
172
+ color: item.textColor
173
+ }],
174
+ children: count
175
+ }), /*#__PURE__*/_jsxs(Text, {
176
+ style: styles.breakdownPercentage,
177
+ children: [percentage, "%"]
178
+ })]
179
+ })]
180
+ })
181
+ }, item.key);
182
+ })
183
+ })]
184
+ }), (mmkvCount > 0 || asyncCount > 0 || secureCount > 0) && /*#__PURE__*/_jsxs(View, {
185
+ style: styles.breakdownSection,
186
+ children: [/*#__PURE__*/_jsx(Text, {
187
+ style: styles.sectionTitle,
188
+ children: "STORAGE TYPE BREAKDOWN"
189
+ }), /*#__PURE__*/_jsx(View, {
190
+ style: styles.breakdownList,
191
+ children: storageTypeData.map(item => {
192
+ let count = 0;
193
+ let shouldShow = false;
194
+ switch (item.key) {
195
+ case "mmkv":
196
+ count = mmkvCount;
197
+ shouldShow = count > 0;
198
+ break;
199
+ case "async":
200
+ count = asyncCount;
201
+ shouldShow = count > 0;
202
+ break;
203
+ case "secure":
204
+ count = secureCount;
205
+ shouldShow = count > 0;
206
+ break;
207
+ }
208
+ if (!shouldShow) return null;
209
+ const percentage = totalCount > 0 ? (count / totalCount * 100).toFixed(1) : "0";
210
+ const IconComponent = item.icon;
211
+ const storageColor = getStorageTypeHexColor(item.key);
212
+ return /*#__PURE__*/_jsx(View, {
213
+ style: styles.breakdownItem,
214
+ children: /*#__PURE__*/_jsxs(View, {
215
+ style: styles.breakdownItemRow,
216
+ children: [/*#__PURE__*/_jsxs(View, {
217
+ style: styles.breakdownItemLeft,
218
+ children: [/*#__PURE__*/_jsx(View, {
219
+ style: [styles.breakdownIcon, {
220
+ backgroundColor: `${storageColor}15`
221
+ }],
222
+ children: /*#__PURE__*/_jsx(IconComponent, {
223
+ size: 14,
224
+ color: storageColor
225
+ })
226
+ }), /*#__PURE__*/_jsxs(View, {
227
+ style: styles.breakdownItemInfo,
228
+ children: [/*#__PURE__*/_jsx(Text, {
229
+ style: styles.breakdownItemLabel,
230
+ children: item.label
231
+ }), /*#__PURE__*/_jsx(Text, {
232
+ style: styles.breakdownItemDesc,
233
+ children: item.description
234
+ })]
235
+ })]
236
+ }), /*#__PURE__*/_jsxs(View, {
237
+ style: styles.breakdownItemRight,
238
+ children: [/*#__PURE__*/_jsx(Text, {
239
+ style: [styles.breakdownCount, {
240
+ color: storageColor
241
+ }],
242
+ children: count
243
+ }), /*#__PURE__*/_jsxs(Text, {
244
+ style: styles.breakdownPercentage,
245
+ children: [percentage, "%"]
246
+ })]
247
+ })]
248
+ })
249
+ }, item.key);
250
+ })
251
+ })]
252
+ })]
253
+ });
254
+ }
255
+ const styles = StyleSheet.create({
256
+ statsContainer: {
257
+ marginBottom: 24,
258
+ backgroundColor: "rgba(255, 255, 255, 0.03)",
259
+ borderRadius: 8,
260
+ padding: 16,
261
+ borderWidth: 1,
262
+ borderColor: "rgba(255, 255, 255, 0.08)"
263
+ },
264
+ // Section titles
265
+ sectionTitle: {
266
+ color: "#9CA3AF",
267
+ fontSize: 12,
268
+ fontWeight: "500",
269
+ marginBottom: 16,
270
+ textTransform: "uppercase",
271
+ letterSpacing: 0.5
272
+ },
273
+ // Breakdown section
274
+ breakdownSection: {
275
+ gap: 12,
276
+ marginBottom: 20
277
+ },
278
+ breakdownList: {
279
+ gap: 12
280
+ },
281
+ breakdownItem: {
282
+ backgroundColor: "rgba(255, 255, 255, 0.02)",
283
+ padding: 12,
284
+ borderRadius: 8,
285
+ borderWidth: 1,
286
+ borderColor: "rgba(255, 255, 255, 0.05)"
287
+ },
288
+ breakdownItemRow: {
289
+ flexDirection: "row",
290
+ alignItems: "center",
291
+ justifyContent: "space-between"
292
+ },
293
+ breakdownItemLeft: {
294
+ flexDirection: "row",
295
+ alignItems: "center",
296
+ gap: 12,
297
+ flex: 1,
298
+ minWidth: 0
299
+ },
300
+ breakdownIcon: {
301
+ padding: 8,
302
+ borderRadius: 8
303
+ },
304
+ breakdownItemInfo: {
305
+ flex: 1,
306
+ minWidth: 0
307
+ },
308
+ breakdownItemLabel: {
309
+ color: "#FFFFFF",
310
+ fontSize: 14,
311
+ fontWeight: "500"
312
+ },
313
+ breakdownItemDesc: {
314
+ color: "#9CA3AF",
315
+ fontSize: 12
316
+ },
317
+ breakdownItemRight: {
318
+ alignItems: "flex-end"
319
+ },
320
+ breakdownCount: {
321
+ fontSize: 16,
322
+ fontWeight: "600"
323
+ },
324
+ breakdownPercentage: {
325
+ color: "#6B7280",
326
+ fontSize: 10
327
+ },
328
+ // Empty state
329
+ emptyState: {
330
+ padding: 16,
331
+ backgroundColor: "rgba(255, 255, 255, 0.02)",
332
+ borderRadius: 6,
333
+ alignItems: "center"
334
+ },
335
+ emptyStateText: {
336
+ color: "#6B7280",
337
+ fontSize: 11,
338
+ textAlign: "center"
339
+ }
340
+ });