@principal-ai/principal-view-react 0.16.61 → 0.16.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -53,7 +53,7 @@ export type { GraphifyTypeRefStatus, GraphifyTypeRefResolution, } from './graphi
53
53
  export { normalizeGraphifyLabel, createGraphifyTypeResolver, resolveGraphifyTypeRef, normalizeGraphifyId, makeGraphifyId, graphifyFileStem, normalizeSourcePath, resolveComponentAnchor, symbolLabelVariants, inferGraphifyKind, kindsMatch, extractNamedTypes, extractGraphifySignature, compareSignatures, } from './graphify';
54
54
  export type { ComponentAnchorInput, ComponentAnchorResult, InferredGraphifyKind, InferGraphifyKindResult, GraphifyInferredSignature, ClaimedSignature, SignatureCompareResult, } from './graphify';
55
55
  export { SubsystemComponentGraph } from './subsystem/SubsystemComponentGraph';
56
- export type { SubsystemComponentGraphProps } from './subsystem/SubsystemComponentGraph';
56
+ export type { SubsystemComponentGraphProps, ThroughlineViewerContext } from './subsystem/SubsystemComponentGraph';
57
57
  export type { ComponentVerificationState, ComponentVerificationPhase, ComponentDeclarationProps, } from './subsystem/ComponentDeclaration';
58
58
  export { ComponentDeclaration } from './subsystem/ComponentDeclaration';
59
59
  export { MECHANISM_COLOR, MECHANISM_STYLE } from './subsystem/model';
@@ -64,10 +64,10 @@ export { SubsystemFileTree } from './subsystem/SubsystemFileTree';
64
64
  export type { SubsystemFileTreeProps } from './subsystem/SubsystemFileTree';
65
65
  export { GraphLayoutCover } from './subsystem/GraphLayoutCover';
66
66
  export type { GraphLayoutCoverProps } from './subsystem/GraphLayoutCover';
67
- export type { SubsystemComponent, SubsystemComponentEdge, SubsystemGraphDocument, SubsystemComponentConstruct, SubsystemComponentRole, SubsystemFramework, SubsystemStereotype, SubsystemEdgeMechanism, } from './subsystem/model';
67
+ export type { SubsystemComponent, SubsystemComponentEdge, SubsystemThroughline, SubsystemThroughlineStep, SubsystemGraphDocument, SubsystemComponentConstruct, SubsystemComponentRole, SubsystemFramework, SubsystemStereotype, SubsystemEdgeMechanism, } from './subsystem/model';
68
68
  export { constructBadgeLabel, deriveNameFromSymbol, nodeMinWidthForBadges, ROLE_COLOR, ROLE_LABEL, } from './subsystem/model';
69
69
  export type { SubsystemDeclarationRef, SubsystemOpenFileOptions, DeclarationFreshness, } from './subsystem/declarationRef';
70
70
  export { parseSourceLocation, normalizeDeclarationLine, extractDeclarationLine, DECLARATION_HASH_ALGO, } from './subsystem/declarationRef';
71
- export { PierreFileView, PierreSnippetView, sliceSnippetWindow, resolvePierreSyntaxThemeName } from './pierre';
72
- export type { PierreFileViewProps, PierreSnippetViewProps, SnippetSlice, PierreSyntaxThemeName, } from './pierre';
71
+ export { PierreFileView, PierreSnippetView, PierreThroughlineCodeView, sliceSnippetWindow, resolvePierreSyntaxThemeName } from './pierre';
72
+ export type { PierreFileViewProps, PierreSnippetViewProps, PierreThroughlineCodeViewProps, SnippetSlice, PierreSyntaxThemeName, } from './pierre';
73
73
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EAEvB,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,GACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,YAAY,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAE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C;AAGpC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC1I,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -47,5 +47,5 @@ export { GraphLayoutCover } from './subsystem/GraphLayoutCover';
47
47
  export { constructBadgeLabel, deriveNameFromSymbol, nodeMinWidthForBadges, ROLE_COLOR, ROLE_LABEL, } from './subsystem/model';
48
48
  export { parseSourceLocation, normalizeDeclarationLine, extractDeclarationLine, DECLARATION_HASH_ALGO, } from './subsystem/declarationRef';
49
49
  // Pierre code views (@pierre/diffs wrappers)
50
- export { PierreFileView, PierreSnippetView, sliceSnippetWindow, resolvePierreSyntaxThemeName } from './pierre';
50
+ export { PierreFileView, PierreSnippetView, PierreThroughlineCodeView, sliceSnippetWindow, resolvePierreSyntaxThemeName } from './pierre';
51
51
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAsBH,oBAAoB;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAS9D,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAOnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,6BAA6B;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,U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BAAuB,GACxB,MAAM,6BAA6B,CAAC;AAyCrC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAWpB,4BAA4B;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAO9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EACL,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAchE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EACV,UAAU,GACX,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,6CAA6C;AAC7C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * PierreThroughlineCodeView — multi-file step snippets via `@pierre/diffs` CodeView.
3
+ *
4
+ * Renders one sliced window per throughline step in a single virtualized
5
+ * scroll; when `stepIndex` changes, scrolls that step into view.
6
+ */
7
+ import type { SubsystemThroughline } from '../subsystem/model';
8
+ export interface PierreThroughlineCodeViewProps {
9
+ throughline: SubsystemThroughline;
10
+ /** Focused step; `null` shows all snippets without scrolling to a step. */
11
+ stepIndex: number | null;
12
+ readFile: (path: string) => Promise<string>;
13
+ /** Context lines above/below each step site; defaults to 8. */
14
+ contextLines?: number;
15
+ /** Override Pierre's container background. */
16
+ background?: string;
17
+ }
18
+ export declare function PierreThroughlineCodeView({ throughline, stepIndex, readFile, contextLines, background, }: PierreThroughlineCodeViewProps): import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=PierreThroughlineCodeView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PierreThroughlineCodeView.d.ts","sourceRoot":"","sources":["../../src/pierre/PierreThroughlineCodeView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAK/D,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,oBAAoB,CAAC;IAClC,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAWD,wBAAgB,yBAAyB,CAAC,EACxC,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAgB,EAChB,UAAU,GACX,EAAE,8BAA8B,2CAmKhC"}
@@ -0,0 +1,139 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * PierreThroughlineCodeView — multi-file step snippets via `@pierre/diffs` CodeView.
4
+ *
5
+ * Renders one sliced window per throughline step in a single virtualized
6
+ * scroll; when `stepIndex` changes, scrolls that step into view.
7
+ */
8
+ import { useEffect, useMemo, useRef, useState } from 'react';
9
+ import { CodeView, } from '@pierre/diffs/react';
10
+ import { useTheme } from '@principal-ade/industry-theme';
11
+ import { buildPierreOptions, PIERRE_FILE_STYLE } from './pierreBackground';
12
+ import { resolvePierreSyntaxThemeName } from './pierreSyntaxTheme';
13
+ import { sliceSnippetWindow } from './sliceSnippet';
14
+ function stepItemId(throughlineId, index) {
15
+ return `${throughlineId}:${index}`;
16
+ }
17
+ export function PierreThroughlineCodeView({ throughline, stepIndex, readFile, contextLines = 8, background, }) {
18
+ const { theme, mode } = useTheme();
19
+ const viewRef = useRef(null);
20
+ const [load, setLoad] = useState({ status: 'loading' });
21
+ const pathsKey = useMemo(() => {
22
+ const paths = [...new Set(throughline.steps.map((s) => s.file))];
23
+ paths.sort();
24
+ return paths.join('\0');
25
+ }, [throughline.steps]);
26
+ useEffect(() => {
27
+ let cancelled = false;
28
+ setLoad({ status: 'loading' });
29
+ const paths = [...new Set(throughline.steps.map((s) => s.file))];
30
+ void Promise.all(paths.map(async (path) => {
31
+ const contents = await readFile(path);
32
+ return [path, contents];
33
+ }))
34
+ .then((entries) => {
35
+ if (cancelled)
36
+ return;
37
+ setLoad({ status: 'ready', byPath: new Map(entries) });
38
+ })
39
+ .catch((err) => {
40
+ if (cancelled)
41
+ return;
42
+ setLoad({
43
+ status: 'error',
44
+ message: err instanceof Error ? err.message : 'Failed to read files',
45
+ });
46
+ });
47
+ return () => {
48
+ cancelled = true;
49
+ };
50
+ }, [throughline.id, pathsKey, readFile]);
51
+ const items = useMemo(() => {
52
+ if (load.status !== 'ready')
53
+ return [];
54
+ return throughline.steps.map((step, index) => {
55
+ const contents = load.byPath.get(step.file) ?? '';
56
+ const slice = sliceSnippetWindow(contents, step.line, step.line, contextLines, step.line);
57
+ return {
58
+ id: stepItemId(throughline.id, index),
59
+ type: 'file',
60
+ version: 1,
61
+ file: {
62
+ // Real path → Shiki language detection from extension.
63
+ name: step.file,
64
+ contents: slice.contents,
65
+ cacheKey: `${throughline.id}:${index}:${step.file}:${step.line}:${slice.sliceStart}-${slice.sliceEnd}`,
66
+ },
67
+ annotations: slice.focusOffset != null
68
+ ? [{ lineNumber: slice.focusOffset }]
69
+ : undefined,
70
+ };
71
+ });
72
+ }, [load, throughline.id, throughline.steps, contextLines]);
73
+ const renderHeaderPrefix = useMemo(() => {
74
+ return (item) => {
75
+ const index = Number.parseInt(item.id.split(':').pop() ?? '', 10);
76
+ const step = throughline.steps[index];
77
+ if (!step)
78
+ return null;
79
+ const label = step.symbol != null && step.symbol.length > 0
80
+ ? step.symbol
81
+ : `step ${index + 1}`;
82
+ return (_jsxs("span", { style: {
83
+ fontFamily: theme.fonts.monospace,
84
+ fontSize: theme.fontSizes[0],
85
+ color: theme.colors.textSecondary,
86
+ marginRight: 8,
87
+ }, children: [index + 1, ". ", label] }));
88
+ };
89
+ }, [throughline.steps, theme]);
90
+ const renderHeaderMetadata = useMemo(() => {
91
+ return (item) => {
92
+ const index = Number.parseInt(item.id.split(':').pop() ?? '', 10);
93
+ const step = throughline.steps[index];
94
+ if (!step)
95
+ return null;
96
+ return (_jsxs("span", { style: {
97
+ fontFamily: theme.fonts.monospace,
98
+ fontSize: theme.fontSizes[0],
99
+ color: theme.colors.textSecondary,
100
+ marginLeft: 8,
101
+ }, children: ["L", step.line] }));
102
+ };
103
+ }, [throughline.steps, theme]);
104
+ const options = useMemo(() => {
105
+ return {
106
+ theme: {
107
+ dark: resolvePierreSyntaxThemeName('dark'),
108
+ light: resolvePierreSyntaxThemeName('light'),
109
+ },
110
+ stickyHeaders: true,
111
+ disableFileHeader: false,
112
+ layout: { paddingTop: 8, paddingBottom: 16, gap: 12 },
113
+ ...(background ? buildPierreOptions(background) : {}),
114
+ ...(mode === 'light' || mode === 'dark' ? { themeType: mode } : {}),
115
+ };
116
+ }, [background, mode]);
117
+ useEffect(() => {
118
+ if (load.status !== 'ready' || stepIndex == null)
119
+ return;
120
+ if (stepIndex < 0 || stepIndex >= throughline.steps.length)
121
+ return;
122
+ // Defer until CodeView has laid out items.
123
+ const id = stepItemId(throughline.id, stepIndex);
124
+ const t = window.setTimeout(() => {
125
+ viewRef.current?.scrollTo({ type: 'item', id, align: 'start' });
126
+ }, 50);
127
+ return () => window.clearTimeout(t);
128
+ }, [load.status, stepIndex, throughline.id, throughline.steps.length, items.length]);
129
+ if (load.status === 'error') {
130
+ return (_jsx("div", { style: { padding: 16, color: theme.colors.error ?? '#e5534b' }, children: load.message }));
131
+ }
132
+ if (load.status === 'loading' || items.length === 0) {
133
+ return (_jsx("div", { style: { padding: 16, color: theme.colors.textSecondary }, children: "Loading\u2026" }));
134
+ }
135
+ // Pierre's CodeView prop / item unions blow past TS's complexity limit.
136
+ const CodeViewLoose = CodeView;
137
+ return (_jsx(CodeViewLoose, { ref: viewRef, items: items, options: options, renderHeaderPrefix: renderHeaderPrefix, renderHeaderMetadata: renderHeaderMetadata, style: { ...PIERRE_FILE_STYLE, height: '100%', overflow: 'auto' } }));
138
+ }
139
+ //# sourceMappingURL=PierreThroughlineCodeView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PierreThroughlineCodeView.js","sourceRoot":"","sources":["../../src/pierre/PierreThroughlineCodeView.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAChF,OAAO,EACL,QAAQ,GAIT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAkBpD,SAAS,UAAU,CAAC,aAAqB,EAAE,KAAa;IACtD,OAAO,GAAG,aAAa,IAAI,KAAK,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,UAA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IACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACnD,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,8BAExD,CACP,CAAC;KACH;IAED,wEAAwE;IACxE,MAAM,aAAa,GAAG,QAAuE,CAAC;IAE9F,OAAO,CACL,KAAC,aAAa,IACZ,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,EAC1C,KAAK,EAAE,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GACjE,CACH,CAAC;AACJ,CAAC"}
@@ -2,6 +2,8 @@ export { PierreFileView } from './PierreFileView';
2
2
  export type { PierreFileViewProps } from './PierreFileView';
3
3
  export { PierreSnippetView } from './PierreSnippetView';
4
4
  export type { PierreSnippetViewProps } from './PierreSnippetView';
5
+ export { PierreThroughlineCodeView } from './PierreThroughlineCodeView';
6
+ export type { PierreThroughlineCodeViewProps } from './PierreThroughlineCodeView';
5
7
  export { sliceSnippetWindow } from './sliceSnippet';
6
8
  export type { SnippetSlice } from './sliceSnippet';
7
9
  export { PIERRE_DEFAULT_SYNTAX_THEMES, resolvePierreSyntaxThemeName, } from './pierreSyntaxTheme';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pierre/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pierre/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,YAAY,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export { PierreFileView } from './PierreFileView';
2
2
  export { PierreSnippetView } from './PierreSnippetView';
3
+ export { PierreThroughlineCodeView } from './PierreThroughlineCodeView';
3
4
  export { sliceSnippetWindow } from './sliceSnippet';
4
5
  export { PIERRE_DEFAULT_SYNTAX_THEMES, resolvePierreSyntaxThemeName, } from './pierreSyntaxTheme';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pierre/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pierre/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC"}
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * FileDrawer — bottom panel that slides up from the bottom of the graph area
3
- * to show a file's contents. Opened by sidebar file-tree clicks (and any host
4
- * wiring); content is injected as children by the graph component.
3
+ * to show file / throughline code. Opened by sidebar file-tree clicks,
4
+ * declaration links, and throughline step focus; content is injected as
5
+ * children by the graph component.
5
6
  */
6
7
  import type { ReactNode } from 'react';
7
- /** Bottom panel that slides up from the bottom of the graph area to show a
8
- * file's contents opened by node clicks and sidebar file-tree clicks
9
- * alike. Sits in normal flow (canvas shrinks while open, nothing covered)
8
+ /** Bottom panel that slides up from the bottom of the graph area.
9
+ * Sits in normal flow (canvas shrinks while open, nothing covered)
10
10
  * and animates via height; stays mounted so open/close animates. */
11
- export declare function FileDrawer({ file, onClose, children, }: {
12
- file: string | null;
11
+ export declare function FileDrawer({ title, onClose, children, }: {
12
+ /** Drawer chrome title; `null` closes the drawer. */
13
+ title: string | null;
13
14
  onClose: () => void;
14
15
  children?: ReactNode;
15
16
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FileDrawer.d.ts","sourceRoot":"","sources":["../../src/subsystem/FileDrawer.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;qEAGqE;AACrE,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,2CAiFA"}
1
+ {"version":3,"file":"FileDrawer.d.ts","sourceRoot":"","sources":["../../src/subsystem/FileDrawer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;qEAEqE;AACrE,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,QAAQ,GACT,EAAE;IACD,qDAAqD;IACrD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,2CAiFA"}
@@ -1,20 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
3
  * FileDrawer — bottom panel that slides up from the bottom of the graph area
4
- * to show a file's contents. Opened by sidebar file-tree clicks (and any host
5
- * wiring); content is injected as children by the graph component.
4
+ * to show file / throughline code. Opened by sidebar file-tree clicks,
5
+ * declaration links, and throughline step focus; content is injected as
6
+ * children by the graph component.
6
7
  */
7
8
  import { useEffect } from 'react';
8
9
  import { useTheme } from '@principal-ade/industry-theme';
9
10
  import { X } from 'lucide-react';
10
- /** Bottom panel that slides up from the bottom of the graph area to show a
11
- * file's contents opened by node clicks and sidebar file-tree clicks
12
- * alike. Sits in normal flow (canvas shrinks while open, nothing covered)
11
+ /** Bottom panel that slides up from the bottom of the graph area.
12
+ * Sits in normal flow (canvas shrinks while open, nothing covered)
13
13
  * and animates via height; stays mounted so open/close animates. */
14
- export function FileDrawer({ file, onClose, children, }) {
14
+ export function FileDrawer({ title, onClose, children, }) {
15
15
  const { theme } = useTheme();
16
16
  const muted = theme.colors.textMuted ?? theme.colors.textSecondary;
17
- const open = file !== null;
17
+ const open = title !== null;
18
18
  useEffect(() => {
19
19
  if (!open)
20
20
  return;
@@ -46,7 +46,7 @@ export function FileDrawer({ file, onClose, children, }) {
46
46
  padding: '6px 10px',
47
47
  borderBottom: `1px solid ${theme.colors.border}`,
48
48
  flexShrink: 0,
49
- }, children: [_jsx("span", { title: file ?? undefined, style: {
49
+ }, children: [_jsx("span", { title: title ?? undefined, style: {
50
50
  flex: 1,
51
51
  minWidth: 0,
52
52
  overflow: 'hidden',
@@ -55,7 +55,7 @@ export function FileDrawer({ file, onClose, children, }) {
55
55
  fontFamily: theme.fonts.monospace,
56
56
  fontSize: theme.fontSizes[0],
57
57
  color: muted,
58
- }, children: file }), _jsx("button", { type: "button", onClick: onClose, "aria-label": "Close file", style: {
58
+ }, children: title }), _jsx("button", { type: "button", onClick: onClose, "aria-label": "Close file", style: {
59
59
  display: 'inline-flex',
60
60
  alignItems: 'center',
61
61
  justifyContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"file":"FileDrawer.js","sourceRoot":"","sources":["../../src/subsystem/FileDrawer.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC;;;qEAGqE;AACrE,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,QAAQ,GAKT;IACC,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,SAA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OAAO,EAAE,UAAU;oBACnB,YAAY,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;oBAChD,UAAU,EAAE,CAAC;iBACd,aAED,eACE,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,KAAK,EAAE;4BACL,IAAI,EAAE,CAAC;4BACP,QAAQ,EAAE,CAAC;4BACX,QAAQ,EAAE,QAAQ;4BAClB,YAAY,EAAE,UAAU;4BACxB,UAAU,EAAE,QAAQ;4BACpB,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;4BACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;4BAC5B,KAAK,EAAE,KAAK;yBACb,YAEA,KAAK,GACD,EACP,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,gBACL,YAAY,EACvB,KAAK,EAAE;4BACL,OAAO,EAAE,aAAa;4BACtB,UAAU,EAAE,QAAQ;4BACpB,cAAc,EAAE,QAAQ;4BACxB,KAAK,EAAE,EAAE;4BACT,MAAM,EAAE,EAAE;4BACV,OAAO,EAAE,CAAC;4BACV,MAAM,EAAE,MAAM;4BACd,YAAY,EAAE,CAAC;4BACf,UAAU,EAAE,aAAa;4BACzB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;4BACxB,MAAM,EAAE,SAAS;yBAClB,YAED,KAAC,CAAC,IAAC,IAAI,EAAE,EAAE,GAAI,GACR,IACL,EACN,cAAK,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,QAAQ,GAAO,IACrE,CACP,CAAC;AACJ,CAAC"}
@@ -15,6 +15,12 @@ import type { ReactNode } from 'react';
15
15
  import { type SubsystemComponentEdge, type SubsystemComponent, type SubsystemThroughline } from './model';
16
16
  import type { SubsystemOpenFileOptions } from './declarationRef';
17
17
  import type { ComponentVerificationState } from './ComponentDeclaration';
18
+ /** Context passed to `renderThroughlineViewer` when a flow/step is focused. */
19
+ export interface ThroughlineViewerContext {
20
+ throughline: SubsystemThroughline;
21
+ /** Focused step index; `null` means the whole flow (no specific step). */
22
+ stepIndex: number | null;
23
+ }
18
24
  export interface SubsystemComponentGraphProps {
19
25
  components: SubsystemComponent[];
20
26
  edges: SubsystemComponentEdge[];
@@ -23,8 +29,9 @@ export interface SubsystemComponentGraphProps {
23
29
  * flow. When present the sidebar's bottom half offers a Files/Flows toggle:
24
30
  * the flows panel lists each throughline's steps (`symbol` or `file:line`);
25
31
  * clicking a flow row toggles its steps; clicking a step focuses that
26
- * step's edge. Opened flows stay on the canvas (unselected ones dimmed);
27
- * everything else is hidden.
32
+ * step's edge and (when `renderThroughlineViewer` is set) opens the bottom
33
+ * drawer on that flow's snippets. Opened flows stay on the canvas
34
+ * (unselected ones dimmed); everything else is hidden.
28
35
  */
29
36
  throughlines?: SubsystemThroughline[];
30
37
  onSelect?: (componentId: string) => void;
@@ -61,11 +68,16 @@ export interface SubsystemComponentGraphProps {
61
68
  sidebarAfterDescription?: ReactNode;
62
69
  /**
63
70
  * Host-injected reader/renderer for the bottom file drawer, keyed by
64
- * repo-root-relative path. Opening happens on node click (component with a
65
- * `file`) and sidebar file-tree click. Keeps this package free of fs and
66
- * code-view dependencies.
71
+ * repo-root-relative path. Opening happens on declaration/file-tree clicks.
72
+ * Keeps this package free of fs and code-view dependencies.
67
73
  */
68
74
  renderFileViewer?: (file: string, opts?: SubsystemOpenFileOptions) => ReactNode;
75
+ /**
76
+ * Host-injected multi-snippet viewer for a focused throughline. When set,
77
+ * clicking a flow step (or the whole flow) opens the bottom drawer with
78
+ * this content and updates it as the focused step changes.
79
+ */
80
+ renderThroughlineViewer?: (ctx: ThroughlineViewerContext) => ReactNode;
69
81
  /**
70
82
  * Legacy component-keyed variant, kept for backward compatibility. When
71
83
  * `renderFileViewer` is absent, drawer content resolves via the first
@@ -1 +1 @@
1
- {"version":3,"file":"SubsystemComponentGraph.d.ts","sourceRoot":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Types = {
38
38
  'subsystem-edge': SubsystemEdge,
39
39
  };
40
- // Memoized drawer body: only rebuilds children when the open file changes.
40
+ // Memoized drawer body: only rebuilds children when the open target changes.
41
41
  // Inner re-renders on every viewport pan/zoom and hover; recreating host
42
42
  // elements then would churn their readFile closures and flash the file
43
43
  // viewer's loading state on each render.
44
- const DrawerContent = memo(function DrawerContent({ render, file, startLine, }) {
45
- if (!file)
46
- return null;
44
+ const FileDrawerContent = memo(function FileDrawerContent({ render, file, startLine, }) {
47
45
  return _jsx(_Fragment, { children: render(file, startLine != null ? { startLine } : undefined) });
48
46
  });
49
- function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, showLegend, title, hideSidebar, graphTitle, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, renderFileView, renderFileViewer, onFileSelect, onVerifyComponent, componentVerification }) {
47
+ const ThroughlineDrawerContent = memo(function ThroughlineDrawerContent({ render, throughline, stepIndex, }) {
48
+ return _jsx(_Fragment, { children: render({ throughline, stepIndex }) });
49
+ });
50
+ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, showLegend, title, hideSidebar, graphTitle, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, renderFileView, renderFileViewer, renderThroughlineViewer, onFileSelect, onVerifyComponent, componentVerification }) {
50
51
  const { theme } = useTheme();
51
52
  const { fitView } = useReactFlow();
52
53
  const viewport = useViewport();
@@ -56,10 +57,8 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
56
57
  });
57
58
  const [layoutReady, setLayoutReady] = useState(false);
58
59
  const [selected, setSelected] = useState(null);
59
- /** File shown in the bottom drawer + optional declaration scroll target. */
60
- const [openFileTarget, setOpenFileTarget] = useState(null);
61
- const openFile = openFileTarget?.file ?? null;
62
- const openFileStartLine = openFileTarget?.startLine;
60
+ /** Bottom drawer: single file or throughline multi-snippet mode. */
61
+ const [drawerTarget, setDrawerTarget] = useState(null);
63
62
  // Edge-legend modal visibility (opened from the canvas's top-left button).
64
63
  const [legendOpen, setLegendOpen] = useState(false);
65
64
  // Component the pointer is over (null on leave) → transient tree highlight.
@@ -78,9 +77,34 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
78
77
  // closure over the effect deps) can toggle without a stale value.
79
78
  const selectedRef = useRef(null);
80
79
  selectedRef.current = selected;
81
- // Ref mirror of `openFile` for the tree-click toggle.
80
+ // Ref mirror of the open file drawer target for tree-click toggle.
82
81
  const openFileRef = useRef(null);
83
- openFileRef.current = openFileTarget;
82
+ const openFile = drawerTarget?.kind === 'file' ? drawerTarget.file : null;
83
+ openFileRef.current =
84
+ drawerTarget?.kind === 'file'
85
+ ? { file: drawerTarget.file, startLine: drawerTarget.startLine }
86
+ : null;
87
+ const focusedThroughline = useMemo(() => {
88
+ if (drawerTarget?.kind !== 'throughline' || !throughlines)
89
+ return null;
90
+ return throughlines.find((t) => t.id === drawerTarget.throughlineId) ?? null;
91
+ }, [drawerTarget, throughlines]);
92
+ const drawerTitle = useMemo(() => {
93
+ if (!drawerTarget)
94
+ return null;
95
+ if (drawerTarget.kind === 'file')
96
+ return drawerTarget.file;
97
+ const tl = focusedThroughline;
98
+ if (!tl)
99
+ return null;
100
+ if (drawerTarget.stepIndex == null)
101
+ return tl.title;
102
+ const step = tl.steps[drawerTarget.stepIndex];
103
+ if (!step)
104
+ return tl.title;
105
+ const site = `${step.file.split('/').pop() ?? step.file}:${step.line}`;
106
+ return `${tl.title} · ${site}`;
107
+ }, [drawerTarget, focusedThroughline]);
84
108
  // Refresh selected component when the components list updates (e.g. verify
85
109
  // writes back declarationRef).
86
110
  useEffect(() => {
@@ -444,20 +468,20 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
444
468
  const treeFiles = useMemo(() => repoGroups.groups.flatMap((g) => g.entries.map((e) => e.file)), [repoGroups]);
445
469
  const onTreeSelectFile = useCallback((file) => {
446
470
  if (openFileRef.current?.file === file && openFileRef.current.startLine == null) {
447
- setOpenFileTarget(null);
471
+ setDrawerTarget(null);
448
472
  return;
449
473
  }
450
- setOpenFileTarget({ file });
474
+ setDrawerTarget({ kind: 'file', file });
451
475
  onFileSelect?.(file);
452
476
  }, [onFileSelect]);
453
477
  const onOpenDeclarationFile = useCallback((file, opts) => {
454
478
  const startLine = opts?.startLine;
455
479
  if (openFileRef.current?.file === file &&
456
480
  openFileRef.current.startLine === startLine) {
457
- setOpenFileTarget(null);
481
+ setDrawerTarget(null);
458
482
  return;
459
483
  }
460
- setOpenFileTarget({ file, startLine });
484
+ setDrawerTarget({ kind: 'file', file, startLine });
461
485
  onFileSelect?.(file);
462
486
  }, [onFileSelect]);
463
487
  // Camera helper shared by the throughline interactions: frames the focused
@@ -482,20 +506,32 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
482
506
  }, [baseEdges, fitView]);
483
507
  // Focus an entire flow: hide everything but the flow's nodes and edges, and
484
508
  // frame the flow on the canvas. Selection state is cleared — the graph now
485
- // reads as the narrative.
509
+ // reads as the narrative. Opens the throughline drawer when a viewer is set.
486
510
  const focusThroughlineEdges = useCallback((tl) => {
487
511
  setSelected(null);
488
512
  setSelectedEdgeId(null);
489
513
  setFocusedStepIndex(null);
490
514
  setFocusedThroughlineId(tl.id);
491
515
  fitFocusBounds(new Set(tl.steps.map((s) => s.edgeId)));
492
- }, [fitFocusBounds]);
516
+ if (renderThroughlineViewer) {
517
+ setDrawerTarget({ kind: 'throughline', throughlineId: tl.id, stepIndex: null });
518
+ }
519
+ else if (tl.steps[0]) {
520
+ // Fallback: single-file snippet of the first step.
521
+ setDrawerTarget({
522
+ kind: 'file',
523
+ file: tl.steps[0].file,
524
+ startLine: tl.steps[0].line,
525
+ });
526
+ }
527
+ }, [fitFocusBounds, renderThroughlineViewer]);
493
528
  const clearThroughlineFocus = useCallback(() => {
494
529
  setFocusedThroughlineId(null);
495
530
  setFocusedStepIndex(null);
531
+ setDrawerTarget((prev) => (prev?.kind === 'throughline' ? null : prev));
496
532
  }, []);
497
- // Focus a single step's edge on the canvas. The step's file:line is listed
498
- // in the row; we don't open the drawer from here.
533
+ // Focus a single step's edge on the canvas and open/scroll the throughline
534
+ // drawer to that step's snippet.
499
535
  const focusThroughlineStep = useCallback((tl, stepIndex) => {
500
536
  const step = tl.steps[stepIndex];
501
537
  if (!step)
@@ -505,7 +541,21 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
505
541
  setFocusedStepIndex(stepIndex);
506
542
  setFocusedThroughlineId(tl.id);
507
543
  fitFocusBounds(new Set([step.edgeId]));
508
- }, [fitFocusBounds]);
544
+ if (renderThroughlineViewer) {
545
+ setDrawerTarget({
546
+ kind: 'throughline',
547
+ throughlineId: tl.id,
548
+ stepIndex,
549
+ });
550
+ }
551
+ else {
552
+ setDrawerTarget({
553
+ kind: 'file',
554
+ file: step.file,
555
+ startLine: step.line,
556
+ });
557
+ }
558
+ }, [fitFocusBounds, renderThroughlineViewer]);
509
559
  const toggleThroughlineCollapsed = useCallback((tlId) => {
510
560
  setExpandedThroughlines((prev) => {
511
561
  const next = new Set(prev);
@@ -591,6 +641,9 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
591
641
  const fileViewerRef = useRef(fileViewer);
592
642
  fileViewerRef.current = fileViewer;
593
643
  const renderDrawerContent = useCallback((file, opts) => fileViewerRef.current?.(file, opts) ?? null, []);
644
+ const throughlineViewerRef = useRef(renderThroughlineViewer);
645
+ throughlineViewerRef.current = renderThroughlineViewer;
646
+ const renderThroughlineDrawerContent = useCallback((ctx) => throughlineViewerRef.current?.(ctx) ?? null, []);
594
647
  return (_jsxs("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'row' }, children: [!hideSidebar && (title || description || sidebarExtra || sidebarAfterDescription || treeFilePaths.length > 0 || hasThroughlines) && (_jsxs("div", { style: {
595
648
  width: 340,
596
649
  minWidth: 340,
@@ -761,7 +814,9 @@ function Inner({ components, edges, throughlines, onSelect, onEdgeSelect, measur
761
814
  border: `1px solid ${theme.colors.border}`,
762
815
  borderRadius: 8,
763
816
  boxShadow: '0 8px 24px rgba(0,0,0,0.35)',
764
- }, children: _jsx(ComponentDeclaration, { component: selected, onOpenFile: onOpenDeclarationFile, onRelatedSelect: resolveRelatedComponent, onVerify: onVerifyComponent, verification: componentVerification }) }))] }), _jsx(EdgeLegendModal, { open: legendOpen, mechanisms: usedMechanisms, onClose: () => setLegendOpen(false) }), _jsx(FileDrawer, { file: openFile, onClose: () => setOpenFileTarget(null), children: _jsx(DrawerContent, { render: renderDrawerContent, file: openFile, startLine: openFileStartLine }) }), _jsx(GraphLayoutCover, { revealed: layoutReady }), canvasOverlay] })] }));
817
+ }, children: _jsx(ComponentDeclaration, { component: selected, onOpenFile: onOpenDeclarationFile, onRelatedSelect: resolveRelatedComponent, onVerify: onVerifyComponent, verification: componentVerification }) }))] }), _jsx(EdgeLegendModal, { open: legendOpen, mechanisms: usedMechanisms, onClose: () => setLegendOpen(false) }), _jsx(FileDrawer, { title: drawerTitle, onClose: () => setDrawerTarget(null), children: drawerTarget?.kind === 'throughline' &&
818
+ focusedThroughline &&
819
+ renderThroughlineViewer ? (_jsx(ThroughlineDrawerContent, { render: renderThroughlineDrawerContent, throughline: focusedThroughline, stepIndex: drawerTarget.stepIndex })) : drawerTarget?.kind === 'file' ? (_jsx(FileDrawerContent, { render: renderDrawerContent, file: drawerTarget.file, startLine: drawerTarget.startLine })) : null }), _jsx(GraphLayoutCover, { revealed: layoutReady }), canvasOverlay] })] }));
765
820
  }
766
821
  /** Sidebar header for one repo's tree: owner avatar + repo name + file count.
767
822
  * Clicking toggles the tree's visibility. */