@debugkit/dashboard 0.3.0 → 0.4.0

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.
@@ -1 +1 @@
1
- import{c as e,f as t,t as n}from"./index-BKQXehfa.js";import{n as r}from"./charts-Covhtva2.js";import{a as i,i as a,n as o,o as s,s as c,t as l}from"./ui-DnKidKVi.js";var u=t();function d(){let t=n.useLoaderData(),{issue:d,sample:f}=t,p=f?.event.type===`error`?f.event:null,m=p?.error.frames??[];return(0,u.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,u.jsx)(e,{to:`/`,search:{app:t.app},className:`text-sm text-muted hover:text-ink`,children:`← Overview`}),(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted`,children:[(0,u.jsx)(a,{severity:d.severity}),d.flow&&(0,u.jsx)(`span`,{className:`rounded bg-panel-2 px-1.5 py-0.5 font-mono`,children:d.flow}),(0,u.jsxs)(`span`,{children:[`First seen `,c(d.firstSeen),` · last seen `,c(d.lastSeen)]})]}),(0,u.jsx)(`h1`,{className:`mt-2 break-words text-xl font-semibold tracking-tight sm:text-2xl`,children:d.title}),d.culprit&&(0,u.jsx)(`p`,{className:`mt-1 font-mono text-sm text-muted`,children:d.culprit})]}),(0,u.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,u.jsx)(s,{label:`Occurrences (24h)`,value:d.count24h,tone:d.severity}),(0,u.jsx)(s,{label:`Total occurrences`,value:d.countTotal.toLocaleString()}),(0,u.jsx)(s,{label:`Users affected`,value:t.affectedUsers,hint:`in the last 200 events`}),(0,u.jsx)(s,{label:`Top app version`,value:t.breakdowns.appVersion[0]?.key??`—`,hint:t.breakdowns.appVersion[0]?`${Math.round(t.breakdowns.appVersion[0].share*100)}% of occurrences`:void 0})]}),(0,u.jsx)(l,{title:`What to look at`,subtitle:`Generated from the error, its breadcrumbs and where it happens.`,children:(0,u.jsx)(`ol`,{className:`space-y-3`,children:t.hints.map((e,t)=>(0,u.jsxs)(`li`,{className:`flex gap-3`,children:[(0,u.jsx)(`span`,{className:`mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full bg-accent-soft text-[11px] font-semibold text-accent`,children:t+1}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`text-sm font-medium`,children:e.title}),(0,u.jsx)(`div`,{className:`text-sm text-muted`,children:e.detail})]})]},t))})}),(0,u.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-3`,children:[(0,u.jsx)(`div`,{className:`lg:col-span-2`,children:(0,u.jsxs)(l,{title:`Occurrences per hour`,subtitle:`Last 48 hours`,children:[(0,u.jsx)(r,{data:t.hourly}),(0,u.jsx)(o,{columns:[`Hour (UTC)`,`Count`],rows:t.hourly.map(e=>[e.hour,e.count])})]})}),(0,u.jsx)(l,{title:`Where it happens`,subtitle:`Share of recent occurrences`,children:(0,u.jsx)(`div`,{className:`space-y-4`,children:[`os`,`appVersion`,`deviceModel`,`network`].map(e=>(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted`,children:{os:`OS`,appVersion:`App version`,deviceModel:`Device`,network:`Network`}[e]}),(0,u.jsx)(i,{rows:t.breakdowns[e].map(e=>({key:e.key,value:e.count}))})]},e))})})]}),(0,u.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,u.jsx)(l,{title:`Stack trace`,subtitle:`Most recent occurrence. In-app frames highlighted.`,children:m.length?(0,u.jsx)(`ol`,{className:`space-y-1 font-mono text-xs`,children:m.map((e,t)=>(0,u.jsxs)(`li`,{className:`rounded px-2 py-1 ${e.inApp?`bg-accent-soft text-ink`:`text-muted`}`,children:[(0,u.jsx)(`span`,{className:`font-semibold`,children:e.fn??`<anonymous>`}),` `,(0,u.jsxs)(`span`,{className:`break-all`,children:[e.file,`:`,e.line,`:`,e.col]})]},t))}):(0,u.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap text-xs text-muted`,children:p?.error.stack??`No stack trace captured.`})}),(0,u.jsx)(l,{title:`Breadcrumbs`,subtitle:`What the user did right before the error`,children:p?.breadcrumbs?.length?(0,u.jsxs)(`ol`,{className:`relative space-y-3 border-l border-line pl-4`,children:[p.breadcrumbs.map((e,t)=>(0,u.jsxs)(`li`,{className:`text-sm`,children:[(0,u.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full ${e.level===`error`?`bg-sev-critical`:`bg-line`}`}),(0,u.jsx)(`span`,{className:`mr-2 rounded bg-panel-2 px-1.5 py-0.5 text-[11px] uppercase tracking-wide text-muted`,children:e.category}),(0,u.jsx)(`span`,{className:`break-words`,children:e.message})]},t)),(0,u.jsxs)(`li`,{className:`text-sm font-medium text-sev-critical`,children:[(0,u.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full bg-sev-critical`}),d.title]})]}):(0,u.jsxs)(`p`,{className:`text-sm text-muted`,children:[`No breadcrumbs. Call `,(0,u.jsx)(`code`,{children:`deBug.breadcrumb()`}),` on navigation and network calls to see the path to the error.`]})})]}),(0,u.jsx)(l,{title:`Recent occurrences`,children:(0,u.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,u.jsxs)(`table`,{className:`tabular w-full min-w-[600px] text-left text-sm`,children:[(0,u.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,u.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,u.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`When`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`OS`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Version`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Device`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`User`})]})}),(0,u.jsx)(`tbody`,{children:t.recent.map((e,t)=>(0,u.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,u.jsx)(`td`,{className:`px-4 py-2 text-xs text-muted sm:px-2`,children:c(e.ts)}),(0,u.jsx)(`td`,{className:`px-2 py-2`,children:e.os}),(0,u.jsx)(`td`,{className:`px-2 py-2`,children:e.appVersion??`—`}),(0,u.jsx)(`td`,{className:`px-2 py-2`,children:e.device??`—`}),(0,u.jsx)(`td`,{className:`px-2 py-2 font-mono text-xs text-muted`,children:e.userId??`anonymous`})]},t))})]})})})]})}export{d as component};
1
+ import{c as e,f as t,t as n}from"./index-D7uhDdvA.js";import{n as r}from"./charts-C76vsG2N.js";import{a as i,i as a,n as o,o as s,s as c,t as l}from"./ui-Bj6uJIr8.js";var u=t();function d(){let t=n.useLoaderData(),{issue:d,sample:f}=t,p=f?.event.type===`error`?f.event:null,m=p?.error.frames??[];return(0,u.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,u.jsx)(e,{to:`/`,search:{app:t.app},className:`text-sm text-muted hover:text-ink`,children:`← Overview`}),(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted`,children:[(0,u.jsx)(a,{severity:d.severity}),d.flow&&(0,u.jsx)(`span`,{className:`rounded bg-panel-2 px-1.5 py-0.5 font-mono`,children:d.flow}),(0,u.jsxs)(`span`,{children:[`First seen `,c(d.firstSeen),` · last seen `,c(d.lastSeen)]})]}),(0,u.jsx)(`h1`,{className:`mt-2 break-words text-xl font-semibold tracking-tight sm:text-2xl`,children:d.title}),d.culprit&&(0,u.jsx)(`p`,{className:`mt-1 font-mono text-sm text-muted`,children:d.culprit})]}),(0,u.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,u.jsx)(s,{label:`Occurrences (24h)`,value:d.count24h,tone:d.severity}),(0,u.jsx)(s,{label:`Total occurrences`,value:d.countTotal.toLocaleString()}),(0,u.jsx)(s,{label:`Users affected`,value:t.affectedUsers,hint:`in the last 200 events`}),(0,u.jsx)(s,{label:`Top app version`,value:t.breakdowns.appVersion[0]?.key??`—`,hint:t.breakdowns.appVersion[0]?`${Math.round(t.breakdowns.appVersion[0].share*100)}% of occurrences`:void 0})]}),(0,u.jsx)(l,{title:`What to look at`,subtitle:`Generated from the error, its breadcrumbs and where it happens.`,children:(0,u.jsx)(`ol`,{className:`space-y-3`,children:t.hints.map((e,t)=>(0,u.jsxs)(`li`,{className:`flex gap-3`,children:[(0,u.jsx)(`span`,{className:`mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full bg-accent-soft text-[11px] font-semibold text-accent`,children:t+1}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`text-sm font-medium`,children:e.title}),(0,u.jsx)(`div`,{className:`text-sm text-muted`,children:e.detail})]})]},t))})}),(0,u.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-3`,children:[(0,u.jsx)(`div`,{className:`lg:col-span-2`,children:(0,u.jsxs)(l,{title:`Occurrences per hour`,subtitle:`Last 48 hours`,children:[(0,u.jsx)(r,{data:t.hourly}),(0,u.jsx)(o,{columns:[`Hour (UTC)`,`Count`],rows:t.hourly.map(e=>[e.hour,e.count])})]})}),(0,u.jsx)(l,{title:`Where it happens`,subtitle:`Share of recent occurrences`,children:(0,u.jsx)(`div`,{className:`space-y-4`,children:[`os`,`appVersion`,`deviceModel`,`network`].map(e=>(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted`,children:{os:`OS`,appVersion:`App version`,deviceModel:`Device`,network:`Network`}[e]}),(0,u.jsx)(i,{rows:t.breakdowns[e].map(e=>({key:e.key,value:e.count}))})]},e))})})]}),(0,u.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,u.jsx)(l,{title:`Stack trace`,subtitle:`Most recent occurrence. In-app frames highlighted.`,children:m.length?(0,u.jsx)(`ol`,{className:`space-y-1 font-mono text-xs`,children:m.map((e,t)=>(0,u.jsxs)(`li`,{className:`rounded px-2 py-1 ${e.inApp?`bg-accent-soft text-ink`:`text-muted`}`,children:[(0,u.jsx)(`span`,{className:`font-semibold`,children:e.fn??`<anonymous>`}),` `,(0,u.jsxs)(`span`,{className:`break-all`,children:[e.file,`:`,e.line,`:`,e.col]})]},t))}):(0,u.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap text-xs text-muted`,children:p?.error.stack??`No stack trace captured.`})}),(0,u.jsx)(l,{title:`Breadcrumbs`,subtitle:`What the user did right before the error`,children:p?.breadcrumbs?.length?(0,u.jsxs)(`ol`,{className:`relative space-y-3 border-l border-line pl-4`,children:[p.breadcrumbs.map((e,t)=>(0,u.jsxs)(`li`,{className:`text-sm`,children:[(0,u.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full ${e.level===`error`?`bg-sev-critical`:`bg-line`}`}),(0,u.jsx)(`span`,{className:`mr-2 rounded bg-panel-2 px-1.5 py-0.5 text-[11px] uppercase tracking-wide text-muted`,children:e.category}),(0,u.jsx)(`span`,{className:`break-words`,children:e.message})]},t)),(0,u.jsxs)(`li`,{className:`text-sm font-medium text-sev-critical`,children:[(0,u.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full bg-sev-critical`}),d.title]})]}):(0,u.jsxs)(`p`,{className:`text-sm text-muted`,children:[`No breadcrumbs. Call `,(0,u.jsx)(`code`,{children:`deBug.breadcrumb()`}),` on navigation and network calls to see the path to the error.`]})})]}),(0,u.jsx)(l,{title:`Recent occurrences`,children:(0,u.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,u.jsxs)(`table`,{className:`tabular w-full min-w-[600px] text-left text-sm`,children:[(0,u.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,u.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,u.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`When`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`OS`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Version`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Device`}),(0,u.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`User`})]})}),(0,u.jsx)(`tbody`,{children:t.recent.map((e,t)=>(0,u.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,u.jsx)(`td`,{className:`px-4 py-2 text-xs text-muted sm:px-2`,children:c(e.ts)}),(0,u.jsx)(`td`,{className:`px-2 py-2`,children:e.os}),(0,u.jsx)(`td`,{className:`px-2 py-2`,children:e.appVersion??`—`}),(0,u.jsx)(`td`,{className:`px-2 py-2`,children:e.device??`—`}),(0,u.jsx)(`td`,{className:`px-2 py-2 font-mono text-xs text-muted`,children:e.userId??`anonymous`})]},t))})]})})})]})}export{d as component};
@@ -1 +1 @@
1
- import{_ as e,a as t,d as n,f as r,m as i,r as a}from"./index-BKQXehfa.js";import{r as o}from"./ui-DnKidKVi.js";var s=e(i()),c=r();function l(){let e=a.useLoaderData(),r=n(),[i,l]=(0,s.useState)(e.demo?.email??``),[u,d]=(0,s.useState)(e.demo?.password??``),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1);async function g(e){e.preventDefault(),h(!0),p(null);try{let e=await t({data:{email:i,password:u}});if(!e.ok)return p(e.error);await r.invalidate(),await r.navigate({to:`/`})}catch{p(`Could not reach the dashboard server.`)}finally{h(!1)}}return(0,c.jsx)(`main`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,c.jsxs)(`form`,{onSubmit:g,className:`w-full max-w-sm rounded-xl border border-line bg-panel p-6 shadow-sm`,children:[(0,c.jsx)(o,{}),(0,c.jsx)(`h1`,{className:`mt-6 text-xl font-semibold`,children:`Sign in`}),(0,c.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`This dashboard runs on your infrastructure and reads from your`,` `,e.store===`demo`?`demo dataset`:e.store===`memory`?`in-memory store on this machine`:e.store===`firestore`?`Firestore`:`DynamoDB`,`.`]}),e.demo&&(0,c.jsxs)(`p`,{className:`mt-4 rounded-md bg-accent-soft px-3 py-2 text-xs text-ink`,children:[`Demo mode: sign in with `,(0,c.jsx)(`b`,{children:e.demo.email}),` / `,(0,c.jsx)(`b`,{children:e.demo.password}),`. Set `,(0,c.jsx)(`code`,{children:`DEBUG_DASHBOARD_USERS`}),` to require real accounts.`]}),(0,c.jsx)(`label`,{className:`mt-5 block text-sm font-medium`,htmlFor:`email`,children:`Email`}),(0,c.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,value:i,onChange:e=>l(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),(0,c.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`password`,children:`Password`}),(0,c.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:u,onChange:e=>d(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),f&&(0,c.jsx)(`p`,{role:`alert`,className:`mt-3 text-sm text-sev-critical`,children:f}),(0,c.jsx)(`button`,{disabled:m,className:`mt-5 w-full rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:m?`Signing in…`:`Sign in`})]})})}export{l as component};
1
+ import{_ as e,a as t,d as n,f as r,m as i,r as a}from"./index-D7uhDdvA.js";import{r as o}from"./ui-Bj6uJIr8.js";var s=e(i()),c=r();function l(){let e=a.useLoaderData(),r=n(),[i,l]=(0,s.useState)(e.demo?.email??``),[u,d]=(0,s.useState)(e.demo?.password??``),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1);async function g(e){e.preventDefault(),h(!0),p(null);try{let e=await t({data:{email:i,password:u}});if(!e.ok)return p(e.error);await r.invalidate(),await r.navigate({to:`/`})}catch{p(`Could not reach the dashboard server.`)}finally{h(!1)}}return(0,c.jsx)(`main`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,c.jsxs)(`form`,{onSubmit:g,className:`w-full max-w-sm rounded-xl border border-line bg-panel p-6 shadow-sm`,children:[(0,c.jsx)(o,{}),(0,c.jsx)(`h1`,{className:`mt-6 text-xl font-semibold`,children:`Sign in`}),(0,c.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`This dashboard runs on your infrastructure and reads from your`,` `,e.store===`demo`?`demo dataset`:e.store===`memory`?`in-memory store on this machine`:e.store===`firestore`?`Firestore`:`DynamoDB`,`.`]}),e.demo&&(0,c.jsxs)(`p`,{className:`mt-4 rounded-md bg-accent-soft px-3 py-2 text-xs text-ink`,children:[`Demo mode: sign in with `,(0,c.jsx)(`b`,{children:e.demo.email}),` / `,(0,c.jsx)(`b`,{children:e.demo.password}),`. Set `,(0,c.jsx)(`code`,{children:`DEBUG_DASHBOARD_USERS`}),` to require real accounts.`]}),(0,c.jsx)(`label`,{className:`mt-5 block text-sm font-medium`,htmlFor:`email`,children:`Email`}),(0,c.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,value:i,onChange:e=>l(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),(0,c.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`password`,children:`Password`}),(0,c.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:u,onChange:e=>d(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),f&&(0,c.jsx)(`p`,{role:`alert`,className:`mt-3 text-sm text-sev-critical`,children:f}),(0,c.jsx)(`button`,{disabled:m,className:`mt-5 w-full rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:m?`Signing in…`:`Sign in`})]})})}export{l as component};
@@ -1 +1 @@
1
- import{f as e}from"./index-BKQXehfa.js";var t=e();function n(){return(0,t.jsxs)(`span`,{className:`inline-flex items-center gap-2 font-semibold tracking-tight`,children:[(0,t.jsx)(`span`,{className:`grid h-7 w-7 place-items-center rounded-md bg-sev-critical text-[11px] font-bold text-white`,children:`dB`}),(0,t.jsxs)(`span`,{children:[`de`,(0,t.jsx)(`span`,{className:`text-sev-critical`,children:`Bug`})]})]})}var r={critical:`bg-sev-critical text-white`,high:`bg-sev-high text-white`,medium:`bg-sev-medium text-black`,low:`bg-panel-2 text-muted border border-line`};function i({severity:e}){return(0,t.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${r[e]}`,children:e})}function a({title:e,subtitle:n,children:r,right:i}){return(0,t.jsxs)(`section`,{className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,t.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,t.jsxs)(`div`,{children:[(0,t.jsx)(`h2`,{className:`text-sm font-semibold`,children:e}),n&&(0,t.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:n})]}),i]}),r]})}function o({label:e,value:n,hint:r,tone:i}){return(0,t.jsxs)(`div`,{className:`rounded-xl border border-line bg-panel p-4`,children:[(0,t.jsx)(`div`,{className:`text-xs text-muted`,children:e}),(0,t.jsx)(`div`,{className:`tabular mt-1 text-2xl font-semibold ${i===`critical`?`text-sev-critical`:i===`high`?`text-sev-high`:`text-ink`}`,children:n}),r&&(0,t.jsx)(`div`,{className:`mt-1 text-xs text-muted`,children:r})]})}function s({columns:e,rows:n}){return(0,t.jsxs)(`details`,{className:`mt-3 text-xs`,children:[(0,t.jsx)(`summary`,{className:`cursor-pointer text-muted hover:text-ink`,children:`View data`}),(0,t.jsx)(`div`,{className:`mt-2 max-h-64 overflow-auto rounded-md border border-line`,children:(0,t.jsxs)(`table`,{className:`tabular w-full text-left`,children:[(0,t.jsx)(`thead`,{className:`sticky top-0 bg-panel-2`,children:(0,t.jsx)(`tr`,{children:e.map(e=>(0,t.jsx)(`th`,{className:`px-2 py-1 font-medium`,children:e},e))})}),(0,t.jsx)(`tbody`,{children:n.map((e,n)=>(0,t.jsx)(`tr`,{className:`border-t border-line`,children:e.map((e,n)=>(0,t.jsx)(`td`,{className:`px-2 py-1`,children:e},n))},n))})]})})]})}function c({rows:e,total:n}){let r=n??e.reduce((e,t)=>e+t.value,0);return e.length?(0,t.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let n=r?e.value/r:0;return(0,t.jsxs)(`li`,{children:[(0,t.jsxs)(`div`,{className:`flex justify-between gap-2 text-xs`,children:[(0,t.jsx)(`span`,{className:`truncate`,children:e.key}),(0,t.jsxs)(`span`,{className:`tabular shrink-0 text-muted`,children:[e.value.toLocaleString(),` · `,Math.round(n*100),`%`]})]}),(0,t.jsx)(`div`,{className:`mt-1 h-1.5 rounded-full bg-panel-2`,children:(0,t.jsx)(`div`,{className:`h-1.5 rounded-full bg-[var(--chart-errors)]`,style:{width:`${Math.max(2,n*100)}%`}})})]},e.key)})}):(0,t.jsx)(`p`,{className:`text-xs text-muted`,children:`No data.`})}function l(e,t=Date.now()){let n=Math.max(0,Math.round((t-Date.parse(e))/1e3));return n<60?`${n}s ago`:n<3600?`${Math.round(n/60)}m ago`:n<86400?`${Math.round(n/3600)}h ago`:`${Math.round(n/86400)}d ago`}export{c as a,i,s as n,o,n as r,l as s,a as t};
1
+ import{f as e}from"./index-D7uhDdvA.js";var t=e();function n(){return(0,t.jsxs)(`span`,{className:`inline-flex items-center gap-2 font-semibold tracking-tight`,children:[(0,t.jsx)(`span`,{className:`grid h-7 w-7 place-items-center rounded-md bg-sev-critical text-[11px] font-bold text-white`,children:`dB`}),(0,t.jsxs)(`span`,{children:[`de`,(0,t.jsx)(`span`,{className:`text-sev-critical`,children:`Bug`})]})]})}var r={critical:`bg-sev-critical text-white`,high:`bg-sev-high text-white`,medium:`bg-sev-medium text-black`,low:`bg-panel-2 text-muted border border-line`};function i({severity:e}){return(0,t.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${r[e]}`,children:e})}function a({title:e,subtitle:n,children:r,right:i}){return(0,t.jsxs)(`section`,{className:`rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,t.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,t.jsxs)(`div`,{children:[(0,t.jsx)(`h2`,{className:`text-sm font-semibold`,children:e}),n&&(0,t.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:n})]}),i]}),r]})}function o({label:e,value:n,hint:r,tone:i}){return(0,t.jsxs)(`div`,{className:`rounded-xl border border-line bg-panel p-4`,children:[(0,t.jsx)(`div`,{className:`text-xs text-muted`,children:e}),(0,t.jsx)(`div`,{className:`tabular mt-1 text-2xl font-semibold ${i===`critical`?`text-sev-critical`:i===`high`?`text-sev-high`:`text-ink`}`,children:n}),r&&(0,t.jsx)(`div`,{className:`mt-1 text-xs text-muted`,children:r})]})}function s({columns:e,rows:n}){return(0,t.jsxs)(`details`,{className:`mt-3 text-xs`,children:[(0,t.jsx)(`summary`,{className:`cursor-pointer text-muted hover:text-ink`,children:`View data`}),(0,t.jsx)(`div`,{className:`mt-2 max-h-64 overflow-auto rounded-md border border-line`,children:(0,t.jsxs)(`table`,{className:`tabular w-full text-left`,children:[(0,t.jsx)(`thead`,{className:`sticky top-0 bg-panel-2`,children:(0,t.jsx)(`tr`,{children:e.map(e=>(0,t.jsx)(`th`,{className:`px-2 py-1 font-medium`,children:e},e))})}),(0,t.jsx)(`tbody`,{children:n.map((e,n)=>(0,t.jsx)(`tr`,{className:`border-t border-line`,children:e.map((e,n)=>(0,t.jsx)(`td`,{className:`px-2 py-1`,children:e},n))},n))})]})})]})}function c({rows:e,total:n}){let r=n??e.reduce((e,t)=>e+t.value,0);return e.length?(0,t.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let n=r?e.value/r:0;return(0,t.jsxs)(`li`,{children:[(0,t.jsxs)(`div`,{className:`flex justify-between gap-2 text-xs`,children:[(0,t.jsx)(`span`,{className:`truncate`,children:e.key}),(0,t.jsxs)(`span`,{className:`tabular shrink-0 text-muted`,children:[e.value.toLocaleString(),` · `,Math.round(n*100),`%`]})]}),(0,t.jsx)(`div`,{className:`mt-1 h-1.5 rounded-full bg-panel-2`,children:(0,t.jsx)(`div`,{className:`h-1.5 rounded-full bg-[var(--chart-errors)]`,style:{width:`${Math.max(2,n*100)}%`}})})]},e.key)})}):(0,t.jsx)(`p`,{className:`text-xs text-muted`,children:`No data.`})}function l(e,t=Date.now()){let n=Math.max(0,Math.round((t-Date.parse(e))/1e3));return n<60?`${n}s ago`:n<3600?`${Math.round(n/60)}m ago`:n<86400?`${Math.round(n/3600)}h ago`:`${Math.round(n/86400)}d ago`}export{c as a,i,s as n,o,n as r,l as s,a as t};
@@ -1,6 +1,6 @@
1
1
  import { r as Logo } from "./ui-Lv-KcOoP.js";
2
2
  import { o as logout } from "./fns-CgB12FUN.js";
3
- import { a as Route } from "./router-D2L7-BwF.js";
3
+ import { a as Route } from "./router-DqTf7XfT.js";
4
4
  import { Link, Outlet, useRouter } from "@tanstack/react-router";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  // src/routes/_authed.tsx?tsr-split=component
@@ -1,6 +1,6 @@
1
1
  import { r as TrendChart, t as FlowChart } from "./charts-CNlV7Pga.js";
2
2
  import { a as ShareBars, i as SeverityBadge, n as DataTable, o as Stat, s as timeAgo, t as Card } from "./ui-Lv-KcOoP.js";
3
- import { r as Route } from "./router-D2L7-BwF.js";
3
+ import { r as Route } from "./router-DqTf7XfT.js";
4
4
  import { useEffect } from "react";
5
5
  import { Link, useNavigate, useRouter } from "@tanstack/react-router";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -389,7 +389,9 @@ function EmptyState() {
389
389
  children: [
390
390
  "Nothing has arrived yet. Run your app with the SDK initialised, or send a test event with ",
391
391
  /* @__PURE__ */ jsx("code", { children: "npx debugkit test" }),
392
- ". This page fills in on its own."
392
+ " (or ",
393
+ /* @__PURE__ */ jsx("code", { children: "npx @debugkit/cli test" }),
394
+ "). This page fills in on its own."
393
395
  ]
394
396
  })
395
397
  ] }),
@@ -9,32 +9,32 @@ var tsrStartManifest = () => ({ routes: {
9
9
  "/api/summary",
10
10
  "/api/issues/$fingerprint"
11
11
  ],
12
- preloads: ["/assets/index-BKQXehfa.js"],
12
+ preloads: ["/assets/index-D7uhDdvA.js"],
13
13
  scripts: [{ attrs: {
14
14
  type: "module",
15
15
  async: !0,
16
- src: "/assets/index-BKQXehfa.js"
16
+ src: "/assets/index-D7uhDdvA.js"
17
17
  } }]
18
18
  },
19
19
  "/_authed": {
20
20
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed.tsx",
21
21
  children: ["/_authed/", "/_authed/issues/$fingerprint"],
22
- preloads: ["/assets/_authed-D6P9RBN1.js", "/assets/ui-DnKidKVi.js"]
22
+ preloads: ["/assets/_authed-mWCAMokt.js", "/assets/ui-Bj6uJIr8.js"]
23
23
  },
24
24
  "/login": {
25
25
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/login.tsx",
26
26
  children: void 0,
27
- preloads: ["/assets/login-Da8b3hjR.js", "/assets/ui-DnKidKVi.js"]
27
+ preloads: ["/assets/login-MqvT094Y.js", "/assets/ui-Bj6uJIr8.js"]
28
28
  },
29
29
  "/_authed/": {
30
30
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/index.tsx",
31
31
  children: void 0,
32
- preloads: ["/assets/_authed-BDx4Txp7.js", "/assets/charts-Covhtva2.js"]
32
+ preloads: ["/assets/_authed-Bi62GTX3.js", "/assets/charts-C76vsG2N.js"]
33
33
  },
34
34
  "/_authed/issues/$fingerprint": {
35
35
  filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/issues.$fingerprint.tsx",
36
36
  children: void 0,
37
- preloads: ["/assets/issues._fingerprint-DtAqk0rC.js", "/assets/charts-Covhtva2.js"]
37
+ preloads: ["/assets/issues._fingerprint-fVGLnT37.js", "/assets/charts-C76vsG2N.js"]
38
38
  }
39
39
  } });
40
40
  export { tsrStartManifest };
@@ -1,6 +1,6 @@
1
1
  import { n as HourlyChart } from "./charts-CNlV7Pga.js";
2
2
  import { a as ShareBars, i as SeverityBadge, n as DataTable, o as Stat, s as timeAgo, t as Card } from "./ui-Lv-KcOoP.js";
3
- import { n as Route } from "./router-D2L7-BwF.js";
3
+ import { n as Route } from "./router-DqTf7XfT.js";
4
4
  import { Link } from "@tanstack/react-router";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  // src/routes/_authed/issues.$fingerprint.tsx?tsr-split=component
@@ -1,6 +1,6 @@
1
1
  import { r as Logo } from "./ui-Lv-KcOoP.js";
2
2
  import { a as login } from "./fns-CgB12FUN.js";
3
- import { i as Route } from "./router-D2L7-BwF.js";
3
+ import { i as Route } from "./router-DqTf7XfT.js";
4
4
  import { useState } from "react";
5
5
  import { useRouter } from "@tanstack/react-router";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -52,7 +52,7 @@ function RootDocument({ children }) {
52
52
  });
53
53
  }
54
54
  // src/routes/_authed.tsx
55
- var $$splitComponentImporter$3 = () => import("./_authed-x9Ku8dyL.js");
55
+ var $$splitComponentImporter$3 = () => import("./_authed-BaehIntL.js");
56
56
  var Route$6 = createFileRoute("/_authed")({
57
57
  beforeLoad: async () => {
58
58
  const user = await getSessionUser();
@@ -62,7 +62,7 @@ var Route$6 = createFileRoute("/_authed")({
62
62
  component: lazyRouteComponent($$splitComponentImporter$3, "component")
63
63
  });
64
64
  // src/routes/login.tsx
65
- var $$splitComponentImporter$2 = () => import("./login-BMGNYcxB.js");
65
+ var $$splitComponentImporter$2 = () => import("./login-h3B5Vdhl.js");
66
66
  var Route$5 = createFileRoute("/login")({
67
67
  beforeLoad: async () => {
68
68
  if (await getSessionUser()) throw redirect({ to: "/" });
@@ -71,7 +71,7 @@ var Route$5 = createFileRoute("/login")({
71
71
  component: lazyRouteComponent($$splitComponentImporter$2, "component")
72
72
  });
73
73
  // src/routes/_authed/index.tsx
74
- var $$splitComponentImporter$1 = () => import("./_authed-BjmBAX3l.js");
74
+ var $$splitComponentImporter$1 = () => import("./_authed-ClbGOSDJ.js");
75
75
  var Route$4 = createFileRoute("/_authed/")({
76
76
  validateSearch: (s) => ({
77
77
  app: typeof s.app === "string" ? s.app : void 0,
@@ -125,7 +125,7 @@ var Route$2 = createFileRoute("/api/summary")({ server: { handlers: { GET: async
125
125
  });
126
126
  } } } });
127
127
  // src/routes/_authed/issues.$fingerprint.tsx
128
- var $$splitComponentImporter = () => import("./issues._fingerprint-C2EdByPH.js");
128
+ var $$splitComponentImporter = () => import("./issues._fingerprint-D78dy5os.js");
129
129
  var Route$1 = createFileRoute("/_authed/issues/$fingerprint")({
130
130
  validateSearch: (s) => ({ app: typeof s.app === "string" ? s.app : "" }),
131
131
  loaderDeps: ({ search }) => ({ app: search.app }),
@@ -4485,7 +4485,7 @@ var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
4485
4485
  * the dev styles URL for route-scoped CSS collection.
4486
4486
  */
4487
4487
  async function getStartManifest(matchedRoutes) {
4488
- const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-CY7PP5UB.js");
4488
+ const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-eNUCOzFz.js");
4489
4489
  const startManifest = tsrStartManifest();
4490
4490
  let routes = startManifest.routes;
4491
4491
  routes[rootRouteId];
@@ -7260,7 +7260,7 @@ var getBaseManifest = getProdBaseManifest;
7260
7260
  var createEarlyHintsForRequest = createEarlyHintsCollector;
7261
7261
  async function loadEntries() {
7262
7262
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
7263
- import("./assets/router-D2L7-BwF.js").then((n) => n.t),
7263
+ import("./assets/router-DqTf7XfT.js").then((n) => n.t),
7264
7264
  import("./assets/start-t09PGpZL.js"),
7265
7265
  import("./assets/empty-plugin-adapters-BsRz-CQL.js")
7266
7266
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugkit/dashboard",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "The self-hosted deBug dashboard. Run it with npx debugkit dashboard, or npx @debugkit/dashboard with your own settings.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,9 +29,9 @@
29
29
  "tailwindcss": "^4.3.5",
30
30
  "vite": "^8.3.7",
31
31
  "@tanstack/react-start": "^1.169.5",
32
- "@debugkit/ingest": "0.3.0",
33
- "@debugkit/schema": "0.3.0",
34
- "@debugkit/adapters": "0.3.0"
32
+ "@debugkit/adapters": "0.4.0",
33
+ "@debugkit/schema": "0.4.0",
34
+ "@debugkit/ingest": "0.4.0"
35
35
  },
36
36
  "engines": {
37
37
  "node": ">=20.12"