@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.21

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 (285) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/ConsoleFeatureUnavailable-D0LPL1Gy.js +1 -0
  3. package/.output/public/assets/HashValueDisplay-BmuB4FW-.js +1 -0
  4. package/.output/public/assets/InsightsInfo--v4SC07c.js +1 -0
  5. package/.output/public/assets/InsightsPageHeader-dU83CAQY.js +1 -0
  6. package/.output/public/assets/NotFoundPage-B5mhGG2a.js +1 -0
  7. package/.output/public/assets/api-D-vOVlQ4.js +1 -0
  8. package/.output/public/assets/api-keys-Csh8ARKU.js +1 -0
  9. package/.output/public/assets/api-keys-OMPUoA_A.js +1 -0
  10. package/.output/public/assets/arrow-left-Bwq9X1eS.js +1 -0
  11. package/.output/public/assets/arrow-up-right-BkOVn4if.js +1 -0
  12. package/.output/public/assets/card-C_7d6O9a.js +1 -0
  13. package/.output/public/assets/console-features-api-C1jRZTGw.js +1 -0
  14. package/.output/public/assets/dialog-DE8wFN_P.js +1 -0
  15. package/.output/public/assets/dist-C7ENGzpS.js +1 -0
  16. package/.output/public/assets/empty-CVd5NlQD.js +1 -0
  17. package/.output/public/assets/field-C06q1iC9.js +1 -0
  18. package/.output/public/assets/index-BeWlQtO6.js +11 -0
  19. package/.output/public/assets/input-group-Bi61biIA.js +1 -0
  20. package/.output/public/assets/insights-BjnAtC0f.js +2 -0
  21. package/.output/public/assets/insights-D86m11yH.js +42 -0
  22. package/.output/public/assets/insights-DpYstMoY.js +1 -0
  23. package/.output/public/assets/insights-recovery-rpc-BIm5_ALc.js +1 -0
  24. package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
  25. package/.output/public/assets/insights-usage-rpc-VHj8vyBt.js +1 -0
  26. package/.output/public/assets/insights_.distribution-ADcrX48c.js +2 -0
  27. package/.output/public/assets/insights_.distribution-CuuJUN6Y.js +1 -0
  28. package/.output/public/assets/insights_.distribution-DJRjuXsO.js +1 -0
  29. package/.output/public/assets/installations-BSBBzqWs.js +2 -0
  30. package/.output/public/assets/installations-DqIE6WcO.js +1 -0
  31. package/.output/public/assets/installations-UsELbDvw.js +1 -0
  32. package/.output/public/assets/loader-circle-CnCBxzHp.js +1 -0
  33. package/.output/public/assets/mutation-Csp7xUNh.js +1 -0
  34. package/.output/public/assets/preload-helper-B-cOmpLH.js +1 -0
  35. package/.output/public/assets/refresh-cw-FF1NtzlQ.js +1 -0
  36. package/.output/public/assets/routes-CoN9XHP_.js +2 -0
  37. package/.output/public/assets/routes-DT1jB0Zi.js +1 -0
  38. package/.output/public/assets/sidebar-D8mJRF15.js +3 -0
  39. package/.output/public/assets/styles-Bwt7v6U5.css +2 -0
  40. package/.output/public/assets/table-WBgfvgXg.js +1 -0
  41. package/.output/public/assets/useCompositeListItem-CloBmDwn.js +1 -0
  42. package/.output/public/assets/useMutation-DO8cvsTx.js +1 -0
  43. package/.output/public/assets/useOpenInteractionType-ReGr9GzJ.js +1 -0
  44. package/.output/public/assets/valueToPercent-BvPAi4bP.js +1 -0
  45. package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-DMRD4e4f.mjs} +51 -47
  46. package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
  47. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  48. package/.output/server/_libs/@tanstack/react-router+[...].mjs +3803 -4023
  49. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +141 -98
  50. package/.output/server/_libs/d3-array.mjs +231 -0
  51. package/.output/server/_libs/d3-color.mjs +330 -0
  52. package/.output/server/_libs/d3-format.mjs +252 -0
  53. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  54. package/.output/server/_libs/d3-path.mjs +77 -0
  55. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  56. package/.output/server/_libs/d3-shape.mjs +818 -0
  57. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  58. package/.output/server/_libs/es-toolkit.mjs +1159 -0
  59. package/.output/server/_libs/eventemitter3.mjs +236 -0
  60. package/.output/server/_libs/immer.mjs +532 -0
  61. package/.output/server/_libs/lucide-react.mjs +46 -32
  62. package/.output/server/_libs/next-themes.mjs +2 -2
  63. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  64. package/.output/server/_libs/recharts+[...].mjs +14350 -0
  65. package/.output/server/_libs/sonner.mjs +2 -2
  66. package/.output/server/_libs/tanstack__history.mjs +68 -41
  67. package/.output/server/_libs/tanstack__query-core.mjs +1618 -309
  68. package/.output/server/_libs/tanstack__react-query.mjs +262 -22
  69. package/.output/server/_libs/verkit.mjs +99 -1
  70. package/.output/server/_runtime.mjs +10 -1
  71. package/.output/server/_ssr/ConsoleFeatureUnavailable-Du7jNPNS.mjs +58 -0
  72. package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-GQvFkXoi.mjs} +3 -3
  73. package/.output/server/_ssr/InsightsInfo-Do7QSaFR.mjs +37 -0
  74. package/.output/server/_ssr/InsightsPageHeader-DSUWUWRc.mjs +154 -0
  75. package/.output/server/_ssr/NotFoundPage-DsF4Vrhg.mjs +37 -0
  76. package/.output/server/_ssr/api-BEiVs0H7.mjs +203 -0
  77. package/.output/server/_ssr/api-keys-BrvBWGRf.mjs +5 -0
  78. package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-K5v32nf7.mjs} +49 -9
  79. package/.output/server/_ssr/api-keys-rpc-B96bBllm.mjs +52 -0
  80. package/.output/server/_ssr/api-rpc-DcUe280B.mjs +296 -0
  81. package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-C68W56DP.mjs} +6 -6
  82. package/.output/server/_ssr/auth.server-DM1J6NwR.mjs +5712 -0
  83. package/.output/server/_ssr/bundleActivity-CpuY9CTP.mjs +19 -0
  84. package/.output/server/_ssr/card-CPAEKx0w.mjs +49 -0
  85. package/.output/server/_ssr/config-nsIcsHh8.mjs +15 -0
  86. package/.output/server/_ssr/config.server-DDCZk3Sq.mjs +36 -0
  87. package/.output/server/_ssr/console-access-Da-2Qd7q.mjs +17 -0
  88. package/.output/server/_ssr/console-features-Dzu2iUGD.mjs +55 -0
  89. package/.output/server/_ssr/console-features-api-xAsSgFa_.mjs +43 -0
  90. package/.output/server/_ssr/console-features-rpc-qARGpB24.mjs +19 -0
  91. package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-BdBf_ezN.mjs} +67 -56
  92. package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-B_y2lrwA.mjs} +2 -2
  93. package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Bhxciy7Z.mjs} +28 -5
  94. package/.output/server/_ssr/databaseRows-DwMAjaF8.mjs +74 -0
  95. package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-q__BJ7mQ.mjs} +2 -2
  96. package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-Cxo9ghYv.mjs} +140 -6
  97. package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-BW9I-pMQ.mjs} +10 -10
  98. package/.output/server/_ssr/empty-DcBTAooP.mjs +49 -0
  99. package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CYdinE-i.mjs} +1 -1
  100. package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-QCDBVpXA.mjs} +63 -51
  101. package/.output/server/_ssr/getBundleChildren-DIAGCF4a.mjs +22 -0
  102. package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-hCk2nUoU.mjs} +2 -2
  103. package/.output/server/_ssr/insights-BfBO0RFr.mjs +1238 -0
  104. package/.output/server/_ssr/insights-DsAU3-TB.mjs +14 -0
  105. package/.output/server/_ssr/insights-RIfg447W.mjs +5 -0
  106. package/.output/server/_ssr/insights-api-CDn-QQHU.mjs +105 -0
  107. package/.output/server/_ssr/insights-failures-BBGMhuUr.mjs +44 -0
  108. package/.output/server/_ssr/insights-failures-rpc-rA2dctK2.mjs +21 -0
  109. package/.output/server/_ssr/insights-recovery-Dpk6Mfb9.mjs +28 -0
  110. package/.output/server/_ssr/insights-recovery-rpc-BCaF-xSd.mjs +46 -0
  111. package/.output/server/_ssr/insights-recovery-rpc-CcgYyUHk.mjs +20 -0
  112. package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-keycmwzw.mjs} +22 -14
  113. package/.output/server/_ssr/insights-search-BRg5VsNe.mjs +25 -0
  114. package/.output/server/_ssr/insights-usage-cbw9n2Fq.mjs +29 -0
  115. package/.output/server/_ssr/insights-usage-rpc-BKgV1QDf.mjs +29 -0
  116. package/.output/server/_ssr/insights-usage-rpc-D-JYachy.mjs +41 -0
  117. package/.output/server/_ssr/insightsRecovery-B7oMc8d8.mjs +45 -0
  118. package/.output/server/_ssr/insightsUsage-Oa7kk5ek.mjs +56 -0
  119. package/.output/server/_ssr/insights_.distribution-BIqOqRW0.mjs +335 -0
  120. package/.output/server/_ssr/insights_.distribution-CuUrDa7P.mjs +5 -0
  121. package/.output/server/_ssr/insights_.distribution-RT_6x_ud.mjs +14 -0
  122. package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-BO5CjX2z.mjs} +517 -54
  123. package/.output/server/_ssr/installations-BjaHiIfh.mjs +5 -0
  124. package/.output/server/_ssr/installations-Dt5luA-N.mjs +69 -0
  125. package/.output/server/_ssr/listReleases-BitHzOYB.mjs +79 -0
  126. package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
  127. package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-DfVAixxe.mjs} +135 -139
  128. package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-C6LstNp8.mjs} +176 -455
  129. package/.output/server/_ssr/routes-Q3Uhmwwz.mjs +292 -0
  130. package/.output/server/_ssr/runtime.server-fL0o6I2b.mjs +1459 -0
  131. package/.output/server/_ssr/schema-BKY9SqaY.mjs +25 -0
  132. package/.output/server/_ssr/select-CUlInmjk.mjs +107 -0
  133. package/.output/server/_ssr/server-C43wq9ft.mjs +8330 -0
  134. package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-DKbx2ach.mjs} +117 -63
  135. package/.output/server/_ssr/ssr.mjs +1 -1
  136. package/.output/server/_ssr/start-BXUOv_n8.mjs +4 -0
  137. package/.output/server/_ssr/table-NGWV8B-S.mjs +53 -0
  138. package/.output/server/_ssr/updateFailures-Jwe2Baab.mjs +24 -0
  139. package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C8bwiZr8.mjs} +2 -2
  140. package/.output/server/_tanstack-start-manifest_v-WQ5qGn8n.mjs +124 -0
  141. package/.output/server/index.mjs +267 -162
  142. package/LICENSE +13 -14
  143. package/README.md +82 -72
  144. package/lib/index.d.mts +23 -11
  145. package/lib/vite-internal.mjs +13 -3
  146. package/lib/vite.d.mts +2 -0
  147. package/package.json +14 -14
  148. package/src/components/AppSidebar.tsx +100 -71
  149. package/src/components/ConsoleAccessPage.tsx +5 -1
  150. package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
  151. package/src/components/NotFoundPage.tsx +7 -7
  152. package/src/components/features/FeatureSlots.tsx +99 -0
  153. package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
  154. package/src/components/features/bundles/BundleMetadata.tsx +8 -5
  155. package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
  156. package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
  157. package/src/components/features/insights/AppUsage.tsx +370 -0
  158. package/src/components/features/insights/EstimatedCount.tsx +18 -0
  159. package/src/components/features/insights/EventDetails.tsx +117 -37
  160. package/src/components/features/insights/EventHistoryCard.tsx +112 -26
  161. package/src/components/features/insights/EventHistoryList.tsx +2 -2
  162. package/src/components/features/insights/InsightsControls.tsx +265 -102
  163. package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
  164. package/src/components/features/insights/InsightsInfo.tsx +48 -0
  165. package/src/components/features/insights/InsightsOverview.tsx +176 -173
  166. package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
  167. package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
  168. package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
  169. package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
  170. package/src/components/features/insights/ReleaseActivity.tsx +188 -0
  171. package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
  172. package/src/components/features/insights/UpdateFailures.tsx +319 -0
  173. package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
  174. package/src/components/features/releases/ReleaseEditorSheet.tsx +30 -7
  175. package/src/components/ui/card.tsx +1 -1
  176. package/src/components/ui/empty.tsx +101 -0
  177. package/src/components/ui/scroll-area.tsx +52 -0
  178. package/src/components/ui/sidebar.tsx +22 -29
  179. package/src/components/ui/tabs.tsx +81 -0
  180. package/src/index.ts +26 -19
  181. package/src/lib/api-keys-api.ts +0 -28
  182. package/src/lib/api-keys-rpc.ts +27 -38
  183. package/src/lib/api-rpc.ts +189 -266
  184. package/src/lib/api.ts +19 -102
  185. package/src/lib/bundle-activity.ts +31 -0
  186. package/src/lib/console-access.ts +20 -0
  187. package/src/lib/console-features-api.ts +68 -0
  188. package/src/lib/console-features-rpc.ts +13 -0
  189. package/src/lib/console-features.ts +91 -0
  190. package/src/lib/insights-api.ts +37 -1
  191. package/src/lib/insights-failures-rpc.ts +21 -0
  192. package/src/lib/insights-failures.ts +129 -0
  193. package/src/lib/insights-recovery-rpc.ts +51 -0
  194. package/src/lib/insights-recovery.ts +68 -0
  195. package/src/lib/insights-retention.ts +21 -0
  196. package/src/lib/insights-rpc.ts +30 -12
  197. package/src/lib/insights-search.ts +58 -0
  198. package/src/lib/insights-usage-rpc.ts +29 -0
  199. package/src/lib/insights-usage.ts +74 -0
  200. package/src/lib/insights-view.ts +38 -2
  201. package/src/lib/scroll-restoration.ts +21 -0
  202. package/src/lib/server/adminInsights.ts +124 -0
  203. package/src/lib/server/auth.server.ts +13 -5
  204. package/src/lib/server/bundleActivity.ts +37 -0
  205. package/src/lib/server/config.server.ts +21 -74
  206. package/src/lib/server/console-feature-apis.ts +59 -0
  207. package/src/lib/server/console-runtime.server.ts +82 -38
  208. package/src/lib/server/downloadBundle.ts +16 -15
  209. package/src/lib/server/getBundleChildren.ts +31 -122
  210. package/src/lib/server/insightsRecovery.ts +55 -0
  211. package/src/lib/server/insightsUsage.ts +63 -0
  212. package/src/lib/server/listReleases.ts +109 -44
  213. package/src/lib/server/releaseReachability.ts +8 -7
  214. package/src/lib/server/runtime.server.ts +120 -31
  215. package/src/lib/server/updateFailures.ts +31 -0
  216. package/src/routeTree.gen.ts +44 -44
  217. package/src/router.tsx +3 -2
  218. package/src/routes/-installations-search.ts +32 -8
  219. package/src/routes/-releases-search.ts +76 -29
  220. package/src/routes/__root.tsx +10 -4
  221. package/src/routes/api/bundles/$bundleId/download.ts +2 -5
  222. package/src/routes/api-keys.tsx +5 -2
  223. package/src/routes/index.tsx +167 -104
  224. package/src/routes/insights.tsx +100 -59
  225. package/src/routes/insights_.distribution.tsx +398 -0
  226. package/src/routes/installations.tsx +98 -41
  227. package/src/vite-internal.ts +15 -3
  228. package/src/vite.ts +2 -0
  229. package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
  230. package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
  231. package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
  232. package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
  233. package/.output/public/assets/card-Dhr_eFYj.js +0 -1
  234. package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
  235. package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
  236. package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
  237. package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
  238. package/.output/public/assets/dist-C_NydL0e.js +0 -1
  239. package/.output/public/assets/index-DdAz-CXv.js +0 -10
  240. package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
  241. package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
  242. package/.output/public/assets/installations-CE33wgbY.js +0 -2
  243. package/.output/public/assets/installations-CStZja8x.js +0 -1
  244. package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
  245. package/.output/public/assets/link-CI8idAUi.js +0 -1
  246. package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
  247. package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
  248. package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
  249. package/.output/public/assets/routes-DGVXdzpw.js +0 -2
  250. package/.output/public/assets/routes-DTlwOr8I.js +0 -1
  251. package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
  252. package/.output/public/assets/signing-CMf4aqDO.js +0 -1
  253. package/.output/public/assets/styles-BCvbtKsm.css +0 -2
  254. package/.output/public/assets/table-2vcV89QB.js +0 -1
  255. package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
  256. package/.output/public/assets/x-DCd0j8c6.js +0 -1
  257. package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
  258. package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
  259. package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
  260. package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
  261. package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
  262. package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
  263. package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
  264. package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
  265. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
  266. package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
  267. package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
  268. package/.output/server/_ssr/deleteBundle-BTGwBgzx.mjs +0 -66
  269. package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
  270. package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
  271. package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
  272. package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
  273. package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
  274. package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
  275. package/.output/server/_ssr/server-D_C2rMzf.mjs +0 -7468
  276. package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
  277. package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
  278. package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
  279. package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
  280. package/src/components/features/signing/BundleSigningPage.tsx +0 -139
  281. package/src/lib/bundle-signing-api.ts +0 -14
  282. package/src/lib/bundle-signing-rpc.ts +0 -16
  283. package/src/lib/server/bundle-signing.server.ts +0 -23
  284. package/src/lib/server/deleteBundle.ts +0 -145
  285. package/src/routes/signing.tsx +0 -37
@@ -1,16 +1,46 @@
1
- import { r as __toESM } from "../_runtime.mjs";
2
- import { J as require_react, q as require_jsx_runtime } from "./@base-ui/react+[...].mjs";
3
- import { c as noop, i as notifyManager, l as shouldThrowError, n as MutationObserver, r as QueryObserver, s as environmentManager } from "./tanstack__query-core.mjs";
4
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { mt as require_react, pt as require_jsx_runtime } from "./@base-ui/react+[...].mjs";
3
+ import { c as shouldThrowError, i as notifyManager, n as MutationObserver, r as QueryObserver, s as noop } from "./tanstack__query-core.mjs";
4
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
5
5
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
6
6
  var import_jsx_runtime = require_jsx_runtime();
7
+ /**
8
+ * The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
9
+ */
7
10
  var QueryClientContext = import_react.createContext(void 0);
11
+ /**
12
+ * The `useQueryClient` hook returns the current `QueryClient` instance.
13
+ *
14
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
15
+ * be used.
16
+ * @returns The current `QueryClient` instance.
17
+ * @throws If no `queryClient` argument is passed and no `QueryClientProvider` is found in the component tree.
18
+ */
8
19
  var useQueryClient = (queryClient) => {
9
20
  const client = import_react.useContext(QueryClientContext);
10
21
  if (queryClient) return queryClient;
11
22
  if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
12
23
  return client;
13
24
  };
25
+ /**
26
+ * Use the `QueryClientProvider` component to connect and provide a `QueryClient` to your application. Also
27
+ * calls `client.mount()`/`client.unmount()` as this component mounts/unmounts, which subscribes the client to
28
+ * focus/online events (resuming any paused mutations and refetching as needed when the app regains focus or
29
+ * comes back online).
30
+ *
31
+ * @returns The provided `children`, wrapped so they can read the `QueryClient` via `useQueryClient`.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
36
+ *
37
+ * const queryClient = new QueryClient()
38
+ *
39
+ * function App() {
40
+ * return <QueryClientProvider client={queryClient}>...</QueryClientProvider>
41
+ * }
42
+ * ```
43
+ */
14
44
  var QueryClientProvider = ({ client, children }) => {
15
45
  import_react.useEffect(() => {
16
46
  client.mount();
@@ -24,12 +54,22 @@ var QueryClientProvider = ({ client, children }) => {
24
54
  });
25
55
  };
26
56
  //#endregion
27
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
57
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
28
58
  var IsRestoringContext = import_react.createContext(false);
59
+ /**
60
+ * If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
61
+ * check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid
62
+ * race conditions between the restore and mounting queries.
63
+ *
64
+ * @returns `true` while a persisted client is being restored, `false` otherwise.
65
+ */
29
66
  var useIsRestoring = () => import_react.useContext(IsRestoringContext);
30
67
  IsRestoringContext.Provider;
31
68
  //#endregion
32
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
69
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
70
+ /**
71
+ * Resets any query errors within the boundary, so queries know they can try again.
72
+ */
33
73
  function createValue() {
34
74
  let isReset = false;
35
75
  return {
@@ -45,12 +85,42 @@ function createValue() {
45
85
  };
46
86
  }
47
87
  var QueryErrorResetBoundaryContext = import_react.createContext(createValue());
88
+ /**
89
+ * This hook will reset any query errors within the closest `QueryErrorResetBoundary`. If there is no boundary
90
+ * defined it will reset them globally.
91
+ *
92
+ * @returns The boundary's {@link QueryErrorResetBoundaryValue}.
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * import { ErrorBoundary } from 'react-error-boundary'
97
+ * import { useQueryErrorResetBoundary } from '@tanstack/react-query'
98
+ *
99
+ * function App({ children }: { children: React.ReactNode }) {
100
+ * const { reset } = useQueryErrorResetBoundary()
101
+ *
102
+ * return (
103
+ * <ErrorBoundary
104
+ * onReset={reset}
105
+ * fallbackRender={({ resetErrorBoundary }) => (
106
+ * <div>
107
+ * There was an error!
108
+ * <button onClick={() => resetErrorBoundary()}>Try again</button>
109
+ * </div>
110
+ * )}
111
+ * >
112
+ * {children}
113
+ * </ErrorBoundary>
114
+ * )
115
+ * }
116
+ * ```
117
+ */
48
118
  var useQueryErrorResetBoundary = () => import_react.useContext(QueryErrorResetBoundaryContext);
49
119
  //#endregion
50
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
120
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
51
121
  var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
52
122
  const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
53
- if (options.suspense || options.experimental_prefetchInRender || throwOnError) {
123
+ if (options.suspense || throwOnError) {
54
124
  if (!errorResetBoundary.isReset()) options.retryOnMount = false;
55
125
  }
56
126
  };
@@ -63,7 +133,7 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
63
133
  return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
64
134
  };
65
135
  //#endregion
66
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/suspense.js
136
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/suspense.js
67
137
  var ensureSuspenseTimers = (defaultedOptions) => {
68
138
  if (defaultedOptions.suspense) {
69
139
  const MIN_SUSPENSE_TIME_MS = 1e3;
@@ -73,26 +143,23 @@ var ensureSuspenseTimers = (defaultedOptions) => {
73
143
  if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
74
144
  }
75
145
  };
76
- var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
77
146
  var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
78
147
  var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
79
148
  errorResetBoundary.clearReset();
80
149
  });
81
150
  //#endregion
82
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
151
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
83
152
  function useBaseQuery(options, Observer, queryClient) {
84
153
  const isRestoring = useIsRestoring();
85
154
  const errorResetBoundary = useQueryErrorResetBoundary();
86
155
  const client = useQueryClient(queryClient);
87
156
  const defaultedOptions = client.defaultQueryOptions(options);
88
- client.getDefaultOptions().queries?._experimental_beforeQuery?.(defaultedOptions);
89
157
  const query = client.getQueryCache().get(defaultedOptions.queryHash);
90
158
  const subscribed = options.subscribed !== false;
91
159
  defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : subscribed ? "optimistic" : void 0;
92
160
  ensureSuspenseTimers(defaultedOptions);
93
161
  ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
94
162
  useClearResetErrorBoundary(errorResetBoundary);
95
- const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
96
163
  const [observer] = import_react.useState(() => new Observer(client, defaultedOptions));
97
164
  const result = observer.getOptimisticResult(defaultedOptions);
98
165
  const shouldSubscribe = !isRestoring && subscribed;
@@ -112,19 +179,192 @@ function useBaseQuery(options, Observer, queryClient) {
112
179
  query,
113
180
  suspense: defaultedOptions.suspense
114
181
  })) throw result.error;
115
- client.getDefaultOptions().queries?._experimental_afterQuery?.(defaultedOptions, result);
116
- if (defaultedOptions.experimental_prefetchInRender && !environmentManager.isServer() && willFetch(result, isRestoring)) (isNewCacheEntry ? fetchOptimistic(defaultedOptions, observer, errorResetBoundary) : query?.promise)?.catch(noop).finally(() => {
117
- observer.updateResult();
118
- });
119
182
  return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
120
183
  }
121
184
  //#endregion
122
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useQuery.js
185
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useQuery.js
123
186
  function useQuery(options, queryClient) {
124
187
  return useBaseQuery(options, QueryObserver, queryClient);
125
188
  }
126
189
  //#endregion
127
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useMutation.js
190
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/queryOptions.js
191
+ function queryOptions(options) {
192
+ return options;
193
+ }
194
+ //#endregion
195
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useMutation.js
196
+ /**
197
+ * Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
198
+ * `useMutation` is the hook for that.
199
+ *
200
+ * @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look
201
+ * the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).
202
+ * @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.
203
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
204
+ * be used.
205
+ * @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second
206
+ * argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared
207
+ * mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks
208
+ * fire only for the latest call you've made, and only while the component is still mounted — unmounting before
209
+ * the mutation settles removes the subscription and prevents them from firing.
210
+ *
211
+ * @example
212
+ * ```tsx
213
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
214
+ *
215
+ * function AddTodo() {
216
+ * const queryClient = useQueryClient()
217
+ *
218
+ * const addMutation = useMutation({
219
+ * mutationFn: addTodo,
220
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
221
+ * })
222
+ *
223
+ * return (
224
+ * <button
225
+ * onClick={() =>
226
+ * addMutation.mutate('Item', {
227
+ * onError: (error) => console.error('Failed to add item:', error),
228
+ * })
229
+ * }
230
+ * >
231
+ * Add
232
+ * </button>
233
+ * )
234
+ * }
235
+ * ```
236
+ *
237
+ * @example
238
+ * Rendering the mutation's own state, rather than just firing it off:
239
+ * ```tsx
240
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
241
+ *
242
+ * function AddTodo() {
243
+ * const queryClient = useQueryClient()
244
+ *
245
+ * const addMutation = useMutation({
246
+ * mutationFn: addTodo,
247
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
248
+ * })
249
+ *
250
+ * return (
251
+ * <div>
252
+ * {addMutation.isPending ? (
253
+ * 'Adding todo...'
254
+ * ) : (
255
+ * <>
256
+ * {addMutation.isError ? (
257
+ * <div>An error occurred: {addMutation.error.message}</div>
258
+ * ) : null}
259
+ * <button onClick={() => addMutation.mutate('Item')}>Add</button>
260
+ * </>
261
+ * )}
262
+ * </div>
263
+ * )
264
+ * }
265
+ * ```
266
+ *
267
+ * @example
268
+ * Optimistic update via `onMutate`, rolling back on `onError`:
269
+ * ```tsx
270
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
271
+ *
272
+ * function AddTodo() {
273
+ * const queryClient = useQueryClient()
274
+ *
275
+ * const addMutation = useMutation({
276
+ * mutationFn: addTodo,
277
+ * onMutate: async (newTodo) => {
278
+ * await queryClient.cancelQueries({ queryKey: ['todos'] })
279
+ * const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])
280
+ *
281
+ * queryClient.setQueryData<Array<string>>(['todos'], (old) => [
282
+ * ...(old ?? []),
283
+ * newTodo,
284
+ * ])
285
+ *
286
+ * // Passed to `onError` as `onMutateResult` if the mutation fails.
287
+ * return { previousTodos }
288
+ * },
289
+ * onError: (_err, _newTodo, onMutateResult) => {
290
+ * queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)
291
+ * },
292
+ * onSettled: () => {
293
+ * queryClient.invalidateQueries({ queryKey: ['todos'] })
294
+ * },
295
+ * })
296
+ *
297
+ * return (
298
+ * <button onClick={() => addMutation.mutate('Item')}>Add</button>
299
+ * )
300
+ * }
301
+ * ```
302
+ *
303
+ * @example
304
+ * Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a
305
+ * promise per call instead, so you can wait for all of them when they succeed:
306
+ * ```tsx
307
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
308
+ *
309
+ * function AddTodos() {
310
+ * const queryClient = useQueryClient()
311
+ *
312
+ * const addMutation = useMutation({
313
+ * mutationFn: addTodo,
314
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
315
+ * })
316
+ *
317
+ * async function handleAddAll(todos: Array<string>) {
318
+ * try {
319
+ * await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))
320
+ * } catch (error) {
321
+ * console.error('Failed to add todos:', error)
322
+ * }
323
+ * }
324
+ *
325
+ * return (
326
+ * <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>
327
+ * Add all
328
+ * </button>
329
+ * )
330
+ * }
331
+ * ```
332
+ *
333
+ * @example
334
+ * If some of the mutations above can fail independently of the others, and you want to know which ones
335
+ * did — rather than losing that information the moment the first one rejects — swap `Promise.all` for
336
+ * `Promise.allSettled`:
337
+ * ```tsx
338
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
339
+ *
340
+ * function AddTodos() {
341
+ * const queryClient = useQueryClient()
342
+ *
343
+ * const addMutation = useMutation({
344
+ * mutationFn: addTodo,
345
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
346
+ * })
347
+ *
348
+ * async function handleAddAll(todos: Array<string>) {
349
+ * const addResults = await Promise.allSettled(
350
+ * todos.map((todo) => addMutation.mutateAsync(todo)),
351
+ * )
352
+ *
353
+ * addResults.forEach((addResult, index) => {
354
+ * if (addResult.status === 'rejected') {
355
+ * console.error(`Failed to add "${todos[index]}":`, addResult.reason)
356
+ * }
357
+ * })
358
+ * }
359
+ *
360
+ * return (
361
+ * <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>
362
+ * Add all
363
+ * </button>
364
+ * )
365
+ * }
366
+ * ```
367
+ */
128
368
  function useMutation(options, queryClient) {
129
369
  const client = useQueryClient(queryClient);
130
370
  const [observer] = import_react.useState(() => new MutationObserver(client, options));
@@ -132,8 +372,8 @@ function useMutation(options, queryClient) {
132
372
  observer.setOptions(options);
133
373
  }, [observer, options]);
134
374
  const result = import_react.useSyncExternalStore(import_react.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
135
- const mutate = import_react.useCallback((variables, mutateOptions) => {
136
- observer.mutate(variables, mutateOptions).catch(noop);
375
+ const mutate = import_react.useCallback((...args) => {
376
+ observer.mutate(args[0], args[1]).catch(noop);
137
377
  }, [observer]);
138
378
  if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
139
379
  return {
@@ -143,4 +383,4 @@ function useMutation(options, queryClient) {
143
383
  };
144
384
  }
145
385
  //#endregion
146
- export { useQueryClient as i, useQuery as n, QueryClientProvider as r, useMutation as t };
386
+ export { useQueryClient as a, QueryClientProvider as i, queryOptions as n, useQuery as r, useMutation as t };
@@ -68,6 +68,36 @@ function parse(version, options = {}) {
68
68
  prerelease
69
69
  };
70
70
  }
71
+ var NUMERIC = /^\d+$/;
72
+ function compareIdentifiers(left, right) {
73
+ if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
74
+ const leftNumeric = NUMERIC.test(String(left));
75
+ const rightNumeric = NUMERIC.test(String(right));
76
+ const normalizedLeft = leftNumeric ? Number(left) : left;
77
+ const normalizedRight = rightNumeric ? Number(right) : right;
78
+ return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
79
+ }
80
+ function compareMainParsed(left, right) {
81
+ return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
82
+ }
83
+ function comparePrereleaseParsed(left, right) {
84
+ const leftPrerelease = left.prerelease;
85
+ const rightPrerelease = right.prerelease;
86
+ if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
87
+ if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
88
+ if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
89
+ for (let index = 0;; index++) {
90
+ const leftIdentifier = leftPrerelease?.[index];
91
+ const rightIdentifier = rightPrerelease?.[index];
92
+ if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
93
+ if (rightIdentifier === void 0) return 1;
94
+ if (leftIdentifier === void 0) return -1;
95
+ if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier);
96
+ }
97
+ }
98
+ function compareParsed(left, right) {
99
+ return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
100
+ }
71
101
  //#endregion
72
102
  //#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.js
73
103
  var STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
@@ -89,6 +119,40 @@ function parseComparator(comparator, options = {}) {
89
119
  version
90
120
  };
91
121
  }
122
+ function testParsedComparator(comparator, version) {
123
+ if (!comparator.version) return true;
124
+ const comparison = compareParsed(version, comparator.version);
125
+ switch (comparator.operator) {
126
+ case "": return comparison === 0;
127
+ case ">": return comparison > 0;
128
+ case ">=": return comparison >= 0;
129
+ case "<": return comparison < 0;
130
+ case "<=": return comparison <= 0;
131
+ }
132
+ }
133
+ function comparatorAllowsPrerelease(comparator, version) {
134
+ const allowed = comparator.version;
135
+ return allowed !== null && !!allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
136
+ }
137
+ function testComparatorSet(set, version, options) {
138
+ if (set.some((comparator) => !testParsedComparator(comparator, version))) return false;
139
+ return !version.prerelease?.length || !!options.includePrerelease || set.some((comparator) => comparatorAllowsPrerelease(comparator, version));
140
+ }
141
+ function parsedComparatorsIntersect(left, right, options = {}) {
142
+ if (!left.version || !right.version) return true;
143
+ if (left.operator === "") return testComparatorSet([right], left.version, options);
144
+ if (right.operator === "") return testComparatorSet([left], right.version, options);
145
+ const leftValue = formatComparator(left);
146
+ const rightValue = formatComparator(right);
147
+ if (options.includePrerelease && (leftValue === "<0.0.0-0" || rightValue === "<0.0.0-0")) return false;
148
+ if (!options.includePrerelease && (leftValue.startsWith("<0.0.0") || rightValue.startsWith("<0.0.0"))) return false;
149
+ if (left.operator.startsWith(">") && right.operator.startsWith(">")) return true;
150
+ if (left.operator.startsWith("<") && right.operator.startsWith("<")) return true;
151
+ const comparison = compareParsed(left.version, right.version);
152
+ if (comparison === 0 && left.operator.includes("=") && right.operator.includes("=")) return true;
153
+ if (comparison < 0 && left.operator.startsWith(">") && right.operator.startsWith("<")) return true;
154
+ return comparison > 0 && left.operator.startsWith("<") && right.operator.startsWith(">");
155
+ }
92
156
  //#endregion
93
157
  //#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.js
94
158
  function formatRange(range) {
@@ -243,9 +307,43 @@ function tryParseRange(range, options = {}) {
243
307
  return null;
244
308
  }
245
309
  }
310
+ function exactVersion(set) {
311
+ for (const comparator of set) if (comparator.operator === "" && comparator.version) return comparator.version;
312
+ return null;
313
+ }
314
+ function isSatisfiable(comparators, options) {
315
+ const exact = exactVersion(comparators);
316
+ if (exact) return testComparatorSet(comparators, exact, options);
317
+ const remaining = [...comparators];
318
+ let current = remaining.pop();
319
+ while (current && remaining.length) {
320
+ if (remaining.some((other) => !parsedComparatorsIntersect(current, other, options))) return false;
321
+ current = remaining.pop();
322
+ }
323
+ return true;
324
+ }
325
+ function setsIntersect(left, right, options) {
326
+ const leftExact = exactVersion(left);
327
+ if (leftExact) return testComparatorSet(right, leftExact, options);
328
+ const rightExact = exactVersion(right);
329
+ if (rightExact) return testComparatorSet(left, rightExact, options);
330
+ return left.every((leftComparator) => right.every((rightComparator) => parsedComparatorsIntersect(leftComparator, rightComparator, options)));
331
+ }
332
+ function parsedRangesIntersect(left, right, options = {}) {
333
+ return left.sets.some((leftSet) => isSatisfiable(leftSet, options) && right.sets.some((rightSet) => isSatisfiable(rightSet, options) && setsIntersect(leftSet, rightSet, options)));
334
+ }
246
335
  function normalizeRange(range, options = {}) {
247
336
  const parsed = tryParseRange(range, options);
248
337
  return parsed ? formatRange(parsed) || "*" : null;
249
338
  }
339
+ function rangesIntersect(left, right, options = {}) {
340
+ const parsedLeft = parseRange(left, options);
341
+ const parsedRight = parseRange(right, options);
342
+ return parsedRangesIntersect(parsedLeft, parsedRight, {
343
+ ...parsedLeft.options,
344
+ ...parsedRight.options,
345
+ ...options
346
+ });
347
+ }
250
348
  //#endregion
251
- export { normalizeRange as t };
349
+ export { rangesIntersect as n, normalizeRange as t };
@@ -7,6 +7,15 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
10
19
  var __copyProps = (to, from, except, desc) => {
11
20
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
21
  key = keys[i];
@@ -23,4 +32,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
32
  }) : target, mod));
24
33
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
25
34
  //#endregion
26
- export { __require as n, __toESM as r, __commonJSMin as t };
35
+ export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
@@ -0,0 +1,58 @@
1
+ import { a as unavailableReason, n as consoleFeatures } from "./console-features-Dzu2iUGD.mjs";
2
+ import { pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { L as ArrowUpRight } from "../_libs/lucide-react.mjs";
4
+ import { D as buttonVariants, x as SidebarTrigger } from "./sidebar-DKbx2ach.mjs";
5
+ import { a as useConsoleFeatures, n as notFoundFeature } from "./console-features-api-xAsSgFa_.mjs";
6
+ import { t as NotFoundPage } from "./NotFoundPage-DsF4Vrhg.mjs";
7
+ import { a as EmptyTitle, i as EmptyHeader, n as EmptyContent, r as EmptyDescription, t as Empty } from "./empty-DcBTAooP.mjs";
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/ConsoleFeatureUnavailable-Du7jNPNS.js
9
+ var import_jsx_runtime = require_jsx_runtime();
10
+ var CONSOLE_DEPLOYMENT_GUIDE_URL = "https://hot-updater.dev/docs/guides/console-deployment";
11
+ /**
12
+ * A feature route's not-found state: the plugin to add, or, for a feature a
13
+ * self-hosted server does not serve, the database config it needs.
14
+ */
15
+ function ConsoleFeatureUnavailable({ data }) {
16
+ const feature = notFoundFeature(data);
17
+ const remote = useConsoleFeatures().data?.remote === true;
18
+ if (feature === void 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NotFoundPage, {});
19
+ const { label, plugin } = consoleFeatures[feature];
20
+ const pluginCall = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
21
+ className: "font-mono",
22
+ children: `${plugin}()`
23
+ });
24
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25
+ className: "flex h-svh min-h-0 flex-col",
26
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
27
+ className: "sticky top-0 z-10 flex shrink-0 items-center gap-3 border-b bg-background px-3 py-3 sm:min-h-12 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm",
28
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "-ml-1" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
29
+ className: "text-sm font-medium",
30
+ children: label
31
+ })]
32
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
33
+ className: "flex min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6",
34
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Empty, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyHeader, { children: unavailableReason(feature, { remote }) === "remote" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyTitle, { children: "Needs the server's database" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyDescription, { children: "This console reaches a self-hosted server through its admin API, which does not serve this page. Configure the console with the database the server uses." })] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyTitle, { children: [label, " not installed"] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(EmptyDescription, { children: [
35
+ "Add ",
36
+ pluginCall,
37
+ " to ",
38
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
39
+ className: "font-mono",
40
+ children: "plugins"
41
+ }),
42
+ " ",
43
+ "where you create the server and in the console config."
44
+ ] })] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
45
+ className: buttonVariants({ variant: "outline" }),
46
+ href: CONSOLE_DEPLOYMENT_GUIDE_URL,
47
+ rel: "noreferrer",
48
+ target: "_blank",
49
+ children: ["Console setup guide", /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowUpRight, {
50
+ "aria-hidden": "true",
51
+ "data-icon": "inline-end"
52
+ })]
53
+ }) })] })
54
+ })]
55
+ });
56
+ }
57
+ //#endregion
58
+ export { ConsoleFeatureUnavailable as t };
@@ -1,7 +1,7 @@
1
- import { q as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
- import { C as cn, v as Tooltip$1, x as TooltipTrigger, y as TooltipContent } from "./createSsrRpc-DjWNJ0uc.mjs";
1
+ import { pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
2
+ import { C as Tooltip$1, E as TooltipTrigger, O as cn, w as TooltipContent } from "./sidebar-DKbx2ach.mjs";
3
3
  import { n as toast } from "../_libs/sonner.mjs";
4
- //#region node_modules/.nitro/vite/services/ssr/assets/HashValueDisplay-DwpGLfrl.js
4
+ //#region node_modules/.nitro/vite/services/ssr/assets/HashValueDisplay-GQvFkXoi.js
5
5
  var import_jsx_runtime = require_jsx_runtime();
6
6
  var shortenIdentifier = (value, maxLength = 12) => value.length > maxLength ? `${value.slice(0, Math.max(1, maxLength - 4))}…${value.slice(-4)}` : value;
7
7
  function HashValueDisplay({ value, maxLength = 12, className, buttonClassName }) {
@@ -0,0 +1,37 @@
1
+ import { i as __toESM } from "../_runtime.mjs";
2
+ import { mt as require_react, pt as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
+ import { S as Info } from "../_libs/lucide-react.mjs";
4
+ import { C as Tooltip$1, E as TooltipTrigger, t as Button$1, w as TooltipContent } from "./sidebar-DKbx2ach.mjs";
5
+ //#region node_modules/.nitro/vite/services/ssr/assets/InsightsInfo-Do7QSaFR.js
6
+ var import_react = /* @__PURE__ */ __toESM(require_react());
7
+ var import_jsx_runtime = require_jsx_runtime();
8
+ function InsightsInfo({ label, children }) {
9
+ const id = (0, import_react.useId)();
10
+ const [open, setOpen] = (0, import_react.useState)(false);
11
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip$1, {
12
+ open,
13
+ onOpenChange: setOpen,
14
+ triggerId: id,
15
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger, {
16
+ id,
17
+ "aria-describedby": open ? `${id}-description` : void 0,
18
+ closeOnClick: false,
19
+ onClick: () => setOpen((value) => !value),
20
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
21
+ "aria-label": label,
22
+ className: "size-11 sm:size-7",
23
+ size: "icon",
24
+ variant: "ghost"
25
+ }),
26
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, {})
27
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContent, {
28
+ id: `${id}-description`,
29
+ role: "tooltip",
30
+ className: "max-w-64",
31
+ side: "bottom",
32
+ children
33
+ })]
34
+ });
35
+ }
36
+ //#endregion
37
+ export { InsightsInfo as t };