1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages
DocForge2/src/docforge/assets/graph.css

468 lines
20 KiB
CSS
Raw Normal View History

:root {
color-scheme: dark;
--bg: #07101a;
--panel: #0c1825;
--panel-2: #111f2f;
--line: #263b51;
--text: #ecf5ff;
--muted: #93abc3;
--accent: #51d7ff;
--accent-2: #8fffc5;
--warn: #ffd27a;
--left-width: 310px;
--right-width: 350px;
font: 14px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.app { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
header {
display: flex; gap: 14px; align-items: center; padding: 10px 14px;
border-bottom: 1px solid var(--line); background: rgba(8, 18, 30, .96);
}
header h1 { margin: 0; font-size: 17px; }
.view-switch {
position: relative; display: grid; grid-template-columns: repeat(4, 58px);
flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 9px;
background: #08131f; isolation: isolate;
}
.view-switch::before {
content: ""; position: absolute; z-index: -1; top: 3px; left: 3px;
width: 58px; height: calc(100% - 6px); border-radius: 6px;
background: #1b536b; box-shadow: 0 0 14px rgba(81, 215, 255, .18);
transition: transform .18s ease;
}
.view-switch[data-mode="flow"]::before { transform: translateX(58px); }
.view-switch[data-mode="web"]::before { transform: translateX(116px); }
.view-switch[data-mode="logic"]::before { transform: translateX(174px); }
2026-07-25 22:29:15 -04:00
.filter-presets { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-presets button {
border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px;
background: #0b1724; color: var(--muted); font-size: 10px; font-weight: 700;
}
.view-switch button {
min-height: 30px; border: 0; border-radius: 6px; padding: 4px 8px;
background: transparent; color: var(--muted); font-size: 12px; font-weight: 700;
}
2026-07-25 22:29:15 -04:00
.filter-presets button:hover, .filter-presets button:focus-visible {
border-color: var(--accent); color: var(--text); outline: none;
}
.view-switch button[aria-pressed="true"] { color: var(--text); }
.view-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stats { display: flex; flex: 0 0 auto; gap: 14px; color: var(--muted); }
.status {
min-width: 0; margin-left: auto; overflow: hidden; color: var(--muted);
text-overflow: ellipsis; white-space: nowrap;
}
.layout {
min-height: 0; overflow: hidden; display: grid;
grid-template-columns: var(--left-width) 7px minmax(360px, 1fr) 7px var(--right-width);
}
aside { min-height: 0; overflow: hidden; padding: 16px; background: var(--panel); }
.left, .right { display: flex; flex-direction: column; }
.panel-empty {
max-width: 220px; margin: auto; color: var(--muted); text-align: center;
}
.panel-resizer {
position: relative; z-index: 4; min-height: 0; background: #0a1521;
cursor: col-resize; touch-action: none;
}
.panel-resizer::after {
content: ""; position: absolute; inset: 0 2px; background: var(--line);
transition: background .15s;
}
.panel-resizer:hover::after, .panel-resizer:focus-visible::after,
.panel-resizer.resizing::after { background: var(--accent); }
.panel-resizer:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
form { display: grid; flex: 0 0 auto; gap: 8px; }
2026-07-25 22:29:15 -04:00
form > label, .filter-grid label {
display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700;
}
input, select {
width: 100%; border: 1px solid var(--line); border-radius: 8px;
padding: 9px 10px; background: var(--panel-2); color: var(--text);
}
input:focus-visible, select:focus-visible {
border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px;
}
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
2026-07-25 22:29:15 -04:00
.filter-grid {
display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
}
.button {
border: 1px solid #277fa0; border-radius: 8px; padding: 8px 12px;
background: #12384a; color: var(--text);
}
.button:hover, .button:focus-visible {
border-color: var(--accent); background: #17485f; outline: none;
}
.results-context {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
min-height: 30px; margin-top: 12px; color: var(--muted); font-size: 11px;
}
.results-context strong {
overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap;
}
#clear-result-filter {
flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px;
background: var(--panel-2); color: var(--muted); font-size: 11px;
}
#clear-result-filter:hover, #clear-result-filter:focus-visible {
border-color: var(--accent); color: var(--text); outline: none;
}
#clear-result-filter[hidden] { display: none; }
.results {
display: grid; align-content: start; gap: 7px; min-height: 0;
margin-top: 8px; overflow: auto; padding-right: 2px;
}
.section-label {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
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;
}
.neighborhood {
display: flex; flex: 1; flex-direction: column; min-height: 0;
}
.neighborhood[hidden] { display: none; }
.neighborhood-title { margin: 0; font-size: 15px; }
#neighborhood-sections { min-height: 0; overflow: auto; padding-right: 2px; }
.node-list { display: grid; gap: 6px; }
.node-list-item {
width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr);
gap: 9px; align-items: center; text-align: left; border: 1px solid var(--line);
border-radius: 9px; padding: 8px; background: rgba(17, 31, 47, .72); color: var(--text);
}
.node-list-item:hover, .node-list-item:focus-visible {
border-color: var(--item-color, var(--accent)); outline: none;
background: rgba(24, 43, 62, .9);
}
.node-swatch {
width: 8px; height: 28px; border-radius: 999px;
background: var(--item-color, var(--accent));
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-wrap: anywhere; }
.node-list-copy strong { line-height: 1.25; }
.node-list-copy span { color: var(--muted); font-size: 11px; }
.node-legend {
display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-bottom: 4px;
}
.node-legend span {
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 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);
}
.result:hover, .result:focus-visible { border-color: var(--accent); outline: none; }
2026-07-25 22:29:15 -04:00
.result strong, .result span { display: block; overflow-wrap: anywhere; }
.result > span { color: var(--muted); font-size: 11px; }
.result-badges {
display: flex !important; flex-wrap: wrap; gap: 4px; margin: 5px 0;
}
.result-badges small {
border: 1px solid #31526d; border-radius: 999px; padding: 1px 6px;
background: #0a1724; color: #b7c9da; font-size: 9px; font-weight: 750;
letter-spacing: .04em; text-transform: uppercase;
}
.canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
svg { width: 100%; height: 100%; background:
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; }
.viewport-controls {
position: absolute; z-index: 2; top: 12px; right: 12px;
display: grid; grid-template-columns: repeat(3, 36px) auto auto;
align-items: center; gap: 6px; padding: 6px;
border: 1px solid var(--line); border-radius: 10px;
background: rgba(7, 16, 26, .9); box-shadow: 0 5px 18px rgba(0, 0, 0, .28);
}
.viewport-control {
width: 36px; height: 34px; border: 1px solid #31526d; border-radius: 7px;
background: #102b3d; color: var(--text); font-weight: 700;
}
.viewport-control:hover, .viewport-control:focus-visible {
border-color: var(--accent); outline: 2px solid transparent;
}
.zoom-level {
min-width: 48px; padding: 0 5px; color: var(--muted);
font-variant-numeric: tabular-nums; text-align: right;
}
.restore-hidden {
min-width: 92px; height: 34px; border: 1px solid #31526d; border-radius: 7px;
padding: 0 10px; background: #102b3d; color: var(--text); font-size: 11px;
}
.restore-hidden:hover, .restore-hidden:focus-visible {
border-color: var(--accent); outline: 2px solid transparent;
}
.restore-hidden[hidden] { display: none; }
.viewport-hint {
position: absolute; z-index: 1; left: 12px; bottom: 12px;
padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px;
background: rgba(7, 16, 26, .78); color: var(--muted); font-size: 11px;
pointer-events: none;
}
.relationship-key {
position: absolute; z-index: 2; top: 12px; left: 12px;
width: min(310px, calc(100% - 100px)); max-height: calc(100% - 64px);
overflow: hidden; border: 1px solid var(--line); border-radius: 10px;
background: rgba(7, 16, 26, .92); box-shadow: 0 5px 18px rgba(0, 0, 0, .28);
}
.relationship-key summary {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
padding: 8px 10px; color: var(--text); cursor: pointer; font-size: 11px;
font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.relationship-key summary:focus-visible {
outline: 2px solid var(--accent); outline-offset: -2px;
}
.relationship-key summary::marker { color: var(--accent); }
.relationship-key-count {
color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 0;
text-transform: none;
}
.relationship-key:not([open]) { width: auto; }
.relationship-key:not([open]) .relationship-key-count { display: none; }
.relationship-key-list {
display: grid; gap: 5px; max-height: min(360px, calc(100vh - 190px));
overflow: auto; margin: 0; padding: 2px 10px 10px; list-style: none;
}
.relationship-key-item {
display: grid; grid-template-columns: 58px minmax(0, 1fr) auto;
gap: 8px; align-items: center; color: var(--text); font-size: 11px;
}
.relationship-symbol { display: block; width: 58px; height: 14px; overflow: visible; }
.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: .74; stroke-width: 1.7;
2026-07-25 22:29:15 -04:00
vector-effect: non-scaling-stroke; transition: opacity .16s, stroke-width .16s, filter .16s;
}
.edge-label {
font-size: 9px; font-weight: 700; letter-spacing: .015em; pointer-events: none;
paint-order: stroke; stroke: #07101a; stroke-width: 4px; stroke-linejoin: round;
2026-07-25 22:29:15 -04:00
transition: opacity .16s;
}
.relationship-edge.trace-connected {
stroke-opacity: 1; stroke-width: 3;
filter: drop-shadow(0 0 7px currentcolor);
}
.relationship-edge.trace-muted, .edge-label.trace-muted { opacity: .13; }
.edge-label.trace-connected { opacity: 1; font-size: 10px; }
.node { cursor: pointer; transition: opacity .16s, filter .16s; }
.node.trace-connected:not(.selected) {
filter: drop-shadow(0 0 8px rgba(165, 243, 252, .28));
}
2026-07-25 22:29:15 -04:00
.node.trace-muted { opacity: .24; }
.node:focus { outline: none; }
.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 .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 .node-surface { stroke: #fff; stroke-width: 2.35; }
.node .node-accent { pointer-events: none; }
.node .selection-ring {
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.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;
}
.empty {
position: absolute; inset: 0; display: grid; place-items: center;
color: var(--muted); pointer-events: none;
}
.empty[hidden] { display: none; }
.connection-state {
position: absolute; z-index: 6; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
width: min(440px, calc(100% - 40px)); border: 1px solid #9a4b59; border-radius: 12px;
padding: 18px; background: rgba(32, 13, 20, .96); color: #ffd4dc;
box-shadow: 0 18px 60px rgba(0, 0, 0, .45); text-align: center;
}
.connection-state[hidden] { display: none; }
.connection-state strong { display: block; margin-bottom: 5px; }
.detail-head { display: flex; align-items: start; gap: 10px; }
.detail-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.badge {
display: inline-block; margin: 4px 5px 0 0; border: 1px solid var(--line);
border-radius: 999px; padding: 3px 7px; color: var(--muted); font-size: 11px;
}
.badge-button { background: #0d2031; }
.badge-button:hover, .badge-button:focus-visible {
border-color: var(--accent); color: var(--text); outline: none;
}
.meta { display: grid; gap: 8px; margin: 14px 0; }
.meta div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.summary { color: #c9d9e8; }
pre {
white-space: pre-wrap; overflow-wrap: anywhere; max-height: 44vh; overflow: auto;
padding: 12px; border: 1px solid var(--line); border-radius: 9px;
background: #07111c; color: #d6e6f5;
}
dialog {
width: fit-content; height: fit-content;
min-width: min(360px, calc(100vw - 20px)); min-height: 0;
max-width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
padding: 0; overflow: hidden; border: 1px solid #36536e; border-radius: 14px;
background: var(--panel); color: var(--text);
box-shadow: 0 24px 80px rgba(0, 0, 0, .58); resize: both;
}
dialog::backdrop { background: rgba(2, 8, 14, .48); }
.dialog-shell {
display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: fit-content;
min-width: min(360px, calc(100vw - 20px)); max-width: min(760px, calc(100vw - 32px));
height: 100%; max-height: calc(100vh - 32px); overflow: hidden;
}
.dialog-head {
display: flex; align-items: center; justify-content: space-between; gap: 12px;
padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2);
cursor: move; touch-action: none; user-select: none;
}
.dialog-head strong { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.dialog-close {
width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
background: #102b3d; color: var(--text); font-size: 21px; line-height: 1;
}
.dialog-close:hover, .dialog-close:focus-visible {
border-color: var(--accent); outline: 2px solid transparent;
}
.dialog-body { min-height: 0; overflow: auto; padding: 18px; }
.dialog-body pre { max-height: none; }
dialog.compact-dialog {
position: fixed; inset: auto; margin: 0; width: min(400px, calc(100vw - 24px));
height: auto; min-width: 0; min-height: 0; max-height: min(560px, calc(100vh - 24px));
resize: none; border-color: rgba(91, 137, 169, .78); background: rgba(7, 18, 29, .82);
box-shadow: 0 14px 42px rgba(0, 0, 0, .42);
}
.compact-dialog .dialog-shell { grid-template-rows: auto auto; }
.compact-dialog .dialog-body { padding: 14px 16px; }
.compact-dialog .dialog-body pre { display: none; }
.compact-dialog .detail-head h2 { font-size: 16px; }
.compact-dialog .meta { margin: 12px 0 0; gap: 6px; }
.compact-dialog .meta div { grid-template-columns: 66px 1fr; }
.dialog-actions {
display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 16px;
border-top: 1px solid var(--line); background: var(--panel-2);
}
.compact-dialog .dialog-actions { padding: 9px 12px; background: rgba(12, 35, 51, .72); }
.source-dialog {
width: min(920px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px));
}
.source-dialog .dialog-shell {
width: 100%; max-width: none; min-width: 0; height: 100%;
}
.source-code {
display: block; margin: 0; min-width: max-content; font: 12px/1.55 ui-monospace, monospace;
counter-reset: source-line;
}
.source-line { display: block; min-height: 1.55em; padding: 0 12px 0 58px; position: relative; }
.source-line::before {
position: absolute; left: 0; width: 46px; color: #63809a; text-align: right;
content: attr(data-line);
}
.source-line.target { background: rgba(81, 215, 255, .16); color: #fff; }
.error { color: #ff9aac; }
@media (max-width: 980px) {
:root { --left-width: 240px; --right-width: 260px; }
.layout {
grid-template-columns: var(--left-width) 7px minmax(280px, 1fr);
}
.right, #right-resizer { display: none; }
.stats { display: none; }
}
@media (max-width: 680px) {
header h1 { font-size: 14px; }
.status { display: none; }
.layout {
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(280px, 42vh) minmax(280px, 1fr);
}
.left { overflow: auto; padding: 12px; }
.results { overflow: visible; }
#left-resizer { display: none; }
.viewport-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
scroll-behavior: auto !important;
transition-duration: .01ms !important;
transition-delay: 0s !important;
}
}