1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Redesign graph nodes around semantic contributors

This commit is contained in:
Andraxion 2026-07-25 18:12:26 -04:00
parent cb4353fe8c
commit 252033e30a
14 changed files with 447 additions and 137 deletions

View file

@ -11,12 +11,6 @@
--warn: #ffd27a;
--left-width: 310px;
--right-width: 350px;
--primary-fill: #176b7d;
--primary-stroke: #83e8ff;
--child-fill: #216c51;
--child-stroke: #91f2bd;
--edge-fill: #634580;
--edge-stroke: #d0a7ff;
font: 14px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
@ -115,6 +109,11 @@ input:focus-visible, select:focus-visible {
margin: 18px 0 8px; color: var(--muted); font-size: 11px;
font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.section-label::before {
width: 3px; height: 16px; border-radius: 999px; margin-right: 1px;
background: var(--section-color, var(--accent)); content: "";
box-shadow: 0 0 10px color-mix(in srgb, var(--section-color, var(--accent)) 45%, transparent);
}
.section-label span {
min-width: 24px; border: 1px solid var(--line); border-radius: 999px;
padding: 1px 6px; text-align: center; letter-spacing: 0;
@ -141,22 +140,22 @@ input:focus-visible, select:focus-visible {
box-shadow: 0 0 12px color-mix(in srgb, var(--item-color, var(--accent)) 35%, transparent);
}
.node-list-copy { min-width: 0; }
.node-list-copy strong, .node-list-copy span {
display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.node-list-copy strong, .node-list-copy span { display: block; overflow-wrap: anywhere; }
.node-list-copy strong { line-height: 1.25; }
.node-list-copy span { color: var(--muted); font-size: 11px; }
.node-legend {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px;
padding-bottom: 4px;
display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-bottom: 4px;
}
.node-legend span {
display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px;
display: flex; align-items: center; gap: 6px; border: 1px solid var(--line);
border-radius: 999px; padding: 3px 7px; background: rgba(8, 19, 31, .72);
color: var(--muted); font-size: 10px;
}
.node-legend span[hidden] { display: none; }
.node-legend i { width: 8px; height: 8px; border-radius: 50%; }
.node-legend-primary i { background: var(--primary-stroke); }
.node-legend-child i { background: var(--child-stroke); }
.node-legend-edge i { background: var(--edge-stroke); }
.node-legend i {
width: 7px; height: 7px; border-radius: 2px; background: var(--legend-color);
box-shadow: 0 0 8px color-mix(in srgb, var(--legend-color) 55%, transparent);
}
.node-legend b { font-weight: 650; }
.result {
width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 9px;
padding: 9px; background: var(--panel-2); color: var(--text);
@ -166,7 +165,11 @@ input:focus-visible, select:focus-visible {
.result span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
svg { width: 100%; height: 100%; background:
radial-gradient(circle at center, #10243a 0, #07101a 64%);
radial-gradient(circle at 52% 46%, rgba(26, 65, 89, .58) 0, rgba(10, 28, 45, .46) 34%,
#07101a 72%),
linear-gradient(rgba(72, 117, 148, .025) 1px, transparent 1px),
linear-gradient(90deg, rgba(72, 117, 148, .025) 1px, transparent 1px);
background-size: auto, 28px 28px, 28px 28px;
cursor: grab; touch-action: none; user-select: none;
}
.canvas.dragging svg { cursor: grabbing; }
@ -235,32 +238,76 @@ svg { width: 100%; height: 100%; background:
.relationship-key-item small { color: var(--muted); }
.relationship-key-empty { margin: 2px 0; color: var(--muted); font-size: 11px; }
.relationship-edge {
fill: none; stroke-opacity: .8; stroke-width: 1.7;
fill: none; stroke-opacity: .74; stroke-width: 1.7;
vector-effect: non-scaling-stroke;
}
.edge-label {
font-size: 9px; font-weight: 650; pointer-events: none;
paint-order: stroke; stroke: #07101a; stroke-width: 3px; stroke-linejoin: round;
font-size: 9px; font-weight: 700; letter-spacing: .015em; pointer-events: none;
paint-order: stroke; stroke: #07101a; stroke-width: 4px; stroke-linejoin: round;
}
.node { cursor: pointer; }
.node:focus { outline: none; }
.node > circle:not(.selection-ring) {
stroke-width: 1.8; transition: stroke-width .15s, filter .15s;
.node .node-surface {
stroke-width: 1.35; vector-effect: non-scaling-stroke;
filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .26));
transition: stroke-width .15s, filter .15s;
}
.node.root > circle:not(.selection-ring) {
stroke-width: 3; filter: drop-shadow(0 0 8px rgba(81, 215, 255, .24));
.node.root .node-surface {
stroke-width: 2.5;
filter: drop-shadow(0 0 13px rgba(103, 232, 249, .34))
drop-shadow(0 10px 20px rgba(0, 0, 0, .34));
}
.node:hover > circle:not(.selection-ring) { stroke: #fff; stroke-width: 3; }
.node:hover .node-surface { stroke: #fff; stroke-width: 2.35; }
.node .node-accent { pointer-events: none; }
.node .selection-ring {
fill: none; stroke: #ffd166; stroke-width: 0; opacity: 0;
fill: none; stroke: #ffe08a; stroke-width: 0; opacity: 0;
pointer-events: none; vector-effect: non-scaling-stroke;
transition: opacity .15s, stroke-width .15s;
}
.node.selected .selection-ring, .node:focus-visible .selection-ring {
stroke-width: 2.5; opacity: 1; filter: drop-shadow(0 0 5px rgba(255, 209, 102, .7));
stroke-width: 2.25; opacity: 1; filter: drop-shadow(0 0 7px rgba(255, 224, 138, .72));
}
.graph-node-foreign { overflow: visible; pointer-events: none; }
.graph-node-content {
width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center;
gap: 7px; padding: 9px 12px 10px 13px; color: var(--text);
}
.graph-node-meta {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
min-width: 0; color: var(--muted); font-size: 8px; line-height: 1;
letter-spacing: .055em; text-transform: uppercase;
}
.graph-node-category {
display: inline-flex; align-items: center; gap: 5px; min-width: 0;
color: var(--node-color); font-weight: 800;
}
.graph-node-category::before {
width: 6px; height: 6px; flex: 0 0 auto; border-radius: 2px;
background: var(--node-color); content: "";
box-shadow: 0 0 8px color-mix(in srgb, var(--node-color) 60%, transparent);
}
.graph-node-kind {
min-width: 0; overflow-wrap: anywhere; color: #9eb1c4; font-weight: 650; text-align: right;
}
.graph-node-title {
display: block; color: #f6fbff; font-size: 12px; font-weight: 720;
line-height: 1.18; overflow-wrap: anywhere; text-wrap: balance;
}
.node.root .graph-node-title { font-size: 13px; }
.node.root .graph-node-category { color: #a5f3fc; }
.node.root .graph-node-content { gap: 8px; padding-inline: 15px; }
.node.category-context .graph-node-title,
.node.category-related .graph-node-title { color: #e4edf6; }
.node.category-evidence .graph-node-title { color: #fff7ff; }
.node.category-dependency .graph-node-title { color: #fffbed; }
.node.category-behavior .graph-node-title { color: #faf7ff; }
.node.category-composition .graph-node-title { color: #f4f9ff; }
.node.category-execution .graph-node-title { color: #f0fff9; }
.node.category-data .graph-node-title { color: #effdff; }
.node > title { pointer-events: none; }
.node text {
fill: var(--text); font-size: 10px; pointer-events: none;
}
.node text { fill: var(--text); font-size: 10px; pointer-events: none; }
.node .family { fill: var(--muted); font-size: 8px; }
.empty {
position: absolute; inset: 0; display: grid; place-items: center;
color: var(--muted); pointer-events: none;