@rasensio/aidlc 2.18.0 → 2.20.0

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 (60) hide show
  1. package/dist/autopilot/answers.js +2 -2
  2. package/dist/autopilot/answers.js.map +1 -1
  3. package/dist/autopilot/decisions.d.ts +42 -5
  4. package/dist/autopilot/decisions.d.ts.map +1 -1
  5. package/dist/autopilot/decisions.js +85 -16
  6. package/dist/autopilot/decisions.js.map +1 -1
  7. package/dist/autopilot/driver.d.ts +6 -5
  8. package/dist/autopilot/driver.d.ts.map +1 -1
  9. package/dist/autopilot/driver.js +57 -42
  10. package/dist/autopilot/driver.js.map +1 -1
  11. package/dist/autopilot/presets.d.ts.map +1 -1
  12. package/dist/autopilot/presets.js +4 -2
  13. package/dist/autopilot/presets.js.map +1 -1
  14. package/dist/autopilot/proposal.d.ts +55 -0
  15. package/dist/autopilot/proposal.d.ts.map +1 -0
  16. package/dist/autopilot/proposal.js +167 -0
  17. package/dist/autopilot/proposal.js.map +1 -0
  18. package/dist/autopilot/review.d.ts +15 -3
  19. package/dist/autopilot/review.d.ts.map +1 -1
  20. package/dist/autopilot/review.js +211 -40
  21. package/dist/autopilot/review.js.map +1 -1
  22. package/dist/autopilot/typed.d.ts +9 -1
  23. package/dist/autopilot/typed.d.ts.map +1 -1
  24. package/dist/autopilot/typed.js +6 -2
  25. package/dist/autopilot/typed.js.map +1 -1
  26. package/dist/commands/autopilot.d.ts +3 -1
  27. package/dist/commands/autopilot.d.ts.map +1 -1
  28. package/dist/commands/autopilot.js +10 -6
  29. package/dist/commands/autopilot.js.map +1 -1
  30. package/dist/commands/init.d.ts.map +1 -1
  31. package/dist/commands/init.js +10 -0
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/update.d.ts.map +1 -1
  34. package/dist/commands/update.js +11 -0
  35. package/dist/commands/update.js.map +1 -1
  36. package/dist/compile/register-template.d.ts +41 -0
  37. package/dist/compile/register-template.d.ts.map +1 -0
  38. package/dist/compile/register-template.js +61 -0
  39. package/dist/compile/register-template.js.map +1 -0
  40. package/dist/roadmap/summary.d.ts +15 -0
  41. package/dist/roadmap/summary.d.ts.map +1 -1
  42. package/dist/roadmap/summary.js +50 -0
  43. package/dist/roadmap/summary.js.map +1 -1
  44. package/dist/roadmap/view-assets.d.ts +3 -3
  45. package/dist/roadmap/view-assets.d.ts.map +1 -1
  46. package/dist/roadmap/view-assets.js +95 -221
  47. package/dist/roadmap/view-assets.js.map +1 -1
  48. package/dist/roadmap/view-html.d.ts +8 -0
  49. package/dist/roadmap/view-html.d.ts.map +1 -1
  50. package/dist/roadmap/view-html.js +144 -121
  51. package/dist/roadmap/view-html.js.map +1 -1
  52. package/dist/roadmap/view-model.d.ts +109 -15
  53. package/dist/roadmap/view-model.d.ts.map +1 -1
  54. package/dist/roadmap/view-model.js +220 -36
  55. package/dist/roadmap/view-model.js.map +1 -1
  56. package/package.json +2 -2
  57. package/dist/roadmap/graph.d.ts +0 -154
  58. package/dist/roadmap/graph.d.ts.map +0 -1
  59. package/dist/roadmap/graph.js +0 -347
  60. package/dist/roadmap/graph.js.map +0 -1
@@ -5,9 +5,9 @@
5
5
  * ships nothing extra. Both are hashed into the page's Content-Security-Policy, so any
6
6
  * change here changes the hash and nothing else (AC-13).
7
7
  *
8
- * The script handles events and nothing more: zoom, pan, collapse, highlight, the side
9
- * panel, search and the done cap. Layout, chains and subtrees arrive precomputed in data
10
- * attributes (AC-34) — the line between this and a front-end project. It is written as
8
+ * The script handles events and nothing more: filters, selection, the side panel, search
9
+ * and the done cap. Verdicts, squares and orders arrive precomputed in the markup — the
10
+ * line between this and a front-end project. It is written as
11
11
  * plain ES2020 without template literals so `String.raw` can hold it unescaped; a test
12
12
  * fails it if it grows past 16 KB or ever contains `</script`.
13
13
  *
@@ -53,7 +53,7 @@ h1 { margin: 0; font-size: 1rem; font-weight: 600; }
53
53
  .view { padding: .75rem 1.5rem 0; }
54
54
  .filters { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .75rem; }
55
55
  .group { display: flex; flex-wrap: wrap; gap: .25rem; }
56
- .chip, .preset, .only, #open-chains { border-radius: 999px; font-size: .8125rem; }
56
+ .chip, .preset, .only { border-radius: 999px; font-size: .8125rem; }
57
57
  .ring { display: inline-block; position: relative; width: .75rem; height: .75rem; margin-right: .4rem; vertical-align: -.1rem; border: 1.5px solid var(--rc); border-radius: 50%; flex: none; }
58
58
  .r-inbox { --rc: var(--st-inbox); border-style: dashed; }
59
59
  .r-backlog { --rc: var(--st-backlog); }
@@ -73,17 +73,16 @@ h1 { margin: 0; font-size: 1rem; font-weight: 600; }
73
73
  .cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .375rem; }
74
74
  .card { background: var(--card); border: 1px solid var(--line); border-radius: .375rem; padding: .5rem .625rem; cursor: pointer; }
75
75
  .card:hover { box-shadow: 0 1px 2px var(--shade); }
76
- .card.s-inbox, .sw.s-inbox { border: 1px dashed var(--st-inbox); background: var(--st-inbox-bg); }
77
- .card.s-backlog, .sw.s-backlog { border: 1px solid var(--st-backlog); background: var(--st-backlog-bg); }
78
- .card.s-in-progress, .sw.s-in-progress { border: 1px solid var(--st-in-progress); background: var(--st-in-progress-bg); }
79
- .card.s-done, .sw.s-done { border: 1px solid var(--st-done); background: var(--st-done-bg); }
80
- .card.s-hold, .sw.s-hold { border: 1.5px dotted var(--st-hold); background: var(--st-hold-bg); }
76
+ .card.s-inbox { border: 1px dashed var(--st-inbox); background: var(--st-inbox-bg); }
77
+ .card.s-backlog { border: 1px solid var(--st-backlog); background: var(--st-backlog-bg); }
78
+ .card.s-in-progress { border: 1px solid var(--st-in-progress); background: var(--st-in-progress-bg); }
79
+ .card.s-done { border: 1px solid var(--st-done); background: var(--st-done-bg); }
80
+ .card.s-hold { border: 1.5px dotted var(--st-hold); background: var(--st-hold-bg); }
81
81
  .card.s-hold .open { color: var(--muted); }
82
82
  .card p { margin: .2rem 0 0; }
83
83
  .card .title { display: flex; align-items: baseline; margin: 0; }
84
84
  .ships { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .25rem; }
85
- .ship { display: flex; align-items: baseline; gap: .5rem; padding: .3rem .6rem; border: 1px solid var(--st-done); border-radius: .375rem; background: var(--st-done-bg); cursor: pointer; }
86
- .ship time { color: var(--muted); font-size: .75rem; }
85
+ .ship { padding: .4rem .6rem; border: 1px solid var(--st-done); border-radius: .375rem; background: var(--st-done-bg); cursor: pointer; }
87
86
  .track { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1rem; padding: 0; }
88
87
  .ms { padding: .3rem .7rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .8125rem; }
89
88
  .ms a { color: var(--ink); font-weight: 600; text-decoration: none; }
@@ -96,8 +95,7 @@ h1 { margin: 0; font-size: 1rem; font-weight: 600; }
96
95
  .mrows { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .25rem; }
97
96
  .mrow { display: flex; align-items: baseline; gap: .5rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--card); cursor: pointer; }
98
97
  .hold-for { margin: 0; font-size: .75rem; color: var(--muted); }
99
- .week h3 { margin: .75rem 0 .4rem; font-size: .8125rem; font-weight: 600; }
100
- .card .open, .ship .open, .mrow .open { border: 0; background: none; padding: 0; min-height: 0; text-align: left; font-weight: 500; line-height: 1.4; }
98
+ .card .open, .ship .open, .mrow .open, .ship .title { border: 0; background: none; padding: 0; min-height: 0; text-align: left; font-weight: 500; line-height: 1.4; }
101
99
  .rank { color: var(--muted); font-weight: 600; }
102
100
  .badge { display: inline-block; margin-right: .35rem; padding: 0 .45rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
103
101
  .badge.ready { background: var(--ready-bg); color: var(--ready-ink); }
@@ -106,38 +104,41 @@ h1 { margin: 0; font-size: 1rem; font-weight: 600; }
106
104
  .age, .hold { color: var(--muted); }
107
105
  .board:not(.searching) .col:not(.expanded) .capped { display: none; }
108
106
  .show-all { margin: .5rem 0; }
109
- .map-controls, .legend, .empty { margin: 0 0 .5rem; }
107
+ .legend, .empty { margin: 0 0 .5rem; }
110
108
  .legend { color: var(--muted); font-size: .8125rem; }
111
- .map-wrap { position: relative; }
112
- .status-legend { position: absolute; top: .5rem; right: .5rem; display: grid; gap: .2rem; margin: 0; padding: .4rem .6rem; list-style: none; font-size: .75rem; background: var(--bg); border: 1px solid var(--line); border-radius: .375rem; }
113
- .status-legend li { display: flex; align-items: center; gap: .4rem; }
114
- .sw { display: inline-block; width: 1rem; height: .75rem; border-radius: .2rem; }
115
- #map { display: block; width: 100%; height: calc(100vh - 12.5rem); min-height: 24rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--bg-2); touch-action: none; cursor: grab; }
116
- #map text { fill: var(--ink); font-size: 14px; }
117
- #map .sub, #map .clabel { fill: var(--muted); font-size: 12px; }
118
- #map .node { cursor: pointer; }
119
- #map .node rect { fill: var(--card); stroke: var(--line-2); stroke-width: 1.5; }
120
- #map .node:focus { outline: none; }
121
- #map .node:focus-visible rect, #map .toggle:focus-visible circle { stroke: var(--focus); stroke-width: 3; }
122
- #map .s-inbox rect { fill: var(--st-inbox-bg); stroke: var(--st-inbox); stroke-dasharray: 4 3; }
123
- #map .s-backlog rect { fill: var(--st-backlog-bg); stroke: var(--st-backlog); }
124
- #map .s-in-progress rect { fill: var(--st-in-progress-bg); stroke: var(--st-in-progress); }
125
- #map .s-done rect { fill: var(--st-done-bg); stroke: var(--st-done); }
126
- #map .s-hold rect { fill: var(--st-hold-bg); stroke: var(--st-hold); stroke-dasharray: 2 3; }
127
- #map .s-hold .label { fill: var(--muted); }
128
- #map .missing rect { fill: var(--blocked-bg); stroke: var(--unmet); stroke-dasharray: 6 3; }
129
- #map .edge { fill: none; stroke: var(--st-hold); stroke-width: 1.5; }
130
- #map .edge.further { stroke-dasharray: 2 4; }
131
- #map .edge.unmet { stroke: var(--unmet); stroke-dasharray: 6 4; }
132
- #map .toggle { cursor: pointer; }
133
- #map .toggle circle { fill: var(--card); stroke: var(--muted); stroke-width: 1.5; }
134
- #map .toggle text { text-anchor: middle; font-weight: 700; font-size: 15px; }
135
- #map .off, #map.hide-done .node.s-done, #map.hide-done [data-done] { display: none; }
136
- #map .dim { opacity: .25; }
137
- #map.focus .node:not(.hl) { opacity: .25; }
138
- #map.focus .edge:not(.hl) { opacity: .12; }
139
- #map .node.hl rect { stroke-width: 3; }
140
- #map .edge.hl { stroke-width: 2.5; opacity: 1; }
109
+ .plain { margin: .3rem 0 0; color: var(--ink); font-size: .8125rem; line-height: 1.45; }
110
+ .board:not(.summaries) .card .plain { display: none; }
111
+ .draft { display: inline-block; padding: 0 .35rem; border: 1px dashed var(--line-2); border-radius: .25rem; color: var(--muted); font-size: .75rem; font-weight: 600; }
112
+ .badge.caused { background: var(--blocked-bg); color: var(--blocked-ink); }
113
+ .release h3 { margin: .9rem 0 .4rem; font-size: .875rem; font-weight: 600; }
114
+ .ship .facts { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; }
115
+ .deps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem); gap: 1rem; align-items: start; }
116
+ .drows { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
117
+ .drow { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: .75rem; padding: .5rem .625rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--card); cursor: pointer; }
118
+ .drow[aria-current="true"] { outline: 2px solid var(--focus); }
119
+ .drow .title { display: flex; align-items: baseline; margin: 0; }
120
+ .drow .open { border: 0; background: none; padding: 0; min-height: 0; text-align: left; font-weight: 500; line-height: 1.4; }
121
+ .verdict { margin: 0 0 .15rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
122
+ .verdict.v-0 { color: var(--blocked-ink); }
123
+ .verdict.v-2 { color: var(--ready-ink); }
124
+ .squares p { margin: 0 0 .25rem; }
125
+ .sqrow { display: flex; align-items: center; gap: .25rem; }
126
+ .sq { display: inline-block; width: 1.1rem; height: 1.1rem; min-width: 0; min-height: 0; padding: 0; border: 1.5px solid transparent; border-radius: .2rem; vertical-align: -.2rem; }
127
+ .sq-red { background: var(--unmet); border-color: var(--unmet); }
128
+ .sq-grey { background: var(--st-hold); border-color: var(--st-hold); }
129
+ .sq-green { background: var(--st-done); border-color: var(--st-done); }
130
+ .sq-missing { background: var(--blocked-bg); border-style: dashed; }
131
+ .sq-declined { background: repeating-linear-gradient(45deg, var(--st-hold) 0 3px, var(--bg) 3px 6px); }
132
+ .more, .unlocks, .nothing { color: var(--muted); font-size: .75rem; }
133
+ .ddetail { position: sticky; top: .75rem; max-height: calc(100vh - 1.5rem); overflow-y: auto; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--bg-2); }
134
+ .ddetail h3 { margin: .2rem 0 .4rem; font-size: .9375rem; }
135
+ .ddetail h4 { margin: .8rem 0 .3rem; font-size: .8125rem; color: var(--muted); }
136
+ .facts { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .75rem; margin: .5rem 0 0; font-size: .8125rem; }
137
+ .facts dt { color: var(--muted); }
138
+ .facts dd { margin: 0; }
139
+ .sqlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
140
+ .warn { padding: .4rem .6rem; border-radius: .375rem; background: var(--blocked-bg); color: var(--blocked-ink); font-weight: 600; }
141
+ @media (max-width: 60rem) { .deps { grid-template-columns: 1fr; } .ddetail { position: static; max-height: none; } }
141
142
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(34rem, 100%); overflow-y: auto; padding: 1rem 1.25rem; color: var(--ink); background: var(--bg); border-left: 1px solid var(--line); box-shadow: -4px 0 16px var(--shade); }
142
143
  .panel h2 { margin: .25rem 3rem .5rem 0; font-size: 1rem; font-weight: 600; }
143
144
  .panel h3 { margin: 1rem 0 .35rem; font-size: .8125rem; font-weight: 600; color: var(--muted); }
@@ -201,10 +202,11 @@ export const VIEW_SCRIPT = String.raw `
201
202
 
202
203
  // View state. Each tab keeps its own filters; all of it round-trips through the hash.
203
204
  var ALL = ['inbox', 'backlog', 'in-progress', 'done', 'hold'];
204
- var ONLY = ['ready', 'blocked'];
205
+ // Each tab's only toggles: a hash naming another tab's would hide every row with no control to undo it.
206
+ var ONLY = { board: ['ready', 'blocked'], deps: ['linked'] };
205
207
  // The tabs are the page's own: Milestones comes first when the roadmap has milestones.
206
208
  var TABS = all('[role="tab"]').map(function (t) { return t.getAttribute('data-tab'); });
207
- var S = { tab: TABS[0], open: true, hide: true, board: { s: ALL.slice(0, 3), o: [] }, deps: { s: ALL.slice(), o: [] } };
209
+ var S = { tab: TABS[0], sum: false, board: { s: ALL.slice(0, 3), o: [] }, deps: { s: ['inbox', 'backlog', 'in-progress', 'hold'], o: [] } };
208
210
  function listOf(v, known) {
209
211
  if (v === '') return [];
210
212
  var out = v.split('.');
@@ -218,16 +220,16 @@ export const VIEW_SCRIPT = String.raw `
218
220
  if (at < 0) return;
219
221
  var k = part.slice(0, at), v = part.slice(at + 1), list;
220
222
  if (k === 'tab' && TABS.indexOf(v) >= 0) S.tab = v;
221
- else if ((k === 'open' || k === 'hide-done') && (v === '0' || v === '1')) S[k === 'open' ? 'open' : 'hide'] = v === '1';
223
+ else if (k === 'summaries' && (v === '0' || v === '1')) S.sum = v === '1';
222
224
  else if (k === 'board' || k === 'deps') { list = listOf(v, ALL); if (list) S[k].s = list; }
223
- else if (k === 'board-only' || k === 'deps-only') { list = listOf(v, ONLY); if (list) S[k.slice(0, -5)].o = list; }
225
+ else if (k === 'board-only' || k === 'deps-only') { list = listOf(v, ONLY[k.slice(0, -5)]); if (list) S[k.slice(0, -5)].o = list; }
224
226
  });
225
227
  }
226
228
  var live = false;
227
229
  function writeHash() {
228
230
  if (!live) return;
229
231
  var h = 'tab=' + S.tab + '&board=' + S.board.s.join('.') + '&board-only=' + S.board.o.join('.') +
230
- '&deps=' + S.deps.s.join('.') + '&deps-only=' + S.deps.o.join('.') + '&open=' + (S.open ? 1 : 0) + '&hide-done=' + (S.hide ? 1 : 0);
232
+ '&deps=' + S.deps.s.join('.') + '&deps-only=' + S.deps.o.join('.') + '&summaries=' + (S.sum ? 1 : 0);
231
233
  try { history.replaceState(null, '', '#' + h); } catch (e) { /* the view still works */ }
232
234
  }
233
235
  function toggled(list, v, order) {
@@ -247,17 +249,8 @@ export const VIEW_SCRIPT = String.raw `
247
249
 
248
250
  var tabs = all('[role="tab"]');
249
251
  var board = one('.board');
250
- var svg = one('#map');
251
- var viewport = one('#viewport', svg);
252
- var unlinked = one('.unlinked', svg);
253
- var openBtn = one('#open-chains');
254
- var hideBtn = one('#hide-done');
255
- function onMap(n) { return !n.closest('.off') && !(S.hide && n.classList.contains('s-done')); }
256
- function place(g) {
257
- if (!g) return;
258
- var p = g.getAttribute(S.open ? 'data-open' : 'data-all') || g.getAttribute('data-all');
259
- g.setAttribute('transform', 'translate(' + p + ')');
260
- }
252
+ var sumBtn = one('#summaries');
253
+ var detail = one('#ddetail');
261
254
  function render() {
262
255
  tabs.forEach(function (t) {
263
256
  var on = t.getAttribute('data-tab') === S.tab;
@@ -272,33 +265,17 @@ export const VIEW_SCRIPT = String.raw `
272
265
  all('.preset', bar).forEach(function (c) { attr(c, 'aria-pressed', !f.o.length && same(refs(c, 'data-set'), f.s)); });
273
266
  });
274
267
  all('.col').forEach(function (c) { c.classList.toggle('off', S.board.s.indexOf(c.getAttribute('data-status')) < 0); });
275
- var shown = 0, lit = 0, inDeps = 0, dim = {};
268
+ var shown = 0, lit = 0;
276
269
  all('.card').forEach(function (c) { var m = match(c, S.board); c.hidden = !m; if (m) shown++; });
277
270
  board.classList.toggle('searching', q !== '');
271
+ board.classList.toggle('summaries', S.sum);
272
+ attr(sumBtn, 'aria-pressed', S.sum);
273
+ all('.drow').forEach(function (r) { var m = match(r, S.deps); r.hidden = !m; if (m) lit++; });
278
274
  var ships = 0, rows = 0;
279
275
  all('.ship').forEach(function (s) { var m = q === '' || s.getAttribute('data-search').indexOf(q) !== -1; s.hidden = !m; if (m) ships++; });
280
276
  all('.mrow').forEach(function (s) { var m = q === '' || s.getAttribute('data-search').indexOf(q) !== -1; s.hidden = !m; if (m) rows++; });
281
- if (openBtn) attr(openBtn, 'aria-pressed', S.open);
282
- svg.classList.toggle('hide-done', S.hide);
283
- if (hideBtn) {
284
- attr(hideBtn, 'aria-pressed', S.hide);
285
- hideBtn.textContent = S.hide ? hideBtn.getAttribute('data-count') + ' done hidden — show' : 'Hide done';
286
- }
287
- all('.cluster', svg).forEach(function (c) {
288
- var off = S.open && c.classList.contains('closed');
289
- c.classList.toggle('off', off);
290
- place(c);
291
- if (!off) inDeps += +c.getAttribute('data-n');
292
- });
293
- place(unlinked);
294
- all('.node', svg).forEach(function (n) {
295
- var d = !match(n, S.deps);
296
- n.classList.toggle('dim', d);
297
- if (d) dim[n.getAttribute('data-ref')] = 1; else if (onMap(n)) lit++;
298
- });
299
- all('.edge', svg).forEach(function (e) { e.classList.toggle('dim', !!(dim[e.getAttribute('data-from')] || dim[e.getAttribute('data-to')])); });
300
277
  one('#n-board').textContent = shown;
301
- one('#n-deps').textContent = inDeps;
278
+ one('#n-deps').textContent = lit;
302
279
  var nm = one('#n-milestones');
303
280
  if (nm) nm.textContent = rows;
304
281
  var n = S.tab === 'board' ? shown : S.tab === 'deps' ? lit : S.tab === 'milestones' ? rows : ships;
@@ -306,11 +283,9 @@ export const VIEW_SCRIPT = String.raw `
306
283
  writeHash();
307
284
  }
308
285
 
309
- var fitted = false;
310
286
  function selectTab(name, focus) {
311
287
  S.tab = name;
312
288
  render();
313
- if (name === 'deps' && !fitted) { fitted = true; fit(); }
314
289
  if (focus) doc.getElementById('tab-' + name).focus();
315
290
  }
316
291
  tabs.forEach(function (t) {
@@ -322,12 +297,12 @@ export const VIEW_SCRIPT = String.raw `
322
297
  });
323
298
  });
324
299
  all('.filters').forEach(function (bar) {
325
- var f = S[bar.getAttribute('data-for')];
300
+ var tab = bar.getAttribute('data-for'), f = S[tab];
326
301
  bar.addEventListener('click', function (e) {
327
302
  var b = e.target.closest('button');
328
303
  if (!b) return;
329
304
  if (b.hasAttribute('data-status')) f.s = toggled(f.s, b.getAttribute('data-status'), ALL);
330
- else if (b.hasAttribute('data-only')) f.o = toggled(f.o, b.getAttribute('data-only'), ONLY);
305
+ else if (b.hasAttribute('data-only')) f.o = toggled(f.o, b.getAttribute('data-only'), ONLY[tab]);
331
306
  else if (b.hasAttribute('data-set')) { f.s = refs(b, 'data-set'); f.o = []; }
332
307
  render();
333
308
  });
@@ -424,27 +399,39 @@ export const VIEW_SCRIPT = String.raw `
424
399
  });
425
400
  });
426
401
 
427
- var pinned = null;
428
- function unlight() {
429
- svg.classList.remove('focus');
430
- all('.hl', svg).forEach(function (el) { el.classList.remove('hl'); });
402
+ // The Dependencies tab selects into its own details column rather than the side panel.
403
+ function select(ref) {
404
+ var tpl = doc.getElementById('dd-' + ref);
405
+ if (!tpl) return;
406
+ detail.replaceChildren(tpl.content.cloneNode(true));
407
+ all('.drow').forEach(function (r) { attr(r, 'aria-current', r.getAttribute('data-ref') === ref); });
408
+ cur = ref;
431
409
  }
432
- function light(node) {
433
- var lit = {};
434
- lit[node.getAttribute('data-ref')] = true;
435
- refs(node, 'data-chain').forEach(function (r) { lit[r] = true; });
436
- svg.classList.add('focus');
437
- all('.node', svg).forEach(function (n) { n.classList.toggle('hl', !!lit[n.getAttribute('data-ref')]); });
438
- all('.edge', svg).forEach(function (ed) { ed.classList.toggle('hl', !!lit[ed.getAttribute('data-from')] && !!lit[ed.getAttribute('data-to')]); });
410
+ // A square selects its item, bringing its card back if a filter hid it.
411
+ function pick(ref) {
412
+ var row = doc.getElementById('dep-' + ref);
413
+ if (!row) return;
414
+ var st = row.getAttribute('data-status');
415
+ if (S.deps.s.indexOf(st) < 0) S.deps.s = toggled(S.deps.s, st, ALL);
416
+ if (!match(row, S.deps)) { S.deps.o = []; search.value = ''; q = ''; }
417
+ render();
418
+ select(ref);
419
+ if (row.scrollIntoView) row.scrollIntoView({ block: 'center' });
420
+ one('.open', row).focus();
439
421
  }
440
- function clearFocus() { pinned = null; unlight(); }
441
- function nodeOf(e) { return e.target.closest ? e.target.closest('.node') : null; }
442
- function enter(e) { var n = nodeOf(e); if (n && !pinned) light(n); }
443
- function leave(e) { var n = nodeOf(e); if (n && !pinned && !(e.relatedTarget && n.contains(e.relatedTarget))) unlight(); }
444
- svg.addEventListener('mouseover', enter);
445
- svg.addEventListener('focusin', enter);
446
- svg.addEventListener('mouseout', leave);
447
- svg.addEventListener('focusout', leave);
422
+ all('.drow').forEach(function (row) {
423
+ row.addEventListener('click', function (e) {
424
+ var b = e.target.closest('[data-pick]');
425
+ if (b && b.getAttribute('data-pick') !== row.getAttribute('data-ref')) { pick(b.getAttribute('data-pick')); return; }
426
+ select(row.getAttribute('data-ref'));
427
+ });
428
+ });
429
+ detail.addEventListener('click', function (e) {
430
+ var b = e.target.closest('[data-pick]');
431
+ if (b) pick(b.getAttribute('data-pick'));
432
+ });
433
+ if (sumBtn) sumBtn.addEventListener('click', function () { S.sum = !S.sum; render(); });
434
+
448
435
 
449
436
  // j and k walk the current tab's shown items. What is shown is read from state, never from
450
437
  // the browser's geometry, so jsdom sees what a browser sees (roadmap-view-readability/AC-25, AC-26).
@@ -458,17 +445,18 @@ export const VIEW_SCRIPT = String.raw `
458
445
  }
459
446
  if (S.tab === 'shipped') return all('.ship').filter(function (s) { return !s.hidden; });
460
447
  if (S.tab === 'milestones') return all('.mrow').filter(function (s) { return !s.hidden; });
461
- return all('.node', svg).filter(onMap);
448
+ return all('.drow').filter(function (r) { return !r.hidden; });
462
449
  }
463
450
  function step(by) {
464
451
  var list = items(), at = -1;
465
452
  if (!list.length) return;
466
453
  list.forEach(function (el, i) { if (el.getAttribute('data-ref') === cur) at = i; });
467
454
  var el = list[at < 0 ? 0 : Math.max(0, Math.min(list.length - 1, at + by))];
468
- var focus = el.classList.contains('node') ? el : one('.open', el);
455
+ var focus = one('.open', el);
469
456
  cur = el.getAttribute('data-ref');
470
457
  focus.focus();
471
- if (!panel.hidden) openPanel(cur, focus, true);
458
+ if (S.tab === 'deps') select(cur);
459
+ else if (!panel.hidden) openPanel(cur, focus, true);
472
460
  }
473
461
 
474
462
  doc.addEventListener('keydown', function (e) {
@@ -476,7 +464,6 @@ export const VIEW_SCRIPT = String.raw `
476
464
  if (e.key === 'Escape') {
477
465
  if (!panel.hidden) closePanel();
478
466
  else if (search.value !== '') { search.value = ''; q = ''; render(); }
479
- clearFocus();
480
467
  return;
481
468
  }
482
469
  if (/^(INPUT|TEXTAREA|SELECT)$/.test(e.target.tagName || '')) return;
@@ -485,123 +472,10 @@ export const VIEW_SCRIPT = String.raw `
485
472
  else if (/^[1-9]$/.test(e.key) && +e.key <= TABS.length) selectTab(TABS[+e.key - 1], true);
486
473
  });
487
474
 
488
- var k = 1, tx = 0, ty = 0;
489
- function r3(n) { return Math.round(n * 1000) / 1000; }
490
- function apply() { viewport.setAttribute('transform', 'translate(' + r3(tx) + ' ' + r3(ty) + ') scale(' + r3(k) + ')'); }
491
- function frame() { return { w: svg.clientWidth || 1000, h: svg.clientHeight || 600 }; }
492
- function extent() {
493
- var full = unlinked && !unlinked.classList.contains('off');
494
- var pre = 'data-' + (S.open ? 'open' : 'all') + '-' + (full ? 'full' : 'linked') + '-';
495
- return { w: +svg.getAttribute(pre + 'w'), h: +svg.getAttribute(pre + 'h') };
496
- }
497
- function fit() {
498
- var f = frame(), s = extent();
499
- if (!s.w || !s.h) { k = 1; tx = 0; ty = 0; apply(); return; }
500
- k = Math.min(f.w / s.w, f.h / s.h, 1.5);
501
- tx = (f.w - s.w * k) / 2;
502
- ty = (f.h - s.h * k) / 2;
503
- apply();
504
- }
505
- function zoomAt(px, py, factor) {
506
- var next = Math.min(4, Math.max(0.1, k * factor));
507
- tx = px - (px - tx) * (next / k);
508
- ty = py - (py - ty) * (next / k);
509
- k = next;
510
- apply();
511
- }
512
- function local(e) { var b = svg.getBoundingClientRect(); return { x: e.clientX - b.left, y: e.clientY - b.top }; }
513
- function pid(e) { return e.pointerId === undefined ? 1 : e.pointerId; }
514
- function onControl(e) { return !!(e.target.closest && e.target.closest('.node, .toggle')); }
515
-
516
- svg.addEventListener('wheel', function (e) {
517
- e.preventDefault();
518
- var p = local(e);
519
- zoomAt(p.x, p.y, Math.exp(-e.deltaY * 0.0015));
520
- }, { passive: false });
521
-
522
- var pointers = new Map();
523
- var pinch = 0;
524
- var dragged = false;
525
- svg.addEventListener('pointerdown', function (e) {
526
- if (onControl(e)) return;
527
- pointers.set(pid(e), local(e));
528
- dragged = false;
529
- if (e.pointerId !== undefined && svg.setPointerCapture) { try { svg.setPointerCapture(e.pointerId); } catch (err) { /* synthetic pointer */ } }
530
- });
531
- svg.addEventListener('pointermove', function (e) {
532
- var id = pid(e);
533
- if (!pointers.has(id)) return;
534
- var prev = pointers.get(id), cur = local(e);
535
- pointers.set(id, cur);
536
- dragged = true;
537
- if (pointers.size === 1) { tx += cur.x - prev.x; ty += cur.y - prev.y; apply(); return; }
538
- var pts = Array.from(pointers.values());
539
- var d = Math.hypot(pts[0].x - pts[1].x, pts[0].y - pts[1].y);
540
- if (pinch > 0 && d > 0) zoomAt((pts[0].x + pts[1].x) / 2, (pts[0].y + pts[1].y) / 2, d / pinch);
541
- pinch = d;
542
- });
543
- function release(e) { pointers.delete(pid(e)); if (pointers.size < 2) pinch = 0; }
544
- svg.addEventListener('pointerup', release);
545
- svg.addEventListener('pointercancel', release);
546
- svg.addEventListener('click', function (e) { if (!onControl(e) && !dragged) clearFocus(); });
547
-
548
- // Node offsets are relative to their cluster, so centring adds the cluster's current place.
549
- function activate(node) {
550
- pinned = node;
551
- light(node);
552
- var m = /translate\(([-\d.]+) ([-\d.]+)\)/.exec(node.parentNode.getAttribute('transform') || '');
553
- var f = frame();
554
- tx = f.w / 2 - ((m ? +m[1] : 0) + +node.getAttribute('data-x') + +node.getAttribute('data-cx')) * k;
555
- ty = f.h / 2 - ((m ? +m[2] : 0) + +node.getAttribute('data-y') + +node.getAttribute('data-cy')) * k;
556
- apply();
557
- openPanel(node.getAttribute('data-ref'), node);
558
- }
559
-
560
- var collapsed = {};
561
- function refreshHidden() {
562
- var hidden = {};
563
- Object.keys(collapsed).forEach(function (r) {
564
- refs(doc.getElementById('node-' + r), 'data-sub').forEach(function (s) { hidden[s] = true; });
565
- });
566
- all('.cluster .node', svg).forEach(function (n) { n.classList.toggle('off', !!hidden[n.getAttribute('data-ref')]); });
567
- all('.toggle', svg).forEach(function (t) { t.classList.toggle('off', !!hidden[t.getAttribute('data-toggle')]); });
568
- all('.edge', svg).forEach(function (ed) { ed.classList.toggle('off', !!hidden[ed.getAttribute('data-from')] || !!hidden[ed.getAttribute('data-to')]); });
569
- }
570
- function toggle(t) {
571
- var r = t.getAttribute('data-toggle');
572
- if (collapsed[r]) delete collapsed[r]; else collapsed[r] = true;
573
- var open = !collapsed[r];
574
- t.setAttribute('aria-expanded', String(open));
575
- one('text', t).textContent = open ? '−' : '+';
576
- refreshHidden();
577
- }
578
- function onActivate(el, fn) {
579
- el.addEventListener('click', function () { fn(el); });
580
- el.addEventListener('keydown', function (e) {
581
- if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); fn(el); }
582
- });
583
- }
584
- all('.node', svg).forEach(function (n) { onActivate(n, activate); });
585
- all('.toggle', svg).forEach(function (t) { onActivate(t, toggle); });
586
-
587
- var unlinkedBtn = one('#unlinked-toggle');
588
- if (unlinkedBtn) {
589
- unlinkedBtn.addEventListener('click', function () {
590
- var show = unlinked.classList.contains('off');
591
- unlinked.classList.toggle('off', !show);
592
- unlinkedBtn.setAttribute('aria-pressed', String(show));
593
- unlinkedBtn.textContent = (show ? 'Hide' : 'Show') + ' unlinked items (' + unlinkedBtn.getAttribute('data-count') + ')';
594
- fit();
595
- });
596
- }
597
- if (openBtn) openBtn.addEventListener('click', function () { S.open = !S.open; render(); fit(); });
598
- if (hideBtn) hideBtn.addEventListener('click', function () { S.hide = !S.hide; render(); });
599
- one('#fit').addEventListener('click', fit);
600
475
 
601
476
  readHash();
602
477
  render();
603
478
  live = true;
604
- if (S.tab === 'deps') { fitted = true; fit(); }
605
479
  })();
606
480
  `.replace(/^ +/gm, ''); // Indentation is for reading here; the page ships without it (AC-34).
607
481
  //# sourceMappingURL=view-assets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"view-assets.js","sourceRoot":"","sources":["../../src/roadmap/view-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyInC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+bpC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,sEAAsE"}
1
+ {"version":3,"file":"view-assets.js","sourceRoot":"","sources":["../../src/roadmap/view-assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0InC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgUpC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,sEAAsE"}
@@ -41,6 +41,14 @@ export declare const PRESETS: readonly {
41
41
  name: string;
42
42
  statuses: readonly RoadmapStatus[];
43
43
  }[];
44
+ /** A plain summary, whole and escaped; a draft says so (roadmap-cards-revamp/AC-2, AC-3). */
45
+ export declare function plainHtml(v: ViewItem): string;
46
+ /** A cost in dollars as page text, or nothing: a missing cost is never `$0`, nor is one under a cent (roadmap-cards-revamp/AC-12). */
47
+ export declare function usd(micro: number | null): string;
48
+ /** Most squares a row shows before `+N` (roadmap-cards-revamp/AC-16). */
49
+ export declare const SQUARES_PER_ROW = 3;
50
+ /** Statuses the Dependencies tab shows when the URL names none: every open state (roadmap-cards-revamp/AC-21). */
51
+ export declare const DEPS_DEFAULT: readonly RoadmapStatus[];
44
52
  /** The commands that apply to an item, as `[label, command]`; the page runs none (AC-29). */
45
53
  export declare function commandsFor(v: ViewItem): [string, string][];
46
54
  /** Render the page. Pure. */
@@ -1 +1 @@
1
- {"version":3,"file":"view-html.d.ts","sourceRoot":"","sources":["../../src/roadmap/view-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAElE,OAAO,EAAgB,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,kDAAkD;AAClD,eAAO,MAAM,YAAY,KAAK,CAAC;AAkB/B,0CAA0C;AAC1C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,iGAAiG;AACjG,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgCtD;AAmDD,wHAAwH;AACxH,eAAO,MAAM,UAAU,KAAK,CAAC;AA0B7B,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAAwC,CAAC;AAyC3F,0DAA0D;AAC1D,eAAO,MAAM,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,EAMlF,CAAC;AAyPF,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAmB3D;AAkDD,6BAA6B;AAC7B,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CA+DpD"}
1
+ {"version":3,"file":"view-html.d.ts","sourceRoot":"","sources":["../../src/roadmap/view-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAElE,OAAO,EAAmB,KAAK,WAAW,EAAe,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,kDAAkD;AAClD,eAAO,MAAM,YAAY,KAAK,CAAC;AAkB/B,0CAA0C;AAC1C,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,iGAAiG;AACjG,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgCtD;AAmDD,wHAAwH;AACxH,eAAO,MAAM,UAAU,KAAK,CAAC;AA4B7B,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAAwC,CAAC;AAyC3F,0DAA0D;AAC1D,eAAO,MAAM,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,EAMlF,CAAC;AAkCF,6FAA6F;AAC7F,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAI7C;AAED,sIAAsI;AACtI,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAGhD;AAED,yEAAyE;AACzE,eAAO,MAAM,eAAe,IAAI,CAAC;AAuFjC,kHAAkH;AAClH,eAAO,MAAM,YAAY,EAAE,SAAS,aAAa,EAAgD,CAAC;AA8HlG,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAmB3D;AAkDD,6BAA6B;AAC7B,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CA+DpD"}