diff --git a/dist/style.css b/dist/style.css index feff2ad..55de482 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(./fonts/IBMPlexSans-400-latin.woff2) format("woff2")}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(./fonts/IBMPlexSans-600-latin.woff2) format("woff2")}@font-face{font-family:Geist Mono;font-style:normal;font-weight:400;font-display:swap;src:url(./fonts/GeistMono-400-latin.woff2) format("woff2")}@font-face{font-family:Geist Mono;font-style:normal;font-weight:600;font-display:swap;src:url(./fonts/GeistMono-600-latin.woff2) format("woff2")}:root{--bg: #121212;--card: #1A1A1A;--card-hi: #212121;--line: #2B2B2B;--line-hi: #3D3D3D;--fg: #FFFFFF;--muted: #BCBCBC;--carrier: #E0E0E0;--live: #D6FF00;--down: #FF4C79;--fold-line: #6E6E6E;--action: #FFFFFF;--action-ink: #121212;--action-hover: #D4D4D4;--radius: 2px;--control-h: 34px;--page: 84rem;--sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;--mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--ease: cubic-bezier(.25, 1, .5, 1);--dur-tint: .12s;--dur-move: .18s;--z-sticky: 10;--z-toast: 40;--z-skip: 60;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.6 var(--sans)}h1,h2{text-wrap:balance}[hidden]{display:none!important}a{color:var(--carrier);text-decoration:none}a:hover{color:var(--fg);text-decoration:underline}main p a,.lede a{text-decoration:underline;text-underline-offset:3px}.muted{color:var(--muted);font-size:.85rem}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip{position:fixed;top:.75rem;left:.75rem;z-index:var(--z-skip);background:var(--bg);border-color:var(--fg);transform:translateY(-200%);transition:transform var(--dur-move) var(--ease)}.skip:hover{background:var(--card-hi)}.skip:focus-visible{transform:none}main:focus-visible{outline:2px solid var(--live);outline-offset:4px}.shell{display:flex;flex-direction:column;min-height:100vh}.topbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;padding:1rem 1.5rem;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:.7rem;color:inherit;--wm-h: 20px}.brand:hover{text-decoration:none}.wordmark{display:inline-flex;align-items:center;gap:.7em;font-size:var(--wm-h)}.wordmark-glyphs{display:block;height:1em;width:auto;color:var(--fg);shape-rendering:geometricPrecision}.wordmark-rule{width:1px;height:1.05em;background:var(--line)}.wordmark-descriptor{font:500 .62em/1.4 var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em;white-space:nowrap}.version{font-family:var(--mono);font-size:.8rem}.auth{display:flex;gap:.5rem;flex-wrap:wrap}.body{flex:1;width:100%;max-width:var(--page);margin:0 auto;display:grid;grid-template-columns:12rem minmax(0,1fr);gap:2rem;align-content:start;padding:1.5rem}main{min-width:0;display:grid;gap:1.75rem;align-content:start}.sidebar{align-self:start;position:sticky;top:1.5rem;z-index:var(--z-sticky)}.sidebar ul{list-style:none;margin:0;padding:0;display:grid;gap:.15rem}.nav-link{display:block;padding:.4rem .6rem;border-radius:var(--radius);border-left:2px solid transparent;color:var(--muted);font-size:.9rem}.nav-link:hover{background:var(--card);color:var(--fg);text-decoration:none}.nav-link.active{background:var(--card-hi);color:var(--fg);border-left-color:var(--line-hi)}@media(max-width:52rem){.body{grid-template-columns:minmax(0,1fr);gap:1rem}.sidebar{position:static}.sidebar ul{grid-auto-flow:column;grid-auto-columns:max-content;overflow-x:auto}.nav-link{border-left:none;border-bottom:2px solid transparent}.nav-link.active{border-bottom-color:var(--line-hi)}}footer{border-top:1px solid var(--line);margin-top:auto}.foot{max-width:var(--page);margin:0 auto;padding:1.25rem 1.5rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}.foot nav{display:flex;gap:1.25rem;flex-wrap:wrap;font-size:.85rem}.foot .legal{display:inline-flex;align-items:center;gap:.6rem;margin:0;color:var(--muted);font-size:.8rem}.foot .legal{--wm-h: 15px}.foot .wordmark-glyphs{color:var(--muted)}.page-head{display:grid;gap:.5rem;padding-bottom:1rem;border-bottom:1px solid var(--line)}.page-head-row{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap}.page-head h1{font-size:1.35rem;font-weight:600;margin:0;letter-spacing:-.01em}.page-actions{display:flex;gap:.5rem;align-items:center}.lede{margin:0;max-width:62ch;text-wrap:pretty}.back{font-size:.85rem;font-family:var(--mono)}h2{font-size:1.05rem;font-weight:600;margin:0}h3{font:600 .7rem/1.4 var(--mono);margin:0;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.group{display:grid;gap:.6rem}.group-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}.group-action{font:400 .78rem/1.4 var(--mono);color:var(--muted);white-space:nowrap}.group-action:hover{color:var(--fg)}.banner{background:var(--card);border:1px solid var(--down);color:var(--down);padding:.5rem .75rem;border-radius:var(--radius);margin:0;animation:settle var(--dur-move) var(--ease) both}@keyframes settle{0%{opacity:0;transform:translateY(-6px)}}.banner.warn{border-color:var(--line-hi);color:var(--carrier)}.empty{padding:1.25rem 0;display:grid;gap:.3rem;justify-items:start;max-width:62ch}.empty-cell .empty{padding:.5rem 0}.empty-title{margin:0;font-weight:600}.empty p{margin:0}.empty-cell{text-align:left;white-space:normal}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(12.5rem,1fr));grid-auto-rows:1fr;gap:.5rem}@media(max-width:30rem){.cards{grid-template-columns:minmax(0,1fr)}}.cards:empty{display:none}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.6rem .8rem;min-width:0;display:flex;flex-direction:column;gap:.2rem}.card .label{color:var(--muted);font:400 .65rem/1.4 var(--mono);text-transform:uppercase;letter-spacing:.08em}.card b{font:600 .82rem/1.5 var(--mono);overflow-wrap:anywhere;display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.card b.wrap{display:block}.chips{display:flex;flex-wrap:wrap;gap:.25rem}.chip{display:inline-block;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:0 .55em;font:400 .72rem/1.6 var(--mono)}.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--card)}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:.5rem .75rem;border-bottom:1px solid var(--line);white-space:nowrap}tbody tr:last-child td{border-bottom:none}th{font:600 .7rem/1.4 var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em}td{font:400 .8rem/1.5 var(--mono)}td.wrap{white-space:normal;max-width:32rem}.th-sort{background:none;border:none;padding:0;height:auto;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer;display:inline-flex;gap:.3rem;align-items:center;position:relative}.th-sort:after{content:"";position:absolute;inset:-.5rem -.75rem}.th-sort:hover{color:var(--fg);background:none}th:has(.th-sort:hover){background:var(--card-hi)}.sort-mark{width:.6em;color:var(--fg)}.cell-link{color:var(--fg)}tbody tr:hover td{background:var(--card-hi)}.ok{color:var(--live)}.bad{color:var(--down)}.warn{color:var(--carrier);text-decoration:underline dotted var(--line-hi);text-underline-offset:4px;text-decoration-thickness:1px}.row{display:flex;align-items:center;gap:.75rem}.filters{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.filter-text{flex:1 1 18rem}.filter-select{width:auto;min-width:9rem}.count{font-family:var(--mono);white-space:nowrap}.field{display:grid;gap:.3rem}.field-label{font:600 .7rem/1.4 var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.itemdesc{font-family:var(--mono);font-size:.8rem;margin:0}input,select,textarea,button{font:inherit;color:inherit;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.4rem .7rem}input,select,.seg button{height:var(--control-h)}input{width:20rem;max-width:100%;font-family:var(--mono);font-size:.8rem}select,textarea{width:100%;font-family:var(--mono);font-size:.85rem}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--line-hi)}button{cursor:pointer;height:var(--control-h);background:transparent;color:var(--fg);border-color:var(--line-hi);font-weight:500;padding:0 1rem;transition:background-color .12s ease-out,border-color .12s ease-out,color .12s ease-out}button:hover:not(:disabled){background:var(--card-hi);border-color:var(--fg)}button:active:not(:disabled){background:var(--card);border-color:var(--line-hi)}button.primary{background:var(--action);color:var(--action-ink);border-color:transparent;font-weight:600}button.primary:hover:not(:disabled){background:var(--action-hover);border-color:transparent}button.primary:active:not(:disabled){background:var(--muted)}button:disabled{opacity:.45;cursor:default}.copy{height:1.55rem;padding:0 .5rem;font:400 .7rem/1 var(--mono);color:var(--muted);border-color:var(--line);position:relative}.copy:after{content:"";position:absolute;inset:-12px -8px}.copy:hover:not(:disabled){color:var(--fg);border-color:var(--line-hi)}.copy:active:not(:disabled){background:var(--card-hi)}.linkish{background:none;border:none;padding:0;height:auto;color:var(--carrier);font-size:.85rem;text-decoration:underline}.linkish:hover{background:none;color:var(--fg)}.seg{display:flex;gap:0}.seg button{background:transparent;color:var(--muted);border:1px solid var(--line);border-radius:0;font-weight:500;display:inline-flex;align-items:center;gap:.4rem}.seg button:first-child{border-radius:var(--radius) 0 0 var(--radius)}.seg button:last-child{border-radius:0 var(--radius) var(--radius) 0}.seg button+button{border-left:none}.seg button.active{background:var(--card-hi);color:var(--fg);border-color:var(--line-hi)}.seg button.active+button{border-left:1px solid var(--line-hi)}.seg button:hover:not(:disabled):not(.active){background:var(--card);color:var(--fg)}.seg-count{font:400 .7rem/1 var(--mono);color:var(--muted)}@media(prefers-reduced-motion:reduce){button,input,select,textarea,.skip{transition:none}.toast,.banner,.skeleton,.freshness .dot{animation:none}.skeleton{opacity:.6}}::placeholder{color:var(--muted);opacity:1}:focus-visible{outline:2px solid var(--live);outline-offset:1px}.pane-block{display:grid;gap:.35rem}.pane-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.pane-actions{display:flex;gap:.4rem}.pane{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.75rem;margin:0;overflow:auto;max-height:18rem;min-height:3rem;font:.8rem/1.55 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}.pane.tall{max-height:26rem}.freshness{display:inline-flex;align-items:center;gap:.45rem;margin:0;font:400 .72rem/1 var(--mono);color:var(--muted);white-space:nowrap;padding-right:.35rem}.freshness .dot{width:7px;height:7px;border-radius:var(--radius);background:var(--line-hi);flex:none}.freshness[data-state=live] .dot{background:var(--live)}.freshness[data-state=fetching] .dot{background:var(--live);animation:pulse 1.1s var(--ease) infinite}.freshness[data-state=failed] .dot{background:var(--down)}.freshness[data-state=failed]{color:var(--down)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.25}}.skeleton{display:block;background:var(--card-hi);border-radius:var(--radius);animation:breathe 1.4s var(--ease) infinite}.skeleton-card{justify-content:center}.skeleton-label{width:45%;height:.55rem}.skeleton-value{width:72%;height:.8rem}.skeleton-cell{width:70%;height:.8rem}@keyframes breathe{0%,to{opacity:.45}50%{opacity:.9}}.topology{margin:0;display:grid;gap:.5rem}.topology-scroll{overflow-x:auto;max-width:980px}.topology-svg{display:block;width:100%;height:auto;min-width:560px}.topology-caption{font-family:var(--mono);font-size:.72rem}.fold-dash{stroke:var(--fold-line);stroke-width:1.5;stroke-dasharray:5 5;fill:none}.fold-active{stroke:var(--live);stroke-width:2;fill:none}.fold-broken{stroke:var(--down);stroke-width:1.5;stroke-dasharray:3 4;fill:none}.fold-arrow{fill:var(--live)}.fold-notch{stroke:var(--carrier);stroke-width:1.5;fill:none}.fold-node{fill:var(--card);stroke:var(--line)}.fold-gate{fill:var(--card);stroke:var(--live);stroke-width:1.5}.fold-node-mark{fill:var(--fg)}.fold-node-label{font-family:var(--mono);font-size:14px;fill:var(--fg)}.fold-anno{font-family:var(--mono);font-size:11px;fill:var(--muted)}.fold-anno.is-down{fill:var(--down)}.fold-link{cursor:pointer}.fold-link:hover .fold-node{fill:var(--card-hi);stroke:var(--line-hi)}.fold-link:hover .fold-node-label{fill:var(--fg)}.fold-link:focus{outline:none}.fold-link:focus-visible .fold-node{stroke:var(--live);stroke-width:2}.toasts{position:fixed;right:1rem;bottom:1rem;z-index:var(--z-toast);display:grid;gap:.4rem;justify-items:end;pointer-events:none}.toast{background:var(--card);border:1px solid var(--line-hi);border-radius:var(--radius);padding:.45rem .75rem;font:400 .8rem/1.4 var(--mono);color:var(--fg);max-width:24rem;animation:rise var(--dur-move) var(--ease) both}@keyframes rise{0%{opacity:0;transform:translateY(8px)}}.toast.bad{border-color:var(--down);color:var(--down)}.palette{width:min(34rem,calc(100vw - 2rem));max-width:none;margin:12vh auto auto;padding:0;border:1px solid var(--line-hi);border-radius:var(--radius);background:var(--card);color:var(--fg);overflow:hidden}.palette::backdrop{background:#0000008c}.pal-input{border-bottom:1px solid var(--line)}.pal-input input{width:100%;height:2.75rem;padding:0 .85rem;border:0;background:none;color:var(--fg);font:inherit;outline:0}.pal-list{max-height:44vh;overflow-y:auto;margin:0;padding:.35rem;list-style:none}.pal-group{margin:.5rem .5rem .2rem;font:600 .7rem/1.4 var(--mono);text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.pal-item{display:flex;align-items:center;gap:.6rem;padding:.4rem .5rem;border-radius:var(--radius);cursor:pointer}.pal-item[aria-selected=true]{background:var(--card-hi)}.pal-label{font-family:var(--mono);font-size:.8rem}.pal-hint{margin-left:auto;color:var(--muted);font-size:.75rem}.pal-empty{margin:0;padding:1.25rem .85rem;color:var(--muted);font-size:.85rem}.pal-foot{margin:0;padding:.5rem .85rem;border-top:1px solid var(--line);color:var(--muted);font-size:.75rem} +@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(./fonts/IBMPlexSans-400-latin.woff2) format("woff2")}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(./fonts/IBMPlexSans-600-latin.woff2) format("woff2")}@font-face{font-family:Geist Mono;font-style:normal;font-weight:400;font-display:swap;src:url(./fonts/GeistMono-400-latin.woff2) format("woff2")}@font-face{font-family:Geist Mono;font-style:normal;font-weight:600;font-display:swap;src:url(./fonts/GeistMono-600-latin.woff2) format("woff2")}:root{--bg: #121212;--card: #1A1A1A;--card-hi: #212121;--line: #2B2B2B;--line-hi: #3D3D3D;--fg: #FFFFFF;--muted: #BCBCBC;--carrier: #E0E0E0;--live: #D6FF00;--down: #FF4C79;--fold-line: #707070;--action: #FFFFFF;--action-ink: #121212;--action-hover: #D4D4D4;--radius: 2px;--control-h: 34px;--page: 84rem;--sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;--mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--ease: cubic-bezier(.25, 1, .5, 1);--dur-tint: .12s;--dur-move: .18s;--z-sticky: 10;--z-toast: 40;--z-skip: 60;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.6 var(--sans)}h1,h2{text-wrap:balance}[hidden]{display:none!important}a{color:var(--carrier);text-decoration:none}a:hover{color:var(--fg);text-decoration:underline}main p a,.lede a{text-decoration:underline;text-underline-offset:3px}.muted{color:var(--muted);font-size:.85rem}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip{position:fixed;top:.75rem;left:.75rem;z-index:var(--z-skip);background:var(--bg);border-color:var(--fg);transform:translateY(-200%);transition:transform var(--dur-move) var(--ease)}.skip:hover{background:var(--card-hi)}.skip:focus-visible{transform:none}main:focus-visible{outline:2px solid var(--live);outline-offset:4px}.shell{display:flex;flex-direction:column;min-height:100vh}.topbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;padding:1rem 1.5rem;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:.7rem;color:inherit;--wm-h: 20px}.brand:hover{text-decoration:none}.wordmark{display:inline-flex;align-items:center;gap:.7em;font-size:var(--wm-h)}.wordmark-glyphs{display:block;height:1em;width:auto;color:var(--fg);shape-rendering:geometricPrecision}.wordmark-rule{width:1px;height:1.05em;background:var(--line)}.wordmark-descriptor{font:500 .62em/1.4 var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em;white-space:nowrap}.version{font-family:var(--mono);font-size:.8rem}.auth{display:flex;gap:.5rem;flex-wrap:wrap}.body{flex:1;width:100%;max-width:var(--page);margin:0 auto;display:grid;grid-template-columns:12rem minmax(0,1fr);gap:2rem;align-content:start;padding:1.5rem}main{min-width:0;display:grid;gap:1.75rem;align-content:start}.sidebar{align-self:start;position:sticky;top:1.5rem;z-index:var(--z-sticky)}.sidebar ul{list-style:none;margin:0;padding:0;display:grid;gap:.15rem}.nav-link{display:block;padding:.4rem .6rem;border-radius:var(--radius);border-left:2px solid transparent;color:var(--muted);font-size:.9rem}.nav-link:hover{background:var(--card);color:var(--fg);text-decoration:none}.nav-link.active{background:var(--card-hi);color:var(--fg);border-left-color:var(--line-hi)}@media(max-width:52rem){.body{grid-template-columns:minmax(0,1fr);gap:1rem}.sidebar{position:static}.sidebar ul{grid-auto-flow:column;grid-auto-columns:max-content;overflow-x:auto}.nav-link{border-left:none;border-bottom:2px solid transparent}.nav-link.active{border-bottom-color:var(--line-hi)}}footer{border-top:1px solid var(--line);margin-top:auto}.foot{max-width:var(--page);margin:0 auto;padding:1.25rem 1.5rem;display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}.foot nav{display:flex;gap:1.25rem;flex-wrap:wrap;font-size:.85rem}.foot .legal{display:inline-flex;align-items:center;gap:.6rem;margin:0;color:var(--muted);font-size:.8rem}.foot .legal{--wm-h: 15px}.foot .wordmark-glyphs{color:var(--muted)}.page-head{display:grid;gap:.5rem;padding-bottom:1rem;border-bottom:1px solid var(--line)}.page-head-row{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap}.page-head h1{font-size:1.35rem;font-weight:600;margin:0;letter-spacing:-.01em}.page-actions{display:flex;gap:.5rem;align-items:center}.lede{margin:0;max-width:62ch;text-wrap:pretty}.back{font-size:.85rem;font-family:var(--mono)}h2{font-size:1.05rem;font-weight:600;margin:0}h3{font:600 .7rem/1.4 var(--mono);margin:0;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.group{display:grid;gap:.6rem}.group-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}.group-action{font:400 .78rem/1.4 var(--mono);color:var(--muted);white-space:nowrap}.group-action:hover{color:var(--fg)}.banner{background:var(--card);border:1px solid var(--down);color:var(--down);padding:.5rem .75rem;border-radius:var(--radius);margin:0;animation:settle var(--dur-move) var(--ease) both}@keyframes settle{0%{opacity:0;transform:translateY(-6px)}}.banner.warn{border-color:var(--line-hi);color:var(--carrier)}.empty{padding:1.25rem 0;display:grid;gap:.3rem;justify-items:start;max-width:62ch}.empty-cell .empty{padding:.5rem 0}.empty-title{margin:0;font-weight:600}.empty p{margin:0}.empty-cell{text-align:left;white-space:normal}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(12.5rem,1fr));grid-auto-rows:1fr;gap:.5rem}@media(max-width:30rem){.cards{grid-template-columns:minmax(0,1fr)}}.cards:empty{display:none}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.6rem .8rem;min-width:0;display:flex;flex-direction:column;gap:.2rem}.card .label{color:var(--muted);font:400 .65rem/1.4 var(--mono);text-transform:uppercase;letter-spacing:.08em}.card b{font:600 .82rem/1.5 var(--mono);overflow-wrap:anywhere;display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.card b.wrap{display:block}.chips{display:flex;flex-wrap:wrap;gap:.25rem}.chip{display:inline-block;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:0 .55em;font:400 .72rem/1.6 var(--mono)}.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--card)}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:.5rem .75rem;border-bottom:1px solid var(--line);white-space:nowrap}tbody tr:last-child td{border-bottom:none}th{font:600 .7rem/1.4 var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em}td{font:400 .8rem/1.5 var(--mono)}td.wrap{white-space:normal;max-width:32rem}.th-sort{background:none;border:none;padding:0;height:auto;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer;display:inline-flex;gap:.3rem;align-items:center;position:relative}.th-sort:after{content:"";position:absolute;inset:-.5rem -.75rem}.th-sort:hover{color:var(--fg);background:none}th:has(.th-sort:hover){background:var(--card-hi)}.sort-mark{width:.6em;color:var(--fg)}.cell-link{color:var(--fg)}tbody tr:hover td{background:var(--card-hi)}.ok{color:var(--live)}.bad{color:var(--down)}.warn{color:var(--carrier);text-decoration:underline dotted var(--line-hi);text-underline-offset:4px;text-decoration-thickness:1px}.row{display:flex;align-items:center;gap:.75rem}.filters{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.filter-text{flex:1 1 18rem}.filter-select{width:auto;min-width:9rem}.count{font-family:var(--mono);white-space:nowrap}.field{display:grid;gap:.3rem}.field-label{font:600 .7rem/1.4 var(--mono);color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.itemdesc{font-family:var(--mono);font-size:.8rem;margin:0}input,select,textarea,button{font:inherit;color:inherit;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.4rem .7rem}input,select,.seg button{height:var(--control-h)}input{width:20rem;max-width:100%;font-family:var(--mono);font-size:.8rem}select,textarea{width:100%;font-family:var(--mono);font-size:.85rem}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--line-hi)}button{cursor:pointer;height:var(--control-h);background:transparent;color:var(--fg);border-color:var(--line-hi);font-weight:500;padding:0 1rem;transition:background-color .12s ease-out,border-color .12s ease-out,color .12s ease-out}button:hover:not(:disabled){background:var(--card-hi);border-color:var(--fg)}button:active:not(:disabled){background:var(--card);border-color:var(--line-hi)}button.primary{background:var(--action);color:var(--action-ink);border-color:transparent;font-weight:600}button.primary:hover:not(:disabled){background:var(--action-hover);border-color:transparent}button.primary:active:not(:disabled){background:var(--muted)}button:disabled{opacity:.45;cursor:default}.copy{height:1.55rem;padding:0 .5rem;font:400 .7rem/1 var(--mono);color:var(--muted);border-color:var(--line);position:relative}.copy:after{content:"";position:absolute;inset:-12px -8px}.copy:hover:not(:disabled){color:var(--fg);border-color:var(--line-hi)}.copy:active:not(:disabled){background:var(--card-hi)}.linkish{background:none;border:none;padding:0;height:auto;color:var(--carrier);font-size:.85rem;text-decoration:underline}.linkish:hover{background:none;color:var(--fg)}.seg{display:flex;gap:0}.seg button{background:transparent;color:var(--muted);border:1px solid var(--line);border-radius:0;font-weight:500;display:inline-flex;align-items:center;gap:.4rem}.seg button:first-child{border-radius:var(--radius) 0 0 var(--radius)}.seg button:last-child{border-radius:0 var(--radius) var(--radius) 0}.seg button+button{border-left:none}.seg button.active{background:var(--card-hi);color:var(--fg);border-color:var(--line-hi)}.seg button.active+button{border-left:1px solid var(--line-hi)}.seg button:hover:not(:disabled):not(.active){background:var(--card);color:var(--fg)}.seg-count{font:400 .7rem/1 var(--mono);color:var(--muted)}@media(prefers-reduced-motion:reduce){button,input,select,textarea,.skip{transition:none}.toast,.banner,.skeleton,.freshness .dot{animation:none}.skeleton{opacity:.6}}::placeholder{color:var(--muted);opacity:1}:focus-visible{outline:2px solid var(--live);outline-offset:1px}.pane-block{display:grid;gap:.35rem}.pane-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.pane-actions{display:flex;gap:.4rem}.pane{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.75rem;margin:0;overflow:auto;max-height:18rem;min-height:3rem;font:.8rem/1.55 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}.pane.tall{max-height:26rem}.freshness{display:inline-flex;align-items:center;gap:.45rem;margin:0;font:400 .72rem/1 var(--mono);color:var(--muted);white-space:nowrap;padding-right:.35rem}.freshness .dot{width:7px;height:7px;border-radius:var(--radius);background:var(--line-hi);flex:none}.freshness[data-state=live] .dot{background:var(--live)}.freshness[data-state=fetching] .dot{background:var(--live);animation:pulse 1.1s var(--ease) infinite}.freshness[data-state=failed] .dot{background:var(--down)}.freshness[data-state=failed]{color:var(--down)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.25}}.skeleton{display:block;background:var(--card-hi);border-radius:var(--radius);animation:breathe 1.4s var(--ease) infinite}.skeleton-card{justify-content:center}.skeleton-label{width:45%;height:.55rem}.skeleton-value{width:72%;height:.8rem}.skeleton-cell{width:70%;height:.8rem}@keyframes breathe{0%,to{opacity:.45}50%{opacity:.9}}.topology{margin:0;display:grid;gap:.5rem}.topology-scroll{overflow-x:auto;max-width:980px}.topology-svg{display:block;width:100%;height:auto;min-width:560px}.topology-caption{font-family:var(--mono);font-size:.72rem}.fold-dash{stroke:var(--fold-line);stroke-width:1.5;stroke-dasharray:5 5;fill:none}.fold-active{stroke:var(--live);stroke-width:2;fill:none}.fold-broken{stroke:var(--down);stroke-width:1.5;stroke-dasharray:3 4;fill:none}.fold-arrow{fill:var(--live)}.fold-notch{stroke:var(--carrier);stroke-width:1.5;fill:none}.fold-node{fill:var(--card);stroke:var(--line)}.fold-gate{fill:var(--card);stroke:var(--live);stroke-width:1.5}.fold-node-mark{fill:var(--fg)}.fold-node-label{font-family:var(--mono);font-size:14px;fill:var(--fg)}.fold-anno{font-family:var(--mono);font-size:11px;fill:var(--muted)}.fold-anno.is-down{fill:var(--down)}.fold-link{cursor:pointer}.fold-link:hover .fold-node{fill:var(--card-hi);stroke:var(--line-hi)}.fold-link:hover .fold-node-label{fill:var(--fg)}.fold-link:focus{outline:none}.fold-link:focus-visible .fold-node{stroke:var(--live);stroke-width:2}.toasts{position:fixed;right:1rem;bottom:1rem;z-index:var(--z-toast);display:grid;gap:.4rem;justify-items:end;pointer-events:none}.toast{background:var(--card);border:1px solid var(--line-hi);border-radius:var(--radius);padding:.45rem .75rem;font:400 .8rem/1.4 var(--mono);color:var(--fg);max-width:24rem;animation:rise var(--dur-move) var(--ease) both}@keyframes rise{0%{opacity:0;transform:translateY(8px)}}.toast.bad{border-color:var(--down);color:var(--down)}.palette{width:min(34rem,calc(100vw - 2rem));max-width:none;margin:12vh auto auto;padding:0;border:1px solid var(--line-hi);border-radius:var(--radius);background:var(--card);color:var(--fg);overflow:hidden}.palette::backdrop{background:#0000008c}.pal-input{border-bottom:1px solid var(--line)}.pal-input input{width:100%;height:2.75rem;padding:0 .85rem;border:0;background:none;color:var(--fg);font:inherit;outline:0}.pal-list{max-height:44vh;overflow-y:auto;margin:0;padding:.35rem;list-style:none}.pal-group{margin:.5rem .5rem .2rem;font:600 .7rem/1.4 var(--mono);text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.pal-item{display:flex;align-items:center;gap:.6rem;padding:.4rem .5rem;border-radius:var(--radius);cursor:pointer}.pal-item[aria-selected=true]{background:var(--card-hi)}.pal-label{font-family:var(--mono);font-size:.8rem}.pal-hint{margin-left:auto;color:var(--muted);font-size:.75rem}.pal-empty{margin:0;padding:1.25rem .85rem;color:var(--muted);font-size:.85rem}.pal-foot{margin:0;padding:.5rem .85rem;border-top:1px solid var(--line);color:var(--muted);font-size:.75rem} diff --git a/package.json b/package.json index d43cb03..47ff9e5 100644 --- a/package.json +++ b/package.json @@ -9,13 +9,14 @@ "build": "tsc --noEmit && vite build", "preview": "vite preview", "typecheck": "tsc --noEmit", - "lint": "eslint src tests vite.config.ts playwright.config.ts playwright.contract.config.ts", + "lint": "eslint src tests packages vite.config.ts playwright.config.ts playwright.contract.config.ts", "lint:fix": "eslint --fix src vite.config.ts", "test:e2e": "playwright test", "test:e2e:ui": "playwright test --ui", "test:contract": "playwright test --config playwright.contract.config.ts" }, "dependencies": { + "@fold-run/ui": "workspace:*", "@tanstack/react-query": "^5.90.2", "@tanstack/react-router": "^1.132.0", "preact": "^10.27.2" diff --git a/packages/ui/README.md b/packages/ui/README.md new file mode 100644 index 0000000..1a01b51 --- /dev/null +++ b/packages/ui/README.md @@ -0,0 +1,83 @@ +# @fold-run/ui + +fold's design system, in one place: the tokens, the four self-hosted font +subsets with their provenance, and the wordmark. + +It exists because there are two consoles and there was one design system +maintained twice: + +| | | +| --- | --- | +| `fold-run/fold-console` | the OSS gateway's `/console` page, vendored into every fold binary | +| `fold-run/fold-cloud` `services/console` | the hosted control plane | + +They had already drifted. The fonts were byte-identical but only one repo +carried the provenance; the wordmark path was identical but only one repo had +the transform helper; and the token for a drawn relationship was `--fold-line: +#6E6E6E` in one and `--wire: #707070` in the other — the same concept, two +names, two values, and two rationales, one of which had the arithmetic wrong. + +## What is in it + +| | | +| --- | --- | +| `tokens.css` | the `:root` token set and the four `@font-face` rules | +| `public/fonts/` | the four woff2 subsets, plus `OFL.txt` | +| `fonts-src/sources.json` | upstream releases pinned by tag and sha256 | +| `scripts/subset-fonts.py` | regenerates the subsets; refuses a download that does not match | +| `src/Wordmark.tsx` | the mark, and `wordmarkTransform` for placing it in a drawing | + +## Consuming it + +Inside this repo it is a workspace dependency (`workspace:*`) and needs +nothing else. + +From outside, pnpm resolves it out of the repo by path, pinned to a commit — +the same discipline fold uses for `CONSOLE_COMMIT` and `CONFORMANCE_COMMIT`, +and for the same reason: a tag is mutable, and the safety property is that +what you build is a function of an immutable upstream point. + +```jsonc +// fold-cloud/services/console/package.json +"dependencies": { + "@fold-run/ui": "github:fold-run/fold-console#<40-hex>&path:/packages/ui" +} +``` + +Then: + +```css +@import '@fold-run/ui/tokens.css'; +``` + +```tsx +import { Wordmark } from '@fold-run/ui/Wordmark' +``` + +The package ships **source**, not a build. Both consumers are Vite + Preact +and compile it themselves, which is why there is no build step here and no +registry to publish to. + +### The fonts need a copy step + +`tokens.css` references the faces at root-absolute `url(/fonts/…)`, so they +are public assets rather than module imports — deliberately, and the reason is +in the comment above the `@font-face` block: a module import lets the bundler +rename them or content-address them into a single deduplicated file, and fold's +vendoring manifest pins those four filenames exactly. + +So a consumer has to place `public/fonts/` at its own root. In this repo that +is `publicDir` in `vite.config.ts` pointed straight at the package. A consumer +that already uses its own `public/` for other things copies them in a prebuild +step instead. + +## Changing a token + +A change here changes both consoles. That makes it a change to how the product +looks, not to one page's stylesheet — so it wants the same review a visual +change gets, and a rebuild of both consumers. + +Contrast numbers in the comments are load-bearing and have been wrong before. +Recompute rather than copying a claim forward; WCAG 1.4.11 asks 3:1 of any +graphic required to understand the content, and axe does not evaluate stroke +contrast, so nothing in CI will catch a false one for you. diff --git a/fonts-src/sources.json b/packages/ui/fonts-src/sources.json similarity index 100% rename from fonts-src/sources.json rename to packages/ui/fonts-src/sources.json diff --git a/packages/ui/package.json b/packages/ui/package.json new file mode 100644 index 0000000..a44482e --- /dev/null +++ b/packages/ui/package.json @@ -0,0 +1,26 @@ +{ + "name": "@fold-run/ui", + "version": "0.1.0", + "private": false, + "license": "Apache-2.0", + "type": "module", + "description": "fold's design system: tokens, the self-hosted font subsets, and the wordmark. Shared by fold-console and fold-cloud's console.", + "exports": { + "./tokens.css": "./tokens.css", + "./Wordmark": "./src/Wordmark.tsx", + "./package.json": "./package.json" + }, + "files": [ + "tokens.css", + "src", + "public", + "fonts-src", + "scripts" + ], + "peerDependencies": { + "preact": ">=10" + }, + "scripts": { + "fonts": "python3 scripts/subset-fonts.py" + } +} diff --git a/public/fonts/GeistMono-400-latin.woff2 b/packages/ui/public/fonts/GeistMono-400-latin.woff2 similarity index 100% rename from public/fonts/GeistMono-400-latin.woff2 rename to packages/ui/public/fonts/GeistMono-400-latin.woff2 diff --git a/public/fonts/GeistMono-600-latin.woff2 b/packages/ui/public/fonts/GeistMono-600-latin.woff2 similarity index 100% rename from public/fonts/GeistMono-600-latin.woff2 rename to packages/ui/public/fonts/GeistMono-600-latin.woff2 diff --git a/public/fonts/IBMPlexSans-400-latin.woff2 b/packages/ui/public/fonts/IBMPlexSans-400-latin.woff2 similarity index 100% rename from public/fonts/IBMPlexSans-400-latin.woff2 rename to packages/ui/public/fonts/IBMPlexSans-400-latin.woff2 diff --git a/public/fonts/IBMPlexSans-600-latin.woff2 b/packages/ui/public/fonts/IBMPlexSans-600-latin.woff2 similarity index 100% rename from public/fonts/IBMPlexSans-600-latin.woff2 rename to packages/ui/public/fonts/IBMPlexSans-600-latin.woff2 diff --git a/public/fonts/OFL.txt b/packages/ui/public/fonts/OFL.txt similarity index 100% rename from public/fonts/OFL.txt rename to packages/ui/public/fonts/OFL.txt diff --git a/scripts/subset-fonts.py b/packages/ui/scripts/subset-fonts.py similarity index 100% rename from scripts/subset-fonts.py rename to packages/ui/scripts/subset-fonts.py diff --git a/src/components/Wordmark.tsx b/packages/ui/src/Wordmark.tsx similarity index 100% rename from src/components/Wordmark.tsx rename to packages/ui/src/Wordmark.tsx diff --git a/packages/ui/tokens.css b/packages/ui/tokens.css new file mode 100644 index 0000000..ee19449 --- /dev/null +++ b/packages/ui/tokens.css @@ -0,0 +1,108 @@ +/* fold design tokens — from fold.run's DESIGN.md / DESIGN.json, 2026-08-10 + revision. Dark-only by design: the brand has no per-origin theming. + + THIS FILE IS SHARED. It is the one definition of fold's design system, and + it is consumed by both surfaces that render the product: + + - fold-run/fold-console (this repo) — the OSS gateway's /console page + - fold-run/fold-cloud services/console — the hosted control plane + + It was two definitions until they drifted, which is the argument for the + package: the same system was maintained twice, and the copies disagreed on + the one token where the number actually matters (see --fold-line below). + A change here reaches both consoles, so it is a change to the product's + appearance and not to one page's stylesheet. + + Two rules from that revision drive everything below: + 1. Live is a proof signal, not a colour scheme. It is licensed to + status-up, the active route in a topology drawing, and the focus ring. + Never a button, never a chip, never a border. + 2. Actions run on the neutral ramp — an Action fill (Signal white) with + Backplane ink is the brightest element on the page and needs no hue. + One radius: 2px, on every surface including buttons. */ + +/* Four static subsets, one per family per weight, generated from the variable + sources in fonts-src/ by scripts/subset-fonts.py, both in this package. + + They were four files before too, but the -400 and -600 of each family were + byte-identical: both were the variable font with its wght axis intact and a + default of 400. A face declared `font-weight: 600` whose file carries no 600 + instance renders the outlines it does have, so nothing here was ever + actually bold — and it cost twice. Instancing drops the variation tables, so + two real weights now cost less than half of what one duplicated variable + font did. + + The fonts live in this package's public/ rather than being imported as modules, and the + URLs are root-absolute so Vite treats them as public assets and applies + `base` (./) without touching the names. fold's manifest pins these four + filenames exactly, and a module import would let the bundler rename them — + or, being content-addressed, silently deduplicate any two that ever became + identical again, leaving fold's sync looking for files that were never + emitted. CI asserts all four differ. */ +@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexSans-400-latin.woff2) format('woff2'); } +@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/IBMPlexSans-600-latin.woff2) format('woff2'); } +@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/GeistMono-400-latin.woff2) format('woff2'); } +@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/GeistMono-600-latin.woff2) format('woff2'); } +:root { + --bg: #121212; /* Backplane — page ground */ + --card: #1A1A1A; /* Rack — panels, code */ + --card-hi: #212121; /* Rack, lifted — hover step */ + --line: #2B2B2B; /* Trace — hairlines */ + --line-hi: #3D3D3D; /* Trace Bright — hover borders, secondary edge */ + --fg: #FFFFFF; /* Signal — 18.7:1 */ + --muted: #BCBCBC; /* Static — muted text (9.9:1) */ + --carrier: #E0E0E0; /* links, labels (14.2:1) */ + + --live: #D6FF00; /* PROOF ONLY — status-up, focus ring */ + --down: #FF4C79; /* status failures only */ + /* Fold Line — the faintest a *drawn relationship* may be. Meaningful diagram + graphics only, never a border or a rule. + + WCAG 1.4.11 asks 3:1 of any graphic required to understand the content, + and in a topology drawing the edges ARE the content. Trace Bright is + 1.72:1 on Backplane, right for a border and wrong for a line somebody has + to read; this clears the bar at 3.78:1, with headroom for a 1.5px stroke + that antialiases toward its background, while staying far below Static so + a connection nobody has made still recedes behind one that works. + + The value is #707070 and not the #6E6E6E this console shipped before the + two token sets were merged. That one measured 3.67:1, not the 4.0:1 its + comment claimed — the arithmetic was wrong in the direction that matters, + and fold-cloud's copy had already been corrected without this one being + told. Both cleared 3:1, so nothing was failing; the number in the comment + was the thing that was false. axe cannot catch this: it does not evaluate + stroke contrast, which is how a green scan sits on top of a wrong claim. + + fold-cloud's canvas calls this --wire; it aliases to this token. */ + --fold-line: #707070; + + /* Actions are neutral. Signal fill / Backplane ink is 18.7:1. */ + --action: #FFFFFF; + --action-ink: #121212; + --action-hover: #D4D4D4; + + --radius: 2px; /* machined — one radius, every surface */ + /* The marketing surfaces set controls at 44px. A console is a denser class + of surface: this shell stacks a token field, a filter row and a picker + above a table, and 44px on each would push the federation below the fold + on a laptop. Radius, ramp and type stay identical. */ + --control-h: 34px; + --page: 84rem; + + --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif; + --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; + + /* Motion is state, never decoration, so the vocabulary is deliberately + small: one duration for a colour change, one for something arriving, and + a single exponential ease. No bounce; an instrument does not overshoot. */ + --ease: cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ + --dur-tint: 120ms; + --dur-move: 180ms; + + /* Named, so nobody reaches for 9999. */ + --z-sticky: 10; + --z-toast: 40; + --z-skip: 60; + + color-scheme: dark; +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f835624..74db686 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@fold-run/ui': + specifier: workspace:* + version: link:packages/ui '@tanstack/react-query': specifier: ^5.90.2 version: 5.101.4(react@19.2.8) @@ -46,6 +49,12 @@ importers: specifier: ^7.1.7 version: 7.3.6(@types/node@22.20.1) + packages/ui: + dependencies: + preact: + specifier: '>=10' + version: 10.29.8 + packages: '@axe-core/playwright@4.13.0': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..dfaa269 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,6 @@ +# The console app is the workspace root; packages/ holds what it shares with +# fold-cloud's console. Consumers outside this repo resolve packages/ui through +# pnpm's git-dependency path syntax rather than a registry — see +# packages/ui/README.md. +packages: + - 'packages/*' diff --git a/src/components/Shell.tsx b/src/components/Shell.tsx index ad82e37..1c6a097 100644 --- a/src/components/Shell.tsx +++ b/src/components/Shell.tsx @@ -8,7 +8,7 @@ import { Link, useRouterState } from '@tanstack/react-router' import { useEffect, useRef, useState } from 'react' import type { ComponentChildren } from 'preact' -import { Wordmark } from './Wordmark' +import { Wordmark } from '@fold-run/ui/Wordmark' import { Palette } from './Palette' import { useMcp } from './McpProvider' import type { FederationState } from '@/lib/federation' diff --git a/src/components/Topology.tsx b/src/components/Topology.tsx index 9f0c854..66e7e71 100644 --- a/src/components/Topology.tsx +++ b/src/components/Topology.tsx @@ -19,7 +19,7 @@ // // Everything else — the per-upstream detail — stays in the table, which is why // each node here is a link into the detail route rather than a tooltip. -import { WORDMARK_PATH, wordmarkTransform } from './Wordmark' +import { WORDMARK_PATH, wordmarkTransform } from '@fold-run/ui/Wordmark' import type { FederationState, UpstreamHealth } from '@/lib/federation' import { latency } from '@/lib/format' diff --git a/src/styles/app.css b/src/styles/app.css index 8d40a65..b97e748 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -1,94 +1,16 @@ -/* fold console — design tokens from fold.run (DESIGN.md / DESIGN.json, - 2026-08-10 revision). Dark-only by design: the brand has no per-origin - theming. Fonts are the site's self-hosted OFL subsets (IBM Plex Sans + - Geist Mono), embedded in the binary like every other asset — the CSP keeps - all fetches on-origin. - - Two rules from that revision drive everything below: - 1. Live is a proof signal, not a colour scheme. It is licensed to - status-up, the active route in a topology drawing, and the focus ring. - Never a button, never a chip, never a border. - 2. Actions run on the neutral ramp — an Action fill (Signal white) with - Backplane ink is the brightest element on the page and needs no hue. - One radius: 2px, on every surface including buttons. +/* fold console — the page's own styles. + + The design system itself is not here. Tokens, the four @font-face rules and + the font files live in @fold-run/ui, shared with fold-cloud's console so the + two surfaces cannot drift; this file is what only this console needs. Change + a colour or a radius there, not here. One constraint the shipped CSP adds, which is easy to violate by habit in JSX: `default-src 'self'` covers style-src, and no 'unsafe-inline' is granted. A `style={{…}}` prop is a style attribute, and the browser drops it. Every value that varies must therefore be a class, not an inline declaration — CI greps for the prop. */ - -/* Four static subsets, one per family per weight, generated from the variable - sources in fonts-src/ by scripts/subset-fonts.py. - - They were four files before too, but the -400 and -600 of each family were - byte-identical: both were the variable font with its wght axis intact and a - default of 400. A face declared `font-weight: 600` whose file carries no 600 - instance renders the outlines it does have, so nothing here was ever - actually bold — and it cost twice. Instancing drops the variation tables, so - two real weights now cost less than half of what one duplicated variable - font did. - - The fonts live in public/ rather than being imported as modules, and the - URLs are root-absolute so Vite treats them as public assets and applies - `base` (./) without touching the names. fold's manifest pins these four - filenames exactly, and a module import would let the bundler rename them — - or, being content-addressed, silently deduplicate any two that ever became - identical again, leaving fold's sync looking for files that were never - emitted. CI asserts all four differ. */ -@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexSans-400-latin.woff2) format('woff2'); } -@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/IBMPlexSans-600-latin.woff2) format('woff2'); } -@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/GeistMono-400-latin.woff2) format('woff2'); } -@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/GeistMono-600-latin.woff2) format('woff2'); } - -:root { - --bg: #121212; /* Backplane — page ground */ - --card: #1A1A1A; /* Rack — panels, code */ - --card-hi: #212121; /* Rack, lifted — hover step */ - --line: #2B2B2B; /* Trace — hairlines */ - --line-hi: #3D3D3D; /* Trace Bright — hover borders, secondary edge */ - --fg: #FFFFFF; /* Signal — 18.7:1 */ - --muted: #BCBCBC; /* Static — muted text (9.9:1) */ - --carrier: #E0E0E0; /* links, labels (14.2:1) */ - - --live: #D6FF00; /* PROOF ONLY — status-up, focus ring */ - --down: #FF4C79; /* status failures only */ - /* Fold Line — meaningful diagram graphics only, never a border or a rule. - Trace would vanish at 1.5px on Backplane (1.3:1); this clears the 3:1 bar - for non-text at 4.0:1, which is why fold's system carries it as its own - token rather than reusing the hairline greys. */ - --fold-line: #6E6E6E; - - /* Actions are neutral. Signal fill / Backplane ink is 18.7:1. */ - --action: #FFFFFF; - --action-ink: #121212; - --action-hover: #D4D4D4; - - --radius: 2px; /* machined — one radius, every surface */ - /* The marketing surfaces set controls at 44px. A console is a denser class - of surface: this shell stacks a token field, a filter row and a picker - above a table, and 44px on each would push the federation below the fold - on a laptop. Radius, ramp and type stay identical. */ - --control-h: 34px; - --page: 84rem; - - --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif; - --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; - - /* Motion is state, never decoration, so the vocabulary is deliberately - small: one duration for a colour change, one for something arriving, and - a single exponential ease. No bounce; an instrument does not overshoot. */ - --ease: cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ - --dur-tint: 120ms; - --dur-move: 180ms; - - /* Named, so nobody reaches for 9999. */ - --z-sticky: 10; - --z-toast: 40; - --z-skip: 60; - - color-scheme: dark; -} +@import '@fold-run/ui/tokens.css'; * { box-sizing: border-box; } body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 var(--sans); } diff --git a/tsconfig.json b/tsconfig.json index 5a01398..4697afb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,5 +27,5 @@ "react-dom": ["./node_modules/preact/compat"] } }, - "include": ["src", "tests", "vite.config.ts", "playwright.config.ts", "playwright.contract.config.ts"] + "include": ["src", "tests", "packages", "vite.config.ts", "playwright.config.ts", "playwright.contract.config.ts"] } diff --git a/vite.config.ts b/vite.config.ts index 74289a8..05f5bff 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -85,7 +85,15 @@ const proxy = { '/health': GATEWAY, } +// The font files are the shared package's, not this repo's. publicDir is how +// they reach dist/fonts/ with their names untouched — the four filenames fold's +// manifest pins. Pointing it at the package rather than copying the woff2s back +// into this repo is the whole point of the package: one set of bytes, one +// provenance record (packages/ui/fonts-src/), two consoles. +const PUBLIC_DIR = fileURLToPath(new URL('./packages/ui/public', import.meta.url)) + export default defineConfig(({ command }) => ({ + publicDir: PUBLIC_DIR, // Build: relative, so /console/ and /any-proxy-prefix/console/ both resolve. // Dev/preview: the real mount point, so "../api/…" resolves to /api/… here // exactly as it will in a shipped binary.