archidocs 0.0.0-stage → 1.2.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 (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +181 -2
  3. package/dist/cli/commands.d.ts +322 -0
  4. package/dist/cli/commands.js +174 -0
  5. package/dist/cli/dev.d.ts +31 -0
  6. package/dist/cli/dev.js +156 -0
  7. package/dist/cli/diff-format.d.ts +9 -0
  8. package/dist/cli/diff-format.js +50 -0
  9. package/dist/cli/format.d.ts +15 -0
  10. package/dist/cli/format.js +64 -0
  11. package/dist/cli/init.d.ts +17 -0
  12. package/dist/cli/init.js +82 -0
  13. package/dist/cli/main.d.ts +2 -0
  14. package/dist/cli/main.js +330 -0
  15. package/dist/core/adr.d.ts +28 -0
  16. package/dist/core/adr.js +88 -0
  17. package/dist/core/adrs.d.ts +20 -0
  18. package/dist/core/adrs.js +86 -0
  19. package/dist/core/catalogue.d.ts +7 -0
  20. package/dist/core/catalogue.js +35 -0
  21. package/dist/core/compare.d.ts +21 -0
  22. package/dist/core/compare.js +62 -0
  23. package/dist/core/deployment-views.d.ts +28 -0
  24. package/dist/core/deployment-views.js +108 -0
  25. package/dist/core/deployments.d.ts +18 -0
  26. package/dist/core/deployments.js +21 -0
  27. package/dist/core/diff.d.ts +44 -0
  28. package/dist/core/diff.js +138 -0
  29. package/dist/core/dynamic-views.d.ts +73 -0
  30. package/dist/core/dynamic-views.js +162 -0
  31. package/dist/core/files.d.ts +2 -0
  32. package/dist/core/files.js +1 -0
  33. package/dist/core/fs.d.ts +19 -0
  34. package/dist/core/fs.js +21 -0
  35. package/dist/core/history-scope.d.ts +40 -0
  36. package/dist/core/history-scope.js +63 -0
  37. package/dist/core/impact.d.ts +34 -0
  38. package/dist/core/impact.js +62 -0
  39. package/dist/core/index.d.ts +20 -0
  40. package/dist/core/index.js +18 -0
  41. package/dist/core/load.d.ts +32 -0
  42. package/dist/core/load.js +465 -0
  43. package/dist/core/model.d.ts +150 -0
  44. package/dist/core/model.js +1 -0
  45. package/dist/core/ownership.d.ts +34 -0
  46. package/dist/core/ownership.js +65 -0
  47. package/dist/core/paths.d.ts +47 -0
  48. package/dist/core/paths.js +115 -0
  49. package/dist/core/query.d.ts +51 -0
  50. package/dist/core/query.js +77 -0
  51. package/dist/core/refs.d.ts +31 -0
  52. package/dist/core/refs.js +50 -0
  53. package/dist/core/rules.d.ts +41 -0
  54. package/dist/core/rules.js +1033 -0
  55. package/dist/core/save-as-view.d.ts +45 -0
  56. package/dist/core/save-as-view.js +114 -0
  57. package/dist/core/saved-views.d.ts +48 -0
  58. package/dist/core/saved-views.js +243 -0
  59. package/dist/core/schema-check.d.ts +13 -0
  60. package/dist/core/schema-check.js +79 -0
  61. package/dist/core/search.d.ts +27 -0
  62. package/dist/core/search.js +63 -0
  63. package/dist/core/suggest.d.ts +3 -0
  64. package/dist/core/suggest.js +30 -0
  65. package/dist/core/views.d.ts +126 -0
  66. package/dist/core/views.js +217 -0
  67. package/dist/core/yaml.d.ts +16 -0
  68. package/dist/core/yaml.js +52 -0
  69. package/dist/git.d.ts +7 -0
  70. package/dist/git.js +23 -0
  71. package/dist/guide/index.d.ts +53 -0
  72. package/dist/guide/index.js +57 -0
  73. package/dist/history/git.d.ts +39 -0
  74. package/dist/history/git.js +126 -0
  75. package/dist/history/index.d.ts +118 -0
  76. package/dist/history/index.js +223 -0
  77. package/dist/history/migrate.d.ts +16 -0
  78. package/dist/history/migrate.js +30 -0
  79. package/dist/mcp/history.d.ts +36 -0
  80. package/dist/mcp/history.js +175 -0
  81. package/dist/mcp/http.d.ts +23 -0
  82. package/dist/mcp/http.js +85 -0
  83. package/dist/mcp/index.d.ts +3 -0
  84. package/dist/mcp/index.js +3 -0
  85. package/dist/mcp/server.d.ts +54 -0
  86. package/dist/mcp/server.js +824 -0
  87. package/dist/mcp/source.d.ts +50 -0
  88. package/dist/mcp/source.js +132 -0
  89. package/dist/mcp/writes.d.ts +10 -0
  90. package/dist/mcp/writes.js +267 -0
  91. package/dist/render/font.d.ts +14 -0
  92. package/dist/render/font.js +11 -0
  93. package/dist/render/index.d.ts +8 -0
  94. package/dist/render/index.js +8 -0
  95. package/dist/render/layout.d.ts +53 -0
  96. package/dist/render/layout.js +199 -0
  97. package/dist/render/node.d.ts +3 -0
  98. package/dist/render/node.js +8 -0
  99. package/dist/render/png.d.ts +11 -0
  100. package/dist/render/png.js +29 -0
  101. package/dist/render/sequence-svg.d.ts +33 -0
  102. package/dist/render/sequence-svg.js +98 -0
  103. package/dist/render/sequence.d.ts +103 -0
  104. package/dist/render/sequence.js +142 -0
  105. package/dist/render/svg.d.ts +36 -0
  106. package/dist/render/svg.js +222 -0
  107. package/dist/render/teams.d.ts +12 -0
  108. package/dist/render/teams.js +31 -0
  109. package/dist/render/text.d.ts +15 -0
  110. package/dist/render/text.js +29 -0
  111. package/dist/render/tokens.d.ts +53 -0
  112. package/dist/render/tokens.js +71 -0
  113. package/dist/schema/adr.d.ts +36 -0
  114. package/dist/schema/adr.js +27 -0
  115. package/dist/schema/bundle.d.ts +726 -0
  116. package/dist/schema/bundle.js +171 -0
  117. package/dist/schema/index.d.ts +4 -0
  118. package/dist/schema/index.js +4 -0
  119. package/dist/schema/json-schema.d.ts +8 -0
  120. package/dist/schema/json-schema.js +19 -0
  121. package/dist/schema/workspace.d.ts +1066 -0
  122. package/dist/schema/workspace.js +271 -0
  123. package/dist/viewer/assets/index-DvKgCpBr.css +1 -0
  124. package/dist/viewer/assets/index-gucix3xm.js +113 -0
  125. package/dist/viewer/assets/index_bg-Blvrv-U2.wasm +0 -0
  126. package/dist/viewer/assets/index_bg-D3t31u3-.js +1 -0
  127. package/dist/viewer/assets/layout.worker-Bg-OaLVN.js +26 -0
  128. package/dist/viewer/assets/overpass-latin-QyaMbcmi.woff2 +0 -0
  129. package/dist/viewer/assets/overpass-latin-ext-DSRhPfzW.woff2 +0 -0
  130. package/dist/viewer/assets/overpass-mono-latin-BTquVRaO.woff2 +0 -0
  131. package/dist/viewer/assets/overpass-mono-latin-ext-D47EiU4_.woff2 +0 -0
  132. package/dist/viewer/assets/png-BDKIXtm5.js +1 -0
  133. package/dist/viewer/assets/svg-Bulv5YWn.js +2 -0
  134. package/dist/viewer/favicon.svg +1 -0
  135. package/dist/viewer/index.html +53 -0
  136. package/dist/writer/adrs.d.ts +21 -0
  137. package/dist/writer/adrs.js +72 -0
  138. package/dist/writer/deployments.d.ts +51 -0
  139. package/dist/writer/deployments.js +145 -0
  140. package/dist/writer/diff.d.ts +6 -0
  141. package/dist/writer/diff.js +77 -0
  142. package/dist/writer/document.d.ts +25 -0
  143. package/dist/writer/document.js +79 -0
  144. package/dist/writer/edit.d.ts +78 -0
  145. package/dist/writer/edit.js +63 -0
  146. package/dist/writer/index.d.ts +67 -0
  147. package/dist/writer/index.js +310 -0
  148. package/dist/writer/overlay.d.ts +7 -0
  149. package/dist/writer/overlay.js +26 -0
  150. package/dist/writer/views.d.ts +29 -0
  151. package/dist/writer/views.js +78 -0
  152. package/dist/writer/workspace.d.ts +25 -0
  153. package/dist/writer/workspace.js +56 -0
  154. package/guide/SKILL.md +36 -0
  155. package/guide/topics/add-service.md +30 -0
  156. package/guide/topics/bootstrap.md +28 -0
  157. package/guide/topics/change.md +32 -0
  158. package/guide/topics/deployments.md +36 -0
  159. package/guide/topics/dynamic-view.md +39 -0
  160. package/guide/topics/propose-adr.md +12 -0
  161. package/guide/topics/relationships.md +39 -0
  162. package/guide/topics/saved-view.md +36 -0
  163. package/package.json +75 -4
  164. package/schemas/adr.schema.json +82 -0
  165. package/schemas/model.schema.json +1381 -0
  166. package/schemas/project.schema.json +24 -0
  167. package/schemas/workspace.schema.json +72 -0
@@ -0,0 +1,142 @@
1
+ import { textWidth } from "./text.js";
2
+ /** Sizes the sequence layout works in, shared by the renderer and the viewer. */
3
+ export const SEQUENCE = {
4
+ /** Height of the participant headers at the top. */
5
+ header: 60,
6
+ /** Gap between the top of the first row and the headers. */
7
+ firstRow: 34,
8
+ /** Least space between two neighbouring headers. */
9
+ columnGap: 40,
10
+ /** Space beside a label inside its arrow's span: the badge and the gaps. */
11
+ labelPad: 56,
12
+ rowHeight: 46,
13
+ /** Extra height for each line under an arrow (the via line, the note). */
14
+ lineHeight: 16,
15
+ /** Activation bar width. */
16
+ bar: 10,
17
+ nameSize: 13,
18
+ labelSize: 12,
19
+ subSize: 11,
20
+ /** Room in a header beside its name: the Team stripe, code and padding. */
21
+ headerPad: 64,
22
+ minColumn: 116,
23
+ maxColumn: 200,
24
+ margin: 24,
25
+ };
26
+ /**
27
+ * The arrows of a Dynamic View in order: one per Step, or with `brokers` a
28
+ * publish leg `na` (publisher → broker) and a deliver leg `nb` (broker →
29
+ * subscriber) per event Step. A fan-out's publish legs aren't merged.
30
+ */
31
+ export function sequenceMessages(view, { brokers = false } = {}) {
32
+ return view.steps.flatMap((step) => {
33
+ const base = {
34
+ n: step.n,
35
+ label: step.description,
36
+ ...(step.via === undefined ? {} : { via: step.via }),
37
+ ...(step.channel === undefined ? {} : { channel: step.channel }),
38
+ ...(step.note === undefined ? {} : { note: step.note }),
39
+ step,
40
+ };
41
+ const style = step.kind === "return" ? "return" : step.interaction;
42
+ if (!brokers || step.kind !== "event" || step.via === undefined)
43
+ return [{ ...base, key: String(step.n), from: step.from, to: step.to, style }];
44
+ return [
45
+ { ...base, key: `${step.n}a`, leg: "a", from: step.from, to: step.via, style },
46
+ { ...base, key: `${step.n}b`, leg: "b", from: step.via, to: step.to, style },
47
+ ];
48
+ });
49
+ }
50
+ /** The participants as columns: with brokers, each broker not already a participant goes right after the publisher of its first event Step. */
51
+ export function sequenceParticipants(view, { brokers = false } = {}) {
52
+ const ids = [...view.participants];
53
+ if (!brokers)
54
+ return ids;
55
+ for (const step of view.steps) {
56
+ if (step.kind !== "event" || step.via === undefined || ids.includes(step.via))
57
+ continue;
58
+ ids.splice(ids.indexOf(step.from) + 1, 0, step.via);
59
+ }
60
+ return ids;
61
+ }
62
+ /** The text under an arrow: the broker and channel of an event Step drawn whole. */
63
+ export const viaLine = (m, name) => m.via === undefined || m.leg !== undefined ? undefined : ["via " + name(m.via), ...(m.channel === undefined ? [] : [m.channel])].join(" · ");
64
+ /**
65
+ * Lays out a Dynamic View as a sequence chart, as a pure function: one row
66
+ * per message, one column per participant in order, and each lifeline's x
67
+ * from one longest-path pass over lower bounds (its left neighbour's header,
68
+ * and the label of each arrow that ends at it), so no solver is needed.
69
+ */
70
+ export function layoutSequence(view, options) {
71
+ const S = SEQUENCE;
72
+ const messages = sequenceMessages(view, options);
73
+ const ids = sequenceParticipants(view, options);
74
+ const index = new Map(ids.map((id, i) => [id, i]));
75
+ const widths = ids.map((id) => Math.min(S.maxColumn, Math.max(S.minColumn, textWidth(options.name(id), S.nameSize, 700) + S.headerPad)));
76
+ const labelWidths = messages.map((m) => {
77
+ const via = viaLine(m, options.name);
78
+ return Math.max(textWidth(m.label, S.labelSize), via ? textWidth(via, S.subSize) : 0, m.note ? textWidth(m.note, S.subSize) : 0);
79
+ });
80
+ // Lower bounds on each column's x from the arrows ending at it, keyed by the right-hand column.
81
+ const bounds = ids.map(() => []);
82
+ messages.forEach((m, i) => {
83
+ const [a, b] = [index.get(m.from), index.get(m.to)];
84
+ if (a !== b)
85
+ bounds[Math.max(a, b)].push({ left: Math.min(a, b), gap: labelWidths[i] + S.labelPad });
86
+ });
87
+ const xs = [];
88
+ ids.forEach((_, j) => {
89
+ let x = j === 0 ? S.margin + widths[0] / 2 : xs[j - 1] + widths[j - 1] / 2 + widths[j] / 2 + S.columnGap;
90
+ for (const b of bounds[j])
91
+ x = Math.max(x, xs[b.left] + b.gap);
92
+ xs.push(x);
93
+ });
94
+ const columns = ids.map((id, i) => ({ id, x: xs[i], width: widths[i] }));
95
+ // y: one band per message, taller for each line under the arrow.
96
+ let cursor = S.header + S.firstRow;
97
+ const bands = messages.map((m) => {
98
+ const lines = (viaLine(m, options.name) ? 1 : 0) + (m.note ? 1 : 0);
99
+ const band = { top: cursor, y: cursor + 26, height: S.rowHeight + lines * S.lineHeight };
100
+ cursor += band.height;
101
+ return band;
102
+ });
103
+ // Activation bars: a sync call opens one on its callee; the return from it closes the latest still open.
104
+ const open = new Map();
105
+ const activations = [];
106
+ const lastSend = new Map();
107
+ messages.forEach((m, i) => lastSend.set(m.from, bands[i].y));
108
+ messages.forEach((m, i) => {
109
+ const y = bands[i].y;
110
+ if (m.style === "return") {
111
+ const bar = open.get(m.from)?.pop();
112
+ if (bar)
113
+ activations.push({ participant: m.from, top: bar.top, bottom: y, depth: bar.depth });
114
+ }
115
+ else if (m.style === "sync") {
116
+ const stack = open.get(m.to) ?? [];
117
+ stack.push({ top: y, depth: stack.length });
118
+ open.set(m.to, stack);
119
+ }
120
+ });
121
+ // A call never returned stays busy until the callee's last send, and at least a short stub.
122
+ for (const [participant, stack] of open)
123
+ for (const bar of stack)
124
+ activations.push({ participant, top: bar.top, bottom: Math.max(bar.top + 18, lastSend.get(participant) ?? 0), depth: bar.depth });
125
+ activations.sort((a, b) => a.top - b.top || a.participant.localeCompare(b.participant));
126
+ /** Where an arrow meets a participant at y: the edge of its deepest open bar on the arrow's side, else its lifeline. */
127
+ const edgeAt = (id, y, side) => {
128
+ const x = xs[index.get(id)];
129
+ const busy = activations.filter((a) => a.participant === id && a.top <= y && y <= a.bottom);
130
+ if (busy.length === 0)
131
+ return x;
132
+ const depth = Math.max(...busy.map((a) => a.depth));
133
+ return side === "left" ? x - S.bar / 2 : x + S.bar / 2 + (depth * S.bar) / 2;
134
+ };
135
+ const rows = messages.map((m, i) => {
136
+ const { top, y, height } = bands[i];
137
+ const rightward = xs[index.get(m.to)] > xs[index.get(m.from)];
138
+ return { ...m, top, y, height, x1: edgeAt(m.from, y, rightward ? "right" : "left"), x2: edgeAt(m.to, y, rightward ? "left" : "right"), labelWidth: labelWidths[i] };
139
+ });
140
+ const last = columns.at(-1);
141
+ return { columns, rows, activations, width: last ? last.x + last.width / 2 + S.margin : 2 * S.margin, height: cursor + 30 };
142
+ }
@@ -0,0 +1,36 @@
1
+ import type { ResolvedView } from "../core/views.ts";
2
+ import type { Bundle } from "../schema/bundle.ts";
3
+ import type { Layout } from "./layout.ts";
4
+ import { type TeamStyle } from "./teams.ts";
5
+ import { type Palette, type Theme } from "./tokens.ts";
6
+ /** Where a picture comes from, for its source line: the Workspace's name, the commit and its date (both null before the first commit). */
7
+ export interface RenderSource {
8
+ workspace: string;
9
+ commit: string | null;
10
+ date: string | null;
11
+ }
12
+ export interface RenderInput {
13
+ /** The Bundle the View was resolved from: it gives each node's Owner, Team and technology. */
14
+ bundle: Bundle;
15
+ view: ResolvedView;
16
+ layout: Layout;
17
+ source: RenderSource;
18
+ /** The palette: the viewer's light tokens (the default) or its Night shift dark ones. */
19
+ theme?: Theme;
20
+ /** Replaces the source line under the title, such as `Big Bank · v1.2.0`. */
21
+ label?: string;
22
+ }
23
+ /** The line under a picture's title: the label if given, else the Workspace, short commit and date. */
24
+ export declare const sourceLine: (source: RenderSource, label?: string) => string;
25
+ /** The `<svg>` open tag, embedded fonts and background every picture starts with. */
26
+ export declare const opening: (width: number, height: number, ground: string, defs: string) => string[];
27
+ /**
28
+ * Draws a laid-out View as one SVG document in the viewer's Wayfinding Plate
29
+ * look: the title and source line, the nodes and edges, and a key. It is a
30
+ * pure function of its input, so the same View at the same commit always
31
+ * gives the same bytes; it needs no DOM, and runs in Node and the browser alike.
32
+ * Nothing in it is faded: what a Lens leaves out steps back to solid faint colours.
33
+ */
34
+ export declare function renderSvg({ bundle, view, layout, source, theme, label }: RenderInput): string;
35
+ /** A reversed Team code tile with the Team colour as its leading band, its right edge at `right`. */
36
+ export declare function codeTile(c: Palette, team: TeamStyle, right: number, top: number): string;
@@ -0,0 +1,222 @@
1
+ import { describeLens } from "../core/saved-views.js";
2
+ import { FONT_FAMILY, FONTS } from "./font.js";
3
+ import { teamStyles } from "./teams.js";
4
+ import { cut, fmt, text, textWidth } from "./text.js";
5
+ import { flatten, PALETTES } from "./tokens.js";
6
+ const PAD = 24;
7
+ const HEADER = 72;
8
+ const KEY = 44;
9
+ /** Every frame, as the viewer draws it. */
10
+ const FRAME = 1.5;
11
+ /** A node's Team-coloured left edge. */
12
+ const EDGE = 6;
13
+ /** The line under a picture's title: the label if given, else the Workspace, short commit and date. */
14
+ export const sourceLine = (source, label) => label ?? [source.workspace, source.commit?.slice(0, 7) ?? "uncommitted", ...(source.date ? [source.date.slice(0, 10)] : [])].join(" · ");
15
+ /** The `<svg>` open tag, embedded fonts and background every picture starts with. */
16
+ export const opening = (width, height, ground, defs) => [
17
+ `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" font-family="${FONT_FAMILY}, sans-serif">`,
18
+ `<style>${FONTS.map((f) => `@font-face{font-family:"${FONT_FAMILY}";font-weight:${f.weight};src:url(data:font/ttf;base64,${f.base64}) format("truetype")}`).join("")}</style>`,
19
+ `<defs>${defs}</defs>`,
20
+ `<rect width="${width}" height="${height}" fill="${ground}"/>`,
21
+ ];
22
+ /**
23
+ * Draws a laid-out View as one SVG document in the viewer's Wayfinding Plate
24
+ * look: the title and source line, the nodes and edges, and a key. It is a
25
+ * pure function of its input, so the same View at the same commit always
26
+ * gives the same bytes; it needs no DOM, and runs in Node and the browser alike.
27
+ * Nothing in it is faded: what a Lens leaves out steps back to solid faint colours.
28
+ */
29
+ export function renderSvg({ bundle, view, layout, source, theme = "light", label }) {
30
+ const c = PALETTES[theme];
31
+ const elements = new Map(bundle.elements.map((e) => [e.id, e]));
32
+ const targets = new Map(bundle.targets.map((t) => [t.id, t]));
33
+ const teams = teamStyles(bundle);
34
+ const boxes = new Map(layout.nodes.map((n) => [n.id, n]));
35
+ const containers = new Set(view.nodes.map((n) => n.parent).filter((p) => p !== null));
36
+ const title = view.title;
37
+ const subtitle = sourceLine(source, label);
38
+ const key = drawKey(c, view.lens);
39
+ const width = Math.ceil(Math.max(layout.width, key.width, textWidth(title, 20, 700), textWidth(subtitle, 12)) + 2 * PAD);
40
+ const height = Math.ceil(HEADER + layout.height + PAD + KEY);
41
+ const depth = (n) => (n.parent === null ? 0 : 1 + depth(view.nodes.find((p) => p.id === n.parent)));
42
+ const byDepth = view.nodes.map((n) => ({ n, d: depth(n) })).sort((a, b) => a.d - b.d).map(({ n }) => n);
43
+ const ring = view.lens !== undefined && "team" in view.lens;
44
+ let clips = 0;
45
+ const drawn = (n) => {
46
+ const box = boxes.get(n.id);
47
+ const element = elements.get(n.element ?? n.id);
48
+ const target = n.kind === "target" ? targets.get(n.id) : undefined;
49
+ const team = teams.get(element?.owner ?? target?.owner ?? "");
50
+ return containers.has(n.id) ? drawContainer(c, n, box, team, target?.kind) : drawNode(c, n, box, element, team, ring, `clip-${clips++}`);
51
+ };
52
+ return [
53
+ ...opening(width, height, c.ground, `${marker("arrow", c.edge)}${view.lens ? marker("arrow-faint", c["edge-faint"]) + marker("arrow-lit", c.ink) : ""}${brokerPattern(c)}`),
54
+ text(PAD, 34, title, { size: 20, fill: c.ink, weight: 700 }),
55
+ text(PAD, 56, subtitle, { size: 12, fill: c.muted }),
56
+ `<g transform="translate(${PAD},${HEADER})">`,
57
+ ...byDepth.filter((n) => containers.has(n.id)).map(drawn),
58
+ ...layout.edges.map((e) => drawEdge(c, e.points, view.edges.find((v) => v.from === e.from && v.to === e.to))),
59
+ ...byDepth.filter((n) => !containers.has(n.id)).map(drawn),
60
+ `</g>`,
61
+ `<g transform="translate(${PAD},${fmt(HEADER + layout.height + PAD)})">`,
62
+ ...key.parts,
63
+ `</g>`,
64
+ `</svg>`,
65
+ "",
66
+ ].join("\n");
67
+ }
68
+ const marker = (id, fill) => `<marker id="${id}" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="${fill}"/></marker>`;
69
+ /** A broker's vertical stripes, in the rule colour. */
70
+ const brokerPattern = (c) => `<pattern id="broker" width="12" height="12" patternUnits="userSpaceOnUse"><rect x="8" width="4" height="12" fill="${c.rule}"/></pattern>`;
71
+ /** A rectangle with its own radius per corner (top-left, top-right, bottom-right, bottom-left), as a path. */
72
+ function shape(x, y, w, h, [tl, tr, br, bl]) {
73
+ const arc = (r, x2, y2) => (r ? `A${fmt(r)},${fmt(r)} 0 0 1 ${fmt(x2)},${fmt(y2)} ` : "");
74
+ return (`M${fmt(x + tl)},${fmt(y)} L${fmt(x + w - tr)},${fmt(y)} ${arc(tr, x + w, y + tr)}` +
75
+ `L${fmt(x + w)},${fmt(y + h - br)} ${arc(br, x + w - br, y + h)}` +
76
+ `L${fmt(x + bl)},${fmt(y + h)} ${arc(bl, x, y + h - bl)}` +
77
+ `L${fmt(x)},${fmt(y + tl)} ${arc(tl, x + tl, y)}Z`);
78
+ }
79
+ /** A reversed Team code tile with the Team colour as its leading band, its right edge at `right`. */
80
+ export function codeTile(c, team, right, top) {
81
+ const w = textWidth(team.code, 10, 700) + 16;
82
+ const x = right - w;
83
+ return [
84
+ `<rect x="${fmt(x)}" y="${fmt(top)}" width="${fmt(w)}" height="16" fill="${c["code-bg"]}"/>`,
85
+ `<rect x="${fmt(x)}" y="${fmt(top)}" width="5" height="16" fill="${team.color}"/>`,
86
+ text(x + 10, top + 12, team.code, { size: 10, fill: c["code-fg"], weight: 700 }),
87
+ ].join("");
88
+ }
89
+ function look(c, n, fill, team, ringLens) {
90
+ const plain = { frame: c.ink, fill, name: c.ink, sub: c.muted, edge: team?.color ?? c.ink };
91
+ const mark = n.mark;
92
+ if (!mark)
93
+ return plain;
94
+ if (!mark.hit)
95
+ return { frame: c.line, fill: c.ground, name: c.faint, sub: c.faint, edge: c.line };
96
+ if (ringLens)
97
+ return { ...plain, fill: c.paper, ring: team?.color ?? c.ink };
98
+ if (mark.side === "origin")
99
+ return { ...plain, fill: c.herebg, edge: c.ink, ring: c.here };
100
+ if (mark.side === "upstream")
101
+ return { ...plain, frame: c.up, fill: c.upbg, edge: c.up };
102
+ if (mark.side === "downstream")
103
+ return { ...plain, frame: c.down, fill: c.downbg, edge: c.down, double: true };
104
+ return { ...plain, frame: c.path, fill: c.pathbg, edge: c.path };
105
+ }
106
+ /** An impact badge on a node's top edge: the origin, or the side and distance from it; a bare distance on a path lens. */
107
+ function badge(c, n, box) {
108
+ const mark = n.mark;
109
+ if (mark?.distance === undefined)
110
+ return [];
111
+ const words = mark.side === "origin" ? "ORIGIN" : mark.side ? `${mark.side.toUpperCase()} ${mark.distance}` : String(mark.distance);
112
+ const w = textWidth(words, 10, 700) + 12;
113
+ const x = box.x + box.width - 36 - w;
114
+ const y = box.y - 10;
115
+ const [fill, ink, frame] = mark.side === "origin" ? [c.here, c["on-here"], c.ink] : mark.side === "upstream" ? [c.up, c.paper, undefined] : mark.side === "downstream" ? [c.down, c.paper, undefined] : [c.paper, c.ink, c.ink];
116
+ return [
117
+ `<rect x="${fmt(x)}" y="${fmt(y)}" width="${fmt(w)}" height="16" fill="${fill}"${frame ? ` stroke="${frame}" stroke-width="${FRAME}"` : ""}/>`,
118
+ text(x + 6, y + 12, words, { size: 10, fill: ink, weight: 700 }),
119
+ ];
120
+ }
121
+ function drawNode(c, n, box, element, team, ringLens, clip) {
122
+ const { x, y, width: w, height: h } = box;
123
+ const type = element?.kind === "service" ? element.type : undefined;
124
+ const system = n.kind === "system";
125
+ const l = look(c, n, system ? c.tint : c.paper, team, ringLens);
126
+ const r = n.kind === "person" ? Math.min(36, h / 2) : 0;
127
+ const d = shape(x, y, w, h, n.kind === "person" ? [r, r, r, r] : type === "datastore" ? [0, 0, 12, 12] : [0, 0, 0, 0]);
128
+ const dash = n.external ? ` stroke-dasharray="6 4"` : "";
129
+ const frameWidth = system ? 2 : FRAME;
130
+ const tileWidth = team ? textWidth(team.code, 10, 700) + 16 + 8 : 0;
131
+ const left = x + EDGE + (n.kind === "person" ? 12 : 8);
132
+ const right = n.kind === "person" ? x + w - 16 : x + w - 10;
133
+ return [
134
+ `<g>`,
135
+ ...(l.ring ? [`<path d="${shape(x - 4, y - 4, w + 8, h + 8, r ? [r + 4, r + 4, r + 4, r + 4] : type === "datastore" ? [0, 0, 16, 16] : [0, 0, 0, 0])}" fill="${l.ring}"/>`] : []),
136
+ `<clipPath id="${clip}"><path d="${d}"/></clipPath>`,
137
+ `<path d="${d}" fill="${l.fill}"/>`,
138
+ ...(type === "broker" ? [`<path d="${d}" fill="url(#broker)"/>`] : []),
139
+ `<path d="${d}" fill="none" stroke="${l.frame}" stroke-width="${frameWidth}"${dash}/>`,
140
+ ...(l.double ? [`<path d="${shape(x + 3, y + 3, w - 6, h - 6, [0, 0, type === "datastore" ? 9 : 0, type === "datastore" ? 9 : 0])}" fill="none" stroke="${l.frame}" stroke-width="${FRAME}"/>`] : []),
141
+ `<rect x="${fmt(x - 1)}" y="${fmt(y - 1)}" width="${EDGE + 1}" height="${fmt(h + 2)}" fill="${l.edge}" clip-path="url(#${clip})"/>`,
142
+ text(left, y + h / 2 - 4, cut(n.name, 13, right - left - tileWidth, 700), { size: 13, fill: l.name, weight: 700 }),
143
+ text(left, y + h / 2 + 13, cut(subLabel(n, element), 11, right - left), { size: 11, fill: l.sub }),
144
+ ...(team ? [codeTile(c, team, right, y + 8)] : []),
145
+ ...badge(c, n, box),
146
+ ...(n.mark?.hit && n.collapsed ? [`<rect x="${fmt(x + w - 42)}" y="${fmt(y + h - 18)}" width="10" height="10" fill="${c.ink}" stroke="${c.paper}" stroke-width="2"/>`] : []),
147
+ `</g>`,
148
+ ].join("");
149
+ }
150
+ /** An open box: a quiet line frame on the open-box tint, its head row at the top; a Deployment Target is a quiet frame with no fill. */
151
+ function drawContainer(c, n, box, team, targetKind) {
152
+ const { x, y, width: w, height: h } = box;
153
+ const target = n.kind === "target";
154
+ const dimmed = n.mark && !n.mark.hit;
155
+ const frame = n.external ? c.ink : c.line;
156
+ const fill = target || dimmed ? "none" : flatten(c.container, c.ground);
157
+ const dash = n.external ? ` stroke-dasharray="6 4"` : "";
158
+ const tileWidth = team ? textWidth(team.code, 10, 700) + 16 + 8 : 0;
159
+ const left = x + (target ? 12 : EDGE + 10);
160
+ return [
161
+ `<g>`,
162
+ `<rect x="${fmt(x)}" y="${fmt(y)}" width="${fmt(w)}" height="${fmt(h)}" fill="${fill}" stroke="${frame}" stroke-width="${FRAME}"${dash}/>`,
163
+ ...(target ? [] : [`<rect x="${fmt(x - FRAME / 2)}" y="${fmt(y - FRAME / 2)}" width="${EDGE}" height="${fmt(h + FRAME)}" fill="${frame}"/>`]),
164
+ text(left, y + 22, cut(`${n.name} · ${targetKind ?? kindName(n)}`, 13, x + w - 10 - left - tileWidth, 700), { size: 13, fill: dimmed ? c.faint : c.ink, weight: 700 }),
165
+ ...(team ? [codeTile(c, team, x + w - 10, y + 9)] : []),
166
+ ...badge(c, n, box),
167
+ `</g>`,
168
+ ].join("");
169
+ }
170
+ /** A Relationship line: lit in ink by a Lens, stepped back to a solid fainter stroke when the Lens misses it. */
171
+ function drawEdge(c, points, edge) {
172
+ const d = points.map((p, i) => `${i === 0 ? "M" : "L"}${fmt(p.x)},${fmt(p.y)}`).join(" ");
173
+ if (edge.lit)
174
+ return `<path d="${d}" fill="none" stroke="${c.ink}" stroke-width="2.5" marker-end="url(#arrow-lit)"/>`;
175
+ if (edge.lit === false)
176
+ return `<path d="${d}" fill="none" stroke="${c["edge-faint"]}" stroke-width="${FRAME}" marker-end="url(#arrow-faint)"/>`;
177
+ return `<path d="${d}" fill="none" stroke="${c.edge}" stroke-width="${FRAME}" marker-end="url(#arrow)"/>`;
178
+ }
179
+ /** The key, in the canvas's own vocabulary: the Team tile, External, broker, and the Lens if there is one. */
180
+ function drawKey(c, lens) {
181
+ const parts = [];
182
+ let x = 0;
183
+ const label = (s) => {
184
+ parts.push(text(x, 16, s, { size: 11, fill: c.muted }));
185
+ x += textWidth(s, 11) + 24;
186
+ };
187
+ const swatch = (attrs) => {
188
+ parts.push(`<rect x="${fmt(x)}" y="4" width="28" height="16" ${attrs}/>`);
189
+ x += 36;
190
+ };
191
+ parts.push(codeTile(c, { code: "ABC", color: c.muted }, x + textWidth("ABC", 10, 700) + 16, 4));
192
+ x += textWidth("ABC", 10, 700) + 24;
193
+ label("Team (stripe and code)");
194
+ swatch(`fill="${c.paper}" stroke="${c.ink}" stroke-width="${FRAME}" stroke-dasharray="6 4"`);
195
+ label("External");
196
+ parts.push(`<rect x="${fmt(x)}" y="4" width="28" height="16" fill="${c.paper}"/><rect x="${fmt(x)}" y="4" width="28" height="16" fill="url(#broker)" stroke="${c.ink}" stroke-width="${FRAME}"/>`);
197
+ x += 36;
198
+ label("Broker");
199
+ if (lens) {
200
+ if ("impact" in lens) {
201
+ swatch(`fill="${c.herebg}" stroke="${c.here}" stroke-width="2.5"`);
202
+ label("Origin");
203
+ swatch(`fill="${c.up}"`);
204
+ label("Upstream");
205
+ swatch(`fill="${c.down}"`);
206
+ label("Downstream");
207
+ }
208
+ else if ("team" in lens)
209
+ swatch(`fill="${c.paper}" stroke="${c.muted}" stroke-width="3"`);
210
+ else
211
+ swatch(`fill="${c.pathbg}" stroke="${c.path}" stroke-width="${FRAME}"`);
212
+ label(`Lens: ${describeLens(lens)}`);
213
+ }
214
+ return { parts, width: x - 24 };
215
+ }
216
+ const kindName = (n) => ({ person: "Person", system: "System", service: "Service", component: "Component", target: "Deployment Target", deployment: "Deployment" })[n.kind];
217
+ /** The line under a node's name: External, its kind (or Service type), and its technology. */
218
+ function subLabel(n, element) {
219
+ const type = n.kind !== "deployment" && element?.kind === "service" && element.type !== "app" ? { datastore: "Datastore", broker: "Broker" }[element.type] : kindName(n);
220
+ const technology = element && "technology" in element ? element.technology : null;
221
+ return [`${n.external ? "External " : ""}${type}`, ...(technology ? [technology] : [])].join(" · ");
222
+ }
@@ -0,0 +1,12 @@
1
+ import type { Bundle } from "../schema/bundle.ts";
2
+ /** A Team's stripe colour, always shown with its code. */
3
+ export interface TeamStyle {
4
+ code: string;
5
+ color: string;
6
+ }
7
+ /**
8
+ * Each Team's stripe colour and code. Colours are spaced by the golden angle
9
+ * in OKLCH hue, in the Bundle's Team order; a code is the initials of a
10
+ * Team's name of two words or more, else its first three letters.
11
+ */
12
+ export declare function teamStyles(bundle: Pick<Bundle, "teams">): Map<string, TeamStyle>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Each Team's stripe colour and code. Colours are spaced by the golden angle
3
+ * in OKLCH hue, in the Bundle's Team order; a code is the initials of a
4
+ * Team's name of two words or more, else its first three letters.
5
+ */
6
+ export function teamStyles(bundle) {
7
+ return new Map(bundle.teams.map((t, i) => {
8
+ const words = t.name.split(/[^\p{L}\p{N}]+/u).filter(Boolean);
9
+ const code = (words.length > 1 ? words.map((w) => w[0]).join("").slice(0, 3) : (words[0] ?? t.id).slice(0, 3)).toUpperCase();
10
+ return [t.id, { code, color: oklchToHex(0.62, 0.13, (30 + i * 137.508) % 360) }];
11
+ }));
12
+ }
13
+ /** An OKLCH colour as sRGB hex, clamped into gamut. */
14
+ function oklchToHex(l, c, hue) {
15
+ const h = (hue * Math.PI) / 180;
16
+ const [a, b] = [c * Math.cos(h), c * Math.sin(h)];
17
+ const l_ = (l + 0.3963377774 * a + 0.2158037573 * b) ** 3;
18
+ const m_ = (l - 0.1055613458 * a - 0.0638541728 * b) ** 3;
19
+ const s_ = (l - 0.0894841775 * a - 1.291485548 * b) ** 3;
20
+ const linear = [
21
+ 4.0767416621 * l_ - 3.3077115913 * m_ + 0.2309699292 * s_,
22
+ -1.2684380046 * l_ + 2.6097574011 * m_ - 0.3413193965 * s_,
23
+ -0.0041960863 * l_ - 0.7034186147 * m_ + 1.707614701 * s_,
24
+ ];
25
+ return `#${linear
26
+ .map((v) => {
27
+ const srgb = v <= 0.0031308 ? 12.92 * v : 1.055 * v ** (1 / 2.4) - 0.055;
28
+ return Math.round(Math.min(1, Math.max(0, srgb)) * 255).toString(16).padStart(2, "0");
29
+ })
30
+ .join("")}`;
31
+ }
@@ -0,0 +1,15 @@
1
+ import { type FontWeight } from "./font.ts";
2
+ /** A string's width in the embedded font at `size` px and `weight` (Regular by default). */
3
+ export declare function textWidth(s: string, size: number, weight?: FontWeight): number;
4
+ /** `s` if it fits in `max` px, else as much of it as fits followed by an ellipsis. */
5
+ export declare function cut(s: string, size: number, max: number, weight?: FontWeight): string;
6
+ /** One `<text>` element. */
7
+ export declare function text(x: number, y: number, s: string, { size, fill, anchor, weight }: {
8
+ size: number;
9
+ fill: string;
10
+ anchor?: "end" | "middle";
11
+ weight?: FontWeight;
12
+ }): string;
13
+ export declare const escape: (s: string) => string;
14
+ /** A coordinate to at most two decimals, so output doesn't depend on float noise. */
15
+ export declare function fmt(n: number): string;
@@ -0,0 +1,29 @@
1
+ import { FONTS, UNITS_PER_EM } from "./font.js";
2
+ const ADVANCES = new Map(FONTS.map((f) => [f.weight, f.advances]));
3
+ /** A string's width in the embedded font at `size` px and `weight` (Regular by default). */
4
+ export function textWidth(s, size, weight = 400) {
5
+ const advances = ADVANCES.get(weight);
6
+ let units = 0;
7
+ for (const ch of s)
8
+ units += advances[ch.codePointAt(0)] ?? advances[77];
9
+ return (units * size) / UNITS_PER_EM;
10
+ }
11
+ /** `s` if it fits in `max` px, else as much of it as fits followed by an ellipsis. */
12
+ export function cut(s, size, max, weight = 400) {
13
+ if (textWidth(s, size, weight) <= max)
14
+ return s;
15
+ const chars = [...s];
16
+ while (chars.length > 0 && textWidth(chars.join("").trimEnd() + "…", size, weight) > max)
17
+ chars.pop();
18
+ return chars.join("").trimEnd() + "…";
19
+ }
20
+ /** One `<text>` element. */
21
+ export function text(x, y, s, { size, fill, anchor, weight = 400 }) {
22
+ return `<text x="${fmt(x)}" y="${fmt(y)}" font-size="${size}"${weight === 400 ? "" : ` font-weight="${weight}"`} fill="${fill}"${anchor ? ` text-anchor="${anchor}"` : ""}>${escape(s)}</text>`;
23
+ }
24
+ export const escape = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
25
+ /** A coordinate to at most two decimals, so output doesn't depend on float noise. */
26
+ export function fmt(n) {
27
+ const r = Math.round(n * 100) / 100;
28
+ return String(Object.is(r, -0) ? 0 : r);
29
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The diagram palette: the Wayfinding Plate tokens (DESIGN.md) that a drawn
3
+ * View uses, in light and in "Night shift" dark. This is the one source for
4
+ * `renderSvg` and `renderSequenceSvg`; the viewer's CSS custom properties of
5
+ * the same names in `viewer/src/styles.css` are checked against it by
6
+ * `test/render/tokens.test.ts`, so the export and the viewer can't drift.
7
+ */
8
+ export declare const themes: readonly ["light", "dark"];
9
+ export type Theme = (typeof themes)[number];
10
+ /** Each token by its CSS custom property name, without the leading `--`. */
11
+ export interface Palette {
12
+ /** The canvas: the pale stone ground the map sits on. */
13
+ ground: string;
14
+ /** Nodes, headers, the key. */
15
+ paper: string;
16
+ /** Station Slate: text and every 1.5px frame. */
17
+ ink: string;
18
+ muted: string;
19
+ faint: string;
20
+ /** Quiet frames: Deployment Targets, open boxes and stepped-back nodes. */
21
+ line: string;
22
+ /** Hairlines and broker stripes. */
23
+ rule: string;
24
+ /** A collapsed System's fill, activation bars. */
25
+ tint: string;
26
+ /** Wayfinding Yellow: the lens origin ring, and nothing decorative. */
27
+ here: string;
28
+ /** Text on the yellow. */
29
+ "on-here": string;
30
+ herebg: string;
31
+ "code-bg": string;
32
+ "code-fg": string;
33
+ /** Upstream Rust and Downstream Blue: the Impact lens sides. */
34
+ up: string;
35
+ upbg: string;
36
+ down: string;
37
+ downbg: string;
38
+ /** Path Violet: a path lens. */
39
+ path: string;
40
+ pathbg: string;
41
+ edge: string;
42
+ /** A stepped-back edge: solid, fainter, never faded or dashed. */
43
+ "edge-faint": string;
44
+ /** An open box's translucent tint, as the viewer's CSS writes it. */
45
+ container: string;
46
+ }
47
+ export declare const PALETTES: Record<Theme, Palette>;
48
+ /**
49
+ * `rgba(r, g, b, a)` painted over a solid hex colour, as one solid hex. The
50
+ * export flattens the open-box tint onto the ground this way, so no element
51
+ * in it carries an opacity below 1.
52
+ */
53
+ export declare function flatten(rgba: string, under: string): string;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The diagram palette: the Wayfinding Plate tokens (DESIGN.md) that a drawn
3
+ * View uses, in light and in "Night shift" dark. This is the one source for
4
+ * `renderSvg` and `renderSequenceSvg`; the viewer's CSS custom properties of
5
+ * the same names in `viewer/src/styles.css` are checked against it by
6
+ * `test/render/tokens.test.ts`, so the export and the viewer can't drift.
7
+ */
8
+ export const themes = ["light", "dark"];
9
+ export const PALETTES = {
10
+ light: {
11
+ ground: "#f3f4f1",
12
+ paper: "#ffffff",
13
+ ink: "#1c2633",
14
+ muted: "#4f5966",
15
+ faint: "#616a76",
16
+ line: "#c4c9c1",
17
+ rule: "#e2e4df",
18
+ tint: "#e8eae5",
19
+ here: "#ffc629",
20
+ "on-here": "#1c2633",
21
+ herebg: "#fff4cc",
22
+ "code-bg": "#1c2633",
23
+ "code-fg": "#ffffff",
24
+ up: "#a4461a",
25
+ upbg: "#fbeee6",
26
+ down: "#1d5fa8",
27
+ downbg: "#e8f0fa",
28
+ path: "#5b3aa8",
29
+ pathbg: "#efeaf9",
30
+ edge: "#5b6573",
31
+ "edge-faint": "#80878f",
32
+ container: "rgba(232, 234, 229, 0.6)",
33
+ },
34
+ dark: {
35
+ ground: "#10151c",
36
+ paper: "#18202a",
37
+ ink: "#e6eaef",
38
+ muted: "#a9b2bd",
39
+ faint: "#8f99a5",
40
+ line: "#36414f",
41
+ rule: "#252e3a",
42
+ tint: "#232c38",
43
+ here: "#ffc629",
44
+ "on-here": "#10151c",
45
+ herebg: "#3a3216",
46
+ "code-bg": "#e6eaef",
47
+ "code-fg": "#10151c",
48
+ up: "#f0925f",
49
+ upbg: "#3a2419",
50
+ down: "#78aef5",
51
+ downbg: "#172a45",
52
+ path: "#b79cff",
53
+ pathbg: "#2a2142",
54
+ edge: "#8f99a5",
55
+ "edge-faint": "#646d78",
56
+ container: "rgba(35, 44, 56, 0.55)",
57
+ },
58
+ };
59
+ /**
60
+ * `rgba(r, g, b, a)` painted over a solid hex colour, as one solid hex. The
61
+ * export flattens the open-box tint onto the ground this way, so no element
62
+ * in it carries an opacity below 1.
63
+ */
64
+ export function flatten(rgba, under) {
65
+ const m = /^rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/.exec(rgba);
66
+ if (!m)
67
+ return rgba;
68
+ const alpha = Number(m[4]);
69
+ const base = [1, 3, 5].map((i) => parseInt(under.slice(i, i + 2), 16));
70
+ return `#${[m[1], m[2], m[3]].map((c, i) => Math.round(Number(c) * alpha + base[i] * (1 - alpha)).toString(16).padStart(2, "0")).join("")}`;
71
+ }
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ /** An ADR's status as written. `superseded` is derived, never hand-written; `check` reports it. */
3
+ export declare const AdrStatus: z.ZodEnum<{
4
+ deprecated: "deprecated";
5
+ proposed: "proposed";
6
+ accepted: "accepted";
7
+ rejected: "rejected";
8
+ superseded: "superseded";
9
+ }>;
10
+ /** An ADR file name: a four-digit number, then a slug. */
11
+ export declare const ADR_FILENAME: RegExp;
12
+ /** A reference to an ADR: its number in this Project, or `project:NNNN`. */
13
+ export declare const AdrRef: z.ZodString;
14
+ /**
15
+ * An ADR's frontmatter, with field names following MADR v4. The title is the
16
+ * body's first `# ` heading, not a field.
17
+ */
18
+ export declare const AdrFrontmatter: z.ZodObject<{
19
+ status: z.ZodEnum<{
20
+ deprecated: "deprecated";
21
+ proposed: "proposed";
22
+ accepted: "accepted";
23
+ rejected: "rejected";
24
+ superseded: "superseded";
25
+ }>;
26
+ date: z.ZodISODate;
27
+ "decision-makers": z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ consulted: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ informed: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ elements: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ views: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ supersedes: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ }, z.core.$strict>;
35
+ export type AdrFrontmatter = z.infer<typeof AdrFrontmatter>;
36
+ export type AdrStatus = z.infer<typeof AdrStatus>;