@fapost/jig-ui 0.3.0-next.39 → 0.3.0-next.42
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/dist/board/columns.js +9 -1
- package/dist/http/app.js +6 -0
- package/dist/jig/client.js +22 -1
- package/dist/source/local.js +15 -7
- package/dist/web/assets/CanvasView-BJDHS-XA.js +1 -0
- package/dist/web/assets/{index-DNFgC6Vp.js → index-CM4NE8d0.js} +2 -2
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/CanvasView-C5ctZB7z.js +0 -1
package/dist/board/columns.js
CHANGED
|
@@ -32,10 +32,18 @@ function byQueue(a, b) {
|
|
|
32
32
|
return x === null ? -1 : y === null ? 1 : x < y ? -1 : 1;
|
|
33
33
|
return a.queue.position - b.queue.position;
|
|
34
34
|
}
|
|
35
|
+
/** After a resume only `paused` changes, so the rules say where the task lands. */
|
|
36
|
+
const card = (task) => ({ ...task, resumesTo: task.resumable ? columnOf({ ...task, paused: false }) : null });
|
|
35
37
|
/**
|
|
36
38
|
* The board: every column, in a fixed order, its cards in Jig's queue order and the tasks not queued after them in the
|
|
37
39
|
* order Jig listed them (the sort is stable). Computed on every read, never stored.
|
|
38
40
|
*/
|
|
39
41
|
export function columns(tasks) {
|
|
40
|
-
return COLUMNS.map((c) => ({
|
|
42
|
+
return COLUMNS.map((c) => ({
|
|
43
|
+
...c,
|
|
44
|
+
cards: tasks
|
|
45
|
+
.filter((t) => columnOf(t) === c.id)
|
|
46
|
+
.sort(byQueue)
|
|
47
|
+
.map(card),
|
|
48
|
+
}));
|
|
41
49
|
}
|
package/dist/http/app.js
CHANGED
|
@@ -143,6 +143,12 @@ function apiRoutes(source, version) {
|
|
|
143
143
|
if (task === undefined || revision === undefined)
|
|
144
144
|
return refuse(c, 422, 'usage', 'Give a task and the revision it was read at.');
|
|
145
145
|
return written(c, await source.cancelPause(c.req.param('id'), task, revision));
|
|
146
|
+
})
|
|
147
|
+
.post('/api/projects/:id/tasks/resume', validator('json', taskAt), async (c) => {
|
|
148
|
+
const { task, revision } = c.req.valid('json');
|
|
149
|
+
if (task === undefined || revision === undefined)
|
|
150
|
+
return refuse(c, 422, 'usage', 'Give a task and the revision it was read at.');
|
|
151
|
+
return written(c, await source.resume(c.req.param('id'), task, revision));
|
|
146
152
|
})
|
|
147
153
|
// A new task carries no revision: it writes nothing that exists (adr-20261022-filing-a-task-carries-no-revision).
|
|
148
154
|
.post('/api/projects/:id/tasks', validator('json', (body) => {
|
package/dist/jig/client.js
CHANGED
|
@@ -6,6 +6,8 @@ import { z } from 'zod';
|
|
|
6
6
|
const run = promisify(execFile);
|
|
7
7
|
/** The oldest Jig Jig UI reads and writes: 0.29.0 is the first that prints JSON, 0.31.0 the first with a queue. */
|
|
8
8
|
export const MIN_JIG_VERSION = '0.31.0';
|
|
9
|
+
/** The first Jig whose `task resume` takes `--revision` and `--json` (fapost-lab/jig#295). */
|
|
10
|
+
export const RESUME_JIG_VERSION = '0.35.0';
|
|
9
11
|
const SCRIPT = '.ai/scripts/jig';
|
|
10
12
|
const TIMEOUT_MS = 10_000;
|
|
11
13
|
/** The directory whose changes may change what Jig reports: the main checkout's `.ai/`. */
|
|
@@ -72,7 +74,18 @@ export class JigRefusal extends Error {
|
|
|
72
74
|
this.code = code;
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
|
-
const CODES = new Set([
|
|
77
|
+
const CODES = new Set([
|
|
78
|
+
'usage',
|
|
79
|
+
'not-a-repository',
|
|
80
|
+
'not-initialised',
|
|
81
|
+
'stale-revision',
|
|
82
|
+
'not-found',
|
|
83
|
+
'already-exists',
|
|
84
|
+
'not-paused',
|
|
85
|
+
'wrong-checkout',
|
|
86
|
+
'stash-conflict',
|
|
87
|
+
'failed',
|
|
88
|
+
]);
|
|
76
89
|
/** Jig answered in a shape this Jig UI does not read: a Jig newer than the contract its tests pin. */
|
|
77
90
|
export class JigShapeError extends Error {
|
|
78
91
|
constructor() {
|
|
@@ -326,6 +339,14 @@ export async function requestPause(root, task, revision, platform = process.plat
|
|
|
326
339
|
export async function cancelPause(root, task, revision, platform = process.platform) {
|
|
327
340
|
await readJson(root, ['queue', 'cancel', `task:${task}`, 'pause', '--revision', String(revision)], platform);
|
|
328
341
|
}
|
|
342
|
+
/**
|
|
343
|
+
* Resumes a paused task (`jig task resume <id>`), in the main checkout. Refused as `not-paused`; `wrong-checkout` when
|
|
344
|
+
* the pause kept a stash and the checkout is not on the task's branch; `stash-conflict` when that stash does not apply,
|
|
345
|
+
* the task still paused; and as `moveInQueue` is. Applied, a stash is back in the checkout, as the terminal's resume.
|
|
346
|
+
*/
|
|
347
|
+
export async function resumeTask(root, task, revision, platform = process.platform) {
|
|
348
|
+
await readJson(root, ['task', 'resume', task, '--revision', String(revision)], platform);
|
|
349
|
+
}
|
|
329
350
|
/**
|
|
330
351
|
* Files a task with only its goal (`jig task new <id> --goal <text>`); refused as `already-exists` when the id is
|
|
331
352
|
* taken — by a finished task too — and `usage` for an id or goal Jig does not take. No revision: it writes nothing
|
package/dist/source/local.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { cancelPause, fileTask, JigRefusal, JigShapeError, jigVersion, MIN_JIG_VERSION, moveInQueue, readQueue, readSpecs, readStatus, readTasks, requestPause, setPriority, supports, watchDir, writtenByReads, } from '../jig/client.js';
|
|
2
|
+
import { cancelPause, fileTask, JigRefusal, JigShapeError, jigVersion, MIN_JIG_VERSION, moveInQueue, readQueue, readSpecs, readStatus, readTasks, requestPause, RESUME_JIG_VERSION, resumeTask, setPriority, supports, watchDir, writtenByReads, } from '../jig/client.js';
|
|
3
3
|
import { addProject, readProjects, removeProject } from '../registry/projects.js';
|
|
4
4
|
import { watchTree } from '../watch/watch.js';
|
|
5
5
|
import { mainCheckout } from './checkout.js';
|
|
@@ -41,8 +41,11 @@ const gone = (t) => ({
|
|
|
41
41
|
updatedAt: t.updatedAt,
|
|
42
42
|
pullRequest: t.pullRequest && { url: t.pullRequest.url, state: t.pullRequest.state },
|
|
43
43
|
});
|
|
44
|
-
/**
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* A live task as a board's card shows it, with its place in the queue if it has one; `resumes` when the project's Jig
|
|
46
|
+
* takes `task resume --revision`.
|
|
47
|
+
*/
|
|
48
|
+
const card = (t, q, resumes) => ({
|
|
46
49
|
id: t.id,
|
|
47
50
|
class: t.class,
|
|
48
51
|
status: t.status,
|
|
@@ -50,6 +53,7 @@ const card = (t, q) => ({
|
|
|
50
53
|
paused: t.paused,
|
|
51
54
|
pauseRequest: t.pauseRequest,
|
|
52
55
|
pauseRequestable: t.actions.some((a) => a.id === 'request-pause' && a.offered),
|
|
56
|
+
resumable: resumes && t.actions.some((a) => a.id === 'resume' && a.offered),
|
|
53
57
|
started: t.branch !== null,
|
|
54
58
|
gate: t.gate?.state ?? null,
|
|
55
59
|
autopilot: t.autopilot?.state ?? null,
|
|
@@ -58,8 +62,8 @@ const card = (t, q) => ({
|
|
|
58
62
|
queue: q ? { level: q.level, position: q.position } : null,
|
|
59
63
|
});
|
|
60
64
|
/** A live task in full; where its worktree is was never read, and an action Jig refuses is left out. */
|
|
61
|
-
const details = (t, q, attention) => ({
|
|
62
|
-
...card(t, q),
|
|
65
|
+
const details = (t, q, attention, resumes) => ({
|
|
66
|
+
...card(t, q, resumes),
|
|
63
67
|
issue: t.issue,
|
|
64
68
|
branch: t.branch,
|
|
65
69
|
baseBranch: t.baseBranch,
|
|
@@ -116,6 +120,7 @@ async function readProject(project) {
|
|
|
116
120
|
const queued = new Map(queue.items.map((q) => [q.id, q]));
|
|
117
121
|
// The oldest of the reads the board is made of: a write against it is refused if anything was written after any of them.
|
|
118
122
|
const revision = Math.min(status.revision, list.revision, queue.revision);
|
|
123
|
+
const resumes = supports(jigVersion, RESUME_JIG_VERSION);
|
|
119
124
|
return {
|
|
120
125
|
view: {
|
|
121
126
|
id: project.id,
|
|
@@ -125,8 +130,8 @@ async function readProject(project) {
|
|
|
125
130
|
attention: status.attention,
|
|
126
131
|
housekeepingStale: status.housekeepingStale,
|
|
127
132
|
},
|
|
128
|
-
tasks: { state: 'ready', tasks: live.map((t) => card(t, queued.get(t.id))), finished: finished.map(gone), revision },
|
|
129
|
-
details: live.map((t) => details(t, queued.get(t.id), status.attention)),
|
|
133
|
+
tasks: { state: 'ready', tasks: live.map((t) => card(t, queued.get(t.id), resumes)), finished: finished.map(gone), revision },
|
|
134
|
+
details: live.map((t) => details(t, queued.get(t.id), status.attention, resumes)),
|
|
130
135
|
specs: { state: 'ready', specs },
|
|
131
136
|
revision,
|
|
132
137
|
};
|
|
@@ -330,6 +335,9 @@ export function localSource(configDir, { rescanMs = 60_000, quietMs, maxWaitMs }
|
|
|
330
335
|
cancelPause(id, taskId, revision) {
|
|
331
336
|
return writing(id, [taskId], (root) => cancelPause(root, taskId, revision));
|
|
332
337
|
},
|
|
338
|
+
resume(id, taskId, revision) {
|
|
339
|
+
return writing(id, [taskId], (root) => resumeTask(root, taskId, revision));
|
|
340
|
+
},
|
|
333
341
|
fileTask(id, taskId, goal) {
|
|
334
342
|
// A new id names no live task: Jig itself refuses a taken one.
|
|
335
343
|
return writing(id, [], (root) => fileTask(root, taskId, goal));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as ee,I as te,J as c,K as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as ne,T as _,U as v,V as y,W as b,X as x,Y as S,Z as C,_ as re,a as ie,b as w,c as ae,d as oe,et as T,f as E,g as se,h as D,i as O,j as k,k as ce,l as le,m as A,n as j,nt as M,o as N,p as ue,q as de,r as fe,s as pe,t as me,tt as he,u as P,v as ge,w as F,x as I,y as L,z as R}from"./index-CM4NE8d0.js";var _e=l({__name:`BaseSeparator`,props:{orientation:{type:String,required:!1,default:`horizontal`},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){let n=t,r=[`horizontal`,`vertical`];function i(e){return r.includes(e)}let a=R(()=>i(n.orientation)?n.orientation:`horizontal`),o=R(()=>a.value===`vertical`?n.orientation:void 0),s=R(()=>n.decorative?{role:`none`}:{"aria-orientation":o.value,role:`separator`});return(n,r)=>(S(),y(e(d),c({as:t.as,"as-child":t.asChild,"data-orientation":a.value},s.value),{default:h(()=>[C(n.$slots,`default`)]),_:3},16,[`as`,`as-child`,`data-orientation`]))}}),ve=l({__name:`Separator`,props:{orientation:{type:String,required:!1,default:`horizontal`},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(S(),y(_e,he(de(t)),{default:h(()=>[C(e.$slots,`default`)]),_:3},16))}}),ye=l({__name:`CardContent`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t;return(t,r)=>(S(),v(`div`,{"data-slot":`card-content`,class:T(e(f)(`px-4 group-data-[size=sm]/card:px-3`,n.class))},[C(t.$slots,`default`)],2))}}),be=l({__name:`CardDescription`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t;return(t,r)=>(S(),v(`div`,{"data-slot":`card-description`,class:T(e(f)(`text-xs/relaxed text-muted-foreground`,n.class))},[C(t.$slots,`default`)],2))}}),xe=l({__name:`CardHeader`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t;return(t,r)=>(S(),v(`div`,{"data-slot":`card-header`,class:T(e(f)(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-none px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,n.class))},[C(t.$slots,`default`)],2))}}),Se=l({__name:`CardTitle`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t;return(t,r)=>(S(),v(`div`,{"data-slot":`card-title`,class:T(e(f)(`cn-font-heading text-sm font-medium group-data-[size=sm]/card:text-sm`,n.class))},[C(t.$slots,`default`)],2))}}),z=l({__name:`Separator`,props:{orientation:{default:`horizontal`},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t,r=p(n,`class`);return(t,i)=>(S(),y(e(ve),c({"data-slot":`separator`},e(r),{class:e(f)(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,n.class)}),null,16,[`class`]))}}),Ce=[`aria-label`],we={class:`flex items-baseline gap-3 border-b bg-muted/50 px-4 py-2`},Te={class:`font-semibold tracking-wider uppercase`},Ee={key:0,class:`text-muted-foreground`},B={class:`grid grid-cols-1 divide-y lg:grid-cols-2 lg:divide-x lg:divide-y-0`},V=l({__name:`CanvasSection`,props:{title:{},note:{}},setup(e){return(t,r)=>(S(),v(`section`,{"aria-label":e.title,class:`border-b`},[n(`h2`,we,[n(`span`,Te,M(e.title),1),e.note?(S(),v(`span`,Ee,M(e.note),1)):ee(``,!0)]),n(`div`,B,[(S(),v(g,null,x([`light`,`dark`],e=>n(`div`,{key:e,class:T([e,`flex flex-col gap-4 bg-background p-4 text-foreground`])},[C(t.$slots,`default`)],2)),64))])],8,Ce))}}),H=(e,t)=>({id:e,class:`T2`,status:`active`,goal:null,paused:!1,pauseRequest:null,pauseRequestable:!0,resumable:!1,resumesTo:null,started:!0,gate:null,autopilot:null,pullRequest:null,priority:null,queue:null,...t}),U=(e,t)=>({url:`https://github.com/fapost-lab/jig-ui/pull/18`,state:e,ci:t,fetchedAt:`2026-10-18T09:40:00Z`}),W=[H(`design-system`,{class:`T3`,gate:`waiting`,priority:0,queue:{level:null,position:100},goal:`shadcn-vue on Tailwind v4 with light and dark themes; #/canvas with every component in every variant; the three screens rebuilt on it.`}),H(`registry-schema`,{gate:`changed`,priority:3,queue:{level:null,position:200},goal:`Version the registry file so a newer Jig UI can read an older one.`}),H(`pause-request`,{class:`T3`,autopilot:`stopped`,goal:`A drop on the paused column writes a sticky request through Jig; the card shows it with its age and a cancel.`}),H(`specs-and-epics`,{autopilot:`on`,queue:{level:null,position:300},goal:`Show each spec with its phases, progress and epic branch beside the board, from Jig's spec list.`}),H(`task-details`,{status:`ready`,pullRequest:U(`open`,`green`),goal:`Open a task's details from its card.`}),H(`refusal-fixture`,{class:`T0`,status:`ready`,pullRequest:U(`open`,`red`),goal:`Replace the refusal text in task-list-states.json with one Jig prints.`}),H(`docs-board`,{class:`T1`,status:`ready`,pullRequest:U(`open`,`pending`),goal:`Describe the five columns on the projects page of the docs.`}),H(`live-updates`,{status:`ready`,pullRequest:U(`merged`,`none`),goal:`Follow connected projects without a reload.`}),H(`no-pr-yet`,{class:`T1`,status:`ready`,goal:`Ready, nothing pushed.`}),H(`jig-init-hook`,{class:`T3`,paused:!0,pauseRequestable:!1,goal:`Register a project in an installed Jig UI from jig init.`}),H(`file-backlog-task`,{class:null,started:!1,goal:`File a minimal backlog task from the page through jig task new.`}),H(`a-task-with-a-rather-long-identifier-that-wraps`,{goal:null}),H(`conflict-display`,{pauseRequest:{requestedAt:`2026-10-22T09:00:00Z`},pauseRequestable:!1,goal:`Show what changed when a write was based on a stale read.`}),H(`resume-from-page`,{class:`T3`,paused:!0,pauseRequestable:!1,resumable:!0,resumesTo:`in-progress`,goal:`A drop out of Paused, or the card menu, resumes the task through jig task resume.`})],G=[{id:`needs-you`,title:`Needs you`,cards:W.slice(0,3)},{id:`in-progress`,title:`In progress`,cards:[W[3],W[12],W[11]]},{id:`ready`,title:`Ready`,cards:W.slice(4,9)},{id:`backlog`,title:`Backlog`,cards:[W[10]]},{id:`paused`,title:`Paused`,cards:[W[9],W[13]]}],K=G.map(e=>({...e,cards:[]})),De=[{id:`file-backlog-task`,status:`consolidated`,goal:`File a minimal backlog task from the page.`,updatedAt:`2026-10-25`,pullRequest:{url:`https://github.com/fapost-lab/jig-ui/pull/40`,state:`merged`}},{id:`pr-template`,status:`abandoned`,goal:`A pull request template.`,updatedAt:`2026-10-17`,pullRequest:null},{id:`old-spike`,status:`abandoned`,goal:null,updatedAt:`2026-10-12`,pullRequest:null}],Oe=[{id:`needs-you`,title:`Needs you`,count:3},{id:`in-progress`,title:`In progress`,count:1},{id:`ready`,title:`Ready`,count:5},{id:`backlog`,title:`Backlog`,count:1},{id:`paused`,title:`Paused`,count:1},{id:`unknown`,title:`A column this page does not know`,count:0}],q=[{kind:`gate`,subject:{type:`task`,id:`design-system`},tasks:[`design-system`],title:`Design waits at its gate`,detail:null,todo:`Review the design and approve it: jig task gate design-system approved`,url:null},{kind:`pull-request-ci-failed`,subject:{type:`task`,id:`refusal-fixture`},tasks:[`refusal-fixture`],title:`CI failed`,detail:`pull request #19`,todo:`Look at the failing check.`,url:`https://github.com/fapost-lab/jig-ui/pull/19`},{kind:`housekeeping`,subject:{type:`project`,id:null},tasks:[],title:`Housekeeping never ran`,detail:null,todo:`Run jig housekeeping.`,url:`https://example.com/docs`}],J=[{id:`approve-gate`,command:`jig task gate design-system approved`},{id:`answer-stop`,command:`jig task autopilot pause-request resume --answer <text>`},{id:`pause`,command:`jig task pause design-system`},{id:`request-pause`,command:`jig queue request task:design-system pause`},{id:`something-new`,command:`jig task something-new design-system`}],Y={state:`ready`,issue:null,baseBranch:`main`,createdAt:`2026-10-17`,updatedAt:`2026-10-18`,knowledgeConsolidated:!1,worktree:null,gateBy:null,run:null,housekeepingFlags:[],attention:[]},X=[{...Y,...W[2],gate:`approved`,gateBy:`human`,branch:`task/pause-request`,worktree:{uncommitted:4},issue:`#42`,pullRequest:U(`open`,`red`),run:{mode:`attended`,stage:`implement`,stageAt:`2026-10-18T09:00:00Z`,stopReason:`Which column takes a paused task that already has an open pull request?`,stopAt:`2026-10-18T09:12:00Z`,phase:null},housekeepingFlags:[`needs-consolidation`],attention:[q[0]],actions:J,column:{id:`needs-you`,title:`Needs you`}},{...Y,...W[10],branch:null,actions:[{id:`start`,command:`jig task start file-backlog-task`}],column:{id:`backlog`,title:`Backlog`}}],Z=(e,t={})=>({id:e,state:`ready`,jigVersion:`0.29.0`,counts:{active:11,paused:1,ready:3},attention:[],housekeepingStale:!1,...t}),Q=[Z(`jig-ui`,{attention:q,housekeepingStale:!0}),Z(`nextjs-store`,{counts:{active:0,paused:0,ready:0}}),{id:`old-jig`,state:`unsupported`,jigVersion:`0.26.0`,minimum:`0.29.0`},{id:`new-jig`,state:`incompatible`,jigVersion:`1.0.0`},{id:`busy`,state:`unreadable`,code:`locked`},{id:`moved`,state:`unavailable`,reason:`missing`}],$=[{text:"`design-system` — design system and canvas",checked:!0,task:`design-system`,fog:!1},{text:"`specs-and-epics` — specs and epics (after: project board — `jig spec list`)",checked:!1,task:`specs-and-epics`,fog:!1},{text:"`old-task` — a task no longer live",checked:!1,task:`old-task`,fog:!1},{text:`invoices from orders, no task filed yet`,checked:!1,task:null,fog:!1},{text:"fog: registration by `jig init`",checked:!1,task:null,fog:!0}],ke=[{id:`jig-ui`,title:`Jig UI — a local control center for Jig projects`,missingFiles:[],release:null,epic:null,progress:{done:2,total:6,filed:2,fog:1},phases:[{phase:0,title:`Package and release`,done:1,total:1,filed:0,fog:0,items:[{...$[0],text:`package and release`,task:null}]},{phase:1,title:`Read-only UI`,done:1,total:5,filed:2,fog:1,items:$}]},{id:`billing`,title:`Billing in one place`,missingFiles:[],release:`minor`,epic:{branch:`epic/billing`,state:`open`,checkedOut:!1,missing:!1,fetched:!0},progress:{done:0,total:1,filed:0,fog:0},phases:[{phase:null,title:null,done:0,total:1,filed:0,fog:0,items:[$[3]]}]},{id:`lost-epic`,title:`An epic whose branch is gone`,missingFiles:[],release:`major`,epic:{branch:`epic/lost`,state:`open`,checkedOut:!0,missing:!0,fetched:!1},progress:null,phases:[]},{id:`half-written`,title:null,missingFiles:[`spec.md`,`roadmap.md`],release:null,epic:null,progress:null,phases:[]}],Ae={class:`flex gap-4`},je={class:`w-24 text-muted-foreground`},Me={class:`flex items-center gap-2`},Ne={class:`flex flex-wrap gap-2`},Pe={class:`flex max-w-sm flex-col gap-2`},Fe={class:`flex h-5 items-center gap-2`},Ie={class:`flex gap-2`},Le={class:`flex flex-wrap items-center gap-6`},Re={class:`flex items-center gap-1`},ze={class:`grid grid-cols-2 gap-2 xl:grid-cols-3`},Be={class:`flex h-[28rem] flex-col`},Ve={class:`flex h-40 flex-col`},He={class:`flex h-[28rem] flex-col`},Ue={class:`flex h-64 flex-col`},We={class:`flex h-64 flex-col`},Ge=l({__name:`CanvasView`,setup(ee){let c=[`default`,`secondary`,`outline`,`ghost`,`destructive`,`link`],l=[`xs`,`sm`,`default`,`lg`],d=[`icon-xs`,`icon-sm`,`icon`,`icon-lg`],f=[`default`,`secondary`,`outline`,`ghost`,`destructive`,`link`],p=[`attention`,`good`,`bad`,`quiet`];return(ee,C)=>(S(),v(`div`,null,[C[14]||=n(`div`,{class:`border-b px-4 py-3`},[n(`h1`,{class:`font-semibold tracking-wider uppercase`},`Canvas`),n(`p`,{class:`text-muted-foreground`},`Every component of the page in every variant and state; the left panel light, the right dark.`)],-1),s(V,{title:`Tones`,note:`lib/tones.ts — the only colours with a meaning`},{default:h(()=>[(S(),v(g,null,x(p,t=>n(`p`,{key:t,class:T(e(te)[t])},M(t)+` as a rule`,3)),64)),n(`p`,Ae,[(S(),v(g,null,x(p,t=>n(`span`,{key:t,class:T(e(u)[t])},M(t),3)),64))])]),_:1}),C[15]||=n(`h2`,{class:`border-b px-4 py-2 font-bold tracking-widest uppercase`},`components/ui`,-1),s(V,{title:`Button`,note:`variant × size; icon sizes; disabled`},{default:h(()=>[(S(),v(g,null,x(c,t=>n(`div`,{key:t,class:`flex flex-wrap items-center gap-2`},[n(`span`,je,M(t),1),(S(),v(g,null,x(l,n=>s(e(k),{key:n,variant:t,size:n},{default:h(()=>[b(M(n),1)]),_:2},1032,[`variant`,`size`])),64)),s(e(k),{variant:t,disabled:``},{default:h(()=>[...C[0]||=[b(`disabled`,-1)]]),_:1},8,[`variant`])])),64)),n(`div`,Me,[C[2]||=n(`span`,{class:`w-24 text-muted-foreground`},`icon`,-1),(S(),v(g,null,x(d,t=>s(e(k),{key:t,variant:`outline`,size:t,"aria-label":t},{default:h(()=>[s(e(m))]),_:1},8,[`size`,`aria-label`])),64)),s(e(k),{variant:`outline`,size:`sm`},{default:h(()=>[s(e(m),{"data-icon":`inline-start`}),C[1]||=b(`with icon`,-1)]),_:1})])]),_:1}),s(V,{title:`Badge`},{default:h(()=>[n(`div`,Ne,[(S(),v(g,null,x(f,t=>s(e(i),{key:t,variant:t},{default:h(()=>[b(M(t),1)]),_:2},1032,[`variant`])),64))])]),_:1}),s(V,{title:`Card`},{default:h(()=>[s(e(a),{class:`max-w-sm`},{default:h(()=>[s(e(xe),null,{default:h(()=>[s(e(Se),null,{default:h(()=>[...C[3]||=[b(`Card title`,-1)]]),_:1}),s(e(be),null,{default:h(()=>[...C[4]||=[b(`Card description, muted.`,-1)]]),_:1})]),_:1}),s(e(ye),null,{default:h(()=>[...C[5]||=[b(`Card content.`,-1)]]),_:1})]),_:1})]),_:1}),s(V,{title:`Input and Label`,note:`empty, filled, invalid, disabled`},{default:h(()=>[n(`div`,Pe,[s(e(oe),null,{default:h(()=>[...C[6]||=[b(`Project path`,-1)]]),_:1}),s(e(E),{placeholder:`/path/to/project`}),s(e(E),{"model-value":`/Users/me/project`}),s(e(E),{"model-value":`/not/a/project`,"aria-invalid":`true`}),s(e(E),{"model-value":`disabled`,disabled:``})])]),_:1}),s(V,{title:`Separator`},{default:h(()=>[s(e(z)),n(`div`,Fe,[C[7]||=b(`left`,-1),s(e(z),{orientation:`vertical`}),C[8]||=b(`right`,-1)])]),_:1}),s(V,{title:`ToggleGroup`,note:`the Board / List switch`},{default:h(()=>[s(e(ie),{type:`single`,variant:`outline`,size:`sm`,"model-value":`board`,"aria-label":`View`},{default:h(()=>[s(e(O),{value:`board`},{default:h(()=>[...C[9]||=[b(`Board`,-1)]]),_:1}),s(e(O),{value:`list`},{default:h(()=>[...C[10]||=[b(`List`,-1)]]),_:1})]),_:1})]),_:1}),s(V,{title:`Toggle`,note:`the board's finished tasks: off, on`},{default:h(()=>[n(`div`,Ie,[s(e(N),{variant:`outline`,size:`sm`,"model-value":!1},{default:h(()=>[...C[11]||=[b(`3 finished tasks`,-1)]]),_:1}),s(e(N),{variant:`outline`,size:`sm`,"model-value":!0},{default:h(()=>[...C[12]||=[b(`3 finished tasks`,-1)]]),_:1})])]),_:1}),s(V,{title:`Collapsible`,note:`open and folded`},{default:h(()=>[(S(),v(g,null,x([!0,!1],t=>s(e(ge),{key:String(t),"default-open":t},{default:h(()=>[s(e(se),{class:`w-full border-b bg-muted/50 px-3 py-1.5 text-left`},{default:h(()=>[b(`Trigger (`+M(t?`open`:`folded`)+`)`,1)]),_:2},1024),s(e(re),{class:`px-3 py-2`},{default:h(()=>[...C[13]||=[b(`Content`,-1)]]),_:1})]),_:2},1032,[`default-open`])),64))]),_:1}),C[16]||=n(`h2`,{class:`border-b px-4 py-2 font-bold tracking-widest uppercase`},`components`,-1),s(V,{title:`ProjectTabs`,note:`on the workspace; on a project; empty`},{default:h(()=>[s(o,{projects:e(Q),version:`0.1.0`},{default:h(()=>[s(t)]),_:1},8,[`projects`]),s(o,{projects:e(Q),current:`jig-ui`,version:`0.1.0`},null,8,[`projects`]),s(o,{projects:[]})]),_:1}),s(V,{title:`ThemeToggle`,note:`switches the whole page; the icon is the theme it switches to`},{default:h(()=>[n(`div`,null,[s(t)])]),_:1}),s(V,{title:`ProjectCard`,note:`ready with attention and stale housekeeping; nothing needs you; each state it cannot be read in`},{default:h(()=>[(S(!0),v(g,null,x(e(Q),e=>(S(),y(me,{key:e.id,project:e},null,8,[`project`]))),128))]),_:1}),s(V,{title:`NewTaskForm`,note:`empty, on its way, the id taken`},{default:h(()=>[s(P,{busy:!1}),s(P,{busy:!0,task:`fix-login`,goal:`Log in with the token after a restart.`}),s(P,{busy:!1,task:`queue-reorder`,goal:`Order the work.`,refusal:`The project has a task called queue-reorder already, maybe a finished one. Choose another id.`,taken:``})]),_:1}),s(V,{title:`ConnectForm`,note:`idle, busy, refused`},{default:h(()=>[s(j,{busy:!1}),s(j,{busy:!0,"model-value":`/Users/me/project`}),s(j,{busy:!1,"model-value":`/Users/me/project/.claude/worktrees/x`,refusal:`That is a worktree. Connect the main checkout instead.`})]),_:1}),s(V,{title:`AttentionItem`,note:`no link; a pull request; another link`},{default:h(()=>[(S(!0),v(g,null,x(e(q),(e,t)=>(S(),y(fe,{key:t,item:e},null,8,[`item`]))),128))]),_:1}),s(V,{title:`ColumnHeader`,note:`each column, and one this page does not know`},{default:h(()=>[(S(!0),v(g,null,x(e(Oe),e=>(S(),y(ce,{id:e.id,key:e.id,title:e.title,count:e.count},null,8,[`id`,`title`,`count`]))),128))]),_:1}),s(V,{title:`QueueMenu`,note:`press to open: To top, Up, Down, To bottom, Priority, the pause — first queued, in the middle, not queued, last, paused under a Jig that cannot resume it (no pause to ask, Resume off), paused and resumable, a pause asked, while its change is on its way`},{default:h(()=>[n(`div`,Le,[(S(!0),v(g,null,x([e(W)[0],e(W)[1],e(W)[3],e(W)[11],e(W)[9],e(W)[13],e(W)[12]],t=>(S(),v(`span`,{key:t.id,class:`flex items-center gap-1`},[b(M(t.id),1),s(_,{task:t,cards:e(W)},null,8,[`task`,`cards`])]))),128)),n(`span`,Re,[b(M(e(W)[1].id),1),s(_,{task:e(W)[1],cards:e(W),disabled:``},null,8,[`task`,`cards`])])])]),_:1}),s(V,{title:`TaskCard`,note:`every note a card carries, a priority among them; with its queue menu; while its change is on its way; changed since a refused change; open with details, while reading, unreadable`},{default:h(()=>[n(`div`,ze,[(S(!0),v(g,null,x(e(W),e=>(S(),y(w,{key:e.id,project:`jig-ui`,task:e,open:!1},null,8,[`task`]))),128)),s(w,{project:`jig-ui`,task:e(W)[1],open:!1,cards:e(W)},null,8,[`task`,`cards`]),s(w,{project:`jig-ui`,task:e(W)[0],open:!1,cards:e(W),busy:``},null,8,[`task`,`cards`]),s(w,{project:`jig-ui`,task:e(W)[3],open:!1,cards:e(W),changed:``},null,8,[`task`,`cards`]),s(w,{project:`jig-ui`,task:e(W)[2],open:!0,details:e(X)[0]},null,8,[`task`,`details`]),s(w,{project:`jig-ui`,task:e(W)[0],open:!0},null,8,[`task`]),s(w,{project:`jig-ui`,task:e(W)[1],open:!0,details:`unavailable`},null,8,[`task`])])]),_:1}),s(V,{title:`TaskRow`,note:`each note and priority; selected; with its queue menu; while its change is on its way; changed since a refused change`},{default:h(()=>[n(`div`,null,[(S(!0),v(g,null,x(e(W),(e,t)=>(S(),y(D,{key:e.id,task:e,selected:t===2},null,8,[`task`,`selected`]))),128)),s(D,{task:e(W)[1],selected:!1,cards:e(W)},null,8,[`task`,`cards`]),s(D,{task:e(W)[0],selected:!1,cards:e(W),busy:``},null,8,[`task`,`cards`]),s(D,{task:e(W)[3],selected:!1,cards:e(W),changed:``},null,8,[`task`,`cards`])])]),_:1}),s(V,{title:`BoardColumns`,note:`cards in every column, one open with its details, two changed since a refused change; no live task`},{default:h(()=>[n(`div`,Be,[s(L,{project:`jig-ui`,columns:e(G),selected:e(W)[2].id,details:e(X)[0],pending:e(W)[0].id,changed:[e(W)[1].id,e(W)[3].id]},null,8,[`columns`,`selected`,`details`,`pending`,`changed`])]),n(`div`,Ve,[s(L,{project:`jig-ui`,columns:e(K)},null,8,[`columns`])])]),_:1}),s(V,{title:`BoardList`,note:`a row picked with its details; nothing picked; no live task`},{default:h(()=>[n(`div`,He,[s(A,{project:`jig-ui`,columns:e(G),selected:e(W)[2].id,details:e(X)[0]},null,8,[`columns`,`selected`,`details`])]),n(`div`,Ue,[s(A,{project:`jig-ui`,columns:e(G)},null,8,[`columns`])]),n(`div`,We,[s(A,{project:`jig-ui`,columns:e(K)},null,8,[`columns`])])]),_:1}),s(V,{title:`FinishedList`,note:`closed with its pull request merged; abandoned; one without a goal`},{default:h(()=>[s(ue,{tasks:e(De),class:`border`},null,8,[`tasks`])]),_:1}),s(V,{title:`TaskFacts`,note:`everything a task can carry; a task not started`},{default:h(()=>[(S(!0),v(g,null,x(e(X),e=>(S(),y(ne,{key:e.id,details:e,class:`border-b pb-3`},null,8,[`details`]))),128))]),_:1}),s(V,{title:`TaskBrief`,note:`facts, actions and the link to the full page`},{default:h(()=>[s(I,{project:`jig-ui`,task:e(X)[1].id,details:e(X)[1]},null,8,[`task`,`details`])]),_:1}),s(V,{title:`ActionList`,note:`Jig's offers, one unknown id; none`},{default:h(()=>[s(r,{actions:e(J)},null,8,[`actions`]),s(r,{actions:[]})]),_:1}),s(V,{title:`CopyCommand`,note:`short; long enough to be cut`},{default:h(()=>[s(F,{command:`jig task pause design-system`}),s(F,{command:`jig task autopilot a-task-with-a-rather-long-identifier-that-wraps resume --answer 'a long answer to the question'`,class:`max-w-xs`})]),_:1}),s(V,{title:`ProgressBar`,note:`none, part, all, an empty roadmap`},{default:h(()=>[(S(),v(g,null,x([[0,4],[3,9],[5,5],[0,0]],([e,t])=>s(le,{key:`${e}/${t}`,done:e,total:t},null,8,[`done`,`total`])),64))]),_:1}),s(V,{title:`SpecItemRow`,note:`done with a live task; open with dependencies; a task no longer live; no task; fog`},{default:h(()=>[n(`ul`,null,[(S(!0),v(g,null,x(e($),(e,t)=>(S(),y(ae,{key:t,item:e,project:`jig-ui`,live:t<2},null,8,[`item`,`live`]))),128))])]),_:1}),s(V,{title:`SpecCard`,note:`no epic, a finished phase folded; an open epic as of the last fetch; a lost epic branch; missing files`},{default:h(()=>[(S(!0),v(g,null,x(e(ke),e=>(S(),y(pe,{key:e.id,spec:e,project:`jig-ui`,live:[`design-system`,`specs-and-epics`]},null,8,[`spec`]))),128))]),_:1})]))}});export{Ge as default};
|