@buoy-gg/storage 3.0.2 → 4.0.1
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 +1 -1
- package/lib/commonjs/storage/components/GameUIStorageBrowser.js +24 -3
- package/lib/commonjs/storage/components/SelectionActionBar.js +16 -3
- package/lib/commonjs/storage/components/StorageBrowserMode.js +6 -2
- package/lib/commonjs/storage/components/StorageKeyRow.js +95 -6
- package/lib/commonjs/storage/components/StorageKeySection.js +8 -2
- package/lib/commonjs/storage/components/StorageModalWithTabs.js +47 -1
- package/lib/commonjs/storage/hooks/useAsyncStorageKeys.js +3 -2
- package/lib/commonjs/storage/stores/storageEventStore.js +7 -4
- package/lib/commonjs/storage/sync/storageSyncAdapter.js +7 -3
- package/lib/commonjs/storage/utils/AsyncStorageListener.js +148 -160
- package/lib/commonjs/storage/utils/asyncStorageCompat.js +89 -0
- package/lib/commonjs/storage/utils/clearAllStorage.js +2 -1
- package/lib/commonjs/storage/utils/mmkvTypeDetection.js +20 -5
- package/lib/commonjs/storage/utils/storageTimeTravelUtils.js +3 -2
- package/lib/commonjs/storage/utils/valueType.js +41 -0
- package/lib/module/storage/components/GameUIStorageBrowser.js +24 -3
- package/lib/module/storage/components/SelectionActionBar.js +17 -3
- package/lib/module/storage/components/StorageBrowserMode.js +6 -2
- package/lib/module/storage/components/StorageKeyRow.js +97 -8
- package/lib/module/storage/components/StorageKeySection.js +8 -2
- package/lib/module/storage/components/StorageModalWithTabs.js +47 -1
- package/lib/module/storage/hooks/useAsyncStorageKeys.js +3 -2
- package/lib/module/storage/stores/storageEventStore.js +7 -4
- package/lib/module/storage/sync/storageSyncAdapter.js +7 -3
- package/lib/module/storage/utils/AsyncStorageListener.js +124 -135
- package/lib/module/storage/utils/asyncStorageCompat.js +81 -0
- package/lib/module/storage/utils/clearAllStorage.js +2 -1
- package/lib/module/storage/utils/mmkvTypeDetection.js +20 -5
- package/lib/module/storage/utils/storageTimeTravelUtils.js +3 -2
- package/lib/module/storage/utils/valueType.js +39 -0
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts +5 -1
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -1
- package/lib/typescript/storage/components/SelectionActionBar.d.ts +3 -1
- package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageBrowserMode.d.ts +3 -1
- package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageKeyRow.d.ts +7 -1
- package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageKeySection.d.ts +7 -1
- package/lib/typescript/storage/components/StorageKeySection.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +1 -1
- package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts.map +1 -1
- package/lib/typescript/storage/stores/storageEventStore.d.ts.map +1 -1
- package/lib/typescript/storage/sync/storageSyncAdapter.d.ts +1 -1
- package/lib/typescript/storage/sync/storageSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/storage/utils/AsyncStorageListener.d.ts +20 -0
- package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +1 -1
- package/lib/typescript/storage/utils/asyncStorageCompat.d.ts +30 -0
- package/lib/typescript/storage/utils/asyncStorageCompat.d.ts.map +1 -0
- package/lib/typescript/storage/utils/clearAllStorage.d.ts.map +1 -1
- package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts.map +1 -1
- package/lib/typescript/storage/utils/storageTimeTravelUtils.d.ts.map +1 -1
- package/lib/typescript/storage/utils/valueType.d.ts +13 -0
- package/lib/typescript/storage/utils/valueType.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -15,6 +15,12 @@ interface StorageKeySectionProps {
|
|
|
15
15
|
eventCountByKey?: Record<string, number>;
|
|
16
16
|
/** Called when "view history" is pressed for a key */
|
|
17
17
|
onViewHistory?: (key: string) => void;
|
|
18
|
+
/** Called when "hide / filter out" is pressed for a key */
|
|
19
|
+
onHideKey?: (storageKey: StorageKeyInfo) => void;
|
|
20
|
+
/** Set of pinned key names */
|
|
21
|
+
pinnedKeys?: Set<string>;
|
|
22
|
+
/** Toggle a key's pinned state */
|
|
23
|
+
onTogglePin?: (key: string) => void;
|
|
18
24
|
}
|
|
19
25
|
/**
|
|
20
26
|
* Storage key section component following composition principles [[rule3]]
|
|
@@ -24,6 +30,6 @@ interface StorageKeySectionProps {
|
|
|
24
30
|
* - Prefer Composition over Configuration: Reuses patterns from EnvVarSection
|
|
25
31
|
* - Extract Reusable Logic: Shares expansion state management pattern
|
|
26
32
|
*/
|
|
27
|
-
export declare function StorageKeySection({ title, count, keys, emptyMessage, headerColor, isSelectMode, selectedKeys, onSelectionChange, eventCountByKey, onViewHistory, }: StorageKeySectionProps): import("react").JSX.Element | null;
|
|
33
|
+
export declare function StorageKeySection({ title, count, keys, emptyMessage, headerColor, isSelectMode, selectedKeys, onSelectionChange, eventCountByKey, onViewHistory, onHideKey, pinnedKeys, onTogglePin, }: StorageKeySectionProps): import("react").JSX.Element | null;
|
|
28
34
|
export {};
|
|
29
35
|
//# sourceMappingURL=StorageKeySection.d.ts.map
|
|
@@ -1 +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,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ACrC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,YAAoB,EACpB,YAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,GACZ,EAAE,sBAAsB,sCAiExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageModalWithTabs.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageModalWithTabs.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAsB9C,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,
|
|
1
|
+
{"version":3,"file":"StorageModalWithTabs.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageModalWithTabs.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAsB9C,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,sCA21B3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAsyncStorageKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useAsyncStorageKeys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAsyncStorageKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useAsyncStorageKeys.ts"],"names":[],"mappings":"AAGA,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,CA2J3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageEventStore.d.ts","sourceRoot":"","sources":["../../../../src/storage/stores/storageEventStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAC;AAI/B;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,CAAC,iBAAiB,GAAG;IAAE,WAAW,EAAE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K,IAAI,CAAC;AAEjE,cAAM,iBAAkB,SAAQ,cAAc,CAAC,YAAY,CAAC;IAE1D,OAAO,CAAC,uBAAuB,CAA6B;IAC5D,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,sBAAsB,CAAS;;IASvC;;;;;OAKG;YACW,iBAAiB;IA0D/B;;OAEG;cACa,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAoC/C;;OAEG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAc/B;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,eAAe,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE;CAG/D;AAGD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC;AAGzD,eAAO,MAAM,wBAAwB,GAAI,UAAU,oBAAoB,eACxB,CAAC;AAChD,eAAO,MAAM,cAAc,GAAI,UAAU,oBAAoB,eACxB,CAAC;AACtC,eAAO,MAAM,gBAAgB,sBAAsC,CAAC;AACpE,eAAO,MAAM,kBAAkB,YAAwC,CAAC;AACxE,eAAO,MAAM,kBAAkB,eAAwC,CAAC"}
|
|
@@ -19,7 +19,7 @@ export declare const storageSyncAdapter: {
|
|
|
19
19
|
/** Clears all app storage keys, preserving dev tools settings. */
|
|
20
20
|
clearAppStorage: () => Promise<void>;
|
|
21
21
|
"async.getAllKeys": () => Promise<readonly string[]>;
|
|
22
|
-
"async.multiGet": (params: unknown) => Promise<
|
|
22
|
+
"async.multiGet": (params: unknown) => Promise<[string, string | null][]>;
|
|
23
23
|
"async.getItem": (params: unknown) => Promise<string | null>;
|
|
24
24
|
"async.setItem": (params: unknown) => Promise<void>;
|
|
25
25
|
"async.removeItem": (params: unknown) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/storage/sync/storageSyncAdapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storageSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/storage/sync/storageSyncAdapter.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB;;;0BAGP,MAAM,IAAI;;;QAM9B,kEAAkE;;;mCAQvC,OAAO;kCAER,OAAO;kCAEP,OAAO;qCAIJ,OAAO;sCAEN,OAAO;mCAEV,OAAO;;;CAIrC,CAAC"}
|
|
@@ -19,6 +19,12 @@ export type AsyncStorageEventListener = (event: AsyncStorageEvent) => void;
|
|
|
19
19
|
* and emits events to registered listeners. It maintains the original functionality
|
|
20
20
|
* while providing observability for debugging and development tools.
|
|
21
21
|
*
|
|
22
|
+
* Supports both async-storage v2 (multiGet/multiSet/multiRemove/mergeItem) and
|
|
23
|
+
* v3 (getMany/setMany/removeMany, no merge). On v3 the renamed batch methods are
|
|
24
|
+
* swizzled and normalized back to the same v2-shaped events, so the rest of the
|
|
25
|
+
* tool — event store, time-travel, desktop sync — is version-agnostic. v3 dropped
|
|
26
|
+
* the merge API entirely, so no merge events can occur there.
|
|
27
|
+
*
|
|
22
28
|
* @example
|
|
23
29
|
* ```typescript
|
|
24
30
|
* // Start listening to all AsyncStorage operations
|
|
@@ -50,6 +56,8 @@ declare class AsyncStorageListener {
|
|
|
50
56
|
private originalMultiSet;
|
|
51
57
|
private originalMultiRemove;
|
|
52
58
|
private originalMultiMerge;
|
|
59
|
+
private originalSetMany;
|
|
60
|
+
private originalRemoveMany;
|
|
53
61
|
/**
|
|
54
62
|
* Determines if a storage key should be ignored to prevent infinite loops
|
|
55
63
|
*
|
|
@@ -86,6 +94,18 @@ declare class AsyncStorageListener {
|
|
|
86
94
|
* @performance Skips processing when no listeners are registered or when paused
|
|
87
95
|
*/
|
|
88
96
|
private emit;
|
|
97
|
+
/**
|
|
98
|
+
* Shared core for batch writes (v2 multiSet/multiMerge, v3 setMany).
|
|
99
|
+
*
|
|
100
|
+
* Captures previous values for the affected keys, runs the original native
|
|
101
|
+
* operation, and emits a normalized event. `action` distinguishes a plain set
|
|
102
|
+
* from a merge so time-travel can replay them differently.
|
|
103
|
+
*/
|
|
104
|
+
private handleBatchSet;
|
|
105
|
+
/**
|
|
106
|
+
* Shared core for batch removals (v2 multiRemove, v3 removeMany).
|
|
107
|
+
*/
|
|
108
|
+
private handleBatchRemove;
|
|
89
109
|
/**
|
|
90
110
|
* Start intercepting AsyncStorage operations by swizzling methods
|
|
91
111
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncStorageListener.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/AsyncStorageListener.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsyncStorageListener.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/AsyncStorageListener.ts"],"names":[],"mappings":"AAuBA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EACF,SAAS,GACT,YAAY,GACZ,WAAW,GACX,OAAO,GACP,UAAU,GACV,aAAa,GACb,YAAY,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;KACvC,CAAC;CACH;AAED,MAAM,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,aA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GAIG;AACH,eAAO,MAAM,WAAW,eAAsC,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,cAA2C,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,YAAqC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,aAAa,YAAsC,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,QAAQ,eAAoC,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type AnyStorage = Record<string, any>;
|
|
2
|
+
/** The live default-export object (methods may be swizzled by the listener). */
|
|
3
|
+
export declare const asyncStorage: AnyStorage;
|
|
4
|
+
/**
|
|
5
|
+
* Capability flags describing which API surface the installed version exposes.
|
|
6
|
+
* `multiGet` only exists on v2; `mergeItem` was removed in v3.
|
|
7
|
+
*/
|
|
8
|
+
export declare const asyncStorageCaps: {
|
|
9
|
+
/** v2 exposes multiGet/multiSet/multiRemove; v3 renamed these to *Many. */
|
|
10
|
+
hasLegacyMultiApi: boolean;
|
|
11
|
+
/** v3 removed mergeItem/multiMerge with no replacement. */
|
|
12
|
+
hasMergeApi: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Batch-read keys, normalized to the v2 `[key, value|null][]` tuple shape and
|
|
16
|
+
* preserving the requested key order regardless of installed version.
|
|
17
|
+
*/
|
|
18
|
+
export declare function readMany(keys: readonly string[]): Promise<[string, string | null][]>;
|
|
19
|
+
/**
|
|
20
|
+
* Batch-write key/value pairs. Calls the live method (which may be swizzled by
|
|
21
|
+
* the listener on v2's `multiSet` / v3's `setMany`) so writes still emit events.
|
|
22
|
+
*/
|
|
23
|
+
export declare function writeMany(pairs: readonly (readonly [string, string])[]): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Batch-remove keys via the live method (swizzled on v2's `multiRemove` /
|
|
26
|
+
* v3's `removeMany`).
|
|
27
|
+
*/
|
|
28
|
+
export declare function removeMany(keys: readonly string[]): Promise<void>;
|
|
29
|
+
export default asyncStorage;
|
|
30
|
+
//# sourceMappingURL=asyncStorageCompat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asyncStorageCompat.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/asyncStorageCompat.ts"],"names":[],"mappings":"AA0BA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtC,gFAAgF;AAChF,eAAO,MAAM,YAAY,EAAiC,UAAU,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,2EAA2E;;IAE3E,2DAA2D;;CAE5D,CAAC;AAEF;;;GAGG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAapC;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,GAC5C,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvE;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearAllStorage.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/clearAllStorage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clearAllStorage.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/clearAllStorage.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAyBxD;AAED;;;GAGG;AACH,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC,CAKtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mmkvTypeDetection.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/mmkvTypeDetection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,KAAK,IAAI,GAAG,GAAG,CAAC;AAEhB,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"mmkvTypeDetection.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/mmkvTypeDetection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,KAAK,IAAI,GAAG,GAAG,CAAC;AAEhB,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CA4CzE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,CAmBvE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAEpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageTimeTravelUtils.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/storageTimeTravelUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"storageTimeTravelUtils.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/storageTimeTravelUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE7F;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwE3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EAAE,EAC3B,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAoCf;AAuFD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAoBzD"}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
/** Return a concise string describing the JavaScript type of the provided value. */
|
|
2
2
|
export declare function getValueTypeLabel(value: unknown): string;
|
|
3
|
+
/**
|
|
4
|
+
* Short, human-readable preview of a value for inline display next to the type
|
|
5
|
+
* label, or `null` when the value is too large/complex to preview (long
|
|
6
|
+
* strings, objects, arrays). Lets the user read simple values without opening
|
|
7
|
+
* the card.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getValuePreview(value: unknown): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Type label optionally followed by a short value preview — e.g. `boolean · true`,
|
|
12
|
+
* `number · 42`, `string · "hello"`. Falls back to just the type label when the
|
|
13
|
+
* value is too large to preview.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getValueTypeWithPreview(value: unknown): string;
|
|
3
16
|
//# sourceMappingURL=valueType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueType.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/valueType.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYxD"}
|
|
1
|
+
{"version":3,"file":"valueType.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/valueType.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYxD;AAKD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAe7D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAI9D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/storage",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "storage package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/
|
|
30
|
-
"@buoy-gg/
|
|
29
|
+
"@buoy-gg/floating-tools-core": "4.0.1",
|
|
30
|
+
"@buoy-gg/shared-ui": "4.0.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@buoy-gg/license": "
|
|
34
|
-
"@react-native-async-storage/async-storage": "
|
|
33
|
+
"@buoy-gg/license": "4.0.1",
|
|
34
|
+
"@react-native-async-storage/async-storage": "^2.0.0 || ^3.1.0",
|
|
35
35
|
"react": "*",
|
|
36
36
|
"react-native": "*"
|
|
37
37
|
},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/react": "^19.1.0",
|
|
41
41
|
"@types/react-native": "^0.73.0",
|
|
42
42
|
"typescript": "~5.8.3",
|
|
43
|
-
"@buoy-gg/license": "
|
|
43
|
+
"@buoy-gg/license": "4.0.1"
|
|
44
44
|
},
|
|
45
45
|
"react-native-builder-bob": {
|
|
46
46
|
"source": "src",
|