claude-alfred 0.3.21 → 0.3.22

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.
Files changed (58) hide show
  1. package/README.ja.md +5 -6
  2. package/README.md +5 -6
  3. package/dist/{audit-e13xK9Fr.mjs → audit-DmNpxVt4.mjs} +1 -1
  4. package/dist/cli.mjs +3 -3
  5. package/dist/{directives-DfzKzUAL.mjs → directives-Drv78LF2.mjs} +1 -1
  6. package/dist/{dispatcher-BDl_Flyx.mjs → dispatcher-Bm43S1GQ.mjs} +6 -6
  7. package/dist/{drift-CKOseTmh.mjs → drift-PySAVqkr.mjs} +3 -3
  8. package/dist/{epic-CfxJ13zy.mjs → epic-DJZgRHFr.mjs} +1 -1
  9. package/dist/{living-spec-BfQnawom.mjs → living-spec-C5kafrYy.mjs} +2 -2
  10. package/dist/{post-tool-DpBkq5ik.mjs → post-tool-CXbKGLOa.mjs} +7 -7
  11. package/dist/post-tool-CiV4IiYH.mjs +11 -0
  12. package/dist/{pre-compact-Cncx9q7L.mjs → pre-compact-p_eqH4vL.mjs} +5 -9
  13. package/dist/{pre-tool-Dyp4S8cV.mjs → pre-tool-CnoF_sta.mjs} +8 -8
  14. package/dist/{review-gate-7Pfe_A-8.mjs → review-gate-P_eycqEX.mjs} +1 -3
  15. package/dist/{server-CYUJFZhW.mjs → server-AL3qcEqy.mjs} +5 -10
  16. package/dist/{server-D3b54XYU.mjs → server-BJ1jUEm2.mjs} +18 -123
  17. package/dist/{session-start-CU4-KivX.mjs → session-start-CS4gyHMH.mjs} +8 -5
  18. package/dist/{stop-CGv96IQd.mjs → stop-DJgb2wrf.mjs} +2 -2
  19. package/dist/{types-K2jxpWyU.mjs → types-DyBixMZ0.mjs} +13 -17
  20. package/dist/{user-prompt-BPAOU8f-.mjs → user-prompt-vSVUeux8.mjs} +13 -15
  21. package/package.json +1 -1
  22. package/web/dist/assets/activity-CXCppRFo.js +1 -0
  23. package/web/dist/assets/alert-dialog-EwyZzvus.js +20 -0
  24. package/web/dist/assets/{badge-C_nJR3_P.js → badge-LeU66vxM.js} +1936 -1934
  25. package/web/dist/assets/butler-empty-DDWZ5SlJ.js +1 -0
  26. package/web/dist/assets/button-9A03BFB6.js +1 -0
  27. package/web/dist/assets/{card-D-KKTUrZ.js → card-C6aK9m3p.js} +1 -1
  28. package/web/dist/assets/{es2015-C0wv2Iox.js → es2015-DCAVxrl_.js} +1 -1
  29. package/web/dist/assets/index-BWInN_tm.css +1 -0
  30. package/web/dist/assets/index-uOCUo7Eo.js +10 -0
  31. package/web/dist/assets/{knowledge-Cf76s4T9.js → knowledge-CB_kjUsk.js} +15 -15
  32. package/web/dist/assets/{link-CfxeT0ji.js → link-DBmH_08w.js} +1 -1
  33. package/web/dist/assets/motion-BYjuf98F.js +1 -0
  34. package/web/dist/assets/preload-helper-BmUhu0Y-.js +1 -0
  35. package/web/dist/assets/progress-qFNeU9jW.js +6 -0
  36. package/web/dist/assets/routes-Dgq6wgCk.js +1 -0
  37. package/web/dist/assets/separator-mtcJeU26.js +5 -0
  38. package/web/dist/assets/{skeleton-ByYY54GV.js → skeleton-Cwiwlof_.js} +1 -1
  39. package/web/dist/assets/stagger-container-GyT5nb39.js +9 -0
  40. package/web/dist/assets/tasks-CVVDa650.js +1 -0
  41. package/web/dist/assets/tasks._slug-BccdO-CH.js +44 -0
  42. package/web/dist/assets/tooltip-CAuNczLe.js +1 -0
  43. package/web/dist/index.html +9 -7
  44. package/dist/post-tool-BawR4gHR.mjs +0 -11
  45. package/web/dist/assets/activity-BMH0Gseq.js +0 -3
  46. package/web/dist/assets/alert-dialog-Df-NKKik.js +0 -20
  47. package/web/dist/assets/button-BC81_2hy.js +0 -1
  48. package/web/dist/assets/dist-CCslGrjS.js +0 -1
  49. package/web/dist/assets/dist-CbLvV7YE.js +0 -1
  50. package/web/dist/assets/index-BedjjxO2.css +0 -1
  51. package/web/dist/assets/index-ClD5S_3_.js +0 -138
  52. package/web/dist/assets/progress-3fcfVnZl.js +0 -6
  53. package/web/dist/assets/routes-DZR7VbL6.js +0 -1
  54. package/web/dist/assets/stagger-container-ClpnejW9.js +0 -9
  55. package/web/dist/assets/tasks-Byg4aFbV.js +0 -1
  56. package/web/dist/assets/tasks._slug-jxqMGzVd.js +0 -44
  57. package/web/dist/assets/useParams-BHiGLTRd.js +0 -1
  58. /package/web/dist/assets/{types-CkMKNgId.js → types-Gr5neTyu.js} +0 -0
@@ -1,6 +0,0 @@
1
- import{$t as e,Tn as t,a as n,en as r,i,j as a}from"./badge-C_nJR3_P.js";var o=t(r(),1),s=e(),c=`Progress`,l=100,[u,d]=i(c),[f,p]=u(c),m=o.forwardRef((e,t)=>{let{__scopeProgress:r,value:i=null,max:a,getValueLabel:o=_,...c}=e;(a||a===0)&&!b(a)&&console.error(S(`${a}`,`Progress`));let u=b(a)?a:l;i!==null&&!x(i,u)&&console.error(C(`${i}`,`Progress`));let d=x(i,u)?i:null,p=y(d)?o(d,u):void 0;return(0,s.jsx)(f,{scope:r,value:d,max:u,children:(0,s.jsx)(n.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":y(d)?d:void 0,"aria-valuetext":p,role:`progressbar`,"data-state":v(d,u),"data-value":d??void 0,"data-max":u,...c,ref:t})})});m.displayName=c;var h=`ProgressIndicator`,g=o.forwardRef((e,t)=>{let{__scopeProgress:r,...i}=e,a=p(h,r);return(0,s.jsx)(n.div,{"data-state":v(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...i,ref:t})});g.displayName=h;function _(e,t){return`${Math.round(e/t*100)}%`}function v(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function y(e){return typeof e==`number`}function b(e){return y(e)&&!isNaN(e)&&e>0}function x(e,t){return y(e)&&!isNaN(e)&&e<=t&&e>=0}function S(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${l}\`.`}function C(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
- - a positive number
3
- - less than the value passed to \`max\` (or ${l} if no \`max\` prop is set)
4
- - \`null\` or \`undefined\` if the progress is indeterminate.
5
-
6
- Defaulting to \`null\`.`}var w=m,T=g;function E({className:e,value:t,...n}){return(0,s.jsx)(w,{"data-slot":`progress`,className:a(`relative h-1 w-full overflow-hidden rounded-full bg-primary/20`,e),...n,children:(0,s.jsx)(T,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})})}export{E as t};
@@ -1 +0,0 @@
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,9 +0,0 @@
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
- [data-motion-pop-id="${s}"] {
3
- position: absolute !important;
4
- width: ${e}px !important;
5
- height: ${a}px !important;
6
- ${h}px !important;
7
- ${g}px !important;
8
- }
9
- `),()=>{c.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,S.jsx)(C,{isPresent:t,childRef:c,sizeRef:l,pop:o,children:o===!1?e:v.cloneElement(e,{ref:d})})}var T=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:c,anchorX:l,anchorY:u,root:d})=>{let f=r(E),p=(0,v.useId)(),m=!0,h=(0,v.useMemo)(()=>(m=!1,{id:p,initial:t,isPresent:n,custom:o,onExitComplete:e=>{f.set(e,!0);for(let e of f.values())if(!e)return;a&&a()},register:e=>(f.set(e,!1),()=>f.delete(e))}),[n,f,a]);return s&&m&&(h={...h}),(0,v.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[n]),v.useEffect(()=>{!n&&!f.size&&a&&a()},[n]),e=(0,S.jsx)(w,{pop:c===`popLayout`,isPresent:n,anchorX:l,anchorY:u,root:d,children:e}),(0,S.jsx)(i.Provider,{value:h,children:e})};function E(){return new Map}var D=e=>e.key||``;function O(e){let t=[];return v.Children.forEach(e,e=>{(0,v.isValidElement)(e)&&t.push(e)}),t}var k=({children:e,custom:t,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s=`sync`,propagate:c=!1,anchorX:l=`left`,anchorY:u=`top`,root:d})=>{let[p,m]=n(c),g=(0,v.useMemo)(()=>O(e),[e]),_=c&&!p?[]:g.map(D),y=(0,v.useRef)(!0),b=(0,v.useRef)(g),x=r(()=>new Map),C=(0,v.useRef)(new Set),[w,E]=(0,v.useState)(g),[k,A]=(0,v.useState)(g);h(()=>{y.current=!1,b.current=g;for(let e=0;e<k.length;e++){let t=D(k[e]);_.includes(t)?(x.delete(t),C.current.delete(t)):x.get(t)!==!0&&x.set(t,!1)}},[k,_.length,_.join(`-`)]);let j=[];if(g!==w){let e=[...g];for(let t=0;t<k.length;t++){let n=k[t],r=D(n);_.includes(r)||(e.splice(t,0,n),j.push(n))}return s===`wait`&&j.length&&(e=j),A(O(e)),E(g),null}let{forceRender:M}=(0,v.useContext)(f);return(0,S.jsx)(S.Fragment,{children:k.map(e=>{let n=D(e),r=c&&!p?!1:g===k||_.includes(n);return(0,S.jsx)(T,{isPresent:r,initial:!y.current||i?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:d,onExitComplete:r?void 0:()=>{if(C.current.has(n))return;if(x.has(n))C.current.add(n),x.set(n,!0);else return;let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(M?.(),A(b.current),c&&m?.(),a&&a())},anchorX:l,anchorY:u,children:e},n)})})};function A({className:e,...t}){return(0,S.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:m(`mx-auto flex w-full justify-center`,e),...t})}function j({className:e,...t}){return(0,S.jsx)(`ul`,{"data-slot":`pagination-content`,className:m(`flex flex-row items-center gap-1`,e),...t})}function M({...e}){return(0,S.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function N({className:e,isActive:t,size:n=`icon`,...r}){return(0,S.jsx)(`a`,{"aria-current":t?`page`:void 0,"data-slot":`pagination-link`,"data-active":t,className:m(_({variant:t?`outline`:`ghost`,size:n}),e),...r})}function P({className:e,...t}){return(0,S.jsxs)(N,{"aria-label":`Go to previous page`,size:`default`,className:m(`gap-1 px-2.5 sm:pl-2.5`,e),...t,children:[(0,S.jsx)(d,{}),(0,S.jsx)(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function F({className:e,...t}){return(0,S.jsxs)(N,{"aria-label":`Go to next page`,size:`default`,className:m(`gap-1 px-2.5 sm:pr-2.5`,e),...t,children:[(0,S.jsx)(`span`,{className:`hidden sm:block`,children:`Next`}),(0,S.jsx)(g,{})]})}var I={hidden:{},visible:{transition:{...s}}};function L({children:e,className:n,style:r}){return(0,S.jsx)(t.div,{className:n,style:r,variants:I,initial:`hidden`,animate:`visible`,children:(0,S.jsx)(k,{children:v.Children.map(e,(e,n)=>e?(0,S.jsx)(t.div,{variants:c,transition:{...o},children:e},n):null)})})}export{N as a,M as i,A as n,F as o,j as r,P as s,L as t};
@@ -1 +0,0 @@
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};