code-ranker-viewer 1.0.0-alpha.5

Code Ranker HTML viewer: self-contained interactive report with embedded snapshots.
Documentation
/* map.css: SVG frame, zoom/drill controls, legend — part of the split stylesheet; concatenated in lib.rs in source order to preserve the cascade. */
/* ── SVG frame ──────────────────────────────────────────────────────────────── */
.frame-wrap { position: relative; margin-bottom: 10px; }
.svg-frame { background: #fff; border: 1px solid #ddd; border-radius: 6px;
             overflow: hidden; user-select: none;
             height: calc(100vh - 240px); min-height: 200px; }
.svg-frame svg { width: 100%; height: 100%; display: block; cursor: grab; }
/* Drag-to-pan, GitHub-style: open hand at rest, closed hand while dragging
   (the closed hand wins over a node's `pointer` cursor for the whole drag). */
.svg-frame.panning svg { cursor: grabbing; }
.svg-frame.panning svg g.node { cursor: grabbing; }

.zoom-controls { position: absolute; bottom: 12px; right: 12px;
                 display: flex; flex-direction: column; gap: 5px;
                 opacity: 0; transition: opacity .15s; pointer-events: none; }
.frame-wrap.show-zoom .zoom-controls { opacity: 1; pointer-events: auto; }
.zoom-btn { width: 52px; height: 52px; border: 1px solid #bbb; border-radius: 8px;
            background: rgba(255,255,255,.95); color: #333; font-size: 28px; line-height: 1;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            box-shadow: 0 1px 4px rgba(0,0,0,.12); user-select: none; }
.zoom-btn:hover { background: #f0f0f0; border-color: #999; }
.zoom-btn[data-zoom="fit"]        { font-size: 13px; font-weight: 600; }
.zoom-btn[data-zoom="fullscreen"] { font-size: 24px; }

/* Fullscreen mode */
.frame-wrap:fullscreen { background: #fff; display: flex; align-items: stretch; position: relative; }
.frame-wrap:fullscreen .svg-frame { flex: 1; height: 100%; border-radius: 0; border: none; min-height: unset; }
.frame-wrap:fullscreen .zoom-btn[data-zoom="fullscreen"]::before { content: ''; }
.frame-wrap:fullscreen .zoom-btn[data-zoom="fullscreen"] { font-size: 14px; color: #666; }

/* Fullscreen overlay bar */
.fs-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 200;
          transform: translateY(-100%); transition: transform .18s ease; }
.fs-bar.visible { transform: translateY(0); }
.fs-bar header { margin: 0; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
/* Overlays (node modal / prompt popup) hosting the always-on header reserve top
   space (the exact amount is set inline from the bar's measured height). */
.fly-header-host { box-sizing: border-box; }
/* The `t` toggle hint only applies in a diff (two snapshots) — hide it in review. */
body.mode-review .kbd-hint-toggle { display: none; }
.fly-header-host > .fs-bar { z-index: 10001; }   /* above the overlay's own content */
.fs-bar .control-panel { margin: 0; border-radius: 0; border-left: none; border-right: none; border-top: none; max-width: none; }

.loading-indicator { display: none; position: absolute; inset: 0; background: rgba(255,255,255,.9);
                     align-items: center; justify-content: center; font-size: 15px; color: #555;
                     border-radius: 6px; pointer-events: none; }
.loading-indicator.on { display: flex; }

/* ── Legend / hint ──────────────────────────────────────────────────────────── */