codebread 1.0.0__py3-none-any.whl
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.
- codebread/__init__.py +3 -0
- codebread/analyzer.py +84 -0
- codebread/classifier.py +102 -0
- codebread/cli.py +106 -0
- codebread/connections.py +407 -0
- codebread/diff.py +123 -0
- codebread/export.py +45 -0
- codebread/languages.py +110 -0
- codebread/models.py +119 -0
- codebread/parsers/__init__.py +53 -0
- codebread/parsers/generic_parser.py +288 -0
- codebread/parsers/javascript_parser.py +371 -0
- codebread/parsers/python_parser.py +291 -0
- codebread/scanner.py +206 -0
- codebread/server.py +86 -0
- codebread/web/app.js +1716 -0
- codebread/web/index.html +188 -0
- codebread/web/style.css +601 -0
- codebread-1.0.0.dist-info/METADATA +254 -0
- codebread-1.0.0.dist-info/RECORD +24 -0
- codebread-1.0.0.dist-info/WHEEL +5 -0
- codebread-1.0.0.dist-info/entry_points.txt +2 -0
- codebread-1.0.0.dist-info/licenses/LICENSE +21 -0
- codebread-1.0.0.dist-info/top_level.txt +1 -0
codebread/web/style.css
ADDED
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
CodeBread — deep-water theme
|
|
3
|
+
surface: near-black navy · accents: teal/cyan · glassmorphism panels
|
|
4
|
+
layer palette (CVD-validated on dark surface):
|
|
5
|
+
frontend #0284c7 · backend #0d9488 · database #8b5cf6
|
|
6
|
+
config #d97706 · unknown #6678d0
|
|
7
|
+
========================================================================== */
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--bg: #050b16;
|
|
11
|
+
--bg-2: #081120;
|
|
12
|
+
--surface: rgba(13, 27, 48, 0.55);
|
|
13
|
+
--surface-solid: #0d1b30;
|
|
14
|
+
--border: rgba(103, 232, 249, 0.12);
|
|
15
|
+
--border-strong: rgba(103, 232, 249, 0.28);
|
|
16
|
+
--ink: #dbeafe;
|
|
17
|
+
--ink-2: #8aa3c4;
|
|
18
|
+
--ink-3: #56698a;
|
|
19
|
+
--accent: #67e8f9;
|
|
20
|
+
--accent-2: #2dd4bf;
|
|
21
|
+
--frontend: #0284c7;
|
|
22
|
+
--backend: #0d9488;
|
|
23
|
+
--database: #8b5cf6;
|
|
24
|
+
--config: #d97706;
|
|
25
|
+
--unknown: #6678d0;
|
|
26
|
+
--warn: #f59e0b;
|
|
27
|
+
--mono: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
|
|
28
|
+
--sans: "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
29
|
+
--radius: 12px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
33
|
+
|
|
34
|
+
html, body { height: 100%; }
|
|
35
|
+
|
|
36
|
+
body {
|
|
37
|
+
font-family: var(--sans);
|
|
38
|
+
color: var(--ink);
|
|
39
|
+
background:
|
|
40
|
+
radial-gradient(1100px 500px at 75% -10%, rgba(2, 132, 199, 0.14), transparent 60%),
|
|
41
|
+
radial-gradient(900px 600px at -10% 110%, rgba(13, 148, 136, 0.10), transparent 55%),
|
|
42
|
+
linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
#app { display: flex; flex-direction: column; height: 100vh; }
|
|
47
|
+
|
|
48
|
+
button { font-family: inherit; }
|
|
49
|
+
|
|
50
|
+
/* ---------- top bar --------------------------------------------------- */
|
|
51
|
+
|
|
52
|
+
#topbar {
|
|
53
|
+
display: flex; align-items: center; gap: 18px;
|
|
54
|
+
padding: 10px 16px;
|
|
55
|
+
background: rgba(8, 17, 32, 0.7);
|
|
56
|
+
backdrop-filter: blur(14px);
|
|
57
|
+
-webkit-backdrop-filter: blur(14px);
|
|
58
|
+
border-bottom: 1px solid var(--border);
|
|
59
|
+
z-index: 30; flex-wrap: wrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
|
|
63
|
+
#brand-icon { width: 22px; height: 22px; flex: none; }
|
|
64
|
+
#brand-name { font-weight: 600; letter-spacing: 0.4px; color: var(--accent); }
|
|
65
|
+
#project-name { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
|
|
66
|
+
|
|
67
|
+
#stats { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
|
|
68
|
+
#stats b { color: var(--ink); font-weight: 600; font-family: var(--mono); }
|
|
69
|
+
#stats .stat { white-space: nowrap; }
|
|
70
|
+
#stats .stat.warn-btn { cursor: pointer; border: 0; background: none; font: inherit; color: var(--warn); }
|
|
71
|
+
#stats .stat.warn-btn:hover { text-decoration: underline; }
|
|
72
|
+
#stats .stat.insight-btn { color: #fb7185; }
|
|
73
|
+
|
|
74
|
+
#search-wrap { position: relative; flex: 1 1 200px; max-width: 380px; margin-left: auto; }
|
|
75
|
+
#search {
|
|
76
|
+
width: 100%; padding: 7px 12px;
|
|
77
|
+
background: rgba(5, 11, 22, 0.7);
|
|
78
|
+
border: 1px solid var(--border); border-radius: 8px;
|
|
79
|
+
color: var(--ink); font-family: var(--mono); font-size: 12px;
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
#search:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08); }
|
|
83
|
+
#search::placeholder { color: var(--ink-3); }
|
|
84
|
+
|
|
85
|
+
#search-results {
|
|
86
|
+
position: absolute; top: calc(100% + 6px); left: 0; right: 0;
|
|
87
|
+
max-height: 320px; overflow-y: auto;
|
|
88
|
+
background: var(--surface-solid);
|
|
89
|
+
border: 1px solid var(--border-strong); border-radius: 10px;
|
|
90
|
+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
|
|
91
|
+
z-index: 60;
|
|
92
|
+
}
|
|
93
|
+
.sr-item { padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 12px; }
|
|
94
|
+
.sr-item:hover, .sr-item.sel { background: rgba(103, 232, 249, 0.08); }
|
|
95
|
+
.sr-item .sr-name { font-family: var(--mono); color: var(--ink); }
|
|
96
|
+
.sr-item .sr-path { color: var(--ink-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
97
|
+
.sr-empty { padding: 10px 12px; color: var(--ink-3); font-size: 12px; }
|
|
98
|
+
|
|
99
|
+
#layer-filter, #view-mode { display: flex; gap: 4px; background: rgba(5, 11, 22, 0.6); padding: 3px; border-radius: 9px; border: 1px solid var(--border); }
|
|
100
|
+
#layer-filter button, #view-mode button {
|
|
101
|
+
border: 0; background: none; color: var(--ink-2);
|
|
102
|
+
font-size: 12px; padding: 5px 11px; border-radius: 7px; cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
#layer-filter button:hover, #view-mode button:hover { color: var(--ink); }
|
|
105
|
+
#layer-filter button.active, #view-mode button.active { background: rgba(103, 232, 249, 0.13); color: var(--accent); }
|
|
106
|
+
|
|
107
|
+
/* ---------- layout ----------------------------------------------------- */
|
|
108
|
+
|
|
109
|
+
#main { display: flex; flex: 1; min-height: 0; position: relative; }
|
|
110
|
+
|
|
111
|
+
/* ---------- sidebar tree ----------------------------------------------- */
|
|
112
|
+
|
|
113
|
+
#sidebar {
|
|
114
|
+
width: 264px; min-width: 180px; overflow-y: auto;
|
|
115
|
+
background: rgba(8, 17, 32, 0.55);
|
|
116
|
+
backdrop-filter: blur(14px);
|
|
117
|
+
-webkit-backdrop-filter: blur(14px);
|
|
118
|
+
border-right: 1px solid var(--border);
|
|
119
|
+
padding: 10px 6px 30px;
|
|
120
|
+
}
|
|
121
|
+
#sidebar-title {
|
|
122
|
+
font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
|
|
123
|
+
color: var(--ink-3); padding: 4px 12px 10px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.tnode { user-select: none; font-size: 12.5px; }
|
|
127
|
+
.trow {
|
|
128
|
+
display: flex; align-items: center; gap: 6px;
|
|
129
|
+
padding: 3px 8px; border-radius: 6px; cursor: pointer;
|
|
130
|
+
white-space: nowrap; overflow: hidden;
|
|
131
|
+
}
|
|
132
|
+
.trow:hover { background: rgba(103, 232, 249, 0.07); }
|
|
133
|
+
.trow.selected { background: rgba(103, 232, 249, 0.14); }
|
|
134
|
+
.tname { overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
|
|
135
|
+
.tnode.dir > .trow > .tname { color: var(--ink-2); }
|
|
136
|
+
.tcaret { width: 10px; color: var(--ink-3); font-size: 9px; flex: none; transition: transform 0.15s; }
|
|
137
|
+
.tnode.open > .trow .tcaret { transform: rotate(90deg); }
|
|
138
|
+
.tdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
|
|
139
|
+
.tcount { margin-left: auto; font-size: 10px; color: var(--ink-3); font-family: var(--mono); }
|
|
140
|
+
.twarn { color: var(--warn); font-size: 11px; flex: none; }
|
|
141
|
+
.tchildren { margin-left: 14px; border-left: 1px solid rgba(103, 232, 249, 0.07); padding-left: 3px; display: none; }
|
|
142
|
+
.tnode.open > .tchildren { display: block; }
|
|
143
|
+
|
|
144
|
+
/* ---------- canvas ------------------------------------------------------ */
|
|
145
|
+
|
|
146
|
+
#canvas-wrap { flex: 1; position: relative; min-width: 0; }
|
|
147
|
+
#graph {
|
|
148
|
+
width: 100%; height: 100%; display: block; cursor: grab;
|
|
149
|
+
user-select: none; -webkit-user-select: none; -moz-user-select: none;
|
|
150
|
+
}
|
|
151
|
+
#graph.panning { cursor: grabbing; }
|
|
152
|
+
#minimap-svg { user-select: none; -webkit-user-select: none; -moz-user-select: none; }
|
|
153
|
+
|
|
154
|
+
#hint {
|
|
155
|
+
position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
|
|
156
|
+
font-size: 11px; color: var(--ink-3); pointer-events: none;
|
|
157
|
+
background: rgba(5, 11, 22, 0.55); padding: 4px 14px; border-radius: 999px;
|
|
158
|
+
border: 1px solid var(--border); backdrop-filter: blur(8px);
|
|
159
|
+
transition: opacity 0.6s;
|
|
160
|
+
}
|
|
161
|
+
#hint.faded { opacity: 0; }
|
|
162
|
+
|
|
163
|
+
#legend {
|
|
164
|
+
position: absolute; left: 14px; bottom: 14px;
|
|
165
|
+
display: flex; flex-direction: column; gap: 5px;
|
|
166
|
+
background: var(--surface); border: 1px solid var(--border);
|
|
167
|
+
border-radius: var(--radius); padding: 10px 14px;
|
|
168
|
+
backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
|
|
169
|
+
font-size: 11px; color: var(--ink-2); pointer-events: none;
|
|
170
|
+
}
|
|
171
|
+
.lg-row { display: flex; align-items: center; gap: 8px; }
|
|
172
|
+
.lg-dot { width: 9px; height: 9px; border-radius: 50%; }
|
|
173
|
+
.lg-dot.sq { border-radius: 3px; }
|
|
174
|
+
|
|
175
|
+
#zoom-controls {
|
|
176
|
+
position: absolute; right: 14px; bottom: 14px; z-index: 21;
|
|
177
|
+
display: flex; flex-direction: column; gap: 5px;
|
|
178
|
+
}
|
|
179
|
+
#zoom-controls button {
|
|
180
|
+
width: 32px; height: 32px; border-radius: 9px;
|
|
181
|
+
background: var(--surface); border: 1px solid var(--border);
|
|
182
|
+
color: var(--ink-2); font-size: 15px; cursor: pointer;
|
|
183
|
+
backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
|
|
184
|
+
}
|
|
185
|
+
#zoom-controls button:hover { color: var(--accent); border-color: var(--border-strong); }
|
|
186
|
+
#layout-toggle.active { color: var(--accent); border-color: var(--border-strong); background: rgba(103, 232, 249, 0.10); }
|
|
187
|
+
#focus-toggle.active { color: var(--accent); border-color: var(--border-strong); background: rgba(103, 232, 249, 0.10); }
|
|
188
|
+
|
|
189
|
+
/* ---------- graph marks ------------------------------------------------- */
|
|
190
|
+
|
|
191
|
+
.edge {
|
|
192
|
+
fill: none;
|
|
193
|
+
stroke: rgba(103, 232, 249, 0.20);
|
|
194
|
+
stroke-width: 1.4;
|
|
195
|
+
stroke-dasharray: 7 9;
|
|
196
|
+
animation: flow 1.6s linear infinite;
|
|
197
|
+
pointer-events: none;
|
|
198
|
+
}
|
|
199
|
+
.edge-hit { fill: none; stroke: transparent; stroke-width: 11; cursor: pointer; pointer-events: stroke; }
|
|
200
|
+
.edge.k-api { stroke: rgba(56, 189, 248, 0.42); }
|
|
201
|
+
.edge.k-db { stroke: rgba(167, 139, 250, 0.42); }
|
|
202
|
+
.edge.k-call { stroke: rgba(45, 212, 191, 0.30); }
|
|
203
|
+
.edge.k-contains {
|
|
204
|
+
stroke: rgba(138, 163, 196, 0.16); stroke-dasharray: 2 6;
|
|
205
|
+
animation-duration: 3.2s;
|
|
206
|
+
}
|
|
207
|
+
.edge.k-include { stroke: rgba(138, 163, 196, 0.30); stroke-dasharray: 3 7; }
|
|
208
|
+
.edge.k-link { stroke: rgba(217, 119, 6, 0.38); }
|
|
209
|
+
.edge.cycle { stroke: rgba(244, 63, 94, 0.45); stroke-dasharray: 4 5; }
|
|
210
|
+
.edge.cycle.lit { stroke: #fb7185; }
|
|
211
|
+
.edge.lit {
|
|
212
|
+
stroke-width: 2.2;
|
|
213
|
+
animation-duration: 0.7s;
|
|
214
|
+
filter: url(#glow);
|
|
215
|
+
marker-end: url(#arrow);
|
|
216
|
+
}
|
|
217
|
+
.edge.k-api.lit { stroke: #38bdf8; }
|
|
218
|
+
.edge.k-db.lit { stroke: #a78bfa; }
|
|
219
|
+
.edge.k-call.lit { stroke: #2dd4bf; }
|
|
220
|
+
.edge.k-contains.lit { stroke: rgba(138, 163, 196, 0.5); marker-end: none; }
|
|
221
|
+
.edge.k-include.lit { stroke: #8aa3c4; }
|
|
222
|
+
.edge.k-link.lit { stroke: #fbbf24; }
|
|
223
|
+
.edge.dim, .edge-hit.dim { opacity: 0.06; }
|
|
224
|
+
|
|
225
|
+
@keyframes flow { to { stroke-dashoffset: -32; } }
|
|
226
|
+
|
|
227
|
+
@media (prefers-reduced-motion: reduce) {
|
|
228
|
+
.edge { animation: none; }
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.node { cursor: pointer; }
|
|
232
|
+
.node .shape {
|
|
233
|
+
fill: rgba(13, 27, 48, 0.82);
|
|
234
|
+
stroke-width: 1.3;
|
|
235
|
+
transition: filter 0.15s;
|
|
236
|
+
}
|
|
237
|
+
.node text {
|
|
238
|
+
font-family: var(--mono); fill: var(--ink);
|
|
239
|
+
pointer-events: none; dominant-baseline: central;
|
|
240
|
+
}
|
|
241
|
+
.node .sub { fill: var(--ink-3); }
|
|
242
|
+
.node .ldot { stroke: none; }
|
|
243
|
+
.node:hover .shape { filter: url(#glow); }
|
|
244
|
+
.node.selected .shape { stroke-width: 2.2; filter: url(#glow); }
|
|
245
|
+
.node.lit .shape { filter: url(#glow); }
|
|
246
|
+
.node.dim { opacity: 0.13; }
|
|
247
|
+
.node .badge { font-size: 9px; fill: var(--ink-3); }
|
|
248
|
+
.node .warnb { font-size: 10px; }
|
|
249
|
+
.node .cycleb { font-size: 10px; fill: #fb7185; }
|
|
250
|
+
.node .routeb { fill: #38bdf8; font-size: 8.5px; letter-spacing: 0.3px; }
|
|
251
|
+
|
|
252
|
+
/* ---------- tooltip ------------------------------------------------------ */
|
|
253
|
+
|
|
254
|
+
#tooltip {
|
|
255
|
+
position: absolute; z-index: 50; pointer-events: none;
|
|
256
|
+
max-width: 340px;
|
|
257
|
+
background: var(--surface-solid);
|
|
258
|
+
border: 1px solid var(--border-strong);
|
|
259
|
+
border-radius: 10px; padding: 9px 12px;
|
|
260
|
+
font-size: 12px; color: var(--ink);
|
|
261
|
+
box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
|
|
262
|
+
}
|
|
263
|
+
#tooltip .tt-name { font-family: var(--mono); color: var(--accent); font-size: 12.5px; }
|
|
264
|
+
#tooltip .tt-desc { color: var(--ink-2); margin-top: 4px; line-height: 1.45; }
|
|
265
|
+
#tooltip .tt-meta { color: var(--ink-3); font-size: 11px; margin-top: 4px; font-family: var(--mono); }
|
|
266
|
+
|
|
267
|
+
/* ---------- detail panel ------------------------------------------------- */
|
|
268
|
+
|
|
269
|
+
#detail {
|
|
270
|
+
position: absolute; top: 14px; right: 14px; bottom: 14px;
|
|
271
|
+
width: 330px; max-width: 44vw;
|
|
272
|
+
background: var(--surface);
|
|
273
|
+
border: 1px solid var(--border-strong);
|
|
274
|
+
border-radius: 16px;
|
|
275
|
+
backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
|
|
276
|
+
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
|
|
277
|
+
overflow-y: auto; z-index: 20;
|
|
278
|
+
padding: 18px;
|
|
279
|
+
}
|
|
280
|
+
#detail-close {
|
|
281
|
+
position: absolute; top: 8px; right: 10px;
|
|
282
|
+
background: none; border: 0; color: var(--ink-3);
|
|
283
|
+
font-size: 20px; cursor: pointer; line-height: 1;
|
|
284
|
+
}
|
|
285
|
+
#detail-close:hover { color: var(--ink); }
|
|
286
|
+
|
|
287
|
+
.d-kind {
|
|
288
|
+
display: inline-block; font-size: 10px; letter-spacing: 1.5px;
|
|
289
|
+
text-transform: uppercase; padding: 2px 9px; border-radius: 999px;
|
|
290
|
+
border: 1px solid; margin-bottom: 8px;
|
|
291
|
+
}
|
|
292
|
+
.d-name { font-family: var(--mono); font-size: 17px; word-break: break-all; }
|
|
293
|
+
.d-sub { color: var(--ink-3); font-size: 11px; margin-top: 3px; font-family: var(--mono); }
|
|
294
|
+
.d-file { color: var(--accent-2); cursor: pointer; }
|
|
295
|
+
.d-file:hover { text-decoration: underline; }
|
|
296
|
+
.d-desc { color: var(--ink-2); font-size: 12.5px; line-height: 1.55; margin: 12px 0; }
|
|
297
|
+
.d-section { margin-top: 14px; }
|
|
298
|
+
.d-section h4 {
|
|
299
|
+
font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase;
|
|
300
|
+
color: var(--ink-3); font-weight: 600; margin-bottom: 6px;
|
|
301
|
+
}
|
|
302
|
+
.d-chip {
|
|
303
|
+
display: inline-block; font-family: var(--mono); font-size: 11px;
|
|
304
|
+
background: rgba(103, 232, 249, 0.07); border: 1px solid var(--border);
|
|
305
|
+
border-radius: 6px; padding: 2px 8px; margin: 0 4px 4px 0; color: var(--ink-2);
|
|
306
|
+
}
|
|
307
|
+
.d-link {
|
|
308
|
+
display: flex; gap: 7px; align-items: center;
|
|
309
|
+
font-family: var(--mono); font-size: 12px; color: var(--ink);
|
|
310
|
+
padding: 4px 8px; border-radius: 7px; cursor: pointer;
|
|
311
|
+
}
|
|
312
|
+
.d-link:hover { background: rgba(103, 232, 249, 0.08); color: var(--accent); }
|
|
313
|
+
.d-link .dl-kind { font-size: 10px; color: var(--ink-3); flex: none; width: 34px; }
|
|
314
|
+
.d-link .dl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
315
|
+
.d-route {
|
|
316
|
+
font-family: var(--mono); font-size: 11.5px; color: #38bdf8;
|
|
317
|
+
padding: 3px 0;
|
|
318
|
+
}
|
|
319
|
+
.d-warn { color: var(--warn); font-size: 12px; line-height: 1.5; padding: 3px 0; }
|
|
320
|
+
.d-warn.d-cycle { color: #fb7185; }
|
|
321
|
+
.d-fields { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); line-height: 1.7; }
|
|
322
|
+
.d-empty { color: var(--ink-3); font-size: 12px; }
|
|
323
|
+
|
|
324
|
+
.d-code-toggle {
|
|
325
|
+
width: 100%; text-align: left;
|
|
326
|
+
background: rgba(103, 232, 249, 0.06);
|
|
327
|
+
border: 1px solid var(--border); border-radius: 8px;
|
|
328
|
+
color: var(--ink-2); font-family: var(--mono); font-size: 11.5px;
|
|
329
|
+
padding: 7px 10px; cursor: pointer;
|
|
330
|
+
}
|
|
331
|
+
.d-code-toggle:hover { color: var(--accent); border-color: var(--border-strong); }
|
|
332
|
+
.d-code {
|
|
333
|
+
margin-top: 6px; max-height: 340px; overflow: auto;
|
|
334
|
+
background: rgba(3, 8, 16, 0.9);
|
|
335
|
+
border: 1px solid var(--border); border-radius: 8px;
|
|
336
|
+
padding: 10px 10px 10px 6px;
|
|
337
|
+
font-family: var(--mono); font-size: 11px; line-height: 1.6;
|
|
338
|
+
color: var(--ink); white-space: pre; tab-size: 4;
|
|
339
|
+
}
|
|
340
|
+
.c-ln {
|
|
341
|
+
display: inline-block; min-width: 34px; margin-right: 12px;
|
|
342
|
+
text-align: right; color: var(--ink-3); opacity: 0.65; user-select: none;
|
|
343
|
+
}
|
|
344
|
+
/* IDE-style syntax colors (VS Code Dark+ inspired) */
|
|
345
|
+
.c-kw { color: #569cd6; }
|
|
346
|
+
.c-ctl { color: #c586c0; }
|
|
347
|
+
.c-str { color: #ce9178; }
|
|
348
|
+
.c-com { color: #6a9955; font-style: italic; }
|
|
349
|
+
.c-num { color: #b5cea8; }
|
|
350
|
+
.c-call { color: #dcdcaa; }
|
|
351
|
+
.c-var { color: #9cdcfe; }
|
|
352
|
+
|
|
353
|
+
/* ---------- IDE full-file viewer -------------------------------------- */
|
|
354
|
+
|
|
355
|
+
#ide {
|
|
356
|
+
flex: 1; min-width: 0;
|
|
357
|
+
display: flex; flex-direction: column;
|
|
358
|
+
background: #0b1526;
|
|
359
|
+
overflow: hidden;
|
|
360
|
+
}
|
|
361
|
+
#ide-head {
|
|
362
|
+
display: flex; align-items: center; gap: 10px;
|
|
363
|
+
padding: 10px 16px; flex: none;
|
|
364
|
+
background: rgba(8, 17, 32, 0.9);
|
|
365
|
+
border-bottom: 1px solid var(--border);
|
|
366
|
+
}
|
|
367
|
+
#ide-path { font-family: var(--mono); font-size: 13px; color: var(--accent); }
|
|
368
|
+
#ide-lang {
|
|
369
|
+
font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
|
|
370
|
+
color: var(--ink-3); border: 1px solid var(--border);
|
|
371
|
+
border-radius: 999px; padding: 2px 9px;
|
|
372
|
+
}
|
|
373
|
+
#ide-close {
|
|
374
|
+
margin-left: auto; cursor: pointer;
|
|
375
|
+
background: rgba(103, 232, 249, 0.07);
|
|
376
|
+
border: 1px solid var(--border); border-radius: 7px;
|
|
377
|
+
color: var(--ink-2); font-size: 12px; padding: 4px 12px;
|
|
378
|
+
}
|
|
379
|
+
#ide-close:hover { color: var(--accent); border-color: var(--border-strong); }
|
|
380
|
+
.ide-placeholder {
|
|
381
|
+
display: grid; place-items: center; height: 100%;
|
|
382
|
+
color: var(--ink-3); font-family: var(--sans); font-size: 13px;
|
|
383
|
+
text-align: center; line-height: 1.9;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
#ide-body { display: flex; flex: 1; min-height: 0; }
|
|
387
|
+
|
|
388
|
+
#ide-outline {
|
|
389
|
+
width: 240px; min-width: 170px; flex: none; overflow-y: auto;
|
|
390
|
+
background: rgba(8, 17, 32, 0.6);
|
|
391
|
+
border-right: 1px solid var(--border);
|
|
392
|
+
padding: 10px 6px 24px;
|
|
393
|
+
}
|
|
394
|
+
#ide-outline-title {
|
|
395
|
+
font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
|
|
396
|
+
color: var(--ink-3); padding: 2px 12px 10px;
|
|
397
|
+
}
|
|
398
|
+
.ol-item {
|
|
399
|
+
display: flex; align-items: center; gap: 8px;
|
|
400
|
+
padding: 5px 10px; border-radius: 7px; cursor: pointer;
|
|
401
|
+
font-size: 12px; white-space: nowrap; overflow: hidden;
|
|
402
|
+
}
|
|
403
|
+
.ol-item:hover { background: rgba(103, 232, 249, 0.07); }
|
|
404
|
+
.ol-item.active { background: rgba(103, 232, 249, 0.14); }
|
|
405
|
+
.ol-num {
|
|
406
|
+
font-family: var(--mono); font-size: 10px; color: var(--ink-3);
|
|
407
|
+
min-width: 18px; text-align: right; flex: none;
|
|
408
|
+
}
|
|
409
|
+
.ol-name {
|
|
410
|
+
font-family: var(--mono); color: #dcdcaa;
|
|
411
|
+
overflow: hidden; text-overflow: ellipsis;
|
|
412
|
+
}
|
|
413
|
+
.ol-item.active .ol-name { color: var(--accent); }
|
|
414
|
+
.ol-line { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
|
|
415
|
+
.ol-empty { padding: 8px 12px; color: var(--ink-3); font-size: 12px; }
|
|
416
|
+
|
|
417
|
+
#ide-code {
|
|
418
|
+
flex: 1; overflow: auto;
|
|
419
|
+
font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
|
|
420
|
+
padding: 12px 0 40vh;
|
|
421
|
+
color: #d4d4d4; tab-size: 4;
|
|
422
|
+
}
|
|
423
|
+
.cl { display: flex; white-space: pre; padding: 0 16px 0 0; }
|
|
424
|
+
.cl:hover { background: rgba(103, 232, 249, 0.04); }
|
|
425
|
+
.cl .c-ln {
|
|
426
|
+
min-width: 52px; padding-right: 16px; margin-right: 14px;
|
|
427
|
+
border-right: 1px solid rgba(103, 232, 249, 0.07);
|
|
428
|
+
flex: none;
|
|
429
|
+
}
|
|
430
|
+
.cl.focus {
|
|
431
|
+
background: rgba(56, 189, 248, 0.09);
|
|
432
|
+
box-shadow: inset 3px 0 0 var(--accent);
|
|
433
|
+
}
|
|
434
|
+
.cl.focus .c-ln { color: var(--accent); opacity: 1; }
|
|
435
|
+
|
|
436
|
+
/* ---------- warnings panel ------------------------------------------------ */
|
|
437
|
+
|
|
438
|
+
#warnings-panel {
|
|
439
|
+
position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
|
|
440
|
+
width: min(640px, 92vw); max-height: 60vh; overflow-y: auto;
|
|
441
|
+
background: var(--surface-solid);
|
|
442
|
+
border: 1px solid rgba(245, 158, 11, 0.35);
|
|
443
|
+
border-radius: 14px; z-index: 70;
|
|
444
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
|
|
445
|
+
}
|
|
446
|
+
.wp-head {
|
|
447
|
+
position: sticky; top: 0;
|
|
448
|
+
display: flex; justify-content: space-between; align-items: center;
|
|
449
|
+
padding: 12px 16px; background: var(--surface-solid);
|
|
450
|
+
border-bottom: 1px solid var(--border);
|
|
451
|
+
font-size: 13px; color: var(--warn); font-weight: 600;
|
|
452
|
+
}
|
|
453
|
+
.wp-head button { background: none; border: 0; color: var(--ink-3); font-size: 18px; cursor: pointer; }
|
|
454
|
+
.wp-item { padding: 9px 16px; font-size: 12px; border-bottom: 1px solid rgba(103, 232, 249, 0.05); }
|
|
455
|
+
.wp-item .wp-path { font-family: var(--mono); color: var(--accent-2); }
|
|
456
|
+
.wp-item .wp-msg { color: var(--ink-2); margin-top: 2px; }
|
|
457
|
+
.wp-item.ip-clickable { cursor: pointer; }
|
|
458
|
+
.wp-item.ip-clickable:hover { background: rgba(103, 232, 249, 0.07); }
|
|
459
|
+
|
|
460
|
+
/* ---------- insights panel (orphans / cycles) ------------------------------ */
|
|
461
|
+
|
|
462
|
+
#insights-panel {
|
|
463
|
+
position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
|
|
464
|
+
width: min(640px, 92vw); max-height: 60vh; overflow-y: auto;
|
|
465
|
+
background: var(--surface-solid);
|
|
466
|
+
border: 1px solid rgba(251, 113, 133, 0.35);
|
|
467
|
+
border-radius: 14px; z-index: 70;
|
|
468
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
|
|
469
|
+
}
|
|
470
|
+
#insights-panel .wp-head { color: #fb7185; }
|
|
471
|
+
#insights-body { padding-bottom: 6px; }
|
|
472
|
+
.ip-section h5 {
|
|
473
|
+
padding: 12px 16px 6px; margin: 0;
|
|
474
|
+
font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
|
|
475
|
+
color: var(--ink-3); font-weight: 600;
|
|
476
|
+
}
|
|
477
|
+
.ip-section h5 span { color: var(--ink-2); font-family: var(--mono); text-transform: none; letter-spacing: 0; }
|
|
478
|
+
|
|
479
|
+
/* ---------- minimap --------------------------------------------------- */
|
|
480
|
+
|
|
481
|
+
#minimap {
|
|
482
|
+
position: absolute; right: 14px; top: 14px;
|
|
483
|
+
width: 168px; height: 112px;
|
|
484
|
+
background: var(--surface); border: 1px solid var(--border);
|
|
485
|
+
border-radius: 10px; overflow: hidden;
|
|
486
|
+
backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
|
|
487
|
+
cursor: crosshair;
|
|
488
|
+
}
|
|
489
|
+
#minimap-svg { width: 100%; height: 100%; display: block; }
|
|
490
|
+
#mm-viewport {
|
|
491
|
+
fill: rgba(103, 232, 249, 0.10);
|
|
492
|
+
stroke: var(--accent); stroke-width: 1;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* ---------- breadcrumb -------------------------------------------------- */
|
|
496
|
+
|
|
497
|
+
#breadcrumb {
|
|
498
|
+
position: absolute; top: 12px; left: 12px; z-index: 15;
|
|
499
|
+
max-width: min(60%, 640px);
|
|
500
|
+
display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden;
|
|
501
|
+
gap: 2px;
|
|
502
|
+
background: rgba(5, 11, 22, 0.55); border: 1px solid var(--border);
|
|
503
|
+
border-radius: 999px; padding: 5px 12px;
|
|
504
|
+
backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
|
|
505
|
+
font-family: var(--mono); font-size: 11px;
|
|
506
|
+
}
|
|
507
|
+
.bc-item {
|
|
508
|
+
color: var(--ink-3); cursor: pointer; white-space: nowrap;
|
|
509
|
+
overflow: hidden; text-overflow: ellipsis; max-width: 140px;
|
|
510
|
+
padding: 2px 3px; border-radius: 5px;
|
|
511
|
+
}
|
|
512
|
+
.bc-item:hover { color: var(--bc-color, var(--accent)); background: rgba(103, 232, 249, 0.08); }
|
|
513
|
+
.bc-item.current { color: var(--bc-color, var(--accent)); font-weight: 600; }
|
|
514
|
+
.bc-item.bc-dir { cursor: default; opacity: 0.7; }
|
|
515
|
+
.bc-item.bc-dir:hover { color: var(--ink-3); background: none; }
|
|
516
|
+
.bc-sep { color: var(--ink-3); opacity: 0.5; flex: none; }
|
|
517
|
+
|
|
518
|
+
/* ---------- empty state -------------------------------------------------- */
|
|
519
|
+
|
|
520
|
+
#empty-state {
|
|
521
|
+
position: absolute; inset: 0; z-index: 5;
|
|
522
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
523
|
+
gap: 6px; text-align: center; pointer-events: none;
|
|
524
|
+
}
|
|
525
|
+
.cb-mark { display: block; }
|
|
526
|
+
#empty-icon { width: 52px; height: 52px; opacity: 0.85; }
|
|
527
|
+
#empty-title { font-size: 15px; color: var(--ink); font-weight: 600; }
|
|
528
|
+
#empty-msg { font-size: 12.5px; color: var(--ink-3); max-width: 340px; }
|
|
529
|
+
|
|
530
|
+
/* ---------- context menu -------------------------------------------------- */
|
|
531
|
+
|
|
532
|
+
#context-menu {
|
|
533
|
+
position: fixed; z-index: 90;
|
|
534
|
+
min-width: 190px; max-width: 280px;
|
|
535
|
+
padding: 5px;
|
|
536
|
+
background: var(--surface-solid);
|
|
537
|
+
border: 1px solid var(--border-strong);
|
|
538
|
+
border-radius: 10px;
|
|
539
|
+
box-shadow: 0 16px 46px rgba(0, 0, 0, 0.55);
|
|
540
|
+
backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
|
|
541
|
+
}
|
|
542
|
+
.cm-item {
|
|
543
|
+
display: block; width: 100%; text-align: left;
|
|
544
|
+
background: none; border: 0; border-radius: 6px;
|
|
545
|
+
padding: 7px 10px; font-size: 12.5px; font-family: var(--sans);
|
|
546
|
+
color: var(--ink); cursor: pointer;
|
|
547
|
+
}
|
|
548
|
+
.cm-item:hover { background: rgba(103, 232, 249, 0.10); color: var(--accent); }
|
|
549
|
+
.cm-item.disabled { color: var(--ink-3); cursor: default; }
|
|
550
|
+
.cm-item.disabled:hover { background: none; color: var(--ink-3); }
|
|
551
|
+
.cm-sep { height: 1px; margin: 5px 6px; background: var(--border); }
|
|
552
|
+
|
|
553
|
+
/* ---------- onboarding --------------------------------------------------- */
|
|
554
|
+
|
|
555
|
+
#onboarding {
|
|
556
|
+
position: fixed; inset: 0; z-index: 100;
|
|
557
|
+
display: flex; align-items: center; justify-content: center;
|
|
558
|
+
background: rgba(3, 8, 16, 0.68);
|
|
559
|
+
backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
|
|
560
|
+
}
|
|
561
|
+
#onboarding-card {
|
|
562
|
+
width: min(420px, 90vw);
|
|
563
|
+
background: var(--surface-solid);
|
|
564
|
+
border: 1px solid var(--border-strong);
|
|
565
|
+
border-radius: 18px; padding: 26px 28px;
|
|
566
|
+
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
|
|
567
|
+
}
|
|
568
|
+
#onboarding-icon { width: 40px; height: 40px; margin-bottom: 10px; }
|
|
569
|
+
#onboarding-card h3 { font-size: 17px; color: var(--accent); margin-bottom: 14px; }
|
|
570
|
+
#onboarding-card ol { margin: 0 0 20px 18px; color: var(--ink-2); font-size: 13px; line-height: 1.8; }
|
|
571
|
+
#onboarding-card ol b { color: var(--ink); }
|
|
572
|
+
#onboarding-card kbd {
|
|
573
|
+
font-family: var(--mono); background: rgba(103, 232, 249, 0.1);
|
|
574
|
+
border: 1px solid var(--border); border-radius: 4px; padding: 0 5px;
|
|
575
|
+
color: var(--accent);
|
|
576
|
+
}
|
|
577
|
+
#onboarding-dismiss {
|
|
578
|
+
width: 100%; padding: 9px; border-radius: 9px; cursor: pointer;
|
|
579
|
+
background: rgba(103, 232, 249, 0.12); border: 1px solid var(--border-strong);
|
|
580
|
+
color: var(--accent); font-size: 13px; font-weight: 600;
|
|
581
|
+
}
|
|
582
|
+
#onboarding-dismiss:hover { background: rgba(103, 232, 249, 0.2); }
|
|
583
|
+
|
|
584
|
+
/* ---------- misc ----------------------------------------------------------- */
|
|
585
|
+
|
|
586
|
+
.hidden { display: none !important; }
|
|
587
|
+
|
|
588
|
+
::-webkit-scrollbar { width: 9px; height: 9px; }
|
|
589
|
+
::-webkit-scrollbar-thumb { background: rgba(103, 232, 249, 0.14); border-radius: 6px; }
|
|
590
|
+
::-webkit-scrollbar-thumb:hover { background: rgba(103, 232, 249, 0.25); }
|
|
591
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
592
|
+
|
|
593
|
+
@media (max-width: 900px) {
|
|
594
|
+
#sidebar { position: absolute; z-index: 25; height: 100%; left: 0;
|
|
595
|
+
transform: translateX(-100%); transition: transform 0.2s; }
|
|
596
|
+
#sidebar.open { transform: none; }
|
|
597
|
+
#detail { width: min(330px, 86vw); }
|
|
598
|
+
#stats { display: none; }
|
|
599
|
+
#minimap { display: none; }
|
|
600
|
+
#breadcrumb { max-width: 70%; }
|
|
601
|
+
}
|