@buoy-gg/storage 1.7.2
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/README.md +607 -0
- package/lib/commonjs/index.js +34 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/preset.js +94 -0
- package/lib/commonjs/storage/components/DiffViewer/DiffOptionsPanel.js +356 -0
- package/lib/commonjs/storage/components/DiffViewer/TreeDiffViewer.js +29 -0
- package/lib/commonjs/storage/components/DiffViewer/components/DiffSummary.js +121 -0
- package/lib/commonjs/storage/components/DiffViewer/modes/ThemedSplitView.js +419 -0
- package/lib/commonjs/storage/components/DiffViewer/themes/diffThemes.js +122 -0
- package/lib/commonjs/storage/components/GameUIStorageBrowser.js +924 -0
- package/lib/commonjs/storage/components/GameUIStorageStats.js +746 -0
- package/lib/commonjs/storage/components/MMKVInstanceInfoPanel.js +257 -0
- package/lib/commonjs/storage/components/MMKVInstanceSelector.js +418 -0
- package/lib/commonjs/storage/components/SelectionActionBar.js +224 -0
- package/lib/commonjs/storage/components/StorageActionButtons.js +239 -0
- package/lib/commonjs/storage/components/StorageActions.js +192 -0
- package/lib/commonjs/storage/components/StorageBrowserMode.js +31 -0
- package/lib/commonjs/storage/components/StorageEventDetailContent.js +1025 -0
- package/lib/commonjs/storage/components/StorageEventFilterView.js +141 -0
- package/lib/commonjs/storage/components/StorageEventListener.js +357 -0
- package/lib/commonjs/storage/components/StorageEventsSection.js +24 -0
- package/lib/commonjs/storage/components/StorageFilterCards.js +345 -0
- package/lib/commonjs/storage/components/StorageFilterViewV2.js +42 -0
- package/lib/commonjs/storage/components/StorageKeyCard.js +516 -0
- package/lib/commonjs/storage/components/StorageKeyRow.js +356 -0
- package/lib/commonjs/storage/components/StorageKeySection.js +105 -0
- package/lib/commonjs/storage/components/StorageKeyStats.js +344 -0
- package/lib/commonjs/storage/components/StorageModalWithTabs.js +871 -0
- package/lib/commonjs/storage/components/StorageSection.js +43 -0
- package/lib/commonjs/storage/hooks/useAsyncStorageKeys.js +126 -0
- package/lib/commonjs/storage/hooks/useMMKVInstances.js +221 -0
- package/lib/commonjs/storage/hooks/useMMKVKeys.js +362 -0
- package/lib/commonjs/storage/hooks/useTickEverySecond.js +21 -0
- package/lib/commonjs/storage/index.js +148 -0
- package/lib/commonjs/storage/types.js +5 -0
- package/lib/commonjs/storage/utils/AsyncStorageListener.js +510 -0
- package/lib/commonjs/storage/utils/MMKVInstanceRegistry.js +202 -0
- package/lib/commonjs/storage/utils/MMKVListener.js +380 -0
- package/lib/commonjs/storage/utils/clearAllStorage.js +47 -0
- package/lib/commonjs/storage/utils/index.js +180 -0
- package/lib/commonjs/storage/utils/lineDiff.js +363 -0
- package/lib/commonjs/storage/utils/mmkvAvailability.js +62 -0
- package/lib/commonjs/storage/utils/mmkvTypeDetection.js +139 -0
- package/lib/commonjs/storage/utils/objectDiff.js +157 -0
- package/lib/commonjs/storage/utils/safeAsyncStorage.js +140 -0
- package/lib/commonjs/storage/utils/storageActionHelpers.js +46 -0
- package/lib/commonjs/storage/utils/storageQueryUtils.js +35 -0
- package/lib/commonjs/storage/utils/valueType.js +18 -0
- package/lib/module/index.js +7 -0
- package/lib/module/preset.js +89 -0
- package/lib/module/storage/components/DiffViewer/DiffOptionsPanel.js +352 -0
- package/lib/module/storage/components/DiffViewer/TreeDiffViewer.js +25 -0
- package/lib/module/storage/components/DiffViewer/components/DiffSummary.js +117 -0
- package/lib/module/storage/components/DiffViewer/modes/ThemedSplitView.js +415 -0
- package/lib/module/storage/components/DiffViewer/themes/diffThemes.js +118 -0
- package/lib/module/storage/components/GameUIStorageBrowser.js +922 -0
- package/lib/module/storage/components/GameUIStorageStats.js +742 -0
- package/lib/module/storage/components/MMKVInstanceInfoPanel.js +253 -0
- package/lib/module/storage/components/MMKVInstanceSelector.js +414 -0
- package/lib/module/storage/components/SelectionActionBar.js +221 -0
- package/lib/module/storage/components/StorageActionButtons.js +236 -0
- package/lib/module/storage/components/StorageActions.js +189 -0
- package/lib/module/storage/components/StorageBrowserMode.js +27 -0
- package/lib/module/storage/components/StorageEventDetailContent.js +1020 -0
- package/lib/module/storage/components/StorageEventFilterView.js +137 -0
- package/lib/module/storage/components/StorageEventListener.js +354 -0
- package/lib/module/storage/components/StorageEventsSection.js +20 -0
- package/lib/module/storage/components/StorageFilterCards.js +341 -0
- package/lib/module/storage/components/StorageFilterViewV2.js +38 -0
- package/lib/module/storage/components/StorageKeyCard.js +513 -0
- package/lib/module/storage/components/StorageKeyRow.js +353 -0
- package/lib/module/storage/components/StorageKeySection.js +101 -0
- package/lib/module/storage/components/StorageKeyStats.js +340 -0
- package/lib/module/storage/components/StorageModalWithTabs.js +867 -0
- package/lib/module/storage/components/StorageSection.js +40 -0
- package/lib/module/storage/hooks/useAsyncStorageKeys.js +121 -0
- package/lib/module/storage/hooks/useMMKVInstances.js +216 -0
- package/lib/module/storage/hooks/useMMKVKeys.js +359 -0
- package/lib/module/storage/hooks/useTickEverySecond.js +18 -0
- package/lib/module/storage/index.js +25 -0
- package/lib/module/storage/types.js +3 -0
- package/lib/module/storage/utils/AsyncStorageListener.js +500 -0
- package/lib/module/storage/utils/MMKVInstanceRegistry.js +196 -0
- package/lib/module/storage/utils/MMKVListener.js +367 -0
- package/lib/module/storage/utils/clearAllStorage.js +42 -0
- package/lib/module/storage/utils/index.js +22 -0
- package/lib/module/storage/utils/lineDiff.js +359 -0
- package/lib/module/storage/utils/mmkvAvailability.js +56 -0
- package/lib/module/storage/utils/mmkvTypeDetection.js +133 -0
- package/lib/module/storage/utils/objectDiff.js +153 -0
- package/lib/module/storage/utils/safeAsyncStorage.js +134 -0
- package/lib/module/storage/utils/storageActionHelpers.js +42 -0
- package/lib/module/storage/utils/storageQueryUtils.js +30 -0
- package/lib/module/storage/utils/valueType.js +14 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts +90 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts +18 -0
- package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts.map +1 -0
- package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts +7 -0
- package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts.map +1 -0
- package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts +12 -0
- package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts.map +1 -0
- package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts +13 -0
- package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts.map +1 -0
- package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts +64 -0
- package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts.map +1 -0
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts +16 -0
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -0
- package/lib/typescript/storage/components/GameUIStorageStats.d.ts +7 -0
- package/lib/typescript/storage/components/GameUIStorageStats.d.ts.map +1 -0
- package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts +42 -0
- package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts.map +1 -0
- package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts +35 -0
- package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts.map +1 -0
- package/lib/typescript/storage/components/SelectionActionBar.d.ts +21 -0
- package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageActionButtons.d.ts +21 -0
- package/lib/typescript/storage/components/StorageActionButtons.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageActions.d.ts +10 -0
- package/lib/typescript/storage/components/StorageActions.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageBrowserMode.d.ts +18 -0
- package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageEventDetailContent.d.ts +40 -0
- package/lib/typescript/storage/components/StorageEventDetailContent.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageEventFilterView.d.ts +11 -0
- package/lib/typescript/storage/components/StorageEventFilterView.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageEventListener.d.ts +6 -0
- package/lib/typescript/storage/components/StorageEventListener.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageEventsSection.d.ts +7 -0
- package/lib/typescript/storage/components/StorageEventsSection.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageFilterCards.d.ts +36 -0
- package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageFilterViewV2.d.ts +9 -0
- package/lib/typescript/storage/components/StorageFilterViewV2.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageKeyCard.d.ts +17 -0
- package/lib/typescript/storage/components/StorageKeyCard.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageKeyRow.d.ts +15 -0
- package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageKeySection.d.ts +25 -0
- package/lib/typescript/storage/components/StorageKeySection.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageKeyStats.d.ts +15 -0
- package/lib/typescript/storage/components/StorageKeyStats.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageModalWithTabs.d.ts +13 -0
- package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +1 -0
- package/lib/typescript/storage/components/StorageSection.d.ts +10 -0
- package/lib/typescript/storage/components/StorageSection.d.ts.map +1 -0
- package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts +10 -0
- package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts.map +1 -0
- package/lib/typescript/storage/hooks/useMMKVInstances.d.ts +114 -0
- package/lib/typescript/storage/hooks/useMMKVInstances.d.ts.map +1 -0
- package/lib/typescript/storage/hooks/useMMKVKeys.d.ts +94 -0
- package/lib/typescript/storage/hooks/useMMKVKeys.d.ts.map +1 -0
- package/lib/typescript/storage/hooks/useTickEverySecond.d.ts +6 -0
- package/lib/typescript/storage/hooks/useTickEverySecond.d.ts.map +1 -0
- package/lib/typescript/storage/index.d.ts +15 -0
- package/lib/typescript/storage/index.d.ts.map +1 -0
- package/lib/typescript/storage/types.d.ts +41 -0
- package/lib/typescript/storage/types.d.ts.map +1 -0
- package/lib/typescript/storage/utils/AsyncStorageListener.d.ts +195 -0
- package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +1 -0
- package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts +224 -0
- package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts.map +1 -0
- package/lib/typescript/storage/utils/MMKVListener.d.ts +218 -0
- package/lib/typescript/storage/utils/MMKVListener.d.ts.map +1 -0
- package/lib/typescript/storage/utils/clearAllStorage.d.ts +11 -0
- package/lib/typescript/storage/utils/clearAllStorage.d.ts.map +1 -0
- package/lib/typescript/storage/utils/index.d.ts +8 -0
- package/lib/typescript/storage/utils/index.d.ts.map +1 -0
- package/lib/typescript/storage/utils/lineDiff.d.ts +34 -0
- package/lib/typescript/storage/utils/lineDiff.d.ts.map +1 -0
- package/lib/typescript/storage/utils/mmkvAvailability.d.ts +23 -0
- package/lib/typescript/storage/utils/mmkvAvailability.d.ts.map +1 -0
- package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts +71 -0
- package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts.map +1 -0
- package/lib/typescript/storage/utils/objectDiff.d.ts +35 -0
- package/lib/typescript/storage/utils/objectDiff.d.ts.map +1 -0
- package/lib/typescript/storage/utils/safeAsyncStorage.d.ts +56 -0
- package/lib/typescript/storage/utils/safeAsyncStorage.d.ts.map +1 -0
- package/lib/typescript/storage/utils/storageActionHelpers.d.ts +5 -0
- package/lib/typescript/storage/utils/storageActionHelpers.d.ts.map +1 -0
- package/lib/typescript/storage/utils/storageQueryUtils.d.ts +6 -0
- package/lib/typescript/storage/utils/storageQueryUtils.d.ts.map +1 -0
- package/lib/typescript/storage/utils/valueType.d.ts +3 -0
- package/lib/typescript/storage/utils/valueType.d.ts.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RequiredStorageKey } from "../types";
|
|
2
|
+
import { MutableRefObject } from "react";
|
|
3
|
+
interface StorageBrowserModeProps {
|
|
4
|
+
requiredStorageKeys?: RequiredStorageKey[];
|
|
5
|
+
showFilters?: boolean;
|
|
6
|
+
ignoredPatterns?: Set<string>;
|
|
7
|
+
onTogglePattern?: (pattern: string) => void;
|
|
8
|
+
onAddPattern?: (pattern: string) => void;
|
|
9
|
+
searchQuery?: string;
|
|
10
|
+
storageDataRef?: MutableRefObject<any[]>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Storage browser mode component
|
|
14
|
+
* Displays storage keys with game UI styled interface
|
|
15
|
+
*/
|
|
16
|
+
export declare function StorageBrowserMode({ requiredStorageKeys, showFilters, ignoredPatterns, onTogglePattern, onAddPattern, searchQuery, storageDataRef, }: StorageBrowserModeProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StorageBrowserMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageBrowserMode.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageBrowserMode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,UAAU,uBAAuB;IAC/B,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,mBAAwB,EACxB,WAAmB,EACnB,eAA2B,EAC3B,eAAe,EACf,YAAY,EACZ,WAAgB,EAChB,cAAc,GACf,EAAE,uBAAuB,+BAYzB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AsyncStorageEvent } from "../utils/AsyncStorageListener";
|
|
2
|
+
type MMKVEvent = {
|
|
3
|
+
action: string;
|
|
4
|
+
timestamp: Date;
|
|
5
|
+
instanceId: string;
|
|
6
|
+
data?: {
|
|
7
|
+
key?: string;
|
|
8
|
+
value?: any;
|
|
9
|
+
valueType?: string;
|
|
10
|
+
success?: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type StorageEvent = (AsyncStorageEvent & {
|
|
14
|
+
storageType?: 'async';
|
|
15
|
+
}) | (MMKVEvent & {
|
|
16
|
+
storageType?: 'mmkv';
|
|
17
|
+
});
|
|
18
|
+
interface StorageKeyConversation {
|
|
19
|
+
key: string;
|
|
20
|
+
lastEvent: StorageEvent;
|
|
21
|
+
events: StorageEvent[];
|
|
22
|
+
totalOperations: number;
|
|
23
|
+
currentValue: unknown;
|
|
24
|
+
valueType: "string" | "number" | "boolean" | "null" | "undefined" | "object" | "array";
|
|
25
|
+
storageTypes?: Set<'async' | 'mmkv'>;
|
|
26
|
+
}
|
|
27
|
+
interface StorageEventDetailContentProps {
|
|
28
|
+
conversation: StorageKeyConversation;
|
|
29
|
+
selectedEventIndex?: number;
|
|
30
|
+
onEventIndexChange?: (index: number) => void;
|
|
31
|
+
disableInternalFooter?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function StorageEventDetailContent({ conversation, selectedEventIndex, onEventIndexChange, disableInternalFooter, }: StorageEventDetailContentProps): import("react").JSX.Element;
|
|
34
|
+
export declare function StorageEventDetailFooter({ conversation, selectedEventIndex, onEventIndexChange, }: {
|
|
35
|
+
conversation: StorageKeyConversation;
|
|
36
|
+
selectedEventIndex?: number;
|
|
37
|
+
onEventIndexChange?: (index: number) => void;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=StorageEventDetailContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageEventDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventDetailContent.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAkDlE,KAAK,SAAS,GAAG;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,GAAG,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,KAAK,YAAY,GAAG,CAAC,iBAAiB,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,CAAC,SAAS,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7G,UAAU,sBAAsB;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,YAAY,CAAC;IACxB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EACL,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,WAAW,GACX,QAAQ,GACR,OAAO,CAAC;IACZ,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;CACtC;AAED,UAAU,8BAA8B;IACtC,YAAY,EAAE,sBAAsB,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,YAAY,EACZ,kBAAsB,EACtB,kBAA6B,EAC7B,qBAA6B,GAC9B,EAAE,8BAA8B,+BAmvBhC;AAGD,wBAAgB,wBAAwB,CAAC,EACvC,YAAY,EACZ,kBAAsB,EACtB,kBAA6B,GAC9B,EAAE;IACD,YAAY,EAAE,sBAAsB,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,+BA+BA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface StorageEventFilterViewProps {
|
|
2
|
+
ignoredPatterns: Set<string>;
|
|
3
|
+
onTogglePattern: (pattern: string) => void;
|
|
4
|
+
onAddPattern: (pattern: string) => void;
|
|
5
|
+
availableKeys?: string[];
|
|
6
|
+
enabledStorageTypes: Set<'async' | 'mmkv' | 'secure'>;
|
|
7
|
+
onToggleStorageType: (type: 'async' | 'mmkv' | 'secure') => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function StorageEventFilterView({ ignoredPatterns, onTogglePattern, onAddPattern, availableKeys, enabledStorageTypes, onToggleStorageType, }: StorageEventFilterViewProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=StorageEventFilterView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageEventFilterView.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventFilterView.tsx"],"names":[],"mappings":"AAWA,UAAU,2BAA2B;IACnC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;IACtD,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,KAAK,IAAI,CAAC;CAClE;AAED,wBAAgB,sBAAsB,CAAC,EACrC,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,2BAA2B,+BAgH7B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage event listener component for monitoring AsyncStorage and MMKV operations
|
|
3
|
+
* Follows the Sentry component pattern for consistency
|
|
4
|
+
*/
|
|
5
|
+
export declare function StorageEventListener(): import("react").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=StorageEventListener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageEventListener.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventListener.tsx"],"names":[],"mappings":"AA2CA;;;GAGG;AACH,wBAAgB,oBAAoB,uCA2OnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface StorageEventsSectionProps {
|
|
2
|
+
onPress: () => void;
|
|
3
|
+
eventCount?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function StorageEventsSection({ onPress, eventCount, }: StorageEventsSectionProps): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=StorageEventsSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageEventsSection.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventsSection.tsx"],"names":[],"mappings":"AAEA,UAAU,yBAAyB;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,UAAc,GACf,EAAE,yBAAyB,+BAe3B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type StorageFilterType = "all" | "missing" | "issues";
|
|
2
|
+
export type StorageTypeFilter = "all" | "async" | "mmkv" | "secure";
|
|
3
|
+
interface StorageFilterCardsProps {
|
|
4
|
+
stats: {
|
|
5
|
+
totalCount: number;
|
|
6
|
+
requiredCount: number;
|
|
7
|
+
optionalCount: number;
|
|
8
|
+
presentRequiredCount: number;
|
|
9
|
+
missingCount: number;
|
|
10
|
+
wrongValueCount: number;
|
|
11
|
+
wrongTypeCount: number;
|
|
12
|
+
devToolsCount: number;
|
|
13
|
+
asyncCount?: number;
|
|
14
|
+
mmkvCount?: number;
|
|
15
|
+
secureCount?: number;
|
|
16
|
+
};
|
|
17
|
+
tabStats?: {
|
|
18
|
+
validCount: number;
|
|
19
|
+
missingCount: number;
|
|
20
|
+
issuesCount: number;
|
|
21
|
+
asyncCount: number;
|
|
22
|
+
mmkvCount: number;
|
|
23
|
+
secureCount: number;
|
|
24
|
+
totalCount: number;
|
|
25
|
+
};
|
|
26
|
+
healthPercentage: number;
|
|
27
|
+
healthStatus: string;
|
|
28
|
+
healthColor: string;
|
|
29
|
+
activeFilter?: StorageFilterType;
|
|
30
|
+
onFilterChange?: (filter: StorageFilterType) => void;
|
|
31
|
+
activeStorageType?: StorageTypeFilter;
|
|
32
|
+
onStorageTypeChange?: (type: StorageTypeFilter) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function StorageFilterCards({ stats, tabStats, healthPercentage, healthStatus, healthColor, activeFilter, onFilterChange, activeStorageType, onStorageTypeChange, }: StorageFilterCardsProps): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=StorageFilterCards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageFilterCards.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageFilterCards.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AASpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;QACtB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACrD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAoB,EACpB,cAAc,EACd,iBAAyB,EACzB,mBAAmB,GACpB,EAAE,uBAAuB,+BAuQzB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface StorageFilterViewV2Props {
|
|
2
|
+
ignoredPatterns: Set<string>;
|
|
3
|
+
onTogglePattern: (pattern: string) => void;
|
|
4
|
+
onAddPattern: (pattern: string) => void;
|
|
5
|
+
availableKeys?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function StorageFilterViewV2({ ignoredPatterns, onTogglePattern, onAddPattern, availableKeys, }: StorageFilterViewV2Props): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=StorageFilterViewV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageFilterViewV2.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageFilterViewV2.tsx"],"names":[],"mappings":"AAMA,UAAU,wBAAwB;IAChC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAkB,GACnB,EAAE,wBAAwB,+BAkC1B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StorageKeyInfo } from "../types";
|
|
2
|
+
interface StorageKeyCardProps {
|
|
3
|
+
storageKey: StorageKeyInfo;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
onToggle: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Storage key card component following composition principles [[rule3]]
|
|
9
|
+
*
|
|
10
|
+
* Applied principles:
|
|
11
|
+
* - Decompose by Responsibility: Single purpose component for storage key display
|
|
12
|
+
* - Prefer Composition over Configuration: Reuses existing patterns from EnvVarCard
|
|
13
|
+
* - Extract Reusable Logic: Shares formatValue and status config patterns
|
|
14
|
+
*/
|
|
15
|
+
export declare function StorageKeyCard({ storageKey, isExpanded, onToggle, }: StorageKeyCardProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=StorageKeyCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageKeyCard.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyCard.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA8B1C,UAAU,mBAAmB;IAC3B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAiED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE,mBAAmB,+BA4LrB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StorageKeyInfo } from "../types";
|
|
2
|
+
interface StorageKeyRowProps {
|
|
3
|
+
storageKey: StorageKeyInfo;
|
|
4
|
+
isExpanded?: boolean;
|
|
5
|
+
onPress?: (storageKey: StorageKeyInfo) => void;
|
|
6
|
+
/** Whether selection mode is active */
|
|
7
|
+
isSelectMode?: boolean;
|
|
8
|
+
/** Whether this item is selected */
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
/** Callback when selection changes */
|
|
11
|
+
onSelectionChange?: (storageKey: StorageKeyInfo, selected: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function StorageKeyRow({ storageKey, isExpanded, onPress, isSelectMode, isSelected, onSelectionChange, }: StorageKeyRowProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=StorageKeyRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageKeyRow.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyRow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAyB1C,UAAU,kBAAkB;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IAC/C,uCAAuC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7E;AA6CD,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,UAAU,EACV,OAAO,EACP,YAAoB,EACpB,UAAkB,EAClB,iBAAiB,GAClB,EAAE,kBAAkB,+BAgMpB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StorageKeyInfo } from "../types";
|
|
2
|
+
interface StorageKeySectionProps {
|
|
3
|
+
title: string;
|
|
4
|
+
count: number;
|
|
5
|
+
keys: StorageKeyInfo[];
|
|
6
|
+
emptyMessage: string;
|
|
7
|
+
headerColor?: string;
|
|
8
|
+
/** Whether selection mode is active */
|
|
9
|
+
isSelectMode?: boolean;
|
|
10
|
+
/** Set of selected key identifiers (storageType-instanceId-key) */
|
|
11
|
+
selectedKeys?: Set<string>;
|
|
12
|
+
/** Callback when selection changes */
|
|
13
|
+
onSelectionChange?: (storageKey: StorageKeyInfo, selected: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Storage key section component following composition principles [[rule3]]
|
|
17
|
+
*
|
|
18
|
+
* Applied principles:
|
|
19
|
+
* - Decompose by Responsibility: Single purpose component for grouped storage keys
|
|
20
|
+
* - Prefer Composition over Configuration: Reuses patterns from EnvVarSection
|
|
21
|
+
* - Extract Reusable Logic: Shares expansion state management pattern
|
|
22
|
+
*/
|
|
23
|
+
export declare function StorageKeySection({ title, count, keys, emptyMessage, headerColor, isSelectMode, selectedKeys, onSelectionChange, }: StorageKeySectionProps): import("react").JSX.Element | null;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=StorageKeySection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageKeySection.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeySection.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7E;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,YAAoB,EACpB,YAAwB,EACxB,iBAAiB,GAClB,EAAE,sBAAsB,sCA4DxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StorageKeyStats } from "../types";
|
|
2
|
+
interface StorageKeyStatsProps {
|
|
3
|
+
stats: StorageKeyStats;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Storage key stats component following composition principles [[rule3]]
|
|
7
|
+
*
|
|
8
|
+
* Applied principles:
|
|
9
|
+
* - Decompose by Responsibility: Single purpose component for storage stats display
|
|
10
|
+
* - Prefer Composition over Configuration: Reuses patterns from EnvVarStats
|
|
11
|
+
* - Extract Reusable Logic: Shares visualization patterns with env vars
|
|
12
|
+
*/
|
|
13
|
+
export declare function StorageKeyStatsSection({ stats }: StorageKeyStatsProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=StorageKeyStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageKeyStats.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyStats.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,UAAU,oBAAoB;IAC5B,KAAK,EAAE,eAAe,CAAC;CACxB;AAyED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,+BA+KrE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RequiredStorageKey } from "../types";
|
|
2
|
+
export declare const FREE_TIER_EVENT_LIMIT = 25;
|
|
3
|
+
interface StorageModalWithTabsProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
onMinimize?: (modalState: any) => void;
|
|
8
|
+
enableSharedModalDimensions?: boolean;
|
|
9
|
+
requiredStorageKeys?: RequiredStorageKey[];
|
|
10
|
+
}
|
|
11
|
+
export declare function StorageModalWithTabs({ visible, onClose, onBack, onMinimize, enableSharedModalDimensions, requiredStorageKeys, }: StorageModalWithTabsProps): import("react").JSX.Element | null;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=StorageModalWithTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageModalWithTabs.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageModalWithTabs.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAkE9C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC5C;AAqBD,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,mBAAwB,GACzB,EAAE,yBAAyB,sCAsyB3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface StorageSectionProps {
|
|
2
|
+
onPress: () => void;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Storage section component for the dev tools console.
|
|
6
|
+
* Shows storage statistics and provides access to storage browser.
|
|
7
|
+
*/
|
|
8
|
+
export declare function StorageSection({ onPress }: StorageSectionProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=StorageSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageSection.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageSection.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,mBAAmB,+BA6B9D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StorageKeyInfo, RequiredStorageKey } from '../types';
|
|
2
|
+
interface UseAsyncStorageKeysResult {
|
|
3
|
+
storageKeys: StorageKeyInfo[];
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
refresh: () => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare function useAsyncStorageKeys(requiredStorageKeys?: RequiredStorageKey[]): UseAsyncStorageKeysResult;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useAsyncStorageKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAsyncStorageKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useAsyncStorageKeys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9D,UAAU,yBAAyB;IACjC,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,wBAAgB,mBAAmB,CACjC,mBAAmB,GAAE,kBAAkB,EAAO,GAC7C,yBAAyB,CAgJ3B"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useMMKVInstances Hook
|
|
3
|
+
*
|
|
4
|
+
* React hook to monitor all registered MMKV instances and their metadata.
|
|
5
|
+
* Works with MMKVInstanceRegistry to provide UI components with instance information.
|
|
6
|
+
*
|
|
7
|
+
* This hook enables:
|
|
8
|
+
* - Multi-instance dropdown/selector UI
|
|
9
|
+
* - Instance metadata display (encrypted, readOnly, key count)
|
|
10
|
+
* - Dynamic updates when instances are added/removed
|
|
11
|
+
*
|
|
12
|
+
* @see MMKVInstanceRegistry.ts for instance registration
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Metadata about an MMKV instance with additional runtime information
|
|
16
|
+
*/
|
|
17
|
+
export interface MMKVInstanceMetadata {
|
|
18
|
+
id: string;
|
|
19
|
+
instance: any;
|
|
20
|
+
encrypted: boolean;
|
|
21
|
+
readOnly: boolean;
|
|
22
|
+
keyCount: number;
|
|
23
|
+
size?: number;
|
|
24
|
+
}
|
|
25
|
+
interface UseMMKVInstancesResult {
|
|
26
|
+
instances: MMKVInstanceMetadata[];
|
|
27
|
+
instanceCount: number;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
refresh: () => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Hook to monitor all registered MMKV instances
|
|
33
|
+
*
|
|
34
|
+
* @param autoRefresh - If true, refreshes every 1 second to detect new instances
|
|
35
|
+
*
|
|
36
|
+
* @returns Object containing instances array, count, and refresh function
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { useMMKVInstances } from '@buoy-gg/storage';
|
|
41
|
+
*
|
|
42
|
+
* function MMKVInstanceSelector() {
|
|
43
|
+
* const { instances, instanceCount, refresh } = useMMKVInstances();
|
|
44
|
+
*
|
|
45
|
+
* return (
|
|
46
|
+
* <View>
|
|
47
|
+
* <Text>Found {instanceCount} MMKV instances</Text>
|
|
48
|
+
* {instances.map(inst => (
|
|
49
|
+
* <TouchableOpacity key={inst.id} onPress={() => selectInstance(inst)}>
|
|
50
|
+
* <Text>{inst.id}</Text>
|
|
51
|
+
* <Text>{inst.keyCount} keys</Text>
|
|
52
|
+
* {inst.encrypted && <Text>🔒 Encrypted</Text>}
|
|
53
|
+
* {inst.readOnly && <Text>👁️ Read-only</Text>}
|
|
54
|
+
* </TouchableOpacity>
|
|
55
|
+
* ))}
|
|
56
|
+
* <Button onPress={refresh}>Refresh</Button>
|
|
57
|
+
* </View>
|
|
58
|
+
* );
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare function useMMKVInstances(autoRefresh?: boolean): UseMMKVInstancesResult;
|
|
63
|
+
/**
|
|
64
|
+
* Hook to monitor a single MMKV instance by ID
|
|
65
|
+
*
|
|
66
|
+
* @param instanceId - ID of the instance to monitor
|
|
67
|
+
*
|
|
68
|
+
* @returns Instance metadata or null if not found
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* function MMKVInstanceDetail({ instanceId }: { instanceId: string }) {
|
|
73
|
+
* const instance = useMMKVInstance(instanceId);
|
|
74
|
+
*
|
|
75
|
+
* if (!instance) {
|
|
76
|
+
* return <Text>Instance not found</Text>;
|
|
77
|
+
* }
|
|
78
|
+
*
|
|
79
|
+
* return (
|
|
80
|
+
* <View>
|
|
81
|
+
* <Text>ID: {instance.id}</Text>
|
|
82
|
+
* <Text>Keys: {instance.keyCount}</Text>
|
|
83
|
+
* <Text>Encrypted: {instance.encrypted ? 'Yes' : 'No'}</Text>
|
|
84
|
+
* <Text>Read-only: {instance.readOnly ? 'Yes' : 'No'}</Text>
|
|
85
|
+
* </View>
|
|
86
|
+
* );
|
|
87
|
+
* }
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare function useMMKVInstance(instanceId: string): MMKVInstanceMetadata | null;
|
|
91
|
+
/**
|
|
92
|
+
* Hook to check if a specific instance ID is registered
|
|
93
|
+
*
|
|
94
|
+
* @param instanceId - ID to check
|
|
95
|
+
*
|
|
96
|
+
* @returns True if instance is registered
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```typescript
|
|
100
|
+
* function MMKVStatus({ instanceId }: { instanceId: string }) {
|
|
101
|
+
* const isRegistered = useMMKVInstanceExists(instanceId);
|
|
102
|
+
*
|
|
103
|
+
* return (
|
|
104
|
+
* <View>
|
|
105
|
+
* <Text>{instanceId}</Text>
|
|
106
|
+
* <Text>{isRegistered ? '✅ Registered' : '❌ Not registered'}</Text>
|
|
107
|
+
* </View>
|
|
108
|
+
* );
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export declare function useMMKVInstanceExists(instanceId: string): boolean;
|
|
113
|
+
export {};
|
|
114
|
+
//# sourceMappingURL=useMMKVInstances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMMKVInstances.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMMKVInstances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,UAAQ,GAClB,sBAAsB,CAwExB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,oBAAoB,GAAG,IAAI,CA4B7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAcjE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useMMKVKeys Hook
|
|
3
|
+
*
|
|
4
|
+
* Fetch and validate MMKV keys from a specific MMKV instance.
|
|
5
|
+
* Equivalent to useAsyncStorageKeys but for MMKV storage.
|
|
6
|
+
*
|
|
7
|
+
* Key Differences from AsyncStorage:
|
|
8
|
+
* - Synchronous API (getAllKeys(), getString(), etc.)
|
|
9
|
+
* - Native types (string, number, boolean, buffer) vs string-only
|
|
10
|
+
* - Multi-instance support (requires instanceId parameter)
|
|
11
|
+
* - No multiGet - must fetch keys individually
|
|
12
|
+
*/
|
|
13
|
+
import { StorageKeyInfo, RequiredStorageKey } from '../types';
|
|
14
|
+
type MMKV = any;
|
|
15
|
+
interface UseMMKVKeysResult {
|
|
16
|
+
storageKeys: StorageKeyInfo[];
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
error: Error | null;
|
|
19
|
+
refresh: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Hook to fetch and monitor keys from an MMKV instance
|
|
23
|
+
*
|
|
24
|
+
* @param instance - MMKV instance to monitor
|
|
25
|
+
* @param instanceId - Unique identifier for this instance (e.g., "mmkv.default", "secure")
|
|
26
|
+
* @param requiredStorageKeys - Optional array of required keys for validation
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import { MMKV } from 'react-native-mmkv';
|
|
31
|
+
* import { useMMKVKeys } from '@buoy-gg/storage';
|
|
32
|
+
*
|
|
33
|
+
* const storage = new MMKV();
|
|
34
|
+
*
|
|
35
|
+
* function MyComponent() {
|
|
36
|
+
* const { storageKeys, isLoading, error, refresh } = useMMKVKeys(
|
|
37
|
+
* storage,
|
|
38
|
+
* 'mmkv.default',
|
|
39
|
+
* [
|
|
40
|
+
* 'user.token',
|
|
41
|
+
* { key: 'user.id', expectedType: 'number' },
|
|
42
|
+
* { key: 'app.theme', expectedValue: 'dark' }
|
|
43
|
+
* ]
|
|
44
|
+
* );
|
|
45
|
+
*
|
|
46
|
+
* if (isLoading) return <LoadingSpinner />;
|
|
47
|
+
* if (error) return <ErrorMessage error={error} />;
|
|
48
|
+
*
|
|
49
|
+
* return (
|
|
50
|
+
* <View>
|
|
51
|
+
* {storageKeys.map(keyInfo => (
|
|
52
|
+
* <StorageKeyCard key={keyInfo.key} keyInfo={keyInfo} />
|
|
53
|
+
* ))}
|
|
54
|
+
* <Button onPress={refresh}>Refresh</Button>
|
|
55
|
+
* </View>
|
|
56
|
+
* );
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function useMMKVKeys(instance: MMKV | null | undefined, instanceId: string, requiredStorageKeys?: RequiredStorageKey[]): UseMMKVKeysResult;
|
|
61
|
+
/**
|
|
62
|
+
* Hook to fetch keys from multiple MMKV instances
|
|
63
|
+
*
|
|
64
|
+
* @param instances - Array of MMKV instances with their IDs
|
|
65
|
+
* @param requiredStorageKeys - Optional array of required keys for validation
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { MMKV } from 'react-native-mmkv';
|
|
70
|
+
* import { useMultiMMKVKeys } from '@buoy-gg/storage';
|
|
71
|
+
*
|
|
72
|
+
* const defaultStorage = new MMKV();
|
|
73
|
+
* const secureStorage = new MMKV({ id: 'secure', encryptionKey: key });
|
|
74
|
+
*
|
|
75
|
+
* function MyComponent() {
|
|
76
|
+
* const { storageKeys, isLoading, error } = useMultiMMKVKeys(
|
|
77
|
+
* [
|
|
78
|
+
* { instance: defaultStorage, id: 'mmkv.default' },
|
|
79
|
+
* { instance: secureStorage, id: 'secure' }
|
|
80
|
+
* ],
|
|
81
|
+
* ['user.token', 'app.theme']
|
|
82
|
+
* );
|
|
83
|
+
*
|
|
84
|
+
* // storageKeys will contain keys from both instances
|
|
85
|
+
* // with instanceId field to identify which instance each key belongs to
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare function useMultiMMKVKeys(instances: Array<{
|
|
90
|
+
instance: MMKV;
|
|
91
|
+
id: string;
|
|
92
|
+
}>, requiredStorageKeys?: RequiredStorageKey[]): UseMMKVKeysResult;
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=useMMKVKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMMKVKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMMKVKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAI9D,KAAK,IAAI,GAAG,GAAG,CAAC;AAYhB,UAAU,iBAAiB;IACzB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,EAClB,mBAAmB,GAAE,kBAAkB,EAAO,GAC7C,iBAAiB,CA0LnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,KAAK,CAAC;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAChD,mBAAmB,GAAE,kBAAkB,EAAO,GAC7C,iBAAiB,CAyInB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTickEverySecond.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useTickEverySecond.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,OAAc,QAYzD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { StorageSection } from "./components/StorageSection";
|
|
2
|
+
export { StorageModalWithTabs } from "./components/StorageModalWithTabs";
|
|
3
|
+
export { StorageKeyCard } from "./components/StorageKeyCard";
|
|
4
|
+
export { StorageKeyStatsSection } from "./components/StorageKeyStats";
|
|
5
|
+
export { StorageKeySection } from "./components/StorageKeySection";
|
|
6
|
+
export { StorageBrowserMode } from "./components/StorageBrowserMode";
|
|
7
|
+
export { StorageEventsSection } from "./components/StorageEventsSection";
|
|
8
|
+
export { useAsyncStorageKeys } from "./hooks/useAsyncStorageKeys";
|
|
9
|
+
export { useMMKVKeys, useMultiMMKVKeys } from "./hooks/useMMKVKeys";
|
|
10
|
+
export { useMMKVInstances, useMMKVInstance, useMMKVInstanceExists } from "./hooks/useMMKVInstances";
|
|
11
|
+
export { MMKVInstanceSelector } from "./components/MMKVInstanceSelector";
|
|
12
|
+
export { MMKVInstanceInfoPanel } from "./components/MMKVInstanceInfoPanel";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
export * from "./utils";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StorageType } from "./utils/storageQueryUtils";
|
|
2
|
+
export interface StorageKeyInfo {
|
|
3
|
+
key: string;
|
|
4
|
+
value: unknown;
|
|
5
|
+
valueType?: 'string' | 'number' | 'boolean' | 'buffer';
|
|
6
|
+
expectedValue?: string;
|
|
7
|
+
expectedType?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
storageType: StorageType;
|
|
10
|
+
instanceId?: string;
|
|
11
|
+
status: "required_present" | "required_missing" | "required_wrong_value" | "required_wrong_type" | "optional_present";
|
|
12
|
+
category: "required" | "optional";
|
|
13
|
+
lastUpdated?: Date;
|
|
14
|
+
}
|
|
15
|
+
export type RequiredStorageKey = string | {
|
|
16
|
+
key: string;
|
|
17
|
+
expectedValue: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
} | {
|
|
20
|
+
key: string;
|
|
21
|
+
expectedType: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
} | {
|
|
24
|
+
key: string;
|
|
25
|
+
storageType: StorageType;
|
|
26
|
+
description?: string;
|
|
27
|
+
};
|
|
28
|
+
export interface StorageKeyStats {
|
|
29
|
+
totalCount: number;
|
|
30
|
+
requiredCount: number;
|
|
31
|
+
missingCount: number;
|
|
32
|
+
wrongValueCount: number;
|
|
33
|
+
wrongTypeCount: number;
|
|
34
|
+
presentRequiredCount: number;
|
|
35
|
+
optionalCount: number;
|
|
36
|
+
mmkvCount: number;
|
|
37
|
+
asyncCount: number;
|
|
38
|
+
secureCount: number;
|
|
39
|
+
instanceCounts?: Record<string, number>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EACF,kBAAkB,GAClB,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;IACvB,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;IAClC,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IAEtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IAEpB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC"}
|