@buoy-gg/storage 2.1.6 → 2.1.9
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.
- package/lib/commonjs/storage/components/GameUIStorageBrowser.js +14 -4
- package/lib/commonjs/storage/components/StorageBrowserMode.js +8 -2
- package/lib/commonjs/storage/components/StorageKeyRow.js +78 -80
- package/lib/commonjs/storage/components/StorageKeySection.js +6 -2
- package/lib/commonjs/storage/components/StorageModalWithTabs.js +199 -111
- package/lib/module/storage/components/GameUIStorageBrowser.js +14 -4
- package/lib/module/storage/components/StorageBrowserMode.js +8 -2
- package/lib/module/storage/components/StorageKeyRow.js +79 -81
- package/lib/module/storage/components/StorageKeySection.js +6 -2
- package/lib/module/storage/components/StorageModalWithTabs.js +200 -112
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts +4 -1
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageBrowserMode.d.ts +4 -1
- package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageKeyRow.d.ts +5 -1
- package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageKeySection.d.ts +5 -1
- package/lib/typescript/storage/components/StorageKeySection.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -60,7 +60,10 @@ function GameUIStorageBrowser({
|
|
|
60
60
|
onTogglePattern,
|
|
61
61
|
onAddPattern,
|
|
62
62
|
searchQuery = "",
|
|
63
|
-
storageDataRef
|
|
63
|
+
storageDataRef,
|
|
64
|
+
eventCountByKey,
|
|
65
|
+
onViewHistory,
|
|
66
|
+
enabledStorageTypes
|
|
64
67
|
}) {
|
|
65
68
|
const isPro = (0, _license.useIsPro)();
|
|
66
69
|
const [showUpgradeModal, setShowUpgradeModal] = (0, _react.useState)(false);
|
|
@@ -352,7 +355,12 @@ function GameUIStorageBrowser({
|
|
|
352
355
|
const filteredKeys = (0, _react.useMemo)(() => {
|
|
353
356
|
let keys = sortedKeys;
|
|
354
357
|
|
|
355
|
-
// Apply
|
|
358
|
+
// Apply enabled storage types filter (from parent unified filter)
|
|
359
|
+
if (enabledStorageTypes && enabledStorageTypes.size > 0) {
|
|
360
|
+
keys = keys.filter(k => enabledStorageTypes.has(k.storageType));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Apply ignored pattern filter
|
|
356
364
|
keys = keys.filter(k => {
|
|
357
365
|
// Check if key matches any ignored pattern
|
|
358
366
|
const shouldIgnore = Array.from(ignoredPatterns).some(pattern => k.key.includes(pattern));
|
|
@@ -388,7 +396,7 @@ function GameUIStorageBrowser({
|
|
|
388
396
|
// No need to filter again here
|
|
389
397
|
|
|
390
398
|
return keys;
|
|
391
|
-
}, [sortedKeys, activeFilter, activeStorageType, ignoredPatterns, searchQuery, selectedMMKVInstance]);
|
|
399
|
+
}, [sortedKeys, activeFilter, activeStorageType, ignoredPatterns, searchQuery, selectedMMKVInstance, enabledStorageTypes]);
|
|
392
400
|
|
|
393
401
|
// For free users, limit visible keys to FREE_TIER_KEY_LIMIT
|
|
394
402
|
const visibleKeys = (0, _react.useMemo)(() => {
|
|
@@ -620,7 +628,9 @@ function GameUIStorageBrowser({
|
|
|
620
628
|
emptyMessage: "",
|
|
621
629
|
isSelectMode: isSelectMode,
|
|
622
630
|
selectedKeys: selectedKeyIds,
|
|
623
|
-
onSelectionChange: handleSelectionChange
|
|
631
|
+
onSelectionChange: handleSelectionChange,
|
|
632
|
+
eventCountByKey: eventCountByKey,
|
|
633
|
+
onViewHistory: onViewHistory
|
|
624
634
|
}), hasLockedKeys && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
625
635
|
style: styles.limitBanner,
|
|
626
636
|
onPress: () => setShowUpgradeModal(true),
|
|
@@ -17,7 +17,10 @@ function StorageBrowserMode({
|
|
|
17
17
|
onTogglePattern,
|
|
18
18
|
onAddPattern,
|
|
19
19
|
searchQuery = "",
|
|
20
|
-
storageDataRef
|
|
20
|
+
storageDataRef,
|
|
21
|
+
eventCountByKey,
|
|
22
|
+
onViewHistory,
|
|
23
|
+
enabledStorageTypes
|
|
21
24
|
}) {
|
|
22
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GameUIStorageBrowser.GameUIStorageBrowser, {
|
|
23
26
|
requiredStorageKeys: requiredStorageKeys,
|
|
@@ -26,6 +29,9 @@ function StorageBrowserMode({
|
|
|
26
29
|
onTogglePattern: onTogglePattern,
|
|
27
30
|
onAddPattern: onAddPattern,
|
|
28
31
|
searchQuery: searchQuery,
|
|
29
|
-
storageDataRef: storageDataRef
|
|
32
|
+
storageDataRef: storageDataRef,
|
|
33
|
+
eventCountByKey: eventCountByKey,
|
|
34
|
+
onViewHistory: onViewHistory,
|
|
35
|
+
enabledStorageTypes: enabledStorageTypes
|
|
30
36
|
});
|
|
31
37
|
}
|
|
@@ -79,7 +79,9 @@ function StorageKeyRow({
|
|
|
79
79
|
onPress,
|
|
80
80
|
isSelectMode = false,
|
|
81
81
|
isSelected = false,
|
|
82
|
-
onSelectionChange
|
|
82
|
+
onSelectionChange,
|
|
83
|
+
eventCount,
|
|
84
|
+
onViewHistory
|
|
83
85
|
}) {
|
|
84
86
|
const config = getStatusConfig(storageKey.status);
|
|
85
87
|
const hasValue = storageKey.value !== undefined && storageKey.value !== null;
|
|
@@ -106,42 +108,40 @@ function StorageKeyRow({
|
|
|
106
108
|
// Create expanded content for value and storage details
|
|
107
109
|
const expandedContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
108
110
|
style: styles.expandedContainer,
|
|
109
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
110
|
-
|
|
111
|
-
children:
|
|
112
|
-
|
|
113
|
-
children:
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
style: [styles.storageBadgeText, {
|
|
121
|
-
color: getStorageTypeColor(storageKey.storageType)
|
|
122
|
-
}],
|
|
123
|
-
children: storageTypeLabel
|
|
124
|
-
})
|
|
125
|
-
})]
|
|
126
|
-
}), storageKey.storageType === 'mmkv' && storageKey.instanceId && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
127
|
-
style: styles.expandedRow,
|
|
128
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
129
|
-
style: styles.expandedLabel,
|
|
130
|
-
children: "Instance:"
|
|
131
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
132
|
-
style: [styles.instanceBadge, {
|
|
133
|
-
backgroundColor: getInstanceColor(storageKey.instanceId) + '20',
|
|
134
|
-
borderColor: getInstanceColor(storageKey.instanceId) + '40'
|
|
135
|
-
}],
|
|
136
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.HardDrive, {
|
|
111
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ExpandedInfoRow, {
|
|
112
|
+
label: "Storage",
|
|
113
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.PillBadge, {
|
|
114
|
+
color: getStorageTypeColor(storageKey.storageType),
|
|
115
|
+
children: storageTypeLabel
|
|
116
|
+
})
|
|
117
|
+
}), storageKey.storageType === 'mmkv' && storageKey.instanceId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ExpandedInfoRow, {
|
|
118
|
+
label: "Instance",
|
|
119
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.PillBadge, {
|
|
120
|
+
color: getInstanceColor(storageKey.instanceId),
|
|
121
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.HardDrive, {
|
|
137
122
|
size: 9,
|
|
138
123
|
color: getInstanceColor(storageKey.instanceId)
|
|
139
|
-
}),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
124
|
+
}),
|
|
125
|
+
children: storageKey.instanceId
|
|
126
|
+
})
|
|
127
|
+
}), eventCount != null && eventCount > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ExpandedInfoRow, {
|
|
128
|
+
label: "Updates",
|
|
129
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.PillBadge, {
|
|
130
|
+
color: _sharedUi.macOSColors.semantic.warning,
|
|
131
|
+
children: String(eventCount)
|
|
132
|
+
}), eventCount > 1 && onViewHistory && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
133
|
+
onPress: onViewHistory,
|
|
134
|
+
style: styles.viewHistoryButton,
|
|
135
|
+
hitSlop: {
|
|
136
|
+
top: 6,
|
|
137
|
+
bottom: 6,
|
|
138
|
+
left: 6,
|
|
139
|
+
right: 6
|
|
140
|
+
},
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
142
|
+
style: styles.viewHistoryText,
|
|
143
|
+
children: "view history \u2192"
|
|
144
|
+
})
|
|
145
145
|
})]
|
|
146
146
|
}), isJsonData && typeof parsedValue === "object" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
147
147
|
style: styles.dataViewerContainer,
|
|
@@ -198,20 +198,6 @@ function StorageKeyRow({
|
|
|
198
198
|
})]
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
-
// Create storage type badge
|
|
202
|
-
const storageBadge = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
203
|
-
style: [styles.storageBadge, {
|
|
204
|
-
backgroundColor: getStorageTypeColor(storageKey.storageType) + "12",
|
|
205
|
-
borderColor: getStorageTypeColor(storageKey.storageType) + "25"
|
|
206
|
-
}],
|
|
207
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
208
|
-
style: [styles.storageBadgeText, {
|
|
209
|
-
color: getStorageTypeColor(storageKey.storageType)
|
|
210
|
-
}],
|
|
211
|
-
children: storageTypeLabel
|
|
212
|
-
})
|
|
213
|
-
});
|
|
214
|
-
|
|
215
201
|
// Handle checkbox press in select mode
|
|
216
202
|
const handleCheckboxPress = () => {
|
|
217
203
|
onSelectionChange?.(storageKey, !isSelected);
|
|
@@ -237,9 +223,9 @@ function StorageKeyRow({
|
|
|
237
223
|
}) : null;
|
|
238
224
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
239
225
|
style: [styles.rowContainer, isSelected && styles.rowContainerSelected],
|
|
240
|
-
children: [selectionCheckbox, /*#__PURE__*/(0, _jsxRuntime.
|
|
226
|
+
children: [selectionCheckbox, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
241
227
|
style: styles.compactRowWrapper,
|
|
242
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.CompactRow, {
|
|
228
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.CompactRow, {
|
|
243
229
|
statusDotColor: config.color,
|
|
244
230
|
statusLabel: config.label,
|
|
245
231
|
statusSublabel: config.sublabel,
|
|
@@ -248,10 +234,25 @@ function StorageKeyRow({
|
|
|
248
234
|
expandedContent: expandedContent,
|
|
249
235
|
isExpanded: isExpanded,
|
|
250
236
|
expandedGlowColor: config.color,
|
|
251
|
-
customBadge:
|
|
237
|
+
customBadge: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.PillBadge, {
|
|
238
|
+
color: getStorageTypeColor(storageKey.storageType),
|
|
239
|
+
children: storageTypeLabel
|
|
240
|
+
}),
|
|
252
241
|
showChevron: !isSelectMode,
|
|
253
242
|
onPress: isSelectMode ? handleCheckboxPress : onPress ? () => onPress(storageKey) : undefined
|
|
254
|
-
})
|
|
243
|
+
}), eventCount != null && eventCount > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
244
|
+
style: [styles.absCountBadge, {
|
|
245
|
+
backgroundColor: _sharedUi.macOSColors.semantic.warning + "22",
|
|
246
|
+
borderColor: _sharedUi.macOSColors.semantic.warning + "55"
|
|
247
|
+
}],
|
|
248
|
+
pointerEvents: "none",
|
|
249
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
250
|
+
style: [styles.absCountText, {
|
|
251
|
+
color: _sharedUi.macOSColors.semantic.warning
|
|
252
|
+
}],
|
|
253
|
+
children: String(eventCount)
|
|
254
|
+
})
|
|
255
|
+
})]
|
|
255
256
|
})]
|
|
256
257
|
});
|
|
257
258
|
}
|
|
@@ -309,33 +310,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
309
310
|
borderColor: _sharedUi.macOSColors.border.default,
|
|
310
311
|
padding: 6
|
|
311
312
|
},
|
|
312
|
-
storageBadge: {
|
|
313
|
-
paddingHorizontal: 8,
|
|
314
|
-
paddingVertical: 3,
|
|
315
|
-
borderRadius: 999,
|
|
316
|
-
borderWidth: 1
|
|
317
|
-
},
|
|
318
|
-
storageBadgeText: {
|
|
319
|
-
fontSize: 10,
|
|
320
|
-
fontWeight: "700",
|
|
321
|
-
fontFamily: "monospace",
|
|
322
|
-
letterSpacing: 0.5
|
|
323
|
-
},
|
|
324
|
-
instanceBadge: {
|
|
325
|
-
paddingHorizontal: 8,
|
|
326
|
-
paddingVertical: 3,
|
|
327
|
-
borderRadius: 999,
|
|
328
|
-
borderWidth: 1,
|
|
329
|
-
flexDirection: 'row',
|
|
330
|
-
alignItems: 'center',
|
|
331
|
-
gap: 4
|
|
332
|
-
},
|
|
333
|
-
instanceText: {
|
|
334
|
-
fontSize: 10,
|
|
335
|
-
fontWeight: "700",
|
|
336
|
-
fontFamily: "monospace",
|
|
337
|
-
letterSpacing: 0.3
|
|
338
|
-
},
|
|
339
313
|
rowContainer: {
|
|
340
314
|
flexDirection: "row",
|
|
341
315
|
alignItems: "flex-start"
|
|
@@ -352,5 +326,29 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
352
326
|
},
|
|
353
327
|
compactRowWrapper: {
|
|
354
328
|
flex: 1
|
|
329
|
+
},
|
|
330
|
+
absCountBadge: {
|
|
331
|
+
position: "absolute",
|
|
332
|
+
top: 4,
|
|
333
|
+
right: 10,
|
|
334
|
+
paddingHorizontal: 5,
|
|
335
|
+
paddingVertical: 1,
|
|
336
|
+
borderRadius: 4,
|
|
337
|
+
borderWidth: 1,
|
|
338
|
+
zIndex: 1
|
|
339
|
+
},
|
|
340
|
+
absCountText: {
|
|
341
|
+
fontSize: 9,
|
|
342
|
+
fontWeight: "700",
|
|
343
|
+
fontFamily: "monospace"
|
|
344
|
+
},
|
|
345
|
+
viewHistoryButton: {
|
|
346
|
+
marginLeft: 4
|
|
347
|
+
},
|
|
348
|
+
viewHistoryText: {
|
|
349
|
+
fontSize: 10,
|
|
350
|
+
fontWeight: "600",
|
|
351
|
+
fontFamily: "monospace",
|
|
352
|
+
color: _sharedUi.macOSColors.semantic.info
|
|
355
353
|
}
|
|
356
354
|
});
|
|
@@ -25,7 +25,9 @@ function StorageKeySection({
|
|
|
25
25
|
headerColor,
|
|
26
26
|
isSelectMode = false,
|
|
27
27
|
selectedKeys = new Set(),
|
|
28
|
-
onSelectionChange
|
|
28
|
+
onSelectionChange,
|
|
29
|
+
eventCountByKey,
|
|
30
|
+
onViewHistory
|
|
29
31
|
}) {
|
|
30
32
|
const [expandedKey, setExpandedKey] = (0, _react.useState)(null);
|
|
31
33
|
const handleKeyPress = (0, _react.useCallback)(storageKey => {
|
|
@@ -76,7 +78,9 @@ function StorageKeySection({
|
|
|
76
78
|
onPress: handleKeyPress,
|
|
77
79
|
isSelectMode: isSelectMode,
|
|
78
80
|
isSelected: selectedKeys.has(uniqueKey),
|
|
79
|
-
onSelectionChange: onSelectionChange
|
|
81
|
+
onSelectionChange: onSelectionChange,
|
|
82
|
+
eventCount: eventCountByKey?.[storageKey.key],
|
|
83
|
+
onViewHistory: onViewHistory ? () => onViewHistory(storageKey.key) : undefined
|
|
80
84
|
}, uniqueKey);
|
|
81
85
|
})
|
|
82
86
|
})]
|