1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="referrer" content="origin-when-cross-origin">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>vuln-notif record graph</title>
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='%234dc9f6'/%3E%3C/svg%3E">
<link rel="stylesheet" href="./vendor/pico.min.css">
<link rel="stylesheet" href="./vendor/highlight-github.min.css">
<style>
:root {
--graph-bg: #ffffff;
--node-stroke: #ffffff;
}
body { margin: 0; padding: 0; overflow: hidden; }
#topbar {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
min-height: 3.25rem;
padding: 0.35rem 1rem;
border-bottom: 1px solid var(--pico-muted-border-color);
box-sizing: border-box;
}
#topbar h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; }
#status { font-size: 0.8rem; color: var(--pico-muted-color); min-width: 10rem; }
#status.error { color: var(--pico-color-red-500); }
#counts, #indexed-count { font-size: 0.8rem; color: var(--pico-muted-color); }
#main-area {
position: relative;
height: calc(100vh - 3.25rem);
background: var(--graph-bg);
}
#graph-pane { position: absolute; inset: 0; }
#graph-pane svg { width: 100%; height: 100%; display: block; }
#empty-state {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
text-align: center;
color: var(--pico-muted-color);
font-size: 0.95rem;
white-space: pre-wrap;
}
/* legend + collection filters */
#legend {
position: absolute;
top: 10px;
left: 10px;
max-height: 55vh;
overflow-y: auto;
background: rgba(255, 255, 255, 0.94);
border: 1px solid var(--pico-muted-border-color);
border-radius: 8px;
padding: 0.5rem 0.65rem;
font-size: 0.7rem;
color: #222;
z-index: 10;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
#legend table { margin: 0; border-collapse: collapse; }
#legend td { padding: 1px 3px; border: 0; vertical-align: middle; }
#legend label { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; white-space: nowrap; user-select: none; }
#legend input[type="checkbox"] { margin: 0; width: 0.85rem; height: 0.85rem; }
#legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
#legend .legend-label.off { opacity: 0.4; }
#legend .legend-count { color: var(--pico-muted-color); margin-left: 0.2rem; }
#tooltip {
position: fixed;
z-index: 30;
pointer-events: none;
background: rgba(20, 20, 20, 0.92);
color: #fff;
border-radius: 5px;
padding: 0.25rem 0.45rem;
font-size: 0.7rem;
max-width: 28rem;
word-break: break-all;
transform: translate(10px, 10px);
}
/* graph marks */
.node { cursor: pointer; stroke: var(--node-stroke); stroke-width: 1.2px; }
.node:hover { stroke: #111; stroke-width: 2.4px; }
.node.selected { stroke: #f59e0b; stroke-width: 4px; }
.node.dimmed { opacity: 0.12; }
.node.focus-hidden, .node-label.focus-hidden,
.edge.focus-hidden, .edge-label.focus-hidden { display: none; }
.edge { stroke-opacity: 0.45; }
.edge.dimmed { stroke-opacity: 0.04; }
.node-label {
font-size: 8px;
fill: #222;
text-anchor: middle;
pointer-events: none;
paint-order: stroke;
stroke: #fff;
stroke-width: 2px;
stroke-linejoin: round;
}
.edge-label {
font-size: 7px;
fill: #555;
text-anchor: middle;
pointer-events: none;
paint-order: stroke;
stroke: #fff;
stroke-width: 2px;
stroke-linejoin: round;
}
.node-label.dimmed, .edge-label.dimmed { opacity: 0.08; }
/* node detail dialog */
#node-modal {
max-width: min(760px, 94vw);
margin: 1rem 1rem 1rem auto;
background: transparent;
}
#node-modal::backdrop { background: rgba(0, 0, 0, 0.05); }
#node-modal article { margin: 0; }
#node-modal header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
gap: 0.75rem;
}
#node-modal header > div { min-width: 0; }
#detail-title { font-size: 1rem; margin: 0 0 0.35rem 0; word-break: break-all; }
#detail-uri { display: block; font-size: 0.72rem; word-break: break-all; margin-bottom: 0.25rem; }
#detail-did { font-size: 0.72rem; color: var(--pico-muted-color); word-break: break-all; }
#modal-close { flex: 0 0 auto; font-size: 1.1rem; line-height: 1; padding: 0.2rem 0.55rem; }
#detail-yaml-wrap {
max-height: 52vh;
overflow: auto;
margin: 0.75rem 0;
padding: 0.75rem;
border-radius: 6px;
border: 1px solid var(--pico-muted-border-color);
background: var(--pico-code-background-color);
font-size: 0.72rem;
line-height: 1.45;
white-space: pre-wrap;
word-break: break-word;
}
#detail-yaml { display: block; padding: 0; background: none; font-size: inherit; }
#detail-yaml[data-highlighted] { background: none; }
#detail-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
#detail-actions a, #detail-actions button { margin: 0; font-size: 0.8rem; padding: 0.4rem 0.7rem; }
#detail-focus[aria-pressed="true"] { background: var(--pico-primary); color: var(--pico-primary-inverse); border-color: var(--pico-primary); }
@media (max-width: 720px) {
#legend { max-height: 38vh; }
#node-modal { max-width: 100vw; }
#detail-yaml-wrap { max-height: 42vh; }
}
</style>
<script src="./vendor/d3.min.js"></script>
<script src="./vendor/highlight.min.js"></script>
</head>
<body>
<header id="topbar">
<h1>vuln-notif record graph</h1>
<span id="status">starting...</span>
<span id="counts"><span id="node-count">0</span> nodes · <span id="edge-count">0</span> edges</span>
<span id="indexed-count" title="records mirrored in IndexedDB">0 indexed</span>
</header>
<main id="main-area">
<div id="graph-pane">
<svg id="graph" role="img" aria-label="Force-directed graph of atproto records"></svg>
<div id="legend" hidden></div>
<div id="tooltip" hidden></div>
<div id="empty-state">Opening local index...</div>
</div>
</main>
<dialog id="node-modal">
<article>
<header>
<div>
<h2 id="detail-title"></h2>
<code id="detail-uri"></code>
<div id="detail-did"></div>
</div>
<button id="modal-close" class="secondary outline" aria-label="Close">×</button>
</header>
<pre id="detail-yaml-wrap"><code id="detail-yaml" class="language-yaml"></code></pre>
<footer id="detail-actions">
<a id="detail-pdsls" class="secondary" href="#" target="_blank" rel="noopener noreferrer">Open on pdsls.dev ↗</a>
<button id="detail-focus" class="secondary outline" aria-pressed="false">Show connected only</button>
</footer>
</article>
</dialog>
<noscript>This viewer needs JavaScript enabled.</noscript>
<script type="module" src="./main.js"></script>
</body>
</html>