@buoy-gg/storage 7.0.4 → 7.0.5

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
@@ -1,4 +1,5 @@
1
1
  import { RequiredStorageKey } from "../types";
2
+ import type { StorageFilterType, StorageTypeFilter } from "./StorageFilterCards";
2
3
  import { MutableRefObject } from "react";
3
4
  interface StorageBrowserModeProps {
4
5
  requiredStorageKeys?: RequiredStorageKey[];
@@ -9,15 +10,30 @@ interface StorageBrowserModeProps {
9
10
  searchQuery?: string;
10
11
  storageDataRef?: MutableRefObject<any[]>;
11
12
  eventCountByKey?: Record<string, number>;
13
+ /** Epoch ms of the most recent recorded write per key (wide table only). */
14
+ lastWriteByKey?: Record<string, number>;
12
15
  onViewHistory?: (key: string) => void;
13
16
  enabledStorageTypes?: Set<'async' | 'mmkv' | 'secure'>;
17
+ /** Status filter, lifted so a host toolbar can render the counters. */
18
+ statusFilter?: StorageFilterType;
19
+ onStatusFilterChange?: (filter: StorageFilterType) => void;
20
+ onStatusCountsChange?: (counts: {
21
+ validCount: number;
22
+ missingCount: number;
23
+ issuesCount: number;
24
+ }) => void;
14
25
  pinnedKeys?: Set<string>;
15
26
  onTogglePin?: (key: string) => void;
27
+ /** Pad full-screen views past the home indicator (docked sheet only). */
28
+ applySafeAreaInset?: boolean;
29
+ /** Backend filter, shared with the Events tab. */
30
+ storageTypeFilter?: StorageTypeFilter;
31
+ onStorageTypeFilterChange?: (type: StorageTypeFilter) => void;
16
32
  }
17
33
  /**
18
34
  * Storage browser mode component
19
35
  * Displays storage keys with game UI styled interface
20
36
  */
21
- export declare function StorageBrowserMode({ requiredStorageKeys, showFilters, ignoredPatterns, onTogglePattern, onAddPattern, searchQuery, storageDataRef, eventCountByKey, onViewHistory, enabledStorageTypes, pinnedKeys, onTogglePin, }: StorageBrowserModeProps): import("react").JSX.Element;
37
+ export declare function StorageBrowserMode({ requiredStorageKeys, showFilters, ignoredPatterns, onTogglePattern, onAddPattern, searchQuery, storageDataRef, eventCountByKey, lastWriteByKey, onViewHistory, enabledStorageTypes, statusFilter, onStatusFilterChange, onStatusCountsChange, pinnedKeys, onTogglePin, applySafeAreaInset, storageTypeFilter, onStorageTypeFilterChange, }: StorageBrowserModeProps): import("react").JSX.Element;
22
38
  export {};
23
39
  //# sourceMappingURL=StorageBrowserMode.d.ts.map
@@ -1 +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;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,WAAW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,CAAC,CAAC;IACvD,uEAAuE;IACvE,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC3D,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,KAAK,IAAI,CAAC;IACX,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,yBAAyB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC/D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,mBAAwB,EACxB,WAAmB,EACnB,eAA2B,EAC3B,eAAe,EACf,YAAY,EACZ,WAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,GAC1B,EAAE,uBAAuB,+BAwBzB"}
@@ -11,6 +11,8 @@ type MMKVEvent = {
11
11
  data?: {
12
12
  key?: string;
13
13
  value?: any;
14
+ prevValue?: any;
15
+ initialScan?: boolean;
14
16
  valueType?: string;
15
17
  success?: boolean;
16
18
  };
@@ -39,10 +41,11 @@ export declare function StorageEventDetailContent({ conversation, selectedEventI
39
41
  /**
40
42
  * External footer component for modal use
41
43
  */
42
- export declare function StorageEventDetailFooter({ conversation, selectedEventIndex, onEventIndexChange, }: {
44
+ export declare function StorageEventDetailFooter({ conversation, selectedEventIndex, onEventIndexChange, applySafeAreaInset, }: {
43
45
  conversation: StorageKeyConversation;
44
46
  selectedEventIndex?: number;
45
47
  onEventIndexChange?: (index: number) => void;
48
+ applySafeAreaInset?: boolean;
46
49
  }): import("react").JSX.Element;
47
50
  export {};
48
51
  //# sourceMappingURL=StorageEventDetailContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StorageEventDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AA6BlE,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,GACb,CAAC,iBAAiB,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAC/C,CAAC,SAAS,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE3C,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;IAC7C,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAsDD,wBAAgB,yBAAyB,CAAC,EACxC,YAAY,EACZ,kBAAsB,EACtB,kBAA6B,EAC7B,qBAA6B,GAC9B,EAAE,8BAA8B,+BAgZhC;AAED;;GAEG;AACH,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,+BAkBA"}
1
+ {"version":3,"file":"StorageEventDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AA2DlE,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,GAAG,CAAC;QAChB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,KAAK,YAAY,GACb,CAAC,iBAAiB,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAC/C,CAAC,SAAS,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE3C,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;IAC7C,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAsDD,wBAAgB,yBAAyB,CAAC,EACxC,YAAY,EACZ,kBAAsB,EACtB,kBAA6B,EAC7B,qBAA6B,GAC9B,EAAE,8BAA8B,+BAuZhC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,YAAY,EACZ,kBAAsB,EACtB,kBAA6B,EAC7B,kBAAyB,GAC1B,EAAE;IACD,YAAY,EAAE,sBAAsB,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,+BAmBA"}
@@ -1,5 +1,6 @@
1
+ import { type StorageTypeFilter } from "./StorageTypeFilterBar";
1
2
  export type StorageFilterType = "all" | "missing" | "issues";
2
- export type StorageTypeFilter = "all" | "async" | "mmkv" | "secure";
3
+ export type { StorageTypeFilter } from "./StorageTypeFilterBar";
3
4
  interface StorageFilterCardsProps {
4
5
  stats: {
5
6
  totalCount: number;
@@ -30,7 +31,12 @@ interface StorageFilterCardsProps {
30
31
  onFilterChange?: (filter: StorageFilterType) => void;
31
32
  activeStorageType?: StorageTypeFilter;
32
33
  onStorageTypeChange?: (type: StorageTypeFilter) => void;
34
+ /**
35
+ * Render the valid/missing/issues tiles here. False when the host has its own
36
+ * toolbar and shows them beside its search field — two copies of the same
37
+ * filter on screen is worse than none.
38
+ */
39
+ showStatus?: boolean;
33
40
  }
34
- export declare function StorageFilterCards({ stats, tabStats, healthPercentage, healthStatus, healthColor, activeFilter, onFilterChange, activeStorageType, onStorageTypeChange, }: StorageFilterCardsProps): import("react").JSX.Element;
35
- export {};
41
+ export declare function StorageFilterCards({ stats, tabStats, healthPercentage, healthStatus, healthColor, activeFilter, onFilterChange, activeStorageType, onStorageTypeChange, showStatus, }: StorageFilterCardsProps): import("react").JSX.Element;
36
42
  //# sourceMappingURL=StorageFilterCards.d.ts.map
@@ -1 +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;AAQpE,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"}
1
+ {"version":3,"file":"StorageFilterCards.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageFilterCards.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQhE,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;IACxD;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAoB,EACpB,cAAc,EACd,iBAAyB,EACzB,mBAAmB,EACnB,UAAiB,GAClB,EAAE,uBAAuB,+BAwHzB"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Editing a key, on a screen of its own.
3
+ *
4
+ * Editing used to happen inside the expanded card in the key list: a tree a few
5
+ * rows tall, an action bar wrapped onto three lines, and the rest of the list
6
+ * still scrolling underneath. Every control was competing for the same ~200px.
7
+ *
8
+ * So the card now offers ONE edit button and the actual work happens here, with
9
+ * the whole viewport: the tree gets the height, the six structural actions get
10
+ * thumb-sized tiles docked at the bottom where they're always in the same
11
+ * place, and manual JSON editing — the escape hatch, not the main path — moves
12
+ * to a single button in the top-right corner.
13
+ *
14
+ * Typing a value happens in a modal pinned to the top of the screen, over the
15
+ * tree rather than instead of it — see {@link StorageValueEditModal}.
16
+ */
17
+ import type { StorageKeyInfo } from "../types";
18
+ interface StorageKeyEditorScreenProps {
19
+ storageKey: StorageKeyInfo;
20
+ /** Performs the write. Rejecting keeps the work on screen. */
21
+ onSave: (raw: string) => Promise<void>;
22
+ /** Leave the editor. Called only once any unsaved work is resolved. */
23
+ onClose: () => void;
24
+ /**
25
+ * Pad the docked controls past the home indicator.
26
+ *
27
+ * These screens put their primary buttons flush against the bottom edge, so
28
+ * without this the last row of tiles sits under the gesture bar. Off in a
29
+ * floating window, whose own bottom edge is nowhere near the screen's.
30
+ */
31
+ applySafeAreaInset?: boolean;
32
+ }
33
+ /**
34
+ * A container and a scalar are different editors, not one editor with a flag.
35
+ *
36
+ * A tree of one row is not a tree, so a scalar key skips the whole structural
37
+ * editor and gets just the value modal. Splitting here keeps each editor's
38
+ * state to what it actually needs — see {@link StorageScalarKeyEditor}.
39
+ */
40
+ export declare function StorageKeyEditorScreen(props: StorageKeyEditorScreenProps): import("react").JSX.Element;
41
+ export {};
42
+ //# sourceMappingURL=StorageKeyEditorScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageKeyEditorScreen.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyEditorScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAmBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAO/C,UAAU,2BAA2B;IACnC,UAAU,EAAE,cAAc,CAAC;IAC3B,8DAA8D;IAC9D,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,uEAAuE;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAOD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,+BAgBxE"}
@@ -19,6 +19,23 @@ interface StorageKeyRowProps {
19
19
  isPinned?: boolean;
20
20
  /** Toggle this key's pinned state */
21
21
  onTogglePin?: (key: string) => void;
22
+ /**
23
+ * Open the full-screen editor for this key. Omit to keep the row read-only —
24
+ * the Edit affordance only appears when a host supplies this.
25
+ *
26
+ * The card deliberately doesn't edit anything itself: a tree, six structural
27
+ * actions and a keyboard don't fit in an expanded row, and cramming them in
28
+ * is what this replaced. See `StorageKeyEditorScreen`.
29
+ */
30
+ onEditKey?: (storageKey: StorageKeyInfo) => void;
31
+ /**
32
+ * Flip a boolean key in place. A boolean has one other state, so opening an
33
+ * editor to choose it is a screen whose only job is to offer the value you
34
+ * didn't pick — the tree's action dock flips them the same way.
35
+ */
36
+ onToggleKey?: (storageKey: StorageKeyInfo) => void;
37
+ /** Why this key can't be edited (read-only instance, buffer, biometric). */
38
+ editBlockedReason?: string | null;
22
39
  }
23
40
  export declare const StorageKeyRow: import("react").NamedExoticComponent<StorageKeyRowProps>;
24
41
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"StorageKeyRow.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyRow.tsx"],"names":[],"mappings":"AAEA,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,C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AAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACnD,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAgDD,eAAO,MAAM,aAAa,0DAyQxB,CAAC"}
@@ -21,6 +21,12 @@ interface StorageKeySectionProps {
21
21
  pinnedKeys?: Set<string>;
22
22
  /** Toggle a key's pinned state */
23
23
  onTogglePin?: (key: string) => void;
24
+ /** Open the full-screen editor for a key. Omit to keep rows read-only. */
25
+ onEditKey?: (storageKey: StorageKeyInfo) => void;
26
+ /** Flip a boolean key in place, instead of opening an editor for it. */
27
+ onToggleKey?: (storageKey: StorageKeyInfo) => void;
28
+ /** Per-key reason editing is impossible (read-only / buffer / biometric). */
29
+ editBlockedFor?: (storageKey: StorageKeyInfo) => string | null;
24
30
  }
25
31
  /**
26
32
  * Storage key section component following composition principles [[rule3]]
@@ -30,6 +36,6 @@ interface StorageKeySectionProps {
30
36
  * - Prefer Composition over Configuration: Reuses patterns from EnvVarSection
31
37
  * - Extract Reusable Logic: Shares expansion state management pattern
32
38
  */
33
- export declare function StorageKeySection({ title, count, keys, emptyMessage, headerColor, isSelectMode, selectedKeys, onSelectionChange, eventCountByKey, onViewHistory, onHideKey, pinnedKeys, onTogglePin, }: StorageKeySectionProps): import("react").JSX.Element | null;
39
+ export declare function StorageKeySection({ title, count, keys, emptyMessage, headerColor, isSelectMode, selectedKeys, onSelectionChange, eventCountByKey, onViewHistory, onHideKey, pinnedKeys, onTogglePin, onEditKey, onToggleKey, editBlockedFor, }: StorageKeySectionProps): import("react").JSX.Element | null;
34
40
  export {};
35
41
  //# 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,CAAC;IAC3B,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5E,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,sDAAsD;IACtD,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,8BAA8B;IAC9B,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,kCAAkC;IAClC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;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
+ {"version":3,"file":"StorageKeySection.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/St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AY,EACZ,WAAW,EACX,YAAoB,EACpB,YAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,GACf,EAAE,sBAAsB,sCAoExB"}
@@ -1 +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"}
1
+ {"version":3,"file":"StorageKeyStats.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyStats.tsx"],"names":[],"mappings":"AAUA,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"}
@@ -7,7 +7,34 @@ interface StorageModalWithTabsProps {
7
7
  onMinimize?: (modalState: any) => void;
8
8
  enableSharedModalDimensions?: boolean;
9
9
  requiredStorageKeys?: RequiredStorageKey[];
10
+ /**
11
+ * Render as a header-bar + body (+ footer) stack instead of inside `JsModal`,
12
+ * for hosts that place tools in a panel rather than a modal (Buoy Desktop).
13
+ * Only the shell differs — header, tabs and state are shared. See
14
+ * `StorageToolView` at the bottom of this file.
15
+ */
16
+ inline?: boolean;
17
+ /**
18
+ * Told which tab is showing. A remote host polls backends that cannot push
19
+ * (SecureStore has no change feed at all) and only wants to pay for that
20
+ * while the browse tab is actually visible.
21
+ */
22
+ onTabChange?: (tab: "browser" | "events") => void;
23
+ /**
24
+ * When supplied, a refresh button appears beside the browse actions. Only a
25
+ * remote host needs it: on device the browser re-reads off the AsyncStorage /
26
+ * MMKV listeners, but a mirrored store never sees those fire, so a manual
27
+ * pull is the only way to refresh a backend that has not pushed.
28
+ */
29
+ onRefresh?: () => void;
10
30
  }
11
- export declare function StorageModalWithTabs({ visible, onClose, onBack, onMinimize, enableSharedModalDimensions, requiredStorageKeys, }: StorageModalWithTabsProps): import("react").JSX.Element | null;
31
+ export declare function StorageModalWithTabs({ visible, onClose, onBack, onMinimize, enableSharedModalDimensions, requiredStorageKeys, inline, onTabChange, onRefresh, }: StorageModalWithTabsProps): import("react").JSX.Element | null;
32
+ /**
33
+ * The same storage tool as `StorageModalWithTabs`, rendered INLINE for hosts
34
+ * that place tools in a panel rather than a modal. Exists so there is exactly
35
+ * one implementation — the desktop dashboard used to ship its own copy of this
36
+ * component's header, tabs and screen router.
37
+ */
38
+ export declare function StorageToolView(props?: Omit<StorageModalWithTabsProps, "visible" | "onClose" | "inline">): import("react").JSX.Element;
12
39
  export {};
13
40
  //# sourceMappingURL=StorageModalWithTabs.d.ts.map
@@ -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,sCA21B3B"}
1
+ {"version":3,"file":"StorageModalWithTabs.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageModalWithTabs.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA2B9C,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;IAC3C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,QAAQ,KAAK,IAAI,CAAC;IAClD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAqBD,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,mBAAwB,EACxB,MAAc,EACd,WAAW,EACX,SAAS,GACV,EAAE,yBAAyB,sCAu9B3B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,IAAI,CAAC,yBAAyB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAG9E"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Editing a key whose value is a single string, number or boolean.
3
+ *
4
+ * A tree of one row is not a tree, so there's nothing here to select, reorder
5
+ * or append to — which means none of the structural editor applies. And with
6
+ * one edit producing one write, there's nothing to buffer either: a draft would
7
+ * only add a step between typing the value and storing it.
8
+ *
9
+ * So this is just the value modal over whatever the user was looking at, on
10
+ * both the phone and the dashboard. Changing one string shouldn't black out the
11
+ * screen it came from.
12
+ */
13
+ import type { StorageKeyInfo } from "../types";
14
+ interface StorageScalarKeyEditorProps {
15
+ storageKey: StorageKeyInfo;
16
+ /** The value as storage holds it, already un-stringified. */
17
+ value: unknown;
18
+ /** Performs the write. Rejecting keeps the modal open with the draft intact. */
19
+ onSave: (raw: string) => Promise<void>;
20
+ onClose: () => void;
21
+ }
22
+ export declare function StorageScalarKeyEditor({ storageKey, value, onSave, onClose, }: StorageScalarKeyEditorProps): import("react").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=StorageScalarKeyEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageScalarKeyEditor.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageScalarKeyEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,UAAU,2BAA2B;IACnC,UAAU,EAAE,cAAc,CAAC;IAC3B,6DAA6D;IAC7D,KAAK,EAAE,OAAO,CAAC;IACf,gFAAgF;IAChF,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE,2BAA2B,+BA6B7B"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * "Which backend?" — the pill row shared by the Keys and Events tabs.
3
+ *
4
+ * Both tabs answer questions about the same three backends, so asking the
5
+ * question two different ways (or, as it was, only on one tab) is a gap rather
6
+ * than a simplification: you filter the key list to Keychain, switch to Events
7
+ * to see what wrote to it, and you're looking at everything again.
8
+ *
9
+ * The selection is owned by the modal and passed to both, so switching tabs
10
+ * keeps the filter you set.
11
+ *
12
+ * Each pill carries the count it WOULD show, computed before the type filter is
13
+ * applied — a count that collapsed to zero the moment you picked another type
14
+ * would tell you nothing about where to look next.
15
+ */
16
+ export type StorageTypeFilter = "all" | "async" | "mmkv" | "secure";
17
+ export type StorageTypeCounts = Record<StorageTypeFilter, number>;
18
+ interface StorageTypeFilterBarProps {
19
+ active: StorageTypeFilter;
20
+ onChange: (type: StorageTypeFilter) => void;
21
+ counts: StorageTypeCounts;
22
+ }
23
+ export declare function StorageTypeFilterBar({ active, onChange, counts, }: StorageTypeFilterBarProps): import("react").JSX.Element;
24
+ /** Tally a list of things that each know which backend they came from. */
25
+ export declare function countByStorageType(items: {
26
+ storageType: "async" | "mmkv" | "secure";
27
+ }[]): StorageTypeCounts;
28
+ export {};
29
+ //# sourceMappingURL=StorageTypeFilterBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageTypeFilterBar.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageTypeFilterBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AAElE,UAAU,yBAAyB;IACjC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAmBD,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,QAAQ,EACR,MAAM,GACP,EAAE,yBAAyB,+BAoD3B;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE;IAAE,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CAAE,EAAE,GACpD,iBAAiB,CAInB"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Editing one value: a panel at the top of the screen, with Cancel and Save.
3
+ *
4
+ * This started as a pushed full screen and that was more ceremony than the task
5
+ * deserves — changing one string is the most ordinary thing in this tool, and
6
+ * it shouldn't cost a navigation. A modal is what people expect, and the reason
7
+ * it's pinned to the TOP rather than centred is the keyboard: a centred panel
8
+ * gets shoved up or covered the moment the field focuses, and a bottom sheet is
9
+ * simply underneath it. At the top it stays put and stays readable.
10
+ *
11
+ * The field is multiline for anything textual. Stored values are routinely
12
+ * tokens, URLs and serialized blobs, and a single line shows you roughly forty
13
+ * characters of them, scrolling sideways — which is how you edit the wrong part
14
+ * of a string without noticing.
15
+ *
16
+ * Type is preserved by construction: the ORIGINAL value's type picks the editor
17
+ * AND decides how the draft is read back, so editing a number can only produce
18
+ * a number. Raw JSON — the escape hatch for containers — re-checks the parsed
19
+ * result and refuses a different shape.
20
+ *
21
+ * Nothing here writes. `onSave` hands the value to whoever owns it.
22
+ */
23
+ interface StorageValueEditModalProps {
24
+ /** Path into the value being edited — labels the panel, never used to write. */
25
+ path: string[];
26
+ value: unknown;
27
+ onSave: (next: unknown) => void;
28
+ onCancel: () => void;
29
+ /** "Save" when this writes, "Apply" when it only updates a draft. */
30
+ saveLabel?: string;
31
+ /** Disables the controls while a write is in flight. */
32
+ busy?: boolean;
33
+ }
34
+ export declare function StorageValueEditModal({ path, value, onSave, onCancel, saveLabel, busy, }: StorageValueEditModalProps): import("react").JSX.Element;
35
+ export {};
36
+ //# sourceMappingURL=StorageValueEditModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageValueEditModal.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageValueEditModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAcH,UAAU,0BAA0B;IAClC,gFAAgF;IAChF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkCD,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAkB,EAClB,IAAY,GACb,EAAE,0BAA0B,+BAwG5B"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Everything editing a key involves, minus how it looks.
3
+ *
4
+ * The phone and the dashboard run the same editor: one buffered draft, one
5
+ * write on save, a selection the structural actions operate on, a modal for
6
+ * typing a value, and a guard so closing can't silently drop unsaved work.
7
+ * What differs is presentation — thumb-sized tiles under a full screen versus
8
+ * chips docked in a panel — which is a rendering concern and nothing more.
9
+ *
10
+ * Keeping the rules here means the two surfaces can't drift on the things that
11
+ * would actually hurt: whether a boolean opens an editor, whether a failed
12
+ * write closes the editor anyway, what "dirty" means.
13
+ */
14
+ import { type DataTreeSelection } from "@buoy-gg/shared-ui/dataViewer";
15
+ import { type TreeDraft } from "./useTreeDraft";
16
+ export interface KeyEditor {
17
+ draft: TreeDraft;
18
+ /** The tree row the structural actions apply to. */
19
+ selection: DataTreeSelection | null;
20
+ setSelection: (selection: DataTreeSelection | null) => void;
21
+ /** Which node the value modal is open on. Null means it's closed. */
22
+ valuePath: string[] | null;
23
+ /** Open the value modal — or, for a boolean, just flip it. */
24
+ openValueEditor: (path: string[]) => void;
25
+ closeValueEditor: () => void;
26
+ /** Take the modal's result into the draft. */
27
+ applyValue: (next: unknown) => void;
28
+ /** Open the modal on the whole value — the manual/raw JSON escape hatch. */
29
+ openRawEditor: () => void;
30
+ /** Leave, resolving unsaved work first. */
31
+ requestClose: () => void;
32
+ /** Write, and leave only if the write landed. */
33
+ saveAndClose: () => void;
34
+ }
35
+ export interface KeyEditorOptions {
36
+ /** The value as storage holds it, already un-stringified. */
37
+ value: unknown;
38
+ /** Performs the single write. Rejecting keeps the work on screen. */
39
+ save: (raw: string) => Promise<void>;
40
+ onClose: () => void;
41
+ /**
42
+ * Asks the user what to do about unsaved work. Called only when dirty; the
43
+ * host owns this because a phone wants a native alert and a panel may not.
44
+ */
45
+ confirmDiscard: (choices: {
46
+ save: () => void;
47
+ discard: () => void;
48
+ }) => void;
49
+ }
50
+ export declare function useKeyEditor({ value, save, onClose, confirmDiscard, }: KeyEditorOptions): KeyEditor;
51
+ //# sourceMappingURL=useKeyEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyEditor.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useKeyEditor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,oDAAoD;IACpD,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D,qEAAqE;IACrE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,8CAA8C;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,4EAA4E;IAC5E,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,2CAA2C;IAC3C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iDAAiD;IACjD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,KAAK,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,cAAc,EAAE,CAAC,OAAO,EAAE;QACxB,IAAI,EAAE,MAAM,IAAI,CAAC;QACjB,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,KAAK,IAAI,CAAC;CACZ;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,OAAO,EACP,cAAc,GACf,EAAE,gBAAgB,GAAG,SAAS,CA2E9B"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Measure a container's width, for the layouts that switch between a card list
3
+ * and a wide table.
4
+ *
5
+ * Three things went wrong before this landed on a callback ref; all three are
6
+ * worth knowing, because the same trap is waiting in any other tool that wants
7
+ * a width-driven layout.
8
+ *
9
+ * 1. `onLayout` ALONE IS NOT ENOUGH. On react-native-web it never delivered its
10
+ * first callback for these subtrees. The node carries RNW's
11
+ * `__reactLayoutHandler`, and a ResizeObserver attached by hand fires on that
12
+ * very same node — so the handler is wired and the observer works; RNW's
13
+ * shared observer just never calls it. `width` stayed 0 and the table never
14
+ * appeared, silently. `onLayout` is still wired here because it works on
15
+ * native.
16
+ *
17
+ * 2. RE-MEASURING EVERY RENDER DEADLOCKS THE RENDERER. Filtering a list changes
18
+ * whether its scrollbar is present, which changes the container width, which
19
+ * re-renders, which re-measures — with no fixed point. An observer only fires
20
+ * when the size genuinely changes, so layout settles.
21
+ *
22
+ * 3. A MOUNT-ONLY EFFECT MISSES THE NODE. These components early-return a
23
+ * loading state before the measured container exists, so `ref.current` is
24
+ * null when a `useEffect(…, [])` runs, and it never runs again. A callback
25
+ * ref fires whenever the node actually attaches — including the second time.
26
+ */
27
+ import type { LayoutChangeEvent } from "react-native";
28
+ export interface MeasuredWidth {
29
+ /** Attach to the container whose width decides the layout. */
30
+ ref: (node: unknown) => void;
31
+ /** 0 until the first measurement lands. */
32
+ width: number;
33
+ /** Attach alongside `ref` — this is the native path. */
34
+ onLayout: (event: LayoutChangeEvent) => void;
35
+ }
36
+ export declare function useMeasuredWidth(): MeasuredWidth;
37
+ //# sourceMappingURL=useMeasuredWidth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMeasuredWidth.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMeasuredWidth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA0BtD,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,GAAG,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAuChD"}
@@ -1,4 +1,8 @@
1
1
  import { StorageKeyInfo } from "../types";
2
+ interface UseSecureStoreKeysOptions {
3
+ /** Re-read interval in ms. `0` disables polling. */
4
+ pollMs?: number;
5
+ }
2
6
  interface UseSecureStoreKeysResult {
3
7
  storageKeys: StorageKeyInfo[];
4
8
  isLoading: boolean;
@@ -12,7 +16,10 @@ interface UseSecureStoreKeysResult {
12
16
  * `registerSecureStoreKeys()` (see SecureStoreRegistry). Values are read with
13
17
  * the options each key was registered with (keychainService must match), and
14
18
  * biometric-protected keys are listed without being read.
19
+ *
20
+ * Values are re-read on a poll and whenever the registry changes, so the
21
+ * browser tracks writes the app makes while the tool is open.
15
22
  */
16
- export declare function useSecureStoreKeys(): UseSecureStoreKeysResult;
23
+ export declare function useSecureStoreKeys(options?: UseSecureStoreKeysOptions): UseSecureStoreKeysResult;
17
24
  export {};
18
25
  //# sourceMappingURL=useSecureStoreKeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSecureStoreKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useSecureStoreKeys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAU1C,UAAU,wBAAwB;IAChC,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;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,wBAAwB,CA4F7D"}
1
+ {"version":3,"file":"useSecureStoreKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useSecureStoreKeys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAsB1C,UAAU,yBAAyB;IACjC,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,wBAAwB;IAChC,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;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CA8H1B"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * A local draft of a storage value, edited in place and written ONCE.
3
+ *
4
+ * Applying each tree op straight to the device was the obvious first cut and it
5
+ * behaves badly for two compounding reasons:
6
+ *
7
+ * 1. **Every op is a round trip.** The write lands, the device emits a storage
8
+ * event, a snapshot comes back, and the browser re-reads every backend — so
9
+ * a six-tap reorder is six writes and six full refreshes. The tree rebuilds
10
+ * under the user mid-gesture.
11
+ * 2. **The highlight and the value fall out of step.** Selection is local and
12
+ * moves instantly; the value it points at only catches up when the round
13
+ * trip completes, so for a beat the highlight sits on the old contents.
14
+ *
15
+ * Optimistic updates — the React Query pattern of rendering the expected result
16
+ * and reconciling later — fix (2) but not (1): they still write per change.
17
+ * Buffering fixes both, and it's what every editor that owns a document does
18
+ * (a form's dirty state, an IDE's unsaved buffer, JSON Editor's in-memory doc
19
+ * with an explicit save).
20
+ *
21
+ * The trade is that the buffer can go stale if the app writes the same key
22
+ * while you're editing. That's the same last-write-wins a text editor has, and
23
+ * `isDirty` at least makes it visible that you're holding unsaved changes.
24
+ */
25
+ import { type JsonOp } from "@buoy-gg/shared-ui/dataViewer";
26
+ export interface TreeDraft {
27
+ /** True while the tree is in edit mode. */
28
+ isEditing: boolean;
29
+ /** What the tree should render — the draft while editing, else the live value. */
30
+ value: unknown;
31
+ /** True when the draft differs from what's stored. */
32
+ isDirty: boolean;
33
+ /** True while the single write is in flight. */
34
+ isSaving: boolean;
35
+ /** Error from the last save attempt, or null. */
36
+ error: string | null;
37
+ /** Where the tree should move its highlight after the last op. */
38
+ selectPath: string[] | null | undefined;
39
+ begin: () => void;
40
+ /** Apply one op to the DRAFT. Nothing is written. */
41
+ apply: (op: JsonOp) => void;
42
+ /**
43
+ * Move the highlight explicitly, for the ops that CREATE a node.
44
+ * `selectionPathAfterOp` handles the ones that move or delete a node, but it
45
+ * can't handle these — it doesn't see the container, so it can't know an
46
+ * append landed at index 3.
47
+ */
48
+ selectAt: (path: string[]) => void;
49
+ /**
50
+ * Write the draft to storage and leave edit mode. No-op write when clean.
51
+ *
52
+ * Resolves `true` when the value is safely stored and `false` when the write
53
+ * was refused — it never rejects, because a failed save is a state this hook
54
+ * handles (it keeps edit mode open and sets `error`). Callers that navigate
55
+ * away on save MUST check the result, or they'll close over a draft that was
56
+ * never written and show the user nothing.
57
+ */
58
+ commit: () => Promise<boolean>;
59
+ /** Throw the draft away and leave edit mode. */
60
+ discard: () => void;
61
+ }
62
+ /**
63
+ * @param liveValue the value as storage currently holds it (already parsed)
64
+ * @param save persists the serialized draft; rejecting keeps edit mode open
65
+ */
66
+ export declare function useTreeDraft(liveValue: unknown, save?: (raw: string) => Promise<void>): TreeDraft;
67
+ //# sourceMappingURL=useTreeDraft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTreeDraft.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useTreeDraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAqC,KAAK,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE/F,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,KAAK,EAAE,OAAO,CAAC;IACf,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kEAAkE;IAClE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;IAExC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qDAAqD;IACrD,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,gDAAgD;IAChD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GACpC,SAAS,CA4EX"}
@@ -4,7 +4,9 @@ export { StorageKeyCard } from "./components/StorageKeyCard";
4
4
  export { StorageKeyStatsSection } from "./components/StorageKeyStats";
5
5
  export { StorageKeySection } from "./components/StorageKeySection";
6
6
  export { StorageBrowserMode } from "./components/StorageBrowserMode";
7
+ export type { StorageFilterType, StorageTypeFilter, } from "./components/StorageFilterCards";
7
8
  export { StorageEventsSection } from "./components/StorageEventsSection";
9
+ export { STORAGE_OPS, storageOpOf, storageOpDot, isInitialScan, type StorageOp, } from "./utils/storageOps";
8
10
  export { StorageEventCard, getValueType, type StorageEventCardData, type StorageValueType } from "./components/StorageEventCard";
9
11
  export { StorageEventDetailContent, StorageEventDetailFooter } from "./components/StorageEventDetailContent";
10
12
  export { useAsyncStorageKeys } from "./hooks/useAsyncStorageKeys";
@@ -1 +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;AACzE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjI,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAG7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;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