@buoy-gg/storage 7.0.4 → 7.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/lib/commonjs/index.js +77 -1
  2. package/lib/commonjs/storage/components/DiffViewer/TreeDiffViewer.js +10 -3
  3. package/lib/commonjs/storage/components/DiffViewer/modes/ThemedSplitView.js +26 -8
  4. package/lib/commonjs/storage/components/GameUIStorageBrowser.js +263 -115
  5. package/lib/commonjs/storage/components/GameUIStorageStats.js +7 -7
  6. package/lib/commonjs/storage/components/MMKVInstanceInfoPanel.js +1 -1
  7. package/lib/commonjs/storage/components/MMKVInstanceSelector.js +1 -1
  8. package/lib/commonjs/storage/components/SelectionActionBar.js +2 -36
  9. package/lib/commonjs/storage/components/StorageActions.js +6 -6
  10. package/lib/commonjs/storage/components/StorageBrowserMode.js +16 -2
  11. package/lib/commonjs/storage/components/StorageEventDetailContent.js +106 -149
  12. package/lib/commonjs/storage/components/StorageEventListener.js +13 -13
  13. package/lib/commonjs/storage/components/StorageFilterCards.js +13 -135
  14. package/lib/commonjs/storage/components/StorageKeyCard.js +1 -1
  15. package/lib/commonjs/storage/components/StorageKeyEditorScreen.js +392 -0
  16. package/lib/commonjs/storage/components/StorageKeyRow.js +53 -15
  17. package/lib/commonjs/storage/components/StorageKeySection.js +10 -4
  18. package/lib/commonjs/storage/components/StorageKeyStats.js +10 -10
  19. package/lib/commonjs/storage/components/StorageModalWithTabs.js +272 -129
  20. package/lib/commonjs/storage/components/StorageScalarKeyEditor.js +46 -0
  21. package/lib/commonjs/storage/components/StorageTypeFilterBar.js +141 -0
  22. package/lib/commonjs/storage/components/StorageValueEditModal.js +361 -0
  23. package/lib/commonjs/storage/hooks/useKeyEditor.js +104 -0
  24. package/lib/commonjs/storage/hooks/useMeasuredWidth.js +74 -0
  25. package/lib/commonjs/storage/hooks/useSecureStoreKeys.js +70 -15
  26. package/lib/commonjs/storage/hooks/useTreeDraft.js +107 -0
  27. package/lib/commonjs/storage/index.js +29 -0
  28. package/lib/commonjs/storage/stores/storageEventStore.js +4 -2
  29. package/lib/commonjs/storage/sync/storageSyncAdapter.js +125 -3
  30. package/lib/commonjs/storage/utils/AsyncStorageListener.js +76 -12
  31. package/lib/commonjs/storage/utils/MMKVInstanceRegistry.js +10 -9
  32. package/lib/commonjs/storage/utils/MMKVListener.js +40 -4
  33. package/lib/commonjs/storage/utils/SecureStoreRegistry.js +52 -1
  34. package/lib/commonjs/storage/utils/deleteStorageKeys.js +53 -0
  35. package/lib/commonjs/storage/utils/index.js +13 -0
  36. package/lib/commonjs/storage/utils/lineDiff.js +21 -354
  37. package/lib/commonjs/storage/utils/setStorageValue.js +218 -0
  38. package/lib/commonjs/storage/utils/storageBrowserRefresh.js +49 -0
  39. package/lib/commonjs/storage/utils/storageOps.js +53 -0
  40. package/lib/commonjs/storage/utils/storageTimeTravelUtils.js +60 -38
  41. package/lib/commonjs/storage/utils/valueType.js +24 -0
  42. package/lib/module/index.js +18 -1
  43. package/lib/module/storage/components/DiffViewer/TreeDiffViewer.js +10 -3
  44. package/lib/module/storage/components/DiffViewer/modes/ThemedSplitView.js +26 -8
  45. package/lib/module/storage/components/GameUIStorageBrowser.js +266 -118
  46. package/lib/module/storage/components/GameUIStorageStats.js +7 -7
  47. package/lib/module/storage/components/MMKVInstanceInfoPanel.js +1 -1
  48. package/lib/module/storage/components/MMKVInstanceSelector.js +1 -1
  49. package/lib/module/storage/components/SelectionActionBar.js +2 -36
  50. package/lib/module/storage/components/StorageActions.js +7 -7
  51. package/lib/module/storage/components/StorageBrowserMode.js +16 -2
  52. package/lib/module/storage/components/StorageEventDetailContent.js +110 -151
  53. package/lib/module/storage/components/StorageEventListener.js +14 -14
  54. package/lib/module/storage/components/StorageFilterCards.js +13 -135
  55. package/lib/module/storage/components/StorageKeyCard.js +1 -1
  56. package/lib/module/storage/components/StorageKeyEditorScreen.js +388 -0
  57. package/lib/module/storage/components/StorageKeyRow.js +55 -17
  58. package/lib/module/storage/components/StorageKeySection.js +11 -5
  59. package/lib/module/storage/components/StorageKeyStats.js +11 -10
  60. package/lib/module/storage/components/StorageModalWithTabs.js +272 -130
  61. package/lib/module/storage/components/StorageScalarKeyEditor.js +42 -0
  62. package/lib/module/storage/components/StorageTypeFilterBar.js +136 -0
  63. package/lib/module/storage/components/StorageValueEditModal.js +357 -0
  64. package/lib/module/storage/hooks/useKeyEditor.js +100 -0
  65. package/lib/module/storage/hooks/useMeasuredWidth.js +71 -0
  66. package/lib/module/storage/hooks/useSecureStoreKeys.js +71 -16
  67. package/lib/module/storage/hooks/useTreeDraft.js +103 -0
  68. package/lib/module/storage/index.js +3 -0
  69. package/lib/module/storage/stores/storageEventStore.js +4 -2
  70. package/lib/module/storage/sync/storageSyncAdapter.js +125 -3
  71. package/lib/module/storage/utils/AsyncStorageListener.js +76 -12
  72. package/lib/module/storage/utils/MMKVInstanceRegistry.js +8 -7
  73. package/lib/module/storage/utils/MMKVListener.js +40 -4
  74. package/lib/module/storage/utils/SecureStoreRegistry.js +52 -1
  75. package/lib/module/storage/utils/deleteStorageKeys.js +49 -0
  76. package/lib/module/storage/utils/index.js +3 -0
  77. package/lib/module/storage/utils/lineDiff.js +7 -354
  78. package/lib/module/storage/utils/setStorageValue.js +209 -0
  79. package/lib/module/storage/utils/storageBrowserRefresh.js +44 -0
  80. package/lib/module/storage/utils/storageOps.js +46 -0
  81. package/lib/module/storage/utils/storageTimeTravelUtils.js +61 -40
  82. package/lib/module/storage/utils/valueType.js +23 -0
  83. package/lib/typescript/index.d.ts +12 -1
  84. package/lib/typescript/index.d.ts.map +1 -1
  85. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts +4 -1
  86. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts.map +1 -1
  87. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts +7 -1
  88. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts.map +1 -1
  89. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts +27 -1
  90. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -1
  91. package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +1 -1
  92. package/lib/typescript/storage/components/StorageBrowserMode.d.ts +17 -1
  93. package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +1 -1
  94. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts +4 -1
  95. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts.map +1 -1
  96. package/lib/typescript/storage/components/StorageFilterCards.d.ts +9 -3
  97. package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +1 -1
  98. package/lib/typescript/storage/components/StorageKeyEditorScreen.d.ts +42 -0
  99. package/lib/typescript/storage/components/StorageKeyEditorScreen.d.ts.map +1 -0
  100. package/lib/typescript/storage/components/StorageKeyRow.d.ts +17 -0
  101. package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -1
  102. package/lib/typescript/storage/components/StorageKeySection.d.ts +7 -1
  103. package/lib/typescript/storage/components/StorageKeySection.d.ts.map +1 -1
  104. package/lib/typescript/storage/components/StorageKeyStats.d.ts.map +1 -1
  105. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts +28 -1
  106. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +1 -1
  107. package/lib/typescript/storage/components/StorageScalarKeyEditor.d.ts +24 -0
  108. package/lib/typescript/storage/components/StorageScalarKeyEditor.d.ts.map +1 -0
  109. package/lib/typescript/storage/components/StorageTypeFilterBar.d.ts +29 -0
  110. package/lib/typescript/storage/components/StorageTypeFilterBar.d.ts.map +1 -0
  111. package/lib/typescript/storage/components/StorageValueEditModal.d.ts +36 -0
  112. package/lib/typescript/storage/components/StorageValueEditModal.d.ts.map +1 -0
  113. package/lib/typescript/storage/hooks/useKeyEditor.d.ts +51 -0
  114. package/lib/typescript/storage/hooks/useKeyEditor.d.ts.map +1 -0
  115. package/lib/typescript/storage/hooks/useMeasuredWidth.d.ts +37 -0
  116. package/lib/typescript/storage/hooks/useMeasuredWidth.d.ts.map +1 -0
  117. package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts +8 -1
  118. package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts.map +1 -1
  119. package/lib/typescript/storage/hooks/useTreeDraft.d.ts +67 -0
  120. package/lib/typescript/storage/hooks/useTreeDraft.d.ts.map +1 -0
  121. package/lib/typescript/storage/index.d.ts +2 -0
  122. package/lib/typescript/storage/index.d.ts.map +1 -1
  123. package/lib/typescript/storage/sync/storageSyncAdapter.d.ts +41 -0
  124. package/lib/typescript/storage/sync/storageSyncAdapter.d.ts.map +1 -1
  125. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts +15 -0
  126. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +1 -1
  127. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts.map +1 -1
  128. package/lib/typescript/storage/utils/MMKVListener.d.ts +7 -0
  129. package/lib/typescript/storage/utils/MMKVListener.d.ts.map +1 -1
  130. package/lib/typescript/storage/utils/SecureStoreRegistry.d.ts +20 -0
  131. package/lib/typescript/storage/utils/SecureStoreRegistry.d.ts.map +1 -1
  132. package/lib/typescript/storage/utils/deleteStorageKeys.d.ts +27 -0
  133. package/lib/typescript/storage/utils/deleteStorageKeys.d.ts.map +1 -0
  134. package/lib/typescript/storage/utils/index.d.ts +1 -0
  135. package/lib/typescript/storage/utils/index.d.ts.map +1 -1
  136. package/lib/typescript/storage/utils/lineDiff.d.ts +7 -31
  137. package/lib/typescript/storage/utils/lineDiff.d.ts.map +1 -1
  138. package/lib/typescript/storage/utils/setStorageValue.d.ts +64 -0
  139. package/lib/typescript/storage/utils/setStorageValue.d.ts.map +1 -0
  140. package/lib/typescript/storage/utils/storageBrowserRefresh.d.ts +28 -0
  141. package/lib/typescript/storage/utils/storageBrowserRefresh.d.ts.map +1 -0
  142. package/lib/typescript/storage/utils/storageOps.d.ts +25 -0
  143. package/lib/typescript/storage/utils/storageOps.d.ts.map +1 -0
  144. package/lib/typescript/storage/utils/storageTimeTravelUtils.d.ts +15 -5
  145. package/lib/typescript/storage/utils/storageTimeTravelUtils.d.ts.map +1 -1
  146. package/lib/typescript/storage/utils/valueType.d.ts +13 -0
  147. package/lib/typescript/storage/utils/valueType.d.ts.map +1 -1
  148. package/package.json +5 -5
@@ -11,6 +11,15 @@ export interface MMKVSnapshotInstance {
11
11
  readOnly: boolean;
12
12
  entries: MMKVSnapshotEntry[];
13
13
  }
14
+ /** One registered key in a `secure.snapshot` result. */
15
+ export interface SecureSnapshotEntry {
16
+ key: string;
17
+ description?: string;
18
+ keychainService?: string;
19
+ requireAuthentication: boolean;
20
+ /** `null` when unset, or when the key is biometric-protected (never read). */
21
+ value: string | null;
22
+ }
14
23
  /**
15
24
  * Sync adapter for the storage tool, consumed by @buoy-gg/external-sync's
16
25
  * `useExternalSync` (structurally matches its ToolSyncAdapter interface so
@@ -31,6 +40,24 @@ export declare const storageSyncAdapter: {
31
40
  clearEvents: () => void;
32
41
  /** Clears all app storage keys, preserving dev tools settings. */
33
42
  clearAppStorage: () => Promise<void>;
43
+ /** Undo one event, addressed by the `id` the store assigned it. */
44
+ "timeTravel.undo": (params: unknown) => Promise<{
45
+ undone: boolean;
46
+ action: "clear" | "mergeItem" | "multiSet" | "multiRemove" | "setItem" | "removeItem" | "multiMerge";
47
+ key: string | undefined;
48
+ }>;
49
+ /**
50
+ * Jump storage back to the state as of one event. `scope: "key"` (default)
51
+ * replays only that key's history, matching the modal's JUMP button;
52
+ * `scope: "all"` replays every captured AsyncStorage event.
53
+ */
54
+ "timeTravel.jump": (params: unknown) => Promise<{
55
+ jumped: boolean;
56
+ scope: "all" | "key";
57
+ replayed: number;
58
+ of: number;
59
+ key: string | undefined;
60
+ }>;
34
61
  "async.getAllKeys": () => Promise<string[]>;
35
62
  "async.multiGet": (params: unknown) => Promise<[string, string | null][]>;
36
63
  "async.getItem": (params: unknown) => Promise<string | null>;
@@ -48,7 +75,21 @@ export declare const storageSyncAdapter: {
48
75
  keychainService: string | undefined;
49
76
  requireAuthentication: boolean;
50
77
  }[];
78
+ /**
79
+ * Every registered key WITH its value, in one round trip — the SecureStore
80
+ * counterpart to `mmkv.snapshot`. The dashboard polls this (the keychain
81
+ * has no change feed) and serves the browser from the result, instead of
82
+ * firing one `secure.get` per key per refresh.
83
+ */
84
+ "secure.snapshot": () => Promise<SecureSnapshotEntry[]>;
51
85
  "secure.get": (params: unknown) => Promise<string | null>;
86
+ /**
87
+ * Write a registered SecureStore key. Goes through the registry so the
88
+ * value is written with the SAME options it was registered with — writing
89
+ * with different `keychainService` options creates a second entry the app
90
+ * can't read. Biometric-protected keys throw rather than prompting.
91
+ */
92
+ "secure.set": (params: unknown) => Promise<void>;
52
93
  "secure.delete": (params: unknown) => Promise<void>;
53
94
  };
54
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"storageSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/storage/sync/storageSyncAdapter.ts"],"names":[],"mappings":"AAgCA,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qDAAqD;AACrD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB;;;0BAaP,MAAM,IAAI;;;QAM9B,kEAAkE;;;mCAUjC,OAAO;kCAId,OAAO;kCAMP,OAAO;qCAIJ,OAAO;sCAEN,OAAO;mCAEV,OAAO;;+BAOb,oBAAoB,EAAE;6BAgBtB,OAAO;gCAIJ,OAAO;;;;;;;+BAkBR,OAAO;kCAWJ,OAAO;;CAGpC,CAAC"}
1
+ {"version":3,"file":"storageSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/storage/sync/storageSyncAdapter.ts"],"names":[],"mappings":"AAsCA,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qDAAqD;AACrD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,8EAA8E;IAC9E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAsBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB;;;0BAaP,MAAM,IAAI;;;QAM9B,kEAAkE;;QAOlE,mEAAmE;oCACjC,OAAO;;;;;QAkBzC;;;;WAIG;oCAC+B,OAAO;;;;;;;;mCAyCR,OAAO;kCAId,OAAO;kCAMP,OAAO;qCAIJ,OAAO;sCAEN,OAAO;mCAEV,OAAO;;+BAOb,oBAAoB,EAAE;6BAgBtB,OAAO;gCAIJ,OAAO;;;;;;;QAkB/B;;;;;WAKG;iCAC0B,OAAO,CAAC,mBAAmB,EAAE,CAAC;+BAwBpC,OAAO;QAW9B;;;;;WAKG;+BACoB,OAAO;kCAIJ,OAAO;;CAGpC,CAAC"}
@@ -5,6 +5,13 @@ export interface AsyncStorageEvent {
5
5
  key?: string;
6
6
  value?: string;
7
7
  prevValue?: string | null;
8
+ /**
9
+ * True for the synthetic events the store emits when it first scans
10
+ * existing storage. These are a snapshot, not a write: the key already held
11
+ * this value, so there is no "before" state to diff against — which the
12
+ * detail view must say rather than claiming the key was created.
13
+ */
14
+ initialScan?: boolean;
8
15
  keys?: string[];
9
16
  pairs?: [string, string][];
10
17
  prevPairs?: [string, string | null][];
@@ -68,6 +75,14 @@ declare class AsyncStorageListener {
68
75
  * @returns True if the key should be ignored, false otherwise
69
76
  */
70
77
  private shouldIgnoreKey;
78
+ /**
79
+ * Copy a set of pristine methods onto this instance's `original*` fields.
80
+ *
81
+ * Used both when capturing them for the first time and when adopting the
82
+ * global stash after a Fast Refresh, so `restoreOriginalMethods()` and the
83
+ * swizzles always have real methods to call through to.
84
+ */
85
+ private adoptOriginals;
71
86
  /**
72
87
  * Initialize the listener by loading AsyncStorage and storing original methods
73
88
  *
@@ -1 +1 @@
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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U,yBAAyB,eACnB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,kBAAkB,YACY,CAAC;AAE5C;;;;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"}
1
+ {"version":3,"file":"AsyncStorageListener.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/AsyncStorageListener.ts"],"names":[],"mappings":"AA4DA,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;;;;;WAKG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,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,CA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AEF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;IACf;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,cAAM,oBAAoB;IACxB,OAAO,CAAC,SAAS,CAAuC;IAExD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,IAAI;IAU3E;;OAEG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI5B;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAI7C;;OAEG;IACH,MAAM,IAAI,gBAAgB,EAAE;IAI5B;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB;;OAEG;IACH,KAAK,IAAI,MAAM;CAGhB;AAGD,eAAO,MAAM,oBAAoB,sBAA6B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,IAAI,EACd,MAAM,CAAC,EAAE,sBAAsB,GAC9B,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAMvD"}
@@ -33,6 +33,13 @@ export interface MMKVEvent {
33
33
  data?: {
34
34
  key?: string;
35
35
  value?: any;
36
+ /**
37
+ * The value this write replaced, or null/undefined when the key did not
38
+ * exist. MMKV's native listener fires *after* the write, so unlike
39
+ * AsyncStorage this can't be read at call time — it comes from the shadow
40
+ * copy in `lastKnownValues`.
41
+ */
42
+ prevValue?: any;
36
43
  valueType?: MMKVValueType;
37
44
  success?: boolean;
38
45
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MMKVListener.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/MMKVListener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,KAAK,IAAI,GAAG,GAAG,CAAC;AAChB,OAAO,EAAkB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAcpE;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EACF,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,YAAY,CAAC;IACjB,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,aAAa,CAAC;QAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;AAyB3D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,cAAM,YAAY;IAChB,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,SAAS,CAA2C;IAG5D,OAAO,CAAC,WAAW,CAKhB;IAEH;;OAEG;IACH,OAAO,CAAC,eAAe;IAUvB;;OAEG;IACH,OAAO,CAAC,IAAI;IAYZ;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IA+ErD;;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AE,iBAAiB,GAAG,MAAM,IAAI;IAYpD;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAI1B;;OAEG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIxC;;OAEG;IACH,qBAAqB,IAAI,MAAM,EAAE;IAIjC;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;CACF;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,IAAI,EAAE,YAAY,MAAM,SAClB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,SACZ,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAA0C,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,iBAAiB,WAjGT,IAkGd,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAA0C,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,YAAY,MAAM,YACpB,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,yBAAyB,gBACA,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,oBAAoB,cAAmC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,oBAAoB,cAAmC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,eAAe,eAA8B,CAAC;AAE3D;;GAEG;AACH,eAAe,YAAY,CAAC"}
@@ -61,6 +61,7 @@ export interface SecureStoreKeyEntry {
61
61
  declare class SecureStoreRegistry {
62
62
  private module;
63
63
  private keys;
64
+ private listeners;
64
65
  /**
65
66
  * Register the SecureStore module and the keys to expose. Callable multiple
66
67
  * times — keys accumulate, the latest module wins.
@@ -68,6 +69,15 @@ declare class SecureStoreRegistry {
68
69
  register(module: SecureStoreLike, descriptors: SecureStoreKeyDescriptor[]): void;
69
70
  /** Remove a key from the registry (does not delete the stored value). */
70
71
  unregister(key: string): void;
72
+ /**
73
+ * Subscribe to registry changes (keys registered/unregistered). Lets the
74
+ * browser pick up keys that register after the tool is already open.
75
+ * Returns an unsubscribe function.
76
+ */
77
+ subscribe(listener: () => void): () => void;
78
+ /** Content signature of the registered entries (module identity excluded). */
79
+ private signature;
80
+ private notify;
71
81
  /** The registered SecureStore module, or null if none registered yet. */
72
82
  getModule(): SecureStoreLike | null;
73
83
  /** All registered key entries. */
@@ -79,6 +89,16 @@ declare class SecureStoreRegistry {
79
89
  * key was registered with (required for keychainService-scoped keys).
80
90
  */
81
91
  deleteValue(key: string): Promise<void>;
92
+ /**
93
+ * Write a stored value via the registered module, using the options the key
94
+ * was registered with — writing with different `keychainService` options than
95
+ * the value was created with silently creates a SECOND entry the app can't
96
+ * read, so the registered options are the only safe ones to use.
97
+ *
98
+ * Throws rather than no-ops: unlike a delete, a write that quietly did
99
+ * nothing would leave the UI showing a value that was never stored.
100
+ */
101
+ setValue(key: string, value: string): Promise<void>;
82
102
  }
83
103
  /**
84
104
  * Singleton registry instance (advanced usage — most apps only need
@@ -1 +1 @@
1
- {"version":3,"file":"SecureStoreRegistry.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/SecureStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CACV,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,MAAM,GAAG,IAA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G;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE1D"}
1
+ {"version":3,"file":"SecureStoreRegistry.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/SecureStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CACV,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,YAAY,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,eAAe,CACb,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,sBAAsB,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,sBAAsB,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,cAAM,mBAAmB;IACvB,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,IAAI,CAA0C;IACtD,OAAO,CAAC,SAAS,CAAyB;IAE1C;;;OAGG;IACH,QAAQ,CACN,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,wBAAwB,EAAE,GACtC,IAAI;IAwBP,yEAAyE;IACzE,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAO3C,8EAA8E;IAC9E,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,MAAM;IAUd,yEAAyE;IACzE,SAAS,IAAI,eAAe,GAAG,IAAI;IAInC,kCAAkC;IAClC,MAAM,IAAI,mBAAmB,EAAE;IAI/B,iCAAiC;IACjC,KAAK,IAAI,MAAM;IAIf;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C;;;;;;;;OAQG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAW1D;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,qBAA4B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,wBAAwB,EAAE,GAC/B,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE1D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Deleting storage keys, in one place.
3
+ *
4
+ * Each backend removes keys differently — AsyncStorage takes a batch,
5
+ * SecureStore has to go through the registry (only it knows each key's
6
+ * `keychainService` options), and MMKV deletes per registered instance. Two call
7
+ * sites need this (the selection action bar and a single row's "Delete key"),
8
+ * and a second copy of that fan-out is exactly how one backend quietly stops
9
+ * being cleaned up.
10
+ *
11
+ * Pro gating and confirmation are deliberately NOT here: they belong to the UI
12
+ * that has the user's attention. This function assumes the caller already asked.
13
+ */
14
+ import type { StorageKeyInfo } from "../types";
15
+ export interface MMKVInstanceRef {
16
+ id: string;
17
+ instance: {
18
+ delete: (key: string) => void;
19
+ };
20
+ }
21
+ /**
22
+ * Removes every key from whichever backend holds it. Rejects on the first
23
+ * failure — callers surface that, rather than reporting a partial delete as
24
+ * success.
25
+ */
26
+ export declare function deleteStorageKeys(keys: StorageKeyInfo[], mmkvInstances: MMKVInstanceRef[]): Promise<void>;
27
+ //# sourceMappingURL=deleteStorageKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteStorageKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/deleteStorageKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI/C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE;QAAE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC7C;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,cAAc,EAAE,EACtB,aAAa,EAAE,eAAe,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC,CA8Bf"}
@@ -5,5 +5,6 @@ export { default as asyncStorageListener } from "./AsyncStorageListener";
5
5
  export { undoOperation, jumpToState, canUndo, } from "./storageTimeTravelUtils";
6
6
  export { registerMMKVInstance, unregisterMMKVInstance, mmkvInstanceRegistry, type MMKVInstanceInfo, } from "./MMKVInstanceRegistry";
7
7
  export { addMMKVInstance, removeMMKVInstance, removeAllMMKVInstances, addMMKVListener, removeAllMMKVListeners, isMMKVInstanceMonitored, getMonitoredMMKVInstances, getMMKVInstanceCount, getMMKVListenerCount, isMMKVListening, mmkvListener, type MMKVEvent, type MMKVEventListener, } from "./MMKVListener";
8
+ export { onStorageBrowserRefresh, requestStorageBrowserRefresh, } from "./storageBrowserRefresh";
8
9
  export { detectMMKVType, formatMMKVValue, isTypeMatch, type MMKVValueType, type MMKVValueInfo, } from "./mmkvTypeDetection";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,cAAc,EACd,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGzE,OAAO,EACL,aAAa,EACb,WAAW,EACX,OAAO,GACR,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,cAAc,EACd,eAAe,EACf,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,cAAc,EACd,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGzE,OAAO,EACL,aAAa,EACb,WAAW,EACX,OAAO,GACR,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,cAAc,EACd,eAAe,EACf,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
@@ -1,34 +1,10 @@
1
1
  /**
2
- * Line-by-line diff computation for React Native
3
- * Adapted from react-diff-viewer for object comparison
2
+ * Line-by-line diff computation.
3
+ *
4
+ * This used to be a verbatim copy of the shared implementation, which meant a
5
+ * diff fix had to be made twice. It now re-exports the canonical one so the
6
+ * storage split view, the tree view, and every other tool's diff (redux, jotai,
7
+ * highlight-updates) share a single algorithm.
4
8
  */
5
- export declare enum DiffType {
6
- DEFAULT = "unchanged",
7
- ADDED = "added",
8
- REMOVED = "removed",
9
- MODIFIED = "modified"
10
- }
11
- export interface WordDiff {
12
- value: string;
13
- type: DiffType;
14
- }
15
- export interface LineDiffInfo {
16
- leftLineNumber?: number;
17
- rightLineNumber?: number;
18
- type: DiffType;
19
- leftContent?: string | WordDiff[];
20
- rightContent?: string | WordDiff[];
21
- leftRaw?: string;
22
- rightRaw?: string;
23
- }
24
- export interface DiffComputeOptions {
25
- compareMethod?: "chars" | "words" | "lines" | "trimmedLines";
26
- disableWordDiff?: boolean;
27
- showDiffOnly?: boolean;
28
- contextLines?: number;
29
- }
30
- /**
31
- * Compute line-by-line diff between two objects
32
- */
33
- export declare function computeLineDiff(oldValue: unknown, newValue: unknown, options?: DiffComputeOptions): LineDiffInfo[];
9
+ export { computeLineDiff, DiffType, ABSENT_VALUE, isAbsent, type LineDiffInfo, type WordDiff, type DiffComputeOptions, } from "@buoy-gg/shared-ui/dataViewer";
34
10
  //# sourceMappingURL=lineDiff.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lineDiff.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/lineDiff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,QAAQ;IAClB,OAAO,cAAc;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAqJD,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,CAAC;IAC7D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA+ED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,OAAO,EACjB,OAAO,GAAE,kBAAuB,GAC/B,YAAY,EAAE,CA4HhB"}
1
+ {"version":3,"file":"lineDiff.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/lineDiff.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,kBAAkB,GACxB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Writing a storage value back, in one place.
3
+ *
4
+ * The counterpart to `deleteStorageKeys` — and the same reasoning applies: each
5
+ * backend writes differently, and a second copy of that fan-out is how one
6
+ * backend quietly starts corrupting values.
7
+ *
8
+ * The hard part is NOT the write, it's the types:
9
+ *
10
+ * - **AsyncStorage** stores strings only. A value that was stored as JSON must
11
+ * stay valid JSON, or an object silently becomes a quoted string and the app
12
+ * that reads it breaks in a way that looks nothing like a devtools edit.
13
+ * - **MMKV** is natively typed (string / number / boolean / buffer). Writing
14
+ * `"42"` over a number turns it into a string, so the original type is
15
+ * restored from `valueType`. Buffers can't round-trip at all — the snapshot
16
+ * only ever carried a `<ArrayBuffer n bytes>` placeholder.
17
+ * - **SecureStore** stores strings, and biometric-protected keys are never
18
+ * touched (writing needs the same auth prompt reading does).
19
+ *
20
+ * Pro gating and confirmation are deliberately NOT here; they belong to the UI
21
+ * that has the user's attention. This assumes the caller already asked.
22
+ */
23
+ import type { StorageKeyInfo } from "../types";
24
+ export interface EditableMMKVInstance {
25
+ id: string;
26
+ instance: {
27
+ set: (key: string, value: string | number | boolean) => void;
28
+ };
29
+ readOnly?: boolean;
30
+ }
31
+ /**
32
+ * Why a key can't be edited, or null when it can. UI uses this both to hide the
33
+ * edit affordance and to explain itself, rather than failing at save time.
34
+ */
35
+ export declare function storageEditBlockedReason(storageKey: StorageKeyInfo, mmkvInstances?: EditableMMKVInstance[]): string | null;
36
+ /**
37
+ * Validate `raw` for this key WITHOUT writing. Returns an error message, or
38
+ * null when the text is acceptable. The editor calls this as you type.
39
+ */
40
+ export declare function validateStorageValue(storageKey: StorageKeyInfo, raw: string): string | null;
41
+ /**
42
+ * The text an editor should open with: JSON pretty-printed so it's actually
43
+ * editable, everything else verbatim.
44
+ */
45
+ export declare function storageValueToEditableText(value: unknown): string;
46
+ /**
47
+ * The value as a STRUCTURE, for the tree editor to apply ops against.
48
+ *
49
+ * Backends disagree on how far they've already parsed: `useAsyncStorageKeys`
50
+ * hands back a parsed object, while MMKV reports its native type so a JSON blob
51
+ * arrives as the raw string. Both have to end up as the same thing before an op
52
+ * can address a path inside them.
53
+ *
54
+ * Returns `undefined` when the value isn't a container — scalars are edited
55
+ * through the plain value editor, not the tree.
56
+ */
57
+ export declare function structuredStorageValue(storageKey: StorageKeyInfo): unknown;
58
+ /**
59
+ * Write `raw` to whichever backend holds this key, restoring the value's
60
+ * original type. Rejects (rather than writing something lossy) when the key
61
+ * isn't editable or the text doesn't fit the type — callers surface that.
62
+ */
63
+ export declare function setStorageValue(storageKey: StorageKeyInfo, raw: string, mmkvInstances?: EditableMMKVInstance[]): Promise<void>;
64
+ //# sourceMappingURL=setStorageValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setStorageValue.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/setStorageValue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE;QAAE,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,cAAc,EAC1B,aAAa,GAAE,oBAAoB,EAAO,GACzC,MAAM,GAAG,IAAI,CA0Bf;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CA8Bf;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAiBjE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAc1E;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,MAAM,EACX,aAAa,GAAE,oBAAoB,EAAO,GACzC,OAAO,CAAC,IAAI,CAAC,CAqCf"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * A "the underlying storage changed, re-read it" signal for the storage
3
+ * browser.
4
+ *
5
+ * On device the browser refreshes itself from the AsyncStorage/MMKV listeners,
6
+ * but those never fire in remote-mirror mode (the desktop dashboard suppresses
7
+ * local capture and receives the device's events as snapshots instead). Without
8
+ * this seam the browse tab is a one-shot read at mount — values stay frozen
9
+ * until the panel remounts, which is exactly the "shows old data until I switch
10
+ * tools and come back" behaviour.
11
+ *
12
+ * The dashboard calls {@link requestStorageBrowserRefresh} whenever a fresh
13
+ * device snapshot lands; the browser re-reads all three backends (debounced).
14
+ * It is a no-op when nothing is listening.
15
+ */
16
+ type RefreshListener = () => void;
17
+ /**
18
+ * Subscribe to external refresh requests. Returns an unsubscribe function.
19
+ * @internal — used by the storage browser.
20
+ */
21
+ export declare function onStorageBrowserRefresh(listener: RefreshListener): () => void;
22
+ /**
23
+ * Ask any mounted storage browser to re-read AsyncStorage, MMKV and
24
+ * SecureStore. Safe to call at any rate — the browser debounces.
25
+ */
26
+ export declare function requestStorageBrowserRefresh(): void;
27
+ export {};
28
+ //# sourceMappingURL=storageBrowserRefresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageBrowserRefresh.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/storageBrowserRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;AAIlC;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,IAAI,CAK7E;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAQnD"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The five operations a storage event can be, and how to recognise one.
3
+ *
4
+ * AsyncStorage and MMKV each have their own action union, and neither maps
5
+ * cleanly onto what a reader wants to see — `multiRemove`, `removeItem` and
6
+ * `delete` are one idea wearing three names. These collapse both onto a single
7
+ * vocabulary so every surface labels, filters and colours events the same way.
8
+ *
9
+ * This is semantics, not presentation: it lives in `utils` rather than beside
10
+ * any one view, so a view can be deleted without taking the vocabulary with it.
11
+ */
12
+ import type { StorageEvent } from "../hooks/useStorageEvents";
13
+ export type StorageOp = "SET" | "GET" | "MERGE" | "DELETE" | "CLEAR";
14
+ export declare const STORAGE_OPS: readonly StorageOp[];
15
+ export declare function storageOpDot(op: StorageOp): string;
16
+ /** Both backends' action unions, collapsed onto the five display operations. */
17
+ export declare function storageOpOf(event: StorageEvent): StorageOp;
18
+ /**
19
+ * The store synthesises one event per existing key when it first subscribes, so
20
+ * the list isn't empty on open. Those are a SNAPSHOT, not a write: the key
21
+ * already held that value, so there is no "before" to diff against and showing
22
+ * one would invent a change that never happened.
23
+ */
24
+ export declare function isInitialScan(event: StorageEvent): boolean;
25
+ //# sourceMappingURL=storageOps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageOps.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/storageOps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErE,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAMlC,CAAC;AAUX,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAElD;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAQ1D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAI1D"}
@@ -8,7 +8,13 @@ import { type AsyncStorageEvent } from "./AsyncStorageListener";
8
8
  * Undo a single storage operation
9
9
  *
10
10
  * Restores the previous value(s) before the operation occurred.
11
- * This pauses event capture to avoid creating new events during restoration.
11
+ *
12
+ * The restore is deliberately NOT capture-paused. Pausing it meant the write
13
+ * landed but emitted no event, so the modal's event list and current-value
14
+ * panel never changed — UNDO looked like a dead button even though it had
15
+ * worked. Letting the restore emit normally makes it visible and keeps the
16
+ * history honest about what the storage actually did. There is no feedback
17
+ * loop: a write emits an event, and an event never triggers a write.
12
18
  *
13
19
  * @param event - The storage event to undo
14
20
  */
@@ -16,11 +22,15 @@ export declare function undoOperation(event: AsyncStorageEvent): Promise<void>;
16
22
  /**
17
23
  * Jump to a specific point in storage history
18
24
  *
19
- * This reconstructs the storage state as it was after a specific event
20
- * by clearing storage and replaying all events up to that point.
25
+ * Reconstructs the state as of `targetEventIndex` by replaying `events` up to
26
+ * that point, then reconciling ONLY the keys that timeline governs.
21
27
  *
22
- * Note: This is a destructive operation - it will clear current storage
23
- * and replay events to reach the target state.
28
+ * This used to begin with `AsyncStorage.clear()`, which was badly out of
29
+ * proportion: the modal's JUMP button passes one key's history, so clearing
30
+ * wiped every unrelated app key — and Buoy's own `@react_buoy*` settings with
31
+ * them — to restore a single value. Now a jump touches exactly the keys that
32
+ * appear in the events it was given, and never Buoy's own keys. Like
33
+ * [undoOperation], the writes emit normally so the change is visible.
24
34
  *
25
35
  * @param events - All events in chronological order (oldest first)
26
36
  * @param targetEventIndex - The index of the event to jump to (0-based)
@@ -1 +1 @@
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
+ {"version":3,"file":"storageTimeTravelUtils.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/storageTimeTravelUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkE3E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EAAE,EAC3B,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAuCf;AAoGD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAoBzD"}
@@ -1,5 +1,18 @@
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
+ * A stored value as a tree can show it.
5
+ *
6
+ * AsyncStorage and SecureStore hold strings, so an object arrives as the text
7
+ * `{"a":1}` — displaying that as a string is technically true and useless. Any
8
+ * surface that renders or edits a value structurally has to do this same
9
+ * un-stringify first, so it lives here rather than being re-derived (slightly
10
+ * differently) in each one.
11
+ *
12
+ * A string that doesn't parse comes back untouched: it was just a string that
13
+ * happened to start with a brace.
14
+ */
15
+ export declare function parseStorageValue(value: unknown): unknown;
3
16
  /**
4
17
  * Short, human-readable preview of a value for inline display next to the type
5
18
  * label, or `null` when the value is too large/complex to preview (long
@@ -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;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"}
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;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CASzD;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": "7.0.4",
3
+ "version": "7.0.6",
4
4
  "description": "Browse & edit AsyncStorage, MMKV & SecureStore inside your React Native app, with change history. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -26,11 +26,11 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@buoy-gg/floating-tools-core": "7.0.4",
30
- "@buoy-gg/shared-ui": "7.0.4"
29
+ "@buoy-gg/floating-tools-core": "7.0.6",
30
+ "@buoy-gg/shared-ui": "7.0.6"
31
31
  },
32
32
  "peerDependencies": {
33
- "@buoy-gg/license": "7.0.4",
33
+ "@buoy-gg/license": "7.0.6",
34
34
  "@react-native-async-storage/async-storage": "^2.0.0 || ^3.1.0",
35
35
  "react": "*",
36
36
  "react-native": "*"
@@ -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": "7.0.4"
43
+ "@buoy-gg/license": "7.0.6"
44
44
  },
45
45
  "react-native-builder-bob": {
46
46
  "source": "src",