adr-kit 0.9.0 → 0.10.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.
- package/README.md +18 -5
- package/README.zh.md +14 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/completion.js +2 -2
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/graph.d.ts +1 -0
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/graph.js +4 -1
- package/dist/commands/graph.js.map +1 -1
- package/dist/commands/tree.d.ts +1 -1
- package/dist/commands/tree.d.ts.map +1 -1
- package/dist/commands/tree.js +4 -1
- package/dist/commands/tree.js.map +1 -1
- package/dist/core/canvas-view.d.ts +5 -0
- package/dist/core/canvas-view.d.ts.map +1 -0
- package/dist/core/canvas-view.js +121 -0
- package/dist/core/canvas-view.js.map +1 -0
- package/dist/core/deliberation-html.d.ts +4 -0
- package/dist/core/deliberation-html.d.ts.map +1 -0
- package/dist/core/deliberation-html.js +81 -0
- package/dist/core/deliberation-html.js.map +1 -0
- package/dist/core/deliberation-view.d.ts +4 -0
- package/dist/core/deliberation-view.d.ts.map +1 -0
- package/dist/core/deliberation-view.js +508 -0
- package/dist/core/deliberation-view.js.map +1 -0
- package/dist/core/deliberation.d.ts +26 -7
- package/dist/core/deliberation.d.ts.map +1 -1
- package/dist/core/deliberation.js +165 -35
- package/dist/core/deliberation.js.map +1 -1
- package/dist/core/graph-html.d.ts +8 -0
- package/dist/core/graph-html.d.ts.map +1 -0
- package/dist/core/graph-html.js +180 -0
- package/dist/core/graph-html.js.map +1 -0
- package/dist/core/graph-view.d.ts +3 -0
- package/dist/core/graph-view.d.ts.map +1 -0
- package/dist/core/graph-view.js +258 -0
- package/dist/core/graph-view.js.map +1 -0
- package/dist/core/graph.d.ts +4 -1
- package/dist/core/graph.d.ts.map +1 -1
- package/dist/core/graph.js +11 -2
- package/dist/core/graph.js.map +1 -1
- package/dist/core/repository.d.ts.map +1 -1
- package/dist/core/repository.js +6 -2
- package/dist/core/repository.js.map +1 -1
- package/dist/core/templates.d.ts +8 -3
- package/dist/core/templates.d.ts.map +1 -1
- package/dist/core/templates.js +10 -2
- package/dist/core/templates.js.map +1 -1
- package/dist/core/tool-integrations.d.ts.map +1 -1
- package/dist/core/tool-integrations.js +37 -5
- package/dist/core/tool-integrations.js.map +1 -1
- package/dist/core/validate.d.ts.map +1 -1
- package/dist/core/validate.js +31 -1
- package/dist/core/validate.js.map +1 -1
- package/dist/core/view-text.d.ts +14 -0
- package/dist/core/view-text.d.ts.map +1 -0
- package/dist/core/view-text.js +77 -0
- package/dist/core/view-text.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,16 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* stored as a nested Markdown list so it stays diffable and readable, and
|
|
4
|
-
* rendered to mermaid or text on demand. Mermaid is never the source of truth.
|
|
5
|
-
*/
|
|
1
|
+
import { renderCardTree } from './deliberation-html.js';
|
|
2
|
+
import { wrapText } from './view-text.js';
|
|
6
3
|
const BULLET = /^(\s*)-\s+(.*?)\s*$/;
|
|
7
|
-
const STATUS = /\
|
|
4
|
+
const STATUS = /\[(settled|rejected|open)\]/i;
|
|
5
|
+
const RECOMMENDED = /\(recommended\)\s*$/i;
|
|
6
|
+
const TYPE = /^([QA]):\s+/i;
|
|
7
|
+
const EM_DASH = ' \u2014 ';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Split a trailing ` — reason` off the node text. The em dash with spaces is
|
|
10
|
+
* the only separator the grammar reserves, which leaves a hyphen free for
|
|
11
|
+
* prose: a ` - ` inside the text can never cut the state or the recommendation
|
|
12
|
+
* into the reason.
|
|
13
13
|
*/
|
|
14
|
+
function splitReason(raw) {
|
|
15
|
+
const emDash = raw.lastIndexOf(EM_DASH);
|
|
16
|
+
if (emDash === -1)
|
|
17
|
+
return { content: raw };
|
|
18
|
+
return { content: raw.slice(0, emDash).trimEnd(), reason: raw.slice(emDash + EM_DASH.length).trim() };
|
|
19
|
+
}
|
|
20
|
+
/** Parse one bullet from the end inward, so a reason never hides the status. */
|
|
21
|
+
function parseNodeText(raw) {
|
|
22
|
+
const split = splitReason(raw);
|
|
23
|
+
let content = split.content;
|
|
24
|
+
const reason = split.reason;
|
|
25
|
+
let recommended;
|
|
26
|
+
if (RECOMMENDED.test(content)) {
|
|
27
|
+
recommended = true;
|
|
28
|
+
content = content.replace(RECOMMENDED, '').trimEnd();
|
|
29
|
+
}
|
|
30
|
+
let status;
|
|
31
|
+
const statusMatch = content.match(STATUS);
|
|
32
|
+
if (statusMatch !== null && statusMatch.index !== undefined) {
|
|
33
|
+
status = statusMatch[1].toLowerCase();
|
|
34
|
+
content = (content.slice(0, statusMatch.index) + content.slice(statusMatch.index + statusMatch[0].length)).trim();
|
|
35
|
+
}
|
|
36
|
+
let type;
|
|
37
|
+
const typeMatch = content.match(TYPE);
|
|
38
|
+
if (typeMatch !== null) {
|
|
39
|
+
type = typeMatch[1].toUpperCase() === 'Q' ? 'question' : 'option';
|
|
40
|
+
content = content.slice(typeMatch[0].length).trim();
|
|
41
|
+
}
|
|
42
|
+
const text = content.trim();
|
|
43
|
+
if (text.length === 0)
|
|
44
|
+
return undefined;
|
|
45
|
+
const node = { text };
|
|
46
|
+
if (type !== undefined)
|
|
47
|
+
node.type = type;
|
|
48
|
+
if (status !== undefined)
|
|
49
|
+
node.status = status;
|
|
50
|
+
if (recommended !== undefined)
|
|
51
|
+
node.recommended = recommended;
|
|
52
|
+
if (reason !== undefined && reason.length > 0)
|
|
53
|
+
node.reason = reason;
|
|
54
|
+
return node;
|
|
55
|
+
}
|
|
14
56
|
export function parseDeliberation(body) {
|
|
15
57
|
if (body === undefined)
|
|
16
58
|
return [];
|
|
@@ -21,18 +63,18 @@ export function parseDeliberation(body) {
|
|
|
21
63
|
if (match === null)
|
|
22
64
|
continue;
|
|
23
65
|
const indent = match[1].replace(/\t/g, ' ').length;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const statusMatch = text.match(STATUS);
|
|
27
|
-
if (statusMatch !== null && statusMatch.index !== undefined) {
|
|
28
|
-
status = statusMatch[1].toLowerCase();
|
|
29
|
-
text = text.slice(0, statusMatch.index).trim();
|
|
30
|
-
}
|
|
31
|
-
if (text.length === 0)
|
|
66
|
+
const parsed = parseNodeText(match[2]);
|
|
67
|
+
if (parsed === undefined)
|
|
32
68
|
continue;
|
|
33
|
-
const node = { text, children: [] };
|
|
34
|
-
if (
|
|
35
|
-
node.
|
|
69
|
+
const node = { text: parsed.text, children: [] };
|
|
70
|
+
if (parsed.type !== undefined)
|
|
71
|
+
node.type = parsed.type;
|
|
72
|
+
if (parsed.status !== undefined)
|
|
73
|
+
node.status = parsed.status;
|
|
74
|
+
if (parsed.recommended !== undefined)
|
|
75
|
+
node.recommended = parsed.recommended;
|
|
76
|
+
if (parsed.reason !== undefined)
|
|
77
|
+
node.reason = parsed.reason;
|
|
36
78
|
while (stack.length > 0 && stack[stack.length - 1].indent >= indent)
|
|
37
79
|
stack.pop();
|
|
38
80
|
const parent = stack[stack.length - 1];
|
|
@@ -44,39 +86,127 @@ export function parseDeliberation(body) {
|
|
|
44
86
|
}
|
|
45
87
|
return roots;
|
|
46
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* True when the body parses to at least one node: the same predicate `tree`
|
|
91
|
+
* renders by, so a marker can never promise a tree the command refuses.
|
|
92
|
+
*/
|
|
93
|
+
export function hasDeliberationTree(body) {
|
|
94
|
+
return parseDeliberation(body).length > 0;
|
|
95
|
+
}
|
|
96
|
+
/** Explicit Q:/A:, else children decide. */
|
|
97
|
+
function typeOf(node) {
|
|
98
|
+
if (node.type !== undefined)
|
|
99
|
+
return node.type;
|
|
100
|
+
return node.children.length > 0 ? 'question' : 'option';
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A question whose answer (its settled child) is not the option the agent
|
|
104
|
+
* recommended. Unknown unless both a settled child and a recommended child
|
|
105
|
+
* exist.
|
|
106
|
+
*/
|
|
107
|
+
function isOverride(node) {
|
|
108
|
+
const settled = node.children.filter((child) => child.status === 'settled');
|
|
109
|
+
const recommended = node.children.filter((child) => child.recommended === true);
|
|
110
|
+
if (settled.length === 0 || recommended.length === 0)
|
|
111
|
+
return false;
|
|
112
|
+
return !settled.some((child) => child.recommended === true);
|
|
113
|
+
}
|
|
114
|
+
function markers(node) {
|
|
115
|
+
const parts = [];
|
|
116
|
+
if (node.status !== undefined)
|
|
117
|
+
parts.push('[' + node.status + ']');
|
|
118
|
+
if (node.recommended === true)
|
|
119
|
+
parts.push('(recommended)');
|
|
120
|
+
if (isOverride(node))
|
|
121
|
+
parts.push('(override)');
|
|
122
|
+
if (node.reason !== undefined)
|
|
123
|
+
parts.push('\u2014 ' + node.reason);
|
|
124
|
+
return parts.join(' ');
|
|
125
|
+
}
|
|
47
126
|
export function renderDeliberationText(nodes) {
|
|
48
127
|
const lines = [];
|
|
49
128
|
const walk = (list, depth) => {
|
|
50
129
|
for (const node of list) {
|
|
51
|
-
const
|
|
52
|
-
|
|
130
|
+
const prefix = depth === 0 && node.type === undefined ? '' : (typeOf(node) === 'question' ? 'Q: ' : 'A: ');
|
|
131
|
+
const suffix = markers(node);
|
|
132
|
+
lines.push(' '.repeat(depth) + '- ' + prefix + node.text + (suffix.length > 0 ? ' ' + suffix : ''));
|
|
53
133
|
walk(node.children, depth + 1);
|
|
54
134
|
}
|
|
55
135
|
};
|
|
56
136
|
walk(nodes, 0);
|
|
57
137
|
return lines.join('\n');
|
|
58
138
|
}
|
|
139
|
+
function escapeLabel(text) {
|
|
140
|
+
return text.replace(/"/g, "'");
|
|
141
|
+
}
|
|
142
|
+
/** Wrap a long label for mermaid's HTML labels. */
|
|
143
|
+
function wrapLabel(text, width = 48) {
|
|
144
|
+
return wrapText(text, width).join('<br/>');
|
|
145
|
+
}
|
|
59
146
|
export function renderDeliberationMermaid(nodes) {
|
|
60
|
-
const
|
|
61
|
-
const byStatus = { settled: [], rejected: [], open: [] };
|
|
147
|
+
const entries = [];
|
|
62
148
|
let counter = 0;
|
|
63
|
-
const
|
|
149
|
+
const collect = (list, parentId, depth) => {
|
|
64
150
|
for (const node of list) {
|
|
65
|
-
const id =
|
|
66
|
-
|
|
151
|
+
const id = 'n' + (++counter);
|
|
152
|
+
const entry = { id, node, isRoot: depth === 0 && node.type === undefined };
|
|
67
153
|
if (parentId !== undefined)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
walk(node.children, id);
|
|
154
|
+
entry.parentId = parentId;
|
|
155
|
+
entries.push(entry);
|
|
156
|
+
collect(node.children, id, depth + 1);
|
|
72
157
|
}
|
|
73
158
|
};
|
|
74
|
-
|
|
75
|
-
lines
|
|
159
|
+
collect(nodes, undefined, 0);
|
|
160
|
+
const lines = ['graph TD'];
|
|
161
|
+
const labelOf = (node) => wrapLabel(escapeLabel(node.reason === undefined ? node.text : node.text + ' \u2014 ' + node.reason));
|
|
162
|
+
for (const entry of entries) {
|
|
163
|
+
const label = labelOf(entry.node);
|
|
164
|
+
const shape = entry.isRoot
|
|
165
|
+
? '(["' + label + '"])'
|
|
166
|
+
: (typeOf(entry.node) === 'question' ? '{{"' + label + '"}}' : '["' + label + '"]');
|
|
167
|
+
lines.push(' ' + entry.id + shape);
|
|
168
|
+
}
|
|
169
|
+
// A settled non-root node unlocks its follow-up questions. Unsettled
|
|
170
|
+
// branches retain ordinary edges rather than claiming frontier progress.
|
|
171
|
+
const byId = new Map(entries.map((entry) => [entry.id, entry]));
|
|
172
|
+
const unlockEdges = [];
|
|
173
|
+
let edgeIndex = 0;
|
|
174
|
+
for (const entry of entries) {
|
|
175
|
+
if (entry.parentId === undefined)
|
|
176
|
+
continue;
|
|
177
|
+
const parent = byId.get(entry.parentId);
|
|
178
|
+
lines.push(' ' + entry.parentId + ' --> ' + entry.id);
|
|
179
|
+
if (typeOf(entry.node) === 'question' && !parent.isRoot && parent.node.status === 'settled') {
|
|
180
|
+
unlockEdges.push(edgeIndex);
|
|
181
|
+
}
|
|
182
|
+
edgeIndex++;
|
|
183
|
+
}
|
|
184
|
+
const byStatus = { settled: [], rejected: [], open: [] };
|
|
185
|
+
const recommended = [];
|
|
186
|
+
const overridden = [];
|
|
187
|
+
for (const entry of entries) {
|
|
188
|
+
if (entry.node.status !== undefined)
|
|
189
|
+
byStatus[entry.node.status].push(entry.id);
|
|
190
|
+
if (entry.node.recommended === true)
|
|
191
|
+
recommended.push(entry.id);
|
|
192
|
+
if (isOverride(entry.node))
|
|
193
|
+
overridden.push(entry.id);
|
|
194
|
+
}
|
|
195
|
+
lines.push(' classDef settled fill:#dcfce7,stroke:#16a34a;', ' classDef rejected fill:#fee2e2,stroke:#dc2626;', ' classDef open fill:#fef9c3,stroke:#ca8a04;', ' classDef recommended stroke-width:3px;', ' classDef override stroke:#7c3aed,stroke-width:2px,stroke-dasharray:4 2;');
|
|
76
196
|
for (const status of ['settled', 'rejected', 'open']) {
|
|
77
197
|
if (byStatus[status].length > 0)
|
|
78
|
-
lines.push(
|
|
198
|
+
lines.push(' class ' + byStatus[status].join(',') + ' ' + status + ';');
|
|
79
199
|
}
|
|
200
|
+
if (recommended.length > 0)
|
|
201
|
+
lines.push(' class ' + recommended.join(',') + ' recommended;');
|
|
202
|
+
if (overridden.length > 0)
|
|
203
|
+
lines.push(' class ' + overridden.join(',') + ' override;');
|
|
204
|
+
if (unlockEdges.length > 0)
|
|
205
|
+
lines.push(' linkStyle ' + unlockEdges.join(',') + ' stroke:#7c3aed,stroke-width:3px;');
|
|
80
206
|
return lines.join('\n');
|
|
81
207
|
}
|
|
208
|
+
/** An offline HTML view; the annotated outline remains the source. */
|
|
209
|
+
export function renderDeliberationHtml(nodes, title) {
|
|
210
|
+
return renderCardTree(nodes, title);
|
|
211
|
+
}
|
|
82
212
|
//# sourceMappingURL=deliberation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliberation.js","sourceRoot":"","sources":["../../src/core/deliberation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deliberation.js","sourceRoot":"","sources":["../../src/core/deliberation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA0C1C,MAAM,MAAM,GAAG,qBAAqB,CAAC;AACrC,MAAM,MAAM,GAAG,8BAA8B,CAAC;AAC9C,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,MAAM,IAAI,GAAG,cAAc,CAAC;AAC5B,MAAM,OAAO,GAAG,UAAU,CAAC;AAE3B;;;;;GAKG;AACH,SAAS,WAAW,CAAC,GAAW;IAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,MAAM,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC3C,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AACxG,CAAC;AAED,gFAAgF;AAChF,SAAS,aAAa,CAAC,GAAW;IAChC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC5B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,IAAI,WAAgC,CAAC;IACrC,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,WAAW,GAAG,IAAI,CAAC;QACnB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,WA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ACR,iDAAiD,EACjD,kDAAkD,EAClD,8CAA8C,EAC9C,0CAA0C,EAC1C,2EAA2E,CAC5E,CAAC;IACF,KAAK,MAAM,MAAM,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,CAAU,EAAE,CAAC;QAC9D,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,CAAC,CAAC;IAC5G,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC;IAC7F,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC;IACxF,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,mCAAmC,CAAC,CAAC;IACrH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,sBAAsB,CAAC,KAAyB,EAAE,KAAa;IAC7E,OAAO,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DecisionGraph } from './graph.js';
|
|
2
|
+
/**
|
|
3
|
+
* Render a decision graph as one self-contained, offline HTML map. The layout
|
|
4
|
+
* is computed here, at generation time, so the page needs no network, no CDN,
|
|
5
|
+
* and no runtime; every node links to its record file.
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderDecisionMapHtml(graph: DecisionGraph, title?: string): string;
|
|
8
|
+
//# sourceMappingURL=graph-html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-html.d.ts","sourceRoot":"","sources":["../../src/core/graph-html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,YAAY,CAAC;AAoItE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,SAAiB,GAAG,MAAM,CAwD1F"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { TAG_COLORS } from './graph.js';
|
|
2
|
+
import { MAP_STYLE } from './graph-view.js';
|
|
3
|
+
import { CANVAS_HINT, CANVAS_SCRIPT, canvasControlsHTML } from './canvas-view.js';
|
|
4
|
+
import { escapeHtml, wrapText } from './view-text.js';
|
|
5
|
+
const CARD_W = 248;
|
|
6
|
+
const PAD_X = 16;
|
|
7
|
+
const PAD_Y = 14;
|
|
8
|
+
const META_H = 16;
|
|
9
|
+
const TITLE_H = 18;
|
|
10
|
+
const FOOTER_H = 14;
|
|
11
|
+
const GAP = 6;
|
|
12
|
+
const LINE_CHARS = 30;
|
|
13
|
+
const COL_GAP = 96;
|
|
14
|
+
const NODE_GAP = 22;
|
|
15
|
+
const TOP = 72;
|
|
16
|
+
const LEFT = 28;
|
|
17
|
+
const BOTTOM = 30;
|
|
18
|
+
/** The graph title keeps its "N " prefix; the card shows the number separately. */
|
|
19
|
+
function displayTitle(node) {
|
|
20
|
+
return node.title.replace(/^\d+\s+/, '');
|
|
21
|
+
}
|
|
22
|
+
/** Chronological `created` groups; each becomes one column. */
|
|
23
|
+
function groupByDate(nodes) {
|
|
24
|
+
const groups = new Map();
|
|
25
|
+
for (const node of nodes) {
|
|
26
|
+
const group = groups.get(node.created);
|
|
27
|
+
if (group === undefined)
|
|
28
|
+
groups.set(node.created, [node]);
|
|
29
|
+
else
|
|
30
|
+
group.push(node);
|
|
31
|
+
}
|
|
32
|
+
return [...groups.entries()].sort(([a], [b]) => a.localeCompare(b));
|
|
33
|
+
}
|
|
34
|
+
function layout(graph) {
|
|
35
|
+
const columns = [];
|
|
36
|
+
const placed = [];
|
|
37
|
+
let x = LEFT;
|
|
38
|
+
let bottom = TOP;
|
|
39
|
+
for (const [date, nodes] of groupByDate(graph.nodes)) {
|
|
40
|
+
columns.push({ date, x, count: nodes.length });
|
|
41
|
+
let y = TOP;
|
|
42
|
+
for (const node of nodes) {
|
|
43
|
+
const lines = wrapText(displayTitle(node), LINE_CHARS);
|
|
44
|
+
const footer = node.tags.length > 0 || node.hasDeliberation ? GAP + FOOTER_H : 0;
|
|
45
|
+
const height = PAD_Y * 2 + META_H + GAP + lines.length * TITLE_H + footer;
|
|
46
|
+
placed.push({ node, x, y, height, lines });
|
|
47
|
+
y += height + NODE_GAP;
|
|
48
|
+
}
|
|
49
|
+
bottom = Math.max(bottom, y - NODE_GAP);
|
|
50
|
+
x += CARD_W + COL_GAP;
|
|
51
|
+
}
|
|
52
|
+
const width = columns.length === 0 ? 320 : x - COL_GAP + LEFT;
|
|
53
|
+
return { placed, columns, width, height: bottom + BOTTOM };
|
|
54
|
+
}
|
|
55
|
+
/** Assign each first tag a stable color, in order of first appearance. */
|
|
56
|
+
function tagColors(nodes) {
|
|
57
|
+
const colors = new Map();
|
|
58
|
+
for (const node of nodes) {
|
|
59
|
+
if (node.status === 'superseded')
|
|
60
|
+
continue;
|
|
61
|
+
const tag = node.tags[0];
|
|
62
|
+
if (tag === undefined || colors.has(tag))
|
|
63
|
+
continue;
|
|
64
|
+
colors.set(tag, TAG_COLORS[colors.size % TAG_COLORS.length]);
|
|
65
|
+
}
|
|
66
|
+
return colors;
|
|
67
|
+
}
|
|
68
|
+
/** A left-to-right cubic curve between a source card's right and a target's left edge. */
|
|
69
|
+
function edgePath(from, to) {
|
|
70
|
+
const sx = from.x + CARD_W;
|
|
71
|
+
const sy = from.y + from.height / 2;
|
|
72
|
+
const tx = to.x;
|
|
73
|
+
const ty = to.y + to.height / 2;
|
|
74
|
+
const bend = Math.max(40, Math.abs(tx - sx) * 0.4);
|
|
75
|
+
return 'M' + sx + ',' + sy + ' C' + (sx + bend) + ',' + sy + ' ' + (tx - bend) + ',' + ty + ' ' + tx + ',' + ty;
|
|
76
|
+
}
|
|
77
|
+
function nodeMarkup(placed, colors) {
|
|
78
|
+
const { node, x, y, height, lines } = placed;
|
|
79
|
+
const classes = ['node'];
|
|
80
|
+
if (node.status === 'superseded')
|
|
81
|
+
classes.push('superseded');
|
|
82
|
+
if (node.hasDeliberation)
|
|
83
|
+
classes.push('has-deliberation');
|
|
84
|
+
const firstTag = node.tags[0];
|
|
85
|
+
const stroke = node.status === 'superseded'
|
|
86
|
+
? '#c2cabf'
|
|
87
|
+
: (firstTag === undefined ? '#dce4dc' : (colors.get(firstTag) ?? '#dce4dc'));
|
|
88
|
+
const metaY = y + PAD_Y + META_H - 5;
|
|
89
|
+
const titleY = y + PAD_Y + META_H + GAP + TITLE_H - 6;
|
|
90
|
+
const parts = [];
|
|
91
|
+
parts.push('<a href="' + escapeHtml(node.path) + '">');
|
|
92
|
+
parts.push('<g class="' + classes.join(' ') + '" data-adr="' + node.number + '" data-has-deliberation="' + String(node.hasDeliberation) + '">');
|
|
93
|
+
parts.push('<rect x="' + x + '" y="' + y + '" width="' + CARD_W + '" height="' + height + '" rx="12" stroke="' + stroke + '"/>');
|
|
94
|
+
parts.push('<text class="num" x="' + (x + PAD_X) + '" y="' + metaY + '">#' + node.number + '</text>');
|
|
95
|
+
const meta = node.status === 'superseded'
|
|
96
|
+
? (node.supersededBy === undefined ? 'superseded' : 'superseded by ' + node.supersededBy)
|
|
97
|
+
: node.created;
|
|
98
|
+
parts.push('<text class="meta" x="' + (x + CARD_W - PAD_X) + '" y="' + metaY + '" text-anchor="end">' + escapeHtml(meta) + '</text>');
|
|
99
|
+
lines.forEach((line, index) => {
|
|
100
|
+
parts.push('<text class="title" x="' + (x + PAD_X) + '" y="' + (titleY + index * TITLE_H) + '">' + escapeHtml(line) + '</text>');
|
|
101
|
+
});
|
|
102
|
+
if (node.tags.length > 0 || node.hasDeliberation) {
|
|
103
|
+
const footerY = titleY + (lines.length - 1) * TITLE_H + GAP + FOOTER_H - 2;
|
|
104
|
+
if (node.tags.length > 0) {
|
|
105
|
+
const tags = node.tags.slice(0, 3).map((tag) => '#' + tag).join(' ');
|
|
106
|
+
parts.push('<text class="tag" x="' + (x + PAD_X) + '" y="' + footerY + '">' + escapeHtml(tags) + '</text>');
|
|
107
|
+
}
|
|
108
|
+
if (node.hasDeliberation) {
|
|
109
|
+
parts.push('<text class="badge" x="' + (x + CARD_W - PAD_X) + '" y="' + footerY + '" text-anchor="end">deliberation</text>');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
parts.push('</g>');
|
|
113
|
+
parts.push('</a>');
|
|
114
|
+
return parts.join('');
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Render a decision graph as one self-contained, offline HTML map. The layout
|
|
118
|
+
* is computed here, at generation time, so the page needs no network, no CDN,
|
|
119
|
+
* and no runtime; every node links to its record file.
|
|
120
|
+
*/
|
|
121
|
+
export function renderDecisionMapHtml(graph, title = 'Decision map') {
|
|
122
|
+
const { placed, columns, width, height } = layout(graph);
|
|
123
|
+
const colors = tagColors(placed.map((entry) => entry.node));
|
|
124
|
+
const byNumber = new Map(placed.map((entry) => [entry.node.number, entry]));
|
|
125
|
+
const edges = [];
|
|
126
|
+
const drawEdge = (edge, kind) => {
|
|
127
|
+
const from = byNumber.get(edge.from);
|
|
128
|
+
const to = byNumber.get(edge.to);
|
|
129
|
+
if (from === undefined || to === undefined)
|
|
130
|
+
return;
|
|
131
|
+
edges.push('<path class="edge ' + kind + '" d="' + edgePath(from, to) + '" marker-end="url(#arrow-' + kind + ')"/>');
|
|
132
|
+
};
|
|
133
|
+
for (const edge of graph.referenceEdges)
|
|
134
|
+
drawEdge(edge, 'reference');
|
|
135
|
+
for (const edge of graph.supersedeEdges)
|
|
136
|
+
drawEdge(edge, 'supersede');
|
|
137
|
+
const deliberated = graph.nodes.filter((node) => node.hasDeliberation).length;
|
|
138
|
+
const stats = [
|
|
139
|
+
['decisions', graph.nodes.length],
|
|
140
|
+
['supersessions', graph.supersedeEdges.length],
|
|
141
|
+
['references', graph.referenceEdges.length],
|
|
142
|
+
['deliberated', deliberated],
|
|
143
|
+
];
|
|
144
|
+
const svg = [
|
|
145
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ' + width + ' ' + height + '" width="' + width + '" height="' + height + '" role="img" aria-label="Decision map">',
|
|
146
|
+
'<defs>',
|
|
147
|
+
'<marker id="arrow-supersede" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="#294d3e"/></marker>',
|
|
148
|
+
'<marker id="arrow-reference" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="#b6c7ba"/></marker>',
|
|
149
|
+
'</defs>',
|
|
150
|
+
];
|
|
151
|
+
for (const column of columns) {
|
|
152
|
+
svg.push('<text class="date-label" x="' + column.x + '" y="' + (TOP - 30) + '">' + escapeHtml(column.date) + ' (' + column.count + ')</text>');
|
|
153
|
+
}
|
|
154
|
+
svg.push(...edges);
|
|
155
|
+
for (const entry of placed)
|
|
156
|
+
svg.push(nodeMarkup(entry, colors));
|
|
157
|
+
svg.push('</svg>');
|
|
158
|
+
const body = graph.nodes.length === 0 ? '<p class="empty">No decisions yet.</p>' : svg.join('');
|
|
159
|
+
const html = [
|
|
160
|
+
'<!doctype html>',
|
|
161
|
+
'<html lang="en">',
|
|
162
|
+
'<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">',
|
|
163
|
+
'<title>' + escapeHtml(title) + ' — decision map</title><style>' + MAP_STYLE + '</style></head>',
|
|
164
|
+
'<body>',
|
|
165
|
+
'<header><div class="brand"><span class="logo" aria-hidden="true">↳</span> ADR Kit <small>DECISION MAP</small></div></header>',
|
|
166
|
+
'<section class="intro"><div class="eyebrow">DECISIONS / RELATIONSHIP MAP</div><h1>' + escapeHtml(title) + '</h1>',
|
|
167
|
+
'<p>Solid edges supersede; dashed edges are record references. Grouped by the date each decision was created.</p>',
|
|
168
|
+
'<div class="stats">' + stats.map(([label, value]) => '<div class="stat"><strong>' + value + '</strong>' + label + '</div>').join('') + '</div></section>',
|
|
169
|
+
'<main id="viewport" tabindex="0" aria-label="Decision map" aria-describedby="instructions"><div id="world">' + body + '</div>',
|
|
170
|
+
'<div id="instructions" class="hint">' + CANVAS_HINT + '</div>',
|
|
171
|
+
canvasControlsHTML('Fit map'),
|
|
172
|
+
'</main>',
|
|
173
|
+
'<footer><div class="legend"><span><i class="swatch"></i> superseded by</span><span><i class="swatch ref"></i> references</span><span><i class="swatch delib"></i> has deliberation tree</span></div></footer>',
|
|
174
|
+
'<script>' + CANVAS_SCRIPT + '</script>',
|
|
175
|
+
'</body></html>',
|
|
176
|
+
'',
|
|
177
|
+
];
|
|
178
|
+
return html.join('\n');
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=graph-html.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-html.js","sourceRoot":"","sources":["../../src/core/graph-html.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,KAAK,GAAG,EAAE,CAAC;AACjB,MAAM,KAAK,G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