@cuongtran001/kanna 1.63.1 → 1.63.2

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 (63) hide show
  1. package/dist/client/assets/{BoardsPage-mVdaRV1l.js → BoardsPage-BJalB-bc.js} +1 -1
  2. package/dist/client/assets/{BoardsRoutePage-Cz6irKOB.js → BoardsRoutePage-BTTjJX-Y.js} +1 -1
  3. package/dist/client/assets/{ChatPage-Di9Mm9dW.js → ChatPage-DH8wtQyD.js} +25 -25
  4. package/dist/client/assets/{CronJobRow-mZDgZOsq.js → CronJobRow-CPbO_jwU.js} +1 -1
  5. package/dist/client/assets/{CronJobsPage-BQYTTqIG.js → CronJobsPage-Ck3SNgGi.js} +1 -1
  6. package/dist/client/assets/{FilePreviewSheet-BG7x42bT.js → FilePreviewSheet-XEuUtDPn.js} +1 -1
  7. package/dist/client/assets/{FlowSurface-Dc6Pe40O.js → FlowSurface-BCbeMTJe.js} +1 -1
  8. package/dist/client/assets/{GenUIBlock-DQ1FAYV2.js → GenUIBlock-BJy_dfs-.js} +2 -2
  9. package/dist/client/assets/{KannaSocketProvider-DNcmJfoW.js → KannaSocketProvider-D7Lzlt35.js} +1 -1
  10. package/dist/client/assets/{LocalProjectsPage-DTYGi4cw.js → LocalProjectsPage-9LJkQjhT.js} +1 -1
  11. package/dist/client/assets/{SettingsPage-1Ka-lzSx.js → SettingsPage-CKrZ6dGQ.js} +1 -1
  12. package/dist/client/assets/{StackBoardsRoutePage-Rg9heAp8.js → StackBoardsRoutePage-t_EaFNG4.js} +1 -1
  13. package/dist/client/assets/{ToolCallMessage-CX01LIYK.js → ToolCallMessage-RbF9XT2B.js} +1 -1
  14. package/dist/client/assets/{VChartSurface-CPViuiRJ.js → VChartSurface-CKuPelsn.js} +1 -1
  15. package/dist/client/assets/{WorkflowsPage-CxJhZK-y.js → WorkflowsPage-B6qUmQA3.js} +1 -1
  16. package/dist/client/assets/{WorkflowsSection-0Qt0VjIb.js → WorkflowsSection-DxO0S4An.js} +1 -1
  17. package/dist/client/assets/{chart-renderer-DTvjgTUY.js → chart-renderer-DjYZvNxh.js} +1 -1
  18. package/dist/client/assets/{chatSounds-03e825gY.js → chatSounds-FD2DQzF6.js} +1 -1
  19. package/dist/client/assets/chevron-left-CJ0qv9kF.js +1 -0
  20. package/dist/client/assets/{clipboard.adapter-wqfdW5oW.js → clipboard.adapter-GN9nnYak.js} +1 -1
  21. package/dist/client/assets/{columnStyle-ulMmtOxb.js → columnStyle-DjA7hA9k.js} +1 -1
  22. package/dist/client/assets/{createScopedStore-BdgPJYn5.js → createScopedStore-BoLB9Rhc.js} +1 -1
  23. package/dist/client/assets/{dist-DOdGYk49.js → dist-CimtOoGK.js} +1 -1
  24. package/dist/client/assets/{editor-icons-99dE-E7-.js → editor-icons-CONDQZof.js} +1 -1
  25. package/dist/client/assets/{ellipsis-cPOVPqFO.js → ellipsis-Cd7sO0LO.js} +1 -1
  26. package/dist/client/assets/{flow-kinds-Ci7hyYYJ.js → flow-kinds-CW2TU_83.js} +1 -1
  27. package/dist/client/assets/{folder-O6RMSd2V.js → folder-C7sXCaHj.js} +1 -1
  28. package/dist/client/assets/{genui-B-C_12wk.js → genui-EzBIAYFE.js} +1 -1
  29. package/dist/client/assets/{globe-CJeLPEEK.js → globe-xmRpmpma.js} +1 -1
  30. package/dist/client/assets/{host-0t0cdS1h.js → host-DCaA9W-Z.js} +1 -1
  31. package/dist/client/assets/index-CDqjh7nt.js +26 -0
  32. package/dist/client/assets/{info-CFDoDIFy.js → info-D4MMvZFe.js} +1 -1
  33. package/dist/client/assets/{input-CSOou2Ke.js → input-C4fvDiQ4.js} +1 -1
  34. package/dist/client/assets/{lexicalToReact-BnB8UCaU.js → lexicalToReact-sPUyOWk6.js} +3 -3
  35. package/dist/client/assets/{log-DFhobdvS.js → log-aTaDVF_e.js} +1 -1
  36. package/dist/client/assets/{monitor-Dz3yjPhP.js → monitor-_CRKcV1h.js} +1 -1
  37. package/dist/client/assets/{pencil-Bt12fSgV.js → pencil-fNBeUUCf.js} +1 -1
  38. package/dist/client/assets/{pendingActionsStore-B_FYCH16.js → pendingActionsStore-COTh4Ztq.js} +1 -1
  39. package/dist/client/assets/{play-BwOyLfLF.js → play-BAmkJfn6.js} +1 -1
  40. package/dist/client/assets/{plus-s5_Ks732.js → plus-c75CkNEO.js} +1 -1
  41. package/dist/client/assets/{popover-CN6KN-Pv.js → popover-CHM4skzh.js} +1 -1
  42. package/dist/client/assets/{pushClient-Fj8srGZa.js → pushClient-BJH_ITRB.js} +1 -1
  43. package/dist/client/assets/runDetached-DqQ3k2ji.js +1 -0
  44. package/dist/client/assets/{segmented-control-Dgl0BpK9.js → segmented-control-DNOwRupT.js} +1 -1
  45. package/dist/client/assets/{select-PbwoBhm-.js → select-dLHiAls6.js} +1 -1
  46. package/dist/client/assets/{settings-header-button-eDLLqJ7N.js → settings-header-button-CGKCzFyk.js} +1 -1
  47. package/dist/client/assets/{sidebarPendingActions-BahCtzQw.js → sidebarPendingActions-Dyp80Lv_.js} +1 -1
  48. package/dist/client/assets/{square-pen-B85EVyLP.js → square-pen-B1IxmScM.js} +1 -1
  49. package/dist/client/assets/{state-mark-BitecvKK.js → state-mark-BhTZfcYe.js} +1 -1
  50. package/dist/client/assets/{status-pill-BqnLSrIr.js → status-pill-CwhJhaMy.js} +1 -1
  51. package/dist/client/assets/{terminal-Cj5AmSMz.js → terminal-Bnj7qFGw.js} +1 -1
  52. package/dist/client/assets/{timer.adapter-g84UDqc_.js → timer.adapter-DHt2zwsL.js} +1 -1
  53. package/dist/client/assets/{tools-oiti76TK.js → tools-3gJcj3hK.js} +1 -1
  54. package/dist/client/assets/{triangle-alert-DluPUJcc.js → triangle-alert-CWrc0CIO.js} +1 -1
  55. package/dist/client/assets/{useAppGlobalState-w8KX_7Yj.js → useAppGlobalState-DKOGrO5l.js} +1 -1
  56. package/dist/client/assets/useKannaState-D7R_-dM6.js +5 -0
  57. package/dist/client/assets/{useTheme-E3vVm1KS.js → useTheme-B57LIKyx.js} +1 -1
  58. package/dist/client/index.html +33 -33
  59. package/package.json +2 -2
  60. package/dist/client/assets/chevron-left-BdNUIJTA.js +0 -1
  61. package/dist/client/assets/index-GJyusOM5.js +0 -26
  62. package/dist/client/assets/runDetached-AJ-JDygc.js +0 -1
  63. package/dist/client/assets/useKannaState-QABuA8Rf.js +0 -5
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{c as r,i,m as a,t as o}from"./log-DFhobdvS.js";import{a as s,c,i as l,n as u,r as d,s as f,t as p}from"./pendingActionsStore-B_FYCH16.js";import{t as m}from"./ellipsis-cPOVPqFO.js";import{t as h}from"./plus-s5_Ks732.js";import{t as g}from"./input-CSOou2Ke.js";import{n as _,r as v,t as y}from"./popover-CN6KN-Pv.js";import{o as b,r as x,s as S,t as C}from"./columnStyle-ulMmtOxb.js";var w=e(t(),1),T=[],E=r()(e=>({templates:T,templatesStatus:`loading`,openMenuId:null,picking:!1,renamingId:null,error:null,setTemplates:t=>e({templates:Array.isArray(t)?t:[],templatesStatus:`ready`}),beginTemplatesLoad:()=>e({templatesStatus:`loading`}),failTemplatesLoad:()=>e({templatesStatus:`failed`}),openMenu:t=>e({openMenuId:t}),closeMenu:()=>e({openMenuId:null}),openPicker:()=>e({picking:!0,error:null}),closePicker:()=>e({picking:!1}),startRename:t=>e({renamingId:t,picking:!1,openMenuId:null}),stopRename:()=>e({renamingId:null}),setError:t=>e({error:t})}));function D(e){return e.templates}var O=e(n(),1),k=[`board.update`,`board.duplicate`,`board.saveAsTemplate`,`board.archive`];function A(e){return l(t=>k.some(n=>t.inFlight[p(n,e)]===!0))}function j({ownerKind:e,ownerId:t,ownerName:n,socket:r,onOpenBoard:c}){let l=x(e,t),f=S(b(l)),m=E(D),g=E(e=>e.picking),_=E(e=>e.renamingId),v=E(e=>e.error),y=E(e=>e.templatesStatus),C=p(`board.create`,l),T=d(C),{openPicker:k,closePicker:A,startRename:j,stopRename:N,setError:P,setTemplates:I}=E.getState();(0,w.useEffect)(()=>r.subscribe({type:`boards`,ownerKind:e,ownerId:t},e=>{S.getState().setBoards(x(e.ownerKind,e.ownerId),e.boards)}),[e,t,r]),(0,w.useEffect)(()=>{let e=!1,t=E.getState();return t.templatesStatus!==`ready`&&t.beginTemplatesLoad(),r.command({type:`board.templates.list`}).then(t=>{e||I(t)},a(t=>{o.error(i,`board.templates.list failed`,t),e||E.getState().failTemplatesLoad()})),()=>{e=!0}},[r,I]);let L=(0,w.useCallback)(async e=>{try{return await r.command(e),P(null),!0}catch(e){return P(e instanceof Error?e.message:`That did not work.`),!1}},[r,P]),R=(0,w.useCallback)(n=>{u(C,async()=>{await L({type:`board.create`,ownerKind:e,ownerId:t,title:n?n.name:`Untitled board`,templateId:n?.id??null})&&A()})},[A,C,e,t,L]),z=(0,w.useCallback)((e,t)=>{N();let n=t.trim();n!==``&&u(p(`board.update`,e),()=>L({type:`board.update`,boardId:e,title:n}))},[L,N]),B=g||f.length===0;return(0,O.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,children:[(0,O.jsxs)(`header`,{className:`flex items-end justify-between gap-4 border-b border-border px-6 py-4`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`h1`,{className:`text-lg font-medium leading-tight tracking-[-0.01em] text-foreground`,children:`Boards`}),(0,O.jsxs)(`p`,{className:`truncate text-13 text-muted-foreground`,children:[n,f.length>0?(0,O.jsxs)(`span`,{className:`tabular-nums`,children:[` · `,f.length,` boards`]}):null]})]}),f.length>0?(0,O.jsxs)(s,{size:`sm`,onClick:k,pending:T,children:[(0,O.jsx)(h,{className:`size-3.5`}),`New board`]}):null]}),v?(0,O.jsx)(`p`,{className:`border-b border-border px-6 py-2 text-13 text-destructive-text`,children:v}):null,(0,O.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[B?(0,O.jsx)(F,{templates:m,templatesStatus:y,creating:T,firstRun:f.length===0,onPick:R,onCancel:A}):null,f.length>0?(0,O.jsx)(`ul`,{className:`px-4 py-1`,children:f.map(e=>(0,O.jsx)(M,{board:e,renaming:_===e.id,onOpen:c,onStartRename:j,onRename:z,onCancelRename:N,onCommand:L},e.id))}):null]})]})}function M({board:e,renaming:t,onOpen:n,onStartRename:r,onRename:i,onCancelRename:a,onCommand:o}){let s=A(e.id),c=(0,w.useCallback)(()=>n(e.id),[e.id,n]),l=(0,w.useCallback)(t=>{t.key===`Enter`&&i(e.id,t.currentTarget.value),t.key===`Escape`&&a()},[e.id,a,i]),u=(0,w.useCallback)(t=>i(e.id,t.currentTarget.value),[e.id,i]);return(0,O.jsxs)(`li`,{"aria-busy":s||void 0,className:`group grid grid-cols-[1fr_auto_auto] items-center gap-5 border-b border-border px-3 py-3 last:border-b-0 hover:bg-secondary`,children:[(0,O.jsx)(`div`,{className:`min-w-0`,children:t?(0,O.jsx)(g,{autoFocus:!0,defaultValue:e.title,onKeyDown:l,onBlur:u,className:`h-7 max-w-sm`,"aria-label":`Board name`}):(0,O.jsxs)(`button`,{type:`button`,onClick:c,className:`block w-full text-left`,children:[(0,O.jsx)(`span`,{className:`block truncate text-15 font-semibold tracking-[-0.005em] text-foreground`,children:e.title}),e.description?(0,O.jsx)(`span`,{className:`mt-0.5 block truncate text-13 text-muted-foreground`,children:e.description}):null]})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-muted-foreground`,children:[(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`b`,{className:`font-medium tabular-nums text-foreground`,children:e.columnCount}),` columns`]}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`b`,{className:`font-medium tabular-nums text-foreground`,children:e.cardCount}),` cards`]})]}),(0,O.jsx)(N,{board:e,pending:s,onStartRename:r,onCommand:o})]})}function N({board:e,pending:t,onStartRename:n,onCommand:r}){let i=E(t=>t.openMenuId===e.id),{openMenu:a,closeMenu:o}=E.getState(),s=(0,w.useCallback)(t=>{t?a(e.id):o()},[e.id,o,a]),l=(0,w.useCallback)(()=>{o(),n(e.id)},[e.id,o,n]),d=(0,w.useCallback)(()=>{o(),u(p(`board.duplicate`,e.id),()=>r({type:`board.duplicate`,boardId:e.id,title:`${e.title} copy`}))},[e.id,e.title,o,r]),h=(0,w.useCallback)(()=>{o(),u(p(`board.saveAsTemplate`,e.id),()=>r({type:`board.saveAsTemplate`,boardId:e.id,name:e.title}))},[e.id,e.title,o,r]),g=(0,w.useCallback)(()=>{o(),u(p(`board.archive`,e.id),()=>r({type:`board.archive`,boardId:e.id}))},[e.id,o,r]);return(0,O.jsxs)(y,{open:i,onOpenChange:s,children:[(0,O.jsx)(v,{asChild:!0,children:(0,O.jsx)(`button`,{type:`button`,"aria-label":`Actions for ${e.title}`,disabled:t,"aria-busy":t||void 0,className:c(`rounded-md px-1.5 py-1 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100`,t&&`opacity-100`),children:t?(0,O.jsx)(f,{className:`size-4`}):(0,O.jsx)(m,{className:`size-4`})})}),(0,O.jsxs)(_,{align:`end`,className:`w-56 p-1`,children:[(0,O.jsx)(P,{onClick:l,children:`Rename`}),(0,O.jsx)(P,{onClick:d,children:`Duplicate structure`}),(0,O.jsx)(P,{onClick:h,children:`Save as template`}),(0,O.jsx)(`div`,{className:`my-1 h-px bg-border`}),(0,O.jsx)(P,{onClick:g,tone:`destructive`,children:`Archive`})]})]})}function P({onClick:e,children:t,tone:n}){return(0,O.jsx)(`button`,{type:`button`,onClick:e,className:c(`flex w-full items-center rounded-sm px-2 py-1.5 text-left text-xs font-medium hover:bg-secondary`,n===`destructive`&&`text-destructive-text`),children:t})}function F({templates:e,templatesStatus:t,creating:n,firstRun:r,onPick:i,onCancel:a}){let o=(0,w.useCallback)(()=>i(null),[i]);return(0,O.jsxs)(`div`,{className:`px-6 py-8`,children:[r?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`h2`,{className:`text-15 font-semibold text-foreground`,children:`No boards yet.`}),(0,O.jsx)(`p`,{className:`mt-1 max-w-[58ch] text-sm text-muted-foreground`,children:`A board turns issues into work your agents can pick up. Start from a shape, or import an existing tracker.`})]}):(0,O.jsx)(`h2`,{className:`text-15 font-semibold text-foreground`,children:`Start from a shape`}),(0,O.jsxs)(`div`,{className:`mt-4 max-w-xl rounded-lg border border-border`,"aria-busy":n||void 0,children:[e.map(e=>(0,O.jsx)(I,{template:e,disabled:n,onPick:i},e.id)),t===`loading`?(0,O.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 px-3.5 py-2.5 text-xs text-muted-foreground`,children:[(0,O.jsx)(f,{}),`Loading templates…`]}):null,t===`failed`?(0,O.jsx)(`p`,{className:`px-3.5 py-2.5 text-xs text-muted-foreground`,children:`Couldn't load templates.`}):null,(0,O.jsx)(`button`,{type:`button`,onClick:o,disabled:n,className:`flex w-full items-center border-t border-border px-3.5 py-2.5 text-left hover:bg-secondary disabled:pointer-events-none disabled:opacity-60`,children:(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:`Empty board`}),(0,O.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:`Name your own columns`})]})})]}),n?(0,O.jsxs)(`p`,{role:`status`,className:`mt-3 flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,O.jsx)(f,{}),`Creating board…`]}):null,r?null:(0,O.jsx)(s,{variant:`ghost`,size:`sm`,className:`mt-3`,onClick:a,children:`Cancel`})]})}function I({template:e,disabled:t,onPick:n}){let r=(0,w.useCallback)(()=>n(e),[n,e]),i=e.definition.columns;return(0,O.jsxs)(`button`,{type:`button`,onClick:r,disabled:t,className:`flex w-full items-center gap-3 border-b border-border px-3.5 py-2.5 text-left last:border-b-0 hover:bg-secondary disabled:pointer-events-none disabled:opacity-60`,children:[(0,O.jsxs)(`span`,{className:`min-w-0`,children:[(0,O.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.name}),(0,O.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:i.map(e=>e.title).join(` · `)})]}),(0,O.jsx)(`span`,{"aria-hidden":!0,className:`ml-auto flex shrink-0 gap-1`,children:i.map((t,n)=>(0,O.jsx)(`span`,{className:c(`size-1.5 rounded-full`,t.colorToken?C[t.colorToken]:`bg-muted-icon`)},`${e.id}-${String(n)}`))})]})}export{j as t};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{c as r,i,m as a,t as o}from"./log-aTaDVF_e.js";import{a as s,c,i as l,n as u,r as d,s as f,t as p}from"./pendingActionsStore-COTh4Ztq.js";import{t as m}from"./ellipsis-Cd7sO0LO.js";import{t as h}from"./plus-c75CkNEO.js";import{t as g}from"./input-C4fvDiQ4.js";import{n as _,r as v,t as y}from"./popover-CHM4skzh.js";import{o as b,r as x,s as S,t as C}from"./columnStyle-DjA7hA9k.js";var w=e(t(),1),T=[],E=r()(e=>({templates:T,templatesStatus:`loading`,openMenuId:null,picking:!1,renamingId:null,error:null,setTemplates:t=>e({templates:Array.isArray(t)?t:[],templatesStatus:`ready`}),beginTemplatesLoad:()=>e({templatesStatus:`loading`}),failTemplatesLoad:()=>e({templatesStatus:`failed`}),openMenu:t=>e({openMenuId:t}),closeMenu:()=>e({openMenuId:null}),openPicker:()=>e({picking:!0,error:null}),closePicker:()=>e({picking:!1}),startRename:t=>e({renamingId:t,picking:!1,openMenuId:null}),stopRename:()=>e({renamingId:null}),setError:t=>e({error:t})}));function D(e){return e.templates}var O=e(n(),1),k=[`board.update`,`board.duplicate`,`board.saveAsTemplate`,`board.archive`];function A(e){return l(t=>k.some(n=>t.inFlight[p(n,e)]===!0))}function j({ownerKind:e,ownerId:t,ownerName:n,socket:r,onOpenBoard:c}){let l=x(e,t),f=S(b(l)),m=E(D),g=E(e=>e.picking),_=E(e=>e.renamingId),v=E(e=>e.error),y=E(e=>e.templatesStatus),C=p(`board.create`,l),T=d(C),{openPicker:k,closePicker:A,startRename:j,stopRename:N,setError:P,setTemplates:I}=E.getState();(0,w.useEffect)(()=>r.subscribe({type:`boards`,ownerKind:e,ownerId:t},e=>{S.getState().setBoards(x(e.ownerKind,e.ownerId),e.boards)}),[e,t,r]),(0,w.useEffect)(()=>{let e=!1,t=E.getState();return t.templatesStatus!==`ready`&&t.beginTemplatesLoad(),r.command({type:`board.templates.list`}).then(t=>{e||I(t)},a(t=>{o.error(i,`board.templates.list failed`,t),e||E.getState().failTemplatesLoad()})),()=>{e=!0}},[r,I]);let L=(0,w.useCallback)(async e=>{try{return await r.command(e),P(null),!0}catch(e){return P(e instanceof Error?e.message:`That did not work.`),!1}},[r,P]),R=(0,w.useCallback)(n=>{u(C,async()=>{await L({type:`board.create`,ownerKind:e,ownerId:t,title:n?n.name:`Untitled board`,templateId:n?.id??null})&&A()})},[A,C,e,t,L]),z=(0,w.useCallback)((e,t)=>{N();let n=t.trim();n!==``&&u(p(`board.update`,e),()=>L({type:`board.update`,boardId:e,title:n}))},[L,N]),B=g||f.length===0;return(0,O.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,children:[(0,O.jsxs)(`header`,{className:`flex items-end justify-between gap-4 border-b border-border px-6 py-4`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`h1`,{className:`text-lg font-medium leading-tight tracking-[-0.01em] text-foreground`,children:`Boards`}),(0,O.jsxs)(`p`,{className:`truncate text-13 text-muted-foreground`,children:[n,f.length>0?(0,O.jsxs)(`span`,{className:`tabular-nums`,children:[` · `,f.length,` boards`]}):null]})]}),f.length>0?(0,O.jsxs)(s,{size:`sm`,onClick:k,pending:T,children:[(0,O.jsx)(h,{className:`size-3.5`}),`New board`]}):null]}),v?(0,O.jsx)(`p`,{className:`border-b border-border px-6 py-2 text-13 text-destructive-text`,children:v}):null,(0,O.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[B?(0,O.jsx)(F,{templates:m,templatesStatus:y,creating:T,firstRun:f.length===0,onPick:R,onCancel:A}):null,f.length>0?(0,O.jsx)(`ul`,{className:`px-4 py-1`,children:f.map(e=>(0,O.jsx)(M,{board:e,renaming:_===e.id,onOpen:c,onStartRename:j,onRename:z,onCancelRename:N,onCommand:L},e.id))}):null]})]})}function M({board:e,renaming:t,onOpen:n,onStartRename:r,onRename:i,onCancelRename:a,onCommand:o}){let s=A(e.id),c=(0,w.useCallback)(()=>n(e.id),[e.id,n]),l=(0,w.useCallback)(t=>{t.key===`Enter`&&i(e.id,t.currentTarget.value),t.key===`Escape`&&a()},[e.id,a,i]),u=(0,w.useCallback)(t=>i(e.id,t.currentTarget.value),[e.id,i]);return(0,O.jsxs)(`li`,{"aria-busy":s||void 0,className:`group grid grid-cols-[1fr_auto_auto] items-center gap-5 border-b border-border px-3 py-3 last:border-b-0 hover:bg-secondary`,children:[(0,O.jsx)(`div`,{className:`min-w-0`,children:t?(0,O.jsx)(g,{autoFocus:!0,defaultValue:e.title,onKeyDown:l,onBlur:u,className:`h-7 max-w-sm`,"aria-label":`Board name`}):(0,O.jsxs)(`button`,{type:`button`,onClick:c,className:`block w-full text-left`,children:[(0,O.jsx)(`span`,{className:`block truncate text-15 font-semibold tracking-[-0.005em] text-foreground`,children:e.title}),e.description?(0,O.jsx)(`span`,{className:`mt-0.5 block truncate text-13 text-muted-foreground`,children:e.description}):null]})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-muted-foreground`,children:[(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`b`,{className:`font-medium tabular-nums text-foreground`,children:e.columnCount}),` columns`]}),(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`b`,{className:`font-medium tabular-nums text-foreground`,children:e.cardCount}),` cards`]})]}),(0,O.jsx)(N,{board:e,pending:s,onStartRename:r,onCommand:o})]})}function N({board:e,pending:t,onStartRename:n,onCommand:r}){let i=E(t=>t.openMenuId===e.id),{openMenu:a,closeMenu:o}=E.getState(),s=(0,w.useCallback)(t=>{t?a(e.id):o()},[e.id,o,a]),l=(0,w.useCallback)(()=>{o(),n(e.id)},[e.id,o,n]),d=(0,w.useCallback)(()=>{o(),u(p(`board.duplicate`,e.id),()=>r({type:`board.duplicate`,boardId:e.id,title:`${e.title} copy`}))},[e.id,e.title,o,r]),h=(0,w.useCallback)(()=>{o(),u(p(`board.saveAsTemplate`,e.id),()=>r({type:`board.saveAsTemplate`,boardId:e.id,name:e.title}))},[e.id,e.title,o,r]),g=(0,w.useCallback)(()=>{o(),u(p(`board.archive`,e.id),()=>r({type:`board.archive`,boardId:e.id}))},[e.id,o,r]);return(0,O.jsxs)(y,{open:i,onOpenChange:s,children:[(0,O.jsx)(v,{asChild:!0,children:(0,O.jsx)(`button`,{type:`button`,"aria-label":`Actions for ${e.title}`,disabled:t,"aria-busy":t||void 0,className:c(`rounded-md px-1.5 py-1 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100`,t&&`opacity-100`),children:t?(0,O.jsx)(f,{className:`size-4`}):(0,O.jsx)(m,{className:`size-4`})})}),(0,O.jsxs)(_,{align:`end`,className:`w-56 p-1`,children:[(0,O.jsx)(P,{onClick:l,children:`Rename`}),(0,O.jsx)(P,{onClick:d,children:`Duplicate structure`}),(0,O.jsx)(P,{onClick:h,children:`Save as template`}),(0,O.jsx)(`div`,{className:`my-1 h-px bg-border`}),(0,O.jsx)(P,{onClick:g,tone:`destructive`,children:`Archive`})]})]})}function P({onClick:e,children:t,tone:n}){return(0,O.jsx)(`button`,{type:`button`,onClick:e,className:c(`flex w-full items-center rounded-sm px-2 py-1.5 text-left text-xs font-medium hover:bg-secondary`,n===`destructive`&&`text-destructive-text`),children:t})}function F({templates:e,templatesStatus:t,creating:n,firstRun:r,onPick:i,onCancel:a}){let o=(0,w.useCallback)(()=>i(null),[i]);return(0,O.jsxs)(`div`,{className:`px-6 py-8`,children:[r?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`h2`,{className:`text-15 font-semibold text-foreground`,children:`No boards yet.`}),(0,O.jsx)(`p`,{className:`mt-1 max-w-[58ch] text-sm text-muted-foreground`,children:`A board turns issues into work your agents can pick up. Start from a shape, or import an existing tracker.`})]}):(0,O.jsx)(`h2`,{className:`text-15 font-semibold text-foreground`,children:`Start from a shape`}),(0,O.jsxs)(`div`,{className:`mt-4 max-w-xl rounded-lg border border-border`,"aria-busy":n||void 0,children:[e.map(e=>(0,O.jsx)(I,{template:e,disabled:n,onPick:i},e.id)),t===`loading`?(0,O.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 px-3.5 py-2.5 text-xs text-muted-foreground`,children:[(0,O.jsx)(f,{}),`Loading templates…`]}):null,t===`failed`?(0,O.jsx)(`p`,{className:`px-3.5 py-2.5 text-xs text-muted-foreground`,children:`Couldn't load templates.`}):null,(0,O.jsx)(`button`,{type:`button`,onClick:o,disabled:n,className:`flex w-full items-center border-t border-border px-3.5 py-2.5 text-left hover:bg-secondary disabled:pointer-events-none disabled:opacity-60`,children:(0,O.jsxs)(`span`,{children:[(0,O.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:`Empty board`}),(0,O.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:`Name your own columns`})]})})]}),n?(0,O.jsxs)(`p`,{role:`status`,className:`mt-3 flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,O.jsx)(f,{}),`Creating board…`]}):null,r?null:(0,O.jsx)(s,{variant:`ghost`,size:`sm`,className:`mt-3`,onClick:a,children:`Cancel`})]})}function I({template:e,disabled:t,onPick:n}){let r=(0,w.useCallback)(()=>n(e),[n,e]),i=e.definition.columns;return(0,O.jsxs)(`button`,{type:`button`,onClick:r,disabled:t,className:`flex w-full items-center gap-3 border-b border-border px-3.5 py-2.5 text-left last:border-b-0 hover:bg-secondary disabled:pointer-events-none disabled:opacity-60`,children:[(0,O.jsxs)(`span`,{className:`min-w-0`,children:[(0,O.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.name}),(0,O.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:i.map(e=>e.title).join(` · `)})]}),(0,O.jsx)(`span`,{"aria-hidden":!0,className:`ml-auto flex shrink-0 gap-1`,children:i.map((t,n)=>(0,O.jsx)(`span`,{className:c(`size-1.5 rounded-full`,t.colorToken?C[t.colorToken]:`bg-muted-icon`)},`${e.id}-${String(n)}`))})]})}export{j as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{c as n,l as r,u as i}from"./chunk-OB3PAWPO-mARpRU1A.js";import{t as a}from"./jsx-runtime-BdxMnOeJ.js";import{o}from"./formatters-wSVyvDFZ.js";import{t as s}from"./BoardsPage-mVdaRV1l.js";var c=e(t(),1),l=e(a(),1);function u(){let e=r(),t=n(),{projectId:a=``}=i(),u=[...e.sidebarData.starredProjectGroups,...e.sidebarData.projectGroups].find(e=>e.groupKey===a),d=u?o(u.localPath):`Project`,f=(0,c.useCallback)(e=>{t(`/boards/${a}/${e}`)},[t,a]);return(0,l.jsx)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,l.jsx)(s,{ownerKind:`project`,ownerId:a,ownerName:d,socket:e.socket,onOpenBoard:f})})}export{u as BoardsRoutePage};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-DiVRNtpo.js";import{c as n,l as r,u as i}from"./chunk-OB3PAWPO-mARpRU1A.js";import{t as a}from"./jsx-runtime-BdxMnOeJ.js";import{o}from"./formatters-wSVyvDFZ.js";import{t as s}from"./BoardsPage-BJalB-bc.js";var c=e(t(),1),l=e(a(),1);function u(){let e=r(),t=n(),{projectId:a=``}=i(),u=[...e.sidebarData.starredProjectGroups,...e.sidebarData.projectGroups].find(e=>e.groupKey===a),d=u?o(u.localPath):`Project`,f=(0,c.useCallback)(e=>{t(`/boards/${a}/${e}`)},[t,a]);return(0,l.jsx)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,l.jsx)(s,{ownerKind:`project`,ownerId:a,ownerName:d,socket:e.socket,onOpenBoard:f})})}export{u as BoardsRoutePage};