@buoy-gg/storage 7.0.40 → 7.0.42

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 (215) hide show
  1. package/README.md +11 -86
  2. package/lib/commonjs/index.js +1 -346
  3. package/lib/commonjs/preset.js +1 -80
  4. package/lib/commonjs/storage/components/DiffViewer/TreeDiffViewer.js +1 -36
  5. package/lib/commonjs/storage/components/DiffViewer/modes/ThemedSplitView.js +1 -12
  6. package/lib/commonjs/storage/components/DiffViewer/themes/diffThemes.js +1 -24
  7. package/lib/commonjs/storage/components/GameUIStorageBrowser.js +3 -1258
  8. package/lib/commonjs/storage/components/MMKVInstanceInfoPanel.js +1 -257
  9. package/lib/commonjs/storage/components/MMKVInstanceSelector.js +1 -418
  10. package/lib/commonjs/storage/components/SelectionActionBar.js +1 -207
  11. package/lib/commonjs/storage/components/StorageActionButtons.js +1 -241
  12. package/lib/commonjs/storage/components/StorageBrowserMode.js +1 -61
  13. package/lib/commonjs/storage/components/StorageEventActionButton.js +1 -121
  14. package/lib/commonjs/storage/components/StorageEventCard.js +1 -117
  15. package/lib/commonjs/storage/components/StorageEventDetailContent.js +1 -494
  16. package/lib/commonjs/storage/components/StorageEventFilterView.js +1 -159
  17. package/lib/commonjs/storage/components/StorageEventsSection.js +1 -24
  18. package/lib/commonjs/storage/components/StorageFilterCards.js +1 -231
  19. package/lib/commonjs/storage/components/StorageKeyCard.js +1 -520
  20. package/lib/commonjs/storage/components/StorageKeyDetailScreen.js +1 -579
  21. package/lib/commonjs/storage/components/StorageKeyRow.js +1 -559
  22. package/lib/commonjs/storage/components/StorageKeySection.js +1 -160
  23. package/lib/commonjs/storage/components/StorageKeyStats.js +1 -344
  24. package/lib/commonjs/storage/components/StorageModalWithTabs.js +1 -954
  25. package/lib/commonjs/storage/components/StorageSaveNotice.js +1 -171
  26. package/lib/commonjs/storage/components/StorageSection.js +1 -43
  27. package/lib/commonjs/storage/components/StorageTypeFilterBar.js +1 -143
  28. package/lib/commonjs/storage/hooks/useAsyncStorageKeys.js +1 -141
  29. package/lib/commonjs/storage/hooks/useMMKVInstances.js +1 -210
  30. package/lib/commonjs/storage/hooks/useMMKVKeys.js +1 -376
  31. package/lib/commonjs/storage/hooks/useSecureStoreKeys.js +1 -159
  32. package/lib/commonjs/storage/hooks/useStorageEvents.js +1 -61
  33. package/lib/commonjs/storage/stores/storageEventStore.js +1 -312
  34. package/lib/commonjs/storage/sync/storageSyncAdapter.js +1 -478
  35. package/lib/commonjs/storage/types.js +1 -5
  36. package/lib/commonjs/storage/utils/AsyncStorageListener.js +1 -691
  37. package/lib/commonjs/storage/utils/AsyncStorageListener.web.js +1 -0
  38. package/lib/commonjs/storage/utils/MMKVInstanceRegistry.js +1 -203
  39. package/lib/commonjs/storage/utils/MMKVListener.js +1 -416
  40. package/lib/commonjs/storage/utils/SecureStoreRegistry.js +1 -200
  41. package/lib/commonjs/storage/utils/asyncStorageCompat.js +1 -89
  42. package/lib/commonjs/storage/utils/browserStorageLifecycle.js +1 -0
  43. package/lib/commonjs/storage/utils/browserStorageLifecycle.web.js +1 -0
  44. package/lib/commonjs/storage/utils/clearAllStorage.js +1 -48
  45. package/lib/commonjs/storage/utils/deleteStorageKeys.js +1 -82
  46. package/lib/commonjs/storage/utils/lineDiff.js +1 -30
  47. package/lib/commonjs/storage/utils/mmkvAvailability.js +1 -62
  48. package/lib/commonjs/storage/utils/mmkvAvailability.web.js +1 -0
  49. package/lib/commonjs/storage/utils/mmkvTypeDetection.js +1 -154
  50. package/lib/commonjs/storage/utils/requiredStorageKeyScope.js +1 -17
  51. package/lib/commonjs/storage/utils/setStorageValue.js +1 -218
  52. package/lib/commonjs/storage/utils/snapshotProvider.js +1 -382
  53. package/lib/commonjs/storage/utils/storageActionHelpers.js +1 -46
  54. package/lib/commonjs/storage/utils/storageBrowserRefresh.js +1 -49
  55. package/lib/commonjs/storage/utils/storageLabels.js +1 -0
  56. package/lib/commonjs/storage/utils/storageLabels.web.js +1 -0
  57. package/lib/commonjs/storage/utils/storageOps.js +1 -53
  58. package/lib/commonjs/storage/utils/storageQueryUtils.js +1 -35
  59. package/lib/commonjs/storage/utils/storageTimeTravelUtils.js +1 -288
  60. package/lib/commonjs/storage/utils/valueType.js +1 -83
  61. package/lib/module/index.js +1 -112
  62. package/lib/module/preset.js +1 -76
  63. package/lib/module/storage/components/DiffViewer/TreeDiffViewer.js +1 -32
  64. package/lib/module/storage/components/DiffViewer/modes/ThemedSplitView.js +1 -9
  65. package/lib/module/storage/components/DiffViewer/themes/diffThemes.js +1 -10
  66. package/lib/module/storage/components/GameUIStorageBrowser.js +3 -1256
  67. package/lib/module/storage/components/MMKVInstanceInfoPanel.js +1 -253
  68. package/lib/module/storage/components/MMKVInstanceSelector.js +1 -414
  69. package/lib/module/storage/components/SelectionActionBar.js +1 -204
  70. package/lib/module/storage/components/StorageActionButtons.js +1 -237
  71. package/lib/module/storage/components/StorageBrowserMode.js +1 -57
  72. package/lib/module/storage/components/StorageEventActionButton.js +1 -118
  73. package/lib/module/storage/components/StorageEventCard.js +1 -112
  74. package/lib/module/storage/components/StorageEventDetailContent.js +1 -490
  75. package/lib/module/storage/components/StorageEventFilterView.js +1 -155
  76. package/lib/module/storage/components/StorageEventsSection.js +1 -20
  77. package/lib/module/storage/components/StorageFilterCards.js +1 -227
  78. package/lib/module/storage/components/StorageKeyCard.js +1 -517
  79. package/lib/module/storage/components/StorageKeyDetailScreen.js +1 -577
  80. package/lib/module/storage/components/StorageKeyRow.js +1 -554
  81. package/lib/module/storage/components/StorageKeySection.js +1 -155
  82. package/lib/module/storage/components/StorageKeyStats.js +1 -341
  83. package/lib/module/storage/components/StorageModalWithTabs.js +1 -949
  84. package/lib/module/storage/components/StorageSaveNotice.js +1 -168
  85. package/lib/module/storage/components/StorageSection.js +1 -40
  86. package/lib/module/storage/components/StorageTypeFilterBar.js +1 -138
  87. package/lib/module/storage/hooks/useAsyncStorageKeys.js +1 -136
  88. package/lib/module/storage/hooks/useMMKVInstances.js +1 -204
  89. package/lib/module/storage/hooks/useMMKVKeys.js +1 -371
  90. package/lib/module/storage/hooks/useSecureStoreKeys.js +1 -156
  91. package/lib/module/storage/hooks/useStorageEvents.js +1 -58
  92. package/lib/module/storage/stores/storageEventStore.js +1 -301
  93. package/lib/module/storage/sync/storageSyncAdapter.js +1 -474
  94. package/lib/module/storage/types.js +1 -3
  95. package/lib/module/storage/utils/AsyncStorageListener.js +1 -679
  96. package/lib/module/storage/utils/AsyncStorageListener.web.js +1 -0
  97. package/lib/module/storage/utils/MMKVInstanceRegistry.js +1 -197
  98. package/lib/module/storage/utils/MMKVListener.js +1 -403
  99. package/lib/module/storage/utils/SecureStoreRegistry.js +1 -194
  100. package/lib/module/storage/utils/asyncStorageCompat.js +1 -81
  101. package/lib/module/storage/utils/browserStorageLifecycle.js +1 -0
  102. package/lib/module/storage/utils/browserStorageLifecycle.web.js +1 -0
  103. package/lib/module/storage/utils/clearAllStorage.js +1 -43
  104. package/lib/module/storage/utils/deleteStorageKeys.js +1 -78
  105. package/lib/module/storage/utils/lineDiff.js +1 -12
  106. package/lib/module/storage/utils/mmkvAvailability.js +1 -56
  107. package/lib/module/storage/utils/mmkvAvailability.web.js +1 -0
  108. package/lib/module/storage/utils/mmkvTypeDetection.js +1 -148
  109. package/lib/module/storage/utils/requiredStorageKeyScope.js +1 -13
  110. package/lib/module/storage/utils/setStorageValue.js +1 -209
  111. package/lib/module/storage/utils/snapshotProvider.js +1 -380
  112. package/lib/module/storage/utils/storageActionHelpers.js +1 -42
  113. package/lib/module/storage/utils/storageBrowserRefresh.js +1 -44
  114. package/lib/module/storage/utils/storageLabels.js +1 -0
  115. package/lib/module/storage/utils/storageLabels.web.js +1 -0
  116. package/lib/module/storage/utils/storageOps.js +1 -46
  117. package/lib/module/storage/utils/storageQueryUtils.js +1 -30
  118. package/lib/module/storage/utils/storageTimeTravelUtils.js +1 -281
  119. package/lib/module/storage/utils/valueType.js +1 -76
  120. package/lib/typescript/index.d.ts +1 -0
  121. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts +0 -8
  122. package/lib/typescript/storage/components/StorageEventCard.d.ts +0 -7
  123. package/lib/typescript/storage/components/StorageKeyRow.d.ts +2 -6
  124. package/lib/typescript/storage/components/StorageTypeFilterBar.d.ts +0 -15
  125. package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts +2 -2
  126. package/lib/typescript/storage/sync/storageSyncAdapter.d.ts +7 -13
  127. package/lib/typescript/storage/utils/AsyncStorageListener.web.d.ts +24 -0
  128. package/lib/typescript/storage/utils/browserStorageLifecycle.d.ts +3 -0
  129. package/lib/typescript/storage/utils/browserStorageLifecycle.web.d.ts +2 -0
  130. package/lib/typescript/storage/utils/mmkvAvailability.web.d.ts +4 -0
  131. package/lib/typescript/storage/utils/storageLabels.d.ts +8 -0
  132. package/lib/typescript/storage/utils/storageLabels.web.d.ts +8 -0
  133. package/lib/web/index.mjs +4 -0
  134. package/package.json +40 -14
  135. package/lib/commonjs/storage/components/DiffViewer/DiffOptionsPanel.js +0 -356
  136. package/lib/commonjs/storage/components/DiffViewer/components/DiffSummary.js +0 -122
  137. package/lib/commonjs/storage/components/StorageKeyEditorScreen.js +0 -414
  138. package/lib/commonjs/storage/components/StorageScalarKeyEditor.js +0 -61
  139. package/lib/commonjs/storage/components/StorageValueEditModal.js +0 -24
  140. package/lib/commonjs/storage/hooks/useKeyEditor.js +0 -31
  141. package/lib/commonjs/storage/hooks/useTreeDraft.js +0 -25
  142. package/lib/module/storage/components/DiffViewer/DiffOptionsPanel.js +0 -352
  143. package/lib/module/storage/components/DiffViewer/components/DiffSummary.js +0 -118
  144. package/lib/module/storage/components/StorageKeyEditorScreen.js +0 -410
  145. package/lib/module/storage/components/StorageScalarKeyEditor.js +0 -57
  146. package/lib/module/storage/components/StorageValueEditModal.js +0 -20
  147. package/lib/module/storage/hooks/useKeyEditor.js +0 -27
  148. package/lib/module/storage/hooks/useTreeDraft.js +0 -21
  149. package/lib/typescript/index.d.ts.map +0 -1
  150. package/lib/typescript/preset.d.ts.map +0 -1
  151. package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts +0 -18
  152. package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts.map +0 -1
  153. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts.map +0 -1
  154. package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts +0 -12
  155. package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts.map +0 -1
  156. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts.map +0 -1
  157. package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts.map +0 -1
  158. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +0 -1
  159. package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts.map +0 -1
  160. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts.map +0 -1
  161. package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +0 -1
  162. package/lib/typescript/storage/components/StorageActionButtons.d.ts.map +0 -1
  163. package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +0 -1
  164. package/lib/typescript/storage/components/StorageEventActionButton.d.ts.map +0 -1
  165. package/lib/typescript/storage/components/StorageEventCard.d.ts.map +0 -1
  166. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts.map +0 -1
  167. package/lib/typescript/storage/components/StorageEventFilterView.d.ts.map +0 -1
  168. package/lib/typescript/storage/components/StorageEventsSection.d.ts.map +0 -1
  169. package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +0 -1
  170. package/lib/typescript/storage/components/StorageKeyCard.d.ts.map +0 -1
  171. package/lib/typescript/storage/components/StorageKeyDetailScreen.d.ts.map +0 -1
  172. package/lib/typescript/storage/components/StorageKeyEditorScreen.d.ts +0 -42
  173. package/lib/typescript/storage/components/StorageKeyEditorScreen.d.ts.map +0 -1
  174. package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +0 -1
  175. package/lib/typescript/storage/components/StorageKeySection.d.ts.map +0 -1
  176. package/lib/typescript/storage/components/StorageKeyStats.d.ts.map +0 -1
  177. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +0 -1
  178. package/lib/typescript/storage/components/StorageSaveNotice.d.ts.map +0 -1
  179. package/lib/typescript/storage/components/StorageScalarKeyEditor.d.ts +0 -24
  180. package/lib/typescript/storage/components/StorageScalarKeyEditor.d.ts.map +0 -1
  181. package/lib/typescript/storage/components/StorageSection.d.ts.map +0 -1
  182. package/lib/typescript/storage/components/StorageTypeFilterBar.d.ts.map +0 -1
  183. package/lib/typescript/storage/components/StorageValueEditModal.d.ts +0 -14
  184. package/lib/typescript/storage/components/StorageValueEditModal.d.ts.map +0 -1
  185. package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts.map +0 -1
  186. package/lib/typescript/storage/hooks/useKeyEditor.d.ts +0 -27
  187. package/lib/typescript/storage/hooks/useKeyEditor.d.ts.map +0 -1
  188. package/lib/typescript/storage/hooks/useMMKVInstances.d.ts.map +0 -1
  189. package/lib/typescript/storage/hooks/useMMKVKeys.d.ts.map +0 -1
  190. package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts.map +0 -1
  191. package/lib/typescript/storage/hooks/useStorageEvents.d.ts.map +0 -1
  192. package/lib/typescript/storage/hooks/useTreeDraft.d.ts +0 -16
  193. package/lib/typescript/storage/hooks/useTreeDraft.d.ts.map +0 -1
  194. package/lib/typescript/storage/stores/storageEventStore.d.ts.map +0 -1
  195. package/lib/typescript/storage/sync/storageSyncAdapter.d.ts.map +0 -1
  196. package/lib/typescript/storage/types.d.ts.map +0 -1
  197. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +0 -1
  198. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts.map +0 -1
  199. package/lib/typescript/storage/utils/MMKVListener.d.ts.map +0 -1
  200. package/lib/typescript/storage/utils/SecureStoreRegistry.d.ts.map +0 -1
  201. package/lib/typescript/storage/utils/asyncStorageCompat.d.ts.map +0 -1
  202. package/lib/typescript/storage/utils/clearAllStorage.d.ts.map +0 -1
  203. package/lib/typescript/storage/utils/deleteStorageKeys.d.ts.map +0 -1
  204. package/lib/typescript/storage/utils/lineDiff.d.ts.map +0 -1
  205. package/lib/typescript/storage/utils/mmkvAvailability.d.ts.map +0 -1
  206. package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts.map +0 -1
  207. package/lib/typescript/storage/utils/requiredStorageKeyScope.d.ts.map +0 -1
  208. package/lib/typescript/storage/utils/setStorageValue.d.ts.map +0 -1
  209. package/lib/typescript/storage/utils/snapshotProvider.d.ts.map +0 -1
  210. package/lib/typescript/storage/utils/storageActionHelpers.d.ts.map +0 -1
  211. package/lib/typescript/storage/utils/storageBrowserRefresh.d.ts.map +0 -1
  212. package/lib/typescript/storage/utils/storageOps.d.ts.map +0 -1
  213. package/lib/typescript/storage/utils/storageQueryUtils.d.ts.map +0 -1
  214. package/lib/typescript/storage/utils/storageTimeTravelUtils.d.ts.map +0 -1
  215. package/lib/typescript/storage/utils/valueType.d.ts.map +0 -1
@@ -1,155 +1 @@
1
- "use strict";
2
-
3
- import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
4
- import { Filter, DynamicFilterView, Database, HardDrive, Shield, macOSColors, night } from "@buoy-gg/shared-ui";
5
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
- export function StorageEventFilterView({
7
- ignoredPatterns,
8
- onTogglePattern,
9
- onAddPattern,
10
- availableKeys = [],
11
- enabledStorageTypes,
12
- onToggleStorageType
13
- }) {
14
- const filterConfig = {
15
- addFilterSection: {
16
- enabled: true,
17
- placeholder: "Enter key pattern to hide...",
18
- title: "KEY FILTERS",
19
- icon: Filter
20
- },
21
- availableItemsSection: {
22
- enabled: true,
23
- title: "AVAILABLE EVENT KEYS",
24
- emptyMessage: "No storage event keys available. Events will appear here once captured.",
25
- items: availableKeys
26
- },
27
- howItWorksSection: {
28
- enabled: true,
29
- title: "HOW EVENT FILTERS WORK",
30
- description: "Patterns hide matching storage keys from the event list. Storage type toggles control which storage backends are monitored.",
31
- examples: ["• react_buoy → hides keys containing react_buoy", "• @temp → hides @temp_user, @temp_data", "• redux → hides redux-persist:root", "• AsyncStorage → show/hide AsyncStorage events", "• MMKV → show/hide MMKV events"],
32
- icon: Filter
33
- },
34
- onPatternToggle: onTogglePattern,
35
- onPatternAdd: onAddPattern,
36
- activePatterns: ignoredPatterns
37
- };
38
- return /*#__PURE__*/_jsxs(View, {
39
- style: styles.container,
40
- children: [/*#__PURE__*/_jsxs(View, {
41
- style: styles.storageTypeSection,
42
- children: [/*#__PURE__*/_jsx(Text, {
43
- style: styles.sectionTitle,
44
- children: "STORAGE TYPES"
45
- }), /*#__PURE__*/_jsxs(View, {
46
- style: styles.storageTypeButtons,
47
- children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
48
- style: [styles.storageTypeButton, enabledStorageTypes.has('async') && styles.storageTypeButtonActive, {
49
- borderColor: macOSColors.semantic.warning + '40'
50
- }],
51
- onPress: () => onToggleStorageType('async'),
52
- testID: "buoy-storage-backend-async",
53
- accessibilityRole: "button",
54
- accessibilityLabel: "Toggle AsyncStorage capture",
55
- accessibilityState: {
56
- selected: enabledStorageTypes.has('async')
57
- },
58
- children: [/*#__PURE__*/_jsx(Database, {
59
- size: 16,
60
- color: enabledStorageTypes.has('async') ? macOSColors.semantic.warning : night.color.textTertiary
61
- }), /*#__PURE__*/_jsx(Text, {
62
- style: [styles.storageTypeButtonText, enabledStorageTypes.has('async') && {
63
- color: macOSColors.semantic.warning
64
- }],
65
- children: "AsyncStorage"
66
- })]
67
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
68
- style: [styles.storageTypeButton, enabledStorageTypes.has('mmkv') && styles.storageTypeButtonActive, {
69
- borderColor: macOSColors.semantic.info + '40'
70
- }],
71
- onPress: () => onToggleStorageType('mmkv'),
72
- testID: "buoy-storage-backend-mmkv",
73
- accessibilityRole: "button",
74
- accessibilityLabel: "Toggle MMKV capture",
75
- accessibilityState: {
76
- selected: enabledStorageTypes.has('mmkv')
77
- },
78
- children: [/*#__PURE__*/_jsx(HardDrive, {
79
- size: 16,
80
- color: enabledStorageTypes.has('mmkv') ? macOSColors.semantic.info : night.color.textTertiary
81
- }), /*#__PURE__*/_jsx(Text, {
82
- style: [styles.storageTypeButtonText, enabledStorageTypes.has('mmkv') && {
83
- color: macOSColors.semantic.info
84
- }],
85
- children: "MMKV"
86
- })]
87
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
88
- style: [styles.storageTypeButton, enabledStorageTypes.has('secure') && styles.storageTypeButtonActive, {
89
- borderColor: macOSColors.semantic.success + '40'
90
- }],
91
- onPress: () => onToggleStorageType('secure'),
92
- testID: "buoy-storage-backend-secure",
93
- accessibilityRole: "button",
94
- accessibilityLabel: "Toggle Secure Storage capture",
95
- accessibilityState: {
96
- selected: enabledStorageTypes.has('secure')
97
- },
98
- children: [/*#__PURE__*/_jsx(Shield, {
99
- size: 16,
100
- color: enabledStorageTypes.has('secure') ? macOSColors.semantic.success : night.color.textTertiary
101
- }), /*#__PURE__*/_jsx(Text, {
102
- style: [styles.storageTypeButtonText, enabledStorageTypes.has('secure') && {
103
- color: macOSColors.semantic.success
104
- }],
105
- children: "Secure Storage"
106
- })]
107
- })]
108
- })]
109
- }), /*#__PURE__*/_jsx(DynamicFilterView, {
110
- ...filterConfig
111
- })]
112
- });
113
- }
114
- const styles = StyleSheet.create({
115
- container: {
116
- flex: 1
117
- },
118
- storageTypeSection: {
119
- padding: 16,
120
- borderBottomWidth: 1,
121
- borderBottomColor: night.color.border
122
- },
123
- sectionTitle: {
124
- fontSize: 11,
125
- fontWeight: '700',
126
- color: night.color.textSecondary,
127
- letterSpacing: 0.8,
128
- marginBottom: 12
129
- },
130
- storageTypeButtons: {
131
- flexDirection: 'row',
132
- gap: 8
133
- },
134
- storageTypeButton: {
135
- flex: 1,
136
- flexDirection: 'row',
137
- alignItems: 'center',
138
- justifyContent: 'center',
139
- gap: 6,
140
- paddingVertical: 10,
141
- paddingHorizontal: 12,
142
- backgroundColor: night.color.surfaceElevated,
143
- borderRadius: 8,
144
- borderWidth: 1,
145
- borderColor: night.color.border
146
- },
147
- storageTypeButtonActive: {
148
- backgroundColor: night.color.surface
149
- },
150
- storageTypeButtonText: {
151
- fontSize: 11,
152
- fontWeight: '600',
153
- color: night.color.textTertiary
154
- }
155
- });
1
+ "use strict";import{storageLabels as i}from"../utils/storageLabels";import{View as l,Text as a,StyleSheet as p,TouchableOpacity as u}from"react-native";import{Filter as d,DynamicFilterView as v,Database as T,HardDrive as f,Shield as x,macOSColors as o,night as r}from"@buoy-gg/shared-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";export function StorageEventFilterView({ignoredPatterns:m,onTogglePattern:y,onAddPattern:h,availableKeys:g=[],enabledStorageTypes:t,onToggleStorageType:n}){const b={addFilterSection:{enabled:true,placeholder:"Enter key pattern to hide...",title:"KEY FILTERS",icon:d},availableItemsSection:{enabled:true,title:"AVAILABLE EVENT KEYS",emptyMessage:"No storage event keys available. Events will appear here once captured.",items:g},howItWorksSection:{enabled:true,title:"HOW EVENT FILTERS WORK",description:"Patterns hide matching storage keys from the event list. Storage type toggles control which storage backends are monitored.",examples:["\u2022 react_buoy \u2192 hides keys containing react_buoy","\u2022 @temp \u2192 hides @temp_user, @temp_data","\u2022 redux \u2192 hides redux-persist:root",`\u2022 ${i.asyncFull}: show or hide captured events`,`\u2022 ${i.mmkv}: show or hide captured events`],icon:d},onPatternToggle:y,onPatternAdd:h,activePatterns:m};return c(l,{style:e.container,children:[c(l,{style:e.storageTypeSection,children:[s(a,{style:e.sectionTitle,children:"STORAGE TYPES"}),c(l,{style:e.storageTypeButtons,children:[c(u,{style:[e.storageTypeButton,t.has("async")&&e.storageTypeButtonActive,{borderColor:o.semantic.warning+"40"}],onPress:()=>n("async"),testID:"buoy-storage-backend-async",accessibilityRole:"button",accessibilityLabel:`Toggle ${i.asyncFull} capture`,accessibilityState:{selected:t.has("async")},children:[s(T,{size:16,color:t.has("async")?o.semantic.warning:r.color.textTertiary}),s(a,{style:[e.storageTypeButtonText,t.has("async")&&{color:o.semantic.warning}],children:i.asyncFull})]}),c(u,{style:[e.storageTypeButton,t.has("mmkv")&&e.storageTypeButtonActive,{borderColor:o.semantic.info+"40"}],onPress:()=>n("mmkv"),testID:"buoy-storage-backend-mmkv",accessibilityRole:"button",accessibilityLabel:`Toggle ${i.mmkv} capture`,accessibilityState:{selected:t.has("mmkv")},children:[s(f,{size:16,color:t.has("mmkv")?o.semantic.info:r.color.textTertiary}),s(a,{style:[e.storageTypeButtonText,t.has("mmkv")&&{color:o.semantic.info}],children:i.mmkv})]}),i.hasSecure&&c(u,{style:[e.storageTypeButton,t.has("secure")&&e.storageTypeButtonActive,{borderColor:o.semantic.success+"40"}],onPress:()=>n("secure"),testID:"buoy-storage-backend-secure",accessibilityRole:"button",accessibilityLabel:"Toggle Secure Storage capture",accessibilityState:{selected:t.has("secure")},children:[s(x,{size:16,color:t.has("secure")?o.semantic.success:r.color.textTertiary}),s(a,{style:[e.storageTypeButtonText,t.has("secure")&&{color:o.semantic.success}],children:"Secure Storage"})]})]})]}),s(v,{...b})]})}const e=p.create({container:{flex:1},storageTypeSection:{padding:16,borderBottomWidth:1,borderBottomColor:r.color.border},sectionTitle:{fontSize:11,fontWeight:"700",color:r.color.textSecondary,letterSpacing:.8,marginBottom:12},storageTypeButtons:{flexDirection:"row",gap:8},storageTypeButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:10,paddingHorizontal:12,backgroundColor:r.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:r.color.border},storageTypeButtonActive:{backgroundColor:r.color.surface},storageTypeButtonText:{fontSize:11,fontWeight:"600",color:r.color.textTertiary}});
@@ -1,20 +1 @@
1
- "use strict";
2
-
3
- import { Database, CyberpunkSectionButton } from "@buoy-gg/shared-ui";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- export function StorageEventsSection({
6
- onPress,
7
- eventCount = 0
8
- }) {
9
- const subtitle = eventCount > 0 ? `${eventCount} events` : "Monitoring";
10
- return /*#__PURE__*/_jsx(CyberpunkSectionButton, {
11
- id: "storage-events",
12
- title: "EVENTS",
13
- subtitle: subtitle,
14
- icon: Database,
15
- iconColor: "#00E5FF",
16
- iconBackgroundColor: "rgba(0, 229, 255, 0.1)",
17
- onPress: onPress,
18
- index: 3
19
- });
20
- }
1
+ "use strict";import{Database as n,CyberpunkSectionButton as r}from"@buoy-gg/shared-ui";import{jsx as i}from"react/jsx-runtime";export function StorageEventsSection({onPress:o,eventCount:t=0}){const e=t>0?`${t} events`:"Monitoring";return i(r,{id:"storage-events",title:"EVENTS",subtitle:e,icon:n,iconColor:"#00E5FF",iconBackgroundColor:"rgba(0, 229, 255, 0.1)",onPress:o,index:3})}
@@ -1,227 +1 @@
1
- "use strict";
2
-
3
- import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
4
- import { StorageTypeFilterBar } from "./StorageTypeFilterBar";
5
- import { macOSColors, night, monoFont } from "@buoy-gg/shared-ui";
6
- import { isMMKVAvailable } from "../utils/mmkvAvailability";
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- // Feature flags - set to true when implemented
9
- const IS_MMKV_IMPLEMENTED = true; // ✅ MMKV support is now implemented
10
-
11
- // Runtime availability checks
12
- const IS_MMKV_AVAILABLE = isMMKVAvailable();
13
- export function StorageFilterCards({
14
- stats,
15
- tabStats,
16
- healthPercentage,
17
- healthStatus,
18
- healthColor,
19
- activeFilter = "all",
20
- onFilterChange,
21
- activeStorageType = "all",
22
- onStorageTypeChange,
23
- showStatus = true
24
- }) {
25
- // Use tabStats if provided (for filtered counts), otherwise fall back to stats
26
- const displayStats = tabStats || {
27
- validCount: stats.presentRequiredCount + stats.optionalCount,
28
- missingCount: stats.missingCount,
29
- issuesCount: stats.wrongValueCount + stats.wrongTypeCount,
30
- asyncCount: stats.asyncCount || 0,
31
- mmkvCount: stats.mmkvCount || 0,
32
- secureCount: stats.secureCount || 0,
33
- totalCount: stats.totalCount
34
- };
35
- return /*#__PURE__*/_jsxs(View, {
36
- style: styles.container,
37
- children: [showStatus ? /*#__PURE__*/_jsxs(View, {
38
- style: styles.filtersRow,
39
- children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
40
- style: [styles.filterChip, activeFilter === "all" && [styles.filterChipActive, {
41
- backgroundColor: night.color.accentSoft,
42
- borderColor: night.color.accentBorderStrong,
43
- shadowColor: night.color.accent
44
- }]],
45
- onPress: () => onFilterChange?.("all"),
46
- activeOpacity: 0.8,
47
- testID: "buoy-storage-status-all",
48
- accessibilityRole: "button",
49
- accessibilityLabel: "Valid keys",
50
- children: [/*#__PURE__*/_jsx(Text, {
51
- style: [styles.filterValue, {
52
- color: night.color.text
53
- }],
54
- children: displayStats.validCount
55
- }), /*#__PURE__*/_jsx(Text, {
56
- style: styles.filterLabel,
57
- children: "Valid"
58
- })]
59
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
60
- style: [styles.filterChip, activeFilter === "missing" && [styles.filterChipActive, {
61
- backgroundColor: macOSColors.semantic.error + "10",
62
- borderColor: macOSColors.semantic.error + "30",
63
- shadowColor: macOSColors.semantic.error
64
- }]],
65
- onPress: () => onFilterChange?.("missing"),
66
- activeOpacity: 0.8,
67
- testID: "buoy-storage-status-missing",
68
- accessibilityRole: "button",
69
- accessibilityLabel: "Missing keys",
70
- children: [/*#__PURE__*/_jsx(Text, {
71
- style: [styles.filterValue, {
72
- color: displayStats.missingCount > 0 ? macOSColors.semantic.error : night.color.textTertiary
73
- }],
74
- children: displayStats.missingCount
75
- }), /*#__PURE__*/_jsx(Text, {
76
- style: styles.filterLabel,
77
- children: "Missing"
78
- })]
79
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
80
- style: [styles.filterChip, activeFilter === "issues" && [styles.filterChipActive, {
81
- backgroundColor: macOSColors.semantic.warning + "10",
82
- borderColor: macOSColors.semantic.warning + "30",
83
- shadowColor: macOSColors.semantic.warning
84
- }]],
85
- onPress: () => onFilterChange?.("issues"),
86
- activeOpacity: 0.8,
87
- testID: "buoy-storage-status-issues",
88
- accessibilityRole: "button",
89
- accessibilityLabel: "Issues keys",
90
- children: [/*#__PURE__*/_jsx(Text, {
91
- style: [styles.filterValue, {
92
- color: displayStats.issuesCount > 0 ? macOSColors.semantic.warning : night.color.textTertiary
93
- }],
94
- children: displayStats.issuesCount
95
- }), /*#__PURE__*/_jsx(Text, {
96
- style: styles.filterLabel,
97
- children: "Issues"
98
- })]
99
- })]
100
- }) : null, onStorageTypeChange && /*#__PURE__*/_jsx(StorageTypeFilterBar, {
101
- active: activeStorageType,
102
- onChange: onStorageTypeChange,
103
- counts: {
104
- all: displayStats.totalCount,
105
- async: displayStats.asyncCount,
106
- mmkv: displayStats.mmkvCount,
107
- secure: displayStats.secureCount
108
- }
109
- })]
110
- });
111
- }
112
- const styles = StyleSheet.create({
113
- container: {
114
- backgroundColor: night.color.surface,
115
- borderRadius: 12,
116
- padding: 16,
117
- borderWidth: 1,
118
- borderColor: night.color.border,
119
- gap: 14,
120
- shadowColor: "#000000",
121
- shadowOpacity: 0.03,
122
- shadowRadius: 12,
123
- shadowOffset: {
124
- width: 0,
125
- height: 2
126
- }
127
- },
128
- topRow: {
129
- flexDirection: "row",
130
- alignItems: "center",
131
- justifyContent: "space-between"
132
- },
133
- titleLeft: {
134
- flexDirection: "row",
135
- alignItems: "center",
136
- gap: 8,
137
- flexShrink: 1
138
- },
139
- healthDot: {
140
- width: 6,
141
- height: 6,
142
- borderRadius: 3
143
- },
144
- titleText: {
145
- fontSize: 12,
146
- fontWeight: "600",
147
- color: night.color.text,
148
- letterSpacing: 0.5,
149
- textTransform: "uppercase"
150
- },
151
- titleDivider: {
152
- width: 4,
153
- height: 1,
154
- backgroundColor: night.color.border,
155
- marginHorizontal: 4
156
- },
157
- subtitleText: {
158
- color: night.color.textTertiary,
159
- fontSize: 11
160
- },
161
- healthBadge: {
162
- paddingHorizontal: 6,
163
- paddingVertical: 2,
164
- borderRadius: 6,
165
- borderWidth: 1
166
- },
167
- healthBadgeText: {
168
- fontSize: 10,
169
- fontWeight: "600",
170
- fontVariant: ["tabular-nums"]
171
- },
172
- // Health progress bar
173
- healthProgressBar: {
174
- height: 3,
175
- borderRadius: 1.5,
176
- backgroundColor: night.color.bg,
177
- overflow: "hidden"
178
- },
179
- healthProgressFill: {
180
- height: 3,
181
- borderRadius: 1.5
182
- },
183
- // Status filters
184
- filtersRow: {
185
- flexDirection: "row",
186
- gap: 10
187
- },
188
- filterChip: {
189
- flex: 1,
190
- backgroundColor: night.color.buttonSurface,
191
- borderRadius: 8,
192
- borderWidth: 1,
193
- borderColor: night.color.border,
194
- paddingVertical: 10,
195
- paddingHorizontal: 12,
196
- alignItems: "center",
197
- justifyContent: "center",
198
- minHeight: 44
199
- },
200
- filterChipActive: {
201
- borderWidth: 1,
202
- shadowOffset: {
203
- width: 0,
204
- height: 0
205
- },
206
- shadowOpacity: 0.1,
207
- shadowRadius: 6,
208
- elevation: 2,
209
- transform: [{
210
- scale: 1.005
211
- }]
212
- },
213
- filterLabel: {
214
- fontSize: 9,
215
- color: night.color.textTertiary,
216
- textTransform: "uppercase",
217
- letterSpacing: 0.5,
218
- fontWeight: "500",
219
- marginTop: 3
220
- },
221
- filterValue: {
222
- fontSize: 18,
223
- fontWeight: "600",
224
- fontFamily: monoFont,
225
- lineHeight: 20
226
- }
227
- });
1
+ "use strict";import{View as h,Text as s,StyleSheet as b,TouchableOpacity as u}from"react-native";import{StorageTypeFilterBar as m}from"./StorageTypeFilterBar";import{macOSColors as i,night as e,monoFont as y}from"@buoy-gg/shared-ui";import{isMMKVAvailable as p}from"../utils/mmkvAvailability";import{jsx as l,jsxs as n}from"react/jsx-runtime";const I=true;const L=p();export function StorageFilterCards({stats:o,tabStats:g,healthPercentage:w,healthStatus:x,healthColor:S,activeFilter:a="all",onFilterChange:c,activeStorageType:f="all",onStorageTypeChange:d,showStatus:C=true}){const r=g||{validCount:o.presentRequiredCount+o.optionalCount,missingCount:o.missingCount,issuesCount:o.wrongValueCount+o.wrongTypeCount,asyncCount:o.asyncCount||0,mmkvCount:o.mmkvCount||0,secureCount:o.secureCount||0,totalCount:o.totalCount};return n(h,{style:t.container,children:[C?n(h,{style:t.filtersRow,children:[n(u,{style:[t.filterChip,a==="all"&&[t.filterChipActive,{backgroundColor:e.color.accentSoft,borderColor:e.color.accentBorderStrong,shadowColor:e.color.accent}]],onPress:()=>c?.("all"),activeOpacity:.8,testID:"buoy-storage-status-all",accessibilityRole:"button",accessibilityLabel:"Valid keys",children:[l(s,{style:[t.filterValue,{color:e.color.text}],children:r.validCount}),l(s,{style:t.filterLabel,children:"Valid"})]}),n(u,{style:[t.filterChip,a==="missing"&&[t.filterChipActive,{backgroundColor:i.semantic.error+"10",borderColor:i.semantic.error+"30",shadowColor:i.semantic.error}]],onPress:()=>c?.("missing"),activeOpacity:.8,testID:"buoy-storage-status-missing",accessibilityRole:"button",accessibilityLabel:"Missing keys",children:[l(s,{style:[t.filterValue,{color:r.missingCount>0?i.semantic.error:e.color.textTertiary}],children:r.missingCount}),l(s,{style:t.filterLabel,children:"Missing"})]}),n(u,{style:[t.filterChip,a==="issues"&&[t.filterChipActive,{backgroundColor:i.semantic.warning+"10",borderColor:i.semantic.warning+"30",shadowColor:i.semantic.warning}]],onPress:()=>c?.("issues"),activeOpacity:.8,testID:"buoy-storage-status-issues",accessibilityRole:"button",accessibilityLabel:"Issues keys",children:[l(s,{style:[t.filterValue,{color:r.issuesCount>0?i.semantic.warning:e.color.textTertiary}],children:r.issuesCount}),l(s,{style:t.filterLabel,children:"Issues"})]})]}):null,d&&l(m,{active:f,onChange:d,counts:{all:r.totalCount,async:r.asyncCount,mmkv:r.mmkvCount,secure:r.secureCount}})]})}const t=b.create({container:{backgroundColor:e.color.surface,borderRadius:12,padding:16,borderWidth:1,borderColor:e.color.border,gap:14,shadowColor:"#000000",shadowOpacity:.03,shadowRadius:12,shadowOffset:{width:0,height:2}},topRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titleLeft:{flexDirection:"row",alignItems:"center",gap:8,flexShrink:1},healthDot:{width:6,height:6,borderRadius:3},titleText:{fontSize:12,fontWeight:"600",color:e.color.text,letterSpacing:.5,textTransform:"uppercase"},titleDivider:{width:4,height:1,backgroundColor:e.color.border,marginHorizontal:4},subtitleText:{color:e.color.textTertiary,fontSize:11},healthBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1},healthBadgeText:{fontSize:10,fontWeight:"600",fontVariant:["tabular-nums"]},healthProgressBar:{height:3,borderRadius:1.5,backgroundColor:e.color.bg,overflow:"hidden"},healthProgressFill:{height:3,borderRadius:1.5},filtersRow:{flexDirection:"row",gap:10},filterChip:{flex:1,backgroundColor:e.color.buttonSurface,borderRadius:8,borderWidth:1,borderColor:e.color.border,paddingVertical:10,paddingHorizontal:12,alignItems:"center",justifyContent:"center",minHeight:44},filterChipActive:{borderWidth:1,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,elevation:2,transform:[{scale:1.005}]},filterLabel:{fontSize:9,color:e.color.textTertiary,textTransform:"uppercase",letterSpacing:.5,fontWeight:"500",marginTop:3},filterValue:{fontSize:18,fontWeight:"600",fontFamily:y,lineHeight:20}});