@hot-updater/console 1.2.0-rc.4 → 1.2.0-rc.41
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.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/-native-builds-search-BFcW2mlI.js +1 -0
- package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +1 -0
- package/.output/public/assets/ChannelBadge-BgVCJfJs.js +1 -0
- package/.output/public/assets/ChannelPicker-BQKoyxnf.js +1 -0
- package/.output/public/assets/CompositeItem-B7uxFM46.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-B3VCINom.js} +1 -1
- package/.output/public/assets/EventDetails-CWiI1CXb.js +1 -0
- package/.output/public/assets/HashValueDisplay-DvwvQchI.js +1 -0
- package/.output/public/assets/InsightsPageHeader-BjUAikRe.js +1 -0
- package/.output/public/assets/IosInstall-B5IdjCP2.js +1 -0
- package/.output/public/assets/NativeBuildsNav-BKdnlKMN.js +1 -0
- package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-BEpesHEm.js} +1 -1
- package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-D4KPXCHL.js} +1 -1
- package/.output/public/assets/QrCode-BFSCkbPj.js +1 -0
- package/.output/public/assets/RelativeTime-5ZP9WlQ6.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-DCtG7c1o.js +1 -0
- package/.output/public/assets/RowReason-CXMCJ-Jc.js +1 -0
- package/.output/public/assets/SandboxBadge-PM92jCk6.js +1 -0
- package/.output/public/assets/TargetDisplay-DG_I3qln.js +1 -0
- package/.output/public/assets/alert-dialog-DGPqJBCk.js +1 -0
- package/.output/public/assets/api-eO-sq3Jd.js +1 -0
- package/.output/public/assets/api-keys-CAVLgicI.js +1 -0
- package/.output/public/assets/api-keys-ztwXoKcj.js +1 -0
- package/.output/public/assets/arrow-left-68S4uy4I.js +1 -0
- package/.output/public/assets/arrow-right-DjRwIoF1.js +1 -0
- package/.output/public/assets/arrow-up-right-C_1ALUCD.js +1 -0
- package/.output/public/assets/badge-zMibJGR5.js +1 -0
- package/.output/public/assets/card-BAs80yql.js +1 -0
- package/.output/public/assets/check-C3VCvMOV.js +1 -0
- package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
- package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-DvYMC5yF.js} +1 -1
- package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-D0JWZ1KF.js} +1 -1
- package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-CtbGqKyr.js} +1 -1
- package/.output/public/assets/{uuidv7-zXMtwR9Q.js → constants-C5gi7fdZ.js} +1 -1
- package/.output/public/assets/{copy-DsuLj3oj.js → copy-BjVLMKbo.js} +1 -1
- package/.output/public/assets/dialog-BvZDZzdQ.js +1 -0
- package/.output/public/assets/dist-BEmib-ZM.js +1 -0
- package/.output/public/assets/{download-Cf24LBde.js → download-CgpaZb23.js} +1 -1
- package/.output/public/assets/empty-C5GqArX9.js +1 -0
- package/.output/public/assets/field-DInLQ5oV.js +1 -0
- package/.output/public/assets/git-branch-BGatQV8Q.js +1 -0
- package/.output/public/assets/history-Ci4dhphE.js +1 -0
- package/.output/public/assets/index-Ck4fZq4M.js +10 -0
- package/.output/public/assets/input-group-CIjTdxCW.js +1 -0
- package/.output/public/assets/insights-V3D8tYPQ.js +1 -0
- package/.output/public/assets/insights-api-D4-FZeEI.js +1 -0
- package/.output/public/assets/insights-fSY6n4k3.js +42 -0
- package/.output/public/assets/insights-osTmFzzR.js +2 -0
- package/.output/public/assets/insights-search-CZtvD-Vf.js +1 -0
- package/.output/public/assets/insights-usage-rpc-Dw5_pmRH.js +1 -0
- package/.output/public/assets/insights_.distribution-Cws8lYLC.js +1 -0
- package/.output/public/assets/insights_.distribution-DpppHhaU.js +2 -0
- package/.output/public/assets/insights_.distribution-oIFSv2TC.js +1 -0
- package/.output/public/assets/installations-Byojb0Rv.js +2 -0
- package/.output/public/assets/installations-CFGDrY-W.js +1 -0
- package/.output/public/assets/installations-CcPrSZwW.js +1 -0
- package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-BkeLvA1m.js} +1 -1
- package/.output/public/assets/{link-DTEyW70e.js → link-CRMwpc7-.js} +2 -2
- package/.output/public/assets/{list--NIee1FZ.js → list-DQ9YBIDW.js} +1 -1
- package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
- package/.output/public/assets/native-builds-C4u6JvxV.js +2 -0
- package/.output/public/assets/native-builds-D9hoJd6W.js +1 -0
- package/.output/public/assets/native-builds-zwqucwx2.js +1 -0
- package/.output/public/assets/native-builds_._buildId-CXx2xjoI.js +1 -0
- package/.output/public/assets/native-builds_._buildId-DymsEZlO.js +2 -0
- package/.output/public/assets/native-builds_.devices-DF3g--dt.js +1 -0
- package/.output/public/assets/native-builds_.devices-QToUV8FB.js +2 -0
- package/.output/public/assets/plus-DztQIXYL.js +1 -0
- package/.output/public/assets/preload-helper-CE9OukVC.js +1 -0
- package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-RUNbaMyO.js} +1 -1
- package/.output/public/assets/remote-config-BIIj0Faf.js +1 -0
- package/.output/public/assets/remote-config-BJJAxy_g.js +6 -0
- package/.output/public/assets/remote-config-Dm1MCHDN.js +1 -0
- package/.output/public/assets/rotate-ccw-tITIe0Bd.js +1 -0
- package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-BFQcpUTO.js} +1 -1
- package/.output/public/assets/routes-9gxYg__u.js +1 -0
- package/.output/public/assets/routes-CUsayL0T.js +2 -0
- package/.output/public/assets/search-BfEqtE64.js +1 -0
- package/.output/public/assets/select-Bk52fOVX.js +1 -0
- package/.output/public/assets/sidebar-BmzmPGuv.js +3 -0
- package/.output/public/assets/smartphone-Dy13ukaU.js +1 -0
- package/.output/public/assets/styles-C1iqL6CR.css +2 -0
- package/.output/public/assets/switch-CI393qIT.js +1 -0
- package/.output/public/assets/table-DbZPkzdz.js +1 -0
- package/.output/public/assets/tabs-BnpNC0zf.js +1 -0
- package/.output/public/assets/trash-2-DI0biNI-.js +1 -0
- package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CxhBbgJw.js} +1 -1
- package/.output/public/assets/useAnchoredPopupScrollLock-Cvx6CdPD.js +1 -0
- package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-Cbk_weKW.js} +1 -1
- package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-D7IuoOLE.js} +1 -1
- package/.output/public/assets/valueToPercent-Db73Kirz.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-X9YQcrQI.mjs → __23tanstack-start-server-fn-resolver-76SKGuoc.mjs} +94 -46
- package/.output/server/_chunks/ssr-renderer.mjs +2 -2
- package/.output/server/_libs/@base-ui/react+[...].mjs +4436 -3131
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
- package/.output/server/_libs/_.mjs +2 -0
- package/.output/server/_libs/lucide-react.mjs +34 -28
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +1 -1
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +1 -1
- package/.output/server/_ssr/-native-builds-search-Bwt8tQzp.mjs +55 -0
- package/.output/server/_ssr/{BundleIdDisplay-BVrZXzTm.mjs → BundleIdDisplay-By3CbbRM.mjs} +3 -3
- package/.output/server/_ssr/ChannelBadge-CDup7l56.mjs +23 -0
- package/.output/server/_ssr/ChannelPicker-Du2TmP3P.mjs +251 -0
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-CULyV3nR.mjs → ConsoleFeatureUnavailable-C6aGoKDE.mjs} +8 -8
- package/.output/server/_ssr/{EventDetails-DeI1rOQc.mjs → EventDetails-VbcnMnSs.mjs} +9 -9
- package/.output/server/_ssr/{HashValueDisplay-DpnPD3U2.mjs → HashValueDisplay-CnC2fHER.mjs} +7 -7
- package/.output/server/_ssr/{InsightsPageHeader-Dwmdtelg.mjs → InsightsPageHeader-BuOanVZL.mjs} +13 -13
- package/.output/server/_ssr/IosInstall-BAFhW7Q9.mjs +751 -0
- package/.output/server/_ssr/NativeBuildsNav-BoTu4aLF.mjs +38 -0
- package/.output/server/_ssr/{NotFoundPage-Dddp1HSc.mjs → NotFoundPage-Bz05xF5Q.mjs} +3 -3
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-C22qEcwo.mjs} +13 -3
- package/.output/server/_ssr/QrCode-DWshAW81.mjs +50 -0
- package/.output/server/_ssr/RelativeTime-D5kDQVn1.mjs +242 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-Dwx7dEeQ.mjs} +20 -4
- package/.output/server/_ssr/RowReason-pVOWQ7t5.mjs +186 -0
- package/.output/server/_ssr/SandboxBadge-DFbUYwhO.mjs +85 -0
- package/.output/server/_ssr/TargetDisplay-BtE5vntq.mjs +105 -0
- package/.output/server/_ssr/{alert-dialog-ei2c1b6A.mjs → alert-dialog-tcfkkNUX.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-CVi7E0qS.mjs → api-keys-12_U0SQM.mjs} +14 -11
- package/.output/server/_ssr/{api-keys-BLHCygD_.mjs → api-keys-Bm8uDp2u.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-CLZsTwih.mjs → api-keys-rpc-BxkfToWI.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-p-7EhGIG.mjs → api-rpc-TSnLWB7e.mjs} +83 -35
- package/.output/server/_ssr/{api-CvwqILEx.mjs → api-xOHZxbzu.mjs} +174 -37
- package/.output/server/_ssr/{auth-rpc-B1W4-hxa.mjs → auth-rpc-D3w54vsW.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-CVKs7SWJ.mjs → auth.server-a2eP6q5P.mjs} +952 -186
- package/.output/server/_ssr/{badge-nS9EbEA0.mjs → badge-DrfbN1n0.mjs} +4 -45
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
- package/.output/server/_ssr/card-DEItjgKG.mjs +49 -0
- package/.output/server/_ssr/{config.server-BAdvotbH.mjs → config.server-K8dd4dRv.mjs} +4 -4
- package/.output/server/_ssr/{console-access-BiuC2QFp.mjs → console-access-D-DHU4YH.mjs} +2 -2
- package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-DTYyXrWO.mjs} +1 -1
- package/.output/server/_ssr/{console-features-api-FvbqhbTg.mjs → console-features-api-Chy2PrzZ.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-Cl3J66aP.mjs → console-features-rpc-_31L0k1i.mjs} +4 -4
- package/.output/server/_ssr/constants-BjsJZqaU.mjs +10 -0
- package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
- package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-B56IJxlu.mjs} +1 -1
- package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
- package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BZMFl5QV.mjs} +3 -3
- package/.output/server/_ssr/deviceProfileToken-xzDLfE0T.mjs +98 -0
- package/.output/server/_ssr/{dialog-GmTPeUS4.mjs → dialog-SAl1vP74.mjs} +5 -5
- package/.output/server/_ssr/dist-CiOq3ygH.mjs +148 -0
- package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-C1KOnpiF.mjs} +1 -1
- package/.output/server/_ssr/{empty-CXWKv24M.mjs → empty-opJc9Fjw.mjs} +3 -3
- package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
- package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BVufgM3l.mjs} +3 -3
- package/.output/server/_ssr/{field-lwIHAwLc.mjs → field-D6Y7zDZd.mjs} +3 -3
- package/.output/server/_ssr/foldedPage-CUjJqtlF.mjs +176 -0
- package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CnOf4Frp.mjs} +2 -2
- package/.output/server/_ssr/{input-group-Dgr4DNbE.mjs → input-group-D2PvPRdm.mjs} +3 -3
- package/.output/server/_ssr/{insights-BxtyBLt0.mjs → insights-Cro4cYp7.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-PN_9ilr8.mjs → insights-api-BPyvQert.mjs} +5 -5
- package/.output/server/_ssr/{insights-DSnQTQw1.mjs → insights-dWeLneo1.mjs} +45 -191
- package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-Cxu3UtyB.mjs → insights-failures-rpc-D7M8-Et9.mjs} +11 -11
- package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc--c6kBp3k.mjs → insights-recovery-rpc-BUMK4m4H.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-oTMaAqc1.mjs → insights-rpc-BZZ4U2Ll.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-r-Z50f0Y.mjs → insights-search-Czi553oN.mjs} +6 -8
- package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-DoElOI5b.mjs → insights-usage-rpc-BXvUr-z6.mjs} +7 -7
- package/.output/server/_ssr/{insights-usage-rpc-B00vjt0a.mjs → insights-usage-rpc-HOr6mniz.mjs} +5 -5
- package/.output/server/_ssr/{insights-B9NvjAWc.mjs → insights-vmCmvfXx.mjs} +5 -5
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-CnYddZ2Y.mjs → insights_.distribution-B2dxcCd_.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-mpZ0wS_R.mjs → insights_.distribution-B5V_NbK4.mjs} +17 -16
- package/.output/server/_ssr/{insights_.distribution-B8AMBp-Q.mjs → insights_.distribution-DongF2jp.mjs} +5 -5
- package/.output/server/_ssr/{installations-BfhcY_XQ.mjs → installations-B7w4LGJp.mjs} +4 -4
- package/.output/server/_ssr/{installations-CWTRzcR7.mjs → installations-B84kSetd.mjs} +2 -2
- package/.output/server/_ssr/{installations-O6Jzc5PO.mjs → installations-bieZA3xt.mjs} +13 -13
- package/.output/server/_ssr/ios-devices-rpc-DOQg4dpb.mjs +137 -0
- package/.output/server/_ssr/iosDeviceCookie-DhWNFpC6.mjs +155 -0
- package/.output/server/_ssr/iosDeviceProfile-jC8w4zEF.mjs +176 -0
- package/.output/server/_ssr/iosDevices-B4kQLURA.mjs +113 -0
- package/.output/server/_ssr/listReleases-QF91GLE7.mjs +94 -0
- package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
- package/.output/server/_ssr/native-artifact-D4ZISXRZ.mjs +1517 -0
- package/.output/server/_ssr/native-builds-BU9Njiwm.mjs +696 -0
- package/.output/server/_ssr/native-builds-lEyKQemV.mjs +262 -0
- package/.output/server/_ssr/{native-builds-UIgRLMb8.mjs → native-builds-zpCsEYyA.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-DjUqI5sa.mjs → native-builds_._buildId-BJ4R32fq.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-RHUotAYb.mjs +1148 -0
- package/.output/server/_ssr/native-builds_.devices-C0IlQkLv.mjs +10 -0
- package/.output/server/_ssr/native-builds_.devices-D1Ke-Fc-.mjs +820 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-MCd5xUqP.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-DcsqDS-O.mjs +253 -0
- package/.output/server/_ssr/nativeBuilds-CRa36wNn.mjs +287 -0
- package/.output/server/_ssr/plistText-DkzlCfPI.mjs +15 -0
- package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-D9CCkDjn.mjs} +7 -6
- package/.output/server/_ssr/publicConsoleBase-wTKw3_iB.mjs +15 -0
- package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-gfhE5tz5.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-PLyiDnas.mjs → release-adoption-rpc-C4G_d8qK.mjs} +9 -9
- package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-DfEYq7I4.mjs} +4 -4
- package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-CJ2Shida.mjs} +4 -3
- package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-CqIc-SDE.mjs} +1 -1
- package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-Ch1JpJkY.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-C5j4CfGa.mjs → remote-config-1QZ0HgEu.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-eNxv5Kzc.mjs → remote-config-CsbpqWAR.mjs} +24 -23
- package/.output/server/_ssr/{remote-config-tOdzsFMi.mjs → remote-config-DkgBxBka.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-Cy4VwdMt.mjs → remote-config-rpc-KjJA9DC-.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-DaQ6OkIp.mjs → router-Dy3fmb8q.mjs} +137 -64
- package/.output/server/_ssr/{routes-Drni4c1E.mjs → routes-68rZQGee.mjs} +470 -474
- package/.output/server/_ssr/{routes-BYmUIYfN.mjs → routes-Ug9uqzob.mjs} +50 -18
- package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BUbb281Z.mjs} +4 -4
- package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-CaIuQCXb.mjs} +1 -1
- package/.output/server/_ssr/{schema-migration-rpc-mZ_19Wt_.mjs → schema-migration-rpc-kntY9oPm.mjs} +4 -4
- package/.output/server/_ssr/{select-Cjrp1Sl9.mjs → select-BOKFFr_G.mjs} +12 -10
- package/.output/server/_ssr/{server-y3KoaSil.mjs → server-DetMvRBJ.mjs} +7 -7
- package/.output/server/_ssr/{sidebar-tRHVNWpo.mjs → sidebar-B46houn0.mjs} +17 -10
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BvDsQehg.mjs → start-BSkL2B6C.mjs} +2 -2
- package/.output/server/_ssr/{switch-YrqCYfP-.mjs → switch-BMYzd71j.mjs} +4 -4
- package/.output/server/_ssr/{table-NHakBPSp.mjs → table-DWrYwJ_a.mjs} +2 -2
- package/.output/server/_ssr/tabs-DusHAcYy.mjs +45 -0
- package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-BwDwIoNu.mjs} +3 -3
- package/.output/server/_ssr/{dist-TEpM_UAD.mjs → uuid-kZvLA0Ly-DNL0qBSj.mjs} +2 -147
- package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-C0jNe2Om.mjs} +2 -2
- package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-zW2fpHOZ.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-CD1q5k0m.mjs +228 -0
- package/.output/server/index.mjs +503 -391
- package/lib/index.d.mts +9 -0
- package/package.json +7 -30
- package/src/components/AppSidebar.tsx +11 -2
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/ChannelPicker.tsx +227 -0
- package/src/components/DataTable.tsx +363 -0
- package/src/components/FoldedRows.tsx +219 -0
- package/src/components/HashValueDisplay.tsx +6 -3
- package/src/components/PlatformIcon.tsx +10 -0
- package/src/components/RelativeTime.tsx +31 -0
- package/src/components/RowReason.tsx +56 -0
- package/src/components/TargetDisplay.tsx +95 -0
- package/src/components/ThemeProvider.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +5 -3
- package/src/components/features/bundles/BundleMetadata.tsx +1 -1
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +10 -11
- package/src/components/features/insights/AppUsage.tsx +3 -5
- package/src/components/features/insights/FailureReports.tsx +3 -2
- package/src/components/features/insights/InsightsControls.tsx +10 -69
- package/src/components/features/insights/InsightsOverview.tsx +7 -1
- package/src/components/features/insights/InsightsPageHeader.tsx +10 -15
- package/src/components/features/insights/ReleaseActivity.tsx +6 -2
- package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
- package/src/components/features/insights/UpdateFailures.tsx +1 -0
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +122 -61
- package/src/components/features/native-builds/CommitLink.tsx +3 -2
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/InstallCard.tsx +316 -91
- package/src/components/features/native-builds/IosDevicesPage.tsx +1100 -0
- package/src/components/features/native-builds/IosInstall.tsx +732 -0
- package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +30 -6
- package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +94 -108
- package/src/components/features/native-builds/NativeBuildsTable.tsx +649 -323
- package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
- package/src/components/features/native-builds/PatchesCard.tsx +28 -19
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +5 -5
- package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
- package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
- package/src/components/features/native-builds/ShortHash.tsx +6 -3
- package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
- package/src/components/features/native-builds/playTracks.ts +7 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +8 -6
- package/src/components/features/remote-config/PublishDialog.tsx +4 -1
- package/src/components/features/remote-config/VersionsCard.tsx +5 -2
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/button.tsx +11 -2
- package/src/components/ui/combobox.tsx +2 -2
- package/src/components/ui/dialog.tsx +3 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/select.tsx +15 -7
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/sidebar.tsx +2 -2
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/sonner.tsx +3 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/index.ts +9 -0
- package/src/lib/api-rpc.ts +125 -35
- package/src/lib/api.ts +160 -16
- package/src/lib/constants.ts +15 -0
- package/src/lib/insights-search.ts +0 -3
- package/src/lib/ios-devices-api.ts +290 -0
- package/src/lib/ios-devices-rpc.ts +188 -0
- package/src/lib/native-builds.ts +261 -20
- package/src/lib/server/console-runtime.server.ts +9 -2
- package/src/lib/server/deviceProfileToken.ts +221 -0
- package/src/lib/server/foldedPage.ts +360 -0
- package/src/lib/server/iosDeviceCookie.ts +239 -0
- package/src/lib/server/iosDeviceProfile.ts +232 -0
- package/src/lib/server/iosDevices.ts +193 -0
- package/src/lib/server/listReleases.ts +101 -62
- package/src/lib/server/local-console.ts +1 -1
- package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
- package/src/lib/server/nativeBuildInstall.ts +502 -0
- package/src/lib/server/nativeBuilds.ts +314 -58
- package/src/lib/server/plistText.ts +17 -0
- package/src/lib/server/publicConsoleBase.ts +17 -0
- package/src/routeTree.gen.ts +129 -18
- package/src/routes/-native-builds-search.ts +52 -4
- package/src/routes/-releases-search.ts +63 -2
- package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
- package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
- package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
- package/src/routes/[_]hot-updater/devices/request.ts +28 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
- package/src/routes/api/native-builds/$buildId/download.ts +22 -1
- package/src/routes/index.tsx +657 -577
- package/src/routes/insights.tsx +3 -5
- package/src/routes/insights_.distribution.tsx +2 -2
- package/src/routes/native-builds_.devices.tsx +21 -0
- package/src/styles.css +24 -0
- package/.output/public/assets/-native-builds-search-C-TGpFAm.js +0 -1
- package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
- package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
- package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
- package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
- package/.output/public/assets/alert-dialog-BqYScr9y.js +0 -1
- package/.output/public/assets/api-P2g8dCNg.js +0 -1
- package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
- package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
- package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
- package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
- package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
- package/.output/public/assets/badge-DWFcDWho.js +0 -1
- package/.output/public/assets/check-CXVR3s3X.js +0 -1
- package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
- package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
- package/.output/public/assets/dist-CPlO6ko9.js +0 -1
- package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
- package/.output/public/assets/field-D-2-mnNh.js +0 -1
- package/.output/public/assets/history-DqHlgSuV.js +0 -1
- package/.output/public/assets/index-CqP5HPV6.js +0 -10
- package/.output/public/assets/input-group-D3OUBk4n.js +0 -1
- package/.output/public/assets/insights-B-0odqpt.js +0 -42
- package/.output/public/assets/insights-BSVGfxSL.js +0 -1
- package/.output/public/assets/insights-NK5B6ReS.js +0 -2
- package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
- package/.output/public/assets/insights-search-DghCbEnk.js +0 -1
- package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
- package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
- package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
- package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
- package/.output/public/assets/installations-B674P5Z5.js +0 -2
- package/.output/public/assets/installations-BWxczZ2t.js +0 -1
- package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
- package/.output/public/assets/native-builds-BOC71grI.js +0 -1
- package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
- package/.output/public/assets/native-builds-DAy2678K.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
- package/.output/public/assets/plus-BReVKct-.js +0 -1
- package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
- package/.output/public/assets/refresh-cw-B9HHjLej.js +0 -1
- package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
- package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
- package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
- package/.output/public/assets/routes-BDdBIxYS.js +0 -1
- package/.output/public/assets/routes-CCD33Azv.js +0 -2
- package/.output/public/assets/search-BCel4Oy6.js +0 -1
- package/.output/public/assets/select-CBIU0_M1.js +0 -1
- package/.output/public/assets/sidebar-Di9SN47G.js +0 -3
- package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/switch-BpdiHL_t.js +0 -1
- package/.output/public/assets/table-Bpy3SvSo.js +0 -1
- package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
- package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
- package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
- package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +0 -37
- package/.output/server/_ssr/RolloutPercentageBadge-CoBhJtv9.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-CPg_Rn5E.mjs +0 -139
- package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
- package/.output/server/_ssr/native-builds-BDcOlKnd.mjs +0 -510
- package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
- package/.output/server/_ssr/native-builds_._buildId-BjsdQO93.mjs +0 -813
- package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
- package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
- package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
- package/.output/server/_ssr/tabs-BgTTFotk.mjs +0 -45
- package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
- package/src/lib/server/nativeBuildQr.ts +0 -73
- package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
package/lib/index.d.mts
CHANGED
|
@@ -40,6 +40,15 @@ type HotUpdaterConsoleConfig = Readonly<{
|
|
|
40
40
|
console?: {
|
|
41
41
|
/** The Git repository whose commits the console links bundles to. */
|
|
42
42
|
gitUrl?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The signed-in emails that may approve iPhones and iPads for ad hoc
|
|
45
|
+
* builds, each of which the next build registers with your Apple account
|
|
46
|
+
* and spends one of its yearly device slots on. Left out or empty, nobody
|
|
47
|
+
* approves in this Console: approve from a terminal with
|
|
48
|
+
* `npx hot-updater native-build devices add`. The emails come from the
|
|
49
|
+
* Console's sign-in, so a custom auth adapter must supply verified ones.
|
|
50
|
+
*/
|
|
51
|
+
deviceApprovers?: readonly string[];
|
|
43
52
|
};
|
|
44
53
|
}>;
|
|
45
54
|
type HotUpdaterConsoleConfigSource = HotUpdaterConsoleConfig | ((request: Request) => HotUpdaterConsoleConfig | Promise<HotUpdaterConsoleConfig>);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/console",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.41",
|
|
5
5
|
"files": [
|
|
6
6
|
".output",
|
|
7
7
|
"lib",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"tw-animate-css": "^1.4.0",
|
|
60
60
|
"uqr": "^0.1.3",
|
|
61
61
|
"verkit": "0.4.0",
|
|
62
|
-
"@hot-updater/
|
|
63
|
-
"@hot-updater/
|
|
64
|
-
"@hot-updater/server": "1.2.0-rc.
|
|
65
|
-
"@hot-updater/
|
|
62
|
+
"@hot-updater/bsdiff": "1.2.0-rc.41",
|
|
63
|
+
"@hot-updater/protocol": "1.2.0-rc.41",
|
|
64
|
+
"@hot-updater/server": "1.2.0-rc.41",
|
|
65
|
+
"@hot-updater/plugin-core": "1.2.0-rc.41"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@tanstack/devtools-vite": "^0.6.0",
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
"jszip": "^3.10.1",
|
|
80
80
|
"react": "^19.2.4",
|
|
81
81
|
"react-dom": "^19.2.4",
|
|
82
|
-
"tar": "^7.5.16",
|
|
83
82
|
"tsdown": "0.22.14",
|
|
84
83
|
"tslib": "^2.8.1",
|
|
85
84
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
@@ -87,8 +86,8 @@
|
|
|
87
86
|
"vite-tsconfig-paths": "^6.1.1",
|
|
88
87
|
"vitest": "4.1.4",
|
|
89
88
|
"web-vitals": "^5.1.0",
|
|
90
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
91
|
-
"@hot-updater/mock": "1.2.0-rc.
|
|
89
|
+
"@hot-updater/cli-tools": "1.2.0-rc.41",
|
|
90
|
+
"@hot-updater/mock": "1.2.0-rc.41"
|
|
92
91
|
},
|
|
93
92
|
"description": "React Native OTA solution for self-hosted",
|
|
94
93
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -101,28 +100,6 @@
|
|
|
101
100
|
"url": "https://github.com/gronxb/hot-updater/issues"
|
|
102
101
|
},
|
|
103
102
|
"homepage": "https://github.com/gronxb/hot-updater#readme",
|
|
104
|
-
"inlinedDependencies": {
|
|
105
|
-
"@isaacs/fs-minipass": "4.0.1",
|
|
106
|
-
"chownr": "3.0.0",
|
|
107
|
-
"core-util-is": "1.0.3",
|
|
108
|
-
"immediate": "3.0.6",
|
|
109
|
-
"inherits": "2.0.4",
|
|
110
|
-
"isarray": "1.0.0",
|
|
111
|
-
"jszip": "3.10.1",
|
|
112
|
-
"lie": "3.3.0",
|
|
113
|
-
"mime": "4.0.4",
|
|
114
|
-
"minipass": "7.1.3",
|
|
115
|
-
"minizlib": "3.1.0",
|
|
116
|
-
"pako": "1.0.11",
|
|
117
|
-
"process-nextick-args": "2.0.1",
|
|
118
|
-
"readable-stream": "2.3.8",
|
|
119
|
-
"safe-buffer": "5.1.2",
|
|
120
|
-
"setimmediate": "1.0.5",
|
|
121
|
-
"string_decoder": "1.1.1",
|
|
122
|
-
"tar": "7.5.1",
|
|
123
|
-
"util-deprecate": "1.0.2",
|
|
124
|
-
"yallist": "5.0.0"
|
|
125
|
-
},
|
|
126
103
|
"scripts": {
|
|
127
104
|
"dev": "vite dev --port 3000",
|
|
128
105
|
"build": "NODE_ENV=production vite build && tsdown",
|
|
@@ -4,6 +4,7 @@ import { type ReactElement, type ReactNode, useState } from "react";
|
|
|
4
4
|
import { toast } from "sonner";
|
|
5
5
|
|
|
6
6
|
import { useFeatureUi } from "@/components/features/FeatureSlots";
|
|
7
|
+
import { isIosBrowser } from "@/components/features/native-builds/IosInstall";
|
|
7
8
|
import { HotUpdaterLogo } from "@/components/HotUpdaterLogo";
|
|
8
9
|
import { useTheme } from "@/components/ThemeProvider";
|
|
9
10
|
import {
|
|
@@ -19,6 +20,8 @@ import {
|
|
|
19
20
|
SidebarMenuItem,
|
|
20
21
|
useSidebar,
|
|
21
22
|
} from "@/components/ui/sidebar";
|
|
23
|
+
import { forgetKeptIosDevice } from "@/lib/ios-devices-api";
|
|
24
|
+
import { consolePathFromRouter } from "@/lib/native-builds";
|
|
22
25
|
|
|
23
26
|
type NavigationItem = {
|
|
24
27
|
readonly label: string;
|
|
@@ -87,6 +90,12 @@ export function AppSidebar({ canSignOut = false }: { canSignOut?: boolean }) {
|
|
|
87
90
|
const signOut = async () => {
|
|
88
91
|
setSigningOut(true);
|
|
89
92
|
try {
|
|
93
|
+
// Only an iPhone or iPad holds this Safari's proof of itself.
|
|
94
|
+
if (isIosBrowser(navigator)) {
|
|
95
|
+
await forgetKeptIosDevice(
|
|
96
|
+
consolePathFromRouter(window.location, routerState.location.pathname),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
90
99
|
const response = await fetch("/api/auth/sign-out", {
|
|
91
100
|
body: "{}",
|
|
92
101
|
headers: { "content-type": "application/json" },
|
|
@@ -116,7 +125,7 @@ export function AppSidebar({ canSignOut = false }: { canSignOut?: boolean }) {
|
|
|
116
125
|
bundleId: undefined,
|
|
117
126
|
scopeKey: undefined,
|
|
118
127
|
}}
|
|
119
|
-
className="flex items-center gap-3 p-1 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-2"
|
|
128
|
+
className="flex items-center gap-3 p-1 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-2 max-md:min-h-11"
|
|
120
129
|
>
|
|
121
130
|
<HotUpdaterLogo className="h-7 w-7 shrink-0" />
|
|
122
131
|
<div className="flex flex-col gap-0 group-data-[collapsible=icon]:hidden">
|
|
@@ -185,7 +194,7 @@ export function AppSidebar({ canSignOut = false }: { canSignOut?: boolean }) {
|
|
|
185
194
|
href="https://hot-updater.dev"
|
|
186
195
|
target="_blank"
|
|
187
196
|
rel="noreferrer"
|
|
188
|
-
className="px-2 pb-1 text-[11px] text-sidebar-foreground/60 hover:text-sidebar-foreground group-data-[collapsible=icon]:hidden"
|
|
197
|
+
className="px-2 pb-1 text-[11px] text-sidebar-foreground/60 hover:text-sidebar-foreground group-data-[collapsible=icon]:hidden max-md:flex max-md:min-h-11 max-md:items-center"
|
|
189
198
|
>
|
|
190
199
|
Powered by hot-updater
|
|
191
200
|
</a>
|
|
@@ -7,21 +7,21 @@ interface ChannelBadgeProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20",
|
|
13
|
-
dev: "bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20",
|
|
14
|
-
staging:
|
|
15
|
-
"bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20",
|
|
16
|
-
};
|
|
10
|
+
/** The channels with their own color; any other channel is neutral. */
|
|
11
|
+
const COLORED_CHANNELS = new Set(["production", "staging", "dev"]);
|
|
17
12
|
|
|
18
13
|
export function ChannelBadge({ channel, className }: ChannelBadgeProps) {
|
|
14
|
+
const name = channel.toLowerCase();
|
|
19
15
|
return (
|
|
20
16
|
<Badge
|
|
21
17
|
variant="outline"
|
|
18
|
+
translate="no"
|
|
19
|
+
data-channel={COLORED_CHANNELS.has(name) ? name : undefined}
|
|
22
20
|
className={cn(
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
"border-channel-other/20 bg-channel-other/10 text-channel-other",
|
|
22
|
+
"data-[channel=production]:border-channel-production/20 data-[channel=production]:bg-channel-production/10 data-[channel=production]:text-channel-production",
|
|
23
|
+
"data-[channel=staging]:border-channel-staging/20 data-[channel=staging]:bg-channel-staging/10 data-[channel=staging]:text-channel-staging",
|
|
24
|
+
"data-[channel=dev]:border-channel-dev/20 data-[channel=dev]:bg-channel-dev/10 data-[channel=dev]:text-channel-dev",
|
|
25
25
|
className,
|
|
26
26
|
)}
|
|
27
27
|
>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { RefreshCw } from "lucide-react";
|
|
2
|
+
import { type ComponentProps, useRef, useState } from "react";
|
|
3
|
+
|
|
4
|
+
import { Button } from "@/components/ui/button";
|
|
5
|
+
import {
|
|
6
|
+
Combobox,
|
|
7
|
+
ComboboxContent,
|
|
8
|
+
ComboboxEmpty,
|
|
9
|
+
ComboboxInput,
|
|
10
|
+
ComboboxItem,
|
|
11
|
+
ComboboxList,
|
|
12
|
+
ComboboxTrigger,
|
|
13
|
+
} from "@/components/ui/combobox";
|
|
14
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
15
|
+
import { useChannelsQuery } from "@/lib/api";
|
|
16
|
+
import { ALL_CHANNELS_LABEL } from "@/lib/constants";
|
|
17
|
+
import { cn } from "@/lib/utils";
|
|
18
|
+
|
|
19
|
+
/** A choice in the list: a channel's name, or every channel (no name). */
|
|
20
|
+
type ChannelChoice = {
|
|
21
|
+
readonly name: string | undefined;
|
|
22
|
+
readonly label: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* One look for every filter button: 44 px on a phone, compact from sm, and
|
|
27
|
+
* filled when the filter is narrower than its default.
|
|
28
|
+
*/
|
|
29
|
+
export function FilterChip({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: ComponentProps<typeof Button>) {
|
|
33
|
+
return (
|
|
34
|
+
<Button
|
|
35
|
+
className={cn(
|
|
36
|
+
"h-11 shrink-0 gap-1.5 px-3 text-sm data-[active=true]:border-primary/60 data-[active=true]:bg-primary/10 sm:h-8 sm:text-xs",
|
|
37
|
+
className,
|
|
38
|
+
)}
|
|
39
|
+
variant="outline"
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const EVERY_CHANNEL: ChannelChoice = {
|
|
46
|
+
name: undefined,
|
|
47
|
+
label: ALL_CHANNELS_LABEL,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* How old the cached channel list may be when the list opens. An older one
|
|
52
|
+
* is read again, so a pull request's new channel shows up without a reload;
|
|
53
|
+
* a younger one is shown as it is.
|
|
54
|
+
*/
|
|
55
|
+
export const CHANNELS_FRESH_MS = 30_000;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The channel filter Insights, Bundles, and Native builds share: a button
|
|
59
|
+
* that reads "Channel <name>" and opens a searchable list of the project's
|
|
60
|
+
* channels. Typing narrows the list, and Enter picks the first match.
|
|
61
|
+
*
|
|
62
|
+
* Every channel is one more choice where a page offers it. It is no name,
|
|
63
|
+
* so a channel named `all` stays a channel of its own.
|
|
64
|
+
*/
|
|
65
|
+
export function ChannelPicker({
|
|
66
|
+
value,
|
|
67
|
+
onValueChange,
|
|
68
|
+
allChannels = false,
|
|
69
|
+
pending = false,
|
|
70
|
+
active,
|
|
71
|
+
className,
|
|
72
|
+
}: {
|
|
73
|
+
/** The channel's name; undefined is every channel, where offered. */
|
|
74
|
+
readonly value: string | undefined;
|
|
75
|
+
readonly onValueChange: (name: string | undefined) => void;
|
|
76
|
+
/** Whether "All channels" is a choice. */
|
|
77
|
+
readonly allChannels?: boolean;
|
|
78
|
+
/** Whether the page has yet to decide which channel it shows. */
|
|
79
|
+
readonly pending?: boolean;
|
|
80
|
+
/** Whether the filter is narrower than the page's default. */
|
|
81
|
+
readonly active?: boolean;
|
|
82
|
+
readonly className?: string;
|
|
83
|
+
}) {
|
|
84
|
+
const channels = useChannelsQuery();
|
|
85
|
+
const [query, setQuery] = useState("");
|
|
86
|
+
const list = useRef<HTMLDivElement>(null);
|
|
87
|
+
// Whether the list has just opened and still has to start at its top.
|
|
88
|
+
const opening = useRef(false);
|
|
89
|
+
const names = channels.data?.map(({ name }) => name) ?? [];
|
|
90
|
+
// A filtered channel may be gone, or not loaded yet: it stays a choice.
|
|
91
|
+
const shown =
|
|
92
|
+
value === undefined || names.includes(value) ? names : [value, ...names];
|
|
93
|
+
const choices: ChannelChoice[] = [
|
|
94
|
+
...(allChannels ? [EVERY_CHANNEL] : []),
|
|
95
|
+
...shown.map((name) => ({ name, label: name })),
|
|
96
|
+
];
|
|
97
|
+
const typed = query.trim().toLowerCase();
|
|
98
|
+
const matches = choices.filter((choice) =>
|
|
99
|
+
choice.label.toLowerCase().includes(typed),
|
|
100
|
+
);
|
|
101
|
+
const selected =
|
|
102
|
+
choices.find((choice) => choice.name === value) ??
|
|
103
|
+
(value === undefined ? EVERY_CHANNEL : { name: value, label: value });
|
|
104
|
+
const label = pending ? undefined : selected.label;
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<Combobox
|
|
108
|
+
autoHighlight
|
|
109
|
+
disabled={pending}
|
|
110
|
+
filter={null}
|
|
111
|
+
inputValue={query}
|
|
112
|
+
isItemEqualToValue={(item: ChannelChoice, current: ChannelChoice) =>
|
|
113
|
+
item.name === current.name
|
|
114
|
+
}
|
|
115
|
+
itemToStringLabel={(choice: ChannelChoice) => choice.label}
|
|
116
|
+
items={matches}
|
|
117
|
+
onInputValueChange={setQuery}
|
|
118
|
+
onItemHighlighted={(_, details) => {
|
|
119
|
+
if (!opening.current || details.reason !== "none") return;
|
|
120
|
+
opening.current = false;
|
|
121
|
+
// Opening highlights the current channel, and Base UI scrolls it
|
|
122
|
+
// into view in the next frame. The list starts at its first item
|
|
123
|
+
// instead: the reset runs after that scroll, before the frame paints.
|
|
124
|
+
queueMicrotask(() =>
|
|
125
|
+
requestAnimationFrame(() => {
|
|
126
|
+
if (list.current) list.current.scrollTop = 0;
|
|
127
|
+
}),
|
|
128
|
+
);
|
|
129
|
+
}}
|
|
130
|
+
onOpenChange={(next) => {
|
|
131
|
+
opening.current = next;
|
|
132
|
+
if (!next) {
|
|
133
|
+
setQuery("");
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
// A pull request's channel appears while the page is open, once
|
|
137
|
+
// the cached list is old enough to read again.
|
|
138
|
+
if (
|
|
139
|
+
channels.data !== undefined &&
|
|
140
|
+
!channels.isFetching &&
|
|
141
|
+
Date.now() - channels.dataUpdatedAt > CHANNELS_FRESH_MS
|
|
142
|
+
)
|
|
143
|
+
void channels.refetch();
|
|
144
|
+
}}
|
|
145
|
+
onValueChange={(choice: ChannelChoice | null) => {
|
|
146
|
+
if (choice !== null && choice.name !== value)
|
|
147
|
+
onValueChange(choice.name);
|
|
148
|
+
}}
|
|
149
|
+
value={pending ? null : selected}
|
|
150
|
+
>
|
|
151
|
+
<ComboboxTrigger
|
|
152
|
+
aria-label={label === undefined ? "Channel" : `Channel: ${label}`}
|
|
153
|
+
data-active={active}
|
|
154
|
+
render={<FilterChip className={className} />}
|
|
155
|
+
title={label}
|
|
156
|
+
>
|
|
157
|
+
<span className="text-muted-foreground">Channel</span>
|
|
158
|
+
{label === undefined ? (
|
|
159
|
+
// A failed list leaves nothing to wait for: the page says so.
|
|
160
|
+
channels.isError ? null : (
|
|
161
|
+
<Skeleton className="h-3 w-16" />
|
|
162
|
+
)
|
|
163
|
+
) : (
|
|
164
|
+
<span
|
|
165
|
+
className="min-w-0 flex-1 truncate text-left sm:max-w-48"
|
|
166
|
+
translate={value === undefined ? undefined : "no"}
|
|
167
|
+
>
|
|
168
|
+
{label}
|
|
169
|
+
</span>
|
|
170
|
+
)}
|
|
171
|
+
</ComboboxTrigger>
|
|
172
|
+
<ComboboxContent className="w-72 min-w-(--anchor-width)">
|
|
173
|
+
<ComboboxInput
|
|
174
|
+
aria-label="Search channels"
|
|
175
|
+
maxLength={1024}
|
|
176
|
+
placeholder="Search channels…"
|
|
177
|
+
showTrigger={false}
|
|
178
|
+
/>
|
|
179
|
+
{channels.isPending ? (
|
|
180
|
+
<p className="px-3 pt-2 text-xs text-muted-foreground">
|
|
181
|
+
Loading channels…
|
|
182
|
+
</p>
|
|
183
|
+
) : channels.isError && channels.data === undefined ? (
|
|
184
|
+
<div className="flex items-center justify-between gap-2 px-3 pt-2 text-xs text-muted-foreground">
|
|
185
|
+
Couldn't load channels.
|
|
186
|
+
<Button
|
|
187
|
+
className="max-md:min-h-11"
|
|
188
|
+
onClick={() => void channels.refetch()}
|
|
189
|
+
size="sm"
|
|
190
|
+
variant="outline"
|
|
191
|
+
>
|
|
192
|
+
<RefreshCw data-icon="inline-start" />
|
|
193
|
+
Retry channels
|
|
194
|
+
</Button>
|
|
195
|
+
</div>
|
|
196
|
+
) : null}
|
|
197
|
+
<ComboboxEmpty className="flex-col items-center gap-2 px-3">
|
|
198
|
+
{typed === "" ? null : (
|
|
199
|
+
<>
|
|
200
|
+
No channel matches “{query.trim()}”.
|
|
201
|
+
<Button
|
|
202
|
+
className="max-md:min-h-11"
|
|
203
|
+
onClick={() => setQuery("")}
|
|
204
|
+
size="sm"
|
|
205
|
+
variant="outline"
|
|
206
|
+
>
|
|
207
|
+
Clear search
|
|
208
|
+
</Button>
|
|
209
|
+
</>
|
|
210
|
+
)}
|
|
211
|
+
</ComboboxEmpty>
|
|
212
|
+
<ComboboxList ref={list}>
|
|
213
|
+
{(choice: ChannelChoice) => (
|
|
214
|
+
<ComboboxItem key={choice.name ?? ""} value={choice}>
|
|
215
|
+
<span
|
|
216
|
+
className="min-w-0 [overflow-wrap:anywhere]"
|
|
217
|
+
translate={choice.name === undefined ? undefined : "no"}
|
|
218
|
+
>
|
|
219
|
+
{choice.label}
|
|
220
|
+
</span>
|
|
221
|
+
</ComboboxItem>
|
|
222
|
+
)}
|
|
223
|
+
</ComboboxList>
|
|
224
|
+
</ComboboxContent>
|
|
225
|
+
</Combobox>
|
|
226
|
+
);
|
|
227
|
+
}
|