dev-process-kit 0.3.0-beta.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +8 -8
  2. package/dist/boards.js +1 -1
  3. package/dist/chunks/{shared-BzKZc8e7.js → shared-2OsWmhrI.js} +1 -1
  4. package/dist/chunks/{shared-CO-HhC8m.js → shared-B57TT0rn.js} +1 -1
  5. package/dist/chunks/{shared-CXefnQqJ.js → shared-B8ZhyjWv.js} +140 -137
  6. package/dist/chunks/{shared-D9js0mlL.js → shared-BXywwm1a.js} +740 -366
  7. package/dist/chunks/shared-Be43xweD.js +43 -0
  8. package/dist/chunks/{shared-CJnwvCXE.js → shared-C0M3Ib7z.js} +1 -1
  9. package/dist/chunks/{shared-BYr9ZouD.js → shared-C89fKgKG.js} +98 -94
  10. package/dist/chunks/{shared-D6X_HEJN.js → shared-CF2_VP2x.js} +1 -1
  11. package/dist/chunks/{shared-DXPlz1s4.js → shared-CeCpFPDQ.js} +1 -1
  12. package/dist/chunks/{shared-BhUEVKpO.js → shared-DIEJ9E2G.js} +1 -1
  13. package/dist/chunks/shared-DJtGS7Ct.js +1598 -0
  14. package/dist/chunks/{shared-DEco37gW.js → shared-Dd8JfvQe.js} +1 -1
  15. package/dist/chunks/{shared-NkccEMPc.js → shared-Dn92ukYW.js} +1 -1
  16. package/dist/chunks/{shared-BYcLqnFV.js → shared-Dql0ZVdC.js} +1 -1
  17. package/dist/chunks/shared-LHG2FbnK.js +1 -0
  18. package/dist/chunks/{shared-naTB_LaU.js → shared-egtdNQhY.js} +264 -281
  19. package/dist/chunks/{shared-BLzPmv14.js → shared-ubG0-RQ-.js} +1 -1
  20. package/dist/components.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/views/delegation-poker.js +1 -1
  23. package/dist/views/plain.js +1 -1
  24. package/dist/views/prototype.js +1 -1
  25. package/dist/views/slides.js +1 -1
  26. package/dist/views/task-board.js +1 -1
  27. package/dist/views/usm.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunks/shared-Bt5HGgX9.js +0 -1636
  30. package/dist/chunks/shared-DIHtcDps.js +0 -1
@@ -0,0 +1,1598 @@
1
+ import{au as qe,bf as B,av as u,aw as l,aa as w,az as $,ac as b,aM as g,aB as j,aN as _,ax as Y,ay as V,p as y,t as Ce,aC as Be,aO as _e,aA as Le,ab as L,N as Pe,e as Ne,a5 as Re,S as Ge,P as S,ai as n,as as d,z as Ie,bm as Qe,bn as Ue,aH as E,bc as J,bd as Me,I as He,bz as P,ah as We,V as X,bh as Ke,l as Fe,aW as je}from"./shared-B8ZhyjWv.js";import{a as Ye}from"./shared-C0M3Ib7z.js";import{D as Ve,d as Je}from"./shared-ubG0-RQ-.js";import{o as T}from"./shared-LHG2FbnK.js";const Z=["working","waiting","blocked","done"],D=["todo","doing","blocked","done"],ee=["agent","human"],v=Y(b(),V(1)),Xe=u({id:g,name:v,kind:l($(ee),"agent")}),Ze=u({id:g,title:v,status:l($(D),"todo"),assignee:l(g),note:l(b()),design:l(g),proposed:l(j(),!1),reason:l(b()),questions:_}),ea=u({id:g,label:l(b()),href:v,kind:l(b()),description:l(b()),questions:_}),aa=u({id:g,title:v,body:l(b()),questions:_}),ta=u({id:g,ref:l(v),title:v,description:l(b()),blocking:l(j(),!1),assumption:l(b())}),ae=u({title:l(b(),""),status:l($(Z)),designs:l(w(aa),[]),members:l(w(Xe),[]),todos:l(w(Ze),[]),outputs:l(w(ea),[]),questions:l(w(ta),[])}),O=(a,e)=>{const t=new Set;for(const s of e){if(t.has(s))throw new Error(`duplicate ${a} id: ${s}`);t.add(s)}},k=a=>a===void 0||a.trim()===""?null:a,te=a=>{const e=qe(ae,a);O("member",e.members.map(o=>o.id)),O("design",e.designs.map(o=>o.id)),O("todo",e.todos.map(o=>o.id)),O("output",e.outputs.map(o=>o.id)),O("question",e.questions.map(o=>o.id));const t=new Set(e.members.map(o=>o.id));for(const o of e.todos)if(o.assignee!==void 0&&!t.has(o.assignee))throw new Error(`todo ${o.id} is assigned to ${o.assignee}, which is not in members`);const s=new Set(e.designs.map(o=>o.id));for(const o of e.todos)if(o.design!==void 0&&!s.has(o.design))throw new Error(`todo ${o.id} belongs to ${o.design}, which is not in designs`);for(const o of e.questions)if(!o.blocking&&k(o.assumption)===null)throw new Error(`question ${o.id} does not block, so it needs the assumption the agent works on`);return{title:e.title,status:e.status??null,designs:e.designs.map(o=>({id:o.id,title:o.title,body:k(o.body),...B(o.questions)})),members:e.members,todos:e.todos.map(o=>({id:o.id,title:o.title,status:o.status,assignee:o.assignee??null,note:k(o.note),design:o.design??null,proposed:o.proposed,reason:k(o.reason),added:!1,...B(o.questions)})),outputs:e.outputs.map(o=>({id:o.id,label:k(o.label),href:o.href,kind:k(o.kind),description:k(o.description),...B(o.questions)})),questions:e.questions.map((o,r)=>({id:o.id,ref:o.ref??`Q${r+1}`,title:o.title,description:k(o.description),blocking:o.blocking,assumption:k(o.assumption)})),answers:{},decisions:{}}},oe=()=>({title:"",status:null,designs:[],members:[],todos:[],outputs:[],questions:[],answers:{},decisions:{}}),z=(a,e)=>e===null?void 0:a.members.find(t=>t.id===e),h=(a,e)=>a.todos.find(t=>t.id===e),N=(a,e)=>a.designs.find(t=>t.id===e),se=(a,e)=>a.todos.filter(t=>t.design===e),q=(a,e)=>a.questions.find(t=>t.id===e),re=(a,e)=>{const t=a.answers[e.id];return t===void 0?!1:t.kind==="approve"||t.text.trim()!==""},R=(a,e)=>!e.proposed||a.decisions[e.id]==="accept",C=(a,e)=>R(a,e)&&z(a,e.assignee)?.kind==="human",de=(a,e,t)=>{const s={...a};return t===null?delete s[e]:s[e]=t,s},G=(a,e,t)=>({...a,answers:de(a.answers,e,t)}),oa=(a,e,t)=>({...a,decisions:de(a.decisions,e,t)}),sa=(a,e,t)=>({...a,todos:a.todos.map(s=>s.id===e?t(s):s)}),f={ANSWER_QUESTION:y("ANSWER_QUESTION","question",Be("kind",[u({kind:L("approve")}),u({kind:L("answer"),text:b()}),u({kind:L("clear")})])),DECIDE_PROPOSAL:y("DECIDE_PROPOSAL","todo",u({decision:$(["accept","decline","clear"])})),SET_TODO_STATUS:y("SET_TODO_STATUS","todo",u({status:$(D)})),ADD_TODO:y("ADD_TODO","page",u({id:g,title:Y(b(),Le(),V(1)),assignee:_e(g)}),{dedupeKey:Ce}),DELETE_TODO:y("DELETE_TODO","todo",u({}))},ne={type:"page",id:"task-board"},I=(a,e)=>({type:"ANSWER_QUESTION",target:{type:"question",id:a},payload:e}),ie=(a,e)=>({type:"DECIDE_PROPOSAL",target:{type:"todo",id:a},payload:{decision:e}}),Q=(a,e)=>({type:"SET_TODO_STATUS",target:{type:"todo",id:a},payload:{status:e}}),le=(a,e,t)=>({type:"ADD_TODO",target:ne,payload:{id:a,title:e,assignee:t}}),pe=a=>({type:"DELETE_TODO",target:{type:"todo",id:a},payload:{}}),ce=(a,e)=>{const t=Pe(f,e);if(t===null)return null;const s=t.target.id;switch(t.type){case"ANSWER_QUESTION":{const o=q(a,s);if(o===void 0)return null;const r=t.payload;return r.kind==="clear"?G(a,s,null):r.kind==="approve"?o.assumption===null?null:G(a,s,{kind:"approve"}):G(a,s,{kind:"answer",text:r.text})}case"DECIDE_PROPOSAL":{if(h(a,s)?.proposed!==!0)return null;const{decision:o}=t.payload;return oa(a,s,o==="clear"?null:o)}case"SET_TODO_STATUS":{const o=h(a,s);if(o===void 0||!C(a,o))return null;const{status:r}=t.payload;return sa(a,s,i=>({...i,status:r}))}case"ADD_TODO":{const{payload:o}=t;return h(a,o.id)!==void 0||o.assignee!==null&&z(a,o.assignee)===void 0?null:{...a,todos:[...a.todos,{id:o.id,title:o.title,status:"todo",assignee:o.assignee,note:null,design:null,proposed:!1,reason:null,added:!0}]}}case"DELETE_TODO":return h(a,s)?.added!==!0?null:{...a,todos:a.todos.filter(o=>o.id!==s)};default:return Ne(t)}},U=Re({en:{wholeBoard:"Whole board",statusWorking:"Working",statusWaiting:"Waiting on you",statusBlocked:"Blocked",statusDone:"Done",todoTodo:"To do",todoDoing:"In progress",todoBlocked:"Blocked",todoDone:"Done",kindAgent:"Agent",kindHuman:"Human",designs:"Design docs",designTasks:"Tasks under this design",noDesigns:"The agent has not written a design doc yet.",noDesignTasks:"No task is linked to this design doc yet.",tabs:"Board sections",tabDesigns:"Design Docs",tabQuestions:"Questions",tabTasks:"Tasks",openCount:a=>`${a} open`,noQuestions:"The agent has nothing to ask right now.",questions:"Questions from the agent",questionsProgress:(a,e)=>`${a} of ${e} replied`,blockingGroup:"Blocking \u2014 the agent waits for your decision",provisionalGroup:"Going ahead on an assumption \u2014 the agent adjusts if you answer otherwise",blockingTag:"Blocking",assumption:"Assumption",recommendation:"Agent recommends",approveAssumption:"OK, go with this",approveRecommendation:"OK, go with the recommendation",answerOther:"Answer differently",answerOf:a=>`Your answer to ${a}`,answerPlaceholder:"What you expect instead\u2026",blockingPlaceholder:"Your decision\u2026",approvedTag:"Approved",answeredTag:"Answered",progress:(a,e)=>`${a} of ${e} done`,noTodosYet:"No todos yet",tasksBoard:"Tasks by status",laneCount:a=>a===1?"1 task":`${a} tasks`,laneEmpty:"Nothing here",dragHint:"Drop on another column to change the status",assignee:"Assignee",unassigned:"Unassigned",memberOption:(a,e)=>`${a} (${e})`,statusOf:a=>`Status of \u201C${a}\u201D`,filterTodos:"Show todos",filterAll:"All",filterHuman:"People",addedTag:"Added by you",changedTag:"Changed",removeAdded:"Remove this todo you added",newTodo:"New todo",newTodoPlaceholder:"Add a todo for the agent\u2026",newTodoAssignee:"Assignee of the new todo",addTodo:"Add",proposedMark:"Proposed by the agent",reason:"Why",accept:"Accept",decline:"Decline",decisionOf:a=>`Decision on \u201C${a}\u201D`,acceptedTag:"Accepted",declinedTag:"Declined",undoDecision:"Undo",outputs:"Outputs",noOutputs:"Nothing has been produced yet.",copy:a=>`Copy ${a}`,copied:"Copied",commentOn:a=>`Comment on ${a}`,todoGroup:"Todo",designGroup:"Design Doc",proposalGroup:"Proposal",questionGroup:"Question",approved:"Approve the assumption",answered:"Answer",answerCleared:"Clear the reply",accepted:"Accept the proposal",declined:"Decline the proposal",decisionCleared:"Clear the decision",statusChanged:"Change the status",todoAdded:"Add a todo",todoRemoved:"Remove the added todo",quoted:a=>`\u2192 \u201C${a}\u201D`,change:(a,e)=>`${a} \u2192 ${e}`},ja:{wholeBoard:"\u30DC\u30FC\u30C9\u5168\u4F53",statusWorking:"\u4F5C\u696D\u4E2D",statusWaiting:"\u3042\u306A\u305F\u306E\u8FD4\u7B54\u5F85\u3061",statusBlocked:"\u30D6\u30ED\u30C3\u30AF\u4E2D",statusDone:"\u5B8C\u4E86",todoTodo:"\u672A\u7740\u624B",todoDoing:"\u9032\u884C\u4E2D",todoBlocked:"\u30D6\u30ED\u30C3\u30AF",todoDone:"\u5B8C\u4E86",kindAgent:"Agent",kindHuman:"\u4EBA\u9593",designs:"Design Doc",designTasks:"\u3053\u306E Design Doc \u306E\u30BF\u30B9\u30AF",noDesigns:"Agent \u306F\u307E\u3060 Design Doc \u3092\u66F8\u3044\u3066\u3044\u307E\u305B\u3093\u3002",noDesignTasks:"\u3053\u306E Design Doc \u306B\u7D10\u3065\u304F\u30BF\u30B9\u30AF\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",tabs:"\u30DC\u30FC\u30C9\u306E\u533A\u5206",tabDesigns:"Design Doc",tabQuestions:"\u8CEA\u554F",tabTasks:"\u30BF\u30B9\u30AF",openCount:a=>`\u672A\u56DE\u7B54 ${a} \u4EF6`,noQuestions:"\u4ECA Agent \u304B\u3089\u805E\u304D\u305F\u3044\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093\u3002",questions:"Agent \u304B\u3089\u306E\u8CEA\u554F",questionsProgress:(a,e)=>`\u8FD4\u7B54\u6E08\u307F ${a} / ${e}`,blockingGroup:"\u30D6\u30ED\u30C3\u30AB\u30FC \u2014 \u6C7A\u3081\u3066\u3082\u3089\u3046\u307E\u3067\u5148\u306B\u9032\u3081\u306A\u3044",provisionalGroup:"\u4EEE\u306E\u524D\u63D0\u3067\u9032\u884C\u4E2D \u2014 \u9055\u3048\u3070\u65B9\u91DD\u3092\u76F4\u3059",blockingTag:"\u30D6\u30ED\u30C3\u30AB\u30FC",assumption:"\u4EEE\u56DE\u7B54",recommendation:"Agent \u306E\u63A8\u5968",approveAssumption:"\u3053\u306E\u524D\u63D0\u3067 OK",approveRecommendation:"\u63A8\u5968\u3069\u304A\u308A\u3067 OK",answerOther:"\u5225\u306E\u56DE\u7B54\u3092\u3059\u308B",answerOf:a=>`${a} \u3078\u306E\u56DE\u7B54`,answerPlaceholder:"\u671F\u5F85\u3059\u308B\u56DE\u7B54\u3092\u5165\u529B\u2026",blockingPlaceholder:"\u3069\u3046\u3059\u308B\u304B\u3092\u5165\u529B\u2026",approvedTag:"\u627F\u8A8D\u6E08\u307F",answeredTag:"\u56DE\u7B54\u6E08\u307F",progress:(a,e)=>`${e} \u4EF6\u4E2D ${a} \u4EF6\u5B8C\u4E86`,noTodosYet:"Todo \u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093",tasksBoard:"\u72B6\u614B\u3054\u3068\u306E\u30BF\u30B9\u30AF",laneCount:a=>`${a} \u4EF6`,laneEmpty:"\u306A\u3057",dragHint:"\u5225\u306E\u5217\u306B\u30C9\u30ED\u30C3\u30D7\u3059\u308B\u3068\u72B6\u614B\u304C\u5909\u308F\u308A\u307E\u3059",assignee:"\u62C5\u5F53",unassigned:"\u672A\u5272\u308A\u5F53\u3066",memberOption:(a,e)=>`${a}\uFF08${e}\uFF09`,statusOf:a=>`\u300C${a}\u300D\u306E\u72B6\u614B`,filterTodos:"\u8868\u793A\u3059\u308B Todo",filterAll:"\u3059\u3079\u3066",filterHuman:"\u4EBA\u9593\u306E\u62C5\u5F53",addedTag:"\u3042\u306A\u305F\u304C\u8FFD\u52A0",changedTag:"\u5909\u66F4\u3042\u308A",removeAdded:"\u8FFD\u52A0\u3057\u305F Todo \u3092\u53D6\u308A\u6D88\u3059",newTodo:"\u65B0\u3057\u3044 Todo",newTodoPlaceholder:"Agent \u306B\u983C\u3080 Todo \u3092\u8FFD\u52A0\u2026",newTodoAssignee:"\u65B0\u3057\u3044 Todo \u306E\u62C5\u5F53",addTodo:"\u8FFD\u52A0",proposedMark:"Agent \u304B\u3089\u306E\u63D0\u6848",reason:"\u306A\u305C",accept:"\u627F\u8A8D",decline:"\u898B\u9001\u308A",decisionOf:a=>`\u300C${a}\u300D\u306E\u5224\u65AD`,acceptedTag:"\u627F\u8A8D\u6E08\u307F",declinedTag:"\u898B\u9001\u308A",undoDecision:"\u53D6\u308A\u6D88\u3059",outputs:"\u6210\u679C\u7269",noOutputs:"\u307E\u3060\u6210\u679C\u7269\u306F\u3042\u308A\u307E\u305B\u3093\u3002",copy:a=>`${a} \u3092\u30B3\u30D4\u30FC`,copied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",commentOn:a=>`${a} \u306B\u30B3\u30E1\u30F3\u30C8`,todoGroup:"Todo",designGroup:"Design Doc",proposalGroup:"\u63D0\u6848",questionGroup:"\u8CEA\u554F",approved:"\u524D\u63D0\u3092\u627F\u8A8D",answered:"\u56DE\u7B54",answerCleared:"\u8FD4\u7B54\u3092\u30AF\u30EA\u30A2",accepted:"\u63D0\u6848\u3092\u627F\u8A8D",declined:"\u63D0\u6848\u3092\u898B\u9001\u308A",decisionCleared:"\u63D0\u6848\u306E\u5224\u65AD\u3092\u30AF\u30EA\u30A2",statusChanged:"\u72B6\u614B\u3092\u5909\u66F4",todoAdded:"Todo \u3092\u8FFD\u52A0",todoRemoved:"\u8FFD\u52A0\u3057\u305F Todo \u3092\u53D6\u308A\u6D88\u3057",quoted:a=>`\u2192 \u300C${a}\u300D`,change:(a,e)=>`${a} \u2192 ${e}`}}),ra=(a,e)=>{switch(e){case"working":return a.statusWorking;case"waiting":return a.statusWaiting;case"blocked":return a.statusBlocked;case"done":return a.statusDone}},x=(a,e)=>{switch(e){case"todo":return a.todoTodo;case"doing":return a.todoDoing;case"blocked":return a.todoBlocked;case"done":return a.todoDone}},da=(a,e)=>e==="agent"?a.kindAgent:a.kindHuman,na=(a,e,t)=>t===null?a.unassigned:z(e,t)?.name??t,ue=a=>a.title===""?"Task Context Board":a.title,be=(a,e,t)=>{switch(t.type){case"todo":{const s=h(e,t.id);return`${s?.proposed===!0?a.proposalGroup:a.todoGroup} \xB7 ${s?.title??t.id}`}case"design":{const s=N(e,t.id);return`${a.designGroup} \xB7 ${s?.title??t.id}`}case"question":{const s=q(e,t.id);return s===void 0?t.id:`${s.ref} \xB7 ${s.title}`}case"page":return a.wholeBoard;default:return t.id}},ia=(a,e)=>{switch(e){case"accept":return{title:a.accepted,tone:"update"};case"decline":return{title:a.declined,tone:"update"};case"clear":return{title:a.decisionCleared,tone:"delete"}}},la=(a,e,t)=>{switch(t.type){case"ANSWER_QUESTION":{const s=S(f.ANSWER_QUESTION,t);if(s.kind==="clear")return{title:a.answerCleared,tone:"delete"};if(s.kind==="approve"){const o=q(e,t.target.id)?.assumption??null;return{title:a.approved,tone:"update",...o===null?{}:{body:a.quoted(o)}}}return{title:a.answered,tone:"update",body:a.quoted(s.text.slice(0,120))}}case"DECIDE_PROPOSAL":return ia(a,S(f.DECIDE_PROPOSAL,t).decision);case"SET_TODO_STATUS":{const{status:s}=S(f.SET_TODO_STATUS,t),o=h(e,t.target.id)?.status,r=x(a,s);return{title:a.statusChanged,tone:"update",body:o===void 0?r:a.change(x(a,o),r)}}case"ADD_TODO":{const s=S(f.ADD_TODO,t);return{title:a.todoAdded,tone:"create",targetLabel:`${a.todoGroup} \xB7 ${s.title}`,...s.assignee===null?{}:{body:`${a.assignee}: ${na(a,e,s.assignee)}`}}}case"DELETE_TODO":return{title:a.todoRemoved,tone:"delete"};default:return{title:t.type,tone:"meta"}}},ge=(a,e,t,s)=>{let o;try{o=la(a,s??t,e)}catch{o={title:e.type,tone:"meta"}}return{title:o.title,targetLabel:o.targetLabel??be(a,t,e.target),tone:o.tone,...o.body===void 0?{}:{summary:o.body}}},ke=a=>`${a.type} ${Ge(a.target)} ${JSON.stringify(a.payload)}`,he=(a,e)=>[...e.questions.map(t=>({value:`question:${t.id}`,label:`${t.ref} \xB7 ${t.title}`,group:a.questionGroup})),...e.todos.map(t=>({value:`todo:${t.id}`,label:t.title,group:t.proposed?a.proposalGroup:a.todoGroup})),...e.designs.map(t=>({value:`design:${t.id}`,label:t.title,group:a.designGroup}))],fe=(a,e)=>e,pa=(a,e,t)=>{const s=a.answers[e.id];return{id:e.id,ref:e.ref,title:e.title,description:e.description,blocking:e.blocking,assumption:e.assumption,reply:s?.kind??"none",resolved:re(a,e),draft:s?.kind==="answer"?s.text:"",comments:t(`question:${e.id}`)}},me=(a,e)=>{const t=a.questions.map(o=>pa(a,o,e)),s=t.filter(o=>o.resolved).length;return{blocking:t.filter(o=>o.blocking),provisional:t.filter(o=>!o.blocking),resolved:s,total:t.length,open:t.length-s,blockingOpen:t.filter(o=>o.blocking&&!o.resolved).length}},ca={todo:"gray",doing:"blue",blocked:"red",done:"green"},ve=(a,e,t,s=null)=>{const o=e.designs.find(r=>r.id===s)??e.designs[0];return{items:e.designs.map(r=>({id:r.id,title:r.title,taskCount:se(e,r.id).length})),selected:o===void 0?null:ua(a,e,o,t)}},ua=(a,e,t,s)=>({id:t.id,title:t.title,body:t.body,tasks:se(e,t.id).map(o=>({id:o.id,title:o.title,status:o.status,statusLabel:x(a,o.status),proposal:o.proposed?e.decisions[o.id]??"pending":null})),comments:s(`design:${t.id}`),...t.questions===void 0?{}:{questions:t.questions}}),ba=(a,e,t,s,o)=>{const r=h(t,s.id),i=z(e,s.assignee),c=s.design===null?void 0:N(e,s.design);return{id:s.id,title:s.title,note:s.note,reason:s.reason,design:c===void 0?null:{id:c.id,title:c.title},status:s.status,statusLabel:x(a,s.status),assignee:s.assignee,assigneeName:i?.name??null,assigneeKind:i?.kind??null,editable:C(e,s),proposal:s.proposed?e.decisions[s.id]??"pending":null,added:s.added,changed:r!==void 0&&r.status!==s.status,comments:o(`todo:${s.id}`),...s.questions===void 0?{}:{questions:s.questions}}},xe=(a,e,t,s,o="all")=>{const r=e.members.some(p=>p.kind==="human"),i=r?o:"all",c=e.todos.map(p=>ba(a,e,t,p,s)),K=p=>p.assigneeKind==="human",Ee=i==="human"?c.filter(K):c,A=e.todos.filter(p=>R(e,p)),F=A.filter(p=>p.status==="done").length;return{lanes:D.map(p=>({status:p,label:x(a,p),tone:ca[p],cards:Ee.filter(ze=>ze.status===p)})),filter:i,canFilter:r,humanCount:c.filter(K).length,progress:{done:F,total:A.length,label:A.length===0?a.noTodosYet:a.progress(F,A.length)},statuses:D.map(p=>({value:p,label:x(a,p)})),members:e.members.map(p=>({id:p.id,label:a.memberOption(p.name,da(a,p.kind))}))}},we=a=>{if(!/^[a-z][a-z\d+.-]*:\/\//i.test(a))return{kind:"path"};try{return{kind:"url",host:new URL(a).host}}catch{return{kind:"path"}}},$e=a=>a.outputs.map(e=>({id:e.id,title:e.label??e.href,labelled:e.label!==null,href:e.href,kind:e.kind,description:e.description,place:we(e.href),...e.questions===void 0?{}:{questions:e.questions}})),ye=(a,e)=>{switch(e.type){case"todo":return h(a,e.id)!==void 0;case"design":return N(a,e.id)!==void 0;case"question":return q(a,e.id)!==void 0;case"page":return!0;default:return!1}},Te=a=>{const e=U(a);return{kind:"view",name:"task-board",label:"Task Context Board",addable:!1,parseBase:te,emptyBase:oe,actions:f,apply:ce,hasTarget:ye,describe:(t,s,o)=>ge(e,t,s,o),serialize:ke,resolveNavigation:fe,commentTargets:t=>he(e,t),title:ue}},M=(a,e,t,s)=>d`
2
+ <button
3
+ class="dpk-icon-btn board-comment"
4
+ type="button"
5
+ data-comment=${a}
6
+ aria-label=${e}
7
+ title=${e}
8
+ @click=${()=>s.comment(a)}
9
+ >
10
+ ${Ie()} ${t>0?d`<span class="dpk-icon-badge">${t}</span>`:n}
11
+ </button>
12
+ `,De=(a,e,t,s=null)=>d`
13
+ <header class="board-section-head">
14
+ <h2 id=${a}>${e}</h2>
15
+ ${t===null?n:d`<span class="board-section-meta">${t}</span>`}
16
+ </header>
17
+ ${s===null?n:d`<p class="board-lede">${s}</p>`}
18
+ `,ga=(a,e,t)=>d`
19
+ <section class="board-designs" data-section="designs" aria-label=${a.designs}>
20
+ ${e.items.length===0?d`<p class="dpk-empty board-empty" data-variant="dashed">${a.noDesigns}</p>`:d`<div class="board-design-layout">
21
+ <nav class="board-design-index" aria-label=${a.designs}>
22
+ <ul class="board-design-index-list">
23
+ ${e.items.map(s=>ka(a,s,e.selected?.id===s.id,t))}
24
+ </ul>
25
+ </nav>
26
+ <div class="board-design-detail">
27
+ ${e.selected===null?n:ha(a,e.selected,t)}
28
+ </div>
29
+ </div>`}
30
+ </section>
31
+ `,ka=(a,e,t,s)=>d`
32
+ <li>
33
+ <button
34
+ type="button"
35
+ class="board-design-index-item"
36
+ data-design-item=${e.id}
37
+ aria-current=${T(t?"true":void 0)}
38
+ title=${`${e.title} \xB7 ${a.laneCount(e.taskCount)}`}
39
+ @click=${()=>s.selectDesign(e.id)}
40
+ >
41
+ <span class="board-design-index-title">${e.title}</span>
42
+ <span class="board-design-index-count" aria-hidden="true">${e.taskCount}</span>
43
+ </button>
44
+ </li>
45
+ `,ha=(a,e,t)=>d`
46
+ <article
47
+ class="dpk-card board-design"
48
+ data-design=${e.id}
49
+ data-dpk-target=${`design:${e.id}`}
50
+ data-grill-questions=${T(e.questions)}
51
+ aria-labelledby=${`board-design-${e.id}`}
52
+ >
53
+ <header class="board-design-head">
54
+ <h3 class="board-design-title" id=${`board-design-${e.id}`}>${e.title}</h3>
55
+ ${M(`design:${e.id}`,a.commentOn(e.title),e.comments,t)}
56
+ </header>
57
+ ${e.body===null?n:d`<div class="dpk-prose board-design-body">${Qe(Ue(e.body))}</div>`}
58
+ <div class="board-design-figures"><slot name=${`design:${e.id}`}></slot></div>
59
+ ${e.tasks.length===0?d`<p class="board-design-empty">${a.noDesignTasks}</p>`:d`<div class="board-design-tasks">
60
+ <h4 class="board-design-tasks-title">${a.designTasks}</h4>
61
+ <ul class="board-design-task-list">
62
+ ${e.tasks.map(s=>fa(a,s))}
63
+ </ul>
64
+ </div>`}
65
+ </article>
66
+ `,fa=(a,e)=>d`
67
+ <li
68
+ class="board-design-task"
69
+ data-design-task=${e.id}
70
+ data-status=${e.status}
71
+ data-proposal=${e.proposal??"none"}
72
+ >
73
+ <span class="board-todo-state" data-status=${e.status}>${e.statusLabel}</span>
74
+ <span class="board-design-task-title">${e.title}</span>
75
+ ${e.proposal==="pending"||e.proposal==="decline"?d`<span
76
+ class="board-card-mark"
77
+ data-proposal=${e.proposal}
78
+ role="img"
79
+ aria-label=${a.proposedMark}
80
+ title=${a.proposedMark}
81
+ >?</span
82
+ >`:n}
83
+ </li>
84
+ `,ma=(a,e,t)=>e.total===0?n:d`
85
+ <section class="board-section" data-section="questions" aria-labelledby="board-questions">
86
+ ${De("board-questions",a.questions,a.questionsProgress(e.resolved,e.total))}
87
+ ${Oe(a,"blocking",a.blockingGroup,e.blocking,t)}
88
+ ${Oe(a,"provisional",a.provisionalGroup,e.provisional,t)}
89
+ </section>
90
+ `,Oe=(a,e,t,s,o)=>s.length===0?n:d`<div class="board-group" data-group=${e}>
91
+ <h3 class="board-group-title">${t}</h3>
92
+ <ol class="board-questions">
93
+ ${E(s,r=>r.id,r=>va(a,r,o))}
94
+ </ol>
95
+ </div>`,va=(a,e,t)=>{const s=e.assumption!==null;return d`
96
+ <li
97
+ class="dpk-card board-question"
98
+ data-question=${e.id}
99
+ data-dpk-target=${`question:${e.id}`}
100
+ data-blocking=${String(e.blocking)}
101
+ data-reply=${e.reply}
102
+ data-resolved=${String(e.resolved)}
103
+ >
104
+ <div class="dpk-card-head board-question-head">
105
+ <span class="board-ref">${e.ref}</span>
106
+ <h4 class="dpk-card-title board-question-title">${e.title}</h4>
107
+ ${e.resolved?d`<span class="board-tag" data-tone="done">
108
+ ${e.reply==="approve"?a.approvedTag:a.answeredTag}
109
+ </span>`:n}
110
+ ${M(`question:${e.id}`,a.commentOn(e.ref),e.comments,t)}
111
+ </div>
112
+ ${e.description===null?n:d`<p class="board-question-text">${e.description}</p>`}
113
+ ${s?xa(a,e,t):n}
114
+ <textarea
115
+ class="dpk-textarea board-answer"
116
+ data-answer-text=${e.id}
117
+ rows="2"
118
+ aria-label=${a.answerOf(e.ref)}
119
+ placeholder=${s?a.answerPlaceholder:a.blockingPlaceholder}
120
+ .value=${e.draft}
121
+ ?hidden=${s&&e.reply!=="answer"}
122
+ @input=${o=>{const r=o.currentTarget;r instanceof HTMLTextAreaElement&&t.answer(e.id,!s&&r.value===""?{kind:"clear"}:{kind:"answer",text:r.value})}}
123
+ ></textarea>
124
+ </li>
125
+ `},xa=(a,e,t)=>d`
126
+ <div class="board-assumption">
127
+ <span class="board-assumption-label">${e.blocking?a.recommendation:a.assumption}</span>
128
+ <p class="board-assumption-text">${e.assumption}</p>
129
+ </div>
130
+ <div class="board-reply" role="group" aria-label=${a.answerOf(e.ref)}>
131
+ <button
132
+ type="button"
133
+ class="dpk-btn board-approve"
134
+ aria-pressed=${e.reply==="approve"?"true":"false"}
135
+ @click=${()=>t.answer(e.id,e.reply==="approve"?{kind:"clear"}:{kind:"approve"})}
136
+ >
137
+ ${J()} ${e.blocking?a.approveRecommendation:a.approveAssumption}
138
+ </button>
139
+ <button
140
+ type="button"
141
+ class="dpk-btn dpk-btn--ghost board-other"
142
+ aria-pressed=${e.reply==="answer"?"true":"false"}
143
+ @click=${()=>e.reply==="answer"?t.answer(e.id,{kind:"clear"}):t.answerOther(e.id)}
144
+ >
145
+ ${a.answerOther}
146
+ </button>
147
+ </div>
148
+ `,wa=(a,e,t,s)=>d`
149
+ <section class="board-section board-rail-section" data-section="outputs" aria-labelledby="board-outputs">
150
+ ${De("board-outputs",a.outputs,e.length===0?null:String(e.length))}
151
+ ${e.length===0?d`<p class="dpk-empty board-empty" data-variant="dashed">${a.noOutputs}</p>`:d`<ul class="board-outputs">
152
+ ${E(e,o=>o.id,o=>$a(a,o,t===o.id,s))}
153
+ </ul>`}
154
+ </section>
155
+ `,$a=(a,e,t,s)=>{const o=e.place,r=t?a.copied:a.copy(e.href);return d`
156
+ <li
157
+ class="dpk-list-row board-output"
158
+ data-output=${e.id}
159
+ data-place=${o.kind}
160
+ data-grill-questions=${e.questions}
161
+ >
162
+ <div class="board-output-body">
163
+ <div class="board-output-head">
164
+ ${e.kind===null?n:d`<span class="board-kind">${e.kind}</span>`}
165
+ ${o.kind==="url"?d`<a class="board-output-link" href=${e.href} target="_blank" rel="noopener noreferrer"
166
+ >${e.title}</a
167
+ >`:e.labelled?d`<span class="board-output-label">${e.title}</span>`:d`<code class="board-output-path">${e.href}</code>`}
168
+ </div>
169
+ ${o.kind==="url"?d`<span class="board-output-sub">${o.host}</span>`:e.labelled?d`<code class="board-output-path board-output-sub">${e.href}</code>`:n}
170
+ ${e.description===null?n:d`<p class="board-output-text">${e.description}</p>`}
171
+ </div>
172
+ <button
173
+ class="dpk-icon-btn board-copy"
174
+ type="button"
175
+ data-copied=${String(t)}
176
+ aria-label=${r}
177
+ title=${r}
178
+ @click=${()=>s.copy(e.id,e.href)}
179
+ >
180
+ ${t?J():Me()}
181
+ </button>
182
+ </li>
183
+ `},m=["designs","questions","tasks"],ya=(a,e)=>{const t=m.indexOf(a),s=m.length-1;switch(e){case"ArrowRight":return m[t===s?0:t+1]??null;case"ArrowLeft":return m[t===0?s:t-1]??null;case"Home":return m[0];case"End":return m[s]??null;default:return null}},Ta=(a,e)=>{switch(e){case"designs":return a.tabDesigns;case"questions":return a.tabQuestions;case"tasks":return a.tabTasks}},Da=(a,e)=>{switch(a){case"designs":case"tasks":return null;case"questions":return e.questions}},Oa=(a,e,t,s,o)=>d`
184
+ <div class="board-tabs" role="tablist" aria-label=${a.tabs}>
185
+ ${m.map(r=>{const i=Da(r,t);return d`<button
186
+ type="button"
187
+ role="tab"
188
+ id=${`board-tab-${r}`}
189
+ data-tab=${r}
190
+ data-alert=${r==="questions"?String(t.alert):n}
191
+ aria-controls=${`board-panel-${r}`}
192
+ aria-selected=${String(e===r)}
193
+ tabindex=${e===r?0:-1}
194
+ title=${r==="questions"&&t.questions>0?a.openCount(t.questions):n}
195
+ @click=${()=>s(r)}
196
+ @keydown=${o}
197
+ >
198
+ <span class="board-tab-label">${Ta(a,r)}</span
199
+ >${i===null||i===0?n:d`<span class="board-tab-count">${i}</span>`}
200
+ </button>`})}
201
+ </div>
202
+ `,H=(a,e,t)=>d`
203
+ <div
204
+ class="board-panel"
205
+ id=${`board-panel-${a}`}
206
+ role="tabpanel"
207
+ aria-labelledby=${`board-tab-${a}`}
208
+ ?hidden=${e!==a}
209
+ >
210
+ ${t}
211
+ </div>
212
+ `,W="",Aa=(a,e)=>e.statuses.some(t=>t.value===a),Sa=(a,e,t,s)=>d`
213
+ <section class="board-tasks" data-section="tasks" aria-label=${a.tasksBoard}>
214
+ ${Ea(a,e,t)}
215
+ <div class="board-kanban" role="group" aria-label=${a.tasksBoard}>
216
+ ${E(e.lanes,o=>o.status,o=>qa(a,e,o,t,s))}
217
+ </div>
218
+ </section>
219
+ `,Ea=(a,e,t)=>d`
220
+ <div class="board-tasks-bar">
221
+ <div class="board-tasks-progress">
222
+ <span class="board-tasks-progress-label">${e.progress.label}</span>
223
+ ${e.progress.total===0?n:d`<div
224
+ class="board-progress"
225
+ role="progressbar"
226
+ aria-label=${e.progress.label}
227
+ aria-valuemin="0"
228
+ aria-valuemax=${e.progress.total}
229
+ aria-valuenow=${e.progress.done}
230
+ >
231
+ <span
232
+ class="board-progress-fill"
233
+ style=${`width: ${e.progress.done/e.progress.total*100}%`}
234
+ ></span>
235
+ </div>`}
236
+ </div>
237
+ ${e.canFilter?za(a,e,t):n}
238
+ </div>
239
+ `,za=(a,e,t)=>{const s=(o,r,i)=>d`
240
+ <button
241
+ type="button"
242
+ class="board-filter-option"
243
+ data-filter=${o}
244
+ aria-pressed=${e.filter===o?"true":"false"}
245
+ @click=${()=>t.filterTodos(o)}
246
+ >
247
+ ${r}${i===null?n:d`<span class="board-filter-count">${i}</span>`}
248
+ </button>
249
+ `;return d`<div class="board-filter" role="group" aria-label=${a.filterTodos}>
250
+ ${s("all",a.filterAll,null)} ${s("human",a.filterHuman,e.humanCount)}
251
+ </div>`},qa=(a,e,t,s,o)=>d`
252
+ <section
253
+ class="board-lane"
254
+ data-column=${t.status}
255
+ data-tone=${t.tone}
256
+ aria-label=${t.label}
257
+ @dragover=${s.allowTodoDrop}
258
+ @drop=${r=>{r.preventDefault(),s.dropTodo(t.status)}}
259
+ >
260
+ <header class="board-lane-head">
261
+ <h3 class="board-lane-title">${t.label}</h3>
262
+ <span class="board-lane-count" title=${a.laneCount(t.cards.length)}>${t.cards.length}</span>
263
+ </header>
264
+ ${t.cards.length===0?d`<p class="board-lane-empty">${a.laneEmpty}</p>`:d`<ul class="board-cards">
265
+ ${E(t.cards,r=>r.id,r=>_a(a,e,r,s,o))}
266
+ </ul>`}
267
+ ${t.status==="todo"?Na(a,e,s):n}
268
+ </section>
269
+ `,Ca=(a,e)=>e.proposal==="pending"||e.proposal==="decline"?d`<span
270
+ class="board-card-mark"
271
+ data-proposal=${e.proposal}
272
+ role="img"
273
+ aria-label=${a.proposedMark}
274
+ title=${a.proposedMark}
275
+ >?</span
276
+ >`:n,Ba=(a,e)=>d`
277
+ ${e.proposal==="accept"?d`<span class="board-tag" data-tone="done">${a.acceptedTag}</span>`:n}
278
+ ${e.proposal==="decline"?d`<span class="board-tag" data-tone="muted">${a.declinedTag}</span>`:n}
279
+ ${e.added?d`<span class="board-tag" data-tone="new">${a.addedTag}</span>`:n}
280
+ ${e.changed?d`<span class="board-tag" data-tone="changed">${a.changedTag}</span>`:n}
281
+ `,_a=(a,e,t,s,o)=>d`
282
+ <li class="board-card-slot">
283
+ <article
284
+ class="dpk-card board-card"
285
+ data-todo=${t.id}
286
+ data-dpk-target=${`todo:${t.id}`}
287
+ data-grill-questions=${T(t.questions)}
288
+ data-status=${t.status}
289
+ data-proposal=${t.proposal??"none"}
290
+ data-added=${String(t.added)}
291
+ data-changed=${String(t.changed)}
292
+ draggable=${T(t.editable?"true":void 0)}
293
+ title=${T(t.editable?a.dragHint:void 0)}
294
+ @dragstart=${()=>s.beginTodoDrag(t.id)}
295
+ @dragend=${()=>s.endTodoDrag()}
296
+ >
297
+ <div class="board-card-head">
298
+ ${Ca(a,t)}
299
+ <h4 class="dpk-card-title board-card-title">${t.title}</h4>
300
+ <div class="board-card-tags">${Ba(a,t)}</div>
301
+ </div>
302
+ ${t.design===null?n:d`<div class="board-card-design">
303
+ <span class="board-tag" data-tone="design" title=${t.design.title}>${t.design.title}</span>
304
+ </div>`}
305
+ ${t.note===null?n:d`<p class="dpk-card-text board-card-note">${t.note}</p>`}
306
+ ${t.reason===null||t.proposal==="accept"?n:d`<p class="board-reason"><span class="board-reason-label">${a.reason}</span>${t.reason}</p>`}
307
+ <div class="board-card-controls">
308
+ ${t.proposal==="pending"?La(a,t,s):t.proposal==="decline"?n:Pa(a,e,t,s,o)}
309
+ ${t.assigneeName===null?n:d`<span class="board-assignee" data-kind=${t.assigneeKind??"agent"} title=${a.assignee}
310
+ >${t.assigneeName}</span
311
+ >`}
312
+ ${t.proposal==="accept"||t.proposal==="decline"?d`<button
313
+ type="button"
314
+ class="dpk-btn dpk-btn--ghost board-undo"
315
+ @click=${()=>s.decide(t.id,"clear")}
316
+ >
317
+ ${a.undoDecision}
318
+ </button>`:n}
319
+ ${M(`todo:${t.id}`,a.commentOn(t.title),t.comments,s)}
320
+ ${t.added?d`<button
321
+ class="dpk-icon-btn board-todo-remove"
322
+ type="button"
323
+ aria-label=${a.removeAdded}
324
+ title=${a.removeAdded}
325
+ @click=${()=>s.deleteTodo(t.id)}
326
+ >
327
+ ${He()}
328
+ </button>`:n}
329
+ </div>
330
+ </article>
331
+ </li>
332
+ `,La=(a,e,t)=>d`
333
+ <div class="board-decision" role="group" aria-label=${a.decisionOf(e.title)}>
334
+ <button
335
+ type="button"
336
+ class="dpk-btn board-decide"
337
+ data-decision="accept"
338
+ @click=${()=>t.decide(e.id,"accept")}
339
+ >
340
+ ${a.accept}
341
+ </button>
342
+ <button
343
+ type="button"
344
+ class="dpk-btn dpk-btn--ghost board-decide"
345
+ data-decision="decline"
346
+ @click=${()=>t.decide(e.id,"decline")}
347
+ >
348
+ ${a.decline}
349
+ </button>
350
+ </div>
351
+ `,Pa=(a,e,t,s,o)=>t.editable?o.get(t.id).render({options:e.statuses.map(r=>({value:r.value,label:r.label})),value:t.status,onChange:r=>{Aa(r,e)&&r!==t.status&&s.setStatus(t.id,r)},ariaLabel:a.statusOf(t.title),className:"board-todo-status"}):d`<span class="board-todo-state" data-status=${t.status}>${t.statusLabel}</span>`,Na=(a,e,t)=>d`
352
+ <form
353
+ class="board-add-todo"
354
+ @submit=${s=>{s.preventDefault();const o=P(s.currentTarget,HTMLFormElement);if(o===null)return;const r=P(o.elements.namedItem("title"),HTMLInputElement),i=P(o.querySelector('dpk-select[name="assignee"]'),Ve),c=r?.value.trim()??"";r===null||c===""||(t.addTodo(c,i===null||i.value===W?null:i.value),r.value="")}}
355
+ >
356
+ <input
357
+ class="dpk-input board-add-title"
358
+ name="title"
359
+ type="text"
360
+ autocomplete="off"
361
+ aria-label=${a.newTodo}
362
+ placeholder=${a.newTodoPlaceholder}
363
+ />
364
+ <div class="board-add-row">
365
+ ${e.members.length===0?n:d`<dpk-select
366
+ class="board-add-assignee"
367
+ name="assignee"
368
+ aria-label=${a.newTodoAssignee}
369
+ .options=${[{value:W,label:a.unassigned},...e.members.map(s=>({value:s.id,label:s.label}))]}
370
+ .value=${W}
371
+ ></dpk-select>`}
372
+ <button class="dpk-btn board-add-submit" type="submit">${a.addTodo}</button>
373
+ </div>
374
+ </form>
375
+ `,Ra=We`
376
+ /* The shell's sidebar is a left-hand rail (see \`sidebarLayout\`), a drawer on a phone. */
377
+ :host {
378
+ --dpk-sidebar-padding: 12px 16px;
379
+ --dpk-sidebar-padding-end: 20px;
380
+ }
381
+
382
+ .board-rail {
383
+ display: grid;
384
+ gap: 14px;
385
+ }
386
+
387
+ .board {
388
+ display: grid;
389
+ gap: 18px;
390
+ max-width: 1100px;
391
+ width: 100%;
392
+ margin: 0 auto;
393
+ }
394
+
395
+ /* A tab that reads keeps a comfortable measure; the task board takes the whole column. */
396
+ .board-panel > .board-designs,
397
+ .board-panel > .board-section,
398
+ .board-panel > .board-empty {
399
+ max-width: 880px;
400
+ }
401
+
402
+ /* Stacked, the column is what ends the page: it clears the hand-off dock. */
403
+ @media (max-width: 760px) {
404
+ .dpk-main-body {
405
+ padding-bottom: 24px;
406
+ }
407
+ }
408
+
409
+ [data-status='working'],
410
+ [data-status='doing'] {
411
+ --board-tone: var(--dpk-blue);
412
+ --board-tone-soft: var(--dpk-blue-soft);
413
+ --tone: var(--dpk-blue);
414
+ --tone-soft: var(--dpk-blue-soft);
415
+ }
416
+
417
+ [data-status='waiting'] {
418
+ --board-tone: var(--dpk-amber);
419
+ --board-tone-soft: var(--dpk-amber-soft);
420
+ --tone: var(--dpk-amber);
421
+ --tone-soft: var(--dpk-amber-soft);
422
+ }
423
+
424
+ [data-status='blocked'] {
425
+ --board-tone: var(--dpk-danger);
426
+ --board-tone-soft: var(--dpk-danger-soft);
427
+ --tone: var(--dpk-danger);
428
+ --tone-soft: var(--dpk-danger-soft);
429
+ }
430
+
431
+ [data-status='done'] {
432
+ --board-tone: var(--dpk-green);
433
+ --board-tone-soft: var(--dpk-green-soft);
434
+ --tone: var(--dpk-green);
435
+ --tone-soft: var(--dpk-green-soft);
436
+ }
437
+
438
+ [data-status='todo'] {
439
+ --board-tone: var(--dpk-rule-strong);
440
+ --board-tone-soft: var(--dpk-paper-sunken);
441
+ --tone: var(--dpk-rule-strong);
442
+ --tone-soft: var(--dpk-paper-sunken);
443
+ }
444
+
445
+ /* ------------------------------------------------------------- status */
446
+
447
+ .board-status {
448
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 28%, transparent);
449
+ }
450
+
451
+ /* On a phone the header has no room; the Context tab says the same. */
452
+ @media (max-width: 720px) {
453
+ .board-status--header {
454
+ display: none;
455
+ }
456
+ }
457
+
458
+ .board-status[data-status='working']::before {
459
+ animation: board-pulse 1.8s var(--dpk-ease) infinite;
460
+ }
461
+
462
+ @keyframes board-pulse {
463
+ 50% {
464
+ box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone) 0%, transparent);
465
+ }
466
+ }
467
+
468
+ /* --------------------------------------------------------------- tabs */
469
+
470
+ /* Stays at the top of the main area while a long log or question list scrolls. */
471
+ .board-tabs {
472
+ position: sticky;
473
+ top: 0;
474
+ z-index: 2;
475
+ display: flex;
476
+ gap: 3px;
477
+ padding: 3px;
478
+ border: 1px solid var(--dpk-rule);
479
+ border-radius: var(--dpk-radius);
480
+ background: var(--dpk-paper-sunken);
481
+ box-shadow:
482
+ inset 0 1px 2px var(--dpk-shade-1),
483
+ 0 6px 14px -10px var(--dpk-shade-3);
484
+ }
485
+
486
+ .board-tabs [role='tab'] {
487
+ flex: 1 1 0;
488
+ display: inline-flex;
489
+ align-items: center;
490
+ justify-content: center;
491
+ gap: 7px;
492
+ min-width: 0;
493
+ padding: 7px 10px;
494
+ border: 1px solid transparent;
495
+ border-radius: var(--dpk-radius-sm);
496
+ background: transparent;
497
+ color: var(--dpk-ink-soft);
498
+ font: inherit;
499
+ font-size: 13px;
500
+ font-weight: 550;
501
+ white-space: nowrap;
502
+ cursor: pointer;
503
+ transition:
504
+ color 140ms var(--dpk-ease),
505
+ background 140ms var(--dpk-ease);
506
+ }
507
+
508
+ .board-tabs [role='tab']:hover {
509
+ color: var(--dpk-ink);
510
+ }
511
+
512
+ .board-tabs [role='tab']:focus-visible {
513
+ outline: none;
514
+ box-shadow: var(--dpk-focus);
515
+ }
516
+
517
+ .board-tabs [role='tab'][aria-selected='true'] {
518
+ background: var(--dpk-paper-raised);
519
+ color: var(--dpk-ink);
520
+ font-weight: 700;
521
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
522
+ }
523
+
524
+ @media (max-width: 400px) {
525
+ .board-tabs [role='tab'] {
526
+ gap: 5px;
527
+ padding-inline: 6px;
528
+ }
529
+ }
530
+
531
+ /* Too narrow for every label whole, a label gives way before its count does. */
532
+ .board-tab-label {
533
+ min-width: 0;
534
+ overflow: hidden;
535
+ text-overflow: ellipsis;
536
+ }
537
+
538
+ .board-tab-count {
539
+ flex: none;
540
+ min-width: 18px;
541
+ padding: 0 6px;
542
+ border-radius: 999px;
543
+ background: var(--dpk-rule);
544
+ color: var(--dpk-ink-soft);
545
+ font-family: var(--dpk-mono);
546
+ font-size: 10.5px;
547
+ font-weight: 650;
548
+ font-variant-numeric: tabular-nums;
549
+ line-height: 17px;
550
+ text-align: center;
551
+ }
552
+
553
+ /* An open blocker: the agent is stuck until the reader answers. */
554
+ .board-tabs [data-alert='true'] .board-tab-count {
555
+ background: var(--dpk-danger);
556
+ color: #fff;
557
+ }
558
+
559
+ .board-panel {
560
+ display: grid;
561
+ gap: 18px;
562
+ min-width: 0;
563
+ animation: board-fade 180ms var(--dpk-ease);
564
+ }
565
+
566
+ .board-panel[hidden] {
567
+ display: none;
568
+ }
569
+
570
+ @keyframes board-fade {
571
+ from {
572
+ opacity: 0;
573
+ transform: translateY(4px);
574
+ }
575
+ }
576
+
577
+ /* ------------------------------------------------------------ designs */
578
+
579
+ .board-designs {
580
+ display: grid;
581
+ gap: 14px;
582
+ min-width: 0;
583
+ }
584
+
585
+ .board-design-layout {
586
+ display: grid;
587
+ grid-template-columns: 220px minmax(0, 1fr);
588
+ gap: 14px;
589
+ align-items: start;
590
+ min-width: 0;
591
+ }
592
+
593
+ @media (max-width: 760px) {
594
+ .board-design-layout {
595
+ grid-template-columns: minmax(0, 1fr);
596
+ }
597
+ }
598
+
599
+ .board-design-index {
600
+ min-width: 0;
601
+ }
602
+
603
+ .board-design-index-list {
604
+ display: grid;
605
+ gap: 2px;
606
+ margin: 0;
607
+ padding: 0;
608
+ list-style: none;
609
+ }
610
+
611
+ .board-design-index-item {
612
+ display: flex;
613
+ align-items: baseline;
614
+ gap: 8px;
615
+ width: 100%;
616
+ padding: 8px 10px;
617
+ border: 1px solid transparent;
618
+ border-radius: var(--dpk-radius-sm);
619
+ background: transparent;
620
+ color: var(--dpk-ink-soft);
621
+ font: inherit;
622
+ font-size: 13px;
623
+ line-height: 1.5;
624
+ text-align: start;
625
+ cursor: pointer;
626
+ }
627
+
628
+ .board-design-index-item:hover {
629
+ background: var(--dpk-paper-sunken);
630
+ color: var(--dpk-ink);
631
+ }
632
+
633
+ .board-design-index-item:focus-visible {
634
+ outline: none;
635
+ box-shadow: var(--dpk-focus);
636
+ }
637
+
638
+ .board-design-index-item[aria-current='true'] {
639
+ border-color: var(--dpk-rule);
640
+ background: var(--dpk-paper-raised);
641
+ color: var(--dpk-ink);
642
+ font-weight: 650;
643
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
644
+ }
645
+
646
+ .board-design-index-title {
647
+ flex: 1 1 auto;
648
+ min-width: 0;
649
+ overflow-wrap: anywhere;
650
+ }
651
+
652
+ .board-design-index-count {
653
+ flex: 0 0 auto;
654
+ color: var(--dpk-ink-faint);
655
+ font-family: var(--dpk-mono);
656
+ font-size: 10.5px;
657
+ }
658
+
659
+ .board-design-detail {
660
+ min-width: 0;
661
+ }
662
+
663
+ /*
664
+ * A doc is the kit's card (the card atom), roomier for prose. Its title names
665
+ * it, so no edge is colored to tell it apart (a stripe along any edge says
666
+ * nothing the head does not; dev-docs/guidelines/coding.md).
667
+ */
668
+ .board-design {
669
+ --dpk-card-gap: 10px;
670
+ padding: 16px 18px;
671
+ }
672
+
673
+ .board-design-head {
674
+ display: flex;
675
+ align-items: flex-start;
676
+ justify-content: space-between;
677
+ gap: 8px;
678
+ }
679
+
680
+ .board-design-title {
681
+ margin: 0;
682
+ color: var(--dpk-ink);
683
+ font-size: 15px;
684
+ font-weight: 700;
685
+ line-height: 1.45;
686
+ }
687
+
688
+ .board-design-head .board-comment {
689
+ flex: 0 0 auto;
690
+ }
691
+
692
+ .board-design-body {
693
+ color: var(--dpk-ink);
694
+ font-size: 14px;
695
+ line-height: 1.7;
696
+ }
697
+
698
+ /* The prose atom is for a page; inside a card its headings come down a size. */
699
+ .board-design-body :where(h1, h2, h3, h4) {
700
+ margin-top: 1.1em;
701
+ color: var(--dpk-ink);
702
+ font-size: 13.5px;
703
+ font-weight: 700;
704
+ letter-spacing: 0;
705
+ text-transform: none;
706
+ }
707
+
708
+ .board-design-tasks {
709
+ display: grid;
710
+ gap: 6px;
711
+ padding-top: 10px;
712
+ border-top: 1px dashed var(--dpk-rule);
713
+ }
714
+
715
+ .board-design-tasks-title {
716
+ margin: 0;
717
+ color: var(--dpk-ink-soft);
718
+ font-size: 11px;
719
+ font-weight: 700;
720
+ letter-spacing: 0.04em;
721
+ text-transform: uppercase;
722
+ }
723
+
724
+ .board-design-task-list {
725
+ display: grid;
726
+ gap: 2px;
727
+ margin: 0;
728
+ padding: 0;
729
+ list-style: none;
730
+ }
731
+
732
+ .board-design-task {
733
+ display: flex;
734
+ align-items: center;
735
+ gap: 8px;
736
+ min-width: 0;
737
+ padding: 3px 0;
738
+ }
739
+
740
+ .board-design-task .board-todo-state {
741
+ flex: 0 0 auto;
742
+ }
743
+
744
+ .board-design-task-title {
745
+ min-width: 0;
746
+ color: var(--dpk-ink);
747
+ font-size: 13px;
748
+ line-height: 1.5;
749
+ }
750
+
751
+ .board-design-task[data-proposal='decline'] .board-design-task-title {
752
+ color: var(--dpk-ink-faint);
753
+ text-decoration: line-through;
754
+ }
755
+
756
+ .board-design-empty {
757
+ margin: 0;
758
+ color: var(--dpk-ink-faint);
759
+ font-size: 12px;
760
+ }
761
+
762
+ .board-design-figures {
763
+ display: grid;
764
+ gap: 14px;
765
+ min-width: 0;
766
+ }
767
+
768
+ .board-design-figures ::slotted(*) {
769
+ min-width: 0;
770
+ }
771
+
772
+ /* ----------------------------------------------------------- sections */
773
+
774
+ .board-section {
775
+ display: grid;
776
+ gap: 12px;
777
+ min-width: 0;
778
+ }
779
+
780
+ .board-rail-section {
781
+ gap: 6px;
782
+ }
783
+
784
+ .board-section-head {
785
+ display: flex;
786
+ align-items: baseline;
787
+ justify-content: space-between;
788
+ gap: 12px;
789
+ padding-bottom: 8px;
790
+ border-bottom: 1px solid var(--dpk-rule);
791
+ }
792
+
793
+ .board-section-head h2 {
794
+ margin: 0;
795
+ color: var(--dpk-ink);
796
+ font-size: 15px;
797
+ font-weight: 700;
798
+ letter-spacing: -0.01em;
799
+ }
800
+
801
+ /* The rail is narrow and always in view: its headings are labels, not breaks. */
802
+ .board-rail-section .board-section-head {
803
+ padding-bottom: 3px;
804
+ line-height: 1.3;
805
+ }
806
+
807
+ .board-rail-section .board-section-head h2 {
808
+ font-size: 11.5px;
809
+ text-transform: uppercase;
810
+ letter-spacing: 0.04em;
811
+ color: var(--dpk-ink-soft);
812
+ }
813
+
814
+ .board-section-meta {
815
+ color: var(--dpk-ink-faint);
816
+ font-size: 12px;
817
+ font-variant-numeric: tabular-nums;
818
+ }
819
+
820
+ .board-lede {
821
+ margin: -4px 0 0;
822
+ color: var(--dpk-ink-soft);
823
+ font-size: 12.5px;
824
+ }
825
+
826
+ .board-empty {
827
+ display: block;
828
+ max-width: none;
829
+ margin: 0;
830
+ padding: 12px 14px;
831
+ border-radius: var(--dpk-radius);
832
+ background: transparent;
833
+ font-size: 13px;
834
+ line-height: 1.5;
835
+ text-align: start;
836
+ }
837
+
838
+ .board-tag {
839
+ flex: 0 0 auto;
840
+ padding: 1px 7px;
841
+ border-radius: 999px;
842
+ font-size: 11px;
843
+ font-weight: 650;
844
+ line-height: 1.6;
845
+ white-space: nowrap;
846
+ }
847
+
848
+ .board-tag[data-tone='done'] {
849
+ background: var(--dpk-green-soft);
850
+ color: color-mix(in srgb, var(--dpk-green) 75%, var(--dpk-ink));
851
+ }
852
+
853
+ .board-tag[data-tone='new'] {
854
+ background: var(--dpk-accent-soft);
855
+ color: var(--dpk-accent-ink);
856
+ }
857
+
858
+ .board-tag[data-tone='changed'] {
859
+ background: var(--dpk-blue-soft);
860
+ color: color-mix(in srgb, var(--dpk-blue) 75%, var(--dpk-ink));
861
+ }
862
+
863
+ .board-tag[data-tone='design'] {
864
+ overflow: hidden;
865
+ background: var(--dpk-paper-sunken);
866
+ color: var(--dpk-ink-soft);
867
+ font-weight: 550;
868
+ text-overflow: ellipsis;
869
+ }
870
+
871
+ /* The doc a card belongs to sits on its own line: the title keeps the width. */
872
+ .board-card-design {
873
+ display: flex;
874
+ min-width: 0;
875
+ }
876
+
877
+ .board-card-design .board-tag {
878
+ max-width: 100%;
879
+ }
880
+
881
+ .board-tag[data-tone='muted'] {
882
+ background: var(--dpk-paper-inset);
883
+ color: var(--dpk-ink-soft);
884
+ }
885
+
886
+ .board-comment {
887
+ flex: 0 0 auto;
888
+ position: relative;
889
+ }
890
+
891
+ /* ---------------------------------------------------------- questions */
892
+
893
+ /* Blocking questions are red: the agent is waiting. The rest are amber: the
894
+ agent goes on under its assumption. Either turns green once replied to. */
895
+ .board-group {
896
+ --board-group-tone: var(--dpk-amber);
897
+ --board-group-soft: var(--dpk-amber-soft);
898
+ display: grid;
899
+ gap: 8px;
900
+ }
901
+
902
+ .board-group[data-group='blocking'] {
903
+ --board-group-tone: var(--dpk-danger);
904
+ --board-group-soft: var(--dpk-danger-soft);
905
+ }
906
+
907
+ .board-group-title {
908
+ display: flex;
909
+ align-items: center;
910
+ gap: 8px;
911
+ margin: 0;
912
+ color: color-mix(in srgb, var(--board-group-tone) 75%, var(--dpk-ink));
913
+ font-size: 12.5px;
914
+ font-weight: 700;
915
+ }
916
+
917
+ .board-group-title::before {
918
+ content: '';
919
+ width: 8px;
920
+ height: 8px;
921
+ border-radius: 50%;
922
+ background: var(--board-group-tone);
923
+ }
924
+
925
+ .board-group + .board-group {
926
+ margin-top: 6px;
927
+ }
928
+
929
+ .board-questions {
930
+ display: grid;
931
+ gap: 10px;
932
+ margin: 0;
933
+ padding: 0;
934
+ list-style: none;
935
+ }
936
+
937
+ /* A question is the kit's card (the card atom) in its group's tone: green once replied to. */
938
+ .board-question {
939
+ --dpk-card-tone: var(--board-group-tone);
940
+ --dpk-card-gap: 10px;
941
+ padding: 14px 16px;
942
+ }
943
+
944
+ .board-question[data-resolved='true'] {
945
+ --dpk-card-tone: var(--dpk-green);
946
+ }
947
+
948
+ .board-question-head {
949
+ gap: 10px;
950
+ }
951
+
952
+ .board-question-title {
953
+ margin: 0;
954
+ font-size: 14px;
955
+ font-weight: 650;
956
+ line-height: 1.5;
957
+ }
958
+
959
+ .board-question-text {
960
+ color: var(--dpk-ink-soft);
961
+ font-size: 13px;
962
+ line-height: 1.65;
963
+ white-space: pre-line;
964
+ }
965
+
966
+ .board-ref {
967
+ flex: 0 0 auto;
968
+ padding: 2px 7px;
969
+ border-radius: var(--dpk-radius-xs);
970
+ background: var(--board-group-soft);
971
+ color: color-mix(in srgb, var(--board-group-tone) 75%, var(--dpk-ink));
972
+ font-family: var(--dpk-mono);
973
+ font-size: 11.5px;
974
+ font-weight: 700;
975
+ line-height: 1.6;
976
+ }
977
+
978
+ .board-question[data-resolved='true'] .board-ref {
979
+ background: var(--dpk-green-soft);
980
+ color: color-mix(in srgb, var(--dpk-green) 75%, var(--dpk-ink));
981
+ }
982
+
983
+ .board-assumption {
984
+ display: grid;
985
+ gap: 3px;
986
+ padding: 9px 12px;
987
+ border-radius: var(--dpk-radius-sm);
988
+ background: var(--dpk-paper-sunken);
989
+ }
990
+
991
+ .board-assumption-label {
992
+ color: var(--dpk-ink-faint);
993
+ font-size: 11px;
994
+ font-weight: 700;
995
+ letter-spacing: 0.03em;
996
+ }
997
+
998
+ .board-assumption-text {
999
+ margin: 0;
1000
+ color: var(--dpk-ink);
1001
+ font-size: 13.5px;
1002
+ line-height: 1.55;
1003
+ white-space: pre-line;
1004
+ }
1005
+
1006
+ .board-question[data-reply='answer'] .board-assumption-text {
1007
+ color: var(--dpk-ink-faint);
1008
+ text-decoration: line-through;
1009
+ text-decoration-color: color-mix(in srgb, var(--dpk-ink-faint) 60%, transparent);
1010
+ }
1011
+
1012
+ .board-reply {
1013
+ display: flex;
1014
+ flex-wrap: wrap;
1015
+ gap: 8px;
1016
+ }
1017
+
1018
+ .board-approve svg {
1019
+ width: 14px;
1020
+ height: 14px;
1021
+ }
1022
+
1023
+ .board-approve[aria-pressed='true'] {
1024
+ border-color: var(--dpk-green);
1025
+ background: var(--dpk-green-soft);
1026
+ color: color-mix(in srgb, var(--dpk-green) 70%, var(--dpk-ink));
1027
+ }
1028
+
1029
+ .board-other[aria-pressed='true'] {
1030
+ border-color: color-mix(in srgb, var(--dpk-accent) 55%, var(--dpk-rule));
1031
+ background: var(--dpk-accent-soft);
1032
+ color: var(--dpk-accent-ink);
1033
+ }
1034
+
1035
+ .board-answer {
1036
+ width: 100%;
1037
+ box-sizing: border-box;
1038
+ resize: vertical;
1039
+ }
1040
+
1041
+ .board-answer[hidden] {
1042
+ display: none;
1043
+ }
1044
+
1045
+ /* -------------------------------------------------------------- tasks */
1046
+
1047
+ .board-tasks {
1048
+ display: grid;
1049
+ gap: 12px;
1050
+ min-width: 0;
1051
+ }
1052
+
1053
+ .board-tasks-bar {
1054
+ display: flex;
1055
+ flex-wrap: wrap;
1056
+ align-items: center;
1057
+ gap: 8px 16px;
1058
+ }
1059
+
1060
+ .board-tasks-progress {
1061
+ display: grid;
1062
+ flex: 1 1 240px;
1063
+ gap: 4px;
1064
+ min-width: 0;
1065
+ }
1066
+
1067
+ .board-tasks-progress-label {
1068
+ color: var(--dpk-ink-soft);
1069
+ font-size: 12.5px;
1070
+ font-weight: 600;
1071
+ font-variant-numeric: tabular-nums;
1072
+ }
1073
+
1074
+ .board-progress {
1075
+ height: 6px;
1076
+ border-radius: 999px;
1077
+ background: var(--dpk-rule);
1078
+ overflow: hidden;
1079
+ }
1080
+
1081
+ .board-progress-fill {
1082
+ display: block;
1083
+ height: 100%;
1084
+ border-radius: inherit;
1085
+ background: var(--dpk-green);
1086
+ transition: width 240ms var(--dpk-ease);
1087
+ }
1088
+
1089
+ /*
1090
+ * The board itself, drawn the way \`dpk-board-kanban\` draws one: lanes side by
1091
+ * side in reading order, taking an equal share of the column and scrolling
1092
+ * sideways on their own — never the page — once they no longer fit.
1093
+ */
1094
+ .board-kanban {
1095
+ display: flex;
1096
+ align-items: flex-start;
1097
+ gap: 12px;
1098
+ max-width: 100%;
1099
+ padding-bottom: 4px;
1100
+ overflow-x: auto;
1101
+ overscroll-behavior-x: contain;
1102
+ }
1103
+
1104
+ .board-lane {
1105
+ display: flex;
1106
+ flex: 1 1 232px;
1107
+ flex-direction: column;
1108
+ gap: 8px;
1109
+ min-width: 232px;
1110
+ max-width: 340px;
1111
+ padding: 10px;
1112
+ border: 1px solid var(--dpk-rule);
1113
+ border-radius: var(--dpk-radius-lg);
1114
+ background: var(--dpk-paper-sunken);
1115
+ box-shadow: inset 0 1px 3px var(--dpk-shade-1);
1116
+ }
1117
+
1118
+ /* The lane's own tone, from the shared \`data-tone\` map; grey has no entry there. */
1119
+ .board-lane[data-tone='gray'] {
1120
+ --tone: var(--dpk-ink-soft);
1121
+ --tone-soft: var(--dpk-paper-raised);
1122
+ }
1123
+
1124
+ /* Blocked reads red: the shared map names that tone \`danger\`, and the lane spells it \`red\`. */
1125
+ .board-lane[data-tone='red'] {
1126
+ --tone: var(--dpk-danger);
1127
+ --tone-soft: var(--dpk-danger-soft);
1128
+ }
1129
+
1130
+ .board-lane-head {
1131
+ display: flex;
1132
+ align-items: center;
1133
+ gap: 8px;
1134
+ padding: 0 2px;
1135
+ }
1136
+
1137
+ .board-lane-title {
1138
+ margin: 0;
1139
+ padding: 2px 9px;
1140
+ border-radius: 999px;
1141
+ background: color-mix(in srgb, var(--tone, var(--dpk-ink-soft)) 14%, transparent);
1142
+ color: var(--tone, var(--dpk-ink-soft));
1143
+ font-size: 12px;
1144
+ font-weight: 650;
1145
+ letter-spacing: 0.01em;
1146
+ white-space: nowrap;
1147
+ }
1148
+
1149
+ .board-lane-count {
1150
+ flex: none;
1151
+ margin-left: auto;
1152
+ padding: 1px 7px;
1153
+ border-radius: 999px;
1154
+ background: var(--dpk-paper-raised);
1155
+ color: var(--dpk-ink-soft);
1156
+ font-family: var(--dpk-mono);
1157
+ font-size: 11px;
1158
+ font-weight: 600;
1159
+ font-variant-numeric: tabular-nums;
1160
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
1161
+ }
1162
+
1163
+ .board-cards {
1164
+ display: flex;
1165
+ flex-direction: column;
1166
+ gap: 8px;
1167
+ min-height: 44px;
1168
+ margin: 0;
1169
+ padding: 0;
1170
+ list-style: none;
1171
+ }
1172
+
1173
+ .board-card-slot {
1174
+ min-width: 0;
1175
+ }
1176
+
1177
+ /* A todo is the kit's card (the card atom), tighter for a lane. */
1178
+ .board-card {
1179
+ --dpk-card-gap: 6px;
1180
+ padding: 10px 11px;
1181
+ overflow-wrap: anywhere;
1182
+ }
1183
+
1184
+ /* Only a todo a person has can be dragged: its status is the reader's to set. */
1185
+ .board-card[draggable='true'] {
1186
+ cursor: grab;
1187
+ }
1188
+
1189
+ .board-card[data-added='true'] {
1190
+ background: color-mix(in srgb, var(--dpk-accent) 6%, var(--dpk-paper-raised));
1191
+ }
1192
+
1193
+ .board-card[data-proposal='pending'] {
1194
+ --dpk-card-tone: var(--dpk-violet);
1195
+ }
1196
+
1197
+ .board-card[data-proposal='decline'] {
1198
+ background: var(--dpk-paper-sunken);
1199
+ }
1200
+
1201
+ .board-card[data-proposal='decline'] .board-card-title,
1202
+ .board-card[data-proposal='decline'] .board-reason {
1203
+ color: var(--dpk-ink-faint);
1204
+ }
1205
+
1206
+ .board-card[data-proposal='decline'] .board-card-title {
1207
+ text-decoration: line-through;
1208
+ }
1209
+
1210
+ .board-card[data-status='done'] .board-card-title {
1211
+ color: var(--dpk-ink-faint);
1212
+ text-decoration: line-through;
1213
+ text-decoration-color: color-mix(in srgb, var(--dpk-ink-faint) 60%, transparent);
1214
+ }
1215
+
1216
+ .board-card-head {
1217
+ display: flex;
1218
+ align-items: flex-start;
1219
+ gap: 6px;
1220
+ }
1221
+
1222
+ .board-card-title {
1223
+ flex: 1 1 auto;
1224
+ min-width: 0;
1225
+ font-size: 13px;
1226
+ line-height: 1.5;
1227
+ }
1228
+
1229
+ .board-card-tags {
1230
+ display: flex;
1231
+ flex: 0 0 auto;
1232
+ flex-wrap: wrap;
1233
+ gap: 4px;
1234
+ }
1235
+
1236
+ /* A proposal is not work yet: a question mark beside its title. */
1237
+ .board-card-mark {
1238
+ flex: none;
1239
+ display: grid;
1240
+ place-items: center;
1241
+ width: 16px;
1242
+ height: 16px;
1243
+ margin-top: 1px;
1244
+ border: 1.5px dashed var(--dpk-violet);
1245
+ border-radius: 50%;
1246
+ background: var(--dpk-violet-soft);
1247
+ color: var(--dpk-violet);
1248
+ font-size: 10.5px;
1249
+ font-weight: 800;
1250
+ line-height: 1;
1251
+ }
1252
+
1253
+ .board-card-mark[data-proposal='decline'] {
1254
+ border-color: var(--dpk-rule-strong);
1255
+ background: transparent;
1256
+ color: var(--dpk-ink-faint);
1257
+ }
1258
+
1259
+ .board-card-note,
1260
+ .board-reason {
1261
+ margin: 0;
1262
+ color: var(--dpk-ink-soft);
1263
+ font-size: 12px;
1264
+ line-height: 1.55;
1265
+ }
1266
+
1267
+ .board-reason-label {
1268
+ margin-right: 6px;
1269
+ padding: 0 5px;
1270
+ border-radius: var(--dpk-radius-xs);
1271
+ background: var(--dpk-violet-soft);
1272
+ color: var(--dpk-violet);
1273
+ font-size: 10.5px;
1274
+ font-weight: 700;
1275
+ }
1276
+
1277
+ .board-card-controls {
1278
+ display: flex;
1279
+ flex-wrap: wrap;
1280
+ align-items: center;
1281
+ gap: 6px;
1282
+ }
1283
+
1284
+ .board-card-controls .board-comment {
1285
+ margin-left: auto;
1286
+ }
1287
+
1288
+ /* A lane with nothing in it keeps its place, so the board's shape still says where the work is. */
1289
+ .board-lane-empty {
1290
+ margin: 0;
1291
+ padding: 10px 8px;
1292
+ border: 1px dashed var(--dpk-rule-strong);
1293
+ border-radius: var(--dpk-radius-sm);
1294
+ color: var(--dpk-ink-faint);
1295
+ font-size: 11.5px;
1296
+ text-align: center;
1297
+ }
1298
+
1299
+ /* ------------------------------------------------------ status / filter */
1300
+
1301
+ .board-todo-status {
1302
+ width: auto;
1303
+ min-width: 0;
1304
+ min-height: 26px;
1305
+ height: 26px;
1306
+ padding-top: 0;
1307
+ padding-bottom: 0;
1308
+ font-size: 12px;
1309
+ border-color: color-mix(in srgb, var(--board-tone) 45%, var(--dpk-rule));
1310
+ background-color: var(--board-tone-soft);
1311
+ color: var(--dpk-ink);
1312
+ font-weight: 600;
1313
+ }
1314
+
1315
+ /* The agent's own status: it reports it by rewriting the board. */
1316
+ .board-todo-state {
1317
+ display: inline-flex;
1318
+ align-items: center;
1319
+ height: 22px;
1320
+ padding: 0 8px;
1321
+ border-radius: 999px;
1322
+ background: var(--board-tone-soft);
1323
+ color: color-mix(in srgb, var(--board-tone) 75%, var(--dpk-ink));
1324
+ font-size: 11.5px;
1325
+ font-weight: 600;
1326
+ white-space: nowrap;
1327
+ }
1328
+
1329
+ .board-todo-state[data-status='todo'] {
1330
+ color: var(--dpk-ink-soft);
1331
+ }
1332
+
1333
+ .board-assignee {
1334
+ display: inline-flex;
1335
+ align-items: center;
1336
+ max-width: 140px;
1337
+ height: 22px;
1338
+ padding: 0 8px;
1339
+ border: 1px solid var(--dpk-rule);
1340
+ border-radius: 999px;
1341
+ color: var(--dpk-ink-soft);
1342
+ font-size: 11.5px;
1343
+ white-space: nowrap;
1344
+ overflow: hidden;
1345
+ text-overflow: ellipsis;
1346
+ }
1347
+
1348
+ .board-assignee::before {
1349
+ content: '@';
1350
+ margin-right: 1px;
1351
+ color: var(--dpk-ink-faint);
1352
+ }
1353
+
1354
+ .board-assignee[data-kind='human'] {
1355
+ border-color: color-mix(in srgb, var(--dpk-violet) 35%, var(--dpk-rule));
1356
+ background: var(--dpk-violet-soft);
1357
+ color: var(--dpk-violet);
1358
+ font-weight: 600;
1359
+ }
1360
+
1361
+ .board-assignee[data-kind='human']::before {
1362
+ color: inherit;
1363
+ }
1364
+
1365
+ .board-filter {
1366
+ display: inline-flex;
1367
+ gap: 2px;
1368
+ padding: 2px;
1369
+ border: 1px solid var(--dpk-rule);
1370
+ border-radius: var(--dpk-radius-sm);
1371
+ background: var(--dpk-paper-sunken);
1372
+ }
1373
+
1374
+ .board-tasks-bar .board-filter {
1375
+ margin-left: auto;
1376
+ }
1377
+
1378
+ .board-filter-option {
1379
+ display: inline-flex;
1380
+ align-items: center;
1381
+ gap: 5px;
1382
+ padding: 3px 10px;
1383
+ border: 0;
1384
+ border-radius: var(--dpk-radius-xs);
1385
+ background: transparent;
1386
+ color: var(--dpk-ink-soft);
1387
+ font: inherit;
1388
+ font-size: 12px;
1389
+ cursor: pointer;
1390
+ }
1391
+
1392
+ .board-filter-option:hover {
1393
+ color: var(--dpk-ink);
1394
+ }
1395
+
1396
+ .board-filter-option:focus-visible {
1397
+ outline: none;
1398
+ box-shadow: var(--dpk-focus);
1399
+ }
1400
+
1401
+ .board-filter-option[aria-pressed='true'] {
1402
+ background: var(--dpk-paper-raised);
1403
+ color: var(--dpk-ink);
1404
+ font-weight: 650;
1405
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
1406
+ }
1407
+
1408
+ .board-filter-count {
1409
+ font-family: var(--dpk-mono);
1410
+ font-size: 10.5px;
1411
+ color: var(--dpk-violet);
1412
+ }
1413
+
1414
+ .board-decision {
1415
+ display: flex;
1416
+ gap: 6px;
1417
+ }
1418
+
1419
+ .board-decide,
1420
+ .board-undo {
1421
+ min-height: 26px;
1422
+ height: 26px;
1423
+ padding: 0 10px;
1424
+ font-size: 12px;
1425
+ }
1426
+
1427
+ .board-decide[data-decision='accept'] {
1428
+ border-color: color-mix(in srgb, var(--dpk-green) 50%, var(--dpk-rule));
1429
+ color: color-mix(in srgb, var(--dpk-green) 70%, var(--dpk-ink));
1430
+ }
1431
+
1432
+ .board-decide[data-decision='accept']:hover {
1433
+ background: var(--dpk-green-soft);
1434
+ }
1435
+
1436
+ .board-add-todo {
1437
+ display: grid;
1438
+ gap: 6px;
1439
+ }
1440
+
1441
+ .board-add-row {
1442
+ display: flex;
1443
+ gap: 6px;
1444
+ }
1445
+
1446
+ .board-add-assignee {
1447
+ flex: 1 1 auto;
1448
+ width: auto;
1449
+ min-width: 0;
1450
+ }
1451
+
1452
+ .board-add-submit {
1453
+ flex: 0 0 auto;
1454
+ }
1455
+
1456
+ /* A phone shows one lane and a hint of the next: the board still scrolls sideways, never the page. */
1457
+ @media (max-width: 640px) {
1458
+ .board-lane {
1459
+ flex-basis: 208px;
1460
+ min-width: 208px;
1461
+ }
1462
+ }
1463
+
1464
+ /* ------------------------------------------------------------ outputs */
1465
+
1466
+ .board-outputs {
1467
+ display: grid;
1468
+ margin: 0;
1469
+ padding: 0;
1470
+ list-style: none;
1471
+ border: 1px solid var(--dpk-rule);
1472
+ border-radius: var(--dpk-radius);
1473
+ background: var(--dpk-paper-raised);
1474
+ box-shadow: var(--dpk-shadow-xs);
1475
+ overflow: hidden;
1476
+ }
1477
+
1478
+ .board-output {
1479
+ grid-template-columns: minmax(0, 1fr) auto;
1480
+ gap: 8px;
1481
+ padding: 6px 6px 6px 10px;
1482
+ border-radius: 0;
1483
+ border-top: 1px solid var(--dpk-rule);
1484
+ }
1485
+
1486
+ .board-output:first-child {
1487
+ border-top: 0;
1488
+ }
1489
+
1490
+ .board-output-body {
1491
+ display: grid;
1492
+ gap: 1px;
1493
+ min-width: 0;
1494
+ }
1495
+
1496
+ .board-output-head {
1497
+ display: flex;
1498
+ align-items: baseline;
1499
+ gap: 6px;
1500
+ min-width: 0;
1501
+ }
1502
+
1503
+ .board-kind {
1504
+ flex: 0 0 auto;
1505
+ padding: 0 5px;
1506
+ border-radius: var(--dpk-radius-xs);
1507
+ background: var(--dpk-paper-sunken);
1508
+ color: var(--dpk-ink-soft);
1509
+ font-family: var(--dpk-mono);
1510
+ font-size: 10px;
1511
+ font-weight: 700;
1512
+ line-height: 1.7;
1513
+ text-transform: uppercase;
1514
+ letter-spacing: 0.04em;
1515
+ }
1516
+
1517
+ .board-output-link,
1518
+ .board-output-label,
1519
+ .board-output-head .board-output-path {
1520
+ min-width: 0;
1521
+ overflow: hidden;
1522
+ text-overflow: ellipsis;
1523
+ white-space: nowrap;
1524
+ color: var(--dpk-ink);
1525
+ font-size: 13px;
1526
+ font-weight: 600;
1527
+ }
1528
+
1529
+ .board-output-link {
1530
+ text-decoration: none;
1531
+ }
1532
+
1533
+ .board-output-link:hover {
1534
+ color: var(--dpk-blue);
1535
+ text-decoration: underline;
1536
+ }
1537
+
1538
+ .board-output-link:focus-visible {
1539
+ outline: none;
1540
+ border-radius: var(--dpk-radius-xs);
1541
+ box-shadow: var(--dpk-focus);
1542
+ }
1543
+
1544
+ .board-output-path {
1545
+ font-family: var(--dpk-mono);
1546
+ font-size: 12px;
1547
+ }
1548
+
1549
+ .board-output-head .board-output-path {
1550
+ font-size: 12px;
1551
+ }
1552
+
1553
+ .board-output-sub {
1554
+ overflow: hidden;
1555
+ text-overflow: ellipsis;
1556
+ white-space: nowrap;
1557
+ color: var(--dpk-ink-faint);
1558
+ font-family: var(--dpk-mono);
1559
+ font-size: 11px;
1560
+ font-weight: 400;
1561
+ }
1562
+
1563
+ .board-output-text {
1564
+ margin: 2px 0 0;
1565
+ color: var(--dpk-ink-soft);
1566
+ font-size: 12px;
1567
+ line-height: 1.5;
1568
+ }
1569
+
1570
+ .board-copy[data-copied='true'] {
1571
+ color: var(--dpk-green);
1572
+ }
1573
+
1574
+ @media (prefers-reduced-motion: reduce) {
1575
+ .board-status[data-status='working']::before {
1576
+ animation: none;
1577
+ }
1578
+
1579
+ .board-progress-fill {
1580
+ transition: none;
1581
+ }
1582
+
1583
+ .board-panel {
1584
+ animation: none;
1585
+ }
1586
+ }
1587
+ `,Ga=1500;class Ae extends X{static{this.styles=[X.styles,Ye,Ra]}static{this.properties={tab:{state:!0},todoFilter:{state:!0},selectedDesign:{state:!0}}}#a=null;#t=null;#o;#e=null;#s=new Ke(this);constructor(){super(),this.tab="designs",this.todoFilter="all",this.selectedDesign=null}get sidebarLayout(){return{side:"left",defaultWidth:288,narrow:"drawer"}}definitionFor(e){return Te(e)}showTarget(e){switch(e.type){case"design":this.tab="designs",this.selectedDesign=e.id;return;case"question":this.tab="questions";return;case"todo":this.tab="tasks",this.todoFilter="all";return}}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.#o)}renderRegions(e){const t=U(this.locale),s=c=>e.commentCount(c),o=me(e.state,s),r=this.#n(),i=this.tab;return{header:this.#d(t,e.state),sidebar:d`<div class="board-rail">
1588
+ ${wa(t,$e(e.state),this.#t,r)}
1589
+ </div>`,main:d`
1590
+ <div class="board">
1591
+ ${Oa(t,i,{questions:o.open,alert:o.blockingOpen>0},c=>{this.tab=c},c=>this.#r(c))}
1592
+ ${H("designs",i,ga(t,ve(t,e.state,s,this.selectedDesign),r))}
1593
+ ${H("questions",i,o.total===0?d`<p class="dpk-empty board-empty" data-variant="dashed">${t.noQuestions}</p>`:ma(t,o,r))}
1594
+ ${H("tasks",i,Sa(t,xe(t,e.state,e.base,s,this.todoFilter),r,this.#s))}
1595
+ </div>
1596
+ `}}updated(){super.updated();const e=this.#a;e!==null&&(this.#a=null,this.renderRoot.querySelector(`[data-answer-text="${e}"]`)?.focus())}#r(e){const t=ya(this.tab,e.key);t!==null&&(e.preventDefault(),this.tab=t,this.updateComplete.then(()=>this.renderRoot.querySelector(`[data-tab="${t}"]`)?.focus()))}#d(e,t){return t.status===null?n:d`<span class="dpk-status board-status board-status--header" data-status=${t.status}>
1597
+ ${ra(e,t.status)}
1598
+ </span>`}#n(){return{answer:(e,t)=>this.#l(e,t),answerOther:e=>this.#p(e),decide:(e,t)=>this.dispatch(ie(e,t)),selectDesign:e=>{this.selectedDesign=e},setStatus:(e,t)=>this.dispatch(Q(e,t)),filterTodos:e=>{this.todoFilter=e},addTodo:(e,t)=>this.#c(e,t),deleteTodo:e=>this.dispatch(pe(e)),beginTodoDrag:e=>{this.#e=e},endTodoDrag:()=>{this.#e=null},allowTodoDrop:e=>{this.#e!==null&&e.preventDefault()},dropTodo:e=>this.#i(e),copy:(e,t)=>{this.#u(e,t)},comment:e=>this.requestComment(e)}}#i(e){const t=this.#e;if(this.#e=null,t===null)return;const{state:s}=this.derivation,o=h(s,t);o===void 0||o.status===e||!C(s,o)||this.dispatch(Q(t,e))}#l(e,t){this.dispatch(I(e,t))}#p(e){this.dispatch(I(e,{kind:"answer",text:""})).ok&&(this.#a=e)}#c(e,t){const{base:s,state:o}=this.derivation,r=[...s.todos,...o.todos].map(i=>i.id);this.dispatch(le(Fe(e,r),e,t))}async#u(e,t){await je(t)&&(clearTimeout(this.#o),this.#t=e,this.requestUpdate(),this.#o=setTimeout(()=>{this.#t=null,this.requestUpdate()},Ga))}}const Se=()=>{Je(),customElements.get("dpk-view-task-board")||customElements.define("dpk-view-task-board",Ae)},Ia=Object.freeze(Object.defineProperty({__proto__:null,DpkViewTaskBoard:Ae,MEMBER_KINDS:ee,TASK_BOARD_PAGE:ne,TASK_STATUSES:Z,TODO_STATUSES:D,addTodo:le,answerQuestion:I,applyTaskBoardAction:ce,decideProposal:ie,defineTaskBoardElement:Se,deleteTodo:pe,describeTaskBoardAction:ge,emptyTaskBoardBase:oe,isAnswered:re,isHumanTodo:C,isPlanned:R,outputLocation:we,parseTaskBoardBase:te,presentDesigns:ve,presentOutputs:$e,presentQuestions:me,presentTasks:xe,resolveTaskBoardNavigation:fe,serializeTaskBoardAction:ke,setTodoStatus:Q,taskBoardActions:f,taskBoardBaseSchema:ae,taskBoardCommentTargets:he,taskBoardDefinitionFor:Te,taskBoardHasTarget:ye,taskBoardMessages:U,taskBoardTitle:ue,taskPageTargetLabel:be},Symbol.toStringTag,{value:"Module"}));export{Se as d,Ia as i};