@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,149 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getCleanStorageKey = getCleanStorageKey;
7
+ exports.getStorageType = getStorageType;
8
+ exports.getStorageTypeColor = getStorageTypeColor;
9
+ exports.getStorageTypeHexColor = getStorageTypeHexColor;
10
+ exports.getStorageTypeLabel = getStorageTypeLabel;
11
+ exports.isStorageQuery = isStorageQuery;
12
+ exports.storageQueryKeys = void 0;
13
+ var _sharedUi = require("@buoy-gg/shared-ui");
14
+ /**
15
+ * Centralized storage query keys for all storage hooks
16
+ * This ensures consistency across MMKV, AsyncStorage, and SecureStorage hooks
17
+ * and allows easy modification of the base storage key in one place
18
+ */
19
+ const storageQueryKeys = exports.storageQueryKeys = {
20
+ /**
21
+ * Base storage key - change this to update all storage-related queries
22
+ */
23
+ base: () => ["#storage"],
24
+ /**
25
+ * MMKV storage query keys
26
+ */
27
+ mmkv: {
28
+ root: () => [...storageQueryKeys.base(), "mmkv"],
29
+ key: key => [...storageQueryKeys.mmkv.root(), key],
30
+ all: () => [...storageQueryKeys.mmkv.root(), "all"]
31
+ },
32
+ /**
33
+ * AsyncStorage query keys
34
+ */
35
+ async: {
36
+ root: () => [...storageQueryKeys.base(), "async"],
37
+ key: key => [...storageQueryKeys.async.root(), key],
38
+ all: () => [...storageQueryKeys.async.root(), "all"]
39
+ },
40
+ /**
41
+ * SecureStorage query keys
42
+ */
43
+ secure: {
44
+ root: () => [...storageQueryKeys.base(), "secure"],
45
+ key: key => [...storageQueryKeys.secure.root(), key],
46
+ all: () => [...storageQueryKeys.secure.root(), "all"]
47
+ }
48
+ };
49
+
50
+ /**
51
+ * Storage types that can be enabled/disabled
52
+ */
53
+
54
+ /**
55
+ * Check if a query key matches any of the storage patterns
56
+ */
57
+ function isStorageQuery(queryKey) {
58
+ if (!Array.isArray(queryKey) || queryKey.length === 0) {
59
+ return false;
60
+ }
61
+ return queryKey[0] === "#storage";
62
+ }
63
+
64
+ /**
65
+ * Get the storage type from a query key
66
+ */
67
+ function getStorageType(queryKey) {
68
+ if (!isStorageQuery(queryKey) || queryKey.length < 2) {
69
+ return null;
70
+ }
71
+ const storageType = queryKey[1];
72
+ if (storageType === "mmkv" || storageType === "async" || storageType === "secure") {
73
+ return storageType;
74
+ }
75
+ return null;
76
+ }
77
+
78
+ /**
79
+ * Get display label for storage type
80
+ */
81
+ function getStorageTypeLabel(storageType) {
82
+ switch (storageType) {
83
+ case "mmkv":
84
+ return "MMKV";
85
+ case "async":
86
+ return "Async";
87
+ case "secure":
88
+ return "Secure";
89
+ default:
90
+ return storageType;
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Get storage type color class for styling
96
+ */
97
+ function getStorageTypeColor(storageType) {
98
+ switch (storageType) {
99
+ case "mmkv":
100
+ return "purple";
101
+ // Premium, high-performance
102
+ case "async":
103
+ return "blue";
104
+ // Standard, reliable
105
+ case "secure":
106
+ return "green";
107
+ // Security, safety
108
+ default:
109
+ return "gray";
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Get storage type hex color for UI components
115
+ * Design rationale:
116
+ * - MMKV: Primary teal - Premium, high-performance, sophisticated
117
+ * - Async: Warning color - Standard, reliable, default
118
+ * - Secure: Success color - Security, safety, protection
119
+ */
120
+ function getStorageTypeHexColor(storageType) {
121
+ switch (storageType) {
122
+ case "mmkv":
123
+ return _sharedUi.buoyColors.primary;
124
+ // Premium, high-performance
125
+ case "async":
126
+ return _sharedUi.buoyColors.warning;
127
+ // Standard, reliable
128
+ case "secure":
129
+ return _sharedUi.buoyColors.success;
130
+ // Security, safety
131
+ default:
132
+ return _sharedUi.buoyColors.textMuted;
133
+ // Gray
134
+ }
135
+ }
136
+
137
+ /**
138
+ * Extract clean storage key from storage query key
139
+ * Example: ["#storage", "async", "@dev_tools_modal_state"] → "@dev_tools_modal_state"
140
+ */
141
+ function getCleanStorageKey(queryKey) {
142
+ if (!isStorageQuery(queryKey) || queryKey.length < 3) {
143
+ return "Unknown Storage Key";
144
+ }
145
+
146
+ // Return everything after the storage type (index 2 and beyond)
147
+ const cleanKeys = queryKey.slice(2);
148
+ return cleanKeys.filter(k => k != null).map(k => String(k)).join(" › ") || "Unknown Storage Key";
149
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.updateNestedDataByPath = void 0;
7
+ /**
8
+ * updates nested data by path
9
+ *
10
+ * @param {JsonValue} oldData Data to be updated
11
+ * @param {Array<string>} updatePath Path to the data to be updated
12
+ * @param {JsonValue} value New value
13
+ */
14
+ const updateNestedDataByPath = (oldData, updatePath, value) => {
15
+ if (updatePath.length === 0) {
16
+ return value;
17
+ }
18
+ if (oldData instanceof Map) {
19
+ const newData = new Map(oldData);
20
+ if (updatePath.length === 1) {
21
+ newData.set(updatePath[0], value);
22
+ return newData;
23
+ }
24
+ const [head, ...tail] = updatePath;
25
+ const currentValue = newData.get(head);
26
+ newData.set(head, updateNestedDataByPath(currentValue ?? null, tail, value));
27
+ return newData;
28
+ }
29
+ if (oldData instanceof Set) {
30
+ const setAsArray = updateNestedDataByPath(Array.from(oldData), updatePath, value);
31
+ return new Set(Array.isArray(setAsArray) ? setAsArray : []);
32
+ }
33
+ if (Array.isArray(oldData)) {
34
+ const newData = [...oldData];
35
+ if (updatePath.length === 1) {
36
+ // @ts-expect-error NAS
37
+ newData[updatePath[0]] = value;
38
+ return newData;
39
+ }
40
+ const [head, ...tail] = updatePath;
41
+ // @ts-expect-error NAS
42
+ newData[head] = updateNestedDataByPath(newData[head], tail, value);
43
+ return newData;
44
+ }
45
+ if (oldData instanceof Object) {
46
+ const newData = {
47
+ ...oldData
48
+ };
49
+ if (updatePath.length === 1) {
50
+ // @ts-expect-error NAS
51
+ newData[updatePath[0]] = value;
52
+ return newData;
53
+ }
54
+ const [head, ...tail] = updatePath;
55
+ // @ts-expect-error NAS
56
+ newData[head] = updateNestedDataByPath(newData[head], tail, value);
57
+ return newData;
58
+ }
59
+ return oldData;
60
+ };
61
+ exports.updateNestedDataByPath = updateNestedDataByPath;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ // Check if @tanstack/react-query is installed
4
+ try {
5
+ require("@tanstack/react-query");
6
+ } catch (error) {
7
+ throw new Error("\n\n[@buoy-gg/react-query] ERROR: Missing required peer dependency\n\n" + "This package requires @tanstack/react-query to be installed.\n\n" + "Install it with:\n" + " npm install @tanstack/react-query\n" + " or\n" + " pnpm add @tanstack/react-query\n" + " or\n" + " yarn add @tanstack/react-query\n\n" + "For more information, visit: https://tanstack.com/query/latest\n");
8
+ }
9
+
10
+ // Export preset configuration (easiest way to add to FloatingDevTools!)
11
+ export { reactQueryToolPreset, createReactQueryTool, wifiTogglePreset, createWifiToggleTool } from "./preset";
12
+
13
+ // React Query dev tools entry point
14
+ // Re-export the full dev tools surface so consumers can tree-shake as needed
15
+ export * from "./react-query";
16
+ export * from "./react-query/components";
17
+ export * from "./react-query/hooks";
18
+ export * from "./react-query/utils";
19
+ export * from "./react-query/types";
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Pre-configured React Query devtools for FloatingDevTools
5
+ *
6
+ * This preset provides a zero-config way to add React Query inspection to your dev tools.
7
+ * Just import and add it to your apps array!
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { reactQueryToolPreset } from '@buoy-gg/react-query';
12
+ *
13
+ * const installedApps = [
14
+ * reactQueryToolPreset, // That's it!
15
+ * // ...other tools
16
+ * ];
17
+ * ```
18
+ */
19
+
20
+ import { QueryIcon } from "@buoy-gg/floating-tools-core";
21
+ import { Wifi } from "@buoy-gg/shared-ui";
22
+ import { ReactQueryDevToolsModal } from "./react-query/components/ReactQueryDevToolsModal";
23
+ import { onlineManager } from "@tanstack/react-query";
24
+ import { devToolsStorageKeys, safeSetItem } from "@buoy-gg/shared-ui";
25
+
26
+ // Empty component for toggle-only mode
27
+ const EmptyComponent = () => null;
28
+
29
+ // Save WiFi state to storage
30
+ const saveWifiState = async enabled => {
31
+ try {
32
+ await safeSetItem(devToolsStorageKeys.settings.wifiEnabled(), enabled.toString());
33
+ } catch (error) {
34
+ // Failed to save WiFi state
35
+ }
36
+ };
37
+ import { useState, useEffect } from "react";
38
+
39
+ /**
40
+ * WiFi icon component - uses hooks to subscribe to onlineManager changes.
41
+ *
42
+ * ⚠️ IMPORTANT - DO NOT MODIFY THIS COMPONENT ⚠️
43
+ * This component MUST use useState and useEffect hooks to subscribe to onlineManager.
44
+ * It is rendered as a JSX component (<IconComponent />) in FloatingMenu and DialIcon,
45
+ * which allows hooks to work properly.
46
+ *
47
+ * If you remove the hooks or change this to read onlineManager.isOnline() directly,
48
+ * the icon color will NOT update when the WiFi toggle is pressed.
49
+ *
50
+ * See: FloatingMenu.tsx (renders as <IconComponent />)
51
+ * See: DialIcon.tsx (renders as <icon.iconComponent />)
52
+ */
53
+ import { jsx as _jsx } from "react/jsx-runtime";
54
+ function WifiIcon({
55
+ size
56
+ }) {
57
+ const [isOnline, setIsOnline] = useState(() => onlineManager.isOnline());
58
+ useEffect(() => {
59
+ const unsubscribe = onlineManager.subscribe(online => {
60
+ setIsOnline(online);
61
+ });
62
+ return unsubscribe;
63
+ }, []);
64
+ const color = isOnline ? "#10B981" : "#DC2626";
65
+ return /*#__PURE__*/_jsx(Wifi, {
66
+ size: size,
67
+ color: color
68
+ });
69
+ }
70
+
71
+ /**
72
+ * Pre-configured React Query devtools for FloatingDevTools.
73
+ * Includes:
74
+ * - Query browser and inspector
75
+ * - Mutation tracking
76
+ * - Cache inspection
77
+ * - Query invalidation
78
+ * - Performance monitoring
79
+ */
80
+ export const reactQueryToolPreset = {
81
+ id: "query",
82
+ name: "QUERY",
83
+ description: "React Query inspector",
84
+ slot: "both",
85
+ icon: ({
86
+ size
87
+ }) => /*#__PURE__*/_jsx(QueryIcon, {
88
+ size: size
89
+ }),
90
+ component: ReactQueryDevToolsModal,
91
+ props: {
92
+ enableSharedModalDimensions: false
93
+ }
94
+ };
95
+
96
+ /**
97
+ * Create a custom React Query devtools configuration.
98
+ * Use this if you want to override default settings.
99
+ *
100
+ * @example
101
+ * ```tsx
102
+ * import { createReactQueryTool } from '@buoy-gg/react-query';
103
+ *
104
+ * const myQueryTool = createReactQueryTool({
105
+ * name: "TANSTACK",
106
+ * colorPreset: "purple",
107
+ * enableSharedModalDimensions: true,
108
+ * });
109
+ * ```
110
+ */
111
+ export function createReactQueryTool(options) {
112
+ return {
113
+ id: options?.id || "query",
114
+ name: options?.name || "QUERY",
115
+ description: options?.description || "React Query inspector",
116
+ slot: "both",
117
+ icon: ({
118
+ size
119
+ }) => /*#__PURE__*/_jsx(QueryIcon, {
120
+ size: size
121
+ }),
122
+ component: ReactQueryDevToolsModal,
123
+ props: {
124
+ enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
125
+ }
126
+ };
127
+ }
128
+
129
+ /**
130
+ * Pre-configured WiFi toggle tool for FloatingDevTools.
131
+ * Allows toggling React Query's online state to simulate offline scenarios.
132
+ * Simple toggle - no modal needed!
133
+ *
134
+ * @example
135
+ * ```tsx
136
+ * import { wifiTogglePreset } from '@buoy-gg/react-query';
137
+ *
138
+ * const installedApps = [
139
+ * wifiTogglePreset, // That's it!
140
+ * // ...other tools
141
+ * ];
142
+ * ```
143
+ */
144
+ export const wifiTogglePreset = {
145
+ id: "query-wifi-toggle",
146
+ name: "WIFI",
147
+ description: "Toggle React Query online/offline state",
148
+ slot: "row",
149
+ icon: WifiIcon,
150
+ component: EmptyComponent,
151
+ props: {},
152
+ launchMode: "toggle-only",
153
+ onPress: () => {
154
+ const newState = !onlineManager.isOnline();
155
+ onlineManager.setOnline(newState);
156
+ saveWifiState(newState);
157
+ }
158
+ };
159
+
160
+ /**
161
+ * Create a custom WiFi toggle tool configuration.
162
+ * Use this if you want to override default settings.
163
+ *
164
+ * @example
165
+ * ```tsx
166
+ * import { createWifiToggleTool } from '@buoy-gg/react-query';
167
+ *
168
+ * const myWifiTool = createWifiToggleTool({
169
+ * name: "OFFLINE",
170
+ * onColor: "#10B981",
171
+ * offColor: "#DC2626",
172
+ * });
173
+ * ```
174
+ */
175
+ export function createWifiToggleTool(options) {
176
+ const onColor = options?.onColor || "#10B981";
177
+ const offColor = options?.offColor || "#DC2626";
178
+
179
+ /**
180
+ * Custom WiFi icon component with hooks - rendered as JSX component.
181
+ *
182
+ * ⚠️ IMPORTANT - DO NOT MODIFY THIS COMPONENT ⚠️
183
+ * This component MUST use useState and useEffect hooks to subscribe to onlineManager.
184
+ * See the comment on WifiIcon above for full explanation.
185
+ */
186
+ const CustomWifiIcon = ({
187
+ size
188
+ }) => {
189
+ const [isOnline, setIsOnline] = useState(() => onlineManager.isOnline());
190
+ useEffect(() => {
191
+ const unsubscribe = onlineManager.subscribe(online => {
192
+ setIsOnline(online);
193
+ });
194
+ return unsubscribe;
195
+ }, []);
196
+ return /*#__PURE__*/_jsx(Wifi, {
197
+ size: size,
198
+ color: isOnline ? onColor : offColor
199
+ });
200
+ };
201
+ return {
202
+ id: options?.id || "query-wifi-toggle",
203
+ name: options?.name || "WIFI",
204
+ description: options?.description || "Toggle React Query online/offline state",
205
+ slot: "row",
206
+ icon: CustomWifiIcon,
207
+ component: EmptyComponent,
208
+ props: {},
209
+ launchMode: "toggle-only",
210
+ onPress: () => {
211
+ const newState = !onlineManager.isOnline();
212
+ onlineManager.setOnline(newState);
213
+ saveWifiState(newState);
214
+ }
215
+ };
216
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Main entry point for the React Query Dev Tools feature
5
+ * This component orchestrates all React Query dev tools functionality
6
+ */
7
+
8
+ // Re-export main modal component
9
+ export { ReactQueryModal } from "./components/modals/ReactQueryModal";
10
+ export { ReactQueryModalHeader } from "./components/modals/ReactQueryModalHeader";
11
+
12
+ // Re-export individual modals
13
+ export { QueryBrowserModal } from "./components/modals/QueryBrowserModal";
14
+ export { MutationBrowserModal } from "./components/modals/MutationBrowserModal";
15
+ export { MutationEditorModal } from "./components/modals/MutationEditorModal";
16
+ export { DataEditorModal } from "./components/modals/DataEditorModal";
17
+
18
+ // Re-export footer components
19
+ export { QueryBrowserFooter } from "./components/modals/QueryBrowserFooter";
20
+ export { MutationBrowserFooter } from "./components/modals/MutationBrowserFooter";
21
+ export { SwipeIndicator } from "./components/modals/SwipeIndicator";
22
+
23
+ // Re-export query browser components
24
+ export { Explorer } from "./components/query-browser";
25
+ export { QueryBrowser } from "./components/query-browser";
26
+ export { QueryDetails } from "./components/query-browser";
27
+ export { QueryInformation } from "./components/query-browser";
28
+ export { QueryActions } from "./components/query-browser";
29
+ export { QueryRow } from "./components/query-browser";
30
+ export { QueryStatus } from "./components/query-browser";
31
+ export { QueryStatusCount } from "./components/query-browser";
32
+ export { QueryDetailsChip } from "./components/query-browser";
33
+
34
+ // Re-export mutation components
35
+ export { MutationsList } from "./components/query-browser";
36
+ export { MutationDetails } from "./components/query-browser";
37
+ export { MutationInformation } from "./components/query-browser";
38
+ export { MutationButton } from "./components/query-browser";
39
+ export { MutationStatusCount } from "./components/query-browser";
40
+ export { MutationDetailsChips } from "./components/query-browser";
41
+
42
+ // Re-export action components
43
+ export { ActionButton } from "./components/query-browser";
44
+ export { ClearCacheButton } from "./components/query-browser";
45
+ export { NetworkToggleButton } from "./components/query-browser";
46
+ export { StorageStatusCount } from "./components/query-browser";
47
+
48
+ // Re-export shared components
49
+ export { VirtualizedDataExplorer, DataViewer, TypeLegend } from "@buoy-gg/shared-ui/dataViewer";
50
+
51
+ // Re-export mode components
52
+ export { QueryBrowserMode } from "./components/QueryBrowserMode";
53
+ export { MutationBrowserMode } from "./components/MutationBrowserMode";
54
+ export { MutationEditorMode } from "./components/MutationEditorMode";
55
+ export { DataEditorMode } from "./components/DataEditorMode";
56
+ export { QuerySelector } from "./components/QuerySelector";
57
+ export { QueryDebugInfo } from "./components/QueryDebugInfo";
58
+ export { WifiToggle } from "./components/WifiToggle";
59
+ export { ReactQuerySection } from "./components/ReactQuerySection";
60
+
61
+ // Re-export hooks
62
+ export * from "./hooks";
63
+
64
+ // Re-export utilities
65
+ export * from "./utils";
66
+
67
+ // Re-export types
68
+ export * from "./types";