@wrongstack/webui 0.298.1 → 0.298.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AgentRosterView-C26RCdot.js → AgentRosterView-RvxaV08Y.js} +4 -4
- package/dist/assets/{AnalyticsDashboard-CEjjV3bX.js → AnalyticsDashboard-irejsLMt.js} +1 -1
- package/dist/assets/{AudienceMemoryPanel-CnfZC8x0.js → AudienceMemoryPanel-DDW_WPjf.js} +2 -2
- package/dist/assets/{ChangesView-D0BiTbs8.js → ChangesView-Bnd167hf.js} +1 -1
- package/dist/assets/{ChronicleDashboard-BZ4XOcvf.js → ChronicleDashboard-DC62FDEt.js} +1 -1
- package/dist/assets/CodeEditor-DCWcCQPO.js +1 -0
- package/dist/assets/CodeMap-DSqqgBuD.js +1 -0
- package/dist/assets/{CronJobsPanel-F6nhZtfg.js → CronJobsPanel-BXujnpGC.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-C9sLNUUc.js → DeadCodeScanPanel-HTbGUTMl.js} +1 -1
- package/dist/assets/{DebugDashboard-D8BLcLjI.js → DebugDashboard-B5kJBUv0.js} +1 -1
- package/dist/assets/{DesignGalleryView-B8mE5nGy.js → DesignGalleryView-BQ0CZpQm.js} +1 -1
- package/dist/assets/GoalView-DvaSR6CO.js +1 -0
- package/dist/assets/KanbanView-DpWs_i8T.js +3 -0
- package/dist/assets/MailboxDetailView-Dh8ekyMw.js +1 -0
- package/dist/assets/MemoryManager-CUAbNwsz.js +1 -0
- package/dist/assets/{ModelPicker-CNHhT2SO.js → ModelPicker-BxYMTEEN.js} +1 -1
- package/dist/assets/OfficeMapPanel-HgERknuN.js +4 -0
- package/dist/assets/{ProcessMonitor-Cc8LsfTh.js → ProcessMonitor-DVUCtVHZ.js} +1 -1
- package/dist/assets/{QueuePanel-B0NXFwEt.js → QueuePanel-n9lScdWu.js} +1 -1
- package/dist/assets/{RefreshDebugView-DLst_piS.js → RefreshDebugView-eZQ3wdxU.js} +1 -1
- package/dist/assets/{SageTabs-NwMcr4Pq.js → SageTabs-B-eQ--Sb.js} +2 -2
- package/dist/assets/SddHub-D81poT6w.js +2 -0
- package/dist/assets/{SessionsDashboard-C5dXb0iJ.js → SessionsDashboard-CR3NZeHw.js} +1 -1
- package/dist/assets/SetupScreen-t6wrhv6l.js +1 -0
- package/dist/assets/SkillDetailView-D6TOvMQU.js +3 -0
- package/dist/assets/{SpecsView-DhuaZcOl.js → SpecsView-BYiJr__T.js} +1 -1
- package/dist/assets/TechStackView-HEMM3PkG.js +1 -0
- package/dist/assets/{TerminalPanel-DjruTcb6.js → TerminalPanel-BgMsGfGa.js} +1 -1
- package/dist/assets/{Toaster-BmyghnqJ.js → Toaster-EXqX2jqp.js} +1 -1
- package/dist/assets/{activity-C34aPcFU.js → activity-BBPMHCAJ.js} +1 -1
- package/dist/assets/{activity-CBdzUJQ_.js → activity-BJijwuIr.js} +1 -1
- package/dist/assets/{activity-Wr0_Gb8A.js → activity-DReNmuta.js} +1 -1
- package/dist/assets/{activity-CLYyxeC6.js → activity-DeEOo2zu.js} +1 -1
- package/dist/assets/{activity-Cv_EIWjY.js → activity-Dyh19u3P.js} +1 -1
- package/dist/assets/{activity-Bo6DncWg.js → activity-GR8KiHvf.js} +1 -1
- package/dist/assets/{activity-kCY0dGRC.js → activity-iuGHFz2B.js} +1 -1
- package/dist/assets/button-DwmC7ENW.js +1 -0
- package/dist/assets/{chat-store-B2CjP2Zl.js → chat-store-LHzJqRCp.js} +2 -2
- package/dist/assets/{codemap-activity-store-Cz0_AHqt.js → codemap-activity-store-B6n7KiS8.js} +1 -1
- package/dist/assets/codemap-index-store-oapPwtvI.js +1 -0
- package/dist/assets/{dialog-BJef9ZZo.js → dialog-DsCmc6eL.js} +1 -1
- package/dist/assets/{empty-state-BGzRrNXI.js → empty-state-02bIS4x7.js} +1 -1
- package/dist/assets/{i18n-2wGPPdl_.js → i18n-DxnYsmc-.js} +2 -2
- package/dist/assets/index-Bf75VrDE.js +132 -0
- package/dist/assets/index-NFp5CXyK.css +1 -0
- package/dist/assets/{input-Bd10nfMj.js → input-UhWgodVi.js} +1 -1
- package/dist/assets/{mailbox-store-D3omLzBk.js → mailbox-store-xh2Ux-Xs.js} +1 -1
- package/dist/assets/{progress-ring-BEULkQ1r.js → progress-ring-C0O73ZjR.js} +1 -1
- package/dist/assets/{roster-ws-BmV_3U6w.js → roster-ws-DlQQL7Eh.js} +1 -1
- package/dist/assets/{session-store-ZMNU48xK.js → session-store-BE_S1f5v.js} +1 -1
- package/dist/assets/settings-B5xal2R3.js +1 -0
- package/dist/assets/settings-BHtFy8EG.js +1 -0
- package/dist/assets/settings-Bss5hBla.js +1 -0
- package/dist/assets/settings-BzrLCVRP.js +1 -0
- package/dist/assets/settings-C7RdvmLZ.js +1 -0
- package/dist/assets/settings-Dd94HoV6.js +1 -0
- package/dist/assets/settings-Dm9THFe8.js +1 -0
- package/dist/assets/{shared-CrX8iE-U.js → shared-bBntASiy.js} +1 -1
- package/dist/assets/{stores-DyQOSkkD.js → stores-BS-Bdi-5.js} +2 -2
- package/dist/assets/{ui-store-di6oY7cy.js → ui-store-C4Ybfoon.js} +1 -1
- package/dist/assets/{useWebSocket-BVFPigcY.js → useWebSocket-x8PMoTq8.js} +3 -3
- package/dist/assets/{utils-CwJvjOcH.js → utils-_s0GyctV.js} +1 -1
- package/dist/assets/{vendor-BTTkQ9Tn.js → vendor-CxV3l5PQ.js} +93 -30
- package/dist/assets/{view-navigation-BMRzqGbq.js → view-navigation-DLdE7qHU.js} +1 -1
- package/dist/assets/ws-client-Cy3oRAmZ.js +1 -0
- package/dist/components/SettingsPanel/ModelCatalogPicker.d.ts +22 -0
- package/dist/components/SettingsPanel/ModelListEditor.d.ts +41 -0
- package/dist/components/SettingsPanel/ModelSchemaEditor.d.ts +32 -0
- package/dist/components/SettingsPanel/ProviderModelsPanel.d.ts +2 -1
- package/dist/index.html +22 -22
- package/dist/index.js +7991 -6939
- package/dist/lib/ws-client.d.ts +6 -1
- package/dist/types/client-message.d.ts +19 -0
- package/dist/types/system.d.ts +3 -2
- package/package.json +8 -8
- package/dist/assets/CodeEditor-BlqaT56D.js +0 -1
- package/dist/assets/CodeMap-Bj5tjjW5.js +0 -1
- package/dist/assets/GoalView-DIx7Zr4a.js +0 -1
- package/dist/assets/KanbanView-DshzDwq1.js +0 -3
- package/dist/assets/MailboxDetailView-BJXpXjtm.js +0 -1
- package/dist/assets/MemoryManager-B-S5oREO.js +0 -1
- package/dist/assets/OfficeMapPanel-CBN9uG80.js +0 -4
- package/dist/assets/SddHub-CpRHXmjm.js +0 -2
- package/dist/assets/SetupScreen-B81fcNgP.js +0 -1
- package/dist/assets/SkillDetailView-BTvgE_MD.js +0 -3
- package/dist/assets/TechStackView-BXmfl2qY.js +0 -1
- package/dist/assets/button-BMECp1cg.js +0 -1
- package/dist/assets/codemap-index-store-B-XLZpJu.js +0 -1
- package/dist/assets/index-DeA8UyiB.css +0 -1
- package/dist/assets/index-x6-rLl5H.js +0 -132
- package/dist/assets/settings-BF0lRxlj.js +0 -1
- package/dist/assets/settings-CP6cwqHD.js +0 -1
- package/dist/assets/settings-D0rWEhMg.js +0 -1
- package/dist/assets/settings-DFCaP02p.js +0 -1
- package/dist/assets/settings-DHix1ZPL.js +0 -1
- package/dist/assets/settings-eEzjNzsC.js +0 -1
- package/dist/assets/settings-kp_aIgcX.js +0 -1
- package/dist/assets/ws-client-B0-KwuTK.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,Ct as n,Gn as r,Ki as i,Pt as a,Rt as o,Tn as s,Xr as c,Yt as l,ci as u,da as d,et as f,fi as p,jn as m,mi as h,nt as ee,oa as g,on as te,qi as _,rn as v,ti as ne,tt as y,wa as b,wr as x,xr as S}from"./vendor-BTTkQ9Tn.js";import{t as C}from"./utils-CwJvjOcH.js";import{n as w}from"./stores-DyQOSkkD.js";import{t as T}from"./button-BMECp1cg.js";import{t as E}from"./input-Bd10nfMj.js";import{C as D,S as O}from"./index-x6-rLl5H.js";var k=e(b(),1),A=f(),re={current:{label:`Current`,badge:`border-success/35 bg-success/10 text-success`,dot:`bg-success`,weight:0},update_available_safe:{label:`Update available`,badge:`border-info/35 bg-info/10 text-info`,dot:`bg-info`,weight:30},update_available_breaking:{label:`Major update`,badge:`border-warning/35 bg-warning/10 text-warning`,dot:`bg-warning`,weight:50},vulnerable:{label:`Vulnerable`,badge:`border-destructive/45 bg-destructive/15 text-destructive`,dot:`bg-destructive`,weight:100},deprecated:{label:`Deprecated`,badge:`border-destructive/35 bg-destructive/10 text-destructive`,dot:`bg-destructive`,weight:70},yanked:{label:`Yanked`,badge:`border-destructive/45 bg-destructive/15 text-destructive`,dot:`bg-destructive`,weight:80},unmaintained_suspected:{label:`Unmaintained?`,badge:`border-warning/35 bg-warning/10 text-warning`,dot:`bg-warning`,weight:60},blocked_by_constraints:{label:`Blocked`,badge:`border-warning/30 bg-warning/5 text-warning`,dot:`bg-warning`,weight:40},private_or_unresolved:{label:`Private`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:10},local_path:{label:`Local path`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},git_dependency:{label:`Git`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},unsupported:{label:`Unsupported`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},unknown:{label:`Unknown`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:20}},ie={label:`Unknown`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:0};function j(e){return re[e]??ie}var M={npm:{label:`npm / Node.js`,icon:s},python:{label:`Python`,icon:p},rust:{label:`Rust`,icon:o},go:{label:`Go`,icon:v},dotnet:{label:`.NET`,icon:m},php:{label:`PHP`,icon:n},dart:{label:`Dart / Flutter`,icon:u},maven:{label:`Maven`,icon:d},gradle:{label:`Gradle`,icon:_},ruby:{label:`Ruby`,icon:S},swift:{label:`Swift`,icon:y},elixir:{label:`Elixir`,icon:n},cpp:{label:`C / C++`,icon:h}},N={label:`Unknown`};function P(e){return M[e]??N}function F({ecosystem:e,className:t=`size-3.5 shrink-0`}){let n=P(e);if(!n.icon)return null;let r=n.icon;return(0,A.jsx)(r,{className:t})}function ae(e){return j(e.status).weight>=50}var I=[`critical`,`high`,`medium`,`low`,`info`],L={critical:{label:`Critical`,badge:`border-destructive/45 bg-destructive/15 text-destructive`},high:{label:`High`,badge:`border-destructive/35 bg-destructive/10 text-destructive`},medium:{label:`Medium`,badge:`border-warning/35 bg-warning/10 text-warning`},low:{label:`Low`,badge:`border-info/35 bg-info/10 text-info`},info:{label:`Info`,badge:`border-border/70 bg-muted text-muted-foreground`}},R={none:`No action`,upgrade_patch:`Patch upgrade`,upgrade_minor:`Minor upgrade`,upgrade_major:`Major upgrade`,replace:`Replace`,remove:`Remove`,investigate:`Investigate`},z={full:{label:`Full`,badge:`border-success/35 bg-success/10 text-success`,note:void 0},partial:{label:`Partial`,badge:`border-warning/35 bg-warning/10 text-warning`,note:`limited`},unsupported:{label:`Unsupported`,badge:`border-border/70 bg-muted text-muted-foreground`,note:`best-effort`}};function B(e){return z[e]??z.unsupported}function V(e){if(!e)return null;let t=/^\D*(\d+)/.exec(e);if(!t?.[1])return null;let n=Number(t[1]);return Number.isFinite(n)?n:null}function H(e){let t=V(e.locked??e.installed??e.requested),n=V(e.latestStable);if(t===null||n===null||n<=t)return{majorsBehind:0,label:null};let r=n-t;return{majorsBehind:r,label:`${r} major${r===1?``:`s`} behind`}}function U(e){return e.locked??e.installed??e.requested??null}function W(e){return e.confidence<1}function G({className:e,children:t}){return(0,A.jsx)(`span`,{className:C(`inline-flex shrink-0 items-center gap-1 border px-1.5 py-0.5 text-[10px] font-medium`,e),children:t})}function K({label:e,value:t,hint:n,tone:r=`default`}){let i={default:`text-foreground`,success:`text-success`,warning:`text-warning`,info:`text-info`,destructive:`text-destructive`}[r];return(0,A.jsxs)(`div`,{className:`border border-border/70 bg-card/55 px-3 py-2.5 shadow-[inset_0_1px_0_hsl(var(--foreground)/0.035)]`,children:[(0,A.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:e}),(0,A.jsxs)(`div`,{className:`mt-1 flex items-end justify-between gap-2`,children:[(0,A.jsx)(`p`,{className:C(`font-mono text-xl font-bold tabular-nums`,i),children:t}),(0,A.jsx)(`p`,{className:`truncate text-[9px] text-muted-foreground`,children:n})]})]})}function oe({dependency:e,findings:t,deepDive:n,onDeepDive:i,onBack:o,coverage:s}){let l=j(e.status),u=U(e),d=H(e),f=s?B(s).note:void 0;return(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,A.jsxs)(`header`,{className:`shrink-0 border-b border-border/70 bg-card/45 p-3`,children:[(0,A.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,A.jsx)(T,{variant:`ghost`,size:`icon`,onClick:o,"aria-label":`Back to dependency list`,className:`shrink-0 md:hidden`,children:(0,A.jsx)(g,{className:`size-4`})}),(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,A.jsx)(`h2`,{className:`min-w-0 truncate font-mono text-sm font-bold text-foreground`,children:e.name}),(0,A.jsx)(G,{className:l.badge,children:l.label})]}),(0,A.jsxs)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:[P(e.ecosystem).label,` ·`,` `,e.direct?`direct`:`transitive`,` · `,e.scope,` ·`,` `,e.sourceType,f&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,A.jsx)(`span`,{className:`text-warning`,children:f})]})]})]})]}),(0,A.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-baseline gap-2 font-mono text-xs`,children:[(0,A.jsx)(`span`,{className:`text-foreground`,children:u??`—`}),e.latestStable&&e.latestStable!==u&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,A.jsx)(`span`,{className:`text-info`,children:e.latestStable})]}),d.label&&(0,A.jsxs)(`span`,{className:`text-[10px] text-warning`,children:[`(`,d.label,`)`]})]})]}),(0,A.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,A.jsxs)(`dl`,{className:`grid grid-cols-2 gap-px border border-border/70 bg-border/60`,children:[(0,A.jsx)(q,{label:`Constraint`,value:e.requested??`—`,mono:!0}),(0,A.jsx)(q,{label:`Locked`,value:e.locked??`—`,mono:!0}),(0,A.jsx)(q,{label:`Latest stable`,value:e.latestStable??`—`,mono:!0}),(0,A.jsx)(q,{label:`License`,value:e.license??`—`}),e.wanted&&(0,A.jsx)(q,{label:`Wanted`,value:e.wanted,mono:!0}),e.resolvable&&(0,A.jsx)(q,{label:`Resolvable`,value:e.resolvable,mono:!0}),e.purl&&(0,A.jsx)(q,{label:`PURL`,value:e.purl,mono:!0}),(0,A.jsx)(q,{label:`Registry flags`,value:[e.deprecated&&`deprecated`,e.yanked&&`yanked`].filter(Boolean).join(`, `)||`none`})]}),(0,A.jsxs)(`section`,{className:`mt-4`,children:[(0,A.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center justify-between gap-2`,children:[(0,A.jsx)(`h3`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:`Findings`}),(0,A.jsxs)(T,{variant:`outline`,size:`sm`,onClick:()=>i(e),disabled:n.status===`loading`,className:`h-7 text-[10px]`,children:[n.status===`loading`?(0,A.jsx)(r,{className:`size-3 animate-spin`}):(0,A.jsx)(a,{className:`size-3`}),n.status===`loading`?`Researching…`:`Deep dive`]})]}),n.status===`error`&&n.error&&(0,A.jsx)(`p`,{role:`alert`,className:`mb-1.5 text-[10px] text-destructive`,children:n.error}),t.length===0?(0,A.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Nothing flagged. Run a deep dive to have the model research this package against the web.`}):(0,A.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:t.map(e=>(0,A.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,A.jsx)(G,{className:L[e.severity].badge,children:L[e.severity].label}),(0,A.jsx)(G,{className:`border-border/70 bg-muted text-muted-foreground`,children:R[e.action]??e.action}),W(e)&&(0,A.jsxs)(G,{className:`border-info/35 bg-info/10 text-info`,children:[(0,A.jsx)(a,{className:`size-2.5`}),`AI · `,Math.round(e.confidence*100),`%`]})]}),(0,A.jsx)(`p`,{className:`mt-1 text-[11px] leading-relaxed text-muted-foreground`,children:e.rationale}),e.breakingRisk&&(0,A.jsx)(`p`,{className:`mt-1 border-l-2 border-warning/40 pl-2 text-[10px] leading-relaxed text-warning`,children:e.breakingRisk})]},e.id))})]}),(0,A.jsxs)(`section`,{className:`mt-4`,children:[(0,A.jsx)(`h3`,{className:`mb-1.5 text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:`Evidence`}),e.evidence.length===0?(0,A.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`No evidence recorded.`}):(0,A.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.evidence.map((t,n)=>(0,A.jsxs)(`li`,{className:`border border-border/70 bg-card/40 p-2`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,A.jsx)(G,{className:`border-border/70 bg-muted text-muted-foreground`,children:t.kind}),(0,A.jsx)(`span`,{className:`font-mono text-[9px] text-muted-foreground`,children:new Date(t.retrievedAt).toLocaleString()})]}),t.source.startsWith(`http`)?(0,A.jsxs)(`a`,{href:t.source,target:`_blank`,rel:`noreferrer noopener`,className:`mt-1 flex min-w-0 items-center gap-1 truncate text-[10px] text-info underline-offset-2 hover:underline`,children:[(0,A.jsx)(`span`,{className:`truncate`,children:t.source}),(0,A.jsx)(c,{className:`size-2.5 shrink-0`})]}):(0,A.jsx)(`p`,{className:`mt-1 truncate font-mono text-[10px] text-muted-foreground`,children:t.source}),t.detail&&(0,A.jsx)(`p`,{className:`mt-0.5 text-[10px] leading-relaxed text-muted-foreground`,children:t.detail})]},`${e.id}-evidence-${n}`))})]})]})]})}function q({label:e,value:t,mono:n}){return(0,A.jsxs)(`div`,{className:`bg-card/55 px-2.5 py-1.5`,children:[(0,A.jsx)(`dt`,{className:`text-[9px] font-bold uppercase tracking-[0.14em] text-muted-foreground`,children:e}),(0,A.jsx)(`dd`,{className:C(`mt-0.5 truncate text-[11px] text-foreground`,n&&`font-mono`),children:t})]})}var J=`grid grid-cols-[minmax(0,2.2fr)_minmax(0,1.6fr)_minmax(0,1.1fr)] gap-2`;function se({dependencies:e,selectedId:n,hasDependencies:r,coverageByWorkspaceId:i,onSelect:a}){let o=D(e,30);return e.length===0?(0,A.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,A.jsx)(`p`,{className:`max-w-xs text-xs text-muted-foreground`,children:r?`No dependencies match the current filters.`:`No dependencies inventoried yet. Run a scan to populate the inventory.`})}):(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,A.jsxs)(`div`,{className:C(J,`shrink-0 border-b border-border/70 bg-card/45 px-3 py-1.5 text-[9px] font-bold uppercase tracking-[0.14em] text-muted-foreground`),children:[(0,A.jsx)(`span`,{children:`Package`}),(0,A.jsx)(`span`,{children:`Installed → Latest`}),(0,A.jsx)(`span`,{children:`Status`})]}),(0,A.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,A.jsx)(t,{className:`h-full`,"aria-label":`Dependencies`,children:o.pageItems.map(e=>(0,A.jsx)(Y,{dependency:e,selected:e.id===n,coverage:i?.get(e.workspaceId),onSelect:a},e.id))})}),(0,A.jsx)(O,{page:o.page,pageSize:o.pageSize,totalItems:o.totalItems,onPageChange:o.setPage,itemLabel:`dependencies`})]})}function Y({dependency:e,selected:t,coverage:n,onSelect:r}){let i=j(e.status),a=U(e),o=H(e),s=n?B(n).note:void 0;return(0,A.jsxs)(`button`,{type:`button`,onClick:()=>r(e),"aria-current":t,className:C(J,`w-full items-center border-b border-border/40 px-3 py-2 text-left transition-colors hover:bg-accent/40`,t&&`bg-accent/60`),children:[(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,A.jsx)(`span`,{className:C(`size-1.5 shrink-0`,i.dot),"aria-hidden":`true`}),(0,A.jsx)(`span`,{className:`truncate font-mono text-xs text-foreground`,children:e.name})]}),(0,A.jsxs)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:[(0,A.jsx)(F,{ecosystem:e.ecosystem,className:`mr-0.5 inline-block size-3 align-text-bottom`}),P(e.ecosystem).label,` · `,e.direct?`direct`:`transitive`,` · `,e.scope,s&&(0,A.jsxs)(A.Fragment,{children:[` · `,(0,A.jsx)(`span`,{className:`text-warning`,children:s})]})]})]}),(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-1.5 font-mono text-[11px]`,children:[(0,A.jsx)(`span`,{className:`truncate text-foreground`,children:a??`—`}),e.latestStable&&e.latestStable!==a&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`→`}),(0,A.jsx)(`span`,{className:`truncate text-info`,children:e.latestStable})]})]}),o.label?(0,A.jsx)(`p`,{className:`mt-0.5 truncate text-[10px] text-warning`,children:o.label}):e.requested&&(0,A.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-[10px] text-muted-foreground`,children:e.requested})]}),(0,A.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,A.jsx)(G,{className:i.badge,children:i.label}),e.deprecated&&(0,A.jsx)(G,{className:`border-destructive/35 bg-destructive/10 text-destructive`,children:`dep`}),e.yanked&&(0,A.jsx)(G,{className:`border-destructive/45 bg-destructive/15 text-destructive`,children:`yank`})]})]})}function ce({findings:e,dependenciesById:t,onSelectDependency:n}){let r=D(e,20);return e.length===0?(0,A.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,A.jsxs)(`p`,{className:`max-w-sm text-xs text-muted-foreground`,children:[`No findings. Run `,(0,A.jsx)(`span`,{className:`font-mono text-foreground`,children:`Analyze`}),` to check versions and advisories against upstream registries, then interpret the results.`]})}):(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,A.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:(0,A.jsx)(`div`,{className:`flex flex-col gap-4`,children:I.map(e=>[e,r.pageItems.filter(t=>t.severity===e)]).filter(([,e])=>e.length>0).map(([e,r])=>(0,A.jsxs)(`section`,{children:[(0,A.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,A.jsx)(G,{className:L[e].badge,children:L[e].label}),(0,A.jsx)(`span`,{className:`font-mono text-[10px] tabular-nums text-muted-foreground`,children:r.length})]}),(0,A.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.map(e=>(0,A.jsx)(X,{finding:e,dependency:t.get(e.dependencyId),onSelectDependency:n},e.id))})]},e))})}),(0,A.jsx)(O,{page:r.page,pageSize:r.pageSize,totalItems:r.totalItems,onPageChange:r.setPage,itemLabel:`findings`})]})}function X({finding:e,dependency:t,onSelectDependency:n}){let r=W(e);return(0,A.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2.5`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:()=>n(e.dependencyId),className:`min-w-0 truncate font-mono text-xs text-foreground underline-offset-2 hover:underline`,children:t?.name??e.dependencyId}),(0,A.jsx)(G,{className:`border-border/70 bg-muted text-muted-foreground`,children:R[e.action]??e.action}),r&&(0,A.jsxs)(G,{className:`border-info/35 bg-info/10 text-info`,children:[(0,A.jsx)(a,{className:`size-2.5`}),`AI · `,Math.round(e.confidence*100),`%`]})]}),(0,A.jsx)(`p`,{className:`mt-1.5 text-[11px] leading-relaxed text-muted-foreground`,children:e.rationale}),e.breakingRisk&&(0,A.jsx)(`p`,{className:`mt-1 border-l-2 border-warning/40 pl-2 text-[10px] leading-relaxed text-warning`,children:e.breakingRisk}),e.evidence.length>0&&(0,A.jsx)(`ul`,{className:C(`mt-1.5 flex flex-col gap-0.5`),children:e.evidence.slice(0,4).map((t,n)=>(0,A.jsx)(`li`,{className:`min-w-0 truncate text-[10px]`,children:t.source.startsWith(`http`)?(0,A.jsx)(`a`,{href:t.source,target:`_blank`,rel:`noreferrer noopener`,className:`text-info underline-offset-2 hover:underline`,children:t.detail??t.source}):(0,A.jsx)(`span`,{className:`text-muted-foreground`,children:t.detail??t.source})},`${e.id}-${n}`))})]})}function le({searchQuery:e,ecosystemFilter:t,statusFilter:n,directOnly:r,sort:i,hasFilters:a,ecosystems:o,statuses:s,visibleCount:c,totalCount:u,onSearchChange:d,onEcosystemFilterChange:f,onStatusFilterChange:p,onToggleDirectOnly:m,onSortChange:h,onClearFilters:g}){return(0,A.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-border/70 bg-card/45 p-3`,children:[(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,A.jsx)(l,{className:`pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,A.jsx)(E,{"aria-label":`Search dependencies`,value:e,onChange:e=>d(e.target.value),placeholder:`Search by package name…`,className:`h-10 min-w-0 bg-background pl-9 pr-8 text-xs`}),e&&(0,A.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,onClick:()=>d(``),className:`absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground`,children:(0,A.jsx)(ee,{className:`size-3.5`})})]}),(0,A.jsx)(T,{variant:r?`default`:`outline`,size:`sm`,onClick:m,"aria-pressed":r,title:`Show only dependencies this project declares itself`,className:`shrink-0`,children:`Direct only`}),a&&(0,A.jsx)(T,{variant:`ghost`,size:`icon`,onClick:g,"aria-label":`Clear all filters`,title:`Clear all filters`,className:`shrink-0`,children:(0,A.jsx)(x,{className:`size-4`})})]}),(0,A.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-ecosystem-filter`,children:`Filter by ecosystem`}),(0,A.jsxs)(`select`,{id:`techstack-ecosystem-filter`,value:t,onChange:e=>f(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,A.jsx)(`option`,{value:`all`,children:`All ecosystems`}),o.map(([e,t])=>(0,A.jsxs)(`option`,{value:e,children:[P(e).label,` · `,t]},e))]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-status-filter`,children:`Filter by status`}),(0,A.jsxs)(`select`,{id:`techstack-status-filter`,value:n,onChange:e=>p(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,A.jsx)(`option`,{value:`all`,children:`All statuses`}),s.map(([e,t])=>(0,A.jsxs)(`option`,{value:e,children:[j(e).label,` · `,t]},e))]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-sort`,children:`Sort dependencies`}),(0,A.jsxs)(`select`,{id:`techstack-sort`,value:i,onChange:e=>h(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,A.jsx)(`option`,{value:`attention`,children:`Sort: needs attention`}),(0,A.jsx)(`option`,{value:`drift`,children:`Sort: most out of date`}),(0,A.jsx)(`option`,{value:`name`,children:`Sort: name`})]})]})]}),(0,A.jsx)(`p`,{className:C(`text-[10px] text-muted-foreground`,a&&`text-info`),children:c===u?`${u} dependencies`:`${c} of ${u} dependencies`})]})}var ue=[{id:`dependencies`,label:`Dependencies`},{id:`findings`,label:`Findings`},{id:`workspaces`,label:`Workspaces`},{id:`trends`,label:`Trends`},{id:`remediation`,label:`Remediation`}],Z=new Set([`npm`,`python`,`rust`,`go`,`php`,`dotnet`]);function de(){let e=w(e=>e.snapshot),t=w(e=>e.stale),n=w(e=>e.loading),i=w(e=>e.error),o=w(e=>e.activeJob),[s,c]=(0,k.useState)(`dependencies`),[l,u]=(0,k.useState)(``),[d,f]=(0,k.useState)(`all`),[p,m]=(0,k.useState)(`all`),[h,g]=(0,k.useState)(!1),[_,v]=(0,k.useState)(`attention`),[y,b]=(0,k.useState)(null),[x,S]=(0,k.useState)([]),[E,D]=(0,k.useState)({status:`idle`,error:null}),[O,re]=(0,k.useState)(null),[ie,M]=(0,k.useState)(null),[N,P]=(0,k.useState)(new Set),[F,I]=(0,k.useState)(!1),L=(0,k.useCallback)(async()=>{let e=w.getState();e.setLoading(!0),e.setError(null);try{let t=await fetch(`/api/techstack/snapshot`);if(t.status===404){e.setSnapshot(null,!1);return}if(!t.ok)throw Error(`HTTP ${t.status}: ${t.statusText}`);let n=await t.json();e.setSnapshot(n.snapshot,n.stale)}catch(t){e.setError(t instanceof Error?t.message:String(t))}},[]),R=(0,k.useCallback)(async e=>{let t=w.getState();t.setLoading(!0),t.setError(null);try{let n=await fetch(`/api/techstack/${e}`,{method:`POST`}),r=await n.json();if(!n.ok||!r.jobId)throw Error(r.error??`HTTP ${n.status}: ${n.statusText}`);t.jobStarted(r.jobId,e)}catch(e){t.setError(e instanceof Error?e.message:String(e))}},[]),z=(0,k.useCallback)(async()=>{let e=w.getState().activeJob;if(e)try{let t=await fetch(`/api/techstack/jobs/${encodeURIComponent(e.id)}/cancel`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}: ${t.statusText}`);w.getState().jobCancelled(e.id)}catch(e){w.getState().setError(e instanceof Error?e.message:String(e))}},[]),B=(0,k.useCallback)(async e=>{D({status:`loading`,error:null});try{let t=await fetch(`/api/techstack/deps/${encodeURIComponent(e.id)}/research`,{method:`POST`}),n=await t.json();if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);S(n.findings??[]),D({status:`idle`,error:null})}catch(e){D({status:`error`,error:e instanceof Error?e.message:String(e)})}},[]);(0,k.useEffect)(()=>{L()},[L]),(0,k.useEffect)(()=>{s!==`trends`&&s!==`remediation`||fetch(`/api/techstack/${s===`trends`?`trends`:`remediation`}`).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);t.trend&&re(t.trend),t.plan&&M(t.plan)}).catch(e=>w.getState().setError(e instanceof Error?e.message:String(e)))},[s,e?.id]);let V=(0,k.useCallback)(async()=>{if(N.size!==0){I(!0);try{let e=await fetch(`/api/techstack/remediation/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({approvedItems:[...N]})}),t=await e.json();if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);P(new Set),await R(`inventory`)}catch(e){w.getState().setError(e instanceof Error?e.message:String(e))}finally{I(!1)}}},[N,R]);(0,k.useEffect)(()=>{S([]),D({status:`idle`,error:null})},[e?.id]);let U=(0,k.useMemo)(()=>e?.dependencies??[],[e]),W=(0,k.useMemo)(()=>e?.findings??[],[e]),G=(0,k.useMemo)(()=>new Map(U.map(e=>[e.id,e])),[U]),q=(0,k.useMemo)(()=>ge(U.map(e=>e.ecosystem)),[U]),J=(0,k.useMemo)(()=>ge(U.map(e=>e.status)),[U]),Y=(0,k.useMemo)(()=>new Map(e?.workspaces.map(e=>[e.id,e.coverage])??[]),[e]),X=(0,k.useMemo)(()=>{let e=l.trim().toLowerCase(),t=[...U.filter(t=>!(e&&!t.name.toLowerCase().includes(e)||d!==`all`&&t.ecosystem!==d||p!==`all`&&t.status!==p||h&&!t.direct))];return _===`name`?t.sort((e,t)=>e.name.localeCompare(t.name)):_===`drift`?t.sort((e,t)=>H(t).majorsBehind-H(e).majorsBehind||e.name.localeCompare(t.name)):t.sort((e,t)=>j(t.status).weight-j(e.status).weight||Number(t.direct)-Number(e.direct)||e.name.localeCompare(t.name)),t},[U,l,d,p,h,_]),Z=y?G.get(y):void 0,de=(0,k.useMemo)(()=>Z?[...W.filter(e=>e.dependencyId===Z.id),...x.filter(e=>e.dependencyId===Z.id)]:[],[W,x,Z]),ve=(0,k.useMemo)(()=>U.filter(ae).length,[U]),ye=(0,k.useMemo)(()=>U.filter(e=>H(e).majorsBehind>0).length,[U]),be=(0,k.useMemo)(()=>U.filter(e=>e.status===`vulnerable`).length,[U]),xe=l.trim()!==``||d!==`all`||p!==`all`||h,Se=(0,k.useCallback)(()=>{u(``),f(`all`),m(`all`),g(!1)},[]),$=!!(o&&![`completed`,`failed`,`cancelled`].includes(o.status)),Ce=(0,k.useCallback)(e=>{b(e),c(`dependencies`)},[]);return(0,A.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,A.jsx)(`header`,{className:`shrink-0 border-b border-border/70 px-4 py-3`,children:(0,A.jsxs)(`div`,{className:`flex flex-wrap items-start gap-3`,children:[(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,A.jsx)(`h1`,{className:`text-base font-bold sm:text-lg`,children:`TechStack`}),(0,A.jsx)(`span`,{className:`border border-info/35 bg-info/10 px-2 py-0.5 font-mono text-[9px] font-bold uppercase text-info`,children:e?`${e.workspaces.length} workspaces`:`no scan yet`}),t&&(0,A.jsx)(`span`,{className:`border border-warning/35 bg-warning/10 px-2 py-0.5 font-mono text-[9px] font-bold uppercase text-warning`,children:`stale >24h`})]}),(0,A.jsx)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground sm:text-xs`,children:e?`${e.targetRoot} · scanned ${new Date(e.createdAt).toLocaleString()}`:`Scan the open project to inventory its dependencies.`})]}),(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,A.jsxs)(T,{variant:`outline`,size:`sm`,onClick:()=>void R(`inventory`),disabled:$,title:`Offline: re-read manifests and lockfiles`,children:[(0,A.jsx)(te,{className:C(`size-3.5`,$&&`animate-spin`)}),(0,A.jsx)(`span`,{className:`hidden sm:inline`,children:`Refresh`})]}),(0,A.jsxs)(T,{size:`sm`,onClick:()=>void R(`analyze`),disabled:$,title:`Check registries and advisories, then interpret the results with the model`,children:[(0,A.jsx)(a,{className:`size-3.5`}),`Analyze`]}),$&&(0,A.jsx)(T,{variant:`ghost`,size:`icon`,onClick:()=>void z(),"aria-label":`Cancel job`,children:(0,A.jsx)(ee,{className:`size-4`})}),(0,A.jsx)(T,{variant:`ghost`,size:`icon`,onClick:()=>e&&_e(e),disabled:!e,"aria-label":`Export snapshot as JSON`,title:`Export snapshot as JSON`,children:(0,A.jsx)(ne,{className:`size-4`})})]})]})}),e&&(0,A.jsxs)(`div`,{className:`grid shrink-0 grid-cols-2 gap-px border-b border-border/70 bg-border/60 sm:grid-cols-4`,children:[(0,A.jsx)(K,{label:`Dependencies`,value:U.length,hint:`${X.length} visible`}),(0,A.jsx)(K,{label:`Outdated`,value:ye,hint:`majors behind`,tone:ye>0?`warning`:`success`}),(0,A.jsx)(K,{label:`Vulnerable`,value:be,hint:`known advisories`,tone:be>0?`destructive`:`success`}),(0,A.jsx)(K,{label:`Findings`,value:W.length,hint:`${ve} need attention`,tone:W.length>0?`info`:`default`})]}),($||i)&&(0,A.jsxs)(`div`,{className:`shrink-0 border-b border-border/70 px-4 py-2`,"aria-live":`polite`,children:[$&&o&&(0,A.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 text-xs text-info`,children:[(0,A.jsx)(r,{className:`size-3.5 animate-spin`}),(0,A.jsx)(`span`,{className:`font-mono`,children:o.status}),o.progress&&(0,A.jsxs)(`span`,{className:`text-muted-foreground`,children:[o.progress.completed,`/`,o.progress.total]})]}),i&&(0,A.jsxs)(`div`,{role:`alert`,className:`flex items-center gap-2 text-xs text-destructive`,children:[(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>void L(),className:`underline`,children:`Retry`})]})]}),n&&!e?(0,A.jsx)(Q,{}):e?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`nav`,{className:`flex shrink-0 gap-1 border-b border-border/70 px-2`,children:ue.map(e=>(0,A.jsxs)(`button`,{type:`button`,onClick:()=>c(e.id),"aria-current":s===e.id,className:C(`border-b-2 px-3 py-2 text-xs font-medium transition-colors`,s===e.id?`border-primary text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:[e.label,e.id===`findings`&&W.length>0&&(0,A.jsx)(`span`,{className:`ml-1.5 font-mono text-[10px] tabular-nums text-muted-foreground`,children:W.length})]},e.id))}),s===`dependencies`&&(0,A.jsxs)(`div`,{className:`grid min-h-0 flex-1 md:grid-cols-[minmax(340px,1fr)_minmax(0,1.15fr)]`,children:[(0,A.jsxs)(`section`,{className:C(`min-h-0 border-r border-border/70`,Z?`hidden md:flex md:flex-col`:`flex flex-col`),"aria-label":`Dependency list`,children:[(0,A.jsx)(le,{searchQuery:l,ecosystemFilter:d,statusFilter:p,directOnly:h,sort:_,hasFilters:xe,ecosystems:q,statuses:J,visibleCount:X.length,totalCount:U.length,onSearchChange:u,onEcosystemFilterChange:f,onStatusFilterChange:m,onToggleDirectOnly:()=>g(e=>!e),onSortChange:v,onClearFilters:Se}),(0,A.jsx)(se,{dependencies:X,selectedId:y,hasDependencies:U.length>0,coverageByWorkspaceId:Y,onSelect:e=>b(e.id)})]}),(0,A.jsx)(`section`,{className:C(`min-h-0`,Z?`flex flex-col`:`hidden md:flex md:flex-col`),"aria-label":`Dependency detail`,children:Z?(0,A.jsx)(oe,{dependency:Z,findings:de,deepDive:E,onDeepDive:B,onBack:()=>b(null),coverage:Y.get(Z.workspaceId)}):(0,A.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,A.jsx)(`p`,{className:`max-w-xs text-xs text-muted-foreground`,children:`Select a dependency to see its versions, evidence, and findings.`})})})]}),s===`findings`&&(0,A.jsx)(ce,{findings:W,dependenciesById:G,onSelectDependency:Ce}),s===`workspaces`&&(0,A.jsx)(me,{snapshot:e}),s===`trends`&&(0,A.jsx)(fe,{trend:O}),s===`remediation`&&(0,A.jsx)(pe,{plan:ie,approved:N,applying:F,onToggle:e=>P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onApply:()=>void V()})]}):(0,A.jsx)(he,{onScan:()=>void R(`inventory`),disabled:$})]})}function fe({trend:e}){return e?(0,A.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,A.jsxs)(`p`,{className:`mb-3 text-xs text-muted-foreground`,children:[e.snapshots,` snapshots`,e.vulnerabilityHalfLifeMs===void 0?``:` · vulnerability half-life ${(e.vulnerabilityHalfLifeMs/864e5).toFixed(1)} days`]}),(0,A.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.points.map(e=>(0,A.jsxs)(`div`,{className:`grid grid-cols-4 border border-border/70 bg-card/40 p-2 text-xs`,children:[(0,A.jsx)(`span`,{children:new Date(e.createdAt).toLocaleDateString()}),(0,A.jsxs)(`span`,{children:[e.dependencies,` deps`]}),(0,A.jsxs)(`span`,{className:`text-warning`,children:[e.outdated,` outdated`]}),(0,A.jsxs)(`span`,{className:`text-destructive`,children:[e.vulnerable,` vulnerable`]})]},e.snapshotId))})]}):(0,A.jsx)(Q,{})}function pe({plan:e,approved:t,applying:n,onToggle:i,onApply:a}){return e?(0,A.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,A.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.warning}),(0,A.jsxs)(T,{size:`sm`,disabled:t.size===0||n,onClick:a,children:[n&&(0,A.jsx)(r,{className:`size-3.5 animate-spin`}),`Apply `,t.size>0?t.size:``]})]}),(0,A.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.items.map(e=>{let n=`${e.workspaceId}:${e.ecosystem}:${e.dependencyName}:${e.action}`,r=e.action===`replace`||e.action===`investigate`||!Z.has(e.ecosystem);return(0,A.jsxs)(`label`,{className:C(`flex gap-3 border border-border/70 bg-card/40 p-2.5`,r?`cursor-not-allowed opacity-65`:`cursor-pointer`),children:[(0,A.jsx)(`input`,{type:`checkbox`,disabled:r,checked:t.has(n),onChange:()=>i(n)}),(0,A.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,A.jsxs)(`span`,{className:`block font-mono text-xs`,children:[e.dependencyName,` · `,e.action]}),(0,A.jsxs)(`span`,{className:`block text-[10px] text-muted-foreground`,children:[e.currentVersion??`?`,` → `,e.targetVersion??`latest`,` · `,e.rationale]}),r&&(0,A.jsx)(`span`,{className:`block text-[10px] text-warning`,children:`Requires a manual package choice.`})]})]},n)}),e.items.length===0&&(0,A.jsx)(`p`,{className:`p-8 text-center text-xs text-muted-foreground`,children:`No remediation needed.`})]})]}):(0,A.jsx)(Q,{})}function me({snapshot:e}){let t=(0,k.useMemo)(()=>{let t=new Map;for(let n of e.dependencies)t.set(n.workspaceId,(t.get(n.workspaceId)??0)+1);return t},[e]);return e.workspaces.length===0?(0,A.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No workspaces detected.`})}):(0,A.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:(0,A.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.workspaces.map(e=>{let n=z[e.coverage];return(0,A.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2.5`,children:[(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,A.jsxs)(`div`,{className:`min-w-0`,children:[(0,A.jsx)(`p`,{className:`truncate font-mono text-xs text-foreground`,children:e.relativeRoot}),(0,A.jsxs)(`p`,{className:`mt-0.5 flex items-center gap-1 truncate text-[10px] text-muted-foreground`,children:[(0,A.jsx)(F,{ecosystem:e.ecosystem}),(0,A.jsx)(`span`,{children:P(e.ecosystem).label}),e.packageManager?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,A.jsx)(`span`,{children:e.packageManager})]}):null,(0,A.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,A.jsxs)(`span`,{children:[t.get(e.id)??0,` deps`]})]})]}),(0,A.jsx)(`span`,{className:C(`shrink-0 border px-1.5 py-0.5 text-[10px] font-medium`,n.badge),children:n.label})]}),e.manifests.length>0&&(0,A.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1`,children:e.manifests.map(e=>(0,A.jsx)(`span`,{className:`border border-border/70 bg-background/45 px-1.5 py-0.5 font-mono text-[9px] text-muted-foreground`,children:e.split(/[/\\]/).pop()},e))})]},e.id)})})})}function Q(){return(0,A.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,A.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,A.jsx)(r,{className:`size-5 animate-spin text-muted-foreground`}),(0,A.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Loading snapshot…`})]})})}function he({onScan:e,disabled:t}){let n=(0,k.useMemo)(()=>Object.values(M).map(e=>e.label).join(`, `),[]);return(0,A.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,A.jsxs)(`div`,{className:`flex max-w-md flex-col items-center gap-3 text-center`,children:[(0,A.jsx)(`div`,{className:`flex size-14 items-center justify-center border border-info/25 bg-info/5 text-info`,children:(0,A.jsx)(i,{className:`size-6`})}),(0,A.jsx)(`h2`,{className:`text-sm font-semibold`,children:`No inventory yet`}),(0,A.jsxs)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[`TechStack reads every manifest and lockfile in the open project — `,n,` — and compares what you have against the upstream registries.`]}),(0,A.jsxs)(T,{size:`sm`,onClick:e,disabled:t,children:[(0,A.jsx)(te,{className:C(`size-3.5`,t&&`animate-spin`)}),`Scan this project`]})]})})}function ge(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))}function _e(e){let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`techstack.json`,r.click(),URL.revokeObjectURL(n)}export{de as TechStackView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{$ as t,N as n,et as r,wa as i}from"./vendor-BTTkQ9Tn.js";import{t as a}from"./utils-CwJvjOcH.js";var o=e(i(),1),s=r(),c=n(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-[background-color,border-color,color,box-shadow,transform] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:translate-y-px`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-sm shadow-primary/15 hover:bg-primary/90 hover:shadow-md hover:shadow-primary/20`,destructive:`bg-destructive text-destructive-foreground shadow-sm shadow-destructive/15 hover:bg-destructive/90`,outline:`border border-input bg-card/70 shadow-sm hover:border-primary/35 hover:bg-accent/70 hover:text-accent-foreground`,secondary:`border border-border/60 bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent/70 hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-10 px-4 py-2`,sm:`h-9 rounded-md px-3`,lg:`h-11 rounded-md px-8`,icon:`h-10 w-10`}},defaultVariants:{variant:`default`,size:`default`}}),l=o.forwardRef(({className:e,variant:n,size:r,asChild:i=!1,...o},l)=>(0,s.jsx)(i?t:`button`,{className:a(c({variant:n,size:r,className:e})),ref:l,...o}));l.displayName=`Button`;export{l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{va as e}from"./vendor-BTTkQ9Tn.js";var t=e(e=>({generation:0,lastUpdatedAt:null,notifyIndexUpdated(t=Date.now()){e(e=>({generation:e.generation+1,lastUpdatedAt:t}))}}));export{t};
|