@kimuson/claude-code-viewer 0.7.3 → 0.7.5
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/README.md +9 -0
- package/dist/main.js +104087 -9930
- package/dist/static/assets/AuthProvider-a1wlLm40.js +22 -0
- package/dist/static/assets/ProtectedRoute-Bd-6jyxE.js +1 -0
- package/dist/static/assets/card-D9aMzhGi.js +1 -0
- package/dist/static/assets/createLucideIcon-Dr4vJxG7.js +1 -0
- package/dist/static/assets/dist-BSr9MeK6.js +109 -0
- package/dist/static/assets/{dist-CG2L4mx5.js → dist-DsKpSV8b.js} +1 -1
- package/dist/static/assets/{eye-SsvAY8oF.js → eye-93IqRP6X.js} +1 -1
- package/dist/static/assets/index-B-si4iv9.js +20 -0
- package/dist/static/assets/{index-DNPVlDui.css → index-CRjH32Aw.css} +2 -2
- package/dist/static/assets/{input-B_6IT1CP.js → input-M1VOtQpS.js} +1 -1
- package/dist/static/assets/label-CV_Y-Hm3.js +1 -0
- package/dist/static/assets/{login-CKSjZM5v.js → login-B5ql67Sw.js} +1 -1
- package/dist/static/assets/{markdown-parser-vendor-D9j1a-bm.js → markdown-parser-vendor-BdkS_k_8.js} +7 -7
- package/dist/static/assets/{projects-DH0K12HM.js → projects-CzabZWrQ.js} +1 -1
- package/dist/static/assets/{refractor-vendor-B-OUwWR7.js → refractor-vendor-BfdmH2uT.js} +1 -1
- package/dist/static/assets/rolldown-runtime-S-ySWqyJ.js +1 -0
- package/dist/static/assets/routes-DCVxLOkG.js +1 -0
- package/dist/static/assets/session-Bh26l_lo.js +13 -0
- package/dist/static/assets/session-BxPcWj4u.js +1 -0
- package/dist/static/assets/{syntax-highlighter-vendor-CwGXx8v4.js → syntax-highlighter-vendor-BmNdBw1C.js} +4 -4
- package/dist/static/assets/workbox-window.prod.es5-8x20nBgX.js +2 -0
- package/dist/static/assets/{xterm-vendor-DRG2K165.js → xterm-vendor-D6WsVDeV.js} +3 -3
- package/dist/static/index.html +10 -10
- package/dist/static/sw.js +1 -1
- package/package.json +3 -130
- package/dist/main.js.map +0 -7
- package/dist/static/assets/AuthProvider-Ds-c4CWc.js +0 -22
- package/dist/static/assets/ProtectedRoute-BTfjJdM-.js +0 -1
- package/dist/static/assets/card-DGrqtTaC.js +0 -1
- package/dist/static/assets/createLucideIcon-BL_meogc.js +0 -1
- package/dist/static/assets/dist-Cartj9I0.js +0 -84
- package/dist/static/assets/index-Bmg7UpkS.js +0 -20
- package/dist/static/assets/label-Cw6sZ5kQ.js +0 -1
- package/dist/static/assets/rolldown-runtime-Dw2cE7zH.js +0 -1
- package/dist/static/assets/routes-CzLZwWu9.js +0 -1
- package/dist/static/assets/session-DItKrSkz.js +0 -12
- package/dist/static/assets/session-DdZMHc5j.js +0 -1
- package/dist/static/assets/workbox-window.prod.es5-DaBTyiAs.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{d as t,f as n}from"./markdown-parser-vendor-BdkS_k_8.js";import{D as r,F as i,I as a,at as o,c as s,ot as c,x as l}from"./AuthProvider-a1wlLm40.js";import{$ as u,N as d,P as f,Y as p,Z as m,c as h,d as g,f as _,i as v,l as y,n as b,o as x,s as S,u as C}from"./dist-BSr9MeK6.js";import{n as w}from"./dist-DsKpSV8b.js";import{E as T,T as E,c as D,k as O,n as k,s as A,t as j,w as M}from"./ProtectedRoute-Bd-6jyxE.js";import{a as N,i as P,n as F,o as I,r as L,t as R}from"./card-D9aMzhGi.js";import{t as z}from"./label-CV_Y-Hm3.js";var B=e(n(),1),V=()=>a({queryKey:l.queryKey,queryFn:l.queryFn}),H=t(),U=()=>{let{data:{projects:e}}=V(),{config:t}=f();return e.length,(0,H.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-3`,children:e.map(e=>(0,H.jsxs)(R,{className:`hover:shadow-md transition-shadow`,children:[(0,H.jsxs)(P,{children:[(0,H.jsxs)(N,{className:`flex items-center gap-2 justify-start items-start`,children:[(0,H.jsx)(T,{className:`w-5 h-5 flex-shrink-0`}),(0,H.jsx)(`span`,{className:`text-wrap flex-1`,children:e.meta.projectName??e.claudeProjectPath})]}),e.meta.projectPath!==void 0&&e.meta.projectPath!==``?(0,H.jsx)(L,{children:e.meta.projectPath}):null]}),(0,H.jsxs)(F,{className:`space-y-2`,children:[(0,H.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,H.jsx)(w,{id:`project_list.last_modified`}),` `,e.lastModifiedAt?d(e.lastModifiedAt,{locale:t.locale,target:`time`}):``]}),(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,H.jsx)(w,{id:`project_list.messages`}),` `,e.meta.sessionCount]})]}),(0,H.jsx)(F,{className:`pt-0`,children:(0,H.jsx)(I,{asChild:!0,className:`w-full`,children:(0,H.jsx)(u,{to:`/projects/$projectId/session`,params:{projectId:e.id},children:(0,H.jsx)(w,{id:`project_list.view_conversations`})})})})]},e.id))})},W=({onPathChange:e})=>{let[t,n]=(0,B.useState)(void 0),[r,i]=(0,B.useState)(!1),{data:a,isLoading:o}=p(s(t,r));(0,B.useEffect)(()=>{a?.currentPath!==void 0&&a.currentPath!==``&&e(a.currentPath)},[a?.currentPath,e]);let c=e=>{if(e===``){n(void 0);return}n(`/${e}`)};return(0,H.jsxs)(`div`,{className:`border rounded-md`,children:[(0,H.jsx)(`div`,{className:`p-3 border-b bg-muted/50`,children:(0,H.jsxs)(`p`,{className:`text-sm font-medium`,children:[(0,H.jsx)(w,{id:`directory_picker.current`}),` `,(0,H.jsx)(`span`,{className:`font-mono`,children:a?.currentPath??`~`})]})}),(0,H.jsxs)(`div`,{className:`p-3 border-b flex items-center gap-2`,children:[(0,H.jsx)(A,{id:`show-hidden`,checked:r,onCheckedChange:e=>i(e===!0)}),(0,H.jsx)(z,{htmlFor:`show-hidden`,className:`text-sm cursor-pointer`,children:(0,H.jsx)(w,{id:`directory_picker.show_hidden`})})]}),(0,H.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:o?(0,H.jsx)(`div`,{className:`p-8 text-center text-sm text-muted-foreground`,children:(0,H.jsx)(w,{id:`directory_picker.loading`})}):a?.entries&&a.entries.length>0?(0,H.jsx)(`div`,{className:`divide-y`,children:a.entries.filter(e=>e.type===`directory`).filter(e=>r||e.name===`..`||!e.name.startsWith(`.`)).map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>c(e.path),className:`w-full px-3 py-2 flex items-center gap-2 hover:bg-muted/50 transition-colors text-left`,children:[e.name===`..`?(0,H.jsx)(O,{className:`w-4 h-4 rotate-180`}):(0,H.jsx)(T,{className:`w-4 h-4 text-blue-500`}),(0,H.jsx)(`span`,{className:`text-sm`,children:e.name})]},e.path))}):(0,H.jsx)(`div`,{className:`p-8 text-center text-sm text-muted-foreground`,children:(0,H.jsx)(w,{id:`directory_picker.no_directories`})})})]})},G=()=>{let[e,t]=(0,B.useState)(!1),[n,a]=(0,B.useState)(``),s=c(),l=i({mutationFn:async()=>{let e=await r.api.projects.$post({json:{projectPath:n}});if(!e.ok)throw Error(`Failed to set up project`);return await e.json()},onSuccess:e=>{b.success(`Project set up successfully`),t(!1),s({to:`/projects/$projectId/session`,params:{projectId:e.projectId},search:{sessionId:e.sessionId}})},onError:e=>{b.error(e instanceof Error?e.message:`Failed to set up project`)}});return(0,H.jsxs)(x,{open:e,onOpenChange:t,children:[(0,H.jsx)(_,{asChild:!0,children:(0,H.jsxs)(I,{"data-testid":`new-project-button`,children:[(0,H.jsx)(M,{className:`w-4 h-4 mr-2`}),(0,H.jsx)(w,{id:`project.new`})]})}),(0,H.jsxs)(S,{className:`max-w-2xl`,"data-testid":`new-project-modal`,children:[(0,H.jsxs)(C,{children:[(0,H.jsx)(g,{children:(0,H.jsx)(w,{id:`project.setup.title`})}),(0,H.jsx)(h,{children:(0,H.jsx)(w,{id:`project.setup.description`,components:{0:(0,H.jsx)(`code`,{className:`text-sm bg-muted px-1 py-0.5 rounded`})}})})]}),(0,H.jsx)(`div`,{className:`py-4`,children:(0,H.jsx)(W,{onPathChange:a})}),(0,H.jsxs)(y,{children:[(0,H.jsx)(I,{variant:`outline`,onClick:()=>t(!1),children:(0,H.jsx)(w,{id:`common.action.cancel`})}),(0,H.jsx)(I,{onClick:()=>{l.mutateAsync()},disabled:n===``||l.isPending,children:l.isPending?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(o,{className:`w-4 h-4 mr-2 animate-spin`}),(0,H.jsx)(w,{id:`project.setup.action.setting_up`})]}):(0,H.jsx)(w,{id:`project.setup.action.setup`})})]})]})]})},K=()=>{let{openSearch:e}=v(),[t,n]=(0,B.useState)(!1);return(0,H.jsxs)(`div`,{className:`flex flex-col h-screen max-h-screen overflow-hidden`,children:[(0,H.jsxs)(`header`,{className:`h-(--spacing-header-height) flex items-center justify-between px-3 bg-muted/30 border-b border-border/40 text-xs flex-shrink-0 select-none`,children:[(0,H.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:`claude-code-viewer`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:`w-11 h-11 md:w-7 md:h-7 flex items-center justify-center rounded transition-colors hover:bg-muted text-muted-foreground hover:text-foreground`,"aria-label":`System Info`,children:(0,H.jsx)(E,{className:`w-3.5 h-3.5`})}),(0,H.jsx)(`button`,{type:`button`,onClick:e,className:`w-11 h-11 md:w-7 md:h-7 flex items-center justify-center rounded transition-colors hover:bg-muted text-muted-foreground hover:text-foreground`,"aria-label":`Search`,children:(0,H.jsx)(m,{className:`w-3.5 h-3.5`})}),(0,H.jsx)(D,{})]})]}),(0,H.jsx)(x,{open:t,onOpenChange:n,children:(0,H.jsxs)(S,{className:`max-w-md h-[70vh] overflow-hidden p-0`,children:[(0,H.jsx)(g,{className:`sr-only`,children:`System Info`}),(0,H.jsx)(B.Suspense,{fallback:(0,H.jsx)(`div`,{className:`p-8 text-center text-muted-foreground`,children:`Loading...`}),children:(0,H.jsx)(k,{})})]})}),(0,H.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,H.jsxs)(`div`,{className:`container mx-auto px-4 py-8`,children:[(0,H.jsx)(`header`,{className:`mb-8`,children:(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:(0,H.jsx)(w,{id:`projects.page.description`})})}),(0,H.jsx)(`main`,{children:(0,H.jsxs)(`section`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold`,children:(0,H.jsx)(w,{id:`projects.page.title`})}),(0,H.jsx)(G,{})]}),(0,H.jsx)(B.Suspense,{fallback:(0,H.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,H.jsx)(`div`,{className:`text-muted-foreground`,children:(0,H.jsx)(w,{id:`projects.page.loading`})})}),children:(0,H.jsx)(U,{})})]})})]})})]})},q=()=>(0,H.jsx)(j,{children:(0,H.jsx)(K,{})});export{q as component};
|