@buoy-gg/storage 7.0.41 → 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 (180) hide show
  1. package/README.md +11 -90
  2. package/lib/commonjs/index.js +1 -353
  3. package/lib/commonjs/preset.js +1 -85
  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 -1259
  8. package/lib/commonjs/storage/components/MMKVInstanceInfoPanel.js +1 -257
  9. package/lib/commonjs/storage/components/MMKVInstanceSelector.js +1 -419
  10. package/lib/commonjs/storage/components/SelectionActionBar.js +1 -207
  11. package/lib/commonjs/storage/components/StorageActionButtons.js +1 -242
  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 -118
  15. package/lib/commonjs/storage/components/StorageEventDetailContent.js +1 -494
  16. package/lib/commonjs/storage/components/StorageEventFilterView.js +1 -160
  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 -345
  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 -144
  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 -202
  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 -492
  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 -89
  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 -10
  43. package/lib/commonjs/storage/utils/browserStorageLifecycle.web.js +1 -70
  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 -21
  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 -13
  56. package/lib/commonjs/storage/utils/storageLabels.web.js +1 -13
  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 -114
  62. package/lib/module/preset.js +1 -82
  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 -1257
  67. package/lib/module/storage/components/MMKVInstanceInfoPanel.js +1 -253
  68. package/lib/module/storage/components/MMKVInstanceSelector.js +1 -415
  69. package/lib/module/storage/components/SelectionActionBar.js +1 -204
  70. package/lib/module/storage/components/StorageActionButtons.js +1 -238
  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 -113
  74. package/lib/module/storage/components/StorageEventDetailContent.js +1 -490
  75. package/lib/module/storage/components/StorageEventFilterView.js +1 -156
  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 -342
  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 -139
  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 -199
  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 -486
  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 -76
  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 -6
  102. package/lib/module/storage/utils/browserStorageLifecycle.web.js +1 -66
  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 -15
  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 -9
  115. package/lib/module/storage/utils/storageLabels.web.js +1 -9
  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/web/index.mjs +2 -3
  121. package/package.json +5 -5
  122. package/lib/typescript/index.d.ts.map +0 -1
  123. package/lib/typescript/preset.d.ts.map +0 -1
  124. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts.map +0 -1
  125. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts.map +0 -1
  126. package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts.map +0 -1
  127. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +0 -1
  128. package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts.map +0 -1
  129. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts.map +0 -1
  130. package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +0 -1
  131. package/lib/typescript/storage/components/StorageActionButtons.d.ts.map +0 -1
  132. package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +0 -1
  133. package/lib/typescript/storage/components/StorageEventActionButton.d.ts.map +0 -1
  134. package/lib/typescript/storage/components/StorageEventCard.d.ts.map +0 -1
  135. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts.map +0 -1
  136. package/lib/typescript/storage/components/StorageEventFilterView.d.ts.map +0 -1
  137. package/lib/typescript/storage/components/StorageEventsSection.d.ts.map +0 -1
  138. package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +0 -1
  139. package/lib/typescript/storage/components/StorageKeyCard.d.ts.map +0 -1
  140. package/lib/typescript/storage/components/StorageKeyDetailScreen.d.ts.map +0 -1
  141. package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +0 -1
  142. package/lib/typescript/storage/components/StorageKeySection.d.ts.map +0 -1
  143. package/lib/typescript/storage/components/StorageKeyStats.d.ts.map +0 -1
  144. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +0 -1
  145. package/lib/typescript/storage/components/StorageSaveNotice.d.ts.map +0 -1
  146. package/lib/typescript/storage/components/StorageSection.d.ts.map +0 -1
  147. package/lib/typescript/storage/components/StorageTypeFilterBar.d.ts.map +0 -1
  148. package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts.map +0 -1
  149. package/lib/typescript/storage/hooks/useMMKVInstances.d.ts.map +0 -1
  150. package/lib/typescript/storage/hooks/useMMKVKeys.d.ts.map +0 -1
  151. package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts.map +0 -1
  152. package/lib/typescript/storage/hooks/useStorageEvents.d.ts.map +0 -1
  153. package/lib/typescript/storage/stores/storageEventStore.d.ts.map +0 -1
  154. package/lib/typescript/storage/sync/storageSyncAdapter.d.ts.map +0 -1
  155. package/lib/typescript/storage/types.d.ts.map +0 -1
  156. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +0 -1
  157. package/lib/typescript/storage/utils/AsyncStorageListener.web.d.ts.map +0 -1
  158. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts.map +0 -1
  159. package/lib/typescript/storage/utils/MMKVListener.d.ts.map +0 -1
  160. package/lib/typescript/storage/utils/SecureStoreRegistry.d.ts.map +0 -1
  161. package/lib/typescript/storage/utils/asyncStorageCompat.d.ts.map +0 -1
  162. package/lib/typescript/storage/utils/browserStorageLifecycle.d.ts.map +0 -1
  163. package/lib/typescript/storage/utils/browserStorageLifecycle.web.d.ts.map +0 -1
  164. package/lib/typescript/storage/utils/clearAllStorage.d.ts.map +0 -1
  165. package/lib/typescript/storage/utils/deleteStorageKeys.d.ts.map +0 -1
  166. package/lib/typescript/storage/utils/lineDiff.d.ts.map +0 -1
  167. package/lib/typescript/storage/utils/mmkvAvailability.d.ts.map +0 -1
  168. package/lib/typescript/storage/utils/mmkvAvailability.web.d.ts.map +0 -1
  169. package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts.map +0 -1
  170. package/lib/typescript/storage/utils/requiredStorageKeyScope.d.ts.map +0 -1
  171. package/lib/typescript/storage/utils/setStorageValue.d.ts.map +0 -1
  172. package/lib/typescript/storage/utils/snapshotProvider.d.ts.map +0 -1
  173. package/lib/typescript/storage/utils/storageActionHelpers.d.ts.map +0 -1
  174. package/lib/typescript/storage/utils/storageBrowserRefresh.d.ts.map +0 -1
  175. package/lib/typescript/storage/utils/storageLabels.d.ts.map +0 -1
  176. package/lib/typescript/storage/utils/storageLabels.web.d.ts.map +0 -1
  177. package/lib/typescript/storage/utils/storageOps.d.ts.map +0 -1
  178. package/lib/typescript/storage/utils/storageQueryUtils.d.ts.map +0 -1
  179. package/lib/typescript/storage/utils/storageTimeTravelUtils.d.ts.map +0 -1
  180. package/lib/typescript/storage/utils/valueType.d.ts.map +0 -1
@@ -1,156 +1 @@
1
- "use strict";
2
-
3
- import { storageLabels } from '../utils/storageLabels';
4
- import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
5
- import { Filter, DynamicFilterView, Database, HardDrive, Shield, macOSColors, night } from "@buoy-gg/shared-ui";
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- export function StorageEventFilterView({
8
- ignoredPatterns,
9
- onTogglePattern,
10
- onAddPattern,
11
- availableKeys = [],
12
- enabledStorageTypes,
13
- onToggleStorageType
14
- }) {
15
- const filterConfig = {
16
- addFilterSection: {
17
- enabled: true,
18
- placeholder: "Enter key pattern to hide...",
19
- title: "KEY FILTERS",
20
- icon: Filter
21
- },
22
- availableItemsSection: {
23
- enabled: true,
24
- title: "AVAILABLE EVENT KEYS",
25
- emptyMessage: "No storage event keys available. Events will appear here once captured.",
26
- items: availableKeys
27
- },
28
- howItWorksSection: {
29
- enabled: true,
30
- title: "HOW EVENT FILTERS WORK",
31
- description: "Patterns hide matching storage keys from the event list. Storage type toggles control which storage backends are monitored.",
32
- examples: ["• react_buoy → hides keys containing react_buoy", "• @temp → hides @temp_user, @temp_data", "• redux → hides redux-persist:root", `• ${storageLabels.asyncFull}: show or hide captured events`, `• ${storageLabels.mmkv}: show or hide captured events`],
33
- icon: Filter
34
- },
35
- onPatternToggle: onTogglePattern,
36
- onPatternAdd: onAddPattern,
37
- activePatterns: ignoredPatterns
38
- };
39
- return /*#__PURE__*/_jsxs(View, {
40
- style: styles.container,
41
- children: [/*#__PURE__*/_jsxs(View, {
42
- style: styles.storageTypeSection,
43
- children: [/*#__PURE__*/_jsx(Text, {
44
- style: styles.sectionTitle,
45
- children: "STORAGE TYPES"
46
- }), /*#__PURE__*/_jsxs(View, {
47
- style: styles.storageTypeButtons,
48
- children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
49
- style: [styles.storageTypeButton, enabledStorageTypes.has('async') && styles.storageTypeButtonActive, {
50
- borderColor: macOSColors.semantic.warning + '40'
51
- }],
52
- onPress: () => onToggleStorageType('async'),
53
- testID: "buoy-storage-backend-async",
54
- accessibilityRole: "button",
55
- accessibilityLabel: `Toggle ${storageLabels.asyncFull} capture`,
56
- accessibilityState: {
57
- selected: enabledStorageTypes.has('async')
58
- },
59
- children: [/*#__PURE__*/_jsx(Database, {
60
- size: 16,
61
- color: enabledStorageTypes.has('async') ? macOSColors.semantic.warning : night.color.textTertiary
62
- }), /*#__PURE__*/_jsx(Text, {
63
- style: [styles.storageTypeButtonText, enabledStorageTypes.has('async') && {
64
- color: macOSColors.semantic.warning
65
- }],
66
- children: storageLabels.asyncFull
67
- })]
68
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
69
- style: [styles.storageTypeButton, enabledStorageTypes.has('mmkv') && styles.storageTypeButtonActive, {
70
- borderColor: macOSColors.semantic.info + '40'
71
- }],
72
- onPress: () => onToggleStorageType('mmkv'),
73
- testID: "buoy-storage-backend-mmkv",
74
- accessibilityRole: "button",
75
- accessibilityLabel: `Toggle ${storageLabels.mmkv} capture`,
76
- accessibilityState: {
77
- selected: enabledStorageTypes.has('mmkv')
78
- },
79
- children: [/*#__PURE__*/_jsx(HardDrive, {
80
- size: 16,
81
- color: enabledStorageTypes.has('mmkv') ? macOSColors.semantic.info : night.color.textTertiary
82
- }), /*#__PURE__*/_jsx(Text, {
83
- style: [styles.storageTypeButtonText, enabledStorageTypes.has('mmkv') && {
84
- color: macOSColors.semantic.info
85
- }],
86
- children: storageLabels.mmkv
87
- })]
88
- }), storageLabels.hasSecure && /*#__PURE__*/_jsxs(TouchableOpacity, {
89
- style: [styles.storageTypeButton, enabledStorageTypes.has('secure') && styles.storageTypeButtonActive, {
90
- borderColor: macOSColors.semantic.success + '40'
91
- }],
92
- onPress: () => onToggleStorageType('secure'),
93
- testID: "buoy-storage-backend-secure",
94
- accessibilityRole: "button",
95
- accessibilityLabel: "Toggle Secure Storage capture",
96
- accessibilityState: {
97
- selected: enabledStorageTypes.has('secure')
98
- },
99
- children: [/*#__PURE__*/_jsx(Shield, {
100
- size: 16,
101
- color: enabledStorageTypes.has('secure') ? macOSColors.semantic.success : night.color.textTertiary
102
- }), /*#__PURE__*/_jsx(Text, {
103
- style: [styles.storageTypeButtonText, enabledStorageTypes.has('secure') && {
104
- color: macOSColors.semantic.success
105
- }],
106
- children: "Secure Storage"
107
- })]
108
- })]
109
- })]
110
- }), /*#__PURE__*/_jsx(DynamicFilterView, {
111
- ...filterConfig
112
- })]
113
- });
114
- }
115
- const styles = StyleSheet.create({
116
- container: {
117
- flex: 1
118
- },
119
- storageTypeSection: {
120
- padding: 16,
121
- borderBottomWidth: 1,
122
- borderBottomColor: night.color.border
123
- },
124
- sectionTitle: {
125
- fontSize: 11,
126
- fontWeight: '700',
127
- color: night.color.textSecondary,
128
- letterSpacing: 0.8,
129
- marginBottom: 12
130
- },
131
- storageTypeButtons: {
132
- flexDirection: 'row',
133
- gap: 8
134
- },
135
- storageTypeButton: {
136
- flex: 1,
137
- flexDirection: 'row',
138
- alignItems: 'center',
139
- justifyContent: 'center',
140
- gap: 6,
141
- paddingVertical: 10,
142
- paddingHorizontal: 12,
143
- backgroundColor: night.color.surfaceElevated,
144
- borderRadius: 8,
145
- borderWidth: 1,
146
- borderColor: night.color.border
147
- },
148
- storageTypeButtonActive: {
149
- backgroundColor: night.color.surface
150
- },
151
- storageTypeButtonText: {
152
- fontSize: 11,
153
- fontWeight: '600',
154
- color: night.color.textTertiary
155
- }
156
- });
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}});