claude-code-rehab 3.0.0 → 3.0.1

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.
@@ -78,4 +78,4 @@ ${v.shareTag}`;J.useEffect(()=>{const G=document.createElement("canvas");N.curre
78
78
  .NSC { font-family:'Noto Sans SC',sans-serif; }
79
79
  .tab-content { animation: fadeIn .3s cubic-bezier(.16,1,.3,1); }
80
80
  .tab-exit { opacity:0; transform:translateY(6px); transition: all .15s ease-in; }
81
- `}),r.jsxs("div",{className:"root",children:[r.jsx(jh,{items:h,onDismiss:s=>b(A=>A.filter(H=>H.id!==s))}),r.jsxs("div",{style:{position:"relative",zIndex:1,maxWidth:480,margin:"0 auto",padding:"16px 14px 0"},children:[r.jsx("div",{style:{position:"absolute",top:16,right:14,zIndex:10},children:r.jsxs("button",{onClick:I,style:{background:"rgba(255,255,255,.06)",border:"1px solid rgba(255,255,255,.1)",borderRadius:8,padding:"4px 10px",cursor:"pointer",color:"rgba(255,255,255,.5)",fontSize:11,fontWeight:600,display:"flex",alignItems:"center",gap:4,transition:"all .2s"},onMouseEnter:s=>s.target.style.background="rgba(255,255,255,.1)",onMouseLeave:s=>s.target.style.background="rgba(255,255,255,.06)",children:["🌐 ",O==="zh"?"EN":"中文"]})}),r.jsx(Eh,{text:_.title,fontSize:38}),r.jsxs("div",{style:{textAlign:"center",fontSize:11,color:"rgba(255,255,255,.2)",marginTop:-4,marginBottom:4},children:[_.subtitle," · ",Et?r.jsx("span",{style:{color:"#4ade80"},children:_.liveData}):et?r.jsx("span",{style:{color:"#fbbf24"},children:_.connecting}):_.hoverHint]}),r.jsx(Hh,{t:_}),r.jsxs("div",{className:tt?"tab-exit":"tab-content",children:[g==="home"&&r.jsxs(r.Fragment,{children:[r.jsx(_h,{pct:Nt,t:_}),r.jsx(Uh,{stats:bt,limit:v.continuousHoursLimit,t:_}),r.jsx(Ch,{stats:bt,t:_}),r.jsx(Oh,{data:bt.last7DailyTokens,t:_}),r.jsx(Rh,{projectMap:bt.projectMap,t:_}),r.jsxs("div",{style:{background:"rgba(255,255,255,.025)",border:"1px solid rgba(255,255,255,.06)",borderRadius:16,padding:"14px 16px",marginBottom:14,minHeight:60},children:[r.jsx("div",{style:{fontSize:10,color:"rgba(255,255,255,.35)",marginBottom:6,paddingLeft:8,borderLeft:"2px solid rgba(249,115,22,.4)"},children:_.quoteTitle}),r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,.7)",lineHeight:1.6,whiteSpace:"pre-line",transition:"opacity .3s"},children:_.quotes[R%_.quotes.length]})]}),r.jsx(Dh,{dailyMap:bt.dailyMap,t:_})]}),g==="rank"&&r.jsx(Bh,{myStats:bt,t:_,isLive:Et}),g==="badge"&&r.jsxs(r.Fragment,{children:[r.jsx(Nh,{stats:bt,t:_}),r.jsx(kh,{stats:bt,pct:Nt,t:_})]}),g==="me"&&r.jsxs(r.Fragment,{children:[r.jsx(Xh,{config:v,setConfig:f,t:_}),r.jsx(Qh,{liveMeta:Et?dt:null,t:_,pairCode:G,pairedTo:Q,isRemote:kt,remoteUpdatedAt:at==null?void 0:at._updatedAt,onPair:s=>{yt(s);try{localStorage.setItem("rehab_paired_to",s)}catch{}},onUnpair:()=>{yt(""),B(null);try{localStorage.removeItem("rehab_paired_to")}catch{}}}),r.jsxs("div",{style:{background:"rgba(255,255,255,.025)",border:"1px solid rgba(255,255,255,.05)",borderRadius:16,padding:16,marginBottom:14},children:[r.jsx("div",{style:{fontSize:14,fontWeight:800,marginBottom:12,paddingLeft:10,borderLeft:"3px solid #f97316"},children:_.myData}),[{l:_.totalSessions,v:bt.totalSessions},{l:_.monthlyTokens,v:ve(bt.monthlyTokens)},{l:_.monthlyMsg,v:bt.monthlyMessages},{l:_.streak,v:`${bt.streak} ${_.daysLabel}`},{l:_.maxDailyToken,v:ve(bt.maxDailyTokens)},{l:_.opusRatio,v:`${Math.round(bt.opusRatio*100)}%`},{l:_.unlocked,v:`${Zl.filter(s=>s.condition(bt)).length} / ${Zl.length}`}].map((s,A)=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"8px 0",borderBottom:A<6?"1px solid rgba(255,255,255,.04)":"none"},children:[r.jsx("span",{style:{fontSize:13,color:"rgba(255,255,255,.45)"},children:s.l}),r.jsx("span",{style:{fontFamily:"JBM",fontSize:13,fontWeight:600,color:"rgba(255,255,255,.7)"},children:s.v})]},A))]})]})]},g),r.jsx("div",{style:{textAlign:"center",padding:"20px 0 16px",fontSize:10,color:"rgba(255,255,255,.1)",lineHeight:1.6},children:_.footer})]}),r.jsx("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:100,background:"rgba(8,8,12,.95)",backdropFilter:"blur(20px)",borderTop:"1px solid rgba(255,255,255,.06)",display:"flex",justifyContent:"space-around",alignItems:"center",padding:"0 0 env(safe-area-inset-bottom, 4px)",maxWidth:480,margin:"0 auto"},children:ut.map(s=>{const A=g===s.id;return r.jsx("button",{onClick:()=>V(s.id),style:{background:"none",border:"none",cursor:"pointer",padding:"12px 20px 10px",color:A?"#f97316":"rgba(255,255,255,.3)",fontSize:13,fontWeight:A?700:500,fontFamily:"'Noto Sans SC'",borderTop:A?"2px solid #f97316":"2px solid transparent",transition:"all .2s"},children:s.label},s.id)})})]})]})}ph.createRoot(document.getElementById("root")).render(r.jsx(Zh,{}));
81
+ `}),r.jsxs("div",{className:"root",children:[r.jsx(jh,{items:h,onDismiss:s=>b(A=>A.filter(H=>H.id!==s))}),r.jsxs("div",{style:{position:"relative",zIndex:1,maxWidth:480,margin:"0 auto",padding:"calc(env(safe-area-inset-top, 16px) + 8px) 14px 0"},children:[r.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:4},children:r.jsxs("button",{onClick:I,style:{background:"rgba(255,255,255,.06)",border:"1px solid rgba(255,255,255,.1)",borderRadius:8,padding:"4px 10px",cursor:"pointer",color:"rgba(255,255,255,.5)",fontSize:11,fontWeight:600,display:"flex",alignItems:"center",gap:4,transition:"all .2s"},onMouseEnter:s=>s.target.style.background="rgba(255,255,255,.1)",onMouseLeave:s=>s.target.style.background="rgba(255,255,255,.06)",children:["🌐 ",O==="zh"?"EN":"中文"]})}),r.jsx(Eh,{text:_.title,fontSize:38}),r.jsxs("div",{style:{textAlign:"center",fontSize:11,color:"rgba(255,255,255,.2)",marginTop:-4,marginBottom:4},children:[_.subtitle," · ",Et?r.jsx("span",{style:{color:"#4ade80"},children:_.liveData}):et?r.jsx("span",{style:{color:"#fbbf24"},children:_.connecting}):_.hoverHint]}),r.jsx(Hh,{t:_}),r.jsxs("div",{className:tt?"tab-exit":"tab-content",children:[g==="home"&&r.jsxs(r.Fragment,{children:[r.jsx(_h,{pct:Nt,t:_}),r.jsx(Uh,{stats:bt,limit:v.continuousHoursLimit,t:_}),r.jsx(Ch,{stats:bt,t:_}),r.jsx(Oh,{data:bt.last7DailyTokens,t:_}),r.jsx(Rh,{projectMap:bt.projectMap,t:_}),r.jsxs("div",{style:{background:"rgba(255,255,255,.025)",border:"1px solid rgba(255,255,255,.06)",borderRadius:16,padding:"14px 16px",marginBottom:14,minHeight:60},children:[r.jsx("div",{style:{fontSize:10,color:"rgba(255,255,255,.35)",marginBottom:6,paddingLeft:8,borderLeft:"2px solid rgba(249,115,22,.4)"},children:_.quoteTitle}),r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,.7)",lineHeight:1.6,whiteSpace:"pre-line",transition:"opacity .3s"},children:_.quotes[R%_.quotes.length]})]}),r.jsx(Dh,{dailyMap:bt.dailyMap,t:_})]}),g==="rank"&&r.jsx(Bh,{myStats:bt,t:_,isLive:Et}),g==="badge"&&r.jsxs(r.Fragment,{children:[r.jsx(Nh,{stats:bt,t:_}),r.jsx(kh,{stats:bt,pct:Nt,t:_})]}),g==="me"&&r.jsxs(r.Fragment,{children:[r.jsx(Xh,{config:v,setConfig:f,t:_}),r.jsx(Qh,{liveMeta:Et?dt:null,t:_,pairCode:G,pairedTo:Q,isRemote:kt,remoteUpdatedAt:at==null?void 0:at._updatedAt,onPair:s=>{yt(s);try{localStorage.setItem("rehab_paired_to",s)}catch{}},onUnpair:()=>{yt(""),B(null);try{localStorage.removeItem("rehab_paired_to")}catch{}}}),r.jsxs("div",{style:{background:"rgba(255,255,255,.025)",border:"1px solid rgba(255,255,255,.05)",borderRadius:16,padding:16,marginBottom:14},children:[r.jsx("div",{style:{fontSize:14,fontWeight:800,marginBottom:12,paddingLeft:10,borderLeft:"3px solid #f97316"},children:_.myData}),[{l:_.totalSessions,v:bt.totalSessions},{l:_.monthlyTokens,v:ve(bt.monthlyTokens)},{l:_.monthlyMsg,v:bt.monthlyMessages},{l:_.streak,v:`${bt.streak} ${_.daysLabel}`},{l:_.maxDailyToken,v:ve(bt.maxDailyTokens)},{l:_.opusRatio,v:`${Math.round(bt.opusRatio*100)}%`},{l:_.unlocked,v:`${Zl.filter(s=>s.condition(bt)).length} / ${Zl.length}`}].map((s,A)=>r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"8px 0",borderBottom:A<6?"1px solid rgba(255,255,255,.04)":"none"},children:[r.jsx("span",{style:{fontSize:13,color:"rgba(255,255,255,.45)"},children:s.l}),r.jsx("span",{style:{fontFamily:"JBM",fontSize:13,fontWeight:600,color:"rgba(255,255,255,.7)"},children:s.v})]},A))]})]})]},g),r.jsx("div",{style:{textAlign:"center",padding:"20px 0 16px",fontSize:10,color:"rgba(255,255,255,.1)",lineHeight:1.6},children:_.footer})]}),r.jsx("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:100,background:"rgba(8,8,12,.95)",backdropFilter:"blur(20px)",borderTop:"1px solid rgba(255,255,255,.06)",display:"flex",justifyContent:"space-around",alignItems:"center",padding:"0 0 env(safe-area-inset-bottom, 4px)",maxWidth:480,margin:"0 auto"},children:ut.map(s=>{const A=g===s.id;return r.jsx("button",{onClick:()=>V(s.id),style:{background:"none",border:"none",cursor:"pointer",padding:"12px 20px 10px",color:A?"#f97316":"rgba(255,255,255,.3)",fontSize:13,fontWeight:A?700:500,fontFamily:"'Noto Sans SC'",borderTop:A?"2px solid #f97316":"2px solid transparent",transition:"all .2s"},children:s.label},s.id)})})]})]})}ph.createRoot(document.getElementById("root")).render(r.jsx(Zh,{}));
package/dist/index.html CHANGED
@@ -16,7 +16,7 @@
16
16
  * { margin: 0; padding: 0; box-sizing: border-box; }
17
17
  html, body, #root { background: #08080c; min-height: 100dvh; }
18
18
  </style>
19
- <script type="module" crossorigin src="/assets/index-CvTrI7qp.js"></script>
19
+ <script type="module" crossorigin src="/assets/index-B6zmqy6R.js"></script>
20
20
  </head>
21
21
  <body>
22
22
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-rehab",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Claude Code usage data server — connects to the Rehab dashboard",
5
5
  "type": "module",
6
6
  "bin": {