@dubusoft/toodo-linux-arm64 1.3.3-dev.52 → 1.3.3-dev.53
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/bin/toodo +0 -0
- package/bin/toodo-server +0 -0
- package/package.json +1 -1
- package/web/assets/{details-sheet-twe2j__k.js → details-sheet-BS8FCgTh.js} +1 -1
- package/web/assets/index-CFwUezdf.js +16 -0
- package/web/assets/index-dcNSRV1W.css +2 -0
- package/web/assets/{markdown-DmgIzOsa.js → markdown-BC620FJC.js} +1 -1
- package/web/assets/{offline-screen-DsaQrz0b.js → offline-screen-cnbUBmJc.js} +1 -1
- package/web/assets/review-CLYmIbyh.js +1 -0
- package/web/assets/{server-access-88atRrcA.js → server-access-CLh7AonP.js} +1 -1
- package/web/assets/status-styles-vBpwCdSe.js +1 -0
- package/web/assets/{task-details-Cd4XHry3.js → task-details-B3Mc8QMX.js} +4 -4
- package/web/assets/{task-graph-DUXLbeUU.js → task-graph-CioZrRKt.js} +2 -2
- package/web/assets/{workspace-list-iSTMfk--.js → workspace-list-Bh1Dl9pl.js} +1 -1
- package/web/index.html +4 -4
- package/web/sw.js +2 -2
- package/web/assets/index-2t_XbJZG.js +0 -16
- package/web/assets/index-CEAdz3Ye.css +0 -2
- package/web/assets/review-BVO04HSP.js +0 -1
- package/web/assets/status-styles-DIxoMnYv.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{Bt as a,Et as o,F as s,G as c,L as l,R as u,U as d,X as f,d as p,ut as m}from"./status-styles-DIxoMnYv.js";import{d as h,h as g,m as _}from"./event-DMqRNLc_.js";var v={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};v.node;var y=t(v),b={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};b.node;var x=t(b),S={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};S.node;var C=t(S),w={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};w.node;var T=t(w),E={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};E.node;var D=t(E),O={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};O.node;var k=t(O),A={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};A.node;var j=t(A),M={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};M.node;var ee=t(M),N=r(e(),1),P=n();function te(e,t){if(e===null)return;let n=[...e.querySelectorAll(`a[href], button, input, select, textarea, summary, [tabindex]`)].filter(e=>!e.matches(`:disabled, [tabindex='-1']`)&&e.getClientRects().length>0);if(n.length===0)return;let r=n[0],i=n[n.length-1],a=document.activeElement,o=a instanceof Node&&e.contains(a);(t.shiftKey?!o||a===r:!o||a===i)&&(t.preventDefault(),(t.shiftKey?i:r).focus())}function F(e){let t=/^[a-zA-Z]:/.test(e)||e.startsWith(`\\\\`)||e.includes(`\\`)&&!e.includes(`/`),n=t?`\\`:`/`,r=``,i=e,a=t?/^[\\/]{2}[^\\/]+[\\/]+[^\\/]+/.exec(e):null,o=t?/^[a-zA-Z]:([\\/]?)/.exec(e):null;a?(r=`${a[0].replace(/[\\/]+/g,`\\`).replace(/^\\/,`\\\\`)}\\`,i=e.slice(a[0].length)):o?(r=o[0].slice(0,2)+(o[1]?n:``),i=e.slice(o[0].length)):/^[\\/]/.test(e)&&(r=n,i=e.replace(/^[\\/]+/,``));let s=[];for(let e of i.split(t?/[\\/]+/:/\/+/))e!==``&&e!==`.`&&(e===`..`?s.length>0&&s[s.length-1]!==`..`?s.pop():r===``&&s.push(e):s.push(e));return{root:r,separator:n,segments:s}}function I(e){let{root:t,separator:n,segments:r}=F(e),i=t+r.join(n);return i===``?`.`:i}function L(e){return/^[a-zA-Z]:/.test(e)||e.startsWith(`\\\\`)}function R(e,t=2){let{separator:n,segments:r}=F(e);return r.length<=t?I(e):`…${n}${r.slice(-t).join(n)}`}var z=200;function B(e,t){let n=L(e)?`\\`:`/`;return/[\\/]$/.test(e)?`${e}${t}`:`${e}${n}${t}`}function ne(e){return e.replace(/(?<=[^\\/:])[\\/]+$/,``)}function V(e,t){let[n,r]=(0,N.useState)(e);return(0,N.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function re({id:e,machine:t,value:n,onChange:r,describedBy:a,required:o,autoFocus:s,className:c}){let[l,d]=(0,N.useState)(!1),[f,p]=(0,N.useState)(-1),m=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),h=m<0?null:n.slice(0,m+1),g=n.slice(m+1).toLowerCase(),_=V(h,z),v=u(t,l?_:null),y=l&&h!==null&&_===h,b=y&&v.data?v.data.directories.filter(e=>e.toLowerCase().startsWith(g)):[],x=b.length>0,S=`${e}-folders`,C=t.kind===`local`?`the server`:t.label;function w(e){r(e),p(-1),d(!0)}function T(e){h!==null&&w(`${B(h,e)}${L(h)?`\\`:`/`}`)}function E(e){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!x){d(!0);return}let t=b.length,n=e.key===`ArrowDown`;p(e=>e<0?n?0:t-1:(e+(n?1:t-1))%t)}else if(e.key===`Enter`){if(!x||f<0)return;e.preventDefault(),T(b[f])}else if(e.key===`Tab`){if(!x||e.shiftKey||f<0&&g===``)return;e.preventDefault(),e.stopPropagation(),T(b[Math.max(f,0)])}else if(e.key===`Escape`){if(!x)return;e.preventDefault(),e.stopPropagation(),d(!1)}}return(0,P.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,P.jsx)(`input`,{id:e,role:`combobox`,"aria-expanded":x,"aria-controls":S,"aria-autocomplete":`list`,"aria-activedescendant":x&&f>=0?`${S}-${f}`:void 0,"aria-describedby":a,autoComplete:`off`,spellCheck:!1,className:c,value:n,onChange:e=>w(e.target.value),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:E,required:o,autoFocus:s}),x&&(0,P.jsx)(`ul`,{id:S,role:`listbox`,"aria-label":`Folders in ${h}`,className:`absolute top-full right-0 left-0 z-10 mt-1 flex max-h-56 flex-col overflow-y-auto rounded-lg border bg-popover p-1 font-mono text-xs text-popover-foreground shadow-md`,children:b.map((e,t)=>(0,P.jsxs)(`li`,{id:`${S}-${t}`,role:`option`,"aria-selected":t===f,onMouseDown:e=>e.preventDefault(),onClick:()=>T(e),className:i(`cursor-pointer truncate rounded px-1.5 py-1 hover:bg-muted max-md:py-2`,t===f&&`bg-secondary hover:bg-secondary`),children:[e,L(h??``)?`\\`:`/`]},e))}),y&&v.isError&&(0,P.jsxs)(`p`,{role:`status`,className:`mt-1 text-xs break-words text-muted-foreground`,children:[`No suggestions: `,v.error.message,`. Type the path of a folder that exists on `,C,`, ending in a separator, to see its subfolders.`]})]})}var ie=[`none`,`local_git`,`github`],ae=[`manual`,`local_merge`,`pr_merge`],oe=[`herdr`,`plain`,`tmux`,`none`],se=[`open`,`init`,`clone`],H={none:`Plain folder`,local_git:`Local git`,github:`GitHub`},U={manual:`Manual`,local_merge:`Local merge`,pr_merge:`PR merge`},W={none:`No runner`,herdr:`herdr`,plain:`Plain`,tmux:`tmux`},ce={open:`Open existing`,init:`New repository`,clone:`Clone URL`};function G(e){return e===`none`?`manual`:e===`local_git`?`local_merge`:`pr_merge`}function K(e,t=!1){return e===`none`?`none`:t?`plain`:`herdr`}function le(e){return e===`none`?null:`open`}function ue(e,t){switch(t){case`manual`:return null;case`local_merge`:return e===`local_git`?null:e===`none`?`Needs a git repository; choose source Local git`:`GitHub tasks merge through pull requests; choose source Local git`;case`pr_merge`:return e===`github`?null:e===`none`?`Needs a git repository; choose source GitHub`:`Needs a GitHub origin remote; choose source GitHub`}}function de(e,t,n){return n!==`none`&&e===`none`?`Needs a git repository for task worktrees; choose source Local git or GitHub`:n===`none`&&t!==`manual`?`${U[t]} needs the task branch that herdr, ${W.plain}, or ${W.tmux} creates; choose completion Manual`:null}function fe(e,t){return e===`tmux`&&t.kind===`ssh`&&L(t.path)?`Needs a POSIX host; choose ${W.plain} or ${W.herdr} for a Windows SSH workspace, or choose a POSIX path for ${W.tmux}`:null}function pe(e,t){return e===`none`?`A plain folder has no repository; choose source Local git or GitHub`:e===`github`&&t===`init`?`A new repository has no GitHub origin; choose source Local git`:null}function me(e,t=!1){let{source:n}=e,r=e.repository!==null&&pe(n,e.repository)===null?e.repository:le(n),i=e.completion!==null&&ue(n,e.completion)===null?e.completion:G(n);return{source:n,repository:r,completion:i,runner:e.runner!==null&&de(n,i,e.runner)===null?e.runner:K(n,t)}}function he(e,t,n=!1){let r={...e,...t},i=me(r,n);return{source:r.source,repository:r.repository===i.repository?r.repository:null,completion:r.completion===i.completion?r.completion:null,runner:r.runner===i.runner?r.runner:null}}var q=`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,J=`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`;function Y(e){let t=I(e.path);return e.kind===`local`?t:`${e.machine}:${t}`}function X(e){let t=R(e.path);return e.kind===`local`?t:`${e.machine}:${t}`}var ge={foreign:`Windows path, not on this server`,missing:`Folder not found on the server`};function _e({problem:e,className:t}){return(0,P.jsxs)(`span`,{className:i(`flex min-w-0 items-start gap-1 text-xs text-destructive`,t),title:`Toodo cannot run git in this repository until its path is corrected`,children:[(0,P.jsx)(j,{"aria-hidden":`true`,className:`mt-0.5 size-3 shrink-0`}),(0,P.jsx)(`span`,{children:ge[e]})]})}function ve({workspace:e}){let t=H[e.source],n=U[e.completion],r=W[e.runner];return(0,P.jsxs)(`span`,{className:`text-xs text-muted-foreground`,title:`Source ${t}, completion ${n}, runner ${r}; set when the workspace was added`,children:[(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:t}),` · `,(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:n}),` `,`· `,(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:r})]})}function ye(e){return e.kind===`local`?null:e.machine}function be(e,t){let n=t.filter(t=>t.target===e);return n.length===0?`Not saved in herdr`:n.some(e=>e.enabled)?null:`Disabled in herdr`}function xe(e){return/[\\/]$/.test(e)?e:B(e,``)}function Z({label:e,help:t,children:n}){let r=(0,N.useId)(),i=`${r}-help`;return(0,P.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,P.jsx)(`label`,{htmlFor:r,className:`text-xs text-muted-foreground`,children:e}),n({id:r,describedBy:t?i:void 0}),t&&(0,P.jsx)(`p`,{id:i,className:`text-xs text-muted-foreground`,children:t})]})}function Se(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()??``}function Ce(e){return Se(e.trim().replace(/\.git$/,``)).split(`:`).pop()??``}function we({selectedId:e,onSelect:t}){let n=o(),r=(0,N.useSyncExternalStore)(_,h),i=r===`unreachable`||r===`retrying`,s=d(),c=m().data?.herdr.installed===!1,[l,u]=(0,N.useState)(null),f=(0,N.useRef)(null),p=()=>{u(null),f.current?.focus()},[v,y]=(0,N.useState)(!1),b=s.data??[],x=[null,...new Set([...b.map(e=>e.target),...(n.data??[]).flatMap(e=>e.location.kind===`ssh`?[e.location.machine]:[])])];return(0,P.jsxs)(`section`,{"aria-labelledby":`workspaces-heading`,className:`flex shrink-0 flex-col gap-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,P.jsx)(`h2`,{id:`workspaces-heading`,className:`text-xs font-medium uppercase text-muted-foreground`,children:`Workspaces`}),(0,P.jsxs)(a,{variant:`ghost`,size:`xs`,onClick:()=>y(e=>!e),children:[!v&&(0,P.jsx)(D,{}),v?`Cancel`:`Add machine`]})]}),v&&(0,P.jsx)(Oe,{herdrMissing:c,onClose:()=>y(!1)}),s.isError&&(c?(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`herdr is not installed on this server, so there are no SSH machines; workspaces on Local can use runner`,` `,W.plain,`.`]}):(0,P.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to list herdr machines: `,s.error.message]})),n.isPending&&!i&&(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading workspaces...`}),(n.isError||n.isPending&&i)&&(0,P.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-2 text-sm text-destructive`,children:[(0,P.jsxs)(`p`,{children:[`Failed to load workspaces:`,` `,n.error?.message??(g()||`The Toodo server does not answer.`)]}),(0,P.jsx)(a,{size:`xs`,variant:`outline`,onClick:()=>void n.refetch(),children:`Retry now`})]}),n.data?.length===0&&l===null&&(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No workspaces yet.`}),(0,P.jsx)(`div`,{className:`flex flex-col gap-3`,children:n.data&&x.map(r=>{let i=r??`Local`,o=n.data.filter(e=>ye(e.location)===r),c=r!==null&&s.isSuccess?be(r,b):null;return(0,P.jsxs)(`section`,{"aria-label":`Machine ${i}`,className:`flex flex-col gap-1`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,P.jsxs)(`h3`,{className:`flex min-w-0 flex-1 items-center gap-1.5 px-1 text-xs font-semibold`,children:[r===null?(0,P.jsx)(T,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,P.jsx)(k,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,P.jsx)(`span`,{className:`truncate`,children:i}),c&&(0,P.jsx)(`span`,{className:`ml-1.5 font-normal text-destructive`,children:c})]}),(0,P.jsxs)(a,{size:`xs`,variant:`outline`,"aria-label":`Add workspace on ${i}`,title:`Add a workspace on this machine`,"aria-haspopup":`dialog`,"aria-expanded":l!==null&&l.machine===r,onClick:e=>{f.current=e.currentTarget,u({machine:r})},children:[(0,P.jsx)(D,{}),`Add`]})]}),o.length>0&&(0,P.jsx)(`ul`,{className:`flex flex-col gap-1`,children:o.map(n=>(0,P.jsx)(Te,{workspace:n,selected:n.id===e,onSelect:t},n.id))})]},i)})}),l&&(0,P.jsx)(Ie,{machine:l.machine,onCreated:e=>{p(),t(e.id)},onClose:p})]})}function Te({workspace:e,selected:t,onSelect:n}){let r=l(),[o,s]=(0,N.useState)(!1);return(0,P.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,P.jsxs)(`div`,{className:i(`group flex items-center rounded-lg hover:bg-sidebar-accent`,t&&`bg-sidebar-accent`),children:[(0,P.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-w-0 flex-1 flex-col px-2.5 py-1.5 text-left`,children:[(0,P.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),(0,P.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,title:Y(e.location),children:R(e.location.path)}),(0,P.jsx)(ve,{workspace:e}),e.pathProblem&&(0,P.jsx)(_e,{problem:e.pathProblem})]}),!o&&(0,P.jsx)(a,{size:`icon-xs`,variant:`ghost`,"aria-label":`Remove ${e.name}`,title:`Remove the workspace and its tasks from Toodo`,className:`mr-1 shrink-0 opacity-0 group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,onClick:()=>{r.reset(),s(!0)},children:(0,P.jsx)(ee,{})})]}),o&&(0,P.jsxs)(`div`,{role:`group`,"aria-label":`Remove ${e.name}`,className:`flex flex-col gap-1.5 rounded-lg border p-2`,onKeyDown:e=>{e.key===`Escape`&&!r.isPending&&(e.preventDefault(),s(!1))},children:[(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Remove `,e.name,` and its tasks from Toodo? The repository, worktrees, and herdr workspaces are kept.`]}),r.isError&&(0,P.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r.error.message}),(0,P.jsxs)(`div`,{className:`flex gap-1`,children:[(0,P.jsx)(a,{changesData:!0,size:`xs`,variant:`destructive`,"aria-label":`Confirm remove ${e.name}`,disabled:r.isPending,onClick:()=>r.mutate(e.id),children:r.isPending?`Removing...`:`Remove`}),(0,P.jsx)(a,{size:`xs`,variant:`ghost`,autoFocus:!0,onClick:()=>s(!1),children:`Back`})]})]})]})}function Q(e,t=!1){return n=>{n.key===`Escape`&&!t&&!n.defaultPrevented&&(n.preventDefault(),e())}}function Ee({workspace:e,onClose:t}){let n=f(),r=d(),i=o(),[s,c]=(0,N.useState)(ye(e.location)),[l,u]=(0,N.useState)(e.location.path),p=[...new Set([...(r.data??[]).map(e=>e.target),...(i.data??[]).flatMap(e=>e.location.kind===`ssh`?[e.location.machine]:[])])],m=ne(l.trim());function h(r){r.preventDefault();let i=s===null?{kind:`local`,path:m}:{kind:`ssh`,machine:s,path:m};n.mutate({id:e.id,location:i},{onSuccess:t})}return(0,P.jsxs)(`form`,{onSubmit:h,"aria-label":`Move ${e.name}`,className:`flex flex-col gap-2 rounded-lg border p-2`,onKeyDown:Q(t,n.isPending),children:[(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Point the workspace at the same repository on another machine or in another folder. Its tasks stay. A repository on a Windows host takes a Windows path such as D:\\dev\\repo.`}),(0,P.jsx)(Z,{label:`Machine`,children:({id:e})=>(0,P.jsxs)(`select`,{id:e,className:q,value:s??``,onChange:e=>c(e.target.value===``?null:e.target.value),autoFocus:!0,children:[(0,P.jsx)(`option`,{value:``,children:`Local (this server)`}),p.map(e=>(0,P.jsx)(`option`,{value:e,children:e},e))]})}),(0,P.jsx)(Z,{label:`Folder`,help:`The repository's own folder on that machine.`,children:({id:e,describedBy:t})=>(0,P.jsx)(re,{id:e,machine:s===null?{kind:`local`}:{kind:`ssh`,label:s},className:q,describedBy:t,value:l,onChange:u,required:!0})}),n.isError&&(0,P.jsx)(`p`,{role:`alert`,className:`text-xs break-words text-destructive`,children:n.error.message}),(0,P.jsxs)(`div`,{className:`flex gap-1`,children:[(0,P.jsx)(a,{type:`submit`,size:`sm`,disabled:n.isPending||m===``,children:n.isPending?`Moving...`:`Move workspace`}),(0,P.jsx)(a,{type:`button`,size:`sm`,variant:`ghost`,disabled:n.isPending,onClick:t,children:`Cancel`})]})]})}var De=`herdr machine add <host>`;function Oe({herdrMissing:e,onClose:t}){let[n,r]=(0,N.useState)(null);async function i(){try{await navigator.clipboard.writeText(De),r(`Copied the command.`)}catch(e){r(`Could not copy: ${String(e)}`)}}return(0,P.jsxs)(`section`,{"aria-label":`Add machine`,className:`flex flex-col gap-2 rounded-lg border p-2`,onKeyDown:Q(t),children:[(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e&&`Install herdr on the server first; SSH machines need it. `,`herdr asks questions in a terminal, which the Toodo server cannot open. Run this command in a terminal on the server, replacing `,(0,P.jsx)(`code`,{children:`<host>`}),` with an SSH host from its ~/.ssh/config, then reload the machine list here.`]}),(0,P.jsxs)(`div`,{className:`flex flex-col items-start gap-1`,children:[(0,P.jsx)(`code`,{className:`max-w-full rounded bg-muted px-1.5 py-1 text-xs`,"aria-label":`Add machine command`,children:De}),(0,P.jsx)(a,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>void i(),children:`Copy command`})]}),n&&(0,P.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:n})]})}var ke=[`Source`,`Completion`,`Runner`,`Details`],Ae={none:`A folder without git. Tasks get no branch, worktree, or pull request.`,local_git:`A git repository without GitHub. Task branches merge locally.`,github:`A git repository with a GitHub origin. Tasks ship as pull requests.`},je={open:`The folder already holds the repository.`,init:`Make a folder a new git repository without a remote.`,clone:`Clone a repository URL into a new folder.`},Me={manual:`When its criteria are met; nothing is merged.`,local_merge:`Once its branch is merged into the base branch locally.`,pr_merge:`Once its pull request is merged into the base branch.`},Ne={herdr:`Opens agents in herdr on a worktree and branch of the task.`,plain:`Runs Claude or Codex in the background in a worktree and branch of the task, without herdr.`,tmux:`Runs Claude or Codex in a tmux session in a worktree and branch of the task, without herdr.`,none:`Only marks the task in progress.`};function Pe(e){return e?`herdr is not running on this server; start it there before starting tasks, or choose ${W.plain}.`:`herdr is not running on this server since it is not installed there; install and start herdr before starting tasks, or choose ${W.plain}.`}var Fe={clone:{submit:`Clone workspace`,pending:`Cloning...`},open:{submit:`Open workspace`,pending:`Opening...`},init:{submit:`Init workspace`,pending:`Initializing...`},none:{submit:`Add workspace`,pending:`Adding...`}};function $({legend:e,value:t,choices:n,onChange:r,autoFocus:a=!1}){let o=(0,N.useId)();return(0,P.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,P.jsx)(`legend`,{className:`mb-1.5 text-sm font-medium`,children:e}),n.map(e=>{let n=e.value===t,s=e.problem!==null,c=s?null:e.note??null,l=`${o}-${e.value}`;return(0,P.jsxs)(`label`,{className:i(`flex items-start gap-2.5 rounded-lg border px-3 py-2 transition-colors has-focus-visible:border-ring has-focus-visible:ring-3 has-focus-visible:ring-ring/50`,s?`cursor-not-allowed border-dashed`:`cursor-pointer hover:bg-muted`,n&&`border-ring bg-secondary hover:bg-secondary`),children:[(0,P.jsx)(`input`,{type:`radio`,name:o,value:e.value,checked:n,disabled:s,autoFocus:a&&n,"aria-labelledby":l,"aria-describedby":c===null?`${l}-about`:`${l}-about ${l}-note`,onChange:()=>!s&&r(e.value),className:`mt-0.5 size-4 shrink-0 accent-primary`}),(0,P.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,P.jsx)(`span`,{id:l,className:i(`text-sm font-medium`,s&&`text-muted-foreground`),children:e.label}),(0,P.jsxs)(`span`,{id:`${l}-about`,className:`flex items-start gap-1 text-xs text-muted-foreground`,children:[s&&(0,P.jsx)(y,{"aria-hidden":!0,className:`mt-0.5 size-3 shrink-0`}),e.problem??e.description]}),c!==null&&(0,P.jsxs)(`span`,{id:`${l}-note`,className:i(`flex items-start gap-1 text-xs`,p.attention),children:[(0,P.jsx)(j,{"aria-hidden":!0,className:`mt-0.5 size-3 shrink-0`}),c]})]})]},e.value)})]})}function Ie({machine:e,onCreated:t,onClose:n}){let r=s(),o=(0,N.useRef)(null),l=(0,N.useId)(),[u,d]=(0,N.useState)(0),[f,p]=(0,N.useState)({source:`github`,repository:null,completion:null,runner:null}),[h,g]=(0,N.useState)(``),[_,v]=(0,N.useState)(null),[y,b]=(0,N.useState)(null),[S,w]=(0,N.useState)(``),T=e??`Local`,E=e===null?{kind:`local`}:{kind:`ssh`,label:e},D=m().data?.herdr,O=e===null&&D!==void 0&&!D.running?Pe(D.installed):null,k=O!==null,A=me(f,k),j=A.repository===`clone`,M=c(E).data,F=M===void 0?``:j?M:xe(M),I=_??F,L=!j&&_===null,R=y??(j?Ce(h):L?``:Se(I)),z=j&&I.trim()&&R.trim()?B(I.trim(),R.trim()):ne(I.trim()),V=u===ke.length-1,G=r.isPending,K=Fe[A.repository??`none`],le=[H[A.source],U[A.completion],W[A.runner],T],q=j?void 0:A.source===`none`?`The folder the tasks are about. Toodo runs no git or herdr there.`:`The repository's own folder.`;function J(e){let t=he(f,e,k);me(t,k).repository===`clone`!==j&&v(null),p(t)}function Y(e){d(e)}function X(){G||n()}function ge(n){if(n.preventDefault(),!V){Y(u+1);return}let i={name:R,location:e===null?{kind:`local`,path:z}:{kind:`ssh`,machine:e,path:z},repository:A.repository===null?null:A.repository===`clone`?{kind:`clone`,url:h}:{kind:A.repository},source:A.source,completion:A.completion,runner:A.runner,defaultBaseBranch:A.source===`none`?null:S.trim()||null};r.mutate(i,{onSuccess:t})}return(0,P.jsxs)(`div`,{className:`fixed inset-0 z-50`,children:[(0,P.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-0 bg-black/40 max-md:hidden`,onClick:X}),(0,P.jsx)(`div`,{ref:o,role:`dialog`,"aria-modal":!0,"aria-labelledby":l,onKeyDown:e=>{e.key===`Tab`?te(o.current,e.nativeEvent):Q(n,G)(e)},className:i(`relative flex flex-col overflow-hidden bg-background text-foreground`,`max-md:h-full max-md:pt-[env(safe-area-inset-top)] max-md:pb-[env(safe-area-inset-bottom)]`,`md:absolute md:top-1/2 md:left-1/2 md:h-[min(40rem,calc(100dvh-4rem))] md:w-[min(36rem,calc(100vw-4rem))] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-2xl md:border md:shadow-xl`),children:(0,P.jsxs)(`form`,{onSubmit:ge,className:`flex min-h-0 flex-1 flex-col`,children:[(0,P.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 px-4 pt-3 pb-2 md:px-6 md:pt-4`,children:[(0,P.jsxs)(`h2`,{id:l,className:`min-w-0 flex-1 truncate text-base font-semibold`,children:[`New workspace on `,T]}),(0,P.jsx)(a,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Close new workspace`,title:`Close (Esc)`,disabled:G,onClick:X,children:(0,P.jsx)(ee,{})})]}),(0,P.jsx)(`ol`,{"aria-label":`Steps`,className:`grid shrink-0 grid-cols-2 gap-1 px-4 pb-3 md:grid-cols-4 md:px-6`,children:ke.map((e,t)=>{let n=t===u;return(0,P.jsx)(`li`,{className:`min-w-0`,children:(0,P.jsxs)(`button`,{type:`button`,"aria-current":n?`step`:void 0,disabled:G,onClick:()=>Y(t),className:i(`flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none`,n&&`bg-secondary hover:bg-secondary`),children:[(0,P.jsx)(`span`,{"aria-hidden":!0,className:i(`flex size-5 shrink-0 items-center justify-center rounded-full border text-xs font-medium`,n?`border-primary bg-primary text-primary-foreground`:`text-muted-foreground`),children:t+1}),(0,P.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium`,children:e}),(0,P.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:le[t]})]})]})},e)})}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain border-t px-4 py-4 md:px-6`,children:[u===0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)($,{legend:`What does the workspace folder hold?`,value:A.source,autoFocus:!0,choices:ie.map(e=>({value:e,label:H[e],description:Ae[e],problem:null})),onChange:e=>J({source:e})}),A.source!==`none`&&(0,P.jsx)($,{legend:`How does the repository get there?`,value:A.repository,choices:se.map(e=>({value:e,label:ce[e],description:je[e],problem:pe(A.source,e)})),onChange:e=>J({repository:e})})]}),u===1&&(0,P.jsx)($,{legend:`When is a task done?`,value:A.completion,autoFocus:!0,choices:ae.map(e=>({value:e,label:U[e],description:Me[e],problem:ue(A.source,e)})),onChange:e=>J({completion:e})}),u===2&&(0,P.jsx)($,{legend:`What does starting a task do?`,value:A.runner,autoFocus:!0,choices:oe.map(t=>({value:t,label:W[t],description:Ne[t],note:t===`herdr`?O:null,problem:fe(t,{kind:e===null?`local`:`ssh`,path:z})??de(A.source,A.completion,t)})),onChange:e=>J({runner:e})}),V&&(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[j&&(0,P.jsx)(Z,{label:`Repository URL`,children:({id:e})=>(0,P.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,value:h,onChange:e=>g(e.target.value),required:!0,autoFocus:!0})}),(0,P.jsx)(Z,{label:j?`Parent folder`:`Folder`,help:q,children:({id:e,describedBy:t})=>(0,P.jsx)(re,{id:e,machine:E,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,describedBy:t,value:I,onChange:v,required:!0,autoFocus:!j})}),(0,P.jsx)(Z,{label:`Name`,children:({id:e})=>(0,P.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,value:R,onChange:e=>b(e.target.value),required:!0})}),j&&I.trim()&&R.trim()&&(0,P.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,title:z,children:[`Clones into `,z]}),A.repository===`init`&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`The folder is created if it does not exist and becomes a git repository without a remote.`}),A.source!==`none`&&(0,P.jsx)(Z,{label:`Base branch`,help:A.repository===`init`?`Uses main if empty.`:`Detected from the repository if empty.`,children:({id:e,describedBy:t})=>(0,P.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,"aria-describedby":t,value:S,onChange:e=>w(e.target.value)})}),r.isError&&(0,P.jsx)(`p`,{role:`alert`,className:`text-xs break-words text-destructive`,children:r.error.message})]})]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-t px-4 py-3 md:px-6`,children:[u===0?(0,P.jsx)(a,{type:`button`,variant:`ghost`,disabled:G,onClick:X,children:`Cancel`}):(0,P.jsxs)(a,{type:`button`,variant:`ghost`,disabled:G,onClick:()=>Y(u-1),children:[(0,P.jsx)(C,{"data-icon":`inline-start`}),`Back`]}),(0,P.jsx)(a,{type:`submit`,className:`ml-auto`,changesData:V,disabled:G||V&&L,children:V?G?K.pending:K.submit:(0,P.jsxs)(P.Fragment,{children:[`Next`,(0,P.jsx)(x,{"data-icon":`inline-end`})]})})]})]})})]})}export{Y as a,X as c,te as d,ee as f,x as g,C as h,J as i,I as l,D as m,_e as n,Q as o,j as p,we as r,q as s,Ee as t,R as u};
|
|
1
|
+
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{At as a,F as o,G as s,L as c,R as l,U as u,Wt as d,X as f,d as p,ut as m}from"./status-styles-vBpwCdSe.js";import{d as h,h as g,m as _}from"./event-DMqRNLc_.js";var v={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};v.node;var y=t(v),b={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};b.node;var x=t(b),S={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};S.node;var C=t(S),w={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};w.node;var T=t(w),E={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};E.node;var D=t(E),O={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};O.node;var k=t(O),A={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};A.node;var j=t(A),M={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};M.node;var ee=t(M),N=r(e(),1),P=n();function te(e,t){if(e===null)return;let n=[...e.querySelectorAll(`a[href], button, input, select, textarea, summary, [tabindex]`)].filter(e=>!e.matches(`:disabled, [tabindex='-1']`)&&e.getClientRects().length>0);if(n.length===0)return;let r=n[0],i=n[n.length-1],a=document.activeElement,o=a instanceof Node&&e.contains(a);(t.shiftKey?!o||a===r:!o||a===i)&&(t.preventDefault(),(t.shiftKey?i:r).focus())}function F(e){let t=/^[a-zA-Z]:/.test(e)||e.startsWith(`\\\\`)||e.includes(`\\`)&&!e.includes(`/`),n=t?`\\`:`/`,r=``,i=e,a=t?/^[\\/]{2}[^\\/]+[\\/]+[^\\/]+/.exec(e):null,o=t?/^[a-zA-Z]:([\\/]?)/.exec(e):null;a?(r=`${a[0].replace(/[\\/]+/g,`\\`).replace(/^\\/,`\\\\`)}\\`,i=e.slice(a[0].length)):o?(r=o[0].slice(0,2)+(o[1]?n:``),i=e.slice(o[0].length)):/^[\\/]/.test(e)&&(r=n,i=e.replace(/^[\\/]+/,``));let s=[];for(let e of i.split(t?/[\\/]+/:/\/+/))e!==``&&e!==`.`&&(e===`..`?s.length>0&&s[s.length-1]!==`..`?s.pop():r===``&&s.push(e):s.push(e));return{root:r,separator:n,segments:s}}function I(e){let{root:t,separator:n,segments:r}=F(e),i=t+r.join(n);return i===``?`.`:i}function L(e){return/^[a-zA-Z]:/.test(e)||e.startsWith(`\\\\`)}function R(e,t=2){let{separator:n,segments:r}=F(e);return r.length<=t?I(e):`…${n}${r.slice(-t).join(n)}`}var z=200;function B(e,t){let n=L(e)?`\\`:`/`;return/[\\/]$/.test(e)?`${e}${t}`:`${e}${n}${t}`}function ne(e){return e.replace(/(?<=[^\\/:])[\\/]+$/,``)}function V(e,t){let[n,r]=(0,N.useState)(e);return(0,N.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function re({id:e,machine:t,value:n,onChange:r,describedBy:a,required:o,autoFocus:s,className:c}){let[u,d]=(0,N.useState)(!1),[f,p]=(0,N.useState)(-1),m=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`)),h=m<0?null:n.slice(0,m+1),g=n.slice(m+1).toLowerCase(),_=V(h,z),v=l(t,u?_:null),y=u&&h!==null&&_===h,b=y&&v.data?v.data.directories.filter(e=>e.toLowerCase().startsWith(g)):[],x=b.length>0,S=`${e}-folders`,C=t.kind===`local`?`the server`:t.label;function w(e){r(e),p(-1),d(!0)}function T(e){h!==null&&w(`${B(h,e)}${L(h)?`\\`:`/`}`)}function E(e){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!x){d(!0);return}let t=b.length,n=e.key===`ArrowDown`;p(e=>e<0?n?0:t-1:(e+(n?1:t-1))%t)}else if(e.key===`Enter`){if(!x||f<0)return;e.preventDefault(),T(b[f])}else if(e.key===`Tab`){if(!x||e.shiftKey||f<0&&g===``)return;e.preventDefault(),e.stopPropagation(),T(b[Math.max(f,0)])}else if(e.key===`Escape`){if(!x)return;e.preventDefault(),e.stopPropagation(),d(!1)}}return(0,P.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,P.jsx)(`input`,{id:e,role:`combobox`,"aria-expanded":x,"aria-controls":S,"aria-autocomplete":`list`,"aria-activedescendant":x&&f>=0?`${S}-${f}`:void 0,"aria-describedby":a,autoComplete:`off`,spellCheck:!1,className:c,value:n,onChange:e=>w(e.target.value),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:E,required:o,autoFocus:s}),x&&(0,P.jsx)(`ul`,{id:S,role:`listbox`,"aria-label":`Folders in ${h}`,className:`absolute top-full right-0 left-0 z-10 mt-1 flex max-h-56 flex-col overflow-y-auto rounded-lg border bg-popover p-1 font-mono text-xs text-popover-foreground shadow-md`,children:b.map((e,t)=>(0,P.jsxs)(`li`,{id:`${S}-${t}`,role:`option`,"aria-selected":t===f,onMouseDown:e=>e.preventDefault(),onClick:()=>T(e),className:i(`cursor-pointer truncate rounded px-1.5 py-1 hover:bg-muted max-md:py-2`,t===f&&`bg-secondary hover:bg-secondary`),children:[e,L(h??``)?`\\`:`/`]},e))}),y&&v.isError&&(0,P.jsxs)(`p`,{role:`status`,className:`mt-1 text-xs break-words text-muted-foreground`,children:[`No suggestions: `,v.error.message,`. Type the path of a folder that exists on `,C,`, ending in a separator, to see its subfolders.`]})]})}var ie=[`none`,`local_git`,`github`],ae=[`manual`,`local_merge`,`pr_merge`],oe=[`herdr`,`plain`,`tmux`,`none`],se=[`open`,`init`,`clone`],H={none:`Plain folder`,local_git:`Local git`,github:`GitHub`},U={manual:`Manual`,local_merge:`Local merge`,pr_merge:`PR merge`},W={none:`No runner`,herdr:`herdr`,plain:`Plain`,tmux:`tmux`},ce={open:`Open existing`,init:`New repository`,clone:`Clone URL`};function G(e){return e===`none`?`manual`:e===`local_git`?`local_merge`:`pr_merge`}function K(e,t=!1){return e===`none`?`none`:t?`plain`:`herdr`}function le(e){return e===`none`?null:`open`}function ue(e,t){switch(t){case`manual`:return null;case`local_merge`:return e===`local_git`?null:e===`none`?`Needs a git repository; choose source Local git`:`GitHub tasks merge through pull requests; choose source Local git`;case`pr_merge`:return e===`github`?null:e===`none`?`Needs a git repository; choose source GitHub`:`Needs a GitHub origin remote; choose source GitHub`}}function de(e,t,n){return n!==`none`&&e===`none`?`Needs a git repository for task worktrees; choose source Local git or GitHub`:n===`none`&&t!==`manual`?`${U[t]} needs the task branch that herdr, ${W.plain}, or ${W.tmux} creates; choose completion Manual`:null}function fe(e,t){return e===`tmux`&&t.kind===`ssh`&&L(t.path)?`Needs a POSIX host; choose ${W.plain} or ${W.herdr} for a Windows SSH workspace, or choose a POSIX path for ${W.tmux}`:null}function pe(e,t){return e===`none`?`A plain folder has no repository; choose source Local git or GitHub`:e===`github`&&t===`init`?`A new repository has no GitHub origin; choose source Local git`:null}function me(e,t=!1){let{source:n}=e,r=e.repository!==null&&pe(n,e.repository)===null?e.repository:le(n),i=e.completion!==null&&ue(n,e.completion)===null?e.completion:G(n);return{source:n,repository:r,completion:i,runner:e.runner!==null&&de(n,i,e.runner)===null?e.runner:K(n,t)}}function he(e,t,n=!1){let r={...e,...t},i=me(r,n);return{source:r.source,repository:r.repository===i.repository?r.repository:null,completion:r.completion===i.completion?r.completion:null,runner:r.runner===i.runner?r.runner:null}}var q=`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,J=`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`;function Y(e){let t=I(e.path);return e.kind===`local`?t:`${e.machine}:${t}`}function X(e){let t=R(e.path);return e.kind===`local`?t:`${e.machine}:${t}`}var ge={foreign:`Windows path, not on this server`,missing:`Folder not found on the server`};function _e({problem:e,className:t}){return(0,P.jsxs)(`span`,{className:i(`flex min-w-0 items-start gap-1 text-xs text-destructive`,t),title:`Toodo cannot run git in this repository until its path is corrected`,children:[(0,P.jsx)(j,{"aria-hidden":`true`,className:`mt-0.5 size-3 shrink-0`}),(0,P.jsx)(`span`,{children:ge[e]})]})}function ve({workspace:e}){let t=H[e.source],n=U[e.completion],r=W[e.runner];return(0,P.jsxs)(`span`,{className:`text-xs text-muted-foreground`,title:`Source ${t}, completion ${n}, runner ${r}; set when the workspace was added`,children:[(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:t}),` · `,(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:n}),` `,`· `,(0,P.jsx)(`span`,{className:`whitespace-nowrap`,children:r})]})}function ye(e){return e.kind===`local`?null:e.machine}function be(e,t){let n=t.filter(t=>t.target===e);return n.length===0?`Not saved in herdr`:n.some(e=>e.enabled)?null:`Disabled in herdr`}function xe(e){return/[\\/]$/.test(e)?e:B(e,``)}function Z({label:e,help:t,children:n}){let r=(0,N.useId)(),i=`${r}-help`;return(0,P.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,P.jsx)(`label`,{htmlFor:r,className:`text-xs text-muted-foreground`,children:e}),n({id:r,describedBy:t?i:void 0}),t&&(0,P.jsx)(`p`,{id:i,className:`text-xs text-muted-foreground`,children:t})]})}function Se(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()??``}function Ce(e){return Se(e.trim().replace(/\.git$/,``)).split(`:`).pop()??``}function we({selectedId:e,onSelect:t}){let n=a(),r=(0,N.useSyncExternalStore)(_,h),i=r===`unreachable`||r===`retrying`,o=u(),s=m().data?.herdr.installed===!1,[c,l]=(0,N.useState)(null),f=(0,N.useRef)(null),p=()=>{l(null),f.current?.focus()},[v,y]=(0,N.useState)(!1),b=o.data??[],x=[null,...new Set([...b.map(e=>e.target),...(n.data??[]).flatMap(e=>e.location.kind===`ssh`?[e.location.machine]:[])])];return(0,P.jsxs)(`section`,{"aria-labelledby":`workspaces-heading`,className:`flex shrink-0 flex-col gap-2`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,P.jsx)(`h2`,{id:`workspaces-heading`,className:`text-xs font-medium uppercase text-muted-foreground`,children:`Workspaces`}),(0,P.jsxs)(d,{variant:`ghost`,size:`xs`,onClick:()=>y(e=>!e),children:[!v&&(0,P.jsx)(D,{}),v?`Cancel`:`Add machine`]})]}),v&&(0,P.jsx)(Oe,{herdrMissing:s,onClose:()=>y(!1)}),o.isError&&(s?(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`herdr is not installed on this server, so there are no SSH machines; workspaces on Local can use runner`,` `,W.plain,`.`]}):(0,P.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to list herdr machines: `,o.error.message]})),n.isPending&&!i&&(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading workspaces...`}),(n.isError||n.isPending&&i)&&(0,P.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-2 text-sm text-destructive`,children:[(0,P.jsxs)(`p`,{children:[`Failed to load workspaces:`,` `,n.error?.message??(g()||`The Toodo server does not answer.`)]}),(0,P.jsx)(d,{size:`xs`,variant:`outline`,onClick:()=>void n.refetch(),children:`Retry now`})]}),n.data?.length===0&&c===null&&(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No workspaces yet.`}),(0,P.jsx)(`div`,{className:`flex flex-col gap-3`,children:n.data&&x.map(r=>{let i=r??`Local`,a=n.data.filter(e=>ye(e.location)===r),s=r!==null&&o.isSuccess?be(r,b):null;return(0,P.jsxs)(`section`,{"aria-label":`Machine ${i}`,className:`flex flex-col gap-1`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,P.jsxs)(`h3`,{className:`flex min-w-0 flex-1 items-center gap-1.5 px-1 text-xs font-semibold`,children:[r===null?(0,P.jsx)(T,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,P.jsx)(k,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,P.jsx)(`span`,{className:`truncate`,children:i}),s&&(0,P.jsx)(`span`,{className:`ml-1.5 font-normal text-destructive`,children:s})]}),(0,P.jsxs)(d,{size:`xs`,variant:`outline`,"aria-label":`Add workspace on ${i}`,title:`Add a workspace on this machine`,"aria-haspopup":`dialog`,"aria-expanded":c!==null&&c.machine===r,onClick:e=>{f.current=e.currentTarget,l({machine:r})},children:[(0,P.jsx)(D,{}),`Add`]})]}),a.length>0&&(0,P.jsx)(`ul`,{className:`flex flex-col gap-1`,children:a.map(n=>(0,P.jsx)(Te,{workspace:n,selected:n.id===e,onSelect:t},n.id))})]},i)})}),c&&(0,P.jsx)(Ie,{machine:c.machine,onCreated:e=>{p(),t(e.id)},onClose:p})]})}function Te({workspace:e,selected:t,onSelect:n}){let r=c(),[a,o]=(0,N.useState)(!1);return(0,P.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,P.jsxs)(`div`,{className:i(`group flex items-center rounded-lg hover:bg-sidebar-accent`,t&&`bg-sidebar-accent`),children:[(0,P.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:`flex min-w-0 flex-1 flex-col px-2.5 py-1.5 text-left`,children:[(0,P.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),(0,P.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,title:Y(e.location),children:R(e.location.path)}),(0,P.jsx)(ve,{workspace:e}),e.pathProblem&&(0,P.jsx)(_e,{problem:e.pathProblem})]}),!a&&(0,P.jsx)(d,{size:`icon-xs`,variant:`ghost`,"aria-label":`Remove ${e.name}`,title:`Remove the workspace and its tasks from Toodo`,className:`mr-1 shrink-0 opacity-0 group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,onClick:()=>{r.reset(),o(!0)},children:(0,P.jsx)(ee,{})})]}),a&&(0,P.jsxs)(`div`,{role:`group`,"aria-label":`Remove ${e.name}`,className:`flex flex-col gap-1.5 rounded-lg border p-2`,onKeyDown:e=>{e.key===`Escape`&&!r.isPending&&(e.preventDefault(),o(!1))},children:[(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Remove `,e.name,` and its tasks from Toodo? The repository, worktrees, and herdr workspaces are kept.`]}),r.isError&&(0,P.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r.error.message}),(0,P.jsxs)(`div`,{className:`flex gap-1`,children:[(0,P.jsx)(d,{changesData:!0,size:`xs`,variant:`destructive`,"aria-label":`Confirm remove ${e.name}`,disabled:r.isPending,onClick:()=>r.mutate(e.id),children:r.isPending?`Removing...`:`Remove`}),(0,P.jsx)(d,{size:`xs`,variant:`ghost`,autoFocus:!0,onClick:()=>o(!1),children:`Back`})]})]})]})}function Q(e,t=!1){return n=>{n.key===`Escape`&&!t&&!n.defaultPrevented&&(n.preventDefault(),e())}}function Ee({workspace:e,onClose:t}){let n=f(),r=u(),i=a(),[o,s]=(0,N.useState)(ye(e.location)),[c,l]=(0,N.useState)(e.location.path),p=[...new Set([...(r.data??[]).map(e=>e.target),...(i.data??[]).flatMap(e=>e.location.kind===`ssh`?[e.location.machine]:[])])],m=ne(c.trim());function h(r){r.preventDefault();let i=o===null?{kind:`local`,path:m}:{kind:`ssh`,machine:o,path:m};n.mutate({id:e.id,location:i},{onSuccess:t})}return(0,P.jsxs)(`form`,{onSubmit:h,"aria-label":`Move ${e.name}`,className:`flex flex-col gap-2 rounded-lg border p-2`,onKeyDown:Q(t,n.isPending),children:[(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Point the workspace at the same repository on another machine or in another folder. Its tasks stay. A repository on a Windows host takes a Windows path such as D:\\dev\\repo.`}),(0,P.jsx)(Z,{label:`Machine`,children:({id:e})=>(0,P.jsxs)(`select`,{id:e,className:q,value:o??``,onChange:e=>s(e.target.value===``?null:e.target.value),autoFocus:!0,children:[(0,P.jsx)(`option`,{value:``,children:`Local (this server)`}),p.map(e=>(0,P.jsx)(`option`,{value:e,children:e},e))]})}),(0,P.jsx)(Z,{label:`Folder`,help:`The repository's own folder on that machine.`,children:({id:e,describedBy:t})=>(0,P.jsx)(re,{id:e,machine:o===null?{kind:`local`}:{kind:`ssh`,label:o},className:q,describedBy:t,value:c,onChange:l,required:!0})}),n.isError&&(0,P.jsx)(`p`,{role:`alert`,className:`text-xs break-words text-destructive`,children:n.error.message}),(0,P.jsxs)(`div`,{className:`flex gap-1`,children:[(0,P.jsx)(d,{type:`submit`,size:`sm`,disabled:n.isPending||m===``,children:n.isPending?`Moving...`:`Move workspace`}),(0,P.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,disabled:n.isPending,onClick:t,children:`Cancel`})]})]})}var De=`herdr machine add <host>`;function Oe({herdrMissing:e,onClose:t}){let[n,r]=(0,N.useState)(null);async function i(){try{await navigator.clipboard.writeText(De),r(`Copied the command.`)}catch(e){r(`Could not copy: ${String(e)}`)}}return(0,P.jsxs)(`section`,{"aria-label":`Add machine`,className:`flex flex-col gap-2 rounded-lg border p-2`,onKeyDown:Q(t),children:[(0,P.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e&&`Install herdr on the server first; SSH machines need it. `,`herdr asks questions in a terminal, which the Toodo server cannot open. Run this command in a terminal on the server, replacing `,(0,P.jsx)(`code`,{children:`<host>`}),` with an SSH host from its ~/.ssh/config, then reload the machine list here.`]}),(0,P.jsxs)(`div`,{className:`flex flex-col items-start gap-1`,children:[(0,P.jsx)(`code`,{className:`max-w-full rounded bg-muted px-1.5 py-1 text-xs`,"aria-label":`Add machine command`,children:De}),(0,P.jsx)(d,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>void i(),children:`Copy command`})]}),n&&(0,P.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:n})]})}var ke=[`Source`,`Completion`,`Runner`,`Details`],Ae={none:`A folder without git. Tasks get no branch, worktree, or pull request.`,local_git:`A git repository without GitHub. Task branches merge locally.`,github:`A git repository with a GitHub origin. Tasks ship as pull requests.`},je={open:`The folder already holds the repository.`,init:`Make a folder a new git repository without a remote.`,clone:`Clone a repository URL into a new folder.`},Me={manual:`When its criteria are met; nothing is merged.`,local_merge:`Once its branch is merged into the base branch locally.`,pr_merge:`Once its pull request is merged into the base branch.`},Ne={herdr:`Opens agents in herdr on a worktree and branch of the task.`,plain:`Runs Claude or Codex in the background in a worktree and branch of the task, without herdr.`,tmux:`Runs Claude or Codex in a tmux session in a worktree and branch of the task, without herdr.`,none:`Only marks the task in progress.`};function Pe(e){return e?`herdr is not running on this server; start it there before starting tasks, or choose ${W.plain}.`:`herdr is not running on this server since it is not installed there; install and start herdr before starting tasks, or choose ${W.plain}.`}var Fe={clone:{submit:`Clone workspace`,pending:`Cloning...`},open:{submit:`Open workspace`,pending:`Opening...`},init:{submit:`Init workspace`,pending:`Initializing...`},none:{submit:`Add workspace`,pending:`Adding...`}};function $({legend:e,value:t,choices:n,onChange:r,autoFocus:a=!1}){let o=(0,N.useId)();return(0,P.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,P.jsx)(`legend`,{className:`mb-1.5 text-sm font-medium`,children:e}),n.map(e=>{let n=e.value===t,s=e.problem!==null,c=s?null:e.note??null,l=`${o}-${e.value}`;return(0,P.jsxs)(`label`,{className:i(`flex items-start gap-2.5 rounded-lg border px-3 py-2 transition-colors has-focus-visible:border-ring has-focus-visible:ring-3 has-focus-visible:ring-ring/50`,s?`cursor-not-allowed border-dashed`:`cursor-pointer hover:bg-muted`,n&&`border-ring bg-secondary hover:bg-secondary`),children:[(0,P.jsx)(`input`,{type:`radio`,name:o,value:e.value,checked:n,disabled:s,autoFocus:a&&n,"aria-labelledby":l,"aria-describedby":c===null?`${l}-about`:`${l}-about ${l}-note`,onChange:()=>!s&&r(e.value),className:`mt-0.5 size-4 shrink-0 accent-primary`}),(0,P.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,P.jsx)(`span`,{id:l,className:i(`text-sm font-medium`,s&&`text-muted-foreground`),children:e.label}),(0,P.jsxs)(`span`,{id:`${l}-about`,className:`flex items-start gap-1 text-xs text-muted-foreground`,children:[s&&(0,P.jsx)(y,{"aria-hidden":!0,className:`mt-0.5 size-3 shrink-0`}),e.problem??e.description]}),c!==null&&(0,P.jsxs)(`span`,{id:`${l}-note`,className:i(`flex items-start gap-1 text-xs`,p.attention),children:[(0,P.jsx)(j,{"aria-hidden":!0,className:`mt-0.5 size-3 shrink-0`}),c]})]})]},e.value)})]})}function Ie({machine:e,onCreated:t,onClose:n}){let r=o(),a=(0,N.useRef)(null),c=(0,N.useId)(),[l,u]=(0,N.useState)(0),[f,p]=(0,N.useState)({source:`github`,repository:null,completion:null,runner:null}),[h,g]=(0,N.useState)(``),[_,v]=(0,N.useState)(null),[y,b]=(0,N.useState)(null),[S,w]=(0,N.useState)(``),T=e??`Local`,E=e===null?{kind:`local`}:{kind:`ssh`,label:e},D=m().data?.herdr,O=e===null&&D!==void 0&&!D.running?Pe(D.installed):null,k=O!==null,A=me(f,k),j=A.repository===`clone`,M=s(E).data,F=M===void 0?``:j?M:xe(M),I=_??F,L=!j&&_===null,R=y??(j?Ce(h):L?``:Se(I)),z=j&&I.trim()&&R.trim()?B(I.trim(),R.trim()):ne(I.trim()),V=l===ke.length-1,G=r.isPending,K=Fe[A.repository??`none`],le=[H[A.source],U[A.completion],W[A.runner],T],q=j?void 0:A.source===`none`?`The folder the tasks are about. Toodo runs no git or herdr there.`:`The repository's own folder.`;function J(e){let t=he(f,e,k);me(t,k).repository===`clone`!==j&&v(null),p(t)}function Y(e){u(e)}function X(){G||n()}function ge(n){if(n.preventDefault(),!V){Y(l+1);return}let i={name:R,location:e===null?{kind:`local`,path:z}:{kind:`ssh`,machine:e,path:z},repository:A.repository===null?null:A.repository===`clone`?{kind:`clone`,url:h}:{kind:A.repository},source:A.source,completion:A.completion,runner:A.runner,defaultBaseBranch:A.source===`none`?null:S.trim()||null};r.mutate(i,{onSuccess:t})}return(0,P.jsxs)(`div`,{className:`fixed inset-0 z-50`,children:[(0,P.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-0 bg-black/40 max-md:hidden`,onClick:X}),(0,P.jsx)(`div`,{ref:a,role:`dialog`,"aria-modal":!0,"aria-labelledby":c,onKeyDown:e=>{e.key===`Tab`?te(a.current,e.nativeEvent):Q(n,G)(e)},className:i(`relative flex flex-col overflow-hidden bg-background text-foreground`,`max-md:h-full max-md:pt-[env(safe-area-inset-top)] max-md:pb-[env(safe-area-inset-bottom)]`,`md:absolute md:top-1/2 md:left-1/2 md:h-[min(40rem,calc(100dvh-4rem))] md:w-[min(36rem,calc(100vw-4rem))] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-2xl md:border md:shadow-xl`),children:(0,P.jsxs)(`form`,{onSubmit:ge,className:`flex min-h-0 flex-1 flex-col`,children:[(0,P.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 px-4 pt-3 pb-2 md:px-6 md:pt-4`,children:[(0,P.jsxs)(`h2`,{id:c,className:`min-w-0 flex-1 truncate text-base font-semibold`,children:[`New workspace on `,T]}),(0,P.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Close new workspace`,title:`Close (Esc)`,disabled:G,onClick:X,children:(0,P.jsx)(ee,{})})]}),(0,P.jsx)(`ol`,{"aria-label":`Steps`,className:`grid shrink-0 grid-cols-2 gap-1 px-4 pb-3 md:grid-cols-4 md:px-6`,children:ke.map((e,t)=>{let n=t===l;return(0,P.jsx)(`li`,{className:`min-w-0`,children:(0,P.jsxs)(`button`,{type:`button`,"aria-current":n?`step`:void 0,disabled:G,onClick:()=>Y(t),className:i(`flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none`,n&&`bg-secondary hover:bg-secondary`),children:[(0,P.jsx)(`span`,{"aria-hidden":!0,className:i(`flex size-5 shrink-0 items-center justify-center rounded-full border text-xs font-medium`,n?`border-primary bg-primary text-primary-foreground`:`text-muted-foreground`),children:t+1}),(0,P.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium`,children:e}),(0,P.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:le[t]})]})]})},e)})}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain border-t px-4 py-4 md:px-6`,children:[l===0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)($,{legend:`What does the workspace folder hold?`,value:A.source,autoFocus:!0,choices:ie.map(e=>({value:e,label:H[e],description:Ae[e],problem:null})),onChange:e=>J({source:e})}),A.source!==`none`&&(0,P.jsx)($,{legend:`How does the repository get there?`,value:A.repository,choices:se.map(e=>({value:e,label:ce[e],description:je[e],problem:pe(A.source,e)})),onChange:e=>J({repository:e})})]}),l===1&&(0,P.jsx)($,{legend:`When is a task done?`,value:A.completion,autoFocus:!0,choices:ae.map(e=>({value:e,label:U[e],description:Me[e],problem:ue(A.source,e)})),onChange:e=>J({completion:e})}),l===2&&(0,P.jsx)($,{legend:`What does starting a task do?`,value:A.runner,autoFocus:!0,choices:oe.map(t=>({value:t,label:W[t],description:Ne[t],note:t===`herdr`?O:null,problem:fe(t,{kind:e===null?`local`:`ssh`,path:z})??de(A.source,A.completion,t)})),onChange:e=>J({runner:e})}),V&&(0,P.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[j&&(0,P.jsx)(Z,{label:`Repository URL`,children:({id:e})=>(0,P.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,value:h,onChange:e=>g(e.target.value),required:!0,autoFocus:!0})}),(0,P.jsx)(Z,{label:j?`Parent folder`:`Folder`,help:q,children:({id:e,describedBy:t})=>(0,P.jsx)(re,{id:e,machine:E,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,describedBy:t,value:I,onChange:v,required:!0,autoFocus:!j})}),(0,P.jsx)(Z,{label:`Name`,children:({id:e})=>(0,P.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,value:R,onChange:e=>b(e.target.value),required:!0})}),j&&I.trim()&&R.trim()&&(0,P.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,title:z,children:[`Clones into `,z]}),A.repository===`init`&&(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`The folder is created if it does not exist and becomes a git repository without a remote.`}),A.source!==`none`&&(0,P.jsx)(Z,{label:`Base branch`,help:A.repository===`init`?`Uses main if empty.`:`Detected from the repository if empty.`,children:({id:e,describedBy:t})=>(0,P.jsx)(`input`,{id:e,className:`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,"aria-describedby":t,value:S,onChange:e=>w(e.target.value)})}),r.isError&&(0,P.jsx)(`p`,{role:`alert`,className:`text-xs break-words text-destructive`,children:r.error.message})]})]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-t px-4 py-3 md:px-6`,children:[l===0?(0,P.jsx)(d,{type:`button`,variant:`ghost`,disabled:G,onClick:X,children:`Cancel`}):(0,P.jsxs)(d,{type:`button`,variant:`ghost`,disabled:G,onClick:()=>Y(l-1),children:[(0,P.jsx)(C,{"data-icon":`inline-start`}),`Back`]}),(0,P.jsx)(d,{type:`submit`,className:`ml-auto`,changesData:V,disabled:G||V&&L,children:V?G?K.pending:K.submit:(0,P.jsxs)(P.Fragment,{children:[`Next`,(0,P.jsx)(x,{"data-icon":`inline-end`})]})})]})]})})]})}export{Y as a,X as c,te as d,ee as f,x as g,C as h,J as i,I as l,D as m,_e as n,Q as o,j as p,we as r,q as s,Ee as t,R as u};
|
package/web/index.html
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
|
|
9
9
|
<meta name="theme-color" content="#0a0a0a" media="(prefers-color-scheme: dark)" />
|
|
10
10
|
<title>Toodo</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-CFwUezdf.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/dist-ZmB2kPfR.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/event-DMqRNLc_.js">
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/status-styles-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-list-
|
|
16
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/status-styles-vBpwCdSe.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-list-Bh1Dl9pl.js">
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/assets/index-dcNSRV1W.css">
|
|
17
17
|
<link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials">
|
|
18
18
|
<link rel="apple-touch-icon" href="/pwa/apple-touch-icon.png">
|
|
19
19
|
</head>
|
package/web/sw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by vite-pwa.ts for this build.
|
|
2
|
-
const CACHE = "toodo-shell-
|
|
3
|
-
const SHELL = ["/","/assets/details-sheet-
|
|
2
|
+
const CACHE = "toodo-shell-73aac09b1d42b04b";
|
|
3
|
+
const SHELL = ["/","/assets/details-sheet-BS8FCgTh.js","/assets/dist-ZmB2kPfR.js","/assets/event-DMqRNLc_.js","/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2","/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2","/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2","/assets/geist-latin-wght-normal-BgDaEnEv.woff2","/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2","/assets/index-CFwUezdf.js","/assets/index-dcNSRV1W.css","/assets/markdown-BC620FJC.js","/assets/offline-screen-cnbUBmJc.js","/assets/opener-DWhHPoCL.js","/assets/review-CLYmIbyh.js","/assets/server-access-CLh7AonP.js","/assets/status-styles-vBpwCdSe.js","/assets/task-details-B3Mc8QMX.js","/assets/task-graph-CioZrRKt.js","/assets/task-graph-DLioOiRN.css","/assets/workspace-list-Bh1Dl9pl.js","/favicon.svg","/manifest.webmanifest","/pwa/apple-touch-icon.png","/pwa/icon-192.png","/pwa/icon-512.png","/pwa/icon-maskable-192.png","/pwa/icon-maskable-512.png"];
|
|
4
4
|
const SERVER_PATHS = ["/api","/mcp"];
|
|
5
5
|
const NOTIFICATION_ICON = "/pwa/icon-192.png";
|
|
6
6
|
// The message that asks an open page to show a task; see listenForOpenTask in src/web/push.ts.
|