@hot-updater/console 0.36.7 → 1.0.0-rc.1

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 (262) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/BundleIdDisplay-D4ErdU5_.js +1 -0
  3. package/.output/public/assets/InsightsCapabilityContext-B42VqvP6.js +1 -0
  4. package/.output/public/assets/api-keys-api-DGVTTvTJ.js +1 -0
  5. package/.output/public/assets/api-keys-z16OZIP4.js +1 -0
  6. package/.output/public/assets/badge-Br_KDO0J.js +1 -0
  7. package/.output/public/assets/card-DzuEXvyJ.js +1 -0
  8. package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
  9. package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
  10. package/.output/public/assets/dialog-BeAENgez.js +1 -0
  11. package/.output/public/assets/dist-Bssh_cv0.js +1 -0
  12. package/.output/public/assets/field-Buq148-A.js +1 -0
  13. package/.output/public/assets/index-uOpQAIC4.js +10 -0
  14. package/.output/public/assets/input-group-B3p5UpyW.js +1 -0
  15. package/.output/public/assets/insights-DJTr7Ozn.js +1 -0
  16. package/.output/public/assets/insights-api-DVMOoRMS.js +1 -0
  17. package/.output/public/assets/installations-BY64iIAK.js +2 -0
  18. package/.output/public/assets/installations-D5v9i3AL.js +1 -0
  19. package/.output/public/assets/lazyRouteComponent-DKYu5cZJ.js +1 -0
  20. package/.output/public/assets/preload-helper-CQ36nxok.js +1 -0
  21. package/.output/public/assets/refresh-cw-BkbfZ62O.js +1 -0
  22. package/.output/public/assets/routes-BuoI5-Cr.js +2 -0
  23. package/.output/public/assets/routes-C8fvgETO.js +1 -0
  24. package/.output/public/assets/search-qsIDvS2I.js +1 -0
  25. package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
  26. package/.output/public/assets/signing-mJD88Y4C.js +1 -0
  27. package/.output/public/assets/styles-BZIG7t42.css +2 -0
  28. package/.output/public/assets/table-RamFEclP.js +1 -0
  29. package/.output/public/assets/useCompositeListItem-ChzDqdpc.js +42 -0
  30. package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
  31. package/.output/public/assets/useOpenInteractionType-Dwfy-SpA.js +1 -0
  32. package/.output/server/__23tanstack-start-server-fn-resolver-Dftxlm2E.mjs +146 -0
  33. package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
  34. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  35. package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
  36. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
  37. package/.output/server/_libs/d3-array.mjs +231 -0
  38. package/.output/server/_libs/d3-color.mjs +330 -0
  39. package/.output/server/_libs/d3-format.mjs +252 -0
  40. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  41. package/.output/server/_libs/d3-path.mjs +77 -0
  42. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  43. package/.output/server/_libs/d3-shape.mjs +818 -0
  44. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  45. package/.output/server/_libs/es-toolkit.mjs +1134 -0
  46. package/.output/server/_libs/eventemitter3.mjs +236 -0
  47. package/.output/server/_libs/immer.mjs +532 -0
  48. package/.output/server/_libs/lucide-react.mjs +141 -13
  49. package/.output/server/_libs/next-themes.mjs +2 -2
  50. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  51. package/.output/server/_libs/recharts+[...].mjs +14117 -0
  52. package/.output/server/_libs/sonner.mjs +2 -2
  53. package/.output/server/_libs/tanstack__query-core.mjs +114 -1
  54. package/.output/server/_libs/tanstack__react-query.mjs +3 -4
  55. package/.output/server/_runtime.mjs +10 -1
  56. package/.output/server/_ssr/BundleActivityChart-CWcdPuUn.mjs +288 -0
  57. package/.output/server/_ssr/BundleIdDisplay-BEvB3MvA.mjs +13 -0
  58. package/.output/server/_ssr/InsightsCapabilityContext-Cx8fjm2s.mjs +15 -0
  59. package/.output/server/_ssr/api-keys-CpBqHpuC.mjs +300 -0
  60. package/.output/server/_ssr/api-keys-api-Czkp57UV.mjs +60 -0
  61. package/.output/server/_ssr/api-keys-rpc-BTtMDSoR.mjs +136 -0
  62. package/.output/server/_ssr/api-rpc-BEX8ISai.mjs +1468 -0
  63. package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
  64. package/.output/server/_ssr/auth-rpc-BFMEC-TT.mjs +24 -0
  65. package/.output/server/_ssr/auth.server-DW71WzsD.mjs +47 -0
  66. package/.output/server/_ssr/badge-CpWXQwyF.mjs +26 -0
  67. package/.output/server/_ssr/bundle-signing-rpc-BbCFUQSu.mjs +16 -0
  68. package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +12 -0
  69. package/.output/server/_ssr/card-Bsc8mRis.mjs +86 -0
  70. package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
  71. package/.output/server/_ssr/config.server-DQYEr_5X.mjs +361 -0
  72. package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
  73. package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
  74. package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-DhfrxEjg.mjs} +68 -50
  75. package/.output/server/_ssr/databaseRows-QlCYLi0H.mjs +166 -0
  76. package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
  77. package/.output/server/_ssr/dialog-C0vKUp8R.mjs +170 -0
  78. package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
  79. package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
  80. package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
  81. package/.output/server/_ssr/field-DASCh-5d.mjs +74 -0
  82. package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
  83. package/.output/server/_ssr/input-group-etIsBUqv.mjs +288 -0
  84. package/.output/server/_ssr/insights-api-C1F7UreR.mjs +71 -0
  85. package/.output/server/_ssr/insights-input-9fEJF-ZG.mjs +96 -0
  86. package/.output/server/_ssr/insights-rpc-C-8R6kED.mjs +155 -0
  87. package/.output/server/_ssr/insights-ygT_aIfo.mjs +858 -0
  88. package/.output/server/_ssr/installations-DqRT1QTd.mjs +535 -0
  89. package/.output/server/_ssr/installations-K8TCYTYh.mjs +19 -0
  90. package/.output/server/_ssr/router-BxBEvtF1.mjs +513 -0
  91. package/.output/server/_ssr/routes-BC7rn-tf.mjs +37 -0
  92. package/.output/server/_ssr/routes-CM5KAwpB.mjs +2285 -0
  93. package/.output/server/_ssr/runtime.server-la7TRAH_.mjs +527 -0
  94. package/.output/server/_ssr/server-CpzW--lT.mjs +7468 -0
  95. package/.output/server/_ssr/signing-jk4HANnl.mjs +134 -0
  96. package/.output/server/_ssr/ssr.mjs +4 -5740
  97. package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
  98. package/.output/server/_ssr/table-CU58HeI7.mjs +53 -0
  99. package/.output/server/_ssr/uuidv7-CaKuKXrV.mjs +31 -0
  100. package/.output/server/_tanstack-start-manifest_v-Mz9MmSlD.mjs +103 -0
  101. package/.output/server/index.mjs +229 -47
  102. package/README.md +29 -8
  103. package/lib/index.d.mts +35 -0
  104. package/lib/index.mjs +4 -0
  105. package/lib/vite-internal.mjs +127 -0
  106. package/lib/vite.d.mts +10 -0
  107. package/lib/vite.mjs +5 -0
  108. package/package.json +51 -29
  109. package/public/apple-touch-icon.png +0 -0
  110. package/public/favicon-16x16.png +0 -0
  111. package/public/favicon-32x32.png +0 -0
  112. package/public/favicon.ico +0 -0
  113. package/public/logo.svg +1 -0
  114. package/public/manifest.json +30 -0
  115. package/public/robots.txt +3 -0
  116. package/src/components/AppSidebar.tsx +159 -0
  117. package/src/components/BundleIdDisplay.tsx +18 -0
  118. package/src/components/ChannelBadge.tsx +31 -0
  119. package/src/components/ConsoleAccessPage.tsx +122 -0
  120. package/src/components/EnabledStatusIcon.tsx +54 -0
  121. package/src/components/HashValueDisplay.tsx +85 -0
  122. package/src/components/HotUpdaterLogo.tsx +30 -0
  123. package/src/components/NotFoundPage.tsx +33 -0
  124. package/src/components/PlatformIcon.tsx +39 -0
  125. package/src/components/RolloutPercentageBadge.tsx +28 -0
  126. package/src/components/ThemeProvider.tsx +116 -0
  127. package/src/components/TimestampDisplay.tsx +41 -0
  128. package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
  129. package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
  130. package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
  131. package/src/components/features/bundles/BundleInsightsSummary.tsx +123 -0
  132. package/src/components/features/bundles/BundleMetadata.tsx +136 -0
  133. package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
  134. package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
  135. package/src/components/features/insights/ActivityChart.tsx +150 -0
  136. package/src/components/features/insights/BundleDistribution.tsx +133 -0
  137. package/src/components/features/insights/BundleSelector.tsx +114 -0
  138. package/src/components/features/insights/InsightsCapabilityContext.tsx +24 -0
  139. package/src/components/features/insights/InsightsControls.tsx +115 -0
  140. package/src/components/features/insights/InsightsErrorAlert.tsx +21 -0
  141. package/src/components/features/insights/InsightsOverview.tsx +208 -0
  142. package/src/components/features/insights/InstallationHistoryCard.tsx +248 -0
  143. package/src/components/features/insights/InstallationMatchesCard.tsx +132 -0
  144. package/src/components/features/insights/InstallationPageHeader.tsx +138 -0
  145. package/src/components/features/insights/InstallationPagination.tsx +48 -0
  146. package/src/components/features/insights/InstallationSearch.tsx +230 -0
  147. package/src/components/features/insights/UpdateOutcomes.tsx +147 -0
  148. package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
  149. package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
  150. package/src/components/features/signing/BundleSigningPage.tsx +139 -0
  151. package/src/components/ui/alert-dialog.tsx +185 -0
  152. package/src/components/ui/alert.tsx +76 -0
  153. package/src/components/ui/badge.tsx +49 -0
  154. package/src/components/ui/button.tsx +58 -0
  155. package/src/components/ui/card.tsx +89 -0
  156. package/src/components/ui/chart.tsx +371 -0
  157. package/src/components/ui/combobox.tsx +303 -0
  158. package/src/components/ui/dialog.tsx +156 -0
  159. package/src/components/ui/dropdown-menu.tsx +270 -0
  160. package/src/components/ui/field.tsx +235 -0
  161. package/src/components/ui/input-group.tsx +147 -0
  162. package/src/components/ui/input.tsx +19 -0
  163. package/src/components/ui/label.tsx +25 -0
  164. package/src/components/ui/progress.tsx +84 -0
  165. package/src/components/ui/select.tsx +205 -0
  166. package/src/components/ui/separator.tsx +23 -0
  167. package/src/components/ui/sheet.tsx +132 -0
  168. package/src/components/ui/sidebar.tsx +779 -0
  169. package/src/components/ui/skeleton.tsx +13 -0
  170. package/src/components/ui/slider.tsx +56 -0
  171. package/src/components/ui/sonner.tsx +45 -0
  172. package/src/components/ui/switch.tsx +25 -0
  173. package/src/components/ui/table.tsx +114 -0
  174. package/src/components/ui/textarea.tsx +18 -0
  175. package/src/components/ui/toggle-group.tsx +89 -0
  176. package/src/components/ui/toggle.tsx +43 -0
  177. package/src/components/ui/tooltip.tsx +66 -0
  178. package/src/hooks/use-mobile.ts +30 -0
  179. package/src/index.ts +47 -0
  180. package/src/lib/api-keys-api.ts +69 -0
  181. package/src/lib/api-keys-rpc.ts +87 -0
  182. package/src/lib/api-rpc.ts +478 -0
  183. package/src/lib/api.ts +444 -0
  184. package/src/lib/auth-rpc.ts +16 -0
  185. package/src/lib/bundle-signing-api.ts +14 -0
  186. package/src/lib/bundle-signing-rpc.ts +16 -0
  187. package/src/lib/constants.ts +1 -0
  188. package/src/lib/git.ts +51 -0
  189. package/src/lib/insights-api.ts +144 -0
  190. package/src/lib/insights-error.ts +19 -0
  191. package/src/lib/insights-input.ts +187 -0
  192. package/src/lib/insights-overview.ts +170 -0
  193. package/src/lib/insights-rpc.ts +218 -0
  194. package/src/lib/server/auth.server.ts +43 -0
  195. package/src/lib/server/bundle-signing.server.ts +23 -0
  196. package/src/lib/server/config.server.ts +109 -0
  197. package/src/lib/server/console-runtime.server.ts +61 -0
  198. package/src/lib/server/deleteBundle.ts +145 -0
  199. package/src/lib/server/downloadBundle.ts +46 -0
  200. package/src/lib/server/getBundleChildren.ts +130 -0
  201. package/src/lib/server/listReleases.ts +61 -0
  202. package/src/lib/server/releaseActivity.ts +27 -0
  203. package/src/lib/server/releaseReachability.ts +95 -0
  204. package/src/lib/server/runtime.server.ts +172 -0
  205. package/src/lib/utils.ts +9 -0
  206. package/src/logo.svg +1 -0
  207. package/src/routeTree.gen.ts +199 -0
  208. package/src/router.tsx +21 -0
  209. package/src/routes/-installations-search.ts +19 -0
  210. package/src/routes/-releases-search.ts +74 -0
  211. package/src/routes/__root.tsx +174 -0
  212. package/src/routes/api/auth/$.ts +19 -0
  213. package/src/routes/api/bundles/$bundleId/download.ts +17 -0
  214. package/src/routes/api-keys.tsx +37 -0
  215. package/src/routes/index.tsx +982 -0
  216. package/src/routes/insights.tsx +139 -0
  217. package/src/routes/installations.tsx +194 -0
  218. package/src/routes/signing.tsx +37 -0
  219. package/src/styles.css +152 -0
  220. package/src/virtual-modules.d.ts +21 -0
  221. package/src/vite-env.d.ts +1 -0
  222. package/src/vite-internal.ts +195 -0
  223. package/src/vite.ts +12 -0
  224. package/.output/public/assets/dist-DJX53faP.js +0 -3
  225. package/.output/public/assets/index-Iylis5kY.js +0 -10
  226. package/.output/public/assets/routes-HT21hs0C.js +0 -54
  227. package/.output/public/assets/styles-C0Re4quB.css +0 -2
  228. package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
  229. package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
  230. package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
  231. package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
  232. package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
  233. package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
  234. package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
  235. package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
  236. package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
  237. package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
  238. package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
  239. package/.output/server/_libs/radix-ui__number.mjs +0 -6
  240. package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
  241. package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
  242. package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
  243. package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
  244. package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
  245. package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
  246. package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
  247. package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
  248. package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
  249. package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
  250. package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
  251. package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
  252. package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
  253. package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
  254. package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
  255. package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
  256. package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
  257. package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
  258. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  259. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  260. package/.output/server/node_modules/tslib/package.json +0 -47
  261. package/.output/server/node_modules/tslib/tslib.js +0 -484
  262. package/.output/server/package.json +0 -9
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2026-08-30T13:36:19.847Z",
2
+ "date": "2026-08-31T11:14:20.976Z",
3
3
  "preset": "node-server",
4
4
  "framework": {
5
5
  "name": "nitro",
@@ -0,0 +1 @@
1
+ import{Dn as e,ir as t}from"./createServerFn-gM2-LFBy.js";var n=t();function r({bundleId:t,className:r}){return(0,n.jsx)(`span`,{translate:`no`,className:e(`break-all font-mono text-xs tabular-nums`,r),children:t})}export{r as t};
@@ -0,0 +1 @@
1
+ import{Lr as e,Pr as t,ir as n}from"./createServerFn-gM2-LFBy.js";var r=e(t(),1),i=r.use,a=typeof window<`u`?r.useLayoutEffect:r.useEffect;function o(e){let t=r.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function s(e,t,n={},i={}){r.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!=`function`)return;let r=new IntersectionObserver(([e])=>{t(e)},n);return r.observe(e.current),()=>{r.disconnect()}},[t,n,i.disabled,e])}function c(e){let t=r.useRef(null);return r.useImperativeHandle(e,()=>t.current,[]),t}var l=r.createContext(null);function u(e){return r.useContext(l)}function d(e){let t=u();return r.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var f=n(),p=(0,r.createContext)({status:`unresolved`});function m({children:e,value:t}){return(0,f.jsx)(p.Provider,{value:t,children:e})}var h=()=>(0,r.useContext)(p);export{l as a,s as c,u as i,a as l,h as n,i as o,d as r,c as s,m as t,o as u};
@@ -0,0 +1 @@
1
+ import{Dr as e,Qn as t,rr as n,t as r,tr as i,wr as a}from"./createServerFn-gM2-LFBy.js";import{t as o}from"./useMutation-JsGVjQMY.js";var s=t(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),c=r({method:`GET`}).handler(a(`29665ce3a33cde2eb2ee082694288db269438f62f3a4d0a005dec3256e0f15c1`)),l=r({method:`GET`}).handler(a(`2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b`)),u=r({method:`POST`}).handler(a(`68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b`)),d=r({method:`POST`}).handler(a(`a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795`)),f={capability:[`api-keys`,`capability`],list:[`api-keys`,`list`]},p=()=>({queryKey:f.capability,queryFn:()=>c(),staleTime:1/0}),m=()=>i(p()),h=async t=>{if(!(await t.ensureQueryData(p())).apiKeys)throw e({to:`/`,search:{},replace:!0})},g=()=>i({queryKey:f.list,queryFn:()=>l()}),_=()=>{let e=n();return o({mutationFn:e=>u({data:{name:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:f.list})}})},v=()=>{let e=n();return o({mutationFn:e=>d({data:{id:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:f.list})}})};export{v as a,_ as i,m as n,s as o,g as r,h as t};
@@ -0,0 +1 @@
1
+ import{Lr as e,Pr as t,Qn as n,Sn as r,Tn as i,Zn as a,ir as o,m as s,wn as c}from"./createServerFn-gM2-LFBy.js";import{a as l,c as u,i as d,n as f,r as ee,t as p}from"./field-Buq148-A.js";import{a as m,i as h,o as g,r as _}from"./api-keys-api-DGVTTvTJ.js";import{n as v,r as y}from"./dist-Bssh_cv0.js";import{T as b,_ as x,a as S,d as C,f as te,g as ne,h as w,i as T,l as E,m as D,n as O,o as k,p as A,r as j,t as M,u as N,v as P}from"./dialog-BeAENgez.js";import{t as F}from"./refresh-cw-BkbfZ62O.js";import{a as I,c as L,l as R,n as re,o as z,s as B,t as V,u as H}from"./card-DzuEXvyJ.js";import{t as U}from"./badge-Br_KDO0J.js";import{a as W,i as G,n as K,o as q,r as J,t as Y}from"./table-RamFEclP.js";var X=n(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),Z=n(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),Q=e(t(),1),$=o(),ie=e=>new Date(e).toISOString().slice(0,10);function ae(){let[e,t]=(0,Q.useState)(!1),[n,r]=(0,Q.useState)(``),[a,o]=(0,Q.useState)(null),s=h(),m=n.trim(),_=m.length>64?`Name must be 64 characters or fewer.`:null,x=()=>{r(``),o(null),s.reset()},C=e=>{t(e),e||x()};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(i,{onClick:()=>t(!0),children:[(0,$.jsx)(b,{"data-icon":`inline-start`}),`Create API key`]}),(0,$.jsx)(M,{open:e,onOpenChange:C,children:(0,$.jsxs)(O,{showCloseButton:a===null,children:[(0,$.jsxs)(S,{children:[(0,$.jsx)(k,{children:a===null?`Create API key`:`Save your API key`}),(0,$.jsx)(j,{children:a===null?`Name the app or environment that will use this key.`:`This key is shown once. Store it securely before closing.`})]}),a===null?(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(m.length===0||_!==null))try{o((await s.mutateAsync(m)).apiKey),v.success(`API key created`)}catch(e){v.error(e instanceof Error?e.message:`Unable to create API key`)}},children:[(0,$.jsx)(d,{children:(0,$.jsxs)(p,{"data-invalid":_!==null||void 0,children:[(0,$.jsx)(l,{htmlFor:`api-key-name`,children:`Name`}),(0,$.jsx)(c,{id:`api-key-name`,autoComplete:`off`,maxLength:65,onChange:e=>r(e.target.value),placeholder:`Production app`,value:n}),(0,$.jsx)(f,{children:`Use a name you can identify before revoking the key.`}),(0,$.jsx)(ee,{children:_})]})}),(0,$.jsx)(T,{className:`mt-4`,children:(0,$.jsxs)(i,{disabled:s.isPending||m.length===0||_!==null,type:`submit`,children:[s.isPending?(0,$.jsx)(y,{"data-icon":`inline-start`,className:`animate-spin`}):(0,$.jsx)(g,{"data-icon":`inline-start`}),`Create API key`]})})]}):(0,$.jsxs)(d,{children:[(0,$.jsxs)(p,{children:[(0,$.jsx)(l,{htmlFor:`created-api-key`,children:`API key`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(c,{id:`created-api-key`,className:`font-mono`,readOnly:!0,value:a}),(0,$.jsxs)(i,{onClick:async()=>{if(a!==null)try{await navigator.clipboard.writeText(a),v.success(`API key copied`)}catch{v.error(`Unable to copy API key`)}},type:`button`,variant:`outline`,children:[(0,$.jsx)(X,{"data-icon":`inline-start`}),`Copy`]})]})]}),(0,$.jsx)(T,{children:(0,$.jsxs)(i,{onClick:()=>C(!1),children:[(0,$.jsx)(u,{"data-icon":`inline-start`}),`Done`]})})]})]})})]})}function oe({record:e}){let[t,n]=(0,Q.useState)(!1),r=m(),a=async t=>{t.preventDefault();try{await r.mutateAsync(e.id),n(!1),v.success(`API key revoked`)}catch(e){v.error(e instanceof Error?e.message:`Unable to revoke API key`)}};return(0,$.jsxs)(E,{open:t,onOpenChange:e=>{r.isPending||n(e)},children:[(0,$.jsxs)(P,{render:(0,$.jsx)(i,{size:`sm`,variant:`ghost`}),children:[(0,$.jsx)(Z,{"data-icon":`inline-start`}),`Revoke`]}),(0,$.jsxs)(te,{children:[(0,$.jsxs)(w,{children:[(0,$.jsx)(ne,{children:(0,$.jsx)(Z,{})}),(0,$.jsxs)(x,{children:[`Revoke `,e.name,`?`]}),(0,$.jsxs)(A,{children:[`Apps using `,e.prefix,`… will immediately lose OTA update and insights access. This action cannot be undone.`]})]}),(0,$.jsxs)(D,{children:[(0,$.jsx)(C,{disabled:r.isPending,children:`Cancel`}),(0,$.jsx)(N,{disabled:r.isPending,onClick:e=>void a(e),variant:`destructive`,children:`Revoke API key`})]})]})]})}function se(){let e=_();return(0,$.jsxs)(V,{className:`overflow-hidden shadow-sm`,children:[(0,$.jsxs)(I,{className:`flex-row items-center justify-between space-y-0 border-b px-4 py-3`,children:[(0,$.jsx)(z,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`API keys`})}),(0,$.jsx)(ae,{})]}),(0,$.jsx)(re,{className:`p-0`,children:e.isError?(0,$.jsx)(`div`,{className:`p-4`,children:(0,$.jsxs)(B,{variant:`destructive`,children:[(0,$.jsx)(a,{}),(0,$.jsx)(H,{children:`API keys couldn't be loaded`}),(0,$.jsx)(R,{children:`Check your connection and try again.`}),(0,$.jsx)(L,{children:(0,$.jsxs)(i,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,$.jsx)(F,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,$.jsxs)(Y,{"aria-label":`API keys`,className:`table-fixed`,children:[(0,$.jsx)(W,{children:(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:`Key`}),(0,$.jsx)(G,{className:`w-32`,children:`Created`}),(0,$.jsx)(G,{className:`w-24 text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(K,{children:e.isLoading?Array.from({length:3},(e,t)=>(0,$.jsxs)(q,{children:[(0,$.jsxs)(J,{className:`space-y-2 py-3`,children:[t===0?(0,$.jsx)(`span`,{className:`sr-only`,children:`Loading API keys`}):null,(0,$.jsx)(r,{className:`h-3.5 w-32`}),(0,$.jsx)(r,{className:`h-3 w-20`})]}),(0,$.jsx)(J,{children:(0,$.jsx)(r,{className:`h-3.5 w-20`})}),(0,$.jsx)(J,{children:(0,$.jsx)(r,{className:`ml-auto h-6 w-16`})})]},t)):e.data?.length===0?(0,$.jsx)(q,{children:(0,$.jsx)(J,{colSpan:3,className:`h-40 text-center text-muted-foreground`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex max-w-xs flex-col items-center gap-2`,children:[(0,$.jsx)(g,{className:`size-5`}),(0,$.jsx)(`p`,{className:`font-medium text-foreground`,children:`No API keys`}),(0,$.jsx)(`p`,{children:`Create an API key to connect an app.`})]})})}):e.data?.map(e=>(0,$.jsxs)(q,{className:e.revoked_at_ms===null?void 0:`text-muted-foreground`,children:[(0,$.jsx)(J,{className:`whitespace-normal py-3`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`p`,{className:`break-words font-medium text-foreground`,children:e.name}),(0,$.jsxs)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:[e.prefix,`…`]})]})}),(0,$.jsx)(J,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(`time`,{dateTime:new Date(e.created_at_ms).toISOString(),children:ie(e.created_at_ms)})}),(0,$.jsx)(J,{className:`text-right`,children:e.revoked_at_ms===null?(0,$.jsx)(oe,{record:e}):(0,$.jsx)(U,{variant:`outline`,children:`Revoked`})})]},e.id))})]})})]})}function ce(){return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,$.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,$.jsx)(s,{className:`-ml-1`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(g,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`API keys`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`API keys can download OTA updates and submit insights only.`})]}),(0,$.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-5xl`,children:(0,$.jsx)(se,{})})})]})}export{ce as component};
@@ -0,0 +1 @@
1
+ import{Dn as e,Vn as t,Xn as n,zn as r}from"./createServerFn-gM2-LFBy.js";var i=r(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function a({className:r,variant:a=`default`,render:o,...s}){return t({defaultTagName:`span`,props:n({className:e(i({variant:a}),r)},s),render:o,state:{slot:`badge`,variant:a}})}export{a as t};
@@ -0,0 +1 @@
1
+ import{Dn as e,Pr as t,ir as n,zn as r}from"./createServerFn-gM2-LFBy.js";t();var i=n(),a=r(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs/relaxed has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function o({className:t,variant:n,...r}){return(0,i.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:e(a({variant:n}),t),...r})}function s({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`alert-title`,className:e(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t),...n})}function c({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`alert-description`,className:e(`text-xs/relaxed text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,t),...n})}function l({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`alert-action`,className:e(`absolute top-1.5 right-2`,t),...n})}function u({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`card`,className:e(`rounded-xl border bg-card text-card-foreground shadow`,t),...n})}function d({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-header`,className:e(`flex flex-col space-y-1.5 p-6`,t),...n})}function f({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-title`,className:e(`font-semibold leading-none tracking-tight`,t),...n})}function p({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-description`,className:e(`text-sm text-muted-foreground`,t),...n})}function m({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-content`,className:e(`p-6 pt-0`,t),...n})}function h({className:t,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-footer`,className:e(`flex items-center p-6 pt-0`,t),...n})}export{d as a,l as c,h as i,c as l,m as n,f as o,p as r,o as s,u as t,s as u};
@@ -0,0 +1 @@
1
+ import{Qn as e}from"./createServerFn-gM2-LFBy.js";var t=e(`chart-no-axes-combined`,[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14v7`,key:`1g90b9`}],[`path`,{d:`M20 10v11`,key:`1iqoj0`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18v3`,key:`1yp0dc`}],[`path`,{d:`M8 14v7`,key:`n3cwzv`}]]);export{t};