@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,253 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * MMKVInstanceInfoPanel Component
5
- *
6
- * Displays detailed information about a selected MMKV instance:
7
- * - Instance ID and path
8
- * - Encryption status
9
- * - Read-only status
10
- * - Key count
11
- * - Size (if available)
12
- *
13
- * Used in GameUIStorageBrowser below the instance selector.
14
- */
15
-
16
- import { View, Text, StyleSheet } from 'react-native';
17
- import { macOSColors, night, monoFont } from '@buoy-gg/shared-ui';
18
- import { useMMKVInstance } from '../hooks/useMMKVInstances';
19
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
20
- /**
21
- * MMKV Instance Info Panel
22
- *
23
- * Shows metadata and statistics for a selected MMKV instance.
24
- *
25
- * @example
26
- * ```typescript
27
- * function MyStorageUI() {
28
- * const [selectedInstance, setSelectedInstance] = useState('mmkv.default');
29
- *
30
- * return (
31
- * <View>
32
- * <MMKVInstanceSelector
33
- * selectedInstanceId={selectedInstance}
34
- * onSelectInstance={setSelectedInstance}
35
- * />
36
- * {selectedInstance && (
37
- * <MMKVInstanceInfoPanel instanceId={selectedInstance} />
38
- * )}
39
- * </View>
40
- * );
41
- * }
42
- * ```
43
- */
44
- export function MMKVInstanceInfoPanel({
45
- instanceId
46
- }) {
47
- const instance = useMMKVInstance(instanceId);
48
- if (!instance) {
49
- return /*#__PURE__*/_jsx(View, {
50
- style: styles.container,
51
- children: /*#__PURE__*/_jsx(View, {
52
- style: styles.errorState,
53
- children: /*#__PURE__*/_jsxs(Text, {
54
- style: styles.errorText,
55
- children: ["Instance not found: ", instanceId]
56
- })
57
- })
58
- });
59
- }
60
- return /*#__PURE__*/_jsx(View, {
61
- style: styles.container,
62
- children: /*#__PURE__*/_jsxs(View, {
63
- style: styles.panel,
64
- children: [/*#__PURE__*/_jsx(View, {
65
- style: styles.header,
66
- children: /*#__PURE__*/_jsx(Text, {
67
- style: styles.headerTitle,
68
- children: "Instance Details"
69
- })
70
- }), /*#__PURE__*/_jsxs(View, {
71
- style: styles.infoGrid,
72
- children: [/*#__PURE__*/_jsx(InfoItem, {
73
- label: "Instance ID",
74
- value: instance.id,
75
- valueStyle: styles.monoValue
76
- }), /*#__PURE__*/_jsx(InfoItem, {
77
- label: "Keys",
78
- value: `${instance.keyCount} ${instance.keyCount === 1 ? 'key' : 'keys'}`,
79
- highlight: true
80
- }), /*#__PURE__*/_jsx(InfoItem, {
81
- label: "Encryption",
82
- value: instance.encrypted ? '🔒 Encrypted' : '🔓 Not encrypted',
83
- valueColor: instance.encrypted ? macOSColors.semantic.success : night.color.textTertiary
84
- }), /*#__PURE__*/_jsx(InfoItem, {
85
- label: "Access",
86
- value: instance.readOnly ? '👁️ Read-only' : '✏️ Read-write',
87
- valueColor: instance.readOnly ? macOSColors.semantic.warning : night.color.textTertiary
88
- }), instance.size !== undefined && /*#__PURE__*/_jsx(InfoItem, {
89
- label: "Size",
90
- value: formatBytes(instance.size),
91
- valueStyle: styles.monoValue
92
- })]
93
- }), instance.encrypted && /*#__PURE__*/_jsxs(View, {
94
- style: styles.notice,
95
- children: [/*#__PURE__*/_jsx(Text, {
96
- style: styles.noticeIcon,
97
- children: "\uD83D\uDD12"
98
- }), /*#__PURE__*/_jsx(Text, {
99
- style: styles.noticeText,
100
- children: "This instance is encrypted. Values are protected at rest."
101
- })]
102
- }), instance.readOnly && /*#__PURE__*/_jsxs(View, {
103
- style: [styles.notice, styles.noticeWarning],
104
- children: [/*#__PURE__*/_jsx(Text, {
105
- style: styles.noticeIcon,
106
- children: "\uD83D\uDC41\uFE0F"
107
- }), /*#__PURE__*/_jsx(Text, {
108
- style: [styles.noticeText, styles.noticeTextWarning],
109
- children: "Read-only mode. Cannot modify values in this instance."
110
- })]
111
- })]
112
- })
113
- });
114
- }
115
-
116
- /**
117
- * InfoItem Component - Displays a label-value pair
118
- */
119
- function InfoItem({
120
- label,
121
- value,
122
- valueStyle,
123
- valueColor,
124
- highlight
125
- }) {
126
- return /*#__PURE__*/_jsxs(View, {
127
- style: styles.infoItem,
128
- children: [/*#__PURE__*/_jsx(Text, {
129
- style: styles.infoLabel,
130
- children: label
131
- }), /*#__PURE__*/_jsx(Text, {
132
- style: [styles.infoValue, valueStyle, valueColor && {
133
- color: valueColor
134
- }, highlight && styles.infoValueHighlight],
135
- children: value
136
- })]
137
- });
138
- }
139
-
140
- /**
141
- * Format bytes to human-readable string
142
- */
143
- function formatBytes(bytes) {
144
- if (bytes === 0) return '0 Bytes';
145
- const k = 1024;
146
- const sizes = ['Bytes', 'KB', 'MB', 'GB'];
147
- const i = Math.floor(Math.log(bytes) / Math.log(k));
148
- return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
149
- }
150
- const styles = StyleSheet.create({
151
- container: {
152
- marginBottom: 12
153
- },
154
- // Error state
155
- errorState: {
156
- backgroundColor: macOSColors.semantic.error + '15',
157
- borderRadius: 12,
158
- padding: 12,
159
- borderWidth: 1,
160
- borderColor: macOSColors.semantic.error + '40'
161
- },
162
- errorText: {
163
- fontSize: 12,
164
- color: macOSColors.semantic.error,
165
- textAlign: 'center'
166
- },
167
- // Panel
168
- panel: {
169
- backgroundColor: night.color.surface,
170
- borderRadius: 12,
171
- borderWidth: 1,
172
- borderColor: night.color.border,
173
- overflow: 'hidden',
174
- shadowColor: '#000000',
175
- shadowOpacity: 0.03,
176
- shadowRadius: 8,
177
- shadowOffset: {
178
- width: 0,
179
- height: 2
180
- }
181
- },
182
- // Header
183
- header: {
184
- padding: 12,
185
- borderBottomWidth: 1,
186
- borderBottomColor: night.color.separator
187
- },
188
- headerTitle: {
189
- fontSize: 11,
190
- fontWeight: '600',
191
- color: night.color.text,
192
- textTransform: "uppercase",
193
- letterSpacing: 0.5
194
- },
195
- // Info grid
196
- infoGrid: {
197
- padding: 12,
198
- gap: 10
199
- },
200
- infoItem: {
201
- flexDirection: 'row',
202
- justifyContent: 'space-between',
203
- alignItems: 'center',
204
- paddingVertical: 4
205
- },
206
- infoLabel: {
207
- fontSize: 12,
208
- color: night.color.textTertiary,
209
- fontWeight: '500'
210
- },
211
- infoValue: {
212
- fontSize: 12,
213
- color: night.color.text,
214
- fontWeight: '500'
215
- },
216
- infoValueHighlight: {
217
- fontSize: 14,
218
- fontWeight: '600',
219
- color: night.color.accent
220
- },
221
- monoValue: {
222
- fontFamily: monoFont
223
- },
224
- // Notices
225
- notice: {
226
- flexDirection: 'row',
227
- alignItems: 'center',
228
- gap: 8,
229
- padding: 10,
230
- margin: 12,
231
- marginTop: 0,
232
- backgroundColor: macOSColors.semantic.success + '10',
233
- borderRadius: 8,
234
- borderWidth: 1,
235
- borderColor: macOSColors.semantic.success + '30'
236
- },
237
- noticeWarning: {
238
- backgroundColor: macOSColors.semantic.warning + '10',
239
- borderColor: macOSColors.semantic.warning + '30'
240
- },
241
- noticeIcon: {
242
- fontSize: 14
243
- },
244
- noticeText: {
245
- flex: 1,
246
- fontSize: 11,
247
- color: macOSColors.semantic.success,
248
- lineHeight: 16
249
- },
250
- noticeTextWarning: {
251
- color: macOSColors.semantic.warning
252
- }
253
- });
1
+ "use strict";import{View as r,Text as a,StyleSheet as f}from"react-native";import{macOSColors as n,night as i,monoFont as y}from"@buoy-gg/shared-ui";import{useMMKVInstance as g}from"../hooks/useMMKVInstances";import{jsxs as c,jsx as t}from"react/jsx-runtime";export function MMKVInstanceInfoPanel({instanceId:l}){const o=g(l);if(!o){return t(r,{style:e.container,children:t(r,{style:e.errorState,children:c(a,{style:e.errorText,children:["Instance not found: ",l]})})})}return t(r,{style:e.container,children:c(r,{style:e.panel,children:[t(r,{style:e.header,children:t(a,{style:e.headerTitle,children:"Instance Details"})}),c(r,{style:e.infoGrid,children:[t(d,{label:"Instance ID",value:o.id,valueStyle:e.monoValue}),t(d,{label:"Keys",value:`${o.keyCount} ${o.keyCount===1?"key":"keys"}`,highlight:true}),t(d,{label:"Encryption",value:o.encrypted?"\u{1F512} Encrypted":"\u{1F513} Not encrypted",valueColor:o.encrypted?n.semantic.success:i.color.textTertiary}),t(d,{label:"Access",value:o.readOnly?"\u{1F441}\uFE0F Read-only":"\u270F\uFE0F Read-write",valueColor:o.readOnly?n.semantic.warning:i.color.textTertiary}),o.size!==void 0&&t(d,{label:"Size",value:m(o.size),valueStyle:e.monoValue})]}),o.encrypted&&c(r,{style:e.notice,children:[t(a,{style:e.noticeIcon,children:"\u{1F512}"}),t(a,{style:e.noticeText,children:"This instance is encrypted. Values are protected at rest."})]}),o.readOnly&&c(r,{style:[e.notice,e.noticeWarning],children:[t(a,{style:e.noticeIcon,children:"\u{1F441}\uFE0F"}),t(a,{style:[e.noticeText,e.noticeTextWarning],children:"Read-only mode. Cannot modify values in this instance."})]})]})})}function d({label:l,value:o,valueStyle:h,valueColor:s,highlight:u}){return c(r,{style:e.infoItem,children:[t(a,{style:e.infoLabel,children:l}),t(a,{style:[e.infoValue,h,s&&{color:s},u&&e.infoValueHighlight],children:o})]})}function m(l){if(l===0)return"0 Bytes";const o=1024;const h=["Bytes","KB","MB","GB"];const s=Math.floor(Math.log(l)/Math.log(o));return`${parseFloat((l/Math.pow(o,s)).toFixed(2))} ${h[s]}`}const e=f.create({container:{marginBottom:12},errorState:{backgroundColor:n.semantic.error+"15",borderRadius:12,padding:12,borderWidth:1,borderColor:n.semantic.error+"40"},errorText:{fontSize:12,color:n.semantic.error,textAlign:"center"},panel:{backgroundColor:i.color.surface,borderRadius:12,borderWidth:1,borderColor:i.color.border,overflow:"hidden",shadowColor:"#000000",shadowOpacity:.03,shadowRadius:8,shadowOffset:{width:0,height:2}},header:{padding:12,borderBottomWidth:1,borderBottomColor:i.color.separator},headerTitle:{fontSize:11,fontWeight:"600",color:i.color.text,textTransform:"uppercase",letterSpacing:.5},infoGrid:{padding:12,gap:10},infoItem:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:4},infoLabel:{fontSize:12,color:i.color.textTertiary,fontWeight:"500"},infoValue:{fontSize:12,color:i.color.text,fontWeight:"500"},infoValueHighlight:{fontSize:14,fontWeight:"600",color:i.color.accent},monoValue:{fontFamily:y},notice:{flexDirection:"row",alignItems:"center",gap:8,padding:10,margin:12,marginTop:0,backgroundColor:n.semantic.success+"10",borderRadius:8,borderWidth:1,borderColor:n.semantic.success+"30"},noticeWarning:{backgroundColor:n.semantic.warning+"10",borderColor:n.semantic.warning+"30"},noticeIcon:{fontSize:14},noticeText:{flex:1,fontSize:11,color:n.semantic.success,lineHeight:16},noticeTextWarning:{color:n.semantic.warning}});
@@ -1,414 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * MMKVInstanceSelector Component
5
- *
6
- * Dropdown selector for choosing between multiple MMKV instances.
7
- * Shows instance ID, key count, and metadata badges (encrypted, read-only).
8
- *
9
- * Used in GameUIStorageBrowser when storage type filter is set to "mmkv".
10
- */
11
-
12
- import { useState } from 'react';
13
- import { View, Text, StyleSheet, TouchableOpacity, ScrollView, Modal } from 'react-native';
14
- import { macOSColors, night, monoFont } from '@buoy-gg/shared-ui';
15
- import { useMMKVInstances } from '../hooks/useMMKVInstances';
16
- import { isMMKVAvailable, getMMKVUnavailableMessage } from '../utils/mmkvAvailability';
17
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
- /**
19
- * MMKV Instance Selector Component
20
- *
21
- * Displays a dropdown to select between registered MMKV instances.
22
- *
23
- * @example
24
- * ```typescript
25
- * function MyStorageUI() {
26
- * const [selectedInstance, setSelectedInstance] = useState('mmkv.default');
27
- *
28
- * return (
29
- * <MMKVInstanceSelector
30
- * selectedInstanceId={selectedInstance}
31
- * onSelectInstance={setSelectedInstance}
32
- * />
33
- * );
34
- * }
35
- * ```
36
- */
37
- export function MMKVInstanceSelector({
38
- selectedInstanceId,
39
- onSelectInstance,
40
- showRefreshButton = true
41
- }) {
42
- const [isDropdownOpen, setIsDropdownOpen] = useState(false);
43
- const {
44
- instances,
45
- instanceCount,
46
- refresh
47
- } = useMMKVInstances(false);
48
-
49
- // Find the selected instance
50
- const selectedInstance = instances.find(inst => inst.id === selectedInstanceId);
51
-
52
- // Handle instance selection
53
- const handleSelectInstance = instanceId => {
54
- onSelectInstance(instanceId);
55
- setIsDropdownOpen(false);
56
- };
57
-
58
- // If MMKV is not available, show unavailable message
59
- if (!isMMKVAvailable()) {
60
- return /*#__PURE__*/_jsx(View, {
61
- style: styles.container,
62
- children: /*#__PURE__*/_jsxs(View, {
63
- style: styles.unavailableState,
64
- children: [/*#__PURE__*/_jsx(Text, {
65
- style: styles.unavailableTitle,
66
- children: "MMKV Not Available"
67
- }), /*#__PURE__*/_jsx(Text, {
68
- style: styles.unavailableDescription,
69
- children: getMMKVUnavailableMessage()
70
- })]
71
- })
72
- });
73
- }
74
-
75
- // If no instances registered, show message
76
- if (instanceCount === 0) {
77
- return /*#__PURE__*/_jsx(View, {
78
- style: styles.container,
79
- children: /*#__PURE__*/_jsxs(View, {
80
- style: styles.emptyState,
81
- children: [/*#__PURE__*/_jsx(Text, {
82
- style: styles.emptyStateTitle,
83
- children: "No MMKV Instances Registered"
84
- }), /*#__PURE__*/_jsx(Text, {
85
- style: styles.emptyStateDescription,
86
- children: "Register MMKV instances using registerMMKVInstance() to monitor them in dev tools."
87
- }), showRefreshButton && /*#__PURE__*/_jsx(TouchableOpacity, {
88
- style: styles.refreshButton,
89
- onPress: refresh,
90
- activeOpacity: 0.7,
91
- children: /*#__PURE__*/_jsx(Text, {
92
- style: styles.refreshButtonText,
93
- children: "\u21BB Refresh"
94
- })
95
- })]
96
- })
97
- });
98
- }
99
- return /*#__PURE__*/_jsxs(View, {
100
- style: styles.container,
101
- children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
102
- style: styles.selectorButton,
103
- onPress: () => setIsDropdownOpen(true),
104
- activeOpacity: 0.7,
105
- children: [/*#__PURE__*/_jsx(View, {
106
- style: styles.selectorContent,
107
- children: selectedInstance ? /*#__PURE__*/_jsx(InstanceRow, {
108
- instance: selectedInstance,
109
- isSelected: true
110
- }) : /*#__PURE__*/_jsx(Text, {
111
- style: styles.placeholderText,
112
- children: "Select MMKV Instance"
113
- })
114
- }), /*#__PURE__*/_jsx(Text, {
115
- style: styles.dropdownArrow,
116
- children: "\u25BC"
117
- })]
118
- }), /*#__PURE__*/_jsx(Modal, {
119
- visible: isDropdownOpen,
120
- transparent: true,
121
- animationType: "fade",
122
- onRequestClose: () => setIsDropdownOpen(false),
123
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
124
- style: styles.modalOverlay,
125
- activeOpacity: 1,
126
- onPress: () => setIsDropdownOpen(false),
127
- children: /*#__PURE__*/_jsxs(View, {
128
- style: styles.dropdownContainer,
129
- children: [/*#__PURE__*/_jsxs(View, {
130
- style: styles.dropdownHeader,
131
- children: [/*#__PURE__*/_jsxs(Text, {
132
- style: styles.dropdownTitle,
133
- children: ["Select MMKV Instance (", instanceCount, ")"]
134
- }), showRefreshButton && /*#__PURE__*/_jsx(TouchableOpacity, {
135
- style: styles.headerRefreshButton,
136
- onPress: refresh,
137
- activeOpacity: 0.7,
138
- children: /*#__PURE__*/_jsx(Text, {
139
- style: styles.headerRefreshText,
140
- children: "\u21BB"
141
- })
142
- })]
143
- }), /*#__PURE__*/_jsx(ScrollView, {
144
- style: styles.dropdownList,
145
- children: instances.map(instance => /*#__PURE__*/_jsx(TouchableOpacity, {
146
- style: [styles.dropdownItem, instance.id === selectedInstanceId && styles.dropdownItemSelected],
147
- onPress: () => handleSelectInstance(instance.id),
148
- activeOpacity: 0.7,
149
- children: /*#__PURE__*/_jsx(InstanceRow, {
150
- instance: instance,
151
- isSelected: instance.id === selectedInstanceId
152
- })
153
- }, instance.id))
154
- })]
155
- })
156
- })
157
- })]
158
- });
159
- }
160
-
161
- /**
162
- * Instance Row Component
163
- *
164
- * Displays a single MMKV instance with its metadata.
165
- */
166
- function InstanceRow({
167
- instance,
168
- isSelected
169
- }) {
170
- return /*#__PURE__*/_jsxs(View, {
171
- style: styles.instanceRow,
172
- children: [/*#__PURE__*/_jsxs(View, {
173
- style: styles.instanceLeft,
174
- children: [/*#__PURE__*/_jsx(Text, {
175
- style: [styles.instanceId, isSelected && styles.instanceIdSelected],
176
- numberOfLines: 1,
177
- children: instance.id
178
- }), /*#__PURE__*/_jsxs(View, {
179
- style: styles.instanceBadges,
180
- children: [instance.encrypted && /*#__PURE__*/_jsx(View, {
181
- style: [styles.badge, styles.badgeEncrypted],
182
- children: /*#__PURE__*/_jsx(Text, {
183
- style: styles.badgeText,
184
- children: "\uD83D\uDD12 Encrypted"
185
- })
186
- }), instance.readOnly && /*#__PURE__*/_jsx(View, {
187
- style: [styles.badge, styles.badgeReadOnly],
188
- children: /*#__PURE__*/_jsx(Text, {
189
- style: styles.badgeText,
190
- children: "\uD83D\uDC41\uFE0F Read-only"
191
- })
192
- })]
193
- })]
194
- }), /*#__PURE__*/_jsxs(View, {
195
- style: styles.instanceRight,
196
- children: [/*#__PURE__*/_jsx(Text, {
197
- style: styles.keyCount,
198
- children: instance.keyCount
199
- }), /*#__PURE__*/_jsx(Text, {
200
- style: styles.keyCountLabel,
201
- children: "keys"
202
- })]
203
- })]
204
- });
205
- }
206
- const styles = StyleSheet.create({
207
- container: {
208
- marginBottom: 12
209
- },
210
- // Unavailable state
211
- unavailableState: {
212
- backgroundColor: macOSColors.semantic.warning + '15',
213
- borderRadius: 12,
214
- padding: 20,
215
- borderWidth: 1,
216
- borderColor: macOSColors.semantic.warning + '40',
217
- alignItems: 'center',
218
- gap: 12
219
- },
220
- unavailableTitle: {
221
- fontSize: 14,
222
- fontWeight: '600',
223
- color: macOSColors.semantic.warning
224
- },
225
- unavailableDescription: {
226
- fontSize: 12,
227
- color: night.color.textSecondary,
228
- textAlign: 'center',
229
- lineHeight: 18
230
- },
231
- // Empty state
232
- emptyState: {
233
- backgroundColor: night.color.surface,
234
- borderRadius: 12,
235
- padding: 20,
236
- borderWidth: 1,
237
- borderColor: night.color.border,
238
- alignItems: 'center',
239
- gap: 12
240
- },
241
- emptyStateTitle: {
242
- fontSize: 14,
243
- fontWeight: '600',
244
- color: night.color.text
245
- },
246
- emptyStateDescription: {
247
- fontSize: 12,
248
- color: night.color.textTertiary,
249
- textAlign: 'center',
250
- lineHeight: 18
251
- },
252
- refreshButton: {
253
- marginTop: 8,
254
- paddingHorizontal: 16,
255
- paddingVertical: 8,
256
- backgroundColor: night.color.accentSoft,
257
- borderRadius: 8,
258
- borderWidth: 1,
259
- borderColor: night.color.accentBorderStrong
260
- },
261
- refreshButtonText: {
262
- fontSize: 12,
263
- fontWeight: '600',
264
- color: night.color.accent
265
- },
266
- // Selector button
267
- selectorButton: {
268
- backgroundColor: night.color.surface,
269
- borderRadius: 12,
270
- borderWidth: 1,
271
- borderColor: night.color.border,
272
- padding: 12,
273
- flexDirection: 'row',
274
- alignItems: 'center',
275
- justifyContent: 'space-between',
276
- shadowColor: '#000000',
277
- shadowOpacity: 0.03,
278
- shadowRadius: 8,
279
- shadowOffset: {
280
- width: 0,
281
- height: 2
282
- }
283
- },
284
- selectorContent: {
285
- flex: 1
286
- },
287
- placeholderText: {
288
- fontSize: 13,
289
- color: night.color.placeholder,
290
- fontStyle: 'italic'
291
- },
292
- dropdownArrow: {
293
- fontSize: 10,
294
- color: night.color.textTertiary,
295
- marginLeft: 8
296
- },
297
- // Modal overlay
298
- modalOverlay: {
299
- flex: 1,
300
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
301
- justifyContent: 'center',
302
- alignItems: 'center',
303
- padding: 20
304
- },
305
- // Dropdown container
306
- dropdownContainer: {
307
- backgroundColor: night.color.surface,
308
- borderRadius: 16,
309
- borderWidth: 1,
310
- borderColor: night.color.border,
311
- width: '100%',
312
- maxWidth: 500,
313
- maxHeight: '70%',
314
- shadowColor: '#000000',
315
- shadowOpacity: 0.2,
316
- shadowRadius: 20,
317
- shadowOffset: {
318
- width: 0,
319
- height: 10
320
- },
321
- overflow: 'hidden'
322
- },
323
- dropdownHeader: {
324
- flexDirection: 'row',
325
- alignItems: 'center',
326
- justifyContent: 'space-between',
327
- padding: 16,
328
- borderBottomWidth: 1,
329
- borderBottomColor: night.color.separator
330
- },
331
- dropdownTitle: {
332
- fontSize: 14,
333
- fontWeight: '600',
334
- color: night.color.text
335
- },
336
- headerRefreshButton: {
337
- padding: 4
338
- },
339
- headerRefreshText: {
340
- fontSize: 18,
341
- color: night.color.accent
342
- },
343
- dropdownList: {
344
- maxHeight: 400
345
- },
346
- dropdownItem: {
347
- padding: 12,
348
- borderBottomWidth: 1,
349
- borderBottomColor: night.color.separator
350
- },
351
- dropdownItemSelected: {
352
- backgroundColor: night.color.accentSoft
353
- },
354
- // Instance row
355
- instanceRow: {
356
- flexDirection: 'row',
357
- alignItems: 'center',
358
- justifyContent: 'space-between',
359
- gap: 12
360
- },
361
- instanceLeft: {
362
- flex: 1,
363
- gap: 6
364
- },
365
- instanceId: {
366
- fontSize: 13,
367
- fontWeight: '500',
368
- color: night.color.text,
369
- fontFamily: monoFont
370
- },
371
- instanceIdSelected: {
372
- fontWeight: '600',
373
- color: night.color.accent
374
- },
375
- instanceBadges: {
376
- flexDirection: 'row',
377
- flexWrap: 'wrap',
378
- gap: 6
379
- },
380
- badge: {
381
- paddingHorizontal: 6,
382
- paddingVertical: 2,
383
- borderRadius: 4,
384
- borderWidth: 1
385
- },
386
- badgeEncrypted: {
387
- backgroundColor: macOSColors.semantic.success + '15',
388
- borderColor: macOSColors.semantic.success + '40'
389
- },
390
- badgeReadOnly: {
391
- backgroundColor: macOSColors.semantic.warning + '15',
392
- borderColor: macOSColors.semantic.warning + '40'
393
- },
394
- badgeText: {
395
- fontSize: 9,
396
- fontWeight: '500',
397
- color: night.color.textSecondary
398
- },
399
- instanceRight: {
400
- alignItems: 'flex-end'
401
- },
402
- keyCount: {
403
- fontSize: 16,
404
- fontWeight: '600',
405
- color: night.color.text,
406
- fontFamily: monoFont
407
- },
408
- keyCountLabel: {
409
- fontSize: 9,
410
- color: night.color.textTertiary,
411
- textTransform: "uppercase",
412
- letterSpacing: 0.5
413
- }
414
- });
1
+ "use strict";import{storageLabels as x}from"../utils/storageLabels";import{useState as C}from"react";import{View as r,Text as n,StyleSheet as R,TouchableOpacity as c,ScrollView as T,Modal as I}from"react-native";import{macOSColors as d,night as o,monoFont as b}from"@buoy-gg/shared-ui";import{useMMKVInstances as v}from"../hooks/useMMKVInstances";import{isMMKVAvailable as B,getMMKVUnavailableMessage as M}from"../utils/mmkvAvailability";import{jsxs as i,jsx as t}from"react/jsx-runtime";export function MMKVInstanceSelector({selectedInstanceId:a,onSelectInstance:h,showRefreshButton:g=true}){const[w,s]=C(false);const{instances:p,instanceCount:f,refresh:y}=v(false);const u=p.find(l=>l.id===a);const S=l=>{h(l);s(false)};if(!B()){return t(r,{style:e.container,children:i(r,{style:e.unavailableState,children:[i(n,{style:e.unavailableTitle,children:[x.mmkv," Not Available"]}),t(n,{style:e.unavailableDescription,children:M()})]})})}if(f===0){return t(r,{style:e.container,children:i(r,{style:e.emptyState,children:[t(n,{style:e.emptyStateTitle,children:"No MMKV Instances Registered"}),t(n,{style:e.emptyStateDescription,children:"Register MMKV instances using registerMMKVInstance() to monitor them in dev tools."}),g&&t(c,{style:e.refreshButton,onPress:y,activeOpacity:.7,children:t(n,{style:e.refreshButtonText,children:"\u21BB Refresh"})})]})})}return i(r,{style:e.container,children:[i(c,{style:e.selectorButton,onPress:()=>s(true),activeOpacity:.7,children:[t(r,{style:e.selectorContent,children:u?t(m,{instance:u,isSelected:true}):t(n,{style:e.placeholderText,children:"Select MMKV Instance"})}),t(n,{style:e.dropdownArrow,children:"\u25BC"})]}),t(I,{visible:w,transparent:true,animationType:"fade",onRequestClose:()=>s(false),children:t(c,{style:e.modalOverlay,activeOpacity:1,onPress:()=>s(false),children:i(r,{style:e.dropdownContainer,children:[i(r,{style:e.dropdownHeader,children:[i(n,{style:e.dropdownTitle,children:["Select MMKV Instance (",f,")"]}),g&&t(c,{style:e.headerRefreshButton,onPress:y,activeOpacity:.7,children:t(n,{style:e.headerRefreshText,children:"\u21BB"})})]}),t(T,{style:e.dropdownList,children:p.map(l=>t(c,{style:[e.dropdownItem,l.id===a&&e.dropdownItemSelected],onPress:()=>S(l.id),activeOpacity:.7,children:t(m,{instance:l,isSelected:l.id===a})},l.id))})]})})})]})}function m({instance:a,isSelected:h}){return i(r,{style:e.instanceRow,children:[i(r,{style:e.instanceLeft,children:[t(n,{style:[e.instanceId,h&&e.instanceIdSelected],numberOfLines:1,children:a.id}),i(r,{style:e.instanceBadges,children:[a.encrypted&&t(r,{style:[e.badge,e.badgeEncrypted],children:t(n,{style:e.badgeText,children:"\u{1F512} Encrypted"})}),a.readOnly&&t(r,{style:[e.badge,e.badgeReadOnly],children:t(n,{style:e.badgeText,children:"\u{1F441}\uFE0F Read-only"})})]})]}),i(r,{style:e.instanceRight,children:[t(n,{style:e.keyCount,children:a.keyCount}),t(n,{style:e.keyCountLabel,children:"keys"})]})]})}const e=R.create({container:{marginBottom:12},unavailableState:{backgroundColor:d.semantic.warning+"15",borderRadius:12,padding:20,borderWidth:1,borderColor:d.semantic.warning+"40",alignItems:"center",gap:12},unavailableTitle:{fontSize:14,fontWeight:"600",color:d.semantic.warning},unavailableDescription:{fontSize:12,color:o.color.textSecondary,textAlign:"center",lineHeight:18},emptyState:{backgroundColor:o.color.surface,borderRadius:12,padding:20,borderWidth:1,borderColor:o.color.border,alignItems:"center",gap:12},emptyStateTitle:{fontSize:14,fontWeight:"600",color:o.color.text},emptyStateDescription:{fontSize:12,color:o.color.textTertiary,textAlign:"center",lineHeight:18},refreshButton:{marginTop:8,paddingHorizontal:16,paddingVertical:8,backgroundColor:o.color.accentSoft,borderRadius:8,borderWidth:1,borderColor:o.color.accentBorderStrong},refreshButtonText:{fontSize:12,fontWeight:"600",color:o.color.accent},selectorButton:{backgroundColor:o.color.surface,borderRadius:12,borderWidth:1,borderColor:o.color.border,padding:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",shadowColor:"#000000",shadowOpacity:.03,shadowRadius:8,shadowOffset:{width:0,height:2}},selectorContent:{flex:1},placeholderText:{fontSize:13,color:o.color.placeholder,fontStyle:"italic"},dropdownArrow:{fontSize:10,color:o.color.textTertiary,marginLeft:8},modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:20},dropdownContainer:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,width:"100%",maxWidth:500,maxHeight:"70%",shadowColor:"#000000",shadowOpacity:.2,shadowRadius:20,shadowOffset:{width:0,height:10},overflow:"hidden"},dropdownHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:16,borderBottomWidth:1,borderBottomColor:o.color.separator},dropdownTitle:{fontSize:14,fontWeight:"600",color:o.color.text},headerRefreshButton:{padding:4},headerRefreshText:{fontSize:18,color:o.color.accent},dropdownList:{maxHeight:400},dropdownItem:{padding:12,borderBottomWidth:1,borderBottomColor:o.color.separator},dropdownItemSelected:{backgroundColor:o.color.accentSoft},instanceRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},instanceLeft:{flex:1,gap:6},instanceId:{fontSize:13,fontWeight:"500",color:o.color.text,fontFamily:b},instanceIdSelected:{fontWeight:"600",color:o.color.accent},instanceBadges:{flexDirection:"row",flexWrap:"wrap",gap:6},badge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},badgeEncrypted:{backgroundColor:d.semantic.success+"15",borderColor:d.semantic.success+"40"},badgeReadOnly:{backgroundColor:d.semantic.warning+"15",borderColor:d.semantic.warning+"40"},badgeText:{fontSize:9,fontWeight:"500",color:o.color.textSecondary},instanceRight:{alignItems:"flex-end"},keyCount:{fontSize:16,fontWeight:"600",color:o.color.text,fontFamily:b},keyCountLabel:{fontSize:9,color:o.color.textTertiary,textTransform:"uppercase",letterSpacing:.5}});