@runtimescope/collector 0.10.11 → 0.10.13
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/dashboard-assets/assets/{api-map-page-DHlcR_sh.js → api-map-page-Btbazs5z.js} +1 -1
- package/dist/dashboard-assets/assets/{badge-BGgXl2qy.js → badge-BOfEUuSW.js} +1 -1
- package/dist/dashboard-assets/assets/{breadcrumbs-page-BK-FB2nG.js → breadcrumbs-page-ahYuYyrd.js} +1 -1
- package/dist/dashboard-assets/assets/{capex-page-BVJ3T1W4.js → capex-page-H_aV7VU6.js} +1 -1
- package/dist/dashboard-assets/assets/{chevron-right-D0z93_PM.js → chevron-right-Df1qu9CE.js} +1 -1
- package/dist/dashboard-assets/assets/{circle-check-big-DMEGTtSI.js → circle-check-big-Dd6W5_do.js} +1 -1
- package/dist/dashboard-assets/assets/{clock-BZReVxQC.js → clock-CmDPWLyG.js} +1 -1
- package/dist/dashboard-assets/assets/{code-block-BfLeZt-6.js → code-block-D47Pz1qB.js} +1 -1
- package/dist/dashboard-assets/assets/{console-page-DMgLtlCk.js → console-page-B3sYOQK9.js} +1 -1
- package/dist/dashboard-assets/assets/{data-table-CxVXG3zy.js → data-table-A2Iq_hk5.js} +1 -1
- package/dist/dashboard-assets/assets/{database-page-BmpNk_GJ.js → database-page-DYOGNtgK.js} +1 -1
- package/dist/dashboard-assets/assets/{detail-panel-CxidKK1j.js → detail-panel-YWSVnqP_.js} +1 -1
- package/dist/dashboard-assets/assets/{dollar-sign-DqZoTS1i.js → dollar-sign-BDj484XE.js} +1 -1
- package/dist/dashboard-assets/assets/{download-OeUZzFM9.js → download-CwvkYJyJ.js} +1 -1
- package/dist/dashboard-assets/assets/{empty-config-state-BRw-Dnk-.js → empty-config-state-ReVUjdJ_.js} +1 -1
- package/dist/dashboard-assets/assets/{events-page-Bhde5vnj.js → events-page-d6_fhDSn.js} +1 -1
- package/dist/dashboard-assets/assets/{export-button-BioZ3ot5.js → export-button-D7y2ugNf.js} +1 -1
- package/dist/dashboard-assets/assets/{file-text-CTqS_5sj.js → file-text-h8kcLd2l.js} +1 -1
- package/dist/dashboard-assets/assets/{filter-bar-CCwrTxz_.js → filter-bar-CP39inkf.js} +1 -1
- package/dist/dashboard-assets/assets/{folder-open-g1ZHHoW-.js → folder-open-D-HQTMMw.js} +1 -1
- package/dist/dashboard-assets/assets/{git-page-drqH-ymG.js → git-page-5wVisusM.js} +1 -1
- package/dist/dashboard-assets/assets/{hard-drive-DVtZVR9y.js → hard-drive-D8jrlixH.js} +1 -1
- package/dist/dashboard-assets/assets/{home-page-Bro6iPXa.js → home-page-lMWZHIMB.js} +1 -1
- package/dist/dashboard-assets/assets/{index-DgQg-mjd.js → index-CUDottTv.js} +3 -3
- package/dist/dashboard-assets/assets/{info-aicvFsRA.js → info-C0v7mgTM.js} +1 -1
- package/dist/dashboard-assets/assets/{infra-page-CXFCwaut.js → infra-page-Cwb8--Fc.js} +1 -1
- package/dist/dashboard-assets/assets/{issues-page-207U1dk-.js → issues-page-8abUxnvT.js} +1 -1
- package/dist/dashboard-assets/assets/{json-viewer-CtsL_JTK.js → json-viewer-Dup5M0px.js} +1 -1
- package/dist/dashboard-assets/assets/{kitchen-sink-BN8WXBVu.js → kitchen-sink-DmOR6KnI.js} +1 -1
- package/dist/dashboard-assets/assets/{memory-page-xoARxvSA.js → memory-page-CnpiwsEL.js} +1 -1
- package/dist/dashboard-assets/assets/{message-square-DY6473o6.js → message-square-Dwj0jRjI.js} +1 -1
- package/dist/dashboard-assets/assets/{metric-card-BDGLEpmZ.js → metric-card-DE3zVnFg.js} +1 -1
- package/dist/dashboard-assets/assets/{minus-CepSrXzu.js → minus-BzY257S7.js} +1 -1
- package/dist/dashboard-assets/assets/{network-page-CCASVWTx.js → network-page-CiQu5Dem.js} +1 -1
- package/dist/dashboard-assets/assets/{notes-page-Bw8s5HXO.js → notes-page-XazIKqZP.js} +1 -1
- package/dist/dashboard-assets/assets/{overview-page-If7s1dBy.js → overview-page-j5X9SBqW.js} +1 -1
- package/dist/dashboard-assets/assets/{performance-page-Ch3umaz-.js → performance-page-ImE9xvEt.js} +1 -1
- package/dist/dashboard-assets/assets/{play-DSlXvNRl.js → play-Cx2BEZVZ.js} +1 -1
- package/dist/dashboard-assets/assets/{processes-page-C2RwU22t.js → processes-page-BIMoApg0.js} +1 -1
- package/dist/dashboard-assets/assets/{project-view-CFMjSV9u.js → project-view-DnnhNMhS.js} +3 -3
- package/dist/dashboard-assets/assets/{renders-page-Ca4xJRtx.js → renders-page-C9THhZZ3.js} +1 -1
- package/dist/dashboard-assets/assets/{rules-page-Iam5wymd.js → rules-page-CBgSauuM.js} +1 -1
- package/dist/dashboard-assets/assets/{runtime-page-DEbhzxha.js → runtime-page-B7b2m1KH.js} +1 -1
- package/dist/dashboard-assets/assets/{save-CCeVXlI4.js → save-BGeL2PJM.js} +1 -1
- package/dist/dashboard-assets/assets/{sdk-page-BoPzW-t_.js → sdk-page-C2D4FU-Y.js} +1 -1
- package/dist/dashboard-assets/assets/{sessions-page-DSve7fIB.js → sessions-page-BYNnSmUH.js} +1 -1
- package/dist/dashboard-assets/assets/{sessions-page-CIPs23pt.js → sessions-page-VWQ2b-LR.js} +1 -1
- package/dist/dashboard-assets/assets/{settings-page-DuzVTOPn.js → settings-page-B2geIpMf.js} +1 -1
- package/dist/dashboard-assets/assets/{sparkline-DoDs4Mh8.js → sparkline-BYGr_Iny.js} +1 -1
- package/dist/dashboard-assets/assets/{square-DiX9jH4C.js → square-C1plLKPb.js} +1 -1
- package/dist/dashboard-assets/assets/{state-page-CqiOtZuw.js → state-page-CQDLPZ5t.js} +1 -1
- package/dist/dashboard-assets/assets/{status-dot-C-xjt4D6.js → status-dot-C1nxHZIG.js} +1 -1
- package/dist/dashboard-assets/assets/{tabs-yqhh6iCp.js → tabs-BoJRkfaU.js} +1 -1
- package/dist/dashboard-assets/assets/{tag-4Cn073OD.js → tag-Czqgl1tA.js} +1 -1
- package/dist/dashboard-assets/assets/{tasks-page-erlKdBtX.js → tasks-page-sjVxAPDG.js} +1 -1
- package/dist/dashboard-assets/assets/{textarea-BROdxV-a.js → textarea-DAwdLdON.js} +1 -1
- package/dist/dashboard-assets/assets/{topbar-DJt5eMx5.js → topbar-892TvyNb.js} +1 -1
- package/dist/dashboard-assets/assets/{trash-2-rsBJ0FiG.js → trash-2-C4Tvwfqn.js} +1 -1
- package/dist/dashboard-assets/assets/{use-connected-c8-oDf2s.js → use-connected-3Ljk-Uwv.js} +1 -1
- package/dist/dashboard-assets/assets/{wifi-omZdmnyZ.js → wifi-B9CHDUUG.js} +1 -1
- package/dist/dashboard-assets/assets/{zap-BaSm59wW.js → zap-D8s7B8fi.js} +1 -1
- package/dist/dashboard-assets/index.html +1 -1
- package/package.json +1 -1
package/dist/dashboard-assets/assets/{processes-page-C2RwU22t.js → processes-page-BIMoApg0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,q as m,j as e,B as b,R as f,F as y,c,H as v}from"./index-
|
|
1
|
+
import{r as j,q as m,j as e,B as b,R as f,F as y,c,H as v}from"./index-CUDottTv.js";import{T as N}from"./topbar-892TvyNb.js";import{B as x}from"./badge-BOfEUuSW.js";import"./textarea-DAwdLdON.js";import{D as h}from"./data-table-A2Iq_hk5.js";import{K as l}from"./metric-card-DE3zVnFg.js";import{S as o}from"./status-dot-C1nxHZIG.js";import{u as k}from"./use-connected-3Ljk-Uwv.js";import{H as w}from"./hard-drive-D8jrlixH.js";import{S as P}from"./square-C1plLKPb.js";import"./sparkline-BYGr_Iny.js";import"./minus-BzY257S7.js";function H(){const[d,u]=j.useState("processes");k();const t=m(s=>s.processes),n=m(s=>s.ports),p=t.reduce((s,r)=>s+(r.cpuPercent??0),0),i=t.reduce((s,r)=>s+(r.memoryMB??0),0),a=t.filter(s=>s.isOrphaned).length;return e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsx(N,{tabs:[{id:"processes",label:`Processes (${t.length})`},{id:"ports",label:`Ports (${n.length})`}],activeTab:d,onTabChange:u}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"p-6 space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[e.jsx(l,{icon:b,label:"Processes",value:String(t.length),footerLabel:`${a} orphaned`,changeValue:`${t.length-a} active`,changeDir:"neutral"}),e.jsx(l,{icon:f,label:"Ports Bound",value:String(n.length),footerLabel:"Across all projects"}),e.jsx(l,{icon:y,label:"Total CPU",value:p.toFixed(1),unit:"%",sparkColor:p>50?"var(--color-amber)":"var(--color-green)",footerLabel:"Combined usage"}),e.jsx(l,{icon:w,label:"Total Memory",value:String(Math.round(i)),unit:"MB",sparkColor:i>2048?"var(--color-amber)":"var(--color-blue)",footerLabel:`${(i/1024).toFixed(1)} GB total`})]}),e.jsxs("div",{className:"border border-border-strong rounded-lg overflow-hidden bg-bg-surface",children:[d==="processes"&&e.jsx(h,{columns:[{key:"type",header:"Type",width:"100px",render:s=>e.jsx(x,{size:"sm",children:s.type})},{key:"command",header:"Command",mono:!0,render:s=>e.jsx("span",{className:"font-mono text-[12px] text-text-secondary truncate block max-w-[300px]",children:s.command})},{key:"pid",header:"PID",width:"70px",mono:!0,render:s=>e.jsx("span",{className:"tabular-nums text-text-muted",children:s.pid})},{key:"cpuPercent",header:"CPU",width:"90px",align:"right",render:s=>{const r=s.cpuPercent,g=r>40?"bg-red":r>20?"bg-amber":"bg-green";return e.jsxs("span",{className:"flex items-center justify-end gap-2",children:[e.jsxs("span",{className:c("tabular-nums font-mono text-[12px]",r>40?"text-red":r>20?"text-amber":""),children:[r.toFixed(1),"%"]}),e.jsx("span",{className:"w-10 h-1 bg-bg-overlay rounded-full overflow-hidden",children:e.jsx("span",{className:c("block h-full rounded-full",g),style:{width:`${Math.min(r,100)}%`}})})]})}},{key:"memoryMB",header:"Memory",width:"90px",align:"right",mono:!0,render:s=>e.jsxs("span",{className:c("tabular-nums",s.memoryMB>300?"text-amber":""),children:[s.memoryMB," MB"]})},{key:"ports",header:"Ports",width:"100px",mono:!0,render:s=>e.jsx("span",{className:"text-text-tertiary tabular-nums",children:(s.ports||[]).join(", ")||"—"})},{key:"isOrphaned",header:"Status",width:"100px",render:s=>s.isOrphaned?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(o,{color:"red",size:"sm",pulse:!0}),e.jsx("span",{className:"text-red text-[12px] font-medium",children:"Orphaned"})]}):e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(o,{color:"green",size:"sm"}),e.jsx("span",{className:"text-green text-[12px] font-medium",children:"Running"})]})},{key:"actions",header:"",width:"50px",sortable:!1,render:s=>e.jsx("button",{type:"button",onClick:async r=>{r.stopPropagation(),await v(s.pid)},className:"p-1.5 rounded-md hover:bg-red-muted text-text-disabled hover:text-red transition-colors cursor-pointer",title:"Kill process",children:e.jsx(P,{size:12})})}],data:t,footer:e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:[t.length," processes • ",t.length-a," active"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(o,{color:"green",size:"sm"})," ",t.length-a," Running"]}),a>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(o,{color:"red",size:"sm"})," ",a," Orphaned"]})]})]})}),d==="ports"&&e.jsx(h,{columns:[{key:"port",header:"Port",width:"80px",mono:!0,render:s=>e.jsxs("span",{className:"font-bold text-accent",children:[":",s.port]})},{key:"pid",header:"PID",width:"70px",mono:!0,render:s=>e.jsx("span",{className:"text-text-muted",children:s.pid})},{key:"process",header:"Process"},{key:"type",header:"Type",width:"100px",render:s=>e.jsx(x,{size:"sm",children:s.type})},{key:"project",header:"Project",width:"150px",render:s=>e.jsx("span",{className:"text-text-tertiary",children:s.project||"—"})},{key:"status",header:"Status",width:"90px",sortable:!1,render:()=>e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(o,{color:"green",size:"sm"}),e.jsx("span",{className:"text-green text-[12px] font-medium",children:"Listening"})]})}],data:n,defaultSort:{key:"port",direction:"asc"},footer:e.jsxs("span",{children:[n.length," ports bound"]})})]})]})})]})}export{H as ProcessesPage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/runtime-page-
|
|
2
|
-
import{a as k,u as j,b as x,j as e,E as A,r as o,L as R,C as z,c as _,f as I,X as D,P as w,d as y,e as T,g as O,s as V,h as M,i as q,_ as f}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/runtime-page-B7b2m1KH.js","assets/index-CUDottTv.js","assets/index-e2kYo9r7.css","assets/tabs-BoJRkfaU.js","assets/textarea-DAwdLdON.js","assets/overview-page-j5X9SBqW.js","assets/zap-D8s7B8fi.js","assets/metric-card-DE3zVnFg.js","assets/sparkline-BYGr_Iny.js","assets/minus-BzY257S7.js","assets/wifi-B9CHDUUG.js","assets/clock-CmDPWLyG.js","assets/hard-drive-D8jrlixH.js","assets/use-connected-3Ljk-Uwv.js","assets/issue-detector-CH2FjMfV.js","assets/network-page-CiQu5Dem.js","assets/topbar-892TvyNb.js","assets/badge-BOfEUuSW.js","assets/data-table-A2Iq_hk5.js","assets/detail-panel-YWSVnqP_.js","assets/filter-bar-CP39inkf.js","assets/status-dot-C1nxHZIG.js","assets/download-CwvkYJyJ.js","assets/export-button-D7y2ugNf.js","assets/format-CF_gowqw.js","assets/console-page-B3sYOQK9.js","assets/json-viewer-Dup5M0px.js","assets/chevron-right-Df1qu9CE.js","assets/info-C0v7mgTM.js","assets/renders-page-C9THhZZ3.js","assets/empty-config-state-ReVUjdJ_.js","assets/state-page-CQDLPZ5t.js","assets/performance-page-ImE9xvEt.js","assets/issues-page-8abUxnvT.js","assets/api-map-page-Btbazs5z.js","assets/database-page-DYOGNtgK.js","assets/code-block-D47Pz1qB.js","assets/processes-page-BIMoApg0.js","assets/square-C1plLKPb.js","assets/infra-page-Cwb8--Fc.js","assets/sessions-page-BYNnSmUH.js","assets/events-page-d6_fhDSn.js","assets/breadcrumbs-page-ahYuYyrd.js","assets/tag-Czqgl1tA.js","assets/play-Cx2BEZVZ.js","assets/tasks-page-sjVxAPDG.js","assets/folder-open-D-HQTMMw.js","assets/file-text-h8kcLd2l.js","assets/circle-check-big-Dd6W5_do.js","assets/trash-2-C4Tvwfqn.js","assets/sessions-page-VWQ2b-LR.js","assets/message-square-Dwj0jRjI.js","assets/dollar-sign-BDj484XE.js","assets/notes-page-XazIKqZP.js","assets/memory-page-CnpiwsEL.js","assets/save-BGeL2PJM.js","assets/rules-page-CBgSauuM.js","assets/capex-page-H_aV7VU6.js","assets/git-page-5wVisusM.js","assets/sdk-page-C2D4FU-Y.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as k,u as j,b as x,j as e,E as A,r as o,L as R,C as z,c as _,f as I,X as D,P as w,d as y,e as T,g as O,s as V,h as M,i as q,_ as f}from"./index-CUDottTv.js";import{B as C}from"./badge-BOfEUuSW.js";import"./textarea-DAwdLdON.js";import{S}from"./status-dot-C1nxHZIG.js";import{T as K}from"./tag-Czqgl1tA.js";import{S as E}from"./square-C1plLKPb.js";import{P as B}from"./play-Cx2BEZVZ.js";/**
|
|
3
3
|
* @license lucide-react v0.469.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
@@ -14,4 +14,4 @@ import{a as k,u as j,b as x,j as e,E as A,r as o,L as R,C as z,c as _,f as I,X a
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const H=k("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),G=o.lazy(()=>f(()=>import("./runtime-page-DEbhzxha.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])).then(t=>({default:t.RuntimePage}))),U=o.lazy(()=>f(()=>import("./tasks-page-erlKdBtX.js"),__vite__mapDeps([45,1,2,17,4,46,22,47,48,49,21,43,38,44])).then(t=>({default:t.TasksPage}))),X=o.lazy(()=>f(()=>import("./sessions-page-CIPs23pt.js"),__vite__mapDeps([50,1,2,17,4,18,19,7,8,9,51,52,11,6])).then(t=>({default:t.PmSessionsPage}))),F=o.lazy(()=>f(()=>import("./notes-page-Bw8s5HXO.js"),__vite__mapDeps([53,1,2,4,49])).then(t=>({default:t.NotesPage}))),J=o.lazy(()=>f(()=>import("./memory-page-xoARxvSA.js"),__vite__mapDeps([54,1,2,4,47,22,49,55])).then(t=>({default:t.MemoryPage}))),Q=o.lazy(()=>f(()=>import("./rules-page-Iam5wymd.js"),__vite__mapDeps([56,1,2,4,3,47,55])).then(t=>({default:t.RulesPage}))),W=o.lazy(()=>f(()=>import("./capex-page-BVJ3T1W4.js"),__vite__mapDeps([57,1,2,17,4,18,7,8,9,48,22,11,52])).then(t=>({default:t.CapexPage}))),Y=o.lazy(()=>f(()=>import("./git-page-drqH-ymG.js"),__vite__mapDeps([58,1,2,4,46,9,27,17,21,43,38,44])).then(t=>({default:t.GitPage}))),Z=o.lazy(()=>f(()=>import("./sdk-page-BoPzW-t_.js"),__vite__mapDeps([59,1,2,17,4,21,10])).then(t=>({default:t.SdkPage})));function ee({projectId:t,category:a}){const[r,i]=o.useState(!1),[u,g]=o.useState(""),h=x(l=>l.categories),c=o.useRef(null);o.useEffect(()=>{function l(b){c.current&&!c.current.contains(b.target)&&i(!1)}return r&&document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[r]);const d=l=>{x.getState().updateProject(t,{category:l??void 0}),i(!1)},p=()=>{const l=u.trim();l&&(x.getState().updateProject(t,{category:l}),x.getState().fetchCategories(),g(""),i(!1))};return e.jsxs("div",{ref:c,className:"relative inline-block",children:[e.jsxs("button",{type:"button",onClick:()=>i(!r),className:_("inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium transition-colors cursor-pointer",a?"bg-purple-500/15 text-purple-400 hover:bg-purple-500/25":"bg-bg-surface text-text-muted hover:bg-bg-hover"),children:[e.jsx(K,{size:10}),a||"Uncategorized",e.jsx(z,{size:10})]}),r&&e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 w-48 rounded-lg border border-border-default bg-bg-elevated shadow-lg overflow-hidden",children:[e.jsxs("div",{className:"py-1",children:[a&&e.jsx("button",{type:"button",onClick:()=>d(null),className:"w-full px-3 py-1.5 text-left text-xs text-text-muted hover:bg-bg-hover cursor-pointer",children:"Remove category"}),h.map(l=>e.jsx("button",{type:"button",onClick:()=>d(l),className:_("w-full px-3 py-1.5 text-left text-xs hover:bg-bg-hover cursor-pointer",l===a?"text-accent font-medium":"text-text-primary"),children:l},l))]}),e.jsxs("div",{className:"border-t border-border-muted px-3 py-2 flex gap-1.5",children:[e.jsx("input",{type:"text",value:u,onChange:l=>g(l.target.value),onKeyDown:l=>l.key==="Enter"&&p(),placeholder:"New category...",className:"flex-1 bg-transparent text-xs text-text-primary placeholder:text-text-muted outline-none"}),u.trim()&&e.jsx("button",{type:"button",onClick:p,className:"text-xs text-accent font-medium cursor-pointer",children:"Add"})]})]})]})}function te({project:t}){const a=j(m=>m.projects),r=y(m=>m.servers.get(t.id)),[i,u]=o.useState(!1),g=o.useRef(!1),h=T(a,{runtimescopeProject:t.runtimescopeProject,runtimeApps:t.runtimeApps,name:t.name}),c=!!(h!=null&&h.isConnected),d=r==null?void 0:r.status,p=(r==null?void 0:r.port)??null,b=c||(d==="running"||d==="starting");o.useEffect(()=>{p&&!g.current&&d==="running"&&(g.current=!0,window.open(`http://localhost:${p}`,"_blank")),(d==="idle"||d==="stopped"||d==="crashed")&&(g.current=!1)},[p,d]);const v=o.useCallback(async()=>{u(!0),y.getState().setOptimisticStarting(t.id);try{const m=await O(t.id);await V(t.id,{script:(m==null?void 0:m.recommended)??"dev"}),M()}catch{y.getState().setStatus(t.id,"idle")}u(!1)},[t.id]),P=o.useCallback(async()=>{u(!0);try{await q(t.id),y.getState().setStatus(t.id,"stopped")}catch{}u(!1)},[t.id]);return t.path?d==="starting"?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs(C,{variant:"amber",size:"sm",children:[e.jsx(H,{size:10,className:"animate-spin"}),"Starting..."]}),e.jsx("button",{type:"button",onClick:P,disabled:i,className:"p-1 rounded hover:bg-bg-hover text-text-muted hover:text-red transition-colors cursor-pointer",title:"Stop dev server",children:e.jsx(E,{size:12})})]}):b?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs(C,{variant:"green",size:"sm",children:[e.jsx(S,{color:"green",size:"sm",pulse:!0}),p?`Running on :${p}`:"Running"]}),p&&e.jsx("a",{href:`http://localhost:${p}`,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded hover:bg-bg-hover text-text-muted hover:text-accent transition-colors",title:"Open in browser",children:e.jsx($,{size:12})}),e.jsx("button",{type:"button",onClick:P,disabled:i,className:"p-1 rounded hover:bg-bg-hover text-text-muted hover:text-red transition-colors cursor-pointer",title:"Stop dev server",children:e.jsx(E,{size:12})})]}):t.sdkInstalled?e.jsxs("button",{type:"button",onClick:v,disabled:i,className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-bg-surface text-text-muted hover:bg-bg-hover hover:text-text-primary transition-colors cursor-pointer",children:[e.jsx(B,{size:10}),i?"Starting...":"Start"]}):null:null}function se({project:t}){const[a,r]=o.useState(!1),[i,u]=o.useState(""),g=j(s=>s.projects),h=o.useRef(null),c=t.runtimeApps??(t.runtimescopeProject?[t.runtimescopeProject]:[]),d=I(g,{runtimescopeProject:t.runtimescopeProject,runtimeApps:t.runtimeApps,name:t.name});o.useEffect(()=>{function s(n){h.current&&!h.current.contains(n.target)&&r(!1)}return a&&document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a]);const p=()=>{const s=i.trim();if(!s||c.includes(s))return;const n=[...c,s];x.getState().updateProject(t.id,{runtimeApps:n}),u("")},l=s=>{const n=c.filter(N=>N!==s);x.getState().updateProject(t.id,{runtimeApps:n.length?n:void 0})},b=d.filter(s=>s.isConnected),v=g.filter(s=>!c.some(n=>n.toLowerCase()===s.appName.toLowerCase())),m=x.getState().projects.filter(s=>s.id!==t.id&&(s.sdkInstalled||s.runtimescopeProject)).map(s=>s.runtimescopeProject??s.name).filter(s=>!c.some(n=>n.toLowerCase()===s.toLowerCase())&&!v.some(n=>n.appName.toLowerCase()===s.toLowerCase()));return c.length===0&&!a?e.jsxs("button",{type:"button",onClick:()=>r(!0),className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-bg-surface text-text-muted hover:bg-bg-hover transition-colors cursor-pointer",children:[e.jsx(L,{size:10}),"Link Apps"]}):e.jsxs("div",{ref:h,className:"relative inline-block",children:[e.jsxs("button",{type:"button",onClick:()=>r(!a),className:_("inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium transition-colors cursor-pointer",b.length>0?"bg-green-500/15 text-green-400 hover:bg-green-500/25":"bg-bg-surface text-text-muted hover:bg-bg-hover"),children:[e.jsx(L,{size:10}),c.length," app",c.length!==1?"s":"",b.length>0&&` (${b.length} live)`,e.jsx(z,{size:10})]}),a&&e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 w-64 rounded-lg border border-border-default bg-bg-elevated shadow-lg overflow-hidden",children:[e.jsx("div",{className:"py-1",children:c.map(s=>{const n=d.find(N=>N.appName.toLowerCase()===s.toLowerCase());return e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[e.jsx(S,{color:n!=null&&n.isConnected?"green":"gray",size:"sm",pulse:n==null?void 0:n.isConnected}),e.jsx("span",{className:"text-xs text-text-primary flex-1 truncate font-mono",children:s}),e.jsx("button",{type:"button",onClick:()=>l(s),className:"p-0.5 rounded text-text-muted hover:text-red hover:bg-red-muted transition-colors cursor-pointer",children:e.jsx(D,{size:10})})]},s)})}),(v.length>0||m.length>0)&&e.jsxs("div",{className:"border-t border-border-muted py-1",children:[e.jsx("p",{className:"px-3 py-1 text-[10px] text-text-muted uppercase tracking-wider",children:"Available"}),v.map(s=>e.jsxs("button",{type:"button",onClick:()=>{const n=[...c,s.appName];x.getState().updateProject(t.id,{runtimeApps:n})},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-secondary hover:bg-bg-hover cursor-pointer",children:[e.jsx(w,{size:10,className:"text-text-tertiary"}),e.jsx("span",{className:"font-mono truncate",children:s.appName}),s.isConnected&&e.jsx(S,{color:"green",size:"sm",pulse:!0})]},s.appName)),m.map(s=>e.jsxs("button",{type:"button",onClick:()=>{const n=[...c,s];x.getState().updateProject(t.id,{runtimeApps:n})},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-muted hover:bg-bg-hover cursor-pointer",children:[e.jsx(w,{size:10,className:"text-text-tertiary"}),e.jsx("span",{className:"font-mono truncate",children:s}),e.jsx("span",{className:"text-[10px] text-text-tertiary",children:"SDK"})]},s))]}),e.jsxs("div",{className:"border-t border-border-muted px-3 py-2 flex gap-1.5",children:[e.jsx("input",{type:"text",value:i,onChange:s=>u(s.target.value),onKeyDown:s=>s.key==="Enter"&&p(),placeholder:"Add app name...",className:"flex-1 bg-transparent text-xs text-text-primary placeholder:text-text-muted outline-none font-mono"}),i.trim()&&e.jsx("button",{type:"button",onClick:p,className:"text-xs text-accent font-medium cursor-pointer",children:"Add"})]})]})]})}function re(){const t=j(i=>i.selectedPmProject),a=j(i=>i.activeProjectTab);j(i=>i.setActiveProjectTab);const r=x(i=>i.projects.find(u=>u.id===t));return r?e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"px-5 pt-4 pb-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-lg font-semibold text-text-primary",children:r.name}),e.jsx(ee,{projectId:r.id,category:r.category}),e.jsx(se,{project:r}),e.jsx(te,{project:r})]}),r.path&&e.jsx("p",{className:"text-[12px] text-text-muted font-mono truncate mt-0.5",children:r.path})]}),e.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:e.jsxs(o.Suspense,{fallback:e.jsx(R,{rows:8}),children:[a==="tasks"&&e.jsx(U,{projectId:r.id}),a==="git"&&e.jsx(Y,{projectId:r.id,projectPath:r.path}),a==="sessions"&&e.jsx(X,{projectId:r.id}),a==="sdk"&&e.jsx(Z,{project:r}),a==="runtime"&&e.jsx(G,{project:r}),a==="notes"&&e.jsx(F,{projectId:r.id}),a==="memory"&&e.jsx(J,{projectId:r.id,claudeProjectKey:r.claudeProjectKey}),a==="rules"&&e.jsx(Q,{projectId:r.id}),a==="capex"&&e.jsx(W,{projectId:r.id})]})})]}):e.jsx(A,{title:"No Project Selected",description:"Select a project from the header dropdown to get started."})}const ue=Object.freeze(Object.defineProperty({__proto__:null,ProjectView:re},Symbol.toStringTag,{value:"Module"}));export{$ as E,H as L,ue as p};
|
|
17
|
+
*/const H=k("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),G=o.lazy(()=>f(()=>import("./runtime-page-B7b2m1KH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])).then(t=>({default:t.RuntimePage}))),U=o.lazy(()=>f(()=>import("./tasks-page-sjVxAPDG.js"),__vite__mapDeps([45,1,2,17,4,46,22,47,48,49,21,43,38,44])).then(t=>({default:t.TasksPage}))),X=o.lazy(()=>f(()=>import("./sessions-page-VWQ2b-LR.js"),__vite__mapDeps([50,1,2,17,4,18,19,7,8,9,51,52,11,6])).then(t=>({default:t.PmSessionsPage}))),F=o.lazy(()=>f(()=>import("./notes-page-XazIKqZP.js"),__vite__mapDeps([53,1,2,4,49])).then(t=>({default:t.NotesPage}))),J=o.lazy(()=>f(()=>import("./memory-page-CnpiwsEL.js"),__vite__mapDeps([54,1,2,4,47,22,49,55])).then(t=>({default:t.MemoryPage}))),Q=o.lazy(()=>f(()=>import("./rules-page-CBgSauuM.js"),__vite__mapDeps([56,1,2,4,3,47,55])).then(t=>({default:t.RulesPage}))),W=o.lazy(()=>f(()=>import("./capex-page-H_aV7VU6.js"),__vite__mapDeps([57,1,2,17,4,18,7,8,9,48,22,11,52])).then(t=>({default:t.CapexPage}))),Y=o.lazy(()=>f(()=>import("./git-page-5wVisusM.js"),__vite__mapDeps([58,1,2,4,46,9,27,17,21,43,38,44])).then(t=>({default:t.GitPage}))),Z=o.lazy(()=>f(()=>import("./sdk-page-C2D4FU-Y.js"),__vite__mapDeps([59,1,2,17,4,21,10])).then(t=>({default:t.SdkPage})));function ee({projectId:t,category:a}){const[r,i]=o.useState(!1),[u,g]=o.useState(""),h=x(l=>l.categories),c=o.useRef(null);o.useEffect(()=>{function l(b){c.current&&!c.current.contains(b.target)&&i(!1)}return r&&document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[r]);const d=l=>{x.getState().updateProject(t,{category:l??void 0}),i(!1)},p=()=>{const l=u.trim();l&&(x.getState().updateProject(t,{category:l}),x.getState().fetchCategories(),g(""),i(!1))};return e.jsxs("div",{ref:c,className:"relative inline-block",children:[e.jsxs("button",{type:"button",onClick:()=>i(!r),className:_("inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium transition-colors cursor-pointer",a?"bg-purple-500/15 text-purple-400 hover:bg-purple-500/25":"bg-bg-surface text-text-muted hover:bg-bg-hover"),children:[e.jsx(K,{size:10}),a||"Uncategorized",e.jsx(z,{size:10})]}),r&&e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 w-48 rounded-lg border border-border-default bg-bg-elevated shadow-lg overflow-hidden",children:[e.jsxs("div",{className:"py-1",children:[a&&e.jsx("button",{type:"button",onClick:()=>d(null),className:"w-full px-3 py-1.5 text-left text-xs text-text-muted hover:bg-bg-hover cursor-pointer",children:"Remove category"}),h.map(l=>e.jsx("button",{type:"button",onClick:()=>d(l),className:_("w-full px-3 py-1.5 text-left text-xs hover:bg-bg-hover cursor-pointer",l===a?"text-accent font-medium":"text-text-primary"),children:l},l))]}),e.jsxs("div",{className:"border-t border-border-muted px-3 py-2 flex gap-1.5",children:[e.jsx("input",{type:"text",value:u,onChange:l=>g(l.target.value),onKeyDown:l=>l.key==="Enter"&&p(),placeholder:"New category...",className:"flex-1 bg-transparent text-xs text-text-primary placeholder:text-text-muted outline-none"}),u.trim()&&e.jsx("button",{type:"button",onClick:p,className:"text-xs text-accent font-medium cursor-pointer",children:"Add"})]})]})]})}function te({project:t}){const a=j(m=>m.projects),r=y(m=>m.servers.get(t.id)),[i,u]=o.useState(!1),g=o.useRef(!1),h=T(a,{runtimescopeProject:t.runtimescopeProject,runtimeApps:t.runtimeApps,name:t.name}),c=!!(h!=null&&h.isConnected),d=r==null?void 0:r.status,p=(r==null?void 0:r.port)??null,b=c||(d==="running"||d==="starting");o.useEffect(()=>{p&&!g.current&&d==="running"&&(g.current=!0,window.open(`http://localhost:${p}`,"_blank")),(d==="idle"||d==="stopped"||d==="crashed")&&(g.current=!1)},[p,d]);const v=o.useCallback(async()=>{u(!0),y.getState().setOptimisticStarting(t.id);try{const m=await O(t.id);await V(t.id,{script:(m==null?void 0:m.recommended)??"dev"}),M()}catch{y.getState().setStatus(t.id,"idle")}u(!1)},[t.id]),P=o.useCallback(async()=>{u(!0);try{await q(t.id),y.getState().setStatus(t.id,"stopped")}catch{}u(!1)},[t.id]);return t.path?d==="starting"?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs(C,{variant:"amber",size:"sm",children:[e.jsx(H,{size:10,className:"animate-spin"}),"Starting..."]}),e.jsx("button",{type:"button",onClick:P,disabled:i,className:"p-1 rounded hover:bg-bg-hover text-text-muted hover:text-red transition-colors cursor-pointer",title:"Stop dev server",children:e.jsx(E,{size:12})})]}):b?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs(C,{variant:"green",size:"sm",children:[e.jsx(S,{color:"green",size:"sm",pulse:!0}),p?`Running on :${p}`:"Running"]}),p&&e.jsx("a",{href:`http://localhost:${p}`,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded hover:bg-bg-hover text-text-muted hover:text-accent transition-colors",title:"Open in browser",children:e.jsx($,{size:12})}),e.jsx("button",{type:"button",onClick:P,disabled:i,className:"p-1 rounded hover:bg-bg-hover text-text-muted hover:text-red transition-colors cursor-pointer",title:"Stop dev server",children:e.jsx(E,{size:12})})]}):t.sdkInstalled?e.jsxs("button",{type:"button",onClick:v,disabled:i,className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-bg-surface text-text-muted hover:bg-bg-hover hover:text-text-primary transition-colors cursor-pointer",children:[e.jsx(B,{size:10}),i?"Starting...":"Start"]}):null:null}function se({project:t}){const[a,r]=o.useState(!1),[i,u]=o.useState(""),g=j(s=>s.projects),h=o.useRef(null),c=t.runtimeApps??(t.runtimescopeProject?[t.runtimescopeProject]:[]),d=I(g,{runtimescopeProject:t.runtimescopeProject,runtimeApps:t.runtimeApps,name:t.name});o.useEffect(()=>{function s(n){h.current&&!h.current.contains(n.target)&&r(!1)}return a&&document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a]);const p=()=>{const s=i.trim();if(!s||c.includes(s))return;const n=[...c,s];x.getState().updateProject(t.id,{runtimeApps:n}),u("")},l=s=>{const n=c.filter(N=>N!==s);x.getState().updateProject(t.id,{runtimeApps:n.length?n:void 0})},b=d.filter(s=>s.isConnected),v=g.filter(s=>!c.some(n=>n.toLowerCase()===s.appName.toLowerCase())),m=x.getState().projects.filter(s=>s.id!==t.id&&(s.sdkInstalled||s.runtimescopeProject)).map(s=>s.runtimescopeProject??s.name).filter(s=>!c.some(n=>n.toLowerCase()===s.toLowerCase())&&!v.some(n=>n.appName.toLowerCase()===s.toLowerCase()));return c.length===0&&!a?e.jsxs("button",{type:"button",onClick:()=>r(!0),className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium bg-bg-surface text-text-muted hover:bg-bg-hover transition-colors cursor-pointer",children:[e.jsx(L,{size:10}),"Link Apps"]}):e.jsxs("div",{ref:h,className:"relative inline-block",children:[e.jsxs("button",{type:"button",onClick:()=>r(!a),className:_("inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium transition-colors cursor-pointer",b.length>0?"bg-green-500/15 text-green-400 hover:bg-green-500/25":"bg-bg-surface text-text-muted hover:bg-bg-hover"),children:[e.jsx(L,{size:10}),c.length," app",c.length!==1?"s":"",b.length>0&&` (${b.length} live)`,e.jsx(z,{size:10})]}),a&&e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 w-64 rounded-lg border border-border-default bg-bg-elevated shadow-lg overflow-hidden",children:[e.jsx("div",{className:"py-1",children:c.map(s=>{const n=d.find(N=>N.appName.toLowerCase()===s.toLowerCase());return e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[e.jsx(S,{color:n!=null&&n.isConnected?"green":"gray",size:"sm",pulse:n==null?void 0:n.isConnected}),e.jsx("span",{className:"text-xs text-text-primary flex-1 truncate font-mono",children:s}),e.jsx("button",{type:"button",onClick:()=>l(s),className:"p-0.5 rounded text-text-muted hover:text-red hover:bg-red-muted transition-colors cursor-pointer",children:e.jsx(D,{size:10})})]},s)})}),(v.length>0||m.length>0)&&e.jsxs("div",{className:"border-t border-border-muted py-1",children:[e.jsx("p",{className:"px-3 py-1 text-[10px] text-text-muted uppercase tracking-wider",children:"Available"}),v.map(s=>e.jsxs("button",{type:"button",onClick:()=>{const n=[...c,s.appName];x.getState().updateProject(t.id,{runtimeApps:n})},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-secondary hover:bg-bg-hover cursor-pointer",children:[e.jsx(w,{size:10,className:"text-text-tertiary"}),e.jsx("span",{className:"font-mono truncate",children:s.appName}),s.isConnected&&e.jsx(S,{color:"green",size:"sm",pulse:!0})]},s.appName)),m.map(s=>e.jsxs("button",{type:"button",onClick:()=>{const n=[...c,s];x.getState().updateProject(t.id,{runtimeApps:n})},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-muted hover:bg-bg-hover cursor-pointer",children:[e.jsx(w,{size:10,className:"text-text-tertiary"}),e.jsx("span",{className:"font-mono truncate",children:s}),e.jsx("span",{className:"text-[10px] text-text-tertiary",children:"SDK"})]},s))]}),e.jsxs("div",{className:"border-t border-border-muted px-3 py-2 flex gap-1.5",children:[e.jsx("input",{type:"text",value:i,onChange:s=>u(s.target.value),onKeyDown:s=>s.key==="Enter"&&p(),placeholder:"Add app name...",className:"flex-1 bg-transparent text-xs text-text-primary placeholder:text-text-muted outline-none font-mono"}),i.trim()&&e.jsx("button",{type:"button",onClick:p,className:"text-xs text-accent font-medium cursor-pointer",children:"Add"})]})]})]})}function re(){const t=j(i=>i.selectedPmProject),a=j(i=>i.activeProjectTab);j(i=>i.setActiveProjectTab);const r=x(i=>i.projects.find(u=>u.id===t));return r?e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"px-5 pt-4 pb-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-lg font-semibold text-text-primary",children:r.name}),e.jsx(ee,{projectId:r.id,category:r.category}),e.jsx(se,{project:r}),e.jsx(te,{project:r})]}),r.path&&e.jsx("p",{className:"text-[12px] text-text-muted font-mono truncate mt-0.5",children:r.path})]}),e.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:e.jsxs(o.Suspense,{fallback:e.jsx(R,{rows:8}),children:[a==="tasks"&&e.jsx(U,{projectId:r.id}),a==="git"&&e.jsx(Y,{projectId:r.id,projectPath:r.path}),a==="sessions"&&e.jsx(X,{projectId:r.id}),a==="sdk"&&e.jsx(Z,{project:r}),a==="runtime"&&e.jsx(G,{project:r}),a==="notes"&&e.jsx(F,{projectId:r.id}),a==="memory"&&e.jsx(J,{projectId:r.id,claudeProjectKey:r.claudeProjectKey}),a==="rules"&&e.jsx(Q,{projectId:r.id}),a==="capex"&&e.jsx(W,{projectId:r.id})]})})]}):e.jsx(A,{title:"No Project Selected",description:"Select a project from the header dropdown to get started."})}const ue=Object.freeze(Object.defineProperty({__proto__:null,ProjectView:re},Symbol.toStringTag,{value:"Module"}));export{$ as E,H as L,ue as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,q as p,j as e,c as h}from"./index-
|
|
1
|
+
import{r as d,q as p,j as e,c as h}from"./index-CUDottTv.js";import{B as v}from"./badge-BOfEUuSW.js";import{S as g}from"./textarea-DAwdLdON.js";import{D as j}from"./data-table-A2Iq_hk5.js";import{D as N}from"./detail-panel-YWSVnqP_.js";import{S as y}from"./sparkline-BYGr_Iny.js";import{S as C}from"./status-dot-C1nxHZIG.js";import{E as R}from"./empty-config-state-ReVUjdJ_.js";const w={props:"var(--color-blue)",state:"var(--color-green)",context:"var(--color-purple)",parent:"var(--color-amber)",unknown:"var(--color-text-muted)"},k={props:"blue",state:"green",context:"purple",parent:"amber"},D=[{key:"componentName",header:"Component",width:"200px",render:t=>e.jsxs("span",{className:"flex items-center gap-2",children:[t.suspicious&&e.jsx(C,{color:"amber",size:"sm",pulse:!0}),e.jsx("span",{className:"font-medium",children:t.componentName})]})},{key:"renderCount",header:"Renders",width:"100px",render:t=>e.jsx("span",{className:"tabular-nums",children:t.renderCount})},{key:"avgDuration",header:"Avg (ms)",width:"100px",render:t=>e.jsx("span",{className:"tabular-nums",children:t.avgDuration.toFixed(1)})},{key:"lastRenderCause",header:"Cause",width:"100px",render:t=>{const n=t.lastRenderCause||"unknown";return e.jsx(v,{variant:k[n]||"default",size:"sm",children:n})}},{key:"renderVelocity",header:"Velocity/min",width:"120px",render:t=>{const n=t.renderVelocity;return e.jsx("span",{className:h("tabular-nums",n>10?"text-amber":"text-text-secondary"),children:n.toFixed(1)})}},{key:"lastRenderPhase",header:"Phase",width:"80px"}];function z(){const[t,n]=d.useState(""),[c,m]=d.useState(null),f=p(r=>r.initialLoadDone),a=p(r=>r.renders),l=d.useMemo(()=>{if(a.length===0)return[];const r=new Map;for(const o of a)for(const i of o.profiles){const x=r.get(i.componentName);(!x||i.renderCount>x.renderCount)&&r.set(i.componentName,i)}return Array.from(r.values())},[a]),b=d.useMemo(()=>a.length===0?[]:a.map(r=>r.totalRenders),[a]),u=d.useMemo(()=>{if(!t)return l;const r=t.toLowerCase();return l.filter(o=>o.componentName.toLowerCase().includes(r))},[t,l]),s=c!==null?u[c]:null;return e.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:e.jsxs("div",{className:"flex-1 flex min-h-0 overflow-hidden",children:[f&&a.length===0?e.jsx(R,{title:"No Render Data",description:"Render tracking profiles React component renders — counts, velocity, duration, and what triggered each re-render. Requires React development mode.",configHints:[{key:"captureRenders",value:"true",description:"Enable React render profiling"}]}):e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-3 border-b border-border-default",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider",children:"Render Timeline (5 min)"}),e.jsxs("span",{className:"text-[11px] text-text-tertiary tabular-nums",children:[l.reduce((r,o)=>r+o.renderCount,0)," total renders"]})]}),e.jsx(y,{data:b,width:800,height:40,color:"var(--color-purple)"})]}),e.jsx("div",{className:"px-5 py-2.5 border-b border-border-default",children:e.jsx("div",{className:"w-64",children:e.jsx(g,{value:t,onChange:r=>n(r.target.value),placeholder:"Filter components..."})})}),e.jsx(j,{className:"flex-1",columns:D,data:u,selectedIndex:c??void 0,onRowClick:(r,o)=>m(o),defaultSort:{key:"renderCount",direction:"desc"}})]}),e.jsx(N,{open:s!==null,onClose:()=>m(null),title:s==null?void 0:s.componentName,subtitle:s?`${s.renderCount} renders · ${s.avgDuration.toFixed(1)}ms avg`:"",children:s&&e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-bg-elevated rounded-md p-3 border border-border-muted",children:[e.jsx("p",{className:"text-[11px] text-text-muted mb-1",children:"Total Duration"}),e.jsxs("p",{className:"text-lg font-bold tabular-nums",children:[s.totalDuration.toFixed(0),"ms"]})]}),e.jsxs("div",{className:"bg-bg-elevated rounded-md p-3 border border-border-muted",children:[e.jsx("p",{className:"text-[11px] text-text-muted mb-1",children:"Velocity"}),e.jsxs("p",{className:h("text-lg font-bold tabular-nums",s.renderVelocity>10?"text-amber":"text-text-primary"),children:[s.renderVelocity.toFixed(1),"/min"]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Render Cause"}),e.jsxs("div",{className:"bg-bg-elevated rounded-md p-3 border border-border-muted",children:[e.jsx("div",{className:"h-3 flex rounded-full overflow-hidden",children:e.jsx("div",{style:{width:"100%",backgroundColor:w[s.lastRenderCause||"unknown"]},className:"rounded-full"})}),e.jsxs("p",{className:"text-sm text-text-secondary mt-2 capitalize",children:[s.lastRenderCause||"unknown"," — ",s.lastRenderPhase]})]})]}),s.suspicious&&e.jsxs("div",{className:"bg-amber-muted border border-amber-border rounded-md p-3",children:[e.jsx("p",{className:"text-sm font-medium text-amber",children:"Suspicious Render Pattern"}),e.jsx("p",{className:"text-[13px] text-text-secondary mt-1",children:"High render velocity detected. Consider memoization or checking for unstable references."})]})]})})]})})}export{z as RendersPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,r as l,j as e,E as T,c as R}from"./index-
|
|
1
|
+
import{b as n,r as l,j as e,E as T,c as R}from"./index-CUDottTv.js";import{B as k}from"./textarea-DAwdLdON.js";import{T as w}from"./tabs-BoJRkfaU.js";import{F as z}from"./file-text-h8kcLd2l.js";import{S as M}from"./save-BGeL2PJM.js";const U=[{id:"local",label:"Local"},{id:"project",label:"Project"},{id:"global",label:"Global"}],B={global:"~/.claude/CLAUDE.md — Applies to all projects",project:"~/.claude/projects/<key>/CLAUDE.md — Project-specific rules",local:"<project-path>/CLAUDE.md — Local, gitignored rules"};function I({projectId:c}){const t=n(o=>o.rules),j=n(o=>o.rulesLoading),[s,b]=l.useState("local"),[h,r]=l.useState(""),[g,i]=l.useState(""),[C,x]=l.useState(""),[S,d]=l.useState(!1),[y,p]=l.useState(!1),[v,f]=l.useState(!1);l.useEffect(()=>{n.getState().fetchRules(c)},[c]),l.useEffect(()=>{t&&(r(t.global.content),i(t.project.content),x(t.local.content),d(!1),p(!1),f(!1))},[t]);const D={global:h,project:g,local:C},E={global:r,project:i,local:x},N={global:S,project:y,local:v},m={global:d,project:p,local:f},u=D[s],L=N[s],a=t==null?void 0:t[s];function P(o){E[s](o),m[s](!0)}async function A(){await n.getState().saveRule(c,s,u),m[s](!1)}return j&&!t?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Loading rules..."})}):t?e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsx(w,{tabs:U,activeTab:s,onTabChange:o=>b(o)}),e.jsxs("div",{className:"px-4 pt-3 space-y-1 shrink-0",children:[e.jsx("p",{className:"text-xs text-text-muted",children:B[s]}),e.jsx("p",{className:"font-mono text-xs text-text-tertiary",children:a==null?void 0:a.path})]}),e.jsx("textarea",{className:"w-full flex-1 bg-transparent text-text-primary text-sm font-mono p-4 resize-none outline-none border-t border-border-muted mt-3",value:u,onChange:o=>P(o.target.value),spellCheck:!1}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-border-muted",children:[e.jsx("span",{className:R("text-xs",a!=null&&a.exists?"text-text-secondary":"text-text-muted"),children:a!=null&&a.exists?"File exists":"File not found"}),e.jsxs(k,{variant:"primary",size:"sm",disabled:!L,onClick:A,children:[e.jsx(M,{size:14}),"Save"]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(T,{icon:e.jsx(z,{size:32}),title:"No rules available",description:"Could not load CLAUDE.md files for this project."})})}export{I as RulesPage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u,r as n,q as S,d,t as h,j as t,E as v,W as P,e as w,g as N,s as j,h as k,v as T,w as D,C as R,c as I}from"./index-
|
|
1
|
+
import{u,r as n,q as S,d,t as h,j as t,E as v,W as P,e as w,g as N,s as j,h as k,v as T,w as D,C as R,c as I}from"./index-CUDottTv.js";import{T as C}from"./tabs-BoJRkfaU.js";import{B as E}from"./textarea-DAwdLdON.js";import{P as A,O as y}from"./overview-page-j5X9SBqW.js";import{NetworkPage as O}from"./network-page-CiQu5Dem.js";import{ConsolePage as z}from"./console-page-B3sYOQK9.js";import{RendersPage as B}from"./renders-page-C9THhZZ3.js";import{StatePage as M}from"./state-page-CQDLPZ5t.js";import{PerformancePage as W}from"./performance-page-ImE9xvEt.js";import{IssuesPage as _}from"./issues-page-8abUxnvT.js";import{ApiMapPage as L}from"./api-map-page-Btbazs5z.js";import{DatabasePage as F}from"./database-page-DYOGNtgK.js";import{ProcessesPage as K}from"./processes-page-BIMoApg0.js";import{InfraPage as q}from"./infra-page-Cwb8--Fc.js";import{SessionsPage as U}from"./sessions-page-BYNnSmUH.js";import{EventsPage as $}from"./events-page-d6_fhDSn.js";import{BreadcrumbsPage as V}from"./breadcrumbs-page-ahYuYyrd.js";import{L as G}from"./project-view-DnnhNMhS.js";import{P as H}from"./play-Cx2BEZVZ.js";import"./zap-D8s7B8fi.js";import"./metric-card-DE3zVnFg.js";import"./sparkline-BYGr_Iny.js";import"./minus-BzY257S7.js";import"./wifi-B9CHDUUG.js";import"./clock-CmDPWLyG.js";import"./hard-drive-D8jrlixH.js";import"./use-connected-3Ljk-Uwv.js";import"./issue-detector-CH2FjMfV.js";import"./topbar-892TvyNb.js";import"./badge-BOfEUuSW.js";import"./data-table-A2Iq_hk5.js";import"./detail-panel-YWSVnqP_.js";import"./filter-bar-CP39inkf.js";import"./status-dot-C1nxHZIG.js";import"./download-CwvkYJyJ.js";import"./export-button-D7y2ugNf.js";import"./format-CF_gowqw.js";import"./json-viewer-Dup5M0px.js";import"./chevron-right-Df1qu9CE.js";import"./info-C0v7mgTM.js";import"./empty-config-state-ReVUjdJ_.js";import"./code-block-D47Pz1qB.js";import"./square-C1plLKPb.js";import"./tag-Czqgl1tA.js";function J(e){const a=u(r=>r.projects);return n.useMemo(()=>{const r=w(a,{runtimescopeProject:e.runtimescopeProject,runtimeApps:e.runtimeApps,name:e.name});return r!=null&&r.isConnected?"live":e.sdkInstalled||r?"installed":"not-installed"},[e.runtimescopeProject,e.runtimeApps,e.name,e.sdkInstalled,a])}const x=[{id:"overview",label:"Overview"},{id:"network",label:"Network"},{id:"console",label:"Console"},{id:"renders",label:"Renders"},{id:"state",label:"State"},{id:"performance",label:"Performance"},{id:"api",label:"API Map"},{id:"database",label:"Database"},{id:"breadcrumbs",label:"Breadcrumbs"},{id:"issues",label:"Issues"},{id:"processes",label:"Processes"},{id:"infra",label:"Infra"},{id:"sessions",label:"Sessions"},{id:"events",label:"Events"}],Q={overview:y,network:O,console:z,renders:B,state:M,performance:W,api:L,database:F,breadcrumbs:V,issues:_,processes:K,infra:q,sessions:U,events:$};function X({projectId:e}){const a=d(l=>l.servers.get(e)),[r,m]=n.useState(!0),o=n.useRef(null);return n.useEffect(()=>{r&&o.current&&o.current.scrollIntoView({behavior:"smooth"})},[a==null?void 0:a.logs.length,r]),!a||a.logs.length===0?null:t.jsxs("div",{className:"w-full max-w-2xl mt-4",children:[t.jsxs("button",{type:"button",onClick:()=>m(!r),className:"w-full flex items-center justify-between px-3 py-2 rounded-t bg-bg-surface border border-border-default text-xs text-text-muted hover:bg-bg-hover transition-colors cursor-pointer",children:[t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(D,{size:12}),"Dev Server Output",t.jsxs("span",{className:"text-text-tertiary",children:["(",a.logs.length," lines)"]})]}),t.jsx(R,{size:12,className:I("transition-transform",r&&"rotate-180")})]}),r&&t.jsxs("div",{className:"h-48 overflow-auto bg-[#0a0a14] border border-t-0 border-border-default rounded-b p-3",children:[t.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-all",children:a.logs.map((l,s)=>t.jsxs("span",{className:l.stream==="stderr"?"text-amber":"text-text-secondary",children:[l.line,`
|
|
2
2
|
`]},s))}),t.jsx("div",{ref:o})]})]})}function Y({project:e}){const a=d(s=>{var i;return(i=s.servers.get(e.id))==null?void 0:i.status}),[r,m]=n.useState(null),o=a==="starting",l=n.useCallback(async()=>{m(null),d.getState().setOptimisticStarting(e.id);try{const s=await N(e.id),i=(s==null?void 0:s.recommended)??"dev";if(!await j(e.id,{script:i})){m("Failed to start dev server"),d.getState().setStatus(e.id,"idle");return}k(),T.track("dev_server_started",{projectId:e.id,projectName:e.name,script:i})}catch(s){m(s.message),d.getState().setStatus(e.id,"idle")}},[e.id]);return t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[t.jsx(E,{variant:"primary",size:"sm",onClick:l,disabled:o,children:o?t.jsxs(t.Fragment,{children:[t.jsx(G,{size:14,className:"animate-spin"}),"Starting..."]}):t.jsxs(t.Fragment,{children:[t.jsx(H,{size:14}),"Start Dev Server"]})}),r&&t.jsx("p",{className:"text-xs text-red",children:r}),t.jsx(X,{projectId:e.id})]})}function Ue({project:e}){const a=u(s=>s.runtimeSubTab),r=u(s=>s.setRuntimeSubTab),m=n.useRef(null);n.useEffect(()=>{const s=e.runtimescopeProject??null,i=u.getState().selectedProject;(s!==m.current||i!==s)&&(S.getState().clearAll(),u.getState().setSelectedProject(s),m.current=s)},[e.id,e.runtimescopeProject]),n.useEffect(()=>{const s=d.getState().servers.get(e.id);s&&s.logs.length>0||h(e.id).then(i=>{var c;if(i&&i.status!=="stopped"){const f=d.getState();if(f.setStatus(e.id,i.status,i.pid),(c=i.logs)!=null&&c.length)for(const p of i.logs){const b=p.startsWith("[stderr]")?"stderr":"stdout",g=p.replace(/^\[(stdout|stderr)] /,"");f.appendLog(e.id,b,g,Date.now())}}}).catch(()=>{})},[e.id]);const o=J(e);if(o!=="live"){const s=!!e.path;return t.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:o==="not-installed"?t.jsx(v,{icon:t.jsx(A,{size:40,strokeWidth:1.25}),title:"SDK Not Installed",description:`Install @runtimescope/sdk in ${e.name} to capture live runtime events — network requests, console logs, renders, performance metrics, and more.`}):t.jsx(v,{icon:t.jsx(P,{size:40,strokeWidth:1.25}),title:"SDK Not Connected",description:`The RuntimeScope SDK is installed in ${e.name} but isn't connected. Start the dev server to see live runtime data.`,action:s?t.jsx(Y,{project:e}):void 0})})}const l=n.useRef(new Set(["overview"]));return l.current.add(a),t.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[t.jsx(C,{tabs:x,activeTab:a,onTabChange:r}),t.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden relative",children:x.filter(s=>l.current.has(s.id)).map(s=>{const i=Q[s.id];if(!i)return null;const c=a===s.id;return t.jsx("div",{className:c?"flex-1 flex flex-col min-h-0 overflow-hidden":"hidden",children:t.jsx(i,{})},s.id)})})]})}export{Ue as RuntimePage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v,u as b,r as m,f as N,b as u,j as e,E as j,W as y,P as C,X as S,c as k}from"./index-
|
|
1
|
+
import{a as v,u as b,r as m,f as N,b as u,j as e,E as j,W as y,P as C,X as S,c as k}from"./index-CUDottTv.js";import{B as h}from"./badge-BOfEUuSW.js";import{B as w}from"./textarea-DAwdLdON.js";import{S as A}from"./status-dot-C1nxHZIG.js";import{W as z}from"./wifi-B9CHDUUG.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/dashboard-assets/assets/{sessions-page-DSve7fIB.js → sessions-page-BYNnSmUH.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,u as I,j as e,c as A,I as E}from"./index-
|
|
1
|
+
import{r as o,u as I,j as e,c as A,I as E}from"./index-CUDottTv.js";import{T as M}from"./topbar-892TvyNb.js";import{B as y}from"./badge-BOfEUuSW.js";import"./textarea-DAwdLdON.js";import{D as w}from"./data-table-A2Iq_hk5.js";import{D as T}from"./detail-panel-YWSVnqP_.js";import{F as B}from"./filter-bar-CP39inkf.js";import{S as v}from"./status-dot-C1nxHZIG.js";import{u as L}from"./use-connected-3Ljk-Uwv.js";import{c as m,d as p}from"./format-CF_gowqw.js";function W(){var C,g;const[d,u]=o.useState("history"),[c,h]=o.useState([]),[f,b]=o.useState(null),[l,S]=o.useState("");L();const j=I(t=>t.selectedProject);o.useEffect(()=>{let t=!0;const n=async()=>{const x=await E();x&&t&&h(x)};n();const a=setInterval(n,3e3);return()=>{t=!1,clearInterval(a)}},[]);const i=o.useMemo(()=>{let t=c;if(j&&(t=t.filter(n=>n.appName===j)),l){const n=l.toLowerCase();t=t.filter(a=>a.sessionId.toLowerCase().includes(n)||a.appName.toLowerCase().includes(n))}return[...t].sort((n,a)=>n.isConnected!==a.isConnected?n.isConnected?-1:1:a.connectedAt-n.connectedAt)},[c,j,l]),s=f!==null?i[f]:null,k=i.filter(t=>t.isConnected).length,D=i.reduce((t,n)=>t+n.eventCount,0),N=o.useMemo(()=>{const t=new Map;for(const n of c){const a=t.get(n.appName)??[];a.push(n),t.set(n.appName,a)}return Array.from(t.entries())},[c]);return e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsx(M,{tabs:[{id:"history",label:"History"},{id:"compare",label:"Compare"}],activeTab:d,onTabChange:u}),e.jsxs("div",{className:"flex-1 flex min-h-0 overflow-hidden",children:[d==="history"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsx(B,{search:l,onSearchChange:S,searchPlaceholder:"Filter by session ID or app name...",children:e.jsxs("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[e.jsxs("span",{children:[i.length," sessions"]}),e.jsxs("span",{children:[k," live"]}),e.jsxs("span",{children:[m(D)," events"]})]})}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsx(w,{columns:[{key:"status",header:"",width:"32px",render:t=>e.jsx(v,{color:t.isConnected?"green":"gray",size:"sm"})},{key:"sessionId",header:"Session",width:"140px",render:t=>e.jsxs("span",{className:"font-mono text-[12px] text-text-secondary",children:[t.sessionId.slice(0,12),"..."]})},{key:"appName",header:"App",width:"160px",render:t=>e.jsx("span",{className:"font-medium text-text-primary truncate block max-w-[140px]",children:t.appName})},{key:"connectedAt",header:"Connected",width:"100px",render:t=>e.jsx("span",{className:"text-text-muted tabular-nums text-xs",children:p(t.connectedAt)})},{key:"eventCount",header:"Events",width:"80px",render:t=>e.jsx("span",{className:"tabular-nums",children:m(t.eventCount)})},{key:"sdkVersion",header:"SDK",width:"70px",render:t=>e.jsx(y,{size:"sm",children:t.sdkVersion})}],data:i,selectedIndex:f??void 0,onRowClick:(t,n)=>b(n)})})]}),e.jsx(T,{open:s!==null,onClose:()=>b(null),title:s?`Session ${s.sessionId.slice(0,12)}`:"",subtitle:s?`${s.appName} · SDK v${s.sdkVersion}`:"",children:s&&e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{label:"Session ID",value:s.sessionId,mono:!0}),e.jsx(r,{label:"App Name",value:s.appName}),e.jsx(r,{label:"Status",children:e.jsxs("span",{className:A("inline-flex items-center gap-1.5",s.isConnected?"text-green":"text-text-muted"),children:[e.jsx(v,{color:s.isConnected?"green":"gray",size:"sm"}),s.isConnected?"Connected":"Disconnected"]})}),e.jsx(r,{label:"Connected At",value:new Date(s.connectedAt).toLocaleString()}),s.disconnectedAt&&e.jsx(r,{label:"Disconnected At",value:new Date(s.disconnectedAt).toLocaleString()}),e.jsx(r,{label:"Events",value:m(s.eventCount)}),e.jsx(r,{label:"SDK Version",value:`v${s.sdkVersion}`}),((C=s.buildMeta)==null?void 0:C.gitBranch)&&e.jsx(r,{label:"Branch",value:s.buildMeta.gitBranch,mono:!0}),((g=s.buildMeta)==null?void 0:g.gitCommit)&&e.jsx(r,{label:"Commit",value:s.buildMeta.gitCommit.slice(0,7),mono:!0})]}),e.jsxs("div",{className:"pt-2 border-t border-border-muted",children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Duration"}),e.jsx("p",{className:"text-sm text-text-primary",children:s.isConnected?`Active for ${p(s.connectedAt).replace(" ago","")}`:s.disconnectedAt?`${Math.round((s.disconnectedAt-s.connectedAt)/1e3)}s`:p(s.connectedAt)})]})]})})]}),d==="compare"&&e.jsxs("div",{className:"flex-1 overflow-auto p-5 space-y-4 max-w-4xl mx-auto w-full",children:[e.jsx("p",{className:"text-sm text-text-muted mb-4",children:"Compare sessions across apps to spot differences in event volume and errors."}),N.map(([t,n])=>e.jsxs("div",{className:"border border-border-muted rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2 bg-bg-surface border-b border-border-muted flex items-center gap-2",children:[e.jsx(v,{color:n.some(a=>a.isConnected)?"green":"gray",size:"sm"}),e.jsx("span",{className:"text-sm font-medium",children:t}),e.jsxs("span",{className:"text-xs text-text-muted ml-auto",children:[n.length," sessions"]})]}),e.jsx(w,{columns:[{key:"sessionId",header:"Session",width:"140px",render:a=>e.jsx("span",{className:"font-mono text-[12px] text-text-secondary",children:a.sessionId.slice(0,12)})},{key:"connectedAt",header:"When",width:"100px",render:a=>e.jsx("span",{className:"text-xs text-text-muted tabular-nums",children:p(a.connectedAt)})},{key:"eventCount",header:"Events",width:"80px",render:a=>e.jsx("span",{className:"tabular-nums",children:m(a.eventCount)})},{key:"isConnected",header:"Status",width:"80px",render:a=>e.jsx(y,{size:"sm",variant:a.isConnected?"green":"default",children:a.isConnected?"Live":"Ended"})}],data:n.sort((a,x)=>x.connectedAt-a.connectedAt)})]},t)),N.length===0&&e.jsx("p",{className:"text-sm text-text-muted text-center py-8",children:"No sessions recorded yet. Connect an app with the SDK to get started."})]})]})]})}function r({label:d,value:u,mono:c,children:h}){return e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[e.jsx("span",{className:"text-text-muted w-28 shrink-0",children:d}),h??e.jsx("span",{className:A("text-text-primary",c&&"font-mono text-xs"),children:u})]})}export{W as SessionsPage};
|
package/dist/dashboard-assets/assets/{sessions-page-CIPs23pt.js → sessions-page-VWQ2b-LR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,b as l,j as e,c as I,m as z}from"./index-
|
|
1
|
+
import{r as c,b as l,j as e,c as I,m as z}from"./index-CUDottTv.js";import{B as P}from"./badge-BOfEUuSW.js";import{B as K}from"./textarea-DAwdLdON.js";import{D as H}from"./data-table-A2Iq_hk5.js";import{D as Z}from"./detail-panel-YWSVnqP_.js";import{K as b}from"./metric-card-DE3zVnFg.js";import{M as _}from"./message-square-Dwj0jRjI.js";import{D as q}from"./dollar-sign-BDj484XE.js";import{C as U}from"./clock-CmDPWLyG.js";import{Z as V}from"./zap-D8s7B8fi.js";import"./sparkline-BYGr_Iny.js";import"./minus-BzY257S7.js";function m(t){return`$${(t/1e6).toFixed(2)}`}function x(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)}function g(t){if(t<60)return`${Math.round(t)}m`;const a=Math.floor(t/60),n=Math.round(t%60);return n>0?`${a}h ${n}m`:`${a}h`}function G(t){const a=new Date;return a.setDate(a.getDate()-t),a.toISOString().split("T")[0]}function J(){return new Date().toISOString().split("T")[0]}const T=[{id:"7d",label:"Last 7d"},{id:"30d",label:"Last 30d"},{id:"90d",label:"Last 90d"},{id:"all",label:"All"}];function D(t){return t==="all"?{}:{start:G(t==="7d"?7:t==="30d"?30:90),end:J()}}function Q(t){if(!t)return"default";const a=t.toLowerCase();return a.includes("opus")?"purple":a.includes("sonnet")?"blue":a.includes("haiku")?"green":"default"}function W(t){if(!t)return"Unknown";const a=t.toLowerCase();return a.includes("opus")?"Opus":a.includes("sonnet")?"Sonnet":a.includes("haiku")?"Haiku":t}const X=[{key:"startedAt",header:"Date",width:"110px",sortable:!0,render:t=>new Date(t.startedAt).toLocaleDateString()},{key:"slug",header:"Slug",render:t=>{const a=t,n=a.slug||(a.firstPrompt?a.firstPrompt.slice(0,50):"-");return e.jsx("span",{className:"truncate block max-w-[220px]",title:n,children:n})}},{key:"model",header:"Model",width:"100px",sortable:!0,render:t=>{const a=t;return e.jsx(P,{variant:Q(a.model),size:"sm",children:W(a.model)})}},{key:"messageCount",header:"Messages",width:"90px",sortable:!0,render:t=>e.jsx("span",{className:"tabular-nums",children:t.messageCount})},{key:"totalInputTokens",header:"Tokens In",width:"100px",sortable:!0,render:t=>e.jsx("span",{className:"tabular-nums text-text-secondary",children:x(t.totalInputTokens)})},{key:"totalOutputTokens",header:"Tokens Out",width:"100px",sortable:!0,render:t=>e.jsx("span",{className:"tabular-nums text-text-secondary",children:x(t.totalOutputTokens)})},{key:"costMicrodollars",header:"Cost",width:"80px",sortable:!0,render:t=>e.jsx("span",{className:"tabular-nums font-medium",children:m(t.costMicrodollars)})},{key:"activeMinutes",header:"Active Time",width:"100px",sortable:!0,render:t=>e.jsx("span",{className:"tabular-nums text-text-secondary",children:g(t.activeMinutes)})},{key:"gitBranch",header:"Branch",width:"140px",render:t=>{const a=t.gitBranch;return e.jsx("span",{className:"font-mono text-xs text-text-tertiary truncate block max-w-[120px]",children:a||"-"})}}],ue=c.memo(function({projectId:a}){const n=l(s=>s.sessions),v=l(s=>s.sessionsLoading),j=l(s=>s.sessionsTotal),i=l(s=>s.sessionStats),d=l(s=>s.sessionDateRange),y=l(s=>s.fetchSessions),w=l(s=>s.loadMoreSessions),C=l(s=>s.fetchSessionStats),h=l(s=>s.setSessionDateRange),[p,N]=c.useState(null),L=c.useMemo(()=>{const{start:s,end:o}=d;if(!s&&!o)return"all";for(const f of T){const M=D(f.id);if(M.start===s&&M.end===o)return f.id}return"custom"},[d]);c.useEffect(()=>{y(a),C(a)},[a,y,C]);const A=c.useCallback(s=>{h(D(s),a)},[h,a]),S=c.useCallback((s,o)=>{const f={...d,[s]:o||void 0};h(f,a)},[d,h,a]),$=n.length<j,R=c.useCallback(()=>{w(a)},[w,a]),r=c.useMemo(()=>p!==null?n[p]??null:null,[n,p]),k=(i==null?void 0:i.totalSessions)??n.length,B=m(i?i.totalCostMicrodollars:n.reduce((s,o)=>s+o.costMicrodollars,0)),O=g(i?i.totalActiveMinutes:n.reduce((s,o)=>s+o.activeMinutes,0)),E=k>0?m(((i==null?void 0:i.totalCostMicrodollars)??n.reduce((s,o)=>s+o.costMicrodollars,0))/k):"$0.00",F=!!(d.start||d.end);return e.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:e.jsxs("div",{className:"flex-1 flex min-h-0 overflow-hidden",children:[e.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:e.jsxs("div",{className:"p-6 space-y-6 overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx("div",{className:"flex items-center gap-1.5",children:T.map(s=>e.jsx("button",{type:"button",onClick:()=>A(s.id),className:I("px-3 py-1 rounded-full text-xs font-medium transition-colors cursor-pointer",L===s.id?"bg-accent text-text-inverse":"bg-bg-surface text-text-secondary hover:bg-bg-hover"),children:s.label},s.id))}),e.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[e.jsx(z,{size:14,className:"text-text-tertiary"}),e.jsx("input",{type:"date",value:d.start??"",onChange:s=>S("start",s.target.value),className:"h-7 px-2 rounded bg-bg-input text-text-primary text-xs border border-border-strong focus:border-border-hover focus:outline-none"}),e.jsx("span",{className:"text-text-tertiary text-xs",children:"to"}),e.jsx("input",{type:"date",value:d.end??"",onChange:s=>S("end",s.target.value),className:"h-7 px-2 rounded bg-bg-input text-text-primary text-xs border border-border-strong focus:border-border-hover focus:outline-none"})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[e.jsx(b,{icon:_,label:"Total Sessions",value:String(k),footerLabel:"In date range"}),e.jsx(b,{icon:q,label:"Total Cost",value:B,footerLabel:"API usage cost"}),e.jsx(b,{icon:U,label:"Active Time",value:O,footerLabel:"Total active time"}),e.jsx(b,{icon:V,label:"Avg Cost/Session",value:E,footerLabel:"Per session average"})]}),e.jsx("div",{className:"rounded-lg border border-border-strong overflow-hidden bg-bg-surface",children:e.jsx(H,{columns:X,data:n,selectedIndex:p??void 0,onRowClick:(s,o)=>N(o),emptyMessage:v?"Loading sessions...":"No sessions found",defaultSort:{key:"startedAt",direction:"desc"},footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{children:F?`Showing ${n.length} of ${j} sessions (filtered)`:`${j} sessions`}),$&&e.jsx(K,{variant:"ghost",size:"sm",onClick:R,disabled:v,children:v?"Loading...":"Load more"})]})})})]})}),e.jsx(Z,{open:r!==null,onClose:()=>N(null),title:"Session Detail",subtitle:(r==null?void 0:r.slug)||void 0,children:r&&e.jsxs("div",{className:"p-4 space-y-5",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-1",children:"Session ID"}),e.jsx("p",{className:"text-xs font-mono text-text-secondary break-all",children:r.id})]}),r.firstPrompt&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-1",children:"First Prompt"}),e.jsx("p",{className:"text-sm text-text-primary whitespace-pre-wrap leading-relaxed",children:r.firstPrompt})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Token Breakdown"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(u,{label:"Input",value:x(r.totalInputTokens)}),e.jsx(u,{label:"Output",value:x(r.totalOutputTokens)}),e.jsx(u,{label:"Cache Creation",value:x(r.totalCacheCreationTokens)}),e.jsx(u,{label:"Cache Read",value:x(r.totalCacheReadTokens)})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Cost Breakdown"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(u,{label:"Total Cost",value:m(r.costMicrodollars)}),e.jsx(u,{label:"Active Time",value:g(r.activeMinutes)})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-1",children:"Compaction Count"}),e.jsx("p",{className:"text-sm text-text-primary tabular-nums",children:r.compactionCount})]}),r.permissionMode&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-1",children:"Permission Mode"}),e.jsx(P,{variant:"default",size:"sm",children:r.permissionMode})]})]})})]})})});function u({label:t,value:a}){return e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-text-tertiary",children:t}),e.jsx("span",{className:"text-text-primary tabular-nums font-medium",children:a})]})}export{ue as PmSessionsPage};
|
package/dist/dashboard-assets/assets/{settings-page-DuzVTOPn.js → settings-page-B2geIpMf.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as N,k as l,r as o,j as e,c as h,P as v,T as K,n as S,o as A}from"./index-
|
|
1
|
+
import{a as N,k as l,r as o,j as e,c as h,P as v,T as K,n as S,o as A}from"./index-CUDottTv.js";import{C as W}from"./chevron-right-Df1qu9CE.js";import{T as k}from"./trash-2-C4Tvwfqn.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as s,c as d}from"./index-
|
|
1
|
+
import{r as x,j as s,c as d}from"./index-CUDottTv.js";function v({data:n,width:a=120,height:t=32,color:i="var(--color-accent)",className:f}){const c=x.useId(),{linePath:m,areaPath:u}=x.useMemo(()=>{if(n.length<2)return{linePath:"",areaPath:""};const l=Math.min(...n),j=Math.max(...n)-l||1,e=2,o=n.map((r,P)=>({x:e+P/(n.length-1)*(a-e*2),y:e+(1-(r-l)/j)*(t-e*2)})),p=`M ${o.map(r=>`${r.x},${r.y}`).join(" L ")}`,$=`${p} L ${o[o.length-1].x},${t} L ${o[0].x},${t} Z`;return{linePath:p,areaPath:$}},[n,a,t]);return n.length<2?null:s.jsxs("svg",{width:"100%",height:t,viewBox:`0 0 ${a} ${t}`,preserveAspectRatio:"none",className:d("block",f),children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:c,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:i,stopOpacity:.3}),s.jsx("stop",{offset:"100%",stopColor:i,stopOpacity:0})]})}),s.jsx("path",{d:u,fill:`url(#${c})`}),s.jsx("path",{d:m,fill:"none",stroke:i,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}export{v as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,q as p,j as e,c as N}from"./index-
|
|
1
|
+
import{r as i,q as p,j as e,c as N}from"./index-CUDottTv.js";import{T as S}from"./topbar-892TvyNb.js";import{B as u}from"./badge-BOfEUuSW.js";import"./textarea-DAwdLdON.js";import{D as w}from"./detail-panel-YWSVnqP_.js";import{J as o}from"./json-viewer-Dup5M0px.js";import{E as I}from"./empty-config-state-ReVUjdJ_.js";import{u as k}from"./use-connected-3Ljk-Uwv.js";import{b as f}from"./format-CF_gowqw.js";import"./chevron-right-Df1qu9CE.js";function z(){var m,x;const[l,b]=i.useState("mutations"),[n,c]=i.useState(null);k();const h=p(t=>t.initialLoadDone),r=p(t=>t.state),j=i.useMemo(()=>{const t=new Map;for(const s of r){const d=t.get(s.storeId);d?(d.count++,d.lastUpdate=Math.max(d.lastUpdate,s.timestamp)):t.set(s.storeId,{id:s.storeId,library:s.library,count:1,lastUpdate:s.timestamp})}return Array.from(t.values())},[r]),v=i.useMemo(()=>{const t=new Map;for(const s of r)t.set(s.storeId,s);return t},[r]),g=i.useMemo(()=>r.filter(t=>t.phase==="update"),[r]),a=i.useMemo(()=>n?r.find(t=>t.eventId===n)??null:null,[r,n]),y=i.useCallback(()=>c(null),[]);return e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[e.jsx(S,{tabs:[{id:"stores",label:"Stores"},{id:"mutations",label:"Mutations"}],activeTab:l,onTabChange:b}),e.jsxs("div",{className:"flex-1 flex min-h-0 overflow-hidden",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:h&&r.length===0?e.jsx(I,{title:"No State Data",description:"State tracking captures Zustand and Redux store mutations with diffs, action history, and the full state tree.",configHints:[{key:"stores",value:"{ myStore: useMyStore }",description:"Pass your Zustand/Redux store references"}]}):e.jsxs(e.Fragment,{children:[l==="stores"&&e.jsx("div",{className:"p-5 space-y-3",children:j.map(t=>{var s;return e.jsxs("div",{className:"bg-bg-surface border border-border-strong rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[15px] font-semibold text-text-primary",children:t.id}),e.jsx(u,{variant:"purple",size:"sm",children:t.library})]}),e.jsxs("span",{className:"text-[11px] text-text-muted",children:[t.count," updates"]})]}),e.jsx("div",{className:"bg-bg-surface rounded-md p-3 border border-border-muted",children:e.jsx(o,{data:(s=v.get(t.id))==null?void 0:s.state,defaultExpanded:!1})})]},t.id)})}),l==="mutations"&&e.jsx("div",{className:"divide-y divide-border-muted",children:g.map((t,s)=>{var d;return e.jsxs("div",{onClick:()=>c(t.eventId),className:N("flex items-start gap-3 px-5 py-3 cursor-pointer transition-colors hover:bg-bg-hover",n===t.eventId&&"bg-bg-active"),children:[e.jsx(u,{variant:"purple",size:"sm",children:t.storeId}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[13px] text-text-primary",children:((d=t.action)==null?void 0:d.type)||"update"}),t.diff&&e.jsxs("p",{className:"text-[11px] text-text-muted mt-0.5 truncate",children:["Changed: ",Object.keys(t.diff).join(", ")]})]}),e.jsx("span",{className:"text-[11px] font-mono text-text-muted tabular-nums shrink-0",children:f(t.timestamp)})]},`${t.eventId}-${s}`)})})]})}),e.jsx(w,{open:a!==null,onClose:y,title:a?`${a.storeId} — ${((m=a.action)==null?void 0:m.type)||"update"}`:"",subtitle:a?f(a.timestamp):"",children:a&&e.jsxs("div",{className:"p-4 space-y-4",children:[a.diff&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Changes"}),e.jsx("div",{className:"bg-bg-elevated rounded-md p-3 border border-border-muted",children:e.jsx(o,{data:a.diff,defaultExpanded:!0})})]}),((x=a.action)==null?void 0:x.payload)!=null&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Action Payload"}),e.jsx("div",{className:"bg-bg-elevated rounded-md p-3 border border-border-muted",children:e.jsx(o,{data:a.action.payload,defaultExpanded:!0})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-medium text-text-muted uppercase tracking-wider mb-2",children:"Current State"}),e.jsx("div",{className:"bg-bg-elevated rounded-md p-3 border border-border-muted",children:e.jsx(o,{data:a.state,defaultExpanded:!1})})]})]})})]})]})}export{z as StatePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,c as o}from"./index-
|
|
1
|
+
import{j as s,c as o}from"./index-CUDottTv.js";import{c}from"./textarea-DAwdLdON.js";const l=c("inline-block rounded-full shrink-0",{variants:{color:{green:"bg-green",blue:"bg-blue",purple:"bg-purple",amber:"bg-amber",red:"bg-red",orange:"bg-orange",cyan:"bg-cyan",gray:"bg-text-tertiary",brand:"bg-accent",accent:"bg-accent"},size:{sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"},pulse:{true:"animate-pulse-dot",false:""}},defaultVariants:{color:"green",size:"md",pulse:!1}});function u({className:e,color:a,size:r,pulse:n,...t}){return s.jsx("span",{className:o(l({color:a,size:r,pulse:n}),e),...t})}export{u as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,c as s}from"./index-
|
|
1
|
+
import{j as t,c as s}from"./index-CUDottTv.js";function d({tabs:n,activeTab:r,onTabChange:o,className:x}){return t.jsx("div",{className:s("flex items-center gap-1 border-b border-border-default px-3",x),children:n.map(e=>t.jsxs("button",{onClick:()=>o(e.id),className:s("relative h-9 px-3 text-[13px] font-medium transition-colors cursor-pointer",r===e.id?"text-text-primary":"text-text-tertiary hover:text-text-secondary"),children:[t.jsxs("span",{className:"flex items-center gap-1.5",children:[e.label,e.count!==void 0&&t.jsx("span",{className:s("text-[11px] tabular-nums",r===e.id?"text-text-secondary":"text-text-muted"),children:e.count})]}),r===e.id&&t.jsx("div",{className:"absolute bottom-0 left-3 right-3 h-0.5 bg-accent rounded-full"})]},e.id))})}export{d as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as N,b as g,r as x,v as Q,j as e,c as m,N as O,E as M,Q as E}from"./index-
|
|
1
|
+
import{a as N,b as g,r as x,v as Q,j as e,c as m,N as O,E as M,Q as E}from"./index-CUDottTv.js";import{B as U}from"./badge-BOfEUuSW.js";import{S as V,B as R}from"./textarea-DAwdLdON.js";import{F as D}from"./folder-open-D-HQTMMw.js";import{D as q}from"./download-CwvkYJyJ.js";import{F as T}from"./file-text-h8kcLd2l.js";import{C as G}from"./circle-check-big-Dd6W5_do.js";import{E as I}from"./project-view-DnnhNMhS.js";import{T as K}from"./trash-2-C4Tvwfqn.js";import"./status-dot-C1nxHZIG.js";import"./tag-Czqgl1tA.js";import"./square-C1plLKPb.js";import"./play-Cx2BEZVZ.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as w,r as c,j as n,c as b,S as V,C as S}from"./index-
|
|
1
|
+
import{p as w,r as c,j as n,c as b,S as V,C as S}from"./index-CUDottTv.js";const h=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,f=w,C=(t,r)=>e=>{var o;if((r==null?void 0:r.variants)==null)return f(t,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:s,defaultVariants:l}=r,y=Object.keys(s).map(a=>{const d=e==null?void 0:e[a],u=l==null?void 0:l[a];if(d===null)return null;const i=h(d)||h(u);return s[a][i]}),m=e&&Object.entries(e).reduce((a,d)=>{let[u,i]=d;return i===void 0||(a[u]=i),a},{}),p=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((a,d)=>{let{class:u,className:i,...N}=d;return Object.entries(N).every(j=>{let[v,x]=j;return Array.isArray(x)?x.includes({...l,...m}[v]):{...l,...m}[v]===x})?[...a,u,i]:a},[]);return f(t,y,p,e==null?void 0:e.class,e==null?void 0:e.className)},k=C("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-all disabled:opacity-50 disabled:pointer-events-none cursor-pointer",{variants:{variant:{primary:"bg-accent text-text-inverse border border-accent font-semibold hover:brightness-110",secondary:"bg-bg-overlay text-text-primary border border-border-strong hover:border-border-hover hover:brightness-110",ghost:"bg-transparent text-text-secondary hover:bg-bg-hover hover:text-text-primary",danger:"bg-red-dark text-red-light border border-red-border hover:brightness-125",success:"bg-green-dark text-green-light border border-green-border hover:brightness-125"},size:{sm:"h-7 px-2.5 text-xs",md:"h-9 px-4 text-sm",lg:"h-11 px-6 text-base",icon:"h-9 w-9"}},defaultVariants:{variant:"secondary",size:"md"}}),z=c.forwardRef(({className:t,variant:r,size:e,...o},s)=>n.jsx("button",{ref:s,className:b(k({variant:r,size:e}),t),...o}));z.displayName="Button";const g=c.forwardRef(({className:t,icon:r,...e},o)=>n.jsxs("div",{className:"relative",children:[r&&n.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary",children:r}),n.jsx("input",{ref:o,className:b("w-full h-9 rounded-md bg-bg-input text-text-primary text-sm","border border-border-strong placeholder:text-text-muted","focus:border-border-hover focus:outline-none","transition-colors",r?"pl-9 pr-3":"px-3",t),...e})]}));g.displayName="Input";function I(t){return n.jsx(g,{icon:n.jsx(V,{size:15}),placeholder:"Search...",...t})}const R=c.forwardRef(({className:t,options:r,...e},o)=>n.jsxs("div",{className:"relative",children:[n.jsx("select",{ref:o,className:b("w-full h-9 rounded-md bg-bg-input text-text-primary text-sm appearance-none","border border-border-strong","focus:border-border-hover focus:outline-none","transition-colors px-3 pr-8",t),...e,children:r.map(s=>n.jsx("option",{value:s.value,children:s.label},s.value))}),n.jsx(S,{size:14,className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"})]}));R.displayName="Select";const O=c.forwardRef(({className:t,...r},e)=>n.jsx("textarea",{ref:e,className:b("w-full rounded-md bg-bg-input text-text-primary text-sm font-mono","border border-border-strong placeholder:text-text-muted","focus:border-border-hover focus:outline-none","transition-colors p-3 resize-none",t),...r}));O.displayName="Textarea";export{z as B,I as S,C as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,c as a}from"./index-
|
|
1
|
+
import{j as e,c as a}from"./index-CUDottTv.js";import{S as o}from"./textarea-DAwdLdON.js";function j({title:s,tabs:r,activeTab:c,onTabChange:i,showSearch:l=!1,searchValue:n,onSearchChange:x,children:d}){const m=r&&r.length>0;return s||m||l||d?e.jsxs("div",{className:"border-b border-border-default shrink-0",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-2 gap-4 min-h-[44px]",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[s&&e.jsx("h2",{className:"text-[14px] font-semibold text-text-primary",children:s}),m&&e.jsx("div",{className:"flex items-center gap-1",children:r.map(t=>e.jsx("button",{onClick:()=>i==null?void 0:i(t.id),className:a("h-7 px-2.5 rounded-md text-[12px] font-medium transition-colors cursor-pointer",c===t.id?"bg-bg-elevated text-text-primary":"text-text-tertiary hover:text-text-secondary hover:bg-bg-hover"),children:t.label},t.id))})]}),e.jsx("div",{className:"flex items-center gap-3",children:d})]}),l&&e.jsx("div",{className:"px-5 pb-2.5",children:e.jsx(o,{value:n,onChange:t=>x==null?void 0:x(t.target.value)})})]}):null}export{j as T};
|
package/dist/dashboard-assets/assets/{use-connected-c8-oDf2s.js → use-connected-3Ljk-Uwv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as o}from"./index-
|
|
1
|
+
import{q as o}from"./index-CUDottTv.js";function s(){const n=o(e=>e.source),t=o(e=>e.connected);return n==="live"&&t}export{s as u};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-CUDottTv.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-e2kYo9r7.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|