@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,184 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = MutationButton;
7
+ var _reactNative = require("react-native");
8
+ var _svgs = require("./svgs");
9
+ var _formatRelativeTime = require("../../utils/formatRelativeTime");
10
+ var _sharedUi = require("@buoy-gg/shared-ui");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ const getMutationText = mutation => {
13
+ if (!mutation.options.mutationKey) return "Anonymous Mutation";
14
+ const keys = Array.isArray(mutation.options.mutationKey) ? mutation.options.mutationKey : [mutation.options.mutationKey];
15
+ return keys.filter(k => k != null).map(k => String(k)).join(" › ") || "Anonymous Mutation";
16
+ };
17
+ /**
18
+ * List-row button for displaying mutation metadata and selecting it for detail inspection.
19
+ */
20
+ function MutationButton({
21
+ mutation,
22
+ setSelectedMutation,
23
+ selected
24
+ }) {
25
+ const submittedAt = new Date(mutation.state.submittedAt).toLocaleTimeString();
26
+
27
+ // Get last updated timestamp - always show something for debugging
28
+ const getTimestamp = () => {
29
+ if (mutation.state.submittedAt && mutation.state.submittedAt > 0) {
30
+ return (0, _formatRelativeTime.formatRelativeTime)(mutation.state.submittedAt);
31
+ }
32
+
33
+ // @ts-ignore - exploring state fields for debugging
34
+ const stateAny = mutation.state;
35
+
36
+ // Try other timestamp fields
37
+ if (stateAny.updatedAt && stateAny.updatedAt > 0) {
38
+ return (0, _formatRelativeTime.formatRelativeTime)(stateAny.updatedAt);
39
+ }
40
+
41
+ // Debug fallback
42
+ return `N/A (${mutation.state.submittedAt || 0})`;
43
+ };
44
+ const lastUpdated = getTimestamp();
45
+ const getStatusInfo = () => {
46
+ if (mutation.state.isPaused) {
47
+ return {
48
+ status: "Paused",
49
+ color: _sharedUi.buoyColors.textMuted,
50
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.PauseCircle, {})
51
+ };
52
+ }
53
+ switch (mutation.state.status) {
54
+ case "success":
55
+ return {
56
+ status: "Success",
57
+ color: _sharedUi.buoyColors.success,
58
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.CheckCircle, {})
59
+ };
60
+ case "error":
61
+ return {
62
+ status: "Error",
63
+ color: _sharedUi.buoyColors.error,
64
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.XCircle, {})
65
+ };
66
+ case "pending":
67
+ return {
68
+ status: "Loading",
69
+ color: _sharedUi.buoyColors.primary,
70
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.LoadingCircle, {})
71
+ };
72
+ default:
73
+ return {
74
+ status: "Idle",
75
+ color: _sharedUi.buoyColors.textMuted,
76
+ icon: null
77
+ };
78
+ }
79
+ };
80
+ const statusInfo = getStatusInfo();
81
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
82
+ "sentry-label": "ignore devtools mutation button",
83
+ onPress: () => setSelectedMutation(mutation === selected ? undefined : mutation),
84
+ style: [styles.button, selected?.mutationId === mutation.mutationId && styles.selected],
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
86
+ style: styles.rowContent,
87
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
88
+ style: styles.statusSection,
89
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
90
+ style: [styles.statusDot, {
91
+ backgroundColor: statusInfo.color
92
+ }]
93
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
94
+ style: styles.statusInfo,
95
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
96
+ style: [styles.statusLabel, {
97
+ color: statusInfo.color
98
+ }],
99
+ children: statusInfo.status
100
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
101
+ style: styles.submittedText,
102
+ children: submittedAt
103
+ })]
104
+ })]
105
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
106
+ style: styles.mutationSection,
107
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
108
+ style: styles.mutationKey,
109
+ children: getMutationText(mutation)
110
+ })
111
+ })]
112
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
113
+ style: styles.bottomRightContainer,
114
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
115
+ style: styles.bottomRightText,
116
+ children: lastUpdated
117
+ })
118
+ })]
119
+ });
120
+ }
121
+ const styles = _reactNative.StyleSheet.create({
122
+ button: {
123
+ backgroundColor: _sharedUi.buoyColors.card,
124
+ borderRadius: 8,
125
+ borderWidth: 1,
126
+ borderColor: _sharedUi.buoyColors.border,
127
+ marginHorizontal: 8,
128
+ marginVertical: 3,
129
+ padding: 12
130
+ },
131
+ selected: {
132
+ backgroundColor: _sharedUi.buoyColors.primary + "15",
133
+ borderColor: _sharedUi.buoyColors.primary + "50"
134
+ },
135
+ rowContent: {
136
+ flexDirection: "row",
137
+ alignItems: "center",
138
+ justifyContent: "space-between"
139
+ },
140
+ statusSection: {
141
+ flexDirection: "row",
142
+ alignItems: "center",
143
+ gap: 8,
144
+ flex: 1
145
+ },
146
+ statusDot: {
147
+ width: 8,
148
+ height: 8,
149
+ borderRadius: 4
150
+ },
151
+ statusInfo: {
152
+ flex: 1
153
+ },
154
+ statusLabel: {
155
+ fontSize: 11,
156
+ fontWeight: "600",
157
+ lineHeight: 14
158
+ },
159
+ submittedText: {
160
+ fontSize: 10,
161
+ color: _sharedUi.buoyColors.textMuted,
162
+ marginTop: 1
163
+ },
164
+ mutationSection: {
165
+ flex: 2,
166
+ paddingHorizontal: 12
167
+ },
168
+ mutationKey: {
169
+ fontFamily: "monospace",
170
+ fontSize: 12,
171
+ color: _sharedUi.buoyColors.text,
172
+ lineHeight: 16
173
+ },
174
+ bottomRightContainer: {
175
+ position: "absolute",
176
+ bottom: 4,
177
+ right: 8
178
+ },
179
+ bottomRightText: {
180
+ fontSize: 9,
181
+ color: _sharedUi.buoyColors.textMuted,
182
+ fontFamily: "monospace"
183
+ }
184
+ });
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = MutationDetails;
7
+ var _reactNative = require("react-native");
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _MutationDetailsChips = _interopRequireDefault(require("./MutationDetailsChips"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * Displays high-level mutation metadata such as status, retries, and timestamps.
14
+ */
15
+ function MutationDetails({
16
+ selectedMutation
17
+ }) {
18
+ if (selectedMutation === undefined) {
19
+ return null;
20
+ }
21
+ const submittedAt = new Date(selectedMutation.state.submittedAt).toLocaleTimeString();
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
23
+ style: styles.minWidth,
24
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
25
+ style: styles.headerText,
26
+ children: "Mutation Details"
27
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
28
+ style: styles.row,
29
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
30
+ "sentry-label": "ignore devtools mutation details scroll",
31
+ horizontal: true,
32
+ style: styles.flex1,
33
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
34
+ style: styles.flexWrap,
35
+ children: `${selectedMutation.options.mutationKey ? (0, _sharedUi.displayValue)(selectedMutation.options.mutationKey, true) : "No mutationKey found"}`
36
+ })
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationDetailsChips.default, {
38
+ status: selectedMutation.state.status
39
+ })]
40
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
41
+ style: styles.row,
42
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
43
+ style: styles.labelText,
44
+ children: "Submitted At:"
45
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
46
+ style: styles.valueText,
47
+ children: submittedAt
48
+ })]
49
+ })]
50
+ });
51
+ }
52
+ const styles = _reactNative.StyleSheet.create({
53
+ minWidth: {
54
+ minWidth: 200,
55
+ backgroundColor: _sharedUi.buoyColors.card,
56
+ borderRadius: 6,
57
+ borderWidth: 1,
58
+ borderColor: _sharedUi.buoyColors.primary + "4D",
59
+ overflow: "hidden",
60
+ shadowColor: _sharedUi.buoyColors.primary,
61
+ shadowOffset: {
62
+ width: 0,
63
+ height: 0
64
+ },
65
+ shadowOpacity: 0.1,
66
+ shadowRadius: 6
67
+ },
68
+ headerText: {
69
+ backgroundColor: _sharedUi.buoyColors.primary + "15",
70
+ paddingHorizontal: 12,
71
+ paddingVertical: 10,
72
+ fontWeight: "600",
73
+ fontSize: 12,
74
+ color: _sharedUi.buoyColors.primary,
75
+ borderBottomWidth: 1,
76
+ borderBottomColor: _sharedUi.buoyColors.primary + "33",
77
+ letterSpacing: 0.5,
78
+ textTransform: "uppercase",
79
+ fontFamily: "monospace"
80
+ },
81
+ row: {
82
+ flexDirection: "row",
83
+ justifyContent: "space-between",
84
+ alignItems: "center",
85
+ paddingHorizontal: 12,
86
+ paddingVertical: 10,
87
+ borderBottomWidth: 1,
88
+ borderBottomColor: _sharedUi.buoyColors.textMuted + "66"
89
+ },
90
+ flex1: {
91
+ flex: 1,
92
+ marginRight: 8
93
+ },
94
+ flexWrap: {
95
+ fontSize: 12,
96
+ color: _sharedUi.buoyColors.text,
97
+ fontFamily: "monospace",
98
+ lineHeight: 18,
99
+ flexShrink: 1,
100
+ backgroundColor: _sharedUi.buoyColors.primary + "15",
101
+ paddingHorizontal: 8,
102
+ paddingVertical: 4,
103
+ borderRadius: 4,
104
+ borderWidth: 1,
105
+ borderColor: _sharedUi.buoyColors.primary + "4D"
106
+ },
107
+ labelText: {
108
+ fontSize: 10,
109
+ color: _sharedUi.buoyColors.textSecondary,
110
+ fontWeight: "600",
111
+ letterSpacing: 0.5,
112
+ textTransform: "uppercase",
113
+ fontFamily: "monospace"
114
+ },
115
+ valueText: {
116
+ fontSize: 12,
117
+ color: _sharedUi.buoyColors.text,
118
+ fontWeight: "500",
119
+ fontVariant: ["tabular-nums"],
120
+ fontFamily: "monospace"
121
+ }
122
+ });
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = QueryDetailsChip;
7
+ var _reactNative = require("react-native");
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ const backgroundColors = {
11
+ success: _sharedUi.buoyColors.success + "15",
12
+ error: _sharedUi.buoyColors.error + "15",
13
+ pending: _sharedUi.buoyColors.primary + "15",
14
+ idle: _sharedUi.buoyColors.textMuted + "1A"
15
+ };
16
+ const borderColors = {
17
+ success: _sharedUi.buoyColors.success + "33",
18
+ error: _sharedUi.buoyColors.error + "33",
19
+ pending: _sharedUi.buoyColors.primary + "33",
20
+ idle: _sharedUi.buoyColors.textMuted + "33"
21
+ };
22
+ const textColors = {
23
+ success: _sharedUi.buoyColors.success,
24
+ error: _sharedUi.buoyColors.error,
25
+ pending: _sharedUi.buoyColors.primary,
26
+ idle: _sharedUi.buoyColors.textMuted
27
+ };
28
+ /**
29
+ * Small status chip used in mutation detail views that adapts styling to the mutation status.
30
+ */
31
+ function QueryDetailsChip({
32
+ status
33
+ }) {
34
+ const statusToColor = status;
35
+ const backgroundColor = backgroundColors[statusToColor];
36
+ const borderColor = borderColors[statusToColor];
37
+ const textColor = textColors[statusToColor];
38
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
39
+ style: [styles.container, {
40
+ backgroundColor,
41
+ borderColor
42
+ }],
43
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
44
+ style: [styles.text, {
45
+ color: textColor
46
+ }],
47
+ children: status
48
+ })
49
+ });
50
+ }
51
+ const styles = _reactNative.StyleSheet.create({
52
+ container: {
53
+ paddingHorizontal: 8,
54
+ paddingVertical: 4,
55
+ borderWidth: 1,
56
+ borderRadius: 6,
57
+ alignSelf: "flex-start"
58
+ },
59
+ text: {
60
+ fontSize: 11,
61
+ fontWeight: "600",
62
+ textTransform: "uppercase",
63
+ letterSpacing: 0.5,
64
+ fontFamily: "monospace"
65
+ }
66
+ });
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = MutationInformation;
7
+ var _Explorer = _interopRequireDefault(require("./Explorer"));
8
+ var _reactNative = require("react-native");
9
+ var _MutationDetails = _interopRequireDefault(require("./MutationDetails"));
10
+ var _sharedUi = require("@buoy-gg/shared-ui");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /** Detailed information block for a selected mutation within the modal experience. */
14
+ function MutationInformation({
15
+ selectedMutation
16
+ }) {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
18
+ "sentry-label": "ignore devtools mutation information scroll",
19
+ style: styles.flex1,
20
+ contentContainerStyle: styles.scrollContent,
21
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
22
+ style: styles.section,
23
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MutationDetails.default, {
24
+ selectedMutation: selectedMutation
25
+ })
26
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
27
+ style: styles.section,
28
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
29
+ style: styles.textHeader,
30
+ children: "Variables Details"
31
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
32
+ style: styles.padding,
33
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
34
+ label: "Variables",
35
+ value: selectedMutation?.state.variables,
36
+ defaultExpanded: ["Variables"]
37
+ })
38
+ })]
39
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
40
+ style: styles.section,
41
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
42
+ style: styles.textHeader,
43
+ children: "Context Details"
44
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
45
+ style: styles.padding,
46
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
47
+ label: "Context",
48
+ value: selectedMutation?.state.context,
49
+ defaultExpanded: ["Context"]
50
+ })
51
+ })]
52
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
53
+ style: styles.section,
54
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
55
+ style: styles.textHeader,
56
+ children: "Data Explorer"
57
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
58
+ style: styles.padding,
59
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
60
+ label: "Data",
61
+ defaultExpanded: ["Data"],
62
+ value: selectedMutation?.state.data
63
+ })
64
+ })]
65
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
66
+ style: styles.section,
67
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
68
+ style: styles.textHeader,
69
+ children: "Mutations Explorer"
70
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
71
+ style: styles.padding,
72
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
73
+ label: "Mutation",
74
+ defaultExpanded: ["Mutation"],
75
+ value: selectedMutation
76
+ })
77
+ })]
78
+ })]
79
+ });
80
+ }
81
+ const styles = _reactNative.StyleSheet.create({
82
+ flex1: {
83
+ flex: 1,
84
+ backgroundColor: _sharedUi.buoyColors.base
85
+ },
86
+ scrollContent: {
87
+ paddingBottom: 16,
88
+ paddingHorizontal: 8
89
+ },
90
+ section: {
91
+ marginBottom: 16
92
+ },
93
+ textHeader: {
94
+ textAlign: "left",
95
+ backgroundColor: _sharedUi.buoyColors.primary + "15",
96
+ padding: 12,
97
+ fontSize: 12,
98
+ fontWeight: "700",
99
+ color: _sharedUi.buoyColors.primary,
100
+ borderTopLeftRadius: 8,
101
+ borderTopRightRadius: 8,
102
+ borderBottomWidth: 1,
103
+ borderBottomColor: _sharedUi.buoyColors.primary + "33",
104
+ fontFamily: "monospace",
105
+ letterSpacing: 1,
106
+ textTransform: "uppercase"
107
+ },
108
+ padding: {
109
+ padding: 12,
110
+ backgroundColor: _sharedUi.buoyColors.card,
111
+ borderBottomLeftRadius: 8,
112
+ borderBottomRightRadius: 8,
113
+ borderWidth: 1,
114
+ borderColor: _sharedUi.buoyColors.border,
115
+ borderTopWidth: 0
116
+ }
117
+ });
@@ -0,0 +1,111 @@
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 _QueryStatus = _interopRequireDefault(require("./QueryStatus"));
9
+ var _useQueryStatusCounts = require("../../hooks/useQueryStatusCounts");
10
+ var _react = require("react");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /**
14
+ * Horizontal status filter bar tailored for mutations. Integrates scroll detection to avoid
15
+ * accidental filter toggles while panning.
16
+ */
17
+ const MutationStatusCount = ({
18
+ activeFilter,
19
+ onFilterChange
20
+ }) => {
21
+ const {
22
+ pending,
23
+ success,
24
+ error,
25
+ paused
26
+ } = (0, _useQueryStatusCounts.useMutationStatusCounts)();
27
+ const [isScrolling, setIsScrolling] = (0, _react.useState)(false);
28
+ const touchStartX = (0, _react.useRef)(0);
29
+ const touchStartY = (0, _react.useRef)(0);
30
+ const handleFilterClick = (filter, event) => {
31
+ if (event) {
32
+ const dx = Math.abs(event.nativeEvent.pageX - touchStartX.current);
33
+ const dy = Math.abs(event.nativeEvent.pageY - touchStartY.current);
34
+ if (dx > 5 || dy > 5 || isScrolling) {
35
+ return;
36
+ }
37
+ }
38
+ if (onFilterChange) {
39
+ onFilterChange(activeFilter === filter ? null : filter);
40
+ }
41
+ };
42
+ const handleTouchStart = event => {
43
+ touchStartX.current = event.nativeEvent.pageX;
44
+ touchStartY.current = event.nativeEvent.pageY;
45
+ };
46
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
47
+ style: styles.mutationStatusContainer,
48
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
49
+ "sentry-label": "ignore devtools mutation status count scroll",
50
+ horizontal: true,
51
+ showsHorizontalScrollIndicator: false,
52
+ style: styles.scrollView,
53
+ contentContainerStyle: styles.scrollContent,
54
+ onScrollBeginDrag: () => setIsScrolling(true),
55
+ onScrollEndDrag: () => setTimeout(() => setIsScrolling(false), 300),
56
+ onMomentumScrollBegin: () => setIsScrolling(true),
57
+ onMomentumScrollEnd: () => setTimeout(() => setIsScrolling(false), 300),
58
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
59
+ label: "Pending",
60
+ color: "blue",
61
+ count: pending,
62
+ isActive: activeFilter === "pending",
63
+ onPress: event => handleFilterClick("pending", event),
64
+ onTouchStart: handleTouchStart,
65
+ showLabel: true
66
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
67
+ label: "Success",
68
+ color: "green",
69
+ count: success,
70
+ isActive: activeFilter === "success",
71
+ onPress: event => handleFilterClick("success", event),
72
+ onTouchStart: handleTouchStart,
73
+ showLabel: true
74
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
75
+ label: "Error",
76
+ color: "red",
77
+ count: error,
78
+ isActive: activeFilter === "error",
79
+ onPress: event => handleFilterClick("error", event),
80
+ onTouchStart: handleTouchStart,
81
+ showLabel: true
82
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
83
+ label: "Paused",
84
+ color: "purple",
85
+ count: paused,
86
+ isActive: activeFilter === "paused",
87
+ onPress: event => handleFilterClick("paused", event),
88
+ onTouchStart: handleTouchStart,
89
+ showLabel: true
90
+ })]
91
+ })
92
+ });
93
+ };
94
+ const styles = _reactNative.StyleSheet.create({
95
+ mutationStatusContainer: {
96
+ flex: 1,
97
+ minWidth: 0
98
+ },
99
+ scrollView: {
100
+ flex: 1
101
+ },
102
+ scrollContent: {
103
+ flexDirection: "row",
104
+ alignItems: "center",
105
+ gap: 8,
106
+ paddingHorizontal: 4,
107
+ paddingVertical: 4,
108
+ flexGrow: 1
109
+ }
110
+ });
111
+ var _default = exports.default = MutationStatusCount;