@kimuson/claude-code-viewer 0.6.0-beta.2 → 0.6.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.
- package/README.md +22 -12
- package/dist/main.js +682 -536
- package/dist/main.js.map +4 -4
- package/dist/static/assets/ProtectedRoute-KMCDjFpr.js +1 -0
- package/dist/static/assets/{eye-BEkfdnRO.js → eye-DsqhY3YQ.js} +1 -1
- package/dist/static/assets/{index-CHZixXYx.js → index-BU5VCG8M.js} +1 -1
- package/dist/static/assets/{index-C9P7O98i.js → index-BUy-hZ_L.js} +1 -1
- package/dist/static/assets/index-DhqtKAUx.js +101 -0
- package/dist/static/assets/{label-DigNu3m4.js → label-Bx75JYJV.js} +1 -1
- package/dist/static/assets/{login-CotBrr4P.js → login-CIKB0Oew.js} +1 -1
- package/dist/static/assets/session-D50bOHyT.js +58 -0
- package/dist/static/assets/session-DDGTF8rc.css +1 -0
- package/dist/static/assets/{session-BfEVLScy.js → session-WhX_gGJt.js} +1 -1
- package/dist/static/index.html +1 -1
- package/package.json +48 -48
- package/dist/static/assets/ProtectedRoute-kldRjzy3.js +0 -1
- package/dist/static/assets/index-nTFAt0o5.js +0 -101
- package/dist/static/assets/session-B4VFb0DB.js +0 -51
- package/dist/static/assets/session-DFuMZ0ql.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as y,r as c,X as T,j as s,W as D,P,S as $,M as j,V as N,K,a7 as W,u as X,a as G}from"./index-DhqtKAUx.js";const U=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],V=y("check",U);const Z=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ce=y("chevron-right",Z);const J=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ae=y("folder",J);const Q=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ie=y("plus",Q);function Y(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ee(e){const[t,o]=c.useState(void 0);return T(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const d=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const r=n[0];let u,l;if("borderBoxSize"in r){const a=r.borderBoxSize,f=Array.isArray(a)?a[0]:a;u=f.inlineSize,l=f.blockSize}else u=e.offsetWidth,l=e.offsetHeight;o({width:u,height:l})});return d.observe(e,{box:"border-box"}),()=>d.unobserve(e)}else o(void 0)},[e]),t}var _="Checkbox",[te]=K(_),[re,S]=te(_);function oe(e){const{__scopeCheckbox:t,checked:o,children:d,defaultChecked:n,disabled:r,form:u,name:l,onCheckedChange:a,required:f,value:x="on",internal_do_not_use_render:p}=e,[b,m]=$({prop:o,defaultProp:n??!1,onChange:a,caller:_}),[v,C]=c.useState(null),[g,i]=c.useState(null),h=c.useRef(!1),E=v?!!u||!!v.closest("form"):!0,R={checked:b,disabled:r,setChecked:m,control:v,setControl:C,name:l,form:u,value:x,hasConsumerStoppedPropagationRef:h,required:f,defaultChecked:k(n)?!1:n,isFormControl:E,bubbleInput:g,setBubbleInput:i};return s.jsx(re,{scope:t,...R,children:ne(p)?p(R):d})}var w="CheckboxTrigger",z=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...d},n)=>{const{control:r,value:u,disabled:l,checked:a,required:f,setControl:x,setChecked:p,hasConsumerStoppedPropagationRef:b,isFormControl:m,bubbleInput:v}=S(w,e),C=j(n,x),g=c.useRef(a);return c.useEffect(()=>{const i=r?.form;if(i){const h=()=>p(g.current);return i.addEventListener("reset",h),()=>i.removeEventListener("reset",h)}},[r,p]),s.jsx(P.button,{type:"button",role:"checkbox","aria-checked":k(a)?"mixed":a,"aria-required":f,"data-state":q(a),"data-disabled":l?"":void 0,disabled:l,value:u,...d,ref:C,onKeyDown:N(t,i=>{i.key==="Enter"&&i.preventDefault()}),onClick:N(o,i=>{p(h=>k(h)?!0:!h),v&&m&&(b.current=i.isPropagationStopped(),b.current||i.stopPropagation())})})});z.displayName=w;var A=c.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:d,checked:n,defaultChecked:r,required:u,disabled:l,value:a,onCheckedChange:f,form:x,...p}=e;return s.jsx(oe,{__scopeCheckbox:o,checked:n,defaultChecked:r,disabled:l,required:u,onCheckedChange:f,name:d,form:x,value:a,internal_do_not_use_render:({isFormControl:b})=>s.jsxs(s.Fragment,{children:[s.jsx(z,{...p,ref:t,__scopeCheckbox:o}),b&&s.jsx(L,{__scopeCheckbox:o})]})})});A.displayName=_;var M="CheckboxIndicator",B=c.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:d,...n}=e,r=S(M,o);return s.jsx(D,{present:d||k(r.checked)||r.checked===!0,children:s.jsx(P.span,{"data-state":q(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});B.displayName=M;var F="CheckboxBubbleInput",L=c.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:d,hasConsumerStoppedPropagationRef:n,checked:r,defaultChecked:u,required:l,disabled:a,name:f,value:x,form:p,bubbleInput:b,setBubbleInput:m}=S(F,e),v=j(o,m),C=Y(r),g=ee(d);c.useEffect(()=>{const h=b;if(!h)return;const E=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(E,"checked").set,H=!n.current;if(C!==r&&I){const O=new Event("click",{bubbles:H});h.indeterminate=k(r),I.call(h,k(r)?!1:r),h.dispatchEvent(O)}},[b,C,r,n]);const i=c.useRef(k(r)?!1:r);return s.jsx(P.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??i.current,required:l,disabled:a,name:f,value:x,form:p,...t,tabIndex:-1,ref:v,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});L.displayName=F;function ne(e){return typeof e=="function"}function k(e){return e==="indeterminate"}function q(e){return k(e)?"indeterminate":e?"checked":"unchecked"}function de({className:e,...t}){return s.jsx(A,{"data-slot":"checkbox",className:W("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(B,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:s.jsx(V,{className:"size-3.5"})})})}function ue({children:e}){const{isAuthenticated:t}=X(),o=G();return c.useEffect(()=>{t||o({to:"/login"})},[t,o]),t?s.jsx(s.Fragment,{children:e}):null}export{de as C,ae as F,ie as P,ce as a,ue as b,Y as c,V as d,ee as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./index-
|
|
1
|
+
import{c}from"./index-DhqtKAUx.js";const e=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r=c("eye",e);export{r as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,u as a,r as o,j as s,L as r}from"./index-
|
|
1
|
+
import{a as n,u as a,r as o,j as s,L as r}from"./index-DhqtKAUx.js";function c(){const e=n(),{isAuthenticated:t}=a();return o.useEffect(()=>{e(t?{to:"/projects"}:{to:"/login"})},[t,e]),s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsx(r,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}export{c as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g,p as j,h as N,j as e,C as v,b as w,d as y,e as P,f as h,T as s,i as C,B as l,k as b,r as o,l as k,m as D,a as _,n as F,t as u,o as L,D as S,q as I,s as E,v as q,w as T,x as H,y as M,L as Q}from"./index-
|
|
1
|
+
import{g,p as j,h as N,j as e,C as v,b as w,d as y,e as P,f as h,T as s,i as C,B as l,k as b,r as o,l as k,m as D,a as _,n as F,t as u,o as L,D as S,q as I,s as E,v as q,w as T,x as H,y as M,L as Q}from"./index-DhqtKAUx.js";import{F as p,C as R,a as $,P as A,b as B}from"./ProtectedRoute-KMCDjFpr.js";import{L as K}from"./label-Bx75JYJV.js";const O=()=>g({queryKey:j.queryKey,queryFn:j.queryFn}),W=()=>{const{data:{projects:n}}=O(),{config:c}=N();return n.length,e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(t=>e.jsxs(v,{className:"hover:shadow-md transition-shadow",children:[e.jsxs(w,{children:[e.jsxs(y,{className:"flex items-center gap-2 justify-start items-start",children:[e.jsx(p,{className:"w-5 h-5 flex-shrink-0"}),e.jsx("span",{className:"text-wrap flex-1",children:t.meta.projectName??t.claudeProjectPath})]}),t.meta.projectPath?e.jsx(P,{children:t.meta.projectPath}):null]}),e.jsxs(h,{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx(s,{id:"project_list.last_modified"})," ",t.lastModifiedAt?C(t.lastModifiedAt,{locale:c.locale,target:"time"}):""]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.jsx(s,{id:"project_list.messages"})," ",t.meta.sessionCount]})]}),e.jsx(h,{className:"pt-0",children:e.jsx(l,{asChild:!0,className:"w-full",children:e.jsx(b,{to:"/projects/$projectId/session",params:{projectId:t.id},children:e.jsx(s,{id:"project_list.view_conversations"})})})})]},t.id))})},z=({onPathChange:n})=>{const[c,t]=o.useState(void 0),[d,x]=o.useState(!1),{data:r,isLoading:i}=k(D(c,d));o.useEffect(()=>{r?.currentPath&&n(r.currentPath)},[r?.currentPath,n]);const m=a=>{if(a===""){t(void 0);return}const f=`/${a}`;t(f)};return e.jsxs("div",{className:"border rounded-md",children:[e.jsx("div",{className:"p-3 border-b bg-muted/50",children:e.jsxs("p",{className:"text-sm font-medium",children:[e.jsx(s,{id:"directory_picker.current"})," ",e.jsx("span",{className:"font-mono",children:r?.currentPath||"~"})]})}),e.jsxs("div",{className:"p-3 border-b flex items-center gap-2",children:[e.jsx(R,{id:"show-hidden",checked:d,onCheckedChange:a=>x(a===!0)}),e.jsx(K,{htmlFor:"show-hidden",className:"text-sm cursor-pointer",children:e.jsx(s,{id:"directory_picker.show_hidden"})})]}),e.jsx("div",{className:"max-h-96 overflow-auto",children:i?e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:e.jsx(s,{id:"directory_picker.loading"})}):r?.entries&&r.entries.length>0?e.jsx("div",{className:"divide-y",children:r.entries.filter(a=>a.type==="directory").filter(a=>d||a.name===".."||!a.name.startsWith(".")).map(a=>e.jsxs("button",{type:"button",onClick:()=>m(a.path),className:"w-full px-3 py-2 flex items-center gap-2 hover:bg-muted/50 transition-colors text-left",children:[a.name===".."?e.jsx($,{className:"w-4 h-4 rotate-180"}):e.jsx(p,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm",children:a.name})]},a.path))}):e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:e.jsx(s,{id:"directory_picker.no_directories"})})})]})},G=()=>{const[n,c]=o.useState(!1),[t,d]=o.useState(""),x=_(),r=F({mutationFn:async()=>{const i=await L.api.projects.$post({json:{projectPath:t}});if(!i.ok)throw new Error("Failed to set up project");return await i.json()},onSuccess:i=>{u.success("Project set up successfully"),c(!1),x({to:"/projects/$projectId/session",params:{projectId:i.projectId},search:m=>({...m,sessionId:i.sessionId})})},onError:i=>{u.error(i instanceof Error?i.message:"Failed to set up project")}});return e.jsxs(S,{open:n,onOpenChange:c,children:[e.jsx(I,{asChild:!0,children:e.jsxs(l,{"data-testid":"new-project-button",children:[e.jsx(A,{className:"w-4 h-4 mr-2"}),e.jsx(s,{id:"project.new"})]})}),e.jsxs(E,{className:"max-w-2xl","data-testid":"new-project-modal",children:[e.jsxs(q,{children:[e.jsx(T,{children:e.jsx(s,{id:"project.setup.title"})}),e.jsx(H,{children:e.jsx(s,{id:"project.setup.description",components:{0:e.jsx("code",{className:"text-sm bg-muted px-1 py-0.5 rounded"})}})})]}),e.jsx("div",{className:"py-4",children:e.jsx(z,{onPathChange:d})}),e.jsxs(M,{children:[e.jsx(l,{variant:"outline",onClick:()=>c(!1),children:e.jsx(s,{id:"common.action.cancel"})}),e.jsx(l,{onClick:async()=>await r.mutateAsync(),disabled:!t||r.isPending,children:r.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Q,{className:"w-4 h-4 mr-2 animate-spin"}),e.jsx(s,{id:"project.setup.action.setting_up"})]}):e.jsx(s,{id:"project.setup.action.setup"})})]})]})]})},J=()=>e.jsx("div",{className:"flex h-screen max-h-screen overflow-hidden",children:e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsx("header",{className:"mb-8",children:e.jsx("p",{className:"text-muted-foreground",children:e.jsx(s,{id:"projects.page.description"})})}),e.jsx("main",{children:e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold",children:e.jsx(s,{id:"projects.page.title"})}),e.jsx(G,{})]}),e.jsx(o.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"text-muted-foreground",children:e.jsx(s,{id:"projects.page.loading"})})}),children:e.jsx(W,{})})]})})]})})});function Y(){return e.jsx(B,{children:e.jsx(J,{})})}export{Y as component};
|