claude-alfred 0.3.19 → 0.3.21
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.ja.md +27 -1
- package/README.md +27 -1
- package/content/hooks/hooks.json +0 -5
- package/dist/cli.mjs +2 -2
- package/dist/{directives-BtMZZnDe.mjs → directives-DfzKzUAL.mjs} +1 -1
- package/dist/{dispatcher-Bl7px8hy.mjs → dispatcher-BDl_Flyx.mjs} +6 -6
- package/dist/{post-tool-BRoelm73.mjs → post-tool-BawR4gHR.mjs} +5 -5
- package/dist/{post-tool-BL5YKl-j.mjs → post-tool-DpBkq5ik.mjs} +4 -4
- package/dist/{pre-compact-DEqTQ_7v.mjs → pre-compact-Cncx9q7L.mjs} +1 -1
- package/dist/{pre-tool-YJGmHuiU.mjs → pre-tool-Dyp4S8cV.mjs} +43 -6
- package/dist/{review-gate-0cGEW7jx.mjs → review-gate-7Pfe_A-8.mjs} +1 -1
- package/dist/{server-DaiRsZ3w.mjs → server-D3b54XYU.mjs} +74 -30
- package/dist/{session-start-CrZszyvc.mjs → session-start-CU4-KivX.mjs} +3 -3
- package/dist/{state-XSGGyez_.mjs → state-Cih-8_Zc.mjs} +1 -1
- package/dist/{stop-gh3SchT6.mjs → stop-CGv96IQd.mjs} +2 -2
- package/dist/{user-prompt-la6CpECb.mjs → user-prompt-BPAOU8f-.mjs} +3 -3
- package/package.json +1 -1
- package/web/dist/assets/activity-BMH0Gseq.js +3 -0
- package/web/dist/assets/{alert-dialog-DOk2vAC0.js → alert-dialog-Df-NKKik.js} +1 -1
- package/web/dist/assets/button-BC81_2hy.js +1 -0
- package/web/dist/assets/dist-CCslGrjS.js +1 -0
- package/web/dist/assets/es2015-C0wv2Iox.js +41 -0
- package/web/dist/assets/index-BedjjxO2.css +1 -0
- package/web/dist/assets/index-ClD5S_3_.js +138 -0
- package/web/dist/assets/{knowledge-BVNS0rvw.js → knowledge-Cf76s4T9.js} +8 -8
- package/web/dist/assets/routes-DZR7VbL6.js +1 -0
- package/web/dist/assets/{stagger-container-Cw2dfuIA.js → stagger-container-ClpnejW9.js} +1 -1
- package/web/dist/assets/{tasks-6gs3T7RP.js → tasks-Byg4aFbV.js} +1 -1
- package/web/dist/assets/{tasks._slug-D_xK_slB.js → tasks._slug-jxqMGzVd.js} +10 -10
- package/web/dist/index.html +4 -4
- package/web/dist/assets/activity-CRNPQErc.js +0 -3
- package/web/dist/assets/button-DHDUbkWK.js +0 -1
- package/web/dist/assets/dist-Dkaca6_h.js +0 -1
- package/web/dist/assets/index-R19UEUEr.js +0 -178
- package/web/dist/assets/index-r1JIc2ya.css +0 -1
- package/web/dist/assets/routes-BVHQFTM8.js +0 -1
- package/web/dist/assets/tooltip-z-i3XAtt.js +0 -1
- /package/web/dist/assets/{dist-CzjiYFd3.js → dist-CbLvV7YE.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$t as e,At as t,B as n,Ct as r,D as i,F as a,G as o,H as s,Ht as c,J as l,L as u,M as d,Tn as f,U as p,V as m,W as h,X as g,_t as _,en as v,g as y,j as b,jt as x,p as ee,q as te,t as ne,xt as re,z as S,zt as C}from"./badge-C_nJR3_P.js";import{t as w}from"./link-CfxeT0ji.js";import{a as T,i as E,n as D,o as ie,r as O,s as ae,t as oe}from"./stagger-container-ClpnejW9.js";import"./button-BC81_2hy.js";import{t as k}from"./progress-3fcfVnZl.js";import{a as A,i as j,r as M}from"./index-ClD5S_3_.js";import{i as N,n as P,r as F,t as I}from"./card-D-KKTUrZ.js";import{t as L}from"./skeleton-ByYY54GV.js";function R(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=p(i,a,o);return t?s(r):s}function z(e,t,n={}){let r=e.get(),i=null,a=r,c,l=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,u=()=>{i&&=(i.stop(),null),e.animation=void 0},d=()=>{let t=V(e.get()),r=V(a);if(t===r){u();return}let o=i?i.getGeneratorVelocity():e.getVelocity();u(),i=new s({keyframes:[t,r],velocity:o,type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:c})},f=()=>{d(),e.animation=i??void 0,e.events.animationStart?.notify(),i?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{a=e,c=e=>t(B(e,l)),o.postRender(f)},u),S(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(B(t,l),!1)):e.set(B(t,l))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return u}function B(e,t){return t?e+t:e}function V(e){return typeof e==`number`?e:parseFloat(e)}var H=f(v(),1);function U(e){let t=l(()=>m(e)),{isStatic:n}=(0,H.useContext)(u);if(n){let[,n]=(0,H.useState)(e);(0,H.useEffect)(()=>t.on(`change`,n),[])}return t}function W(e,t){let n=U(t()),r=()=>n.set(t());return r(),te(()=>{let t=()=>o.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),h(r)}}),n}function G(e){n.current=[],e();let t=W(n.current,e);return n.current=void 0,t}function K(e,t,n,r){if(typeof e==`function`)return G(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return se(e,t,n,r);let i=typeof t==`function`?t:R(t,n,r),a=Array.isArray(e)?q(e,i):q([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function q(e,t){let n=l(()=>[]);return W(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function se(e,t,n,r){let i=l(()=>Object.keys(n)),a=l(()=>({}));for(let o of i)a[o]=K(e,t,n[o],r);return a}function ce(e,t={}){let{isStatic:n}=(0,H.useContext)(u),r=()=>S(e)?e.get():e;if(n)return K(r);let i=U(r());return(0,H.useInsertionEffect)(()=>z(i,e,t),[i,JSON.stringify(t)]),i}function le(e,t={}){return ce(e,{type:`spring`,...t})}var J=e();function ue({value:e,className:t,style:n}){let r=U(0),i=K(le(r,d),e=>Math.round(e)),o=(0,H.useRef)(null);return(0,H.useEffect)(()=>{r.set(e)},[e,r]),(0,H.useEffect)(()=>i.on(`change`,e=>{o.current&&(o.current.textContent=String(e))}),[i]),(0,J.jsx)(a.span,{ref:o,className:t,style:n,children:e})}function Y({label:e,value:t,icon:n,loading:r}){return(0,J.jsx)(I,{className:`border-stone-200 dark:border-stone-700`,children:(0,J.jsxs)(P,{className:`flex items-center gap-4 py-4`,children:[(0,J.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded-lg bg-accent/80`,children:n}),(0,J.jsxs)(`div`,{children:[r?(0,J.jsx)(L,{className:`h-7 w-12`}):(0,J.jsx)(ue,{value:t,className:`text-2xl font-bold`,style:{fontFamily:`var(--font-display)`}}),(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})]})]})})}var X=[{r:45,g:139,b:122},{r:98,g:129,b:65},{r:123,g:107,b:141},{r:230,g:126,b:34},{r:64,g:81,b:59}];function Z(e){let t=X[e%X.length];return`linear-gradient(90deg, rgba(${t.r},${t.g},${t.b},0.04) 0%, rgba(${t.r},${t.g},${t.b},0.12) 50%, rgba(${t.r},${t.g},${t.b},0.04) 100%)`}var Q={S:`size.S`,M:`size.M`,L:`size.L`,XL:`size.XL`,D:`size.D`};function de(e,t){return e.status===`completed`||e.status===`done`||e.status===`cancelled`?null:e.review_status===`changes_requested`?t(`action.changesRequested`):e.review_status===`pending`&&[`M`,`L`,`XL`].includes(e.size??``)?t(`action.awaitingReview`):e.focus?t(`action.implementing`):t(`action.specCreation`)}function fe({task:e,colorIndex:t}){let{t:n}=C(),i=(e.total??0)>0?(e.completed??0)/(e.total??1)*100:0,a=e.status===`completed`||e.status===`done`||e.status===`cancelled`,o=e.waves?.find(e=>e.isCurrent),s=X[t%X.length],c=`rgb(${s.r},${s.g},${s.b})`,l=de(e,n);return(0,J.jsx)(w,{to:`/tasks/$slug`,params:{slug:e.slug},className:`block`,children:(0,J.jsx)(I,{className:b(`al-icon-wrapper h-[140px] !gap-0 !py-0 border-stone-200 transition-[border-color,transform] duration-200 hover:border-stone-300 hover:-translate-y-0.5 dark:border-stone-700 dark:hover:border-stone-600`,a&&`opacity-60`),children:(0,J.jsxs)(P,{className:`flex-1 flex flex-col p-4 gap-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[a?(0,J.jsx)(r,{className:`size-4 shrink-0`,style:{color:`#2d8b7a`}}):(0,J.jsx)(re,{className:`size-4 shrink-0`,style:{color:c}}),(0,J.jsx)(`span`,{className:`text-sm font-semibold font-mono truncate`,children:e.slug})]}),(0,J.jsx)(`div`,{className:`flex shrink-0 gap-1.5`,children:e.size&&(0,J.jsxs)(M,{children:[(0,J.jsx)(A,{asChild:!0,children:(0,J.jsx)(ne,{variant:`outline`,className:`text-[10px] px-1.5 py-0 rounded-full cursor-help`,children:e.size})}),(0,J.jsx)(j,{children:Q[e.size]?n(Q[e.size]):e.size})]})})]}),(0,J.jsxs)(`div`,{className:`flex-1 flex flex-col justify-center gap-1`,children:[e.project_name&&(0,J.jsx)(`p`,{className:`text-[10px] font-medium text-muted-foreground`,children:e.project_name}),o&&!a?(0,J.jsxs)(`div`,{className:`relative overflow-hidden rounded-md px-2 py-1`,children:[(0,J.jsx)(`div`,{className:`absolute inset-0 animate-shimmer`,style:{background:Z(t),backgroundSize:`200% 100%`}}),(0,J.jsxs)(`p`,{className:`relative text-[11px] line-clamp-1`,style:{color:c},children:[`→ `,o.key===`closing`?`Closing`:`Wave ${o.key}`,`: `,o.title,` (`,o.checked,`/`,o.total,`)`]})]}):l?(0,J.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:l}):null]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,J.jsx)(k,{value:i,className:`flex-1`}),(0,J.jsxs)(`span`,{className:`text-[11px] tabular-nums text-muted-foreground`,children:[e.completed,`/`,e.total]})]})]})})})}function pe({epics:e}){let{t}=C();return!e||e.length===0?null:(0,J.jsxs)(I,{className:`border-stone-200 dark:border-stone-700`,children:[(0,J.jsx)(F,{className:`pb-3`,children:(0,J.jsx)(N,{className:`text-sm font-semibold`,style:{fontFamily:`var(--font-display)`},children:t(`overview.epics`)})}),(0,J.jsx)(P,{className:`space-y-3`,children:e.map(e=>{let t=e.total>0?e.completed/e.total*100:0;return(0,J.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.name}),(0,J.jsxs)(`span`,{className:`text-xs tabular-nums text-muted-foreground shrink-0`,children:[e.completed,`/`,e.total]})]}),(0,J.jsx)(k,{value:t,className:``})]},e.slug)})})]})}var $=9;function me(){let{t:e}=C(),[n,r]=(0,H.useState)(1),{data:a,isLoading:o}=c(i()),{data:s}=c(y()),{data:l}=c(ee()),u=[...a?.tasks??[]].sort((e,t)=>{let n=e.started_at??``;return(t.started_at??``).localeCompare(n)});return(0,J.jsxs)(`div`,{className:`space-y-8`,children:[(0,J.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-[1fr_1fr_1fr_1fr_auto]`,children:[(0,J.jsx)(Y,{label:e(`overview.totalTasks`),value:u.length,icon:(0,J.jsx)(g,{className:`size-4`,style:{color:`#e67e22`}}),loading:o}),(0,J.jsx)(Y,{label:e(`overview.active`),value:u.filter(e=>{let t=e.status;return t!==`completed`&&t!==`done`&&t!==`cancelled`}).length,icon:(0,J.jsx)(_,{className:`size-4`,style:{color:`#40513b`}}),loading:o}),(0,J.jsx)(Y,{label:e(`overview.completed`),value:u.filter(e=>e.status===`completed`||e.status===`done`).length,icon:(0,J.jsx)(t,{className:`size-4`,style:{color:`#2d8b7a`}}),loading:o}),(0,J.jsx)(Y,{label:e(`overview.knowledge`),value:s?.total??0,icon:(0,J.jsx)(x,{className:`size-4`,style:{color:`#628141`}})}),(0,J.jsx)(he,{stats:s})]}),u.length>0&&(()=>{let t=Math.ceil(u.length/$),i=u.slice((n-1)*$,n*$);return(0,J.jsxs)(`section`,{className:`space-y-3`,children:[(0,J.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight text-foreground`,style:{fontFamily:`var(--font-display)`},children:e(`overview.tasks`)}),(0,J.jsx)(oe,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,style:{minHeight:`calc(140px * 3 + 16px * 2)`},children:i.map((e,t)=>(0,J.jsx)(fe,{task:e,colorIndex:(n-1)*$+t},e.slug))}),t>1&&(0,J.jsx)(_e,{page:n,totalPages:t,onPageChange:r})]})})(),(0,J.jsx)(pe,{epics:l?.epics?.filter(e=>e.status!==`completed`)})]})}function he({stats:e}){let{t}=C();return e?(0,J.jsx)(I,{className:`border-stone-200 dark:border-stone-700 min-w-[220px]`,children:(0,J.jsx)(P,{className:`flex items-center gap-4 py-4`,children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-2 flex-1`,children:[(0,J.jsx)(`p`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:t(`overview.memoryHealth`)}),(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,J.jsxs)(M,{children:[(0,J.jsx)(A,{asChild:!0,children:(0,J.jsxs)(`span`,{className:`text-sm tabular-nums font-medium cursor-help`,style:{color:(e.stale_count??0)>0?`#e67e22`:void 0},children:[e.stale_count??0,` `,(0,J.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:t(`overview.stale`)})]})}),(0,J.jsx)(j,{children:t(`overview.staleHint`)})]}),(0,J.jsxs)(M,{children:[(0,J.jsx)(A,{asChild:!0,children:(0,J.jsxs)(`span`,{className:`text-sm tabular-nums font-medium cursor-help`,style:{color:(e.conflict_count??0)>0?`#c0392b`:void 0},children:[e.conflict_count??0,` `,(0,J.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:t(`overview.conflicts`)})]})}),(0,J.jsx)(j,{children:t(`overview.conflictsHint`)})]})]}),e.vitality_dist&&(0,J.jsx)(ge,{dist:e.vitality_dist})]})})}):null}function ge({dist:e}){let{t}=C(),n=e.reduce((e,t)=>e+t,0)||1;return(0,J.jsxs)(M,{children:[(0,J.jsx)(A,{asChild:!0,children:(0,J.jsx)(`div`,{className:`flex h-2 w-full overflow-hidden rounded-full cursor-help`,children:e.map((e,t)=>(0,J.jsx)(`div`,{style:{width:`${e/n*100}%`,backgroundColor:`#2d8b7a`,opacity:.2+t/4*.8}},t))})}),(0,J.jsxs)(j,{children:[(0,J.jsx)(`p`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:t(`overview.vitality`)}),(0,J.jsx)(`div`,{className:`flex gap-2 mt-1 text-[10px]`,children:[`0-20`,`21-40`,`41-60`,`61-80`,`81-100`].map((t,n)=>(0,J.jsxs)(`span`,{className:`tabular-nums`,children:[t,`: `,e[n]]},t))})]})]})}function _e({page:e,totalPages:t,onPageChange:n}){return(0,J.jsx)(D,{children:(0,J.jsxs)(O,{children:[(0,J.jsx)(E,{children:(0,J.jsx)(ae,{onClick:()=>n(Math.max(1,e-1)),"aria-disabled":e<=1,className:e<=1?`pointer-events-none opacity-50`:`cursor-pointer`})}),Array.from({length:t},(e,t)=>t+1).map(t=>(0,J.jsx)(E,{children:(0,J.jsx)(T,{isActive:t===e,onClick:()=>n(t),className:`cursor-pointer`,children:t})},t)),(0,J.jsx)(E,{children:(0,J.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums px-2`,children:[e,` / `,t]})}),(0,J.jsx)(E,{children:(0,J.jsx)(ie,{onClick:()=>n(Math.min(t,e+1)),"aria-disabled":e>=t,className:e>=t?`pointer-events-none opacity-50`:`cursor-pointer`})})]})})}export{me as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$t as e,F as t,I as n,J as r,K as i,L as a,M as o,N as s,P as c,R as l,Tn as u,Tt as d,Y as f,en as p,j as m,q as h,wt as g}from"./badge-C_nJR3_P.js";import{n as _}from"./button-
|
|
1
|
+
import{$t as e,F as t,I as n,J as r,K as i,L as a,M as o,N as s,P as c,R as l,Tn as u,Tt as d,Y as f,en as p,j as m,q as h,wt as g}from"./badge-C_nJR3_P.js";import{n as _}from"./button-BC81_2hy.js";var v=u(p(),1);function y(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function b(...e){return t=>{let n=!1,r=e.map(e=>{let r=y(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():y(e[t],null)}}}}function x(...e){return v.useCallback(b(...e),e)}var S=e(),C=class extends v.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(l(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=l(e)&&e.offsetWidth||0,r=l(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function w({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){let s=(0,v.useId)(),c=(0,v.useRef)(null),l=(0,v.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=(0,v.useContext)(a),d=x(c,e.props?.ref??e?.ref);return(0,v.useInsertionEffect)(()=>{let{width:e,height:a,top:d,left:f,right:p,bottom:m}=l.current;if(t||o===!1||!c.current||!e||!a)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;c.current.dataset.motionPopId=s;let _=document.createElement(`style`);u&&(_.nonce=u);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${s}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${e}px !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,Ct as t,D as n,Et as r,Ht as i,St as a,Tn as o,bt as s,en as c,j as l,t as u,yt as d,zt as f}from"./badge-C_nJR3_P.js";import{t as p}from"./link-CfxeT0ji.js";import{t as m}from"./useParams-BHiGLTRd.js";import{t as h}from"./progress-3fcfVnZl.js";import{
|
|
1
|
+
import{$t as e,Ct as t,D as n,Et as r,Ht as i,St as a,Tn as o,bt as s,en as c,j as l,t as u,yt as d,zt as f}from"./badge-C_nJR3_P.js";import{t as p}from"./link-CfxeT0ji.js";import{t as m}from"./useParams-BHiGLTRd.js";import{t as h}from"./progress-3fcfVnZl.js";import{C as g,S as _}from"./index-ClD5S_3_.js";import{i as v,n as y}from"./types-CkMKNgId.js";var b=o(c()),x=e();function S({status:e}){let t=y[e]??y.pending;return(0,x.jsx)(`span`,{style:{backgroundColor:t.bg,color:t.text},className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium`,children:t.label})}var C=[{r:45,g:139,b:122},{r:98,g:129,b:65},{r:123,g:107,b:141},{r:230,g:126,b:34},{r:64,g:81,b:59}];function w(){let{t:e}=f(),{data:t}=i(n()),r=t?.tasks??[],{slug:a}=m({strict:!1}),[o,s]=(0,b.useState)(`all`),[c,u]=(0,b.useState)(new Set),d=new Set([`completed`,`done`,`cancelled`]),p=r.filter(e=>!(o===`active`&&d.has(e.status??``)||o===`review`&&e.review_status!==`pending`||o===`done`&&!d.has(e.status??``)||c.size>0&&!c.has(e.size??``))),h=e=>u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,x.jsxs)(`div`,{className:`flex gap-6 items-start`,children:[(0,x.jsxs)(`div`,{className:`w-72 shrink-0 space-y-2 overflow-y-auto max-h-[calc(100vh-100px)] px-1 pt-1`,children:[(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1 pb-1`,children:[`all`,`active`,`review`,`done`].map(t=>(0,x.jsx)(`button`,{type:`button`,onClick:()=>s(t),className:l(`rounded-lg px-2 py-0.5 text-[10px] font-medium transition-colors border`,o===t?`bg-accent text-foreground border-border`:`text-muted-foreground border-transparent hover:bg-accent/50`),children:e(`filter.${t}`)},t))}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1 pb-1`,children:[`S`,`M`,`L`,`XL`,`D`].map(e=>(0,x.jsx)(`button`,{type:`button`,onClick:()=>h(e),className:l(`rounded-full px-1.5 py-0 text-[10px] font-medium transition-colors border`,c.has(e)?`bg-accent text-foreground border-border`:`text-muted-foreground border-transparent hover:bg-accent/50`),children:e},e))}),p.map((e,t)=>(0,x.jsx)(E,{task:e,isSelected:e.slug===a,colorIndex:t},e.slug)),p.length===0&&r.length===0&&(0,x.jsx)(_,{scene:`empty-tray`,messageKey:`empty.noTasks`})]}),(0,x.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,x.jsx)(g,{})})]})}function T({waves:e}){let{t}=f(),n=e.filter(e=>e.checked===e.total&&e.total>0).length;return(0,x.jsxs)(`span`,{children:[t(`tasks.waves`),` (`,n,`/`,e.length,`)`]})}function E({task:e,isSelected:t,colorIndex:n}){let[i,a]=(0,b.useState)(!1),o=(e.total??0)>0?(e.completed??0)/(e.total??1)*100:0,s=e.status===`completed`||e.status===`done`||e.status===`cancelled`,c=C[n%C.length];return(0,x.jsxs)(`div`,{className:l(`rounded-xl border bg-card text-card-foreground transition-colors`,t&&`ring-1`,s&&`opacity-60`),style:t?{borderColor:`rgba(${c.r},${c.g},${c.b},0.35)`}:void 0,children:[(0,x.jsx)(p,{to:`/tasks/$slug`,params:{slug:e.slug},className:`block p-3 pb-2`,children:(0,x.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,x.jsx)(D,{status:e.status??`pending`}),(0,x.jsx)(`span`,{className:`text-sm font-medium font-mono truncate`,children:e.slug})]}),(0,x.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,x.jsx)(S,{status:e.status??`pending`}),(0,x.jsx)(u,{variant:`outline`,className:`text-[10px] px-1 py-0`,children:e.size??`?`})]})]})}),(0,x.jsxs)(`div`,{className:`px-3 pb-2 space-y-1.5`,children:[(e.project_name||e.started_at)&&(0,x.jsxs)(`p`,{className:`text-[10px] font-medium`,style:{color:`#40513b`},children:[e.project_name,e.project_name&&e.started_at&&` · `,e.started_at&&(0,x.jsx)(`span`,{className:`text-muted-foreground/70 font-normal`,children:v(e.started_at)})]}),e.focus&&(0,x.jsx)(`p`,{className:`text-[11px] text-muted-foreground line-clamp-1`,children:e.focus}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(h,{value:o,className:`h-1 flex-1 [&>div]:bg-[#e67e22]`}),(0,x.jsxs)(`span`,{className:`text-[10px] tabular-nums text-muted-foreground`,children:[e.completed,`/`,e.total]})]})]}),e.waves&&e.waves.length>0&&!s&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),a(!i)},className:`flex w-full items-center justify-between border-t border-border/50 px-3 py-1.5 text-[10px] text-muted-foreground hover:bg-accent/50 transition-colors`,children:[(0,x.jsx)(T,{waves:e.waves}),(0,x.jsx)(r,{className:l(`size-3 transition-transform`,i&&`rotate-180`)})]}),i&&(0,x.jsx)(`div`,{className:`px-3 pb-3 space-y-1`,children:e.waves.map(e=>{let t=e.total>0&&e.checked===e.total,n=e.total>0?e.checked/e.total*100:0;return(0,x.jsxs)(`div`,{className:l(`relative rounded-md px-2 py-1.5 transition-colors`,e.isCurrent&&`overflow-hidden`),children:[e.isCurrent&&(0,x.jsx)(`div`,{className:`absolute inset-0 animate-shimmer`,style:{background:`linear-gradient(90deg, rgba(${c.r},${c.g},${c.b},0.03) 0%, rgba(${c.r},${c.g},${c.b},0.10) 50%, rgba(${c.r},${c.g},${c.b},0.03) 100%)`,backgroundSize:`200% 100%`}}),(0,x.jsxs)(`div`,{className:`relative flex items-center justify-between mb-0.5`,children:[(0,x.jsxs)(`span`,{className:l(`text-[10px] font-medium`,t&&`text-muted-foreground`,e.isCurrent&&`font-semibold`),children:[e.key===`closing`?`Closing`:`Wave ${e.key}`,`: `,e.title]}),(0,x.jsxs)(`span`,{className:`text-[10px] tabular-nums text-muted-foreground`,children:[e.checked,`/`,e.total]})]}),(0,x.jsx)(h,{value:n,className:l(`relative h-1`,t?`[&>div]:bg-[#2d8b7a]`:`[&>div]:bg-[#e67e22]`)})]},`wave-${e.key}`)})})]})]})}function D({status:e}){switch(e){case`done`:case`completed`:return(0,x.jsx)(t,{className:`size-3.5 shrink-0`,style:{color:`#2d8b7a`}});case`review`:return(0,x.jsx)(a,{className:`size-3.5 shrink-0`,style:{color:`#e67e22`}});case`deferred`:return(0,x.jsx)(s,{className:`size-3.5 shrink-0`,style:{color:`#7b6b8d`}});case`cancelled`:return(0,x.jsx)(d,{className:`size-3.5 shrink-0`,style:{color:`#c0392b`}});case`pending`:return(0,x.jsx)(a,{className:`size-3.5 shrink-0`,style:{color:`#9ca3af`}});default:return(0,x.jsx)(a,{className:`size-3.5 shrink-0 animate-spin`,style:{color:`#628141`,animationDuration:`1.5s`}})}}export{w as component};
|