@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,212 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = MutationsList;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _MutationButton = _interopRequireDefault(require("./MutationButton"));
10
+ var _MutationInformation = _interopRequireDefault(require("./MutationInformation"));
11
+ var _useAllMutations = _interopRequireDefault(require("../../hooks/useAllMutations"));
12
+ var _sharedUi = require("@buoy-gg/shared-ui");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ /**
16
+ * Virtualized list of mutations with filtering and selection support for the mutation browser.
17
+ */
18
+ function MutationsList({
19
+ selectedMutation,
20
+ setSelectedMutation,
21
+ activeFilter,
22
+ hideInfoPanel = false,
23
+ contentContainerStyle,
24
+ searchText = ""
25
+ }) {
26
+ const {
27
+ mutations: allmutations
28
+ } = (0, _useAllMutations.default)();
29
+
30
+ // Helper function to get mutation status for filtering
31
+ const getMutationStatus = mutation => {
32
+ if (mutation.state.isPaused) return "paused";
33
+ const status = mutation.state.status;
34
+ return status; // 'idle', 'pending', 'success', 'error'
35
+ };
36
+
37
+ // Filter mutations based on active filter and search text
38
+ const filteredMutations = (0, _react.useMemo)(() => {
39
+ let filtered = allmutations;
40
+
41
+ // Apply status filter
42
+ if (activeFilter) {
43
+ filtered = filtered.filter(mutation => {
44
+ const status = getMutationStatus(mutation);
45
+ return status === activeFilter;
46
+ });
47
+ }
48
+
49
+ // Apply search filter on mutation keys
50
+ if (searchText) {
51
+ const searchLower = searchText.toLowerCase();
52
+ filtered = filtered.filter(mutation => {
53
+ const mutationKey = mutation.options.mutationKey;
54
+ if (!mutationKey) return false;
55
+ const keys = Array.isArray(mutationKey) ? mutationKey : [mutationKey];
56
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
57
+ return keyString.includes(searchLower);
58
+ });
59
+ }
60
+ return filtered;
61
+ }, [allmutations, activeFilter, searchText]);
62
+
63
+ // Height management for resizable mutation information panel
64
+ const screenHeight = _reactNative.Dimensions.get("window").height;
65
+ const defaultInfoHeight = screenHeight * 0.4; // 40% of screen height
66
+ const minInfoHeight = 150;
67
+ const maxInfoHeight = screenHeight * 0.7; // 70% of screen height
68
+
69
+ const infoHeightAnim = (0, _react.useRef)(new _reactNative.Animated.Value(defaultInfoHeight)).current;
70
+ const [, setCurrentInfoHeight] = (0, _react.useState)(defaultInfoHeight);
71
+ const currentInfoHeightRef = (0, _react.useRef)(defaultInfoHeight);
72
+
73
+ // Pan responder for dragging the mutation information panel
74
+ const infoPanResponder = (0, _react.useRef)(_reactNative.PanResponder.create({
75
+ onMoveShouldSetPanResponder: (evt, gestureState) => {
76
+ return Math.abs(gestureState.dy) > Math.abs(gestureState.dx) && Math.abs(gestureState.dy) > 10;
77
+ },
78
+ onPanResponderGrant: () => {
79
+ infoHeightAnim.stopAnimation(value => {
80
+ setCurrentInfoHeight(value);
81
+ currentInfoHeightRef.current = value;
82
+ infoHeightAnim.setValue(value);
83
+ });
84
+ },
85
+ onPanResponderMove: (evt, gestureState) => {
86
+ // Use the ref value which is always current
87
+ const newHeight = currentInfoHeightRef.current - gestureState.dy;
88
+ const clampedHeight = Math.max(minInfoHeight, Math.min(maxInfoHeight, newHeight));
89
+ infoHeightAnim.setValue(clampedHeight);
90
+ },
91
+ onPanResponderRelease: (evt, gestureState) => {
92
+ const finalHeight = Math.max(minInfoHeight, Math.min(maxInfoHeight, currentInfoHeightRef.current - gestureState.dy));
93
+ setCurrentInfoHeight(finalHeight);
94
+ currentInfoHeightRef.current = finalHeight;
95
+ _reactNative.Animated.timing(infoHeightAnim, {
96
+ toValue: finalHeight,
97
+ duration: 200,
98
+ useNativeDriver: false
99
+ }).start(() => {
100
+ // Ensure the animated value and state are perfectly synced after animation
101
+ infoHeightAnim.setValue(finalHeight);
102
+ setCurrentInfoHeight(finalHeight);
103
+ currentInfoHeightRef.current = finalHeight;
104
+ });
105
+ }
106
+ })).current;
107
+
108
+ // Optimize FlatList performance - memoize renderItem to prevent re-renders
109
+ const renderMutation = (0, _react.useCallback)(({
110
+ item
111
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationButton.default, {
112
+ selected: selectedMutation,
113
+ setSelectedMutation: setSelectedMutation,
114
+ mutation: item
115
+ }), [selectedMutation, setSelectedMutation]);
116
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
117
+ style: styles.container,
118
+ children: [filteredMutations.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
119
+ style: styles.listWrapper,
120
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
121
+ "sentry-label": "ignore devtools mutations list",
122
+ data: filteredMutations,
123
+ renderItem: renderMutation,
124
+ keyExtractor: (item, index) => `${item.mutationId}-${item.state.submittedAt}-${item.state.status}-${index}`,
125
+ showsVerticalScrollIndicator: true,
126
+ removeClippedSubviews: true,
127
+ contentContainerStyle: contentContainerStyle || styles.listContent,
128
+ initialNumToRender: 10,
129
+ maxToRenderPerBatch: 10,
130
+ windowSize: 10,
131
+ scrollEnabled: false
132
+ })
133
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
134
+ style: styles.emptyContainer,
135
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
136
+ style: styles.emptyText,
137
+ children: activeFilter ? `No ${activeFilter} mutations found` : "No mutations found"
138
+ })
139
+ }), selectedMutation && !hideInfoPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
140
+ style: [styles.mutationInfo, {
141
+ height: infoHeightAnim
142
+ }],
143
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
144
+ style: styles.dragHandle,
145
+ ...infoPanResponder.panHandlers,
146
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
147
+ style: styles.dragIndicator
148
+ })
149
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
150
+ style: styles.mutationInfoContent,
151
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationInformation.default, {
152
+ selectedMutation: selectedMutation
153
+ })
154
+ })]
155
+ })]
156
+ });
157
+ }
158
+ const styles = _reactNative.StyleSheet.create({
159
+ container: {
160
+ flex: 1,
161
+ backgroundColor: _sharedUi.buoyColors.base
162
+ },
163
+ listWrapper: {
164
+ flex: 1
165
+ },
166
+ listContent: {
167
+ backgroundColor: _sharedUi.buoyColors.base,
168
+ paddingHorizontal: 8,
169
+ paddingTop: 8
170
+ },
171
+ mutationInfo: {
172
+ borderTopWidth: 1,
173
+ borderTopColor: _sharedUi.buoyColors.border,
174
+ backgroundColor: _sharedUi.buoyColors.base
175
+ },
176
+ dragHandle: {
177
+ height: 20,
178
+ justifyContent: "center",
179
+ alignItems: "center",
180
+ backgroundColor: _sharedUi.buoyColors.card,
181
+ borderBottomWidth: 1,
182
+ borderBottomColor: _sharedUi.buoyColors.border
183
+ },
184
+ dragIndicator: {
185
+ width: 40,
186
+ height: 4,
187
+ backgroundColor: _sharedUi.buoyColors.border,
188
+ borderRadius: 2
189
+ },
190
+ mutationInfoContent: {
191
+ flex: 1,
192
+ backgroundColor: _sharedUi.buoyColors.base
193
+ },
194
+ emptyContainer: {
195
+ flex: 1,
196
+ justifyContent: "center",
197
+ alignItems: "center",
198
+ padding: 32,
199
+ backgroundColor: _sharedUi.buoyColors.card,
200
+ margin: 16,
201
+ borderRadius: 8,
202
+ borderWidth: 1,
203
+ borderColor: _sharedUi.buoyColors.border
204
+ },
205
+ emptyText: {
206
+ color: _sharedUi.buoyColors.textMuted,
207
+ fontSize: 14,
208
+ textAlign: "center",
209
+ fontFamily: "monospace",
210
+ letterSpacing: 0.5
211
+ }
212
+ });
@@ -0,0 +1,54 @@
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
+ * Small toggle used in the query browser to mock offline/online behavior.
12
+ */
13
+ const NetworkToggleButton = ({
14
+ isOffline,
15
+ onToggle
16
+ }) => {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
18
+ "sentry-label": "ignore devtools network toggle button",
19
+ style: [styles.button, isOffline && styles.offlineButton],
20
+ onPress: onToggle,
21
+ activeOpacity: 0.7,
22
+ accessibilityLabel: isOffline ? "Unset offline mocking behavior" : "Mock offline behavior",
23
+ accessibilityRole: "button",
24
+ accessibilityState: {
25
+ selected: isOffline
26
+ },
27
+ children: isOffline ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Wifi, {
28
+ size: 16,
29
+ color: _sharedUi.buoyColors.error,
30
+ strokeWidth: 2
31
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Wifi, {
32
+ size: 16,
33
+ color: _sharedUi.buoyColors.success,
34
+ strokeWidth: 2
35
+ })
36
+ });
37
+ };
38
+ const styles = _reactNative.StyleSheet.create({
39
+ button: {
40
+ width: 32,
41
+ height: 32,
42
+ borderRadius: 6,
43
+ backgroundColor: "rgba(16, 185, 129, 0.1)",
44
+ justifyContent: "center",
45
+ alignItems: "center",
46
+ borderWidth: 1,
47
+ borderColor: "rgba(16, 185, 129, 0.2)"
48
+ },
49
+ offlineButton: {
50
+ backgroundColor: "rgba(239, 68, 68, 0.1)",
51
+ borderColor: "rgba(239, 68, 68, 0.2)"
52
+ }
53
+ });
54
+ var _default = exports.default = NetworkToggleButton;
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = QueryActions;
7
+ var _reactQuery = require("@tanstack/react-query");
8
+ var _ActionButton = _interopRequireDefault(require("./ActionButton"));
9
+ var _getQueryStatusLabel = require("../../utils/getQueryStatusLabel");
10
+ var _triggerLoading = _interopRequireDefault(require("../../utils/actions/triggerLoading"));
11
+ var _refetch = _interopRequireDefault(require("../../utils/actions/refetch"));
12
+ var _reset = _interopRequireDefault(require("../../utils/actions/reset"));
13
+ var _remove = _interopRequireDefault(require("../../utils/actions/remove"));
14
+ var _invalidate = _interopRequireDefault(require("../../utils/actions/invalidate"));
15
+ var _triggerError = _interopRequireDefault(require("../../utils/actions/triggerError"));
16
+ var _reactNative = require("react-native");
17
+ var _sharedUi = require("@buoy-gg/shared-ui");
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
+ /**
21
+ * Action panel rendered in query detail views providing mutation simulation and removal controls.
22
+ */
23
+ function QueryActions({
24
+ query,
25
+ setSelectedQuery
26
+ }) {
27
+ const queryClient = (0, _reactQuery.useQueryClient)();
28
+ if (query === undefined) {
29
+ return null;
30
+ }
31
+ const queryStatus = query.state.status;
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
33
+ style: styles.container,
34
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
35
+ style: styles.headerText,
36
+ children: "Actions"
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
38
+ style: styles.buttonsContainer,
39
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
40
+ "sentry-label": "ignore devtools query refetch action",
41
+ disabled: (0, _getQueryStatusLabel.getQueryStatusLabel)(query) === "fetching",
42
+ onClick: () => {
43
+ (0, _refetch.default)({
44
+ query
45
+ });
46
+ },
47
+ bgColorClass: "btnRefetch",
48
+ text: "Refetch",
49
+ _textColorClass: "btnRefetch"
50
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
51
+ "sentry-label": "ignore devtools query invalidate action",
52
+ disabled: queryStatus === "pending",
53
+ onClick: () => {
54
+ (0, _invalidate.default)({
55
+ query,
56
+ queryClient
57
+ });
58
+ },
59
+ bgColorClass: "btnInvalidate",
60
+ text: "Invalidate",
61
+ _textColorClass: "btnInvalidate"
62
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
63
+ "sentry-label": "ignore devtools query reset action",
64
+ disabled: queryStatus === "pending",
65
+ onClick: () => {
66
+ (0, _reset.default)({
67
+ queryClient,
68
+ query
69
+ });
70
+ },
71
+ bgColorClass: "btnReset",
72
+ text: "Reset",
73
+ _textColorClass: "btnReset"
74
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
75
+ "sentry-label": "ignore devtools query remove action",
76
+ disabled: (0, _getQueryStatusLabel.getQueryStatusLabel)(query) === "fetching",
77
+ onClick: () => {
78
+ (0, _remove.default)({
79
+ queryClient,
80
+ query
81
+ });
82
+ setSelectedQuery(undefined);
83
+ },
84
+ bgColorClass: "btnRemove",
85
+ text: "Remove",
86
+ _textColorClass: "btnRemove"
87
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
88
+ "sentry-label": "ignore devtools query trigger loading action",
89
+ disabled: false,
90
+ onClick: () => {
91
+ (0, _triggerLoading.default)({
92
+ query
93
+ });
94
+ },
95
+ bgColorClass: "btnTriggerLoading",
96
+ text: query.state.fetchStatus === "fetching" ? "Restore Loading" : "Trigger Loading",
97
+ _textColorClass: "btnTriggerLoading"
98
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton.default, {
99
+ "sentry-label": "ignore devtools query trigger error action",
100
+ disabled: queryStatus === "pending",
101
+ onClick: () => {
102
+ (0, _triggerError.default)({
103
+ query,
104
+ queryClient
105
+ });
106
+ },
107
+ bgColorClass: "btnTriggerLoadiError",
108
+ text: queryStatus === "error" ? "Restore Error" : "Trigger Error",
109
+ _textColorClass: "btnTriggerLoadiError"
110
+ })]
111
+ })]
112
+ });
113
+ }
114
+ const styles = _reactNative.StyleSheet.create({
115
+ container: {
116
+ backgroundColor: _sharedUi.buoyColors.card,
117
+ borderRadius: 12,
118
+ borderWidth: 1,
119
+ borderColor: _sharedUi.buoyColors.border,
120
+ padding: 16,
121
+ gap: 12
122
+ },
123
+ headerText: {
124
+ fontSize: 14,
125
+ fontWeight: "700",
126
+ color: _sharedUi.buoyColors.primary,
127
+ marginBottom: 8,
128
+ textAlign: "left",
129
+ fontFamily: "monospace",
130
+ letterSpacing: 1,
131
+ textTransform: "uppercase"
132
+ },
133
+ buttonsContainer: {
134
+ flexDirection: "row",
135
+ flexWrap: "wrap",
136
+ gap: 8
137
+ }
138
+ });
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = QueryBrowser;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _QueryRow = _interopRequireDefault(require("./QueryRow"));
10
+ var _useAllQueries = _interopRequireDefault(require("../../hooks/useAllQueries"));
11
+ var _getQueryStatusLabel = require("../../utils/getQueryStatusLabel");
12
+ var _sharedUi = require("@buoy-gg/shared-ui");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ /**
16
+ * Scrollable list view of cached queries with filtering support and selection handling.
17
+ */
18
+ function QueryBrowser({
19
+ selectedQuery,
20
+ onQuerySelect,
21
+ activeFilter,
22
+ emptyStateMessage,
23
+ contentContainerStyle,
24
+ queries: externalQueries,
25
+ searchText = "",
26
+ ignoredPatterns = new Set(),
27
+ includedPatterns = new Set()
28
+ }) {
29
+ // Holds all queries using the working hook, or use external queries if provided
30
+ const internalQueries = (0, _useAllQueries.default)();
31
+ const allQueries = externalQueries ?? internalQueries;
32
+
33
+ // Filter queries based on active filter, search text, and ignored patterns
34
+ const filteredQueries = (0, _react.useMemo)(() => {
35
+ let filtered = allQueries;
36
+
37
+ // Apply status filter
38
+ if (activeFilter) {
39
+ filtered = filtered.filter(query => {
40
+ const status = (0, _getQueryStatusLabel.getQueryStatusLabel)(query);
41
+ return status === activeFilter;
42
+ });
43
+ }
44
+
45
+ // Apply search filter on query keys
46
+ if (searchText) {
47
+ const searchLower = searchText.toLowerCase();
48
+ filtered = filtered.filter(query => {
49
+ if (!query?.queryKey) return false;
50
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
51
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
52
+ return keyString.includes(searchLower);
53
+ });
54
+ }
55
+
56
+ // Apply included patterns filter (show ONLY queries matching any pattern)
57
+ // This acts as a whitelist - if any include patterns exist, query must match at least one
58
+ if (includedPatterns.size > 0) {
59
+ filtered = filtered.filter(query => {
60
+ if (!query?.queryKey) return false;
61
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
62
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
63
+
64
+ // Return true if query matches ANY included pattern
65
+ return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
66
+ });
67
+ }
68
+
69
+ // Apply ignored patterns filter (hide queries matching any pattern)
70
+ if (ignoredPatterns.size > 0) {
71
+ filtered = filtered.filter(query => {
72
+ if (!query?.queryKey) return true;
73
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
74
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
75
+
76
+ // Return true if NO patterns match (i.e., keep the query)
77
+ return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
78
+ });
79
+ }
80
+
81
+ // Sort by most recently updated (dataUpdatedAt descending)
82
+ filtered.sort((a, b) => {
83
+ const aTime = a.state.dataUpdatedAt || 0;
84
+ const bTime = b.state.dataUpdatedAt || 0;
85
+ return bTime - aTime; // Most recent first
86
+ });
87
+ return filtered;
88
+ }, [allQueries, activeFilter, searchText, includedPatterns, ignoredPatterns]);
89
+
90
+ // Function to handle query selection with stable comparison
91
+ const handleQuerySelect = (0, _react.useCallback)(query => {
92
+ // Compare queries by their queryKey and queryHash for stable selection
93
+ const isCurrentlySelected = selectedQuery?.queryHash === query.queryHash;
94
+ if (isCurrentlySelected) {
95
+ onQuerySelect(undefined); // Deselect
96
+ return;
97
+ }
98
+ onQuerySelect(query);
99
+ }, [selectedQuery?.queryHash, onQuerySelect]);
100
+ if (filteredQueries.length === 0) {
101
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
102
+ style: styles.emptyContainer,
103
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
104
+ style: styles.emptyText,
105
+ children: emptyStateMessage || (activeFilter ? `No ${activeFilter} queries found` : "No queries found")
106
+ })
107
+ });
108
+ }
109
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
110
+ style: styles.listWrapper,
111
+ contentContainerStyle: contentContainerStyle || styles.listContent,
112
+ showsVerticalScrollIndicator: true,
113
+ children: filteredQueries.map(query => /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryRow.default, {
114
+ query: query,
115
+ isSelected: selectedQuery?.queryHash === query.queryHash,
116
+ onSelect: handleQuerySelect
117
+ }, `${query.queryHash}-${query.state.dataUpdatedAt}-${query.state.fetchStatus}`))
118
+ });
119
+ }
120
+ const styles = _reactNative.StyleSheet.create({
121
+ listWrapper: {
122
+ flexGrow: 1
123
+ },
124
+ listContent: {
125
+ paddingBottom: 16,
126
+ backgroundColor: _sharedUi.buoyColors.base
127
+ },
128
+ emptyContainer: {
129
+ flex: 1,
130
+ justifyContent: "center",
131
+ alignItems: "center",
132
+ padding: 32,
133
+ backgroundColor: _sharedUi.buoyColors.card,
134
+ margin: 16,
135
+ borderRadius: 8,
136
+ borderWidth: 1,
137
+ borderColor: _sharedUi.buoyColors.border
138
+ },
139
+ emptyText: {
140
+ color: _sharedUi.buoyColors.textMuted,
141
+ fontSize: 14,
142
+ textAlign: "center",
143
+ fontFamily: "monospace",
144
+ letterSpacing: 0.5
145
+ }
146
+ });
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = QueryDetails;
7
+ var _QueryDetailsChip = _interopRequireDefault(require("./QueryDetailsChip"));
8
+ var _reactNative = require("react-native");
9
+ var _sharedUi = require("@buoy-gg/shared-ui");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * Renders the primary metadata summary for a selected query, including fetch status and timings.
14
+ */
15
+ function QueryDetails({
16
+ query
17
+ }) {
18
+ if (query === undefined) {
19
+ return null;
20
+ }
21
+ // Convert the timestamp to a Date object and format it
22
+ const lastUpdated = new Date(query.state.dataUpdatedAt).toLocaleTimeString("en-US", {
23
+ hour: "2-digit",
24
+ minute: "2-digit",
25
+ second: "2-digit",
26
+ hour12: true
27
+ });
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
29
+ style: styles.minWidth,
30
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
31
+ style: styles.headerText,
32
+ children: "Query Details"
33
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
34
+ style: styles.row,
35
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
36
+ "sentry-label": "ignore devtools query details scroll",
37
+ horizontal: true,
38
+ style: styles.flexOne,
39
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
40
+ style: styles.queryKeyText,
41
+ children: (0, _sharedUi.displayValue)(query.queryKey, true)
42
+ })
43
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryDetailsChip.default, {
44
+ query: query
45
+ })]
46
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
47
+ style: styles.row,
48
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
49
+ style: styles.labelText,
50
+ children: "Observers:"
51
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
52
+ style: styles.valueText,
53
+ children: `${query.getObserversCount()}`
54
+ })]
55
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
56
+ style: styles.row,
57
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
58
+ style: styles.labelText,
59
+ children: "Last Updated:"
60
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
61
+ style: styles.valueText,
62
+ children: `${lastUpdated}`
63
+ })]
64
+ })]
65
+ });
66
+ }
67
+ const styles = _reactNative.StyleSheet.create({
68
+ minWidth: {
69
+ minWidth: 200,
70
+ backgroundColor: _sharedUi.buoyColors.card,
71
+ borderRadius: 6,
72
+ borderWidth: 1,
73
+ borderColor: _sharedUi.buoyColors.primary + "4D",
74
+ overflow: "hidden",
75
+ shadowColor: _sharedUi.buoyColors.primary,
76
+ shadowOffset: {
77
+ width: 0,
78
+ height: 0
79
+ },
80
+ shadowOpacity: 0.1,
81
+ shadowRadius: 6
82
+ },
83
+ headerText: {
84
+ backgroundColor: _sharedUi.buoyColors.primary + "15",
85
+ paddingHorizontal: 12,
86
+ paddingVertical: 10,
87
+ fontWeight: "600",
88
+ fontSize: 12,
89
+ color: _sharedUi.buoyColors.primary,
90
+ borderBottomWidth: 1,
91
+ borderBottomColor: _sharedUi.buoyColors.primary + "33",
92
+ letterSpacing: 0.5,
93
+ textTransform: "uppercase",
94
+ fontFamily: "monospace"
95
+ },
96
+ row: {
97
+ flexDirection: "row",
98
+ justifyContent: "space-between",
99
+ alignItems: "center",
100
+ paddingHorizontal: 12,
101
+ paddingVertical: 10,
102
+ borderBottomWidth: 1,
103
+ borderBottomColor: _sharedUi.buoyColors.textMuted + "66"
104
+ },
105
+ flexOne: {
106
+ flex: 1,
107
+ marginRight: 8
108
+ },
109
+ queryKeyText: {
110
+ fontSize: 12,
111
+ color: _sharedUi.buoyColors.text,
112
+ fontFamily: "monospace",
113
+ lineHeight: 18,
114
+ flexShrink: 1,
115
+ backgroundColor: _sharedUi.buoyColors.primary + "15",
116
+ paddingHorizontal: 8,
117
+ paddingVertical: 4,
118
+ borderRadius: 4,
119
+ borderWidth: 1,
120
+ borderColor: _sharedUi.buoyColors.primary + "4D"
121
+ },
122
+ labelText: {
123
+ fontSize: 10,
124
+ color: _sharedUi.buoyColors.textSecondary,
125
+ fontWeight: "600",
126
+ letterSpacing: 0.5,
127
+ textTransform: "uppercase",
128
+ fontFamily: "monospace"
129
+ },
130
+ valueText: {
131
+ fontSize: 12,
132
+ color: _sharedUi.buoyColors.text,
133
+ fontWeight: "500",
134
+ fontVariant: ["tabular-nums"],
135
+ fontFamily: "monospace"
136
+ }
137
+ });