@devraj-labs/rn-storage-kit 0.1.0
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/LICENSE +21 -0
- package/README.md +235 -0
- package/dist/debug/index.d.ts +3 -0
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/debug/index.js +19 -0
- package/dist/debug/index.js.map +1 -0
- package/dist/debug/storage-debug-panel/index.d.ts +3 -0
- package/dist/debug/storage-debug-panel/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-panel/index.js +19 -0
- package/dist/debug/storage-debug-panel/index.js.map +1 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel-types.d.ts +4 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel-types.d.ts.map +1 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel-types.js +4 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel-types.js.map +1 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel.d.ts +3 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel.d.ts.map +1 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel.js +308 -0
- package/dist/debug/storage-debug-panel/storage-debug-panel.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-colors.d.ts +22 -0
- package/dist/debug/storage-debug-screen/debug-colors.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-colors.js +25 -0
- package/dist/debug/storage-debug-screen/debug-colors.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-data-row/debug-data-row.d.ts +6 -0
- package/dist/debug/storage-debug-screen/debug-data-row/debug-data-row.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-data-row/debug-data-row.js +83 -0
- package/dist/debug/storage-debug-screen/debug-data-row/debug-data-row.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-data-row/index.d.ts +2 -0
- package/dist/debug/storage-debug-screen/debug-data-row/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-data-row/index.js +18 -0
- package/dist/debug/storage-debug-screen/debug-data-row/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-empty/debug-empty.d.ts +7 -0
- package/dist/debug/storage-debug-screen/debug-empty/debug-empty.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-empty/debug-empty.js +17 -0
- package/dist/debug/storage-debug-screen/debug-empty/debug-empty.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-empty/index.d.ts +2 -0
- package/dist/debug/storage-debug-screen/debug-empty/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-empty/index.js +18 -0
- package/dist/debug/storage-debug-screen/debug-empty/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-fab/debug-fab.d.ts +7 -0
- package/dist/debug/storage-debug-screen/debug-fab/debug-fab.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-fab/debug-fab.js +21 -0
- package/dist/debug/storage-debug-screen/debug-fab/debug-fab.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-fab/index.d.ts +2 -0
- package/dist/debug/storage-debug-screen/debug-fab/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-fab/index.js +18 -0
- package/dist/debug/storage-debug-screen/debug-fab/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header-types.d.ts +8 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header-types.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header-types.js +3 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header-types.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header.d.ts +4 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header.js +27 -0
- package/dist/debug/storage-debug-screen/debug-header/debug-header.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-header/index.d.ts +3 -0
- package/dist/debug/storage-debug-screen/debug-header/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-header/index.js +19 -0
- package/dist/debug/storage-debug-screen/debug-header/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-helpers/format-time.d.ts +2 -0
- package/dist/debug/storage-debug-screen/debug-helpers/format-time.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-helpers/format-time.js +12 -0
- package/dist/debug/storage-debug-screen/debug-helpers/format-time.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-helpers/index.d.ts +3 -0
- package/dist/debug/storage-debug-screen/debug-helpers/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-helpers/index.js +19 -0
- package/dist/debug/storage-debug-screen/debug-helpers/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-helpers/read-mmkv-data.d.ts +4 -0
- package/dist/debug/storage-debug-screen/debug-helpers/read-mmkv-data.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-helpers/read-mmkv-data.js +29 -0
- package/dist/debug/storage-debug-screen/debug-helpers/read-mmkv-data.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-log-row/debug-log-row.d.ts +9 -0
- package/dist/debug/storage-debug-screen/debug-log-row/debug-log-row.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-log-row/debug-log-row.js +120 -0
- package/dist/debug/storage-debug-screen/debug-log-row/debug-log-row.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-log-row/index.d.ts +2 -0
- package/dist/debug/storage-debug-screen/debug-log-row/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-log-row/index.js +18 -0
- package/dist/debug/storage-debug-screen/debug-log-row/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/debug-tab-bar.d.ts +6 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/debug-tab-bar.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/debug-tab-bar.js +51 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/debug-tab-bar.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/index.d.ts +2 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/index.js +18 -0
- package/dist/debug/storage-debug-screen/debug-tab-bar/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar-types.d.ts +10 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar-types.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar-types.js +3 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar-types.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar.d.ts +4 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar.js +22 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/debug-toolbar.js.map +1 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/index.d.ts +3 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/index.js +19 -0
- package/dist/debug/storage-debug-screen/debug-toolbar/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/index.d.ts +4 -0
- package/dist/debug/storage-debug-screen/index.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/index.js +20 -0
- package/dist/debug/storage-debug-screen/index.js.map +1 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen-types.d.ts +11 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen-types.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen-types.js +3 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen-types.js.map +1 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen.d.ts +5 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen.d.ts.map +1 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen.js +140 -0
- package/dist/debug/storage-debug-screen/storage-debug-screen.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/index.d.ts +3 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +19 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/logger-types.d.ts +29 -0
- package/dist/logger/logger-types.d.ts.map +1 -0
- package/dist/logger/logger-types.js +5 -0
- package/dist/logger/logger-types.js.map +1 -0
- package/dist/logger/logger.d.ts +10 -0
- package/dist/logger/logger.d.ts.map +1 -0
- package/dist/logger/logger.js +151 -0
- package/dist/logger/logger.js.map +1 -0
- package/dist/mmkv-storage/index.d.ts +2 -0
- package/dist/mmkv-storage/index.d.ts.map +1 -0
- package/dist/mmkv-storage/index.js +18 -0
- package/dist/mmkv-storage/index.js.map +1 -0
- package/dist/mmkv-storage/mmkv-storage.d.ts +11 -0
- package/dist/mmkv-storage/mmkv-storage.d.ts.map +1 -0
- package/dist/mmkv-storage/mmkv-storage.js +156 -0
- package/dist/mmkv-storage/mmkv-storage.js.map +1 -0
- package/dist/secure-storage/index.d.ts +2 -0
- package/dist/secure-storage/index.d.ts.map +1 -0
- package/dist/secure-storage/index.js +18 -0
- package/dist/secure-storage/index.js.map +1 -0
- package/dist/secure-storage/secure-storage.d.ts +9 -0
- package/dist/secure-storage/secure-storage.d.ts.map +1 -0
- package/dist/secure-storage/secure-storage.js +225 -0
- package/dist/secure-storage/secure-storage.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/storage-adapter-types.d.ts +8 -0
- package/dist/types/storage-adapter-types.d.ts.map +1 -0
- package/dist/types/storage-adapter-types.js +3 -0
- package/dist/types/storage-adapter-types.js.map +1 -0
- package/package.json +63 -0
- package/src/index.ts +12 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rishav Jha
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# rn-storage-kit
|
|
2
|
+
|
|
3
|
+
A React Native storage library with a unified adapter interface, structured logging, and a developer debug UI.
|
|
4
|
+
|
|
5
|
+
- **MMKV** for regular key-value storage
|
|
6
|
+
- **Keychain** for sensitive values (tokens, passwords)
|
|
7
|
+
- **Logger** with levels, TTL, MMKV persistence, and production safety
|
|
8
|
+
- **Debug UI** — floating panel and full-screen inspector, dev-only
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm install @devraj-labs/rn-storage-kit
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Peer dependencies
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install react-native-mmkv react-native-keychain
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Follow the native setup guides for both:
|
|
25
|
+
- [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv)
|
|
26
|
+
- [react-native-keychain](https://github.com/oblador/react-native-keychain)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
### MMKV storage
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { MMKVStorageAdapter } from '@devraj-labs/rn-storage-kit';
|
|
36
|
+
|
|
37
|
+
const storage = new MMKVStorageAdapter();
|
|
38
|
+
// or with a custom instance id:
|
|
39
|
+
const storage = new MMKVStorageAdapter('my-app.settings');
|
|
40
|
+
|
|
41
|
+
await storage.set('theme', 'dark');
|
|
42
|
+
const theme = await storage.get('theme'); // 'dark'
|
|
43
|
+
await storage.remove('theme');
|
|
44
|
+
await storage.clear();
|
|
45
|
+
const keys = await storage.getAllKeys();
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Secure storage (Keychain)
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { SecureStorageAdapter } from '@devraj-labs/rn-storage-kit';
|
|
52
|
+
|
|
53
|
+
const secure = new SecureStorageAdapter();
|
|
54
|
+
|
|
55
|
+
await secure.set('auth_token', 'eyJ...');
|
|
56
|
+
const token = await secure.get('auth_token');
|
|
57
|
+
await secure.remove('auth_token');
|
|
58
|
+
await secure.clear();
|
|
59
|
+
const keys = await secure.getAllKeys();
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Secure values are stored in Keychain per-key via `setGenericPassword`. A key index is maintained in a separate MMKV instance (`rn-storage-kit.secure-index`) so `getAllKeys` and `clear` work without Keychain enumeration support.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Logger
|
|
67
|
+
|
|
68
|
+
Logging is **disabled by default** and never runs in production unless explicitly opted in.
|
|
69
|
+
|
|
70
|
+
### Enable
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import { enableLogger } from '@devraj-labs/rn-storage-kit';
|
|
74
|
+
|
|
75
|
+
// Call once at app startup, before any storage calls
|
|
76
|
+
enableLogger({
|
|
77
|
+
level: 'debug', // 'none' | 'error' | 'info' | 'debug'
|
|
78
|
+
maxEntries: 200, // FIFO cap (default: 200)
|
|
79
|
+
ttl: 0, // auto-evict entries older than N ms (0 = off)
|
|
80
|
+
allowInProduction: false,
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Disable
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import { disableLogger } from '@devraj-labs/rn-storage-kit';
|
|
88
|
+
|
|
89
|
+
disableLogger();
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Read and clear logs
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { getLogs, clearLogs } from '@devraj-labs/rn-storage-kit';
|
|
96
|
+
|
|
97
|
+
const entries = getLogs(); // TStorageLogEntry[]
|
|
98
|
+
clearLogs();
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Subscribe to new entries
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import { onNewLog, offNewLog } from '@devraj-labs/rn-storage-kit';
|
|
105
|
+
|
|
106
|
+
const handler = (entry) => console.log(entry);
|
|
107
|
+
onNewLog(handler);
|
|
108
|
+
// later:
|
|
109
|
+
offNewLog(handler);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Log levels
|
|
113
|
+
|
|
114
|
+
| Level | What is recorded |
|
|
115
|
+
|-------|-----------------|
|
|
116
|
+
| `none` | Nothing |
|
|
117
|
+
| `error` | Failed operations only |
|
|
118
|
+
| `info` | All operations — key and adapter visible, values/results stripped |
|
|
119
|
+
| `debug` | Full detail — key, value, result, duration. Secure values are always masked as `***` |
|
|
120
|
+
|
|
121
|
+
### Log entry shape (`TStorageLogEntry`)
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
type TStorageLogEntry = {
|
|
125
|
+
id: string;
|
|
126
|
+
timestamp: number;
|
|
127
|
+
adapter: 'mmkv' | 'secure';
|
|
128
|
+
operation: 'set' | 'get' | 'remove' | 'clear' | 'getAllKeys';
|
|
129
|
+
key?: string;
|
|
130
|
+
value?: string; // '***' for secure ops; absent at info level
|
|
131
|
+
result?: string | null;
|
|
132
|
+
error?: string;
|
|
133
|
+
durationMs: number;
|
|
134
|
+
secure: boolean;
|
|
135
|
+
};
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Persistence
|
|
139
|
+
|
|
140
|
+
Logs are persisted across Metro fast-refresh in a dedicated MMKV instance (`rn-storage-kit.logs`). Persistence writes happen asynchronously via `setImmediate` — storage call performance is unaffected. Secure values never reach the log store.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Production safety
|
|
145
|
+
|
|
146
|
+
- Logger is a no-op in production unless `allowInProduction: true` is passed to `enableLogger`.
|
|
147
|
+
- Secure adapter values are always logged as `***`, regardless of log level.
|
|
148
|
+
- At `info` level, `value` and `result` fields are stripped from all entries.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Debug UI
|
|
153
|
+
|
|
154
|
+
Two components are exported. Both render `null` in production (`!__DEV__`).
|
|
155
|
+
|
|
156
|
+
### `StorageDebugPanel`
|
|
157
|
+
|
|
158
|
+
Floating action button (FAB) that opens a slide-up modal showing the live log stream.
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
import { StorageDebugPanel } from '@devraj-labs/rn-storage-kit';
|
|
162
|
+
|
|
163
|
+
// Place outside your ScrollView, at the root of the screen
|
|
164
|
+
<StorageDebugPanel />
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Features: live log list, clear button, colour-coded by adapter and error state, secure entries shown in purple with masked values.
|
|
168
|
+
|
|
169
|
+
### `StorageDebugScreen`
|
|
170
|
+
|
|
171
|
+
Full-featured debug screen with two tabs.
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
import { StorageDebugScreen } from '@devraj-labs/rn-storage-kit';
|
|
175
|
+
|
|
176
|
+
<StorageDebugScreen />
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
| Tab | Features |
|
|
180
|
+
|-----|----------|
|
|
181
|
+
| **Logs** | Live log stream, search by key/operation/error, toggle newest/oldest sort, clear |
|
|
182
|
+
| **MMKV Data** | Browse all keys and values in the default MMKV store, tap to expand, refresh, clear |
|
|
183
|
+
|
|
184
|
+
Secure (Keychain) data is intentionally excluded from the MMKV Data tab.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## API reference
|
|
189
|
+
|
|
190
|
+
### `MMKVStorageAdapter`
|
|
191
|
+
|
|
192
|
+
| Method | Signature | Description |
|
|
193
|
+
|--------|-----------|-------------|
|
|
194
|
+
| `constructor` | `(id?: string)` | Custom MMKV instance ID. Default: `'rn-storage-kit.default'` |
|
|
195
|
+
| `get` | `(key: string) => Promise<string \| null>` | Returns value or `null` |
|
|
196
|
+
| `set` | `(key: string, value: string) => Promise<void>` | Stores a string value |
|
|
197
|
+
| `remove` | `(key: string) => Promise<void>` | Deletes a key |
|
|
198
|
+
| `clear` | `() => Promise<void>` | Clears the entire MMKV instance |
|
|
199
|
+
| `getAllKeys` | `() => Promise<string[]>` | Returns all stored keys |
|
|
200
|
+
|
|
201
|
+
### `SecureStorageAdapter`
|
|
202
|
+
|
|
203
|
+
Same interface as `MMKVStorageAdapter`. Backed by Keychain via `setGenericPassword` / `getGenericPassword` per service key.
|
|
204
|
+
|
|
205
|
+
### Logger
|
|
206
|
+
|
|
207
|
+
| Export | Signature | Description |
|
|
208
|
+
|--------|-----------|-------------|
|
|
209
|
+
| `enableLogger` | `(options?: TLoggerOptions) => void` | Activates logging |
|
|
210
|
+
| `disableLogger` | `() => void` | Deactivates logging |
|
|
211
|
+
| `getLogs` | `() => TStorageLogEntry[]` | Returns a copy of all current entries |
|
|
212
|
+
| `clearLogs` | `() => void` | Clears entries from memory and MMKV |
|
|
213
|
+
| `onNewLog` | `(cb: TLogListener) => void` | Subscribe to new entries |
|
|
214
|
+
| `offNewLog` | `(cb: TLogListener) => void` | Unsubscribe |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Project structure
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
src/
|
|
222
|
+
mmkv-storage/ MMKVStorageAdapter + TStorageAdapter type
|
|
223
|
+
secure-storage/ SecureStorageAdapter (Keychain-backed)
|
|
224
|
+
logger/ Logger state, enableLogger, log levels, MMKV persistence
|
|
225
|
+
debug/
|
|
226
|
+
storage-debug-panel/ FAB + modal log viewer
|
|
227
|
+
storage-debug-screen/ Full debug screen (data tab + logs tab)
|
|
228
|
+
index.ts Public barrel
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## License
|
|
234
|
+
|
|
235
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/debug/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./storage-debug-panel"), exports);
|
|
18
|
+
__exportStar(require("./storage-debug-screen"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/debug/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,yDAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debug/storage-debug-panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./storage-debug-panel"), exports);
|
|
18
|
+
__exportStar(require("./storage-debug-panel-types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/debug/storage-debug-panel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,8DAA4C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-debug-panel-types.d.ts","sourceRoot":"","sources":["../../../src/debug/storage-debug-panel/storage-debug-panel-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,cAAc,EAAE,gBAAgB,CAAC;CAC/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-debug-panel-types.js","sourceRoot":"","sources":["../../../src/debug/storage-debug-panel/storage-debug-panel-types.ts"],"names":[],"mappings":";AAAA,6CAA6C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-debug-panel.d.ts","sourceRoot":"","sources":["../../../src/debug/storage-debug-panel/storage-debug-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAgJ9E,eAAO,MAAM,iBAAiB,gCAAmC,CAAC"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.StorageDebugPanel = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_native_1 = require("react-native");
|
|
39
|
+
const logger_1 = require("../../logger/logger");
|
|
40
|
+
// ─── Helpers ───────────────────────────────────────────────────────────────────
|
|
41
|
+
function formatTime(ts) {
|
|
42
|
+
const d = new Date(ts);
|
|
43
|
+
const hh = String(d.getHours()).padStart(2, '0');
|
|
44
|
+
const mm = String(d.getMinutes()).padStart(2, '0');
|
|
45
|
+
const ss = String(d.getSeconds()).padStart(2, '0');
|
|
46
|
+
const ms = String(d.getMilliseconds()).padStart(3, '0');
|
|
47
|
+
return `${hh}:${mm}:${ss}.${ms}`;
|
|
48
|
+
}
|
|
49
|
+
// ─── Sub-components ────────────────────────────────────────────────────────────
|
|
50
|
+
const LogRowComponent = ({ item }) => {
|
|
51
|
+
const isError = Boolean(item.error);
|
|
52
|
+
const isSecure = item.secure;
|
|
53
|
+
const accentColor = isError ? C.red : isSecure ? C.purple : C.teal;
|
|
54
|
+
return (<react_native_1.View style={[styles.row, { borderLeftColor: accentColor }]}>
|
|
55
|
+
<react_native_1.View style={styles.rowHeader}>
|
|
56
|
+
<react_native_1.View style={[styles.badge, isSecure ? styles.badgeSecure : styles.badgeMMKV]}>
|
|
57
|
+
<react_native_1.Text style={styles.badgeText}>{item.adapter.toUpperCase()}</react_native_1.Text>
|
|
58
|
+
</react_native_1.View>
|
|
59
|
+
<react_native_1.Text style={[styles.method, { color: accentColor }]}>{item.operation}</react_native_1.Text>
|
|
60
|
+
{isSecure && (<react_native_1.View style={styles.lockBadge}>
|
|
61
|
+
<react_native_1.Text style={styles.lockText}>secure</react_native_1.Text>
|
|
62
|
+
</react_native_1.View>)}
|
|
63
|
+
<react_native_1.Text style={styles.duration}>{item.durationMs}ms</react_native_1.Text>
|
|
64
|
+
<react_native_1.Text style={styles.time}>{formatTime(item.timestamp)}</react_native_1.Text>
|
|
65
|
+
</react_native_1.View>
|
|
66
|
+
|
|
67
|
+
{item.key ? (<react_native_1.Text style={styles.meta} numberOfLines={1}>
|
|
68
|
+
key: <react_native_1.Text style={styles.metaValue}>{item.key}</react_native_1.Text>
|
|
69
|
+
</react_native_1.Text>) : null}
|
|
70
|
+
|
|
71
|
+
{item.value ? (<react_native_1.Text style={styles.meta} numberOfLines={2}>
|
|
72
|
+
value: <react_native_1.Text style={[styles.metaValue, isSecure && styles.masked]}>{item.value}</react_native_1.Text>
|
|
73
|
+
</react_native_1.Text>) : null}
|
|
74
|
+
|
|
75
|
+
{item.result !== undefined && item.result !== null ? (<react_native_1.Text style={styles.meta} numberOfLines={2}>
|
|
76
|
+
result: <react_native_1.Text style={[styles.metaValue, isSecure && styles.masked]}>{item.result}</react_native_1.Text>
|
|
77
|
+
</react_native_1.Text>) : null}
|
|
78
|
+
|
|
79
|
+
{isError ? (<react_native_1.Text style={styles.errorText} numberOfLines={3}>
|
|
80
|
+
{item.error}
|
|
81
|
+
</react_native_1.Text>) : null}
|
|
82
|
+
</react_native_1.View>);
|
|
83
|
+
};
|
|
84
|
+
const LogRow = (0, react_1.memo)(LogRowComponent);
|
|
85
|
+
// ─── Main component ────────────────────────────────────────────────────────────
|
|
86
|
+
const StorageDebugPanelComponent = () => {
|
|
87
|
+
if (!__DEV__)
|
|
88
|
+
return null;
|
|
89
|
+
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
90
|
+
const [entries, setEntries] = (0, react_1.useState)(() => (0, logger_1.getLogs)());
|
|
91
|
+
const listRef = (0, react_1.useRef)(null);
|
|
92
|
+
(0, react_1.useEffect)(() => {
|
|
93
|
+
const handler = () => setEntries((0, logger_1.getLogs)());
|
|
94
|
+
(0, logger_1.onNewLog)(handler);
|
|
95
|
+
return () => (0, logger_1.offNewLog)(handler);
|
|
96
|
+
}, []);
|
|
97
|
+
const handleClear = (0, react_1.useCallback)(() => {
|
|
98
|
+
(0, logger_1.clearLogs)();
|
|
99
|
+
setEntries([]);
|
|
100
|
+
}, []);
|
|
101
|
+
return (<>
|
|
102
|
+
<react_native_1.TouchableOpacity style={styles.fab} onPress={() => setVisible(true)} activeOpacity={0.8}>
|
|
103
|
+
<react_native_1.Text style={styles.fabText}>DB</react_native_1.Text>
|
|
104
|
+
</react_native_1.TouchableOpacity>
|
|
105
|
+
|
|
106
|
+
<react_native_1.Modal visible={visible} animationType="slide" transparent onRequestClose={() => setVisible(false)}>
|
|
107
|
+
<react_native_1.View style={styles.overlay}>
|
|
108
|
+
<react_native_1.View style={styles.panel}>
|
|
109
|
+
<react_native_1.View style={styles.panelHeader}>
|
|
110
|
+
<react_native_1.Text style={styles.panelTitle}>Storage Logs</react_native_1.Text>
|
|
111
|
+
<react_native_1.View style={styles.headerActions}>
|
|
112
|
+
<react_native_1.TouchableOpacity onPress={handleClear} style={styles.clearBtn}>
|
|
113
|
+
<react_native_1.Text style={styles.clearBtnText}>Clear</react_native_1.Text>
|
|
114
|
+
</react_native_1.TouchableOpacity>
|
|
115
|
+
<react_native_1.TouchableOpacity onPress={() => setVisible(false)} style={styles.closeBtn}>
|
|
116
|
+
<react_native_1.Text style={styles.closeBtnText}>✕</react_native_1.Text>
|
|
117
|
+
</react_native_1.TouchableOpacity>
|
|
118
|
+
</react_native_1.View>
|
|
119
|
+
</react_native_1.View>
|
|
120
|
+
|
|
121
|
+
{entries.length === 0 ? (<react_native_1.View style={styles.emptyState}>
|
|
122
|
+
<react_native_1.Text style={styles.emptyText}>No logs yet. Make a storage call to see it here.</react_native_1.Text>
|
|
123
|
+
</react_native_1.View>) : (<react_native_1.FlatList ref={listRef} data={entries} keyExtractor={(item) => item.id} renderItem={({ item }) => <LogRow item={item}/>} contentContainerStyle={styles.listContent}/>)}
|
|
124
|
+
</react_native_1.View>
|
|
125
|
+
</react_native_1.View>
|
|
126
|
+
</react_native_1.Modal>
|
|
127
|
+
</>);
|
|
128
|
+
};
|
|
129
|
+
exports.StorageDebugPanel = (0, react_1.memo)(StorageDebugPanelComponent);
|
|
130
|
+
// ─── Palette ───────────────────────────────────────────────────────────────────
|
|
131
|
+
const C = {
|
|
132
|
+
teal: '#00d4aa',
|
|
133
|
+
purple: '#a78bfa',
|
|
134
|
+
red: '#ff6b6b',
|
|
135
|
+
};
|
|
136
|
+
// ─── Styles ────────────────────────────────────────────────────────────────────
|
|
137
|
+
const styles = react_native_1.StyleSheet.create({
|
|
138
|
+
fab: {
|
|
139
|
+
position: 'absolute',
|
|
140
|
+
bottom: 40,
|
|
141
|
+
right: 20,
|
|
142
|
+
width: 48,
|
|
143
|
+
height: 48,
|
|
144
|
+
borderRadius: 24,
|
|
145
|
+
backgroundColor: '#1a1a2e',
|
|
146
|
+
alignItems: 'center',
|
|
147
|
+
justifyContent: 'center',
|
|
148
|
+
elevation: 8,
|
|
149
|
+
shadowColor: '#000',
|
|
150
|
+
shadowOffset: { width: 0, height: 2 },
|
|
151
|
+
shadowOpacity: 0.4,
|
|
152
|
+
shadowRadius: 4,
|
|
153
|
+
zIndex: 9999,
|
|
154
|
+
},
|
|
155
|
+
fabText: {
|
|
156
|
+
color: C.teal,
|
|
157
|
+
fontWeight: '700',
|
|
158
|
+
fontSize: 13,
|
|
159
|
+
fontFamily: 'monospace',
|
|
160
|
+
},
|
|
161
|
+
overlay: {
|
|
162
|
+
flex: 1,
|
|
163
|
+
justifyContent: 'flex-end',
|
|
164
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
165
|
+
},
|
|
166
|
+
panel: {
|
|
167
|
+
height: '75%',
|
|
168
|
+
backgroundColor: '#0d0d1a',
|
|
169
|
+
borderTopLeftRadius: 16,
|
|
170
|
+
borderTopRightRadius: 16,
|
|
171
|
+
overflow: 'hidden',
|
|
172
|
+
},
|
|
173
|
+
panelHeader: {
|
|
174
|
+
flexDirection: 'row',
|
|
175
|
+
alignItems: 'center',
|
|
176
|
+
justifyContent: 'space-between',
|
|
177
|
+
paddingHorizontal: 16,
|
|
178
|
+
paddingVertical: 12,
|
|
179
|
+
borderBottomWidth: 1,
|
|
180
|
+
borderBottomColor: '#1e1e3a',
|
|
181
|
+
},
|
|
182
|
+
panelTitle: {
|
|
183
|
+
color: '#ffffff',
|
|
184
|
+
fontWeight: '700',
|
|
185
|
+
fontSize: 16,
|
|
186
|
+
},
|
|
187
|
+
headerActions: {
|
|
188
|
+
flexDirection: 'row',
|
|
189
|
+
gap: 8,
|
|
190
|
+
},
|
|
191
|
+
clearBtn: {
|
|
192
|
+
paddingHorizontal: 12,
|
|
193
|
+
paddingVertical: 6,
|
|
194
|
+
backgroundColor: '#2a1a1a',
|
|
195
|
+
borderRadius: 6,
|
|
196
|
+
borderWidth: 1,
|
|
197
|
+
borderColor: C.red,
|
|
198
|
+
},
|
|
199
|
+
clearBtnText: {
|
|
200
|
+
color: C.red,
|
|
201
|
+
fontSize: 12,
|
|
202
|
+
fontWeight: '600',
|
|
203
|
+
},
|
|
204
|
+
closeBtn: {
|
|
205
|
+
paddingHorizontal: 12,
|
|
206
|
+
paddingVertical: 6,
|
|
207
|
+
backgroundColor: '#1a1a2e',
|
|
208
|
+
borderRadius: 6,
|
|
209
|
+
},
|
|
210
|
+
closeBtnText: {
|
|
211
|
+
color: '#aaaacc',
|
|
212
|
+
fontSize: 14,
|
|
213
|
+
},
|
|
214
|
+
listContent: {
|
|
215
|
+
padding: 8,
|
|
216
|
+
},
|
|
217
|
+
emptyState: {
|
|
218
|
+
flex: 1,
|
|
219
|
+
alignItems: 'center',
|
|
220
|
+
justifyContent: 'center',
|
|
221
|
+
padding: 32,
|
|
222
|
+
},
|
|
223
|
+
emptyText: {
|
|
224
|
+
color: '#666688',
|
|
225
|
+
fontSize: 14,
|
|
226
|
+
textAlign: 'center',
|
|
227
|
+
},
|
|
228
|
+
row: {
|
|
229
|
+
backgroundColor: '#13132a',
|
|
230
|
+
borderRadius: 8,
|
|
231
|
+
padding: 10,
|
|
232
|
+
marginBottom: 6,
|
|
233
|
+
borderLeftWidth: 3,
|
|
234
|
+
},
|
|
235
|
+
rowHeader: {
|
|
236
|
+
flexDirection: 'row',
|
|
237
|
+
alignItems: 'center',
|
|
238
|
+
gap: 6,
|
|
239
|
+
marginBottom: 4,
|
|
240
|
+
flexWrap: 'wrap',
|
|
241
|
+
},
|
|
242
|
+
badge: {
|
|
243
|
+
paddingHorizontal: 6,
|
|
244
|
+
paddingVertical: 2,
|
|
245
|
+
borderRadius: 4,
|
|
246
|
+
},
|
|
247
|
+
badgeMMKV: {
|
|
248
|
+
backgroundColor: '#1a3a5c',
|
|
249
|
+
},
|
|
250
|
+
badgeSecure: {
|
|
251
|
+
backgroundColor: '#3a1a5c',
|
|
252
|
+
},
|
|
253
|
+
badgeText: {
|
|
254
|
+
color: '#ffffff',
|
|
255
|
+
fontSize: 9,
|
|
256
|
+
fontWeight: '700',
|
|
257
|
+
fontFamily: 'monospace',
|
|
258
|
+
},
|
|
259
|
+
lockBadge: {
|
|
260
|
+
paddingHorizontal: 5,
|
|
261
|
+
paddingVertical: 2,
|
|
262
|
+
borderRadius: 4,
|
|
263
|
+
backgroundColor: '#2a1a3a',
|
|
264
|
+
borderWidth: 1,
|
|
265
|
+
borderColor: '#a78bfa44',
|
|
266
|
+
},
|
|
267
|
+
lockText: {
|
|
268
|
+
color: C.purple,
|
|
269
|
+
fontSize: 9,
|
|
270
|
+
fontFamily: 'monospace',
|
|
271
|
+
},
|
|
272
|
+
method: {
|
|
273
|
+
fontWeight: '700',
|
|
274
|
+
fontSize: 13,
|
|
275
|
+
fontFamily: 'monospace',
|
|
276
|
+
flex: 1,
|
|
277
|
+
},
|
|
278
|
+
duration: {
|
|
279
|
+
color: '#888899',
|
|
280
|
+
fontSize: 11,
|
|
281
|
+
fontFamily: 'monospace',
|
|
282
|
+
},
|
|
283
|
+
time: {
|
|
284
|
+
color: '#555577',
|
|
285
|
+
fontSize: 10,
|
|
286
|
+
fontFamily: 'monospace',
|
|
287
|
+
},
|
|
288
|
+
meta: {
|
|
289
|
+
color: '#888899',
|
|
290
|
+
fontSize: 11,
|
|
291
|
+
fontFamily: 'monospace',
|
|
292
|
+
marginTop: 2,
|
|
293
|
+
},
|
|
294
|
+
metaValue: {
|
|
295
|
+
color: '#ccccee',
|
|
296
|
+
},
|
|
297
|
+
masked: {
|
|
298
|
+
color: C.purple,
|
|
299
|
+
letterSpacing: 2,
|
|
300
|
+
},
|
|
301
|
+
errorText: {
|
|
302
|
+
color: C.red,
|
|
303
|
+
fontSize: 11,
|
|
304
|
+
fontFamily: 'monospace',
|
|
305
|
+
marginTop: 4,
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
//# sourceMappingURL=storage-debug-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-debug-panel.js","sourceRoot":"","sources":["../../../src/debug/storage-debug-panel/storage-debug-panel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8E;AAC9E,+CAOsB;AAEtB,gDAA8E;AAG9E,kFAAkF;AAElF,SAAS,UAAU,CAAC,EAAU;IAC5B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACjD,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnD,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnD,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACxD,OAAO,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;AACnC,CAAC;AAED,kFAAkF;AAElF,MAAM,eAAe,GAA2B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ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