@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,345 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StorageFilterCards = StorageFilterCards;
7
+ var _reactNative = require("react-native");
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _mmkvAvailability = require("../utils/mmkvAvailability");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ // Feature flags - set to true when implemented
12
+ const IS_MMKV_IMPLEMENTED = true; // ✅ MMKV support is now implemented
13
+ const IS_SECURE_STORE_IMPLEMENTED = false;
14
+
15
+ // Runtime availability checks
16
+ const IS_MMKV_AVAILABLE = (0, _mmkvAvailability.isMMKVAvailable)();
17
+ function StorageFilterCards({
18
+ stats,
19
+ tabStats,
20
+ healthPercentage,
21
+ healthStatus,
22
+ healthColor,
23
+ activeFilter = "all",
24
+ onFilterChange,
25
+ activeStorageType = "all",
26
+ onStorageTypeChange
27
+ }) {
28
+ // Use tabStats if provided (for filtered counts), otherwise fall back to stats
29
+ const displayStats = tabStats || {
30
+ validCount: stats.presentRequiredCount + stats.optionalCount,
31
+ missingCount: stats.missingCount,
32
+ issuesCount: stats.wrongValueCount + stats.wrongTypeCount,
33
+ asyncCount: stats.asyncCount || 0,
34
+ mmkvCount: stats.mmkvCount || 0,
35
+ secureCount: stats.secureCount || 0,
36
+ totalCount: stats.totalCount
37
+ };
38
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
39
+ style: styles.container,
40
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
41
+ style: styles.filtersRow,
42
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
43
+ style: [styles.filterChip, activeFilter === "all" && [styles.filterChipActive, {
44
+ backgroundColor: _sharedUi.macOSColors.background.hover,
45
+ borderColor: _sharedUi.macOSColors.border.hover,
46
+ shadowColor: _sharedUi.macOSColors.text.primary
47
+ }]],
48
+ onPress: () => onFilterChange?.("all"),
49
+ activeOpacity: 0.8,
50
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
51
+ style: [styles.filterValue, {
52
+ color: _sharedUi.macOSColors.text.primary
53
+ }],
54
+ children: displayStats.validCount
55
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
56
+ style: styles.filterLabel,
57
+ children: "Valid"
58
+ })]
59
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
60
+ style: [styles.filterChip, activeFilter === "missing" && [styles.filterChipActive, {
61
+ backgroundColor: _sharedUi.macOSColors.semantic.error + "10",
62
+ borderColor: _sharedUi.macOSColors.semantic.error + "30",
63
+ shadowColor: _sharedUi.macOSColors.semantic.error
64
+ }]],
65
+ onPress: () => onFilterChange?.("missing"),
66
+ activeOpacity: 0.8,
67
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
68
+ style: [styles.filterValue, {
69
+ color: displayStats.missingCount > 0 ? _sharedUi.macOSColors.semantic.error : _sharedUi.macOSColors.text.muted
70
+ }],
71
+ children: displayStats.missingCount
72
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
73
+ style: styles.filterLabel,
74
+ children: "Missing"
75
+ })]
76
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
77
+ style: [styles.filterChip, activeFilter === "issues" && [styles.filterChipActive, {
78
+ backgroundColor: _sharedUi.macOSColors.semantic.warning + "10",
79
+ borderColor: _sharedUi.macOSColors.semantic.warning + "30",
80
+ shadowColor: _sharedUi.macOSColors.semantic.warning
81
+ }]],
82
+ onPress: () => onFilterChange?.("issues"),
83
+ activeOpacity: 0.8,
84
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
85
+ style: [styles.filterValue, {
86
+ color: displayStats.issuesCount > 0 ? _sharedUi.macOSColors.semantic.warning : _sharedUi.macOSColors.text.muted
87
+ }],
88
+ children: displayStats.issuesCount
89
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
90
+ style: styles.filterLabel,
91
+ children: "Issues"
92
+ })]
93
+ })]
94
+ }), onStorageTypeChange && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
95
+ style: styles.typesRow,
96
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
97
+ style: [styles.typePill, {
98
+ borderColor: _sharedUi.macOSColors.border.default
99
+ }, activeStorageType === "all" && [styles.typePillActive, {
100
+ backgroundColor: _sharedUi.macOSColors.background.hover,
101
+ borderColor: _sharedUi.macOSColors.border.hover
102
+ }]],
103
+ onPress: () => onStorageTypeChange?.("all"),
104
+ activeOpacity: 0.8,
105
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
106
+ style: [styles.typePillLabel, activeStorageType === "all" && {
107
+ color: _sharedUi.macOSColors.text.primary,
108
+ fontWeight: "600"
109
+ }],
110
+ children: "All Types"
111
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
112
+ style: [styles.typePillValue, activeStorageType === "all" && {
113
+ color: _sharedUi.macOSColors.text.primary
114
+ }, activeStorageType !== "all" && {
115
+ color: _sharedUi.macOSColors.text.muted
116
+ }],
117
+ children: displayStats.totalCount
118
+ })]
119
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
120
+ style: [styles.typePill, {
121
+ borderColor: _sharedUi.macOSColors.border.default
122
+ }, activeStorageType === "async" && [styles.typePillActive, {
123
+ backgroundColor: _sharedUi.macOSColors.semantic.warning + "15",
124
+ borderColor: _sharedUi.macOSColors.semantic.warning + "40"
125
+ }]],
126
+ onPress: () => onStorageTypeChange?.("async"),
127
+ activeOpacity: 0.8,
128
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
129
+ style: [styles.typePillLabel, activeStorageType === "async" && {
130
+ color: _sharedUi.macOSColors.semantic.warning,
131
+ fontWeight: "600"
132
+ }],
133
+ children: "Async"
134
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
135
+ style: [styles.typePillValue, activeStorageType === "async" ? {
136
+ color: _sharedUi.macOSColors.semantic.warning
137
+ } : {
138
+ color: _sharedUi.macOSColors.text.muted
139
+ }],
140
+ children: displayStats.asyncCount
141
+ })]
142
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
143
+ style: [styles.typePill, {
144
+ borderColor: _sharedUi.macOSColors.border.default
145
+ }, activeStorageType === "mmkv" && [styles.typePillActive, {
146
+ backgroundColor: _sharedUi.macOSColors.semantic.info + "15",
147
+ borderColor: _sharedUi.macOSColors.semantic.info + "40"
148
+ }]],
149
+ onPress: () => onStorageTypeChange?.("mmkv"),
150
+ activeOpacity: 0.8,
151
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
152
+ style: [styles.typePillLabel, activeStorageType === "mmkv" && {
153
+ color: _sharedUi.macOSColors.semantic.info,
154
+ fontWeight: "600"
155
+ }],
156
+ children: "MMKV"
157
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
158
+ style: [styles.typePillValue, activeStorageType === "mmkv" ? {
159
+ color: _sharedUi.macOSColors.semantic.info
160
+ } : {
161
+ color: _sharedUi.macOSColors.text.muted
162
+ }],
163
+ children: displayStats.mmkvCount
164
+ })]
165
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
166
+ style: [styles.typePill, {
167
+ borderColor: _sharedUi.macOSColors.border.default
168
+ }, activeStorageType === "secure" && [styles.typePillActive, {
169
+ backgroundColor: _sharedUi.macOSColors.semantic.success + "15",
170
+ borderColor: _sharedUi.macOSColors.semantic.success + "40"
171
+ }]],
172
+ onPress: () => onStorageTypeChange?.("secure"),
173
+ activeOpacity: 0.8,
174
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
175
+ style: [styles.typePillLabel, activeStorageType === "secure" && {
176
+ color: _sharedUi.macOSColors.semantic.success,
177
+ fontWeight: "600"
178
+ }],
179
+ children: "Secure"
180
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
181
+ style: [styles.typePillValue, activeStorageType === "secure" ? {
182
+ color: _sharedUi.macOSColors.semantic.success
183
+ } : {
184
+ color: _sharedUi.macOSColors.text.muted
185
+ }],
186
+ children: "Coming Soon"
187
+ })]
188
+ })]
189
+ })]
190
+ });
191
+ }
192
+ const styles = _reactNative.StyleSheet.create({
193
+ container: {
194
+ backgroundColor: _sharedUi.macOSColors.background.card,
195
+ borderRadius: 12,
196
+ padding: 16,
197
+ borderWidth: 1,
198
+ borderColor: _sharedUi.macOSColors.border.default + "50",
199
+ gap: 14,
200
+ shadowColor: "#000000",
201
+ shadowOpacity: 0.03,
202
+ shadowRadius: 12,
203
+ shadowOffset: {
204
+ width: 0,
205
+ height: 2
206
+ }
207
+ },
208
+ topRow: {
209
+ flexDirection: "row",
210
+ alignItems: "center",
211
+ justifyContent: "space-between"
212
+ },
213
+ titleLeft: {
214
+ flexDirection: "row",
215
+ alignItems: "center",
216
+ gap: 8,
217
+ flexShrink: 1
218
+ },
219
+ healthDot: {
220
+ width: 6,
221
+ height: 6,
222
+ borderRadius: 3
223
+ },
224
+ titleText: {
225
+ fontSize: 12,
226
+ fontWeight: "600",
227
+ color: _sharedUi.macOSColors.text.primary,
228
+ letterSpacing: 0.5,
229
+ textTransform: "uppercase"
230
+ },
231
+ titleDivider: {
232
+ width: 4,
233
+ height: 1,
234
+ backgroundColor: _sharedUi.macOSColors.border.default + "60",
235
+ marginHorizontal: 4
236
+ },
237
+ subtitleText: {
238
+ color: _sharedUi.macOSColors.text.muted,
239
+ fontSize: 11
240
+ },
241
+ healthBadge: {
242
+ paddingHorizontal: 6,
243
+ paddingVertical: 2,
244
+ borderRadius: 6,
245
+ borderWidth: 1
246
+ },
247
+ healthBadgeText: {
248
+ fontSize: 10,
249
+ fontWeight: "600",
250
+ fontVariant: ["tabular-nums"]
251
+ },
252
+ // Health progress bar
253
+ healthProgressBar: {
254
+ height: 3,
255
+ borderRadius: 1.5,
256
+ backgroundColor: _sharedUi.macOSColors.background.input,
257
+ overflow: "hidden"
258
+ },
259
+ healthProgressFill: {
260
+ height: 3,
261
+ borderRadius: 1.5
262
+ },
263
+ // Status filters
264
+ filtersRow: {
265
+ flexDirection: "row",
266
+ gap: 10
267
+ },
268
+ filterChip: {
269
+ flex: 1,
270
+ backgroundColor: _sharedUi.macOSColors.background.input + "80",
271
+ borderRadius: 8,
272
+ borderWidth: 1,
273
+ borderColor: _sharedUi.macOSColors.border.default + "30",
274
+ paddingVertical: 10,
275
+ paddingHorizontal: 12,
276
+ alignItems: "center",
277
+ justifyContent: "center",
278
+ minHeight: 44
279
+ },
280
+ filterChipActive: {
281
+ borderWidth: 1,
282
+ shadowOffset: {
283
+ width: 0,
284
+ height: 0
285
+ },
286
+ shadowOpacity: 0.1,
287
+ shadowRadius: 6,
288
+ elevation: 2,
289
+ transform: [{
290
+ scale: 1.005
291
+ }]
292
+ },
293
+ filterLabel: {
294
+ fontSize: 9,
295
+ color: _sharedUi.macOSColors.text.muted,
296
+ textTransform: "uppercase",
297
+ letterSpacing: 0.5,
298
+ fontWeight: "500",
299
+ marginTop: 3
300
+ },
301
+ filterValue: {
302
+ fontSize: 18,
303
+ fontWeight: "600",
304
+ fontFamily: "monospace",
305
+ lineHeight: 20
306
+ },
307
+ // Storage type pills
308
+ typesRow: {
309
+ flexDirection: "row",
310
+ gap: 8,
311
+ marginTop: 2
312
+ },
313
+ typePill: {
314
+ flex: 1,
315
+ backgroundColor: _sharedUi.macOSColors.background.input + "80",
316
+ borderRadius: 8,
317
+ borderWidth: 1,
318
+ borderColor: _sharedUi.macOSColors.border.default + "30",
319
+ paddingVertical: 6,
320
+ paddingHorizontal: 8,
321
+ alignItems: "center",
322
+ justifyContent: "center",
323
+ minHeight: 32
324
+ },
325
+ typePillActive: {
326
+ borderWidth: 1,
327
+ transform: [{
328
+ scale: 1.005
329
+ }]
330
+ },
331
+ typePillLabel: {
332
+ fontSize: 9,
333
+ color: _sharedUi.macOSColors.text.secondary,
334
+ textTransform: "uppercase",
335
+ letterSpacing: 0.4,
336
+ fontWeight: "500",
337
+ marginBottom: 1
338
+ },
339
+ typePillValue: {
340
+ fontSize: 12,
341
+ fontWeight: "600",
342
+ fontFamily: "monospace",
343
+ lineHeight: 14
344
+ }
345
+ });
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StorageFilterViewV2 = StorageFilterViewV2;
7
+ var _sharedUi = require("@buoy-gg/shared-ui");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ function StorageFilterViewV2({
10
+ ignoredPatterns,
11
+ onTogglePattern,
12
+ onAddPattern,
13
+ availableKeys = []
14
+ }) {
15
+ const filterConfig = {
16
+ addFilterSection: {
17
+ enabled: true,
18
+ placeholder: "Enter key pattern to hide...",
19
+ title: "ACTIVE FILTERS",
20
+ icon: _sharedUi.Filter
21
+ },
22
+ availableItemsSection: {
23
+ enabled: true,
24
+ title: "AVAILABLE STORAGE KEYS",
25
+ emptyMessage: "No storage keys available. Keys will appear here once loaded.",
26
+ items: availableKeys
27
+ },
28
+ howItWorksSection: {
29
+ enabled: true,
30
+ title: "HOW STORAGE FILTERS WORK",
31
+ description: "Patterns hide matching storage keys from the list. Filters match if the storage key contains the provided text.",
32
+ examples: ["• react_buoy → hides keys containing react_buoy", "• @temp → hides @temp_user, @temp_data", "• redux → hides redux-persist:root", "• : → hides all keys with colons"],
33
+ icon: _sharedUi.Filter
34
+ },
35
+ onPatternToggle: onTogglePattern,
36
+ onPatternAdd: onAddPattern,
37
+ activePatterns: ignoredPatterns
38
+ };
39
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.DynamicFilterView, {
40
+ ...filterConfig
41
+ });
42
+ }