@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,77 @@
1
+ "use strict";
2
+
3
+ import { View, StyleSheet } from "react-native";
4
+ import { useMemo } from "react";
5
+ import { QueryBrowser } from "./query-browser/index";
6
+ import { FilterStatusBadge } from "./FilterStatusBadge";
7
+ import useAllQueries from "../hooks/useAllQueries";
8
+ import { buoyColors } from "@buoy-gg/shared-ui";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ /** Wrapper around the query list experience used inside the modal view. */
11
+ export function QueryBrowserMode({
12
+ selectedQuery,
13
+ onQuerySelect,
14
+ activeFilter,
15
+ searchText = "",
16
+ ignoredPatterns = new Set(),
17
+ includedPatterns = new Set(),
18
+ onFilterPress
19
+ }) {
20
+ const hasIncludeFilters = includedPatterns.size > 0;
21
+ const hasExcludeFilters = ignoredPatterns.size > 0;
22
+ const allQueries = useAllQueries();
23
+
24
+ // Calculate filtered count for the badge
25
+ const filteredCount = useMemo(() => {
26
+ let filtered = allQueries;
27
+
28
+ // Apply included patterns filter
29
+ if (includedPatterns.size > 0) {
30
+ filtered = filtered.filter(query => {
31
+ if (!query?.queryKey) return false;
32
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
33
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
34
+ return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
35
+ });
36
+ }
37
+
38
+ // Apply ignored patterns filter
39
+ if (ignoredPatterns.size > 0) {
40
+ filtered = filtered.filter(query => {
41
+ if (!query?.queryKey) return true;
42
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
43
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
44
+ return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
45
+ });
46
+ }
47
+ return filtered.length;
48
+ }, [allQueries, includedPatterns, ignoredPatterns]);
49
+ return /*#__PURE__*/_jsxs(View, {
50
+ style: styles.queryListContainer,
51
+ children: [(hasIncludeFilters || hasExcludeFilters) && /*#__PURE__*/_jsx(FilterStatusBadge, {
52
+ totalCount: allQueries.length,
53
+ filteredCount: filteredCount,
54
+ onPress: onFilterPress
55
+ }), /*#__PURE__*/_jsx(QueryBrowser, {
56
+ selectedQuery: selectedQuery,
57
+ onQuerySelect: onQuerySelect,
58
+ activeFilter: activeFilter,
59
+ searchText: searchText,
60
+ ignoredPatterns: ignoredPatterns,
61
+ includedPatterns: includedPatterns,
62
+ emptyStateMessage: searchText ? `No queries found matching "${searchText}"` : activeFilter ? `No ${activeFilter} queries found` : hasIncludeFilters ? `No queries match your "include only" filters. ${includedPatterns.size} pattern(s) active.` : hasExcludeFilters ? `No queries match the current filters. ${ignoredPatterns.size} pattern(s) excluded.` : "No React Query queries are currently active.\n\nTo see queries here:\n• Make API calls using useQuery\n• Ensure queries are within QueryClientProvider\n• Check console for debugging info",
63
+ contentContainerStyle: styles.queryListContent
64
+ })]
65
+ });
66
+ }
67
+ const styles = StyleSheet.create({
68
+ queryListContainer: {
69
+ flex: 1,
70
+ backgroundColor: buoyColors.base
71
+ },
72
+ queryListContent: {
73
+ padding: 8,
74
+ backgroundColor: buoyColors.base,
75
+ flexGrow: 1
76
+ }
77
+ });
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+
3
+ import { View, Text, StyleSheet } from "react-native";
4
+ import { useQueryClient } from "@tanstack/react-query";
5
+
6
+ /**
7
+ * Lightweight debug panel that surfaces high-level QueryClient information and recently seen
8
+ * query keys. Intended primarily for the React Query dev tools modal.
9
+ */
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ export function QueryDebugInfo() {
12
+ try {
13
+ const queryClient = useQueryClient();
14
+ const queries = queryClient.getQueryCache().getAll();
15
+ const mutations = queryClient.getMutationCache().getAll();
16
+ return /*#__PURE__*/_jsxs(View, {
17
+ style: styles.container,
18
+ children: [/*#__PURE__*/_jsx(Text, {
19
+ style: styles.title,
20
+ children: "Debug Info"
21
+ }), /*#__PURE__*/_jsx(Text, {
22
+ style: styles.info,
23
+ children: "QueryClient: \u2705 Available"
24
+ }), /*#__PURE__*/_jsxs(Text, {
25
+ style: styles.info,
26
+ children: ["Queries: ", queries.length]
27
+ }), /*#__PURE__*/_jsxs(Text, {
28
+ style: styles.info,
29
+ children: ["Mutations: ", mutations.length]
30
+ }), queries.length > 0 && /*#__PURE__*/_jsxs(View, {
31
+ style: styles.queriesList,
32
+ children: [/*#__PURE__*/_jsx(Text, {
33
+ style: styles.subtitle,
34
+ children: "Query Keys:"
35
+ }), queries.slice(0, 3).map((query, index) => /*#__PURE__*/_jsxs(Text, {
36
+ style: styles.queryKey,
37
+ children: ["\u2022", " ", Array.isArray(query.queryKey) ? query.queryKey.join(" - ") : String(query.queryKey)]
38
+ }, index)), queries.length > 3 && /*#__PURE__*/_jsxs(Text, {
39
+ style: styles.more,
40
+ children: ["... and ", queries.length - 3, " more"]
41
+ })]
42
+ })]
43
+ });
44
+ } catch (error) {
45
+ return /*#__PURE__*/_jsxs(View, {
46
+ style: styles.container,
47
+ children: [/*#__PURE__*/_jsx(Text, {
48
+ style: styles.title,
49
+ children: "Debug Info"
50
+ }), /*#__PURE__*/_jsxs(Text, {
51
+ style: styles.error,
52
+ children: ["\u274C QueryClient Error: ", String(error)]
53
+ })]
54
+ });
55
+ }
56
+ }
57
+ const styles = StyleSheet.create({
58
+ container: {
59
+ padding: 16,
60
+ backgroundColor: "rgba(0, 0, 0, 0.3)",
61
+ borderRadius: 8,
62
+ margin: 16,
63
+ borderWidth: 1,
64
+ borderColor: "rgba(255, 255, 255, 0.1)"
65
+ },
66
+ title: {
67
+ color: "#FFFFFF",
68
+ fontSize: 14,
69
+ fontWeight: "600",
70
+ marginBottom: 8
71
+ },
72
+ subtitle: {
73
+ color: "#E5E7EB",
74
+ fontSize: 12,
75
+ fontWeight: "500",
76
+ marginTop: 8,
77
+ marginBottom: 4
78
+ },
79
+ info: {
80
+ color: "#9CA3AF",
81
+ fontSize: 12,
82
+ marginBottom: 4
83
+ },
84
+ error: {
85
+ color: "#EF4444",
86
+ fontSize: 12,
87
+ marginBottom: 4
88
+ },
89
+ queriesList: {
90
+ marginTop: 4
91
+ },
92
+ queryKey: {
93
+ color: "#60A5FA",
94
+ fontSize: 11,
95
+ marginLeft: 8,
96
+ marginBottom: 2
97
+ },
98
+ more: {
99
+ color: "#9CA3AF",
100
+ fontSize: 11,
101
+ fontStyle: "italic",
102
+ marginLeft: 8
103
+ }
104
+ });
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+
3
+ import { useMemo } from "react";
4
+ import { DynamicFilterView, buoyColors } from "@buoy-gg/shared-ui";
5
+ import { XCircle, Clock, RefreshCw, Globe, Zap, Filter, Eye } from "@buoy-gg/shared-ui";
6
+ import { getQueryStatusLabel } from "../utils/getQueryStatusLabel";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ /**
9
+ * Comprehensive filter control panel for React Query DevTools matching the Network DevTools
10
+ * filter UI pattern. Provides status filtering and query key pattern-based filtering.
11
+ */
12
+ export function QueryFilterViewV3({
13
+ queries,
14
+ activeFilter,
15
+ onFilterChange,
16
+ ignoredPatterns,
17
+ onPatternToggle,
18
+ includedPatterns,
19
+ onIncludedPatternToggle
20
+ }) {
21
+ // Calculate status counts
22
+ const statusCounts = useMemo(() => {
23
+ const counts = {
24
+ all: queries.length,
25
+ disabled: 0,
26
+ fresh: 0,
27
+ stale: 0,
28
+ fetching: 0,
29
+ paused: 0,
30
+ inactive: 0,
31
+ error: 0
32
+ };
33
+ queries.forEach(query => {
34
+ const status = getQueryStatusLabel(query);
35
+ if (status === "disabled") counts.disabled++;else if (status === "fresh") counts.fresh++;else if (status === "stale") counts.stale++;else if (status === "fetching") counts.fetching++;else if (status === "paused") counts.paused++;else if (status === "inactive") counts.inactive++;
36
+ if (query.state.error) counts.error++;
37
+ });
38
+ return counts;
39
+ }, [queries]);
40
+
41
+ // Extract available query keys (excluding numeric-only keys)
42
+ const availableQueryKeys = useMemo(() => {
43
+ const keys = new Set();
44
+ queries.forEach(query => {
45
+ if (!query?.queryKey) return;
46
+ const queryKeys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
47
+ queryKeys.forEach(key => {
48
+ if (key != null) {
49
+ const keyStr = String(key);
50
+ // Skip if key is purely numeric (likely a dynamic ID)
51
+ if (!/^\d+$/.test(keyStr)) {
52
+ keys.add(keyStr);
53
+ }
54
+ }
55
+ });
56
+ });
57
+ return Array.from(keys).sort().slice(0, 50); // Limit to 50
58
+ }, [queries]);
59
+
60
+ // Convert available query keys to suggestion items (just strings)
61
+ const suggestionItems = useMemo(() => {
62
+ return availableQueryKeys;
63
+ }, [availableQueryKeys]);
64
+
65
+ // Calculate filtered query count based on active patterns
66
+ const filteredCount = useMemo(() => {
67
+ let filtered = queries;
68
+
69
+ // Apply included patterns filter
70
+ if (includedPatterns.size > 0) {
71
+ filtered = filtered.filter(query => {
72
+ if (!query?.queryKey) return false;
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
+ return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
76
+ });
77
+ }
78
+
79
+ // Apply ignored patterns filter
80
+ if (ignoredPatterns.size > 0) {
81
+ filtered = filtered.filter(query => {
82
+ if (!query?.queryKey) return true;
83
+ const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
84
+ const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
85
+ return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
86
+ });
87
+ }
88
+ return filtered.length;
89
+ }, [queries, includedPatterns, ignoredPatterns]);
90
+
91
+ // Build the filter configuration
92
+ const filterConfig = useMemo(() => {
93
+ return {
94
+ filterSummarySection: {
95
+ enabled: true,
96
+ totalCount: queries.length,
97
+ filteredCount: filteredCount,
98
+ includePatterns: includedPatterns,
99
+ excludePatterns: ignoredPatterns
100
+ },
101
+ sections: [
102
+ // Status section - radio button style
103
+ {
104
+ id: "status",
105
+ title: "Status",
106
+ type: "status",
107
+ data: [{
108
+ id: "status::all",
109
+ label: "All",
110
+ count: statusCounts.all,
111
+ icon: Globe,
112
+ color: buoyColors.primary,
113
+ isActive: !activeFilter || activeFilter === "all"
114
+ }, {
115
+ id: "status::disabled",
116
+ label: "Disabled",
117
+ count: statusCounts.disabled,
118
+ icon: XCircle,
119
+ color: buoyColors.textMuted,
120
+ isActive: activeFilter === "disabled"
121
+ }, {
122
+ id: "status::fresh",
123
+ label: "Fresh",
124
+ count: statusCounts.fresh,
125
+ icon: Zap,
126
+ color: buoyColors.success,
127
+ isActive: activeFilter === "fresh"
128
+ }, {
129
+ id: "status::stale",
130
+ label: "Stale",
131
+ count: statusCounts.stale,
132
+ icon: Clock,
133
+ color: buoyColors.warning,
134
+ isActive: activeFilter === "stale"
135
+ }, {
136
+ id: "status::fetching",
137
+ label: "Fetching",
138
+ count: statusCounts.fetching,
139
+ icon: RefreshCw,
140
+ color: buoyColors.primary,
141
+ isActive: activeFilter === "fetching"
142
+ }, {
143
+ id: "status::paused",
144
+ label: "Paused",
145
+ count: statusCounts.paused,
146
+ icon: Clock,
147
+ color: buoyColors.textMuted,
148
+ isActive: activeFilter === "paused"
149
+ }, {
150
+ id: "status::inactive",
151
+ label: "Inactive",
152
+ count: statusCounts.inactive,
153
+ icon: Clock,
154
+ color: buoyColors.textSecondary,
155
+ isActive: activeFilter === "inactive"
156
+ }, {
157
+ id: "status::error",
158
+ label: "Error",
159
+ count: statusCounts.error,
160
+ icon: XCircle,
161
+ color: buoyColors.error,
162
+ isActive: activeFilter === "error"
163
+ }]
164
+ }],
165
+ addFilterSection: {
166
+ enabled: true,
167
+ placeholder: "Enter pattern to exclude...",
168
+ title: "EXCLUDE FILTERS",
169
+ icon: Filter
170
+ },
171
+ includeOnlySection: {
172
+ enabled: true,
173
+ title: "INCLUDE ONLY FILTERS",
174
+ description: "Show ONLY queries matching these patterns. All non-matching queries will be hidden.",
175
+ placeholder: "Enter pattern to include...",
176
+ icon: Eye,
177
+ patterns: includedPatterns,
178
+ onPatternToggle: onIncludedPatternToggle,
179
+ onPatternAdd: onIncludedPatternToggle
180
+ },
181
+ availableItemsSection: {
182
+ enabled: true,
183
+ title: "AVAILABLE QUERY KEYS",
184
+ emptyMessage: "No queries found. Query keys will appear here once queries are active.",
185
+ items: suggestionItems
186
+ },
187
+ howItWorksSection: {
188
+ enabled: true,
189
+ title: "HOW QUERY FILTERS WORK",
190
+ description: "There are two types of query key filters:",
191
+ examples: ["", "INCLUDE ONLY (green):", "• Shows ONLY queries matching the pattern", "• Example: 'rewards' → shows only reward queries", "• When active, non-matching queries are hidden", "", "EXCLUDE (blue):", "• Hides queries matching the pattern", "• Example: 'analytics' → hides analytics queries", "", "Filters are case-insensitive and match partial keys."]
192
+ },
193
+ activePatterns: ignoredPatterns
194
+ };
195
+ }, [statusCounts, activeFilter, ignoredPatterns, includedPatterns, suggestionItems, onIncludedPatternToggle, queries.length, filteredCount]);
196
+
197
+ // Handle filter item clicks
198
+ const handleFilterSelect = itemId => {
199
+ const [section, value] = itemId.split("::");
200
+ if (section === "status") {
201
+ // Status filters are mutually exclusive
202
+ if (value === "all" || activeFilter === value) {
203
+ onFilterChange(null);
204
+ } else {
205
+ onFilterChange(value);
206
+ }
207
+ } else if (section === "suggestion") {
208
+ // Toggle pattern
209
+ onPatternToggle(value);
210
+ }
211
+ };
212
+ return /*#__PURE__*/_jsx(DynamicFilterView, {
213
+ ...filterConfig,
214
+ onFilterChange: handleFilterSelect,
215
+ onPatternToggle: onPatternToggle,
216
+ onPatternAdd: onPatternToggle
217
+ });
218
+ }
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+
3
+ import { View, Text, StyleSheet, TouchableOpacity, Modal, ScrollView, Pressable } from "react-native";
4
+ import { getQueryStatusColor } from "../utils/getQueryStatusColor";
5
+ import { QueryDebugInfo } from "./QueryDebugInfo";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ /**
8
+ * Modal selector that lists all known queries, highlighting status and enabling the user to focus
9
+ * a specific query within the dev tools experience.
10
+ */
11
+ export function QuerySelector({
12
+ queries,
13
+ selectedQuery,
14
+ isOpen,
15
+ onClose,
16
+ onSelect
17
+ }) {
18
+ const getQueryDisplayName = query => {
19
+ return Array.isArray(query.queryKey) ? query.queryKey.join(" - ") : String(query.queryKey);
20
+ };
21
+ return /*#__PURE__*/_jsx(Modal, {
22
+ accessibilityLabel: "Query selector",
23
+ accessibilityHint: "View query selector",
24
+ "sentry-label": "ignore query selector",
25
+ visible: isOpen,
26
+ transparent: true,
27
+ animationType: "fade",
28
+ onRequestClose: onClose,
29
+ children: /*#__PURE__*/_jsx(Pressable, {
30
+ accessibilityLabel: "Query selector overlay",
31
+ accessibilityHint: "View query selector overlay",
32
+ "sentry-label": "ignore query selector overlay",
33
+ style: styles.modalOverlay,
34
+ onPress: onClose,
35
+ children: /*#__PURE__*/_jsxs(View, {
36
+ accessibilityLabel: "Query selector content",
37
+ accessibilityHint: "View query selector content",
38
+ "sentry-label": "ignore query selector content",
39
+ style: styles.modalContent,
40
+ children: [/*#__PURE__*/_jsxs(View, {
41
+ style: styles.modalHeader,
42
+ children: [/*#__PURE__*/_jsx(Text, {
43
+ style: styles.modalTitle,
44
+ children: "Select Query"
45
+ }), /*#__PURE__*/_jsxs(Text, {
46
+ style: styles.modalSubtitle,
47
+ children: [queries.length, " ", queries.length === 1 ? "query" : "queries", " ", "available"]
48
+ })]
49
+ }), /*#__PURE__*/_jsx(ScrollView, {
50
+ accessibilityLabel: "Query selector scroll view",
51
+ accessibilityHint: "View query selector scroll view",
52
+ "sentry-label": "ignore query selector scroll view",
53
+ style: styles.scrollView,
54
+ contentContainerStyle: styles.scrollViewContent,
55
+ showsVerticalScrollIndicator: true,
56
+ children: queries.length === 0 ? /*#__PURE__*/_jsxs(View, {
57
+ style: styles.emptyState,
58
+ children: [/*#__PURE__*/_jsx(Text, {
59
+ style: styles.emptyTitle,
60
+ children: "No Queries Found"
61
+ }), /*#__PURE__*/_jsxs(Text, {
62
+ style: styles.emptyDescription,
63
+ children: ["No React Query queries are currently active.", "\n\n", "To see queries here:", "\n", "\u2022 Make API calls using useQuery", "\n", "\u2022 Ensure queries are within QueryClientProvider", "\n", "\u2022 Check console for debugging info"]
64
+ }), /*#__PURE__*/_jsx(QueryDebugInfo, {})]
65
+ }) : queries.map((query, index) => {
66
+ const displayName = getQueryDisplayName(query);
67
+ const statusColorName = getQueryStatusColor({
68
+ queryState: query.state,
69
+ observerCount: query.getObserversCount(),
70
+ isStale: query.isStale()
71
+ });
72
+
73
+ // Convert color names to hex colors
74
+ const colorMap = {
75
+ blue: "#3B82F6",
76
+ gray: "#6B7280",
77
+ purple: "#8B5CF6",
78
+ yellow: "#F59E0B",
79
+ green: "#10B981"
80
+ };
81
+ const statusColor = colorMap[statusColorName] || "#6B7280";
82
+ const isSelected = query === selectedQuery;
83
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
84
+ accessibilityLabel: `Query ${displayName}`,
85
+ accessibilityHint: `View query ${displayName}`,
86
+ "sentry-label": `ignore query ${displayName}`,
87
+ style: [styles.queryItem, isSelected && styles.selectedQueryItem],
88
+ onPress: () => onSelect(query),
89
+ children: [/*#__PURE__*/_jsx(View, {
90
+ style: [styles.statusDot, {
91
+ backgroundColor: statusColor
92
+ }]
93
+ }), /*#__PURE__*/_jsx(Text, {
94
+ style: [styles.queryText, isSelected && styles.selectedQueryText],
95
+ numberOfLines: 1,
96
+ children: displayName
97
+ })]
98
+ }, `${query.queryHash}-${index}`);
99
+ })
100
+ })]
101
+ })
102
+ })
103
+ });
104
+ }
105
+ const styles = StyleSheet.create({
106
+ modalOverlay: {
107
+ flex: 1,
108
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
109
+ justifyContent: "center",
110
+ alignItems: "center"
111
+ },
112
+ modalContent: {
113
+ backgroundColor: "#1F1F1F",
114
+ borderRadius: 8,
115
+ width: "80%",
116
+ maxHeight: "80%",
117
+ minHeight: "50%",
118
+ borderWidth: 1,
119
+ borderColor: "rgba(255, 255, 255, 0.1)",
120
+ flex: 0
121
+ },
122
+ modalHeader: {
123
+ padding: 16,
124
+ borderBottomWidth: 1,
125
+ borderBottomColor: "rgba(255, 255, 255, 0.1)"
126
+ },
127
+ modalTitle: {
128
+ color: "#FFFFFF",
129
+ fontSize: 16,
130
+ fontWeight: "600",
131
+ marginBottom: 4
132
+ },
133
+ modalSubtitle: {
134
+ color: "#9CA3AF",
135
+ fontSize: 12
136
+ },
137
+ scrollView: {
138
+ flex: 1
139
+ },
140
+ scrollViewContent: {
141
+ padding: 8,
142
+ flexGrow: 1
143
+ },
144
+ emptyState: {
145
+ padding: 32,
146
+ alignItems: "center",
147
+ justifyContent: "center"
148
+ },
149
+ emptyTitle: {
150
+ color: "#E5E7EB",
151
+ fontSize: 16,
152
+ fontWeight: "500",
153
+ marginBottom: 8,
154
+ textAlign: "center"
155
+ },
156
+ emptyDescription: {
157
+ color: "#9CA3AF",
158
+ fontSize: 14,
159
+ textAlign: "center",
160
+ lineHeight: 20
161
+ },
162
+ queryItem: {
163
+ flexDirection: "row",
164
+ alignItems: "center",
165
+ padding: 8,
166
+ borderRadius: 4
167
+ },
168
+ selectedQueryItem: {
169
+ backgroundColor: "rgba(255, 255, 255, 0.1)"
170
+ },
171
+ statusDot: {
172
+ width: 8,
173
+ height: 8,
174
+ borderRadius: 4,
175
+ marginRight: 8
176
+ },
177
+ queryText: {
178
+ color: "#E5E7EB",
179
+ fontSize: 14,
180
+ flex: 1
181
+ },
182
+ selectedQueryText: {
183
+ color: "#FFFFFF",
184
+ fontWeight: "500"
185
+ },
186
+ trigger: {
187
+ flexDirection: "row",
188
+ alignItems: "center",
189
+ backgroundColor: "rgba(255, 255, 255, 0.05)",
190
+ borderRadius: 4,
191
+ paddingHorizontal: 8,
192
+ paddingVertical: 6,
193
+ borderWidth: 1,
194
+ borderColor: "rgba(255, 255, 255, 0.1)",
195
+ minWidth: 120,
196
+ maxWidth: 200
197
+ },
198
+ triggerText: {
199
+ color: "#E5E7EB",
200
+ fontSize: 12,
201
+ flex: 1,
202
+ marginHorizontal: 6
203
+ }
204
+ });
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useState } from "react";
4
+ import { ReactQueryModal } from "./modals/ReactQueryModal";
5
+
6
+ /** Configuration options for the high-level React Query dev tools modal wrapper. */
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ /**
9
+ * Opinionated wrapper around `ReactQueryModal` that manages selection state and filters so
10
+ * consumers can drop in the full dev tools experience with a single component.
11
+ */
12
+ export function ReactQueryDevToolsModal({
13
+ visible,
14
+ onClose,
15
+ onMinimize,
16
+ enableSharedModalDimensions = true
17
+ }) {
18
+ const [selectedQueryKey, setSelectedQueryKey] = useState(undefined);
19
+ const [selectedMutationId, setSelectedMutationId] = useState(undefined);
20
+ const [activeFilter, setActiveFilter] = useState(null);
21
+ const [activeTab, setActiveTab] = useState("queries");
22
+ const [searchText, setSearchText] = useState("");
23
+ const resetState = useCallback(() => {
24
+ setSelectedQueryKey(undefined);
25
+ setSelectedMutationId(undefined);
26
+ setActiveFilter(null);
27
+ setActiveTab("queries");
28
+ setSearchText("");
29
+ }, []);
30
+ const handleClose = useCallback(() => {
31
+ resetState();
32
+ onClose();
33
+ }, [onClose, resetState]);
34
+ const handleQuerySelect = useCallback(query => {
35
+ setSelectedQueryKey(query?.queryKey);
36
+ }, []);
37
+ const handleMutationSelect = useCallback(mutation => {
38
+ setSelectedMutationId(mutation?.mutationId);
39
+ }, []);
40
+ const handleFilterChange = useCallback(filter => {
41
+ setActiveFilter(filter);
42
+ }, []);
43
+ const handleTabChange = useCallback(tab => {
44
+ setActiveTab(tab);
45
+ setActiveFilter(null);
46
+ setSelectedQueryKey(undefined);
47
+ setSelectedMutationId(undefined);
48
+ setSearchText("");
49
+ }, []);
50
+ const handleSearchChange = useCallback(text => {
51
+ setSearchText(text);
52
+ }, []);
53
+ if (!visible) {
54
+ return null;
55
+ }
56
+ return /*#__PURE__*/_jsx(ReactQueryModal, {
57
+ visible: visible,
58
+ selectedQueryKey: selectedQueryKey,
59
+ selectedMutationId: selectedMutationId,
60
+ onQuerySelect: handleQuerySelect,
61
+ onMutationSelect: handleMutationSelect,
62
+ onClose: handleClose,
63
+ onMinimize: onMinimize,
64
+ activeFilter: activeFilter,
65
+ onFilterChange: handleFilterChange,
66
+ activeTab: activeTab,
67
+ onTabChange: handleTabChange,
68
+ searchText: searchText,
69
+ onSearchChange: handleSearchChange,
70
+ enableSharedModalDimensions: enableSharedModalDimensions
71
+ });
72
+ }