@buoy-gg/react-query 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/README.md +389 -0
  2. package/lib/commonjs/index.js +107 -0
  3. package/lib/commonjs/package.json +1 -0
  4. package/lib/commonjs/preset.js +220 -0
  5. package/lib/commonjs/react-query/ReactQueryDevTools.js +335 -0
  6. package/lib/commonjs/react-query/components/DataEditorMode.js +316 -0
  7. package/lib/commonjs/react-query/components/FilterStatusBadge.js +51 -0
  8. package/lib/commonjs/react-query/components/MutationBrowserMode.js +51 -0
  9. package/lib/commonjs/react-query/components/MutationEditorMode.js +257 -0
  10. package/lib/commonjs/react-query/components/QueryBrowserMode.js +82 -0
  11. package/lib/commonjs/react-query/components/QueryDebugInfo.js +107 -0
  12. package/lib/commonjs/react-query/components/QueryFilterViewV3.js +221 -0
  13. package/lib/commonjs/react-query/components/QuerySelector.js +208 -0
  14. package/lib/commonjs/react-query/components/ReactQueryDevToolsModal.js +76 -0
  15. package/lib/commonjs/react-query/components/ReactQuerySection.js +47 -0
  16. package/lib/commonjs/react-query/components/WifiToggle.js +49 -0
  17. package/lib/commonjs/react-query/components/index.js +253 -0
  18. package/lib/commonjs/react-query/components/modals/DataEditorModal.js +70 -0
  19. package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +69 -0
  20. package/lib/commonjs/react-query/components/modals/MutationBrowserModal.js +146 -0
  21. package/lib/commonjs/react-query/components/modals/MutationEditorModal.js +58 -0
  22. package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +63 -0
  23. package/lib/commonjs/react-query/components/modals/QueryBrowserModal.js +237 -0
  24. package/lib/commonjs/react-query/components/modals/ReactQueryModal.js +83 -0
  25. package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +171 -0
  26. package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +204 -0
  27. package/lib/commonjs/react-query/components/query-browser/ActionButton.js +127 -0
  28. package/lib/commonjs/react-query/components/query-browser/ClearCacheButton.js +53 -0
  29. package/lib/commonjs/react-query/components/query-browser/Explorer.js +985 -0
  30. package/lib/commonjs/react-query/components/query-browser/MutationButton.js +184 -0
  31. package/lib/commonjs/react-query/components/query-browser/MutationDetails.js +122 -0
  32. package/lib/commonjs/react-query/components/query-browser/MutationDetailsChips.js +66 -0
  33. package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +117 -0
  34. package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +111 -0
  35. package/lib/commonjs/react-query/components/query-browser/MutationsList.js +212 -0
  36. package/lib/commonjs/react-query/components/query-browser/NetworkToggleButton.js +54 -0
  37. package/lib/commonjs/react-query/components/query-browser/QueryActions.js +138 -0
  38. package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +146 -0
  39. package/lib/commonjs/react-query/components/query-browser/QueryDetails.js +137 -0
  40. package/lib/commonjs/react-query/components/query-browser/QueryDetailsChip.js +76 -0
  41. package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +94 -0
  42. package/lib/commonjs/react-query/components/query-browser/QueryRow.js +93 -0
  43. package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +125 -0
  44. package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +130 -0
  45. package/lib/commonjs/react-query/components/query-browser/StorageStatusCount.js +106 -0
  46. package/lib/commonjs/react-query/components/query-browser/index.js +170 -0
  47. package/lib/commonjs/react-query/components/query-browser/svgs.js +74 -0
  48. package/lib/commonjs/react-query/hooks/index.js +96 -0
  49. package/lib/commonjs/react-query/hooks/useActionButtons.js +59 -0
  50. package/lib/commonjs/react-query/hooks/useAllMutations.js +35 -0
  51. package/lib/commonjs/react-query/hooks/useAllQueries.js +117 -0
  52. package/lib/commonjs/react-query/hooks/useModalManager.js +178 -0
  53. package/lib/commonjs/react-query/hooks/useModalPersistence.js +71 -0
  54. package/lib/commonjs/react-query/hooks/useMutationActionButtons.js +22 -0
  55. package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +110 -0
  56. package/lib/commonjs/react-query/hooks/useReactQueryState.js +24 -0
  57. package/lib/commonjs/react-query/hooks/useSelectedMutation.js +30 -0
  58. package/lib/commonjs/react-query/hooks/useSelectedQuery.js +96 -0
  59. package/lib/commonjs/react-query/hooks/useStorageQueryCounts.js +28 -0
  60. package/lib/commonjs/react-query/hooks/useWifiState.js +67 -0
  61. package/lib/commonjs/react-query/index.js +16 -0
  62. package/lib/commonjs/react-query/types/index.js +16 -0
  63. package/lib/commonjs/react-query/types/types.js +14 -0
  64. package/lib/commonjs/react-query/utils/actions/deleteItem.js +23 -0
  65. package/lib/commonjs/react-query/utils/actions/invalidate.js +13 -0
  66. package/lib/commonjs/react-query/utils/actions/refetch.js +15 -0
  67. package/lib/commonjs/react-query/utils/actions/remove.js +12 -0
  68. package/lib/commonjs/react-query/utils/actions/reset.js +15 -0
  69. package/lib/commonjs/react-query/utils/actions/triggerError.js +30 -0
  70. package/lib/commonjs/react-query/utils/actions/triggerLoading.js +51 -0
  71. package/lib/commonjs/react-query/utils/deleteNestedDataByPath.js +56 -0
  72. package/lib/commonjs/react-query/utils/formatRelativeTime.js +29 -0
  73. package/lib/commonjs/react-query/utils/getQueryStatusColor.js +16 -0
  74. package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +17 -0
  75. package/lib/commonjs/react-query/utils/getStorageQueryCounts.js +35 -0
  76. package/lib/commonjs/react-query/utils/index.js +170 -0
  77. package/lib/commonjs/react-query/utils/modalStorageOperations.js +127 -0
  78. package/lib/commonjs/react-query/utils/storageQueryUtils.js +149 -0
  79. package/lib/commonjs/react-query/utils/updateNestedDataByPath.js +61 -0
  80. package/lib/module/index.js +19 -0
  81. package/lib/module/preset.js +216 -0
  82. package/lib/module/react-query/ReactQueryDevTools.js +68 -0
  83. package/lib/module/react-query/components/DataEditorMode.js +310 -0
  84. package/lib/module/react-query/components/FilterStatusBadge.js +47 -0
  85. package/lib/module/react-query/components/MutationBrowserMode.js +46 -0
  86. package/lib/module/react-query/components/MutationEditorMode.js +252 -0
  87. package/lib/module/react-query/components/QueryBrowserMode.js +77 -0
  88. package/lib/module/react-query/components/QueryDebugInfo.js +104 -0
  89. package/lib/module/react-query/components/QueryFilterViewV3.js +218 -0
  90. package/lib/module/react-query/components/QuerySelector.js +204 -0
  91. package/lib/module/react-query/components/ReactQueryDevToolsModal.js +72 -0
  92. package/lib/module/react-query/components/ReactQuerySection.js +43 -0
  93. package/lib/module/react-query/components/WifiToggle.js +46 -0
  94. package/lib/module/react-query/components/index.js +29 -0
  95. package/lib/module/react-query/components/modals/DataEditorModal.js +66 -0
  96. package/lib/module/react-query/components/modals/MutationBrowserFooter.js +64 -0
  97. package/lib/module/react-query/components/modals/MutationBrowserModal.js +143 -0
  98. package/lib/module/react-query/components/modals/MutationEditorModal.js +54 -0
  99. package/lib/module/react-query/components/modals/QueryBrowserFooter.js +58 -0
  100. package/lib/module/react-query/components/modals/QueryBrowserModal.js +233 -0
  101. package/lib/module/react-query/components/modals/ReactQueryModal.js +79 -0
  102. package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +167 -0
  103. package/lib/module/react-query/components/modals/SwipeIndicator.js +200 -0
  104. package/lib/module/react-query/components/query-browser/ActionButton.js +124 -0
  105. package/lib/module/react-query/components/query-browser/ClearCacheButton.js +49 -0
  106. package/lib/module/react-query/components/query-browser/Explorer.js +983 -0
  107. package/lib/module/react-query/components/query-browser/MutationButton.js +180 -0
  108. package/lib/module/react-query/components/query-browser/MutationDetails.js +117 -0
  109. package/lib/module/react-query/components/query-browser/MutationDetailsChips.js +62 -0
  110. package/lib/module/react-query/components/query-browser/MutationInformation.js +112 -0
  111. package/lib/module/react-query/components/query-browser/MutationStatusCount.js +106 -0
  112. package/lib/module/react-query/components/query-browser/MutationsList.js +207 -0
  113. package/lib/module/react-query/components/query-browser/NetworkToggleButton.js +50 -0
  114. package/lib/module/react-query/components/query-browser/QueryActions.js +133 -0
  115. package/lib/module/react-query/components/query-browser/QueryBrowser.js +141 -0
  116. package/lib/module/react-query/components/query-browser/QueryDetails.js +132 -0
  117. package/lib/module/react-query/components/query-browser/QueryDetailsChip.js +72 -0
  118. package/lib/module/react-query/components/query-browser/QueryInformation.js +89 -0
  119. package/lib/module/react-query/components/query-browser/QueryRow.js +89 -0
  120. package/lib/module/react-query/components/query-browser/QueryStatus.js +121 -0
  121. package/lib/module/react-query/components/query-browser/QueryStatusCount.js +125 -0
  122. package/lib/module/react-query/components/query-browser/StorageStatusCount.js +101 -0
  123. package/lib/module/react-query/components/query-browser/index.js +22 -0
  124. package/lib/module/react-query/components/query-browser/svgs.js +66 -0
  125. package/lib/module/react-query/hooks/index.js +23 -0
  126. package/lib/module/react-query/hooks/useActionButtons.js +54 -0
  127. package/lib/module/react-query/hooks/useAllMutations.js +32 -0
  128. package/lib/module/react-query/hooks/useAllQueries.js +114 -0
  129. package/lib/module/react-query/hooks/useModalManager.js +175 -0
  130. package/lib/module/react-query/hooks/useModalPersistence.js +67 -0
  131. package/lib/module/react-query/hooks/useMutationActionButtons.js +18 -0
  132. package/lib/module/react-query/hooks/useQueryStatusCounts.js +108 -0
  133. package/lib/module/react-query/hooks/useReactQueryState.js +20 -0
  134. package/lib/module/react-query/hooks/useSelectedMutation.js +27 -0
  135. package/lib/module/react-query/hooks/useSelectedQuery.js +92 -0
  136. package/lib/module/react-query/hooks/useStorageQueryCounts.js +25 -0
  137. package/lib/module/react-query/hooks/useWifiState.js +64 -0
  138. package/lib/module/react-query/index.js +3 -0
  139. package/lib/module/react-query/types/index.js +3 -0
  140. package/lib/module/react-query/types/types.js +10 -0
  141. package/lib/module/react-query/utils/actions/deleteItem.js +19 -0
  142. package/lib/module/react-query/utils/actions/invalidate.js +9 -0
  143. package/lib/module/react-query/utils/actions/refetch.js +11 -0
  144. package/lib/module/react-query/utils/actions/remove.js +8 -0
  145. package/lib/module/react-query/utils/actions/reset.js +11 -0
  146. package/lib/module/react-query/utils/actions/triggerError.js +26 -0
  147. package/lib/module/react-query/utils/actions/triggerLoading.js +47 -0
  148. package/lib/module/react-query/utils/deleteNestedDataByPath.js +51 -0
  149. package/lib/module/react-query/utils/formatRelativeTime.js +25 -0
  150. package/lib/module/react-query/utils/getQueryStatusColor.js +12 -0
  151. package/lib/module/react-query/utils/getQueryStatusLabel.js +13 -0
  152. package/lib/module/react-query/utils/getStorageQueryCounts.js +31 -0
  153. package/lib/module/react-query/utils/index.js +27 -0
  154. package/lib/module/react-query/utils/modalStorageOperations.js +117 -0
  155. package/lib/module/react-query/utils/storageQueryUtils.js +140 -0
  156. package/lib/module/react-query/utils/updateNestedDataByPath.js +56 -0
  157. package/lib/typescript/index.d.ts +7 -0
  158. package/lib/typescript/index.d.ts.map +1 -0
  159. package/lib/typescript/preset.d.ts +160 -0
  160. package/lib/typescript/preset.d.ts.map +1 -0
  161. package/lib/typescript/react-query/ReactQueryDevTools.d.ts +45 -0
  162. package/lib/typescript/react-query/ReactQueryDevTools.d.ts.map +1 -0
  163. package/lib/typescript/react-query/components/DataEditorMode.d.ts +25 -0
  164. package/lib/typescript/react-query/components/DataEditorMode.d.ts.map +1 -0
  165. package/lib/typescript/react-query/components/FilterStatusBadge.d.ts +12 -0
  166. package/lib/typescript/react-query/components/FilterStatusBadge.d.ts.map +1 -0
  167. package/lib/typescript/react-query/components/MutationBrowserMode.d.ts +14 -0
  168. package/lib/typescript/react-query/components/MutationBrowserMode.d.ts.map +1 -0
  169. package/lib/typescript/react-query/components/MutationEditorMode.d.ts +12 -0
  170. package/lib/typescript/react-query/components/MutationEditorMode.d.ts.map +1 -0
  171. package/lib/typescript/react-query/components/QueryBrowserMode.d.ts +14 -0
  172. package/lib/typescript/react-query/components/QueryBrowserMode.d.ts.map +1 -0
  173. package/lib/typescript/react-query/components/QueryDebugInfo.d.ts +6 -0
  174. package/lib/typescript/react-query/components/QueryDebugInfo.d.ts.map +1 -0
  175. package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts +17 -0
  176. package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +1 -0
  177. package/lib/typescript/react-query/components/QuerySelector.d.ts +15 -0
  178. package/lib/typescript/react-query/components/QuerySelector.d.ts.map +1 -0
  179. package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts +19 -0
  180. package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts.map +1 -0
  181. package/lib/typescript/react-query/components/ReactQuerySection.d.ts +11 -0
  182. package/lib/typescript/react-query/components/ReactQuerySection.d.ts.map +1 -0
  183. package/lib/typescript/react-query/components/WifiToggle.d.ts +8 -0
  184. package/lib/typescript/react-query/components/WifiToggle.d.ts.map +1 -0
  185. package/lib/typescript/react-query/components/index.d.ts +21 -0
  186. package/lib/typescript/react-query/components/index.d.ts.map +1 -0
  187. package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts +17 -0
  188. package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts.map +1 -0
  189. package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts +17 -0
  190. package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +1 -0
  191. package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts +21 -0
  192. package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts.map +1 -0
  193. package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts +17 -0
  194. package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts.map +1 -0
  195. package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts +16 -0
  196. package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +1 -0
  197. package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts +21 -0
  198. package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts.map +1 -0
  199. package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts +29 -0
  200. package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts.map +1 -0
  201. package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts +19 -0
  202. package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +1 -0
  203. package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts +14 -0
  204. package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +1 -0
  205. package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts +49 -0
  206. package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts.map +1 -0
  207. package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts +12 -0
  208. package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts.map +1 -0
  209. package/lib/typescript/react-query/components/query-browser/Explorer.d.ts +19 -0
  210. package/lib/typescript/react-query/components/query-browser/Explorer.d.ts.map +1 -0
  211. package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts +12 -0
  212. package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts.map +1 -0
  213. package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts +10 -0
  214. package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts.map +1 -0
  215. package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts +10 -0
  216. package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts.map +1 -0
  217. package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts +8 -0
  218. package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts.map +1 -0
  219. package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts +12 -0
  220. package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +1 -0
  221. package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts +17 -0
  222. package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts.map +1 -0
  223. package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts +11 -0
  224. package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts.map +1 -0
  225. package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts +12 -0
  226. package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts.map +1 -0
  227. package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts +19 -0
  228. package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts.map +1 -0
  229. package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts +10 -0
  230. package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts.map +1 -0
  231. package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts +10 -0
  232. package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts.map +1 -0
  233. package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts +12 -0
  234. package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts.map +1 -0
  235. package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts +12 -0
  236. package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +1 -0
  237. package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts +17 -0
  238. package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +1 -0
  239. package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts +11 -0
  240. package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +1 -0
  241. package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts +18 -0
  242. package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts.map +1 -0
  243. package/lib/typescript/react-query/components/query-browser/index.d.ts +21 -0
  244. package/lib/typescript/react-query/components/query-browser/index.d.ts.map +1 -0
  245. package/lib/typescript/react-query/components/query-browser/svgs.d.ts +17 -0
  246. package/lib/typescript/react-query/components/query-browser/svgs.d.ts.map +1 -0
  247. package/lib/typescript/react-query/hooks/index.d.ts +13 -0
  248. package/lib/typescript/react-query/hooks/index.d.ts.map +1 -0
  249. package/lib/typescript/react-query/hooks/useActionButtons.d.ts +21 -0
  250. package/lib/typescript/react-query/hooks/useActionButtons.d.ts.map +1 -0
  251. package/lib/typescript/react-query/hooks/useAllMutations.d.ts +10 -0
  252. package/lib/typescript/react-query/hooks/useAllMutations.d.ts.map +1 -0
  253. package/lib/typescript/react-query/hooks/useAllQueries.d.ts +12 -0
  254. package/lib/typescript/react-query/hooks/useAllQueries.d.ts.map +1 -0
  255. package/lib/typescript/react-query/hooks/useModalManager.d.ts +39 -0
  256. package/lib/typescript/react-query/hooks/useModalManager.d.ts.map +1 -0
  257. package/lib/typescript/react-query/hooks/useModalPersistence.d.ts +29 -0
  258. package/lib/typescript/react-query/hooks/useModalPersistence.d.ts.map +1 -0
  259. package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts +15 -0
  260. package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts.map +1 -0
  261. package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts +25 -0
  262. package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +1 -0
  263. package/lib/typescript/react-query/hooks/useReactQueryState.d.ts +9 -0
  264. package/lib/typescript/react-query/hooks/useReactQueryState.d.ts.map +1 -0
  265. package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts +7 -0
  266. package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts.map +1 -0
  267. package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts +25 -0
  268. package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts.map +1 -0
  269. package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts +10 -0
  270. package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts.map +1 -0
  271. package/lib/typescript/react-query/hooks/useWifiState.d.ts +9 -0
  272. package/lib/typescript/react-query/hooks/useWifiState.d.ts.map +1 -0
  273. package/lib/typescript/react-query/index.d.ts +2 -0
  274. package/lib/typescript/react-query/index.d.ts.map +1 -0
  275. package/lib/typescript/react-query/types/index.d.ts +2 -0
  276. package/lib/typescript/react-query/types/index.d.ts.map +1 -0
  277. package/lib/typescript/react-query/types/types.d.ts +10 -0
  278. package/lib/typescript/react-query/types/types.d.ts.map +1 -0
  279. package/lib/typescript/react-query/utils/actions/deleteItem.d.ts +9 -0
  280. package/lib/typescript/react-query/utils/actions/deleteItem.d.ts.map +1 -0
  281. package/lib/typescript/react-query/utils/actions/invalidate.d.ts +8 -0
  282. package/lib/typescript/react-query/utils/actions/invalidate.d.ts.map +1 -0
  283. package/lib/typescript/react-query/utils/actions/refetch.d.ts +7 -0
  284. package/lib/typescript/react-query/utils/actions/refetch.d.ts.map +1 -0
  285. package/lib/typescript/react-query/utils/actions/remove.d.ts +8 -0
  286. package/lib/typescript/react-query/utils/actions/remove.d.ts.map +1 -0
  287. package/lib/typescript/react-query/utils/actions/reset.d.ts +8 -0
  288. package/lib/typescript/react-query/utils/actions/reset.d.ts.map +1 -0
  289. package/lib/typescript/react-query/utils/actions/triggerError.d.ts +8 -0
  290. package/lib/typescript/react-query/utils/actions/triggerError.d.ts.map +1 -0
  291. package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts +7 -0
  292. package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts.map +1 -0
  293. package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts +9 -0
  294. package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts.map +1 -0
  295. package/lib/typescript/react-query/utils/formatRelativeTime.d.ts +7 -0
  296. package/lib/typescript/react-query/utils/formatRelativeTime.d.ts.map +1 -0
  297. package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts +10 -0
  298. package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +1 -0
  299. package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts +9 -0
  300. package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +1 -0
  301. package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts +13 -0
  302. package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts.map +1 -0
  303. package/lib/typescript/react-query/utils/index.d.ts +17 -0
  304. package/lib/typescript/react-query/utils/index.d.ts.map +1 -0
  305. package/lib/typescript/react-query/utils/modalStorageOperations.d.ts +55 -0
  306. package/lib/typescript/react-query/utils/modalStorageOperations.d.ts.map +1 -0
  307. package/lib/typescript/react-query/utils/storageQueryUtils.d.ts +69 -0
  308. package/lib/typescript/react-query/utils/storageQueryUtils.d.ts.map +1 -0
  309. package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts +10 -0
  310. package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts.map +1 -0
  311. package/package.json +68 -0
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = QueryDetailsChip;
7
+ var _getQueryStatusLabel = require("../../utils/getQueryStatusLabel");
8
+ var _reactNative = require("react-native");
9
+ var _sharedUi = require("@buoy-gg/shared-ui");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ const backgroundColors = {
12
+ fresh: _sharedUi.buoyColors.success + "15",
13
+ stale: _sharedUi.buoyColors.warning + "15",
14
+ fetching: _sharedUi.buoyColors.primary + "15",
15
+ paused: _sharedUi.buoyColors.textMuted + "1A",
16
+ noObserver: _sharedUi.buoyColors.textMuted + "1A",
17
+ error: _sharedUi.buoyColors.error + "15",
18
+ inactive: _sharedUi.buoyColors.textMuted + "1A"
19
+ };
20
+ const borderColors = {
21
+ fresh: _sharedUi.buoyColors.success + "33",
22
+ stale: _sharedUi.buoyColors.warning + "33",
23
+ fetching: _sharedUi.buoyColors.primary + "33",
24
+ paused: _sharedUi.buoyColors.textMuted + "33",
25
+ noObserver: _sharedUi.buoyColors.textMuted + "33",
26
+ error: _sharedUi.buoyColors.error + "33",
27
+ inactive: _sharedUi.buoyColors.textMuted + "33"
28
+ };
29
+ const textColors = {
30
+ fresh: _sharedUi.buoyColors.success,
31
+ stale: _sharedUi.buoyColors.warning,
32
+ fetching: _sharedUi.buoyColors.primary,
33
+ paused: _sharedUi.buoyColors.textMuted,
34
+ noObserver: _sharedUi.buoyColors.textMuted,
35
+ error: _sharedUi.buoyColors.error,
36
+ inactive: _sharedUi.buoyColors.textMuted
37
+ };
38
+ /**
39
+ * Chip component used to display small query metadata values (status, observers, etc.).
40
+ */
41
+ function QueryDetailsChip({
42
+ query
43
+ }) {
44
+ const status = (0, _getQueryStatusLabel.getQueryStatusLabel)(query);
45
+ const backgroundColor = backgroundColors[status];
46
+ const borderColor = borderColors[status];
47
+ const textColor = textColors[status];
48
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
49
+ style: [styles.container, {
50
+ backgroundColor,
51
+ borderColor
52
+ }],
53
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
54
+ style: [styles.text, {
55
+ color: textColor
56
+ }],
57
+ children: status
58
+ })
59
+ });
60
+ }
61
+ const styles = _reactNative.StyleSheet.create({
62
+ container: {
63
+ paddingHorizontal: 8,
64
+ paddingVertical: 4,
65
+ borderWidth: 1,
66
+ borderRadius: 6,
67
+ alignSelf: "flex-start"
68
+ },
69
+ text: {
70
+ fontSize: 11,
71
+ fontWeight: "600",
72
+ textTransform: "uppercase",
73
+ letterSpacing: 0.5,
74
+ fontFamily: "monospace"
75
+ }
76
+ });
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = QueryInformation;
7
+ var _QueryDetails = _interopRequireDefault(require("./QueryDetails"));
8
+ var _QueryActions = _interopRequireDefault(require("./QueryActions"));
9
+ var _Explorer = _interopRequireDefault(require("./Explorer"));
10
+ var _reactNative = require("react-native");
11
+ var _sharedUi = require("@buoy-gg/shared-ui");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /**
15
+ * Stacked detail view combining metadata, actions, and explorers for the selected query.
16
+ */
17
+ function QueryInformation({
18
+ selectedQuery,
19
+ setSelectedQuery
20
+ }) {
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
22
+ "sentry-label": "ignore devtools query info scroll",
23
+ style: styles.flexOne,
24
+ contentContainerStyle: styles.scrollContent,
25
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
26
+ style: styles.section,
27
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryDetails.default, {
28
+ query: selectedQuery
29
+ })
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
31
+ style: styles.section,
32
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryActions.default, {
33
+ query: selectedQuery,
34
+ setSelectedQuery: setSelectedQuery
35
+ })
36
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
37
+ style: styles.section,
38
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
39
+ style: styles.headerText,
40
+ children: "Data Explorer"
41
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
42
+ style: styles.contentView,
43
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
44
+ editable: true,
45
+ label: "Data",
46
+ value: selectedQuery?.state.data,
47
+ defaultExpanded: ["Data"],
48
+ activeQuery: selectedQuery
49
+ })
50
+ })]
51
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
52
+ style: styles.section,
53
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
54
+ style: styles.headerText,
55
+ children: "Query Explorer"
56
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
57
+ style: styles.contentView,
58
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
59
+ label: "Query",
60
+ value: selectedQuery,
61
+ defaultExpanded: ["Query", "queryKey"],
62
+ activeQuery: selectedQuery
63
+ })
64
+ })]
65
+ })]
66
+ });
67
+ }
68
+ const styles = _reactNative.StyleSheet.create({
69
+ flexOne: {
70
+ flex: 1,
71
+ backgroundColor: _sharedUi.buoyColors.base
72
+ },
73
+ scrollContent: {
74
+ paddingBottom: 16,
75
+ paddingHorizontal: 8
76
+ },
77
+ section: {
78
+ marginBottom: 16
79
+ },
80
+ headerText: {
81
+ fontSize: 16,
82
+ fontWeight: "600",
83
+ color: _sharedUi.buoyColors.text,
84
+ marginBottom: 8,
85
+ textAlign: "left"
86
+ },
87
+ contentView: {
88
+ backgroundColor: _sharedUi.buoyColors.card,
89
+ borderRadius: 12,
90
+ borderWidth: 1,
91
+ borderColor: _sharedUi.buoyColors.border,
92
+ padding: 16
93
+ }
94
+ });
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _getQueryStatusLabel = require("../../utils/getQueryStatusLabel");
8
+ var _formatRelativeTime = require("../../utils/formatRelativeTime");
9
+ var _sharedUi = require("@buoy-gg/shared-ui");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ const getQueryText = query => {
12
+ if (!query?.queryKey) return "Unknown Query";
13
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
14
+ return keys.filter(k => k != null).map(k => String(k)).join(" › ") || "Unknown Query";
15
+ };
16
+ /**
17
+ * Single row representation of a query for the list view, showing status and observer count.
18
+ */
19
+ const QueryRow = ({
20
+ query,
21
+ isSelected,
22
+ onSelect
23
+ }) => {
24
+ // Buoy theme status color mapping
25
+ const getStatusHexColor = status => {
26
+ switch (status) {
27
+ case "disabled":
28
+ return _sharedUi.buoyColors.textMuted + "80";
29
+ // More muted for disabled
30
+ case "fresh":
31
+ return _sharedUi.buoyColors.success;
32
+ case "stale":
33
+ return _sharedUi.buoyColors.warning;
34
+ case "inactive":
35
+ return _sharedUi.buoyColors.textMuted;
36
+ case "fetching":
37
+ return _sharedUi.buoyColors.primary;
38
+ // teal instead of blue
39
+ case "paused":
40
+ return _sharedUi.buoyColors.textMuted;
41
+ // muted instead of purple
42
+ default:
43
+ return _sharedUi.buoyColors.textSecondary;
44
+ }
45
+ };
46
+ const status = (0, _getQueryStatusLabel.getQueryStatusLabel)(query);
47
+ const observerCount = query.getObserversCount();
48
+ const isDisabled = query.isDisabled();
49
+ const queryHash = getQueryText(query);
50
+
51
+ // Get last updated time - try multiple timestamp fields
52
+ const getTimestamp = () => {
53
+ // Special handling for disabled queries
54
+ if (isDisabled) {
55
+ return "Disabled";
56
+ }
57
+
58
+ // Primary: dataUpdatedAt (when data was last fetched/updated)
59
+ if (query.state.dataUpdatedAt && query.state.dataUpdatedAt > 0) {
60
+ return (0, _formatRelativeTime.formatRelativeTime)(query.state.dataUpdatedAt);
61
+ }
62
+
63
+ // Fallback: Check other potential timestamp fields
64
+ // @ts-ignore - exploring state fields for debugging
65
+ const stateAny = query.state;
66
+
67
+ // Try fetchedAt or other common timestamp fields
68
+ if (stateAny.fetchedAt && stateAny.fetchedAt > 0) {
69
+ return (0, _formatRelativeTime.formatRelativeTime)(stateAny.fetchedAt);
70
+ }
71
+
72
+ // For queries that haven't fetched yet (but aren't disabled)
73
+ if (query.state.dataUpdatedAt === 0) {
74
+ return "Not fetched";
75
+ }
76
+
77
+ // Debug fallback - show what we have
78
+ return `N/A (${query.state.dataUpdatedAt || 0})`;
79
+ };
80
+ const lastUpdated = getTimestamp();
81
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.CompactRow, {
82
+ statusDotColor: getStatusHexColor(status),
83
+ statusLabel: status.charAt(0).toUpperCase() + status.slice(1),
84
+ statusSublabel: `${observerCount} observer${observerCount !== 1 ? "s" : ""}`,
85
+ primaryText: queryHash,
86
+ bottomRightText: lastUpdated,
87
+ badgeText: observerCount,
88
+ badgeColor: getStatusHexColor(status),
89
+ isSelected: isSelected,
90
+ onPress: () => onSelect(query)
91
+ });
92
+ };
93
+ var _default = exports.default = QueryRow;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ /**
11
+ * Pill-like status badge used within status filter rows. Displays label, dot, and count.
12
+ */
13
+ const QueryStatus = ({
14
+ label,
15
+ color,
16
+ count,
17
+ showLabel = true,
18
+ isActive = false,
19
+ onPress,
20
+ onTouchStart
21
+ }) => {
22
+ // Buoy theme color mapping for status indicators
23
+ const getStatusColors = colorName => {
24
+ const colorMap = {
25
+ green: {
26
+ bg: _sharedUi.buoyColors.success + "15",
27
+ border: _sharedUi.buoyColors.success + "40",
28
+ dot: _sharedUi.buoyColors.success,
29
+ text: _sharedUi.buoyColors.success
30
+ },
31
+ yellow: {
32
+ bg: _sharedUi.buoyColors.warning + "15",
33
+ border: _sharedUi.buoyColors.warning + "40",
34
+ dot: _sharedUi.buoyColors.warning,
35
+ text: _sharedUi.buoyColors.warning
36
+ },
37
+ blue: {
38
+ bg: _sharedUi.buoyColors.primary + "15",
39
+ border: _sharedUi.buoyColors.primary + "40",
40
+ dot: _sharedUi.buoyColors.primary,
41
+ text: _sharedUi.buoyColors.primary
42
+ },
43
+ purple: {
44
+ bg: _sharedUi.buoyColors.textMuted + "26",
45
+ border: _sharedUi.buoyColors.textMuted + "59",
46
+ dot: _sharedUi.buoyColors.textMuted,
47
+ text: _sharedUi.buoyColors.textMuted
48
+ },
49
+ red: {
50
+ bg: _sharedUi.buoyColors.error + "15",
51
+ border: _sharedUi.buoyColors.error + "40",
52
+ dot: _sharedUi.buoyColors.error,
53
+ text: _sharedUi.buoyColors.error
54
+ },
55
+ gray: {
56
+ bg: _sharedUi.buoyColors.textMuted + "26",
57
+ border: _sharedUi.buoyColors.textMuted + "59",
58
+ dot: _sharedUi.buoyColors.textMuted,
59
+ text: _sharedUi.buoyColors.textMuted
60
+ }
61
+ };
62
+ return colorMap[colorName] || colorMap.gray;
63
+ };
64
+ const statusColors = getStatusColors(color);
65
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
66
+ "sentry-label": "ignore devtools query status",
67
+ style: [styles.queryStatusTag, isActive && {
68
+ backgroundColor: statusColors.dot + "15",
69
+ borderColor: statusColors.dot + "40"
70
+ }],
71
+ disabled: !onPress,
72
+ onPress: onPress,
73
+ onPressIn: onTouchStart,
74
+ activeOpacity: 0.7,
75
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
76
+ style: [styles.dot, {
77
+ backgroundColor: statusColors.dot
78
+ }]
79
+ }), showLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
80
+ style: [styles.label],
81
+ numberOfLines: 1,
82
+ ellipsizeMode: "tail",
83
+ children: label
84
+ }), count > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
85
+ style: [styles.count, {
86
+ color: statusColors.dot
87
+ }],
88
+ numberOfLines: 1,
89
+ children: count
90
+ })]
91
+ });
92
+ };
93
+ const styles = _reactNative.StyleSheet.create({
94
+ queryStatusTag: {
95
+ flexDirection: "row",
96
+ alignItems: "center",
97
+ backgroundColor: "transparent",
98
+ borderRadius: 12,
99
+ paddingHorizontal: 10,
100
+ paddingVertical: 5,
101
+ height: 26,
102
+ gap: 6,
103
+ borderWidth: 1,
104
+ borderColor: _sharedUi.buoyColors.textMuted + "20"
105
+ },
106
+ dot: {
107
+ width: 6,
108
+ height: 6,
109
+ borderRadius: 3
110
+ },
111
+ label: {
112
+ fontSize: 11,
113
+ fontWeight: "500",
114
+ color: _sharedUi.buoyColors.textSecondary,
115
+ fontFamily: "system"
116
+ },
117
+ count: {
118
+ fontSize: 11,
119
+ fontVariant: ["tabular-nums"],
120
+ fontWeight: "600",
121
+ marginLeft: "auto",
122
+ fontFamily: "system"
123
+ }
124
+ });
125
+ var _default = exports.default = QueryStatus;
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _QueryStatus = _interopRequireDefault(require("./QueryStatus"));
10
+ var _useQueryStatusCounts = _interopRequireDefault(require("../../hooks/useQueryStatusCounts"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /**
14
+ * Horizontal status filter bar for queries with scroll-aware tap handling to prevent misfires.
15
+ */
16
+ const QueryStatusCount = ({
17
+ activeFilter,
18
+ onFilterChange
19
+ }) => {
20
+ const {
21
+ fresh,
22
+ stale,
23
+ fetching,
24
+ paused,
25
+ inactive
26
+ } = (0, _useQueryStatusCounts.default)();
27
+
28
+ // Scroll state management like ChipTabs
29
+ const [isScrolling, setIsScrolling] = (0, _react.useState)(false);
30
+ const touchStartX = (0, _react.useRef)(0);
31
+ const touchStartY = (0, _react.useRef)(0);
32
+ const handleFilterClick = (filter, event) => {
33
+ if (event) {
34
+ // Calculate distance moved during touch (like ChipTabs)
35
+ const dx = Math.abs(event.nativeEvent.pageX - touchStartX.current);
36
+ const dy = Math.abs(event.nativeEvent.pageY - touchStartY.current);
37
+
38
+ // If touch moved more than 5px in any direction, it's a swipe, not a tap
39
+ if (dx > 5 || dy > 5 || isScrolling) {
40
+ return; // Don't trigger filter change
41
+ }
42
+ }
43
+ if (onFilterChange) {
44
+ // Toggle filter: if already active, clear it; otherwise set it
45
+ onFilterChange(activeFilter === filter ? null : filter);
46
+ }
47
+ };
48
+ const handleTouchStart = event => {
49
+ touchStartX.current = event.nativeEvent.pageX;
50
+ touchStartY.current = event.nativeEvent.pageY;
51
+ };
52
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
53
+ style: styles.queryStatusContainer,
54
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
55
+ "sentry-label": "ignore devtools query status count scroll",
56
+ horizontal: true,
57
+ showsHorizontalScrollIndicator: false,
58
+ style: styles.scrollView,
59
+ contentContainerStyle: styles.scrollContent,
60
+ onScrollBeginDrag: () => setIsScrolling(true),
61
+ onScrollEndDrag: () => setTimeout(() => setIsScrolling(false), 300),
62
+ onMomentumScrollBegin: () => setIsScrolling(true),
63
+ onMomentumScrollEnd: () => setTimeout(() => setIsScrolling(false), 300),
64
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
65
+ label: "Fresh",
66
+ color: "green",
67
+ count: fresh,
68
+ isActive: activeFilter === "fresh",
69
+ onPress: event => handleFilterClick("fresh", event),
70
+ onTouchStart: handleTouchStart,
71
+ showLabel: true // Always show labels now
72
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
73
+ label: "Loading",
74
+ color: "blue",
75
+ count: fetching,
76
+ isActive: activeFilter === "fetching",
77
+ onPress: event => handleFilterClick("fetching", event),
78
+ onTouchStart: handleTouchStart,
79
+ showLabel: true // Always show labels now
80
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
81
+ label: "Paused",
82
+ color: "purple",
83
+ count: paused,
84
+ isActive: activeFilter === "paused",
85
+ onPress: event => handleFilterClick("paused", event),
86
+ onTouchStart: handleTouchStart,
87
+ showLabel: true // Always show labels now
88
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
89
+ label: "Stale",
90
+ color: "yellow",
91
+ count: stale,
92
+ isActive: activeFilter === "stale",
93
+ onPress: event => handleFilterClick("stale", event),
94
+ onTouchStart: handleTouchStart,
95
+ showLabel: true // Always show labels now
96
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
97
+ label: "Idle",
98
+ color: "gray",
99
+ count: inactive,
100
+ isActive: activeFilter === "inactive",
101
+ onPress: event => handleFilterClick("inactive", event),
102
+ onTouchStart: handleTouchStart,
103
+ showLabel: true // Always show labels now
104
+ })]
105
+ })
106
+ });
107
+ };
108
+ const styles = _reactNative.StyleSheet.create({
109
+ queryStatusContainer: {
110
+ // Container for ScrollView - take full width
111
+ flex: 1,
112
+ minWidth: 0
113
+ },
114
+ scrollView: {
115
+ // ScrollView itself styles
116
+ flex: 1
117
+ },
118
+ scrollContent: {
119
+ // ScrollView content styles
120
+ flexDirection: "row",
121
+ alignItems: "center",
122
+ gap: 8,
123
+ // Spacing between chips
124
+ paddingHorizontal: 4,
125
+ // Small padding on ends
126
+ paddingVertical: 4,
127
+ flexGrow: 1 // Allow content to grow to fill available space
128
+ }
129
+ });
130
+ var _default = exports.default = QueryStatusCount;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _QueryStatus = _interopRequireDefault(require("./QueryStatus"));
10
+ var _storageQueryUtils = require("../../utils/storageQueryUtils");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const allStorageTypes = ["mmkv", "async", "secure"];
14
+
15
+ /**
16
+ * Storage type filter component following composition principles
17
+ *
18
+ * Applied principles:
19
+ * - Decompose by Responsibility: Dedicated component for storage type filtering
20
+ * - No unnecessary memoization - simple toggle state management [[memory:4875074]]
21
+ */
22
+ const StorageStatusCount = ({
23
+ activeStorageTypes = new Set(allStorageTypes),
24
+ onStorageTypesChange,
25
+ counts
26
+ }) => {
27
+ // Scroll state management like QueryStatusCount
28
+ const [isScrolling, setIsScrolling] = (0, _react.useState)(false);
29
+ const touchStartX = (0, _react.useRef)(0);
30
+ const touchStartY = (0, _react.useRef)(0);
31
+ const handleStorageTypeToggle = (storageType, event) => {
32
+ if (event) {
33
+ // Calculate distance moved during touch (like QueryStatusCount)
34
+ const dx = Math.abs(event.nativeEvent.pageX - touchStartX.current);
35
+ const dy = Math.abs(event.nativeEvent.pageY - touchStartY.current);
36
+
37
+ // If touch moved more than 5px in any direction, it's a swipe, not a tap
38
+ if (dx > 5 || dy > 5 || isScrolling) {
39
+ return; // Don't trigger filter change
40
+ }
41
+ }
42
+ if (onStorageTypesChange) {
43
+ const newStorageTypes = new Set(activeStorageTypes);
44
+ if (newStorageTypes.has(storageType)) {
45
+ newStorageTypes.delete(storageType);
46
+ } else {
47
+ newStorageTypes.add(storageType);
48
+ }
49
+ onStorageTypesChange(newStorageTypes);
50
+ }
51
+ };
52
+ const handleTouchStart = event => {
53
+ touchStartX.current = event.nativeEvent.pageX;
54
+ touchStartY.current = event.nativeEvent.pageY;
55
+ };
56
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
57
+ style: styles.storageStatusContainer,
58
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
59
+ "sentry-label": "ignore devtools storage status count scroll",
60
+ horizontal: true,
61
+ showsHorizontalScrollIndicator: false,
62
+ style: styles.scrollView,
63
+ contentContainerStyle: styles.scrollContent,
64
+ onScrollBeginDrag: () => setIsScrolling(true),
65
+ onScrollEndDrag: () => setTimeout(() => setIsScrolling(false), 300),
66
+ onMomentumScrollBegin: () => setIsScrolling(true),
67
+ onMomentumScrollEnd: () => setTimeout(() => setIsScrolling(false), 300),
68
+ children: allStorageTypes.map(storageType => {
69
+ const count = counts?.[storageType] ?? 0;
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
71
+ label: (0, _storageQueryUtils.getStorageTypeLabel)(storageType),
72
+ color: (0, _storageQueryUtils.getStorageTypeColor)(storageType),
73
+ count: count // Show actual storage query counts
74
+ ,
75
+ isActive: activeStorageTypes.has(storageType),
76
+ onPress: event => handleStorageTypeToggle(storageType, event),
77
+ onTouchStart: handleTouchStart,
78
+ showLabel: true
79
+ }, storageType);
80
+ })
81
+ })
82
+ });
83
+ };
84
+ const styles = _reactNative.StyleSheet.create({
85
+ storageStatusContainer: {
86
+ // Container for ScrollView - take full width
87
+ flex: 1,
88
+ minWidth: 0
89
+ },
90
+ scrollView: {
91
+ // ScrollView itself styles
92
+ flex: 1
93
+ },
94
+ scrollContent: {
95
+ // ScrollView content styles
96
+ flexDirection: "row",
97
+ alignItems: "center",
98
+ gap: 8,
99
+ // Spacing between chips
100
+ paddingHorizontal: 4,
101
+ // Small padding on ends
102
+ paddingVertical: 4,
103
+ flexGrow: 1 // Allow content to grow to fill available space
104
+ }
105
+ });
106
+ var _default = exports.default = StorageStatusCount;