docs(ref): mentor pane contract render — ruled values (#154)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Contract for build slices #155/#156 (map #153): ground=background, cards=fg-wash 6%, capsule=terracotta wash 14% @ 85% cap, liveness=floating chip (streaming only), fix-cards row=plain mono. No Swift symbols touched.
This commit is contained in:
1 parent
55eff3a754
commit
9b1fa75907
1 file changed
+428
@@ -0,0 +1,428 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Museion — Mentor pane contract render (#154)</title>
|
||||
<style>
|
||||
/* PROTOTYPE #154 — CONTRACT (ruled 2026-11-03, map #153). The pane below is
|
||||
the locked visual contract build slices #155/#156 implement. Rulings:
|
||||
ground=background, cards=fg-wash 6%, capsule=terracotta wash 14% @ 85% cap,
|
||||
liveness=floating chip (streaming only), fix-cards row=plain mono.
|
||||
Palette law: DesignTokens only (+ semantic ready-green #36664F). */
|
||||
:root {
|
||||
--bg: #FAF9F3; /* DesignTokens.background — chrome */
|
||||
--surface: #FFFEFB; /* DesignTokens.surface — page */
|
||||
--fg: #1a1916;
|
||||
--muted: #6b6964;
|
||||
--border: #e8e5df;
|
||||
--accent: #c96442; /* terracotta — primary AND danger */
|
||||
--green: #36664F; /* semantic ready-dot, sole palette exception */
|
||||
--fg-soft: rgba(26,25,22,.06); /* wash card fill (alpha of fg) */
|
||||
--accent-wash: rgba(201,100,66,.14); /* capsule fill (alpha of accent) */
|
||||
--serif: 'Iowan Old Style', Charter, Georgia, serif;
|
||||
--sans: -apple-system, system-ui, sans-serif;
|
||||
--mono: ui-monospace, 'SF Mono', Menlo, monospace;
|
||||
--radius: 10px;
|
||||
--capsule: 12px; /* 12/12/2/12 — tail bottom-trailing */
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; margin: 0; }
|
||||
body { font: 13px/1.45 var(--sans); color: var(--fg); background: var(--bg);
|
||||
display: flex; overflow: hidden; }
|
||||
|
||||
/* ===== demo harness (NOT the contract) ============================== */
|
||||
.harness { display: flex; height: 100vh; width: 100%; }
|
||||
.context { flex: 1; min-width: 120px; padding: 40px 8vw; }
|
||||
.context .page { background: var(--surface); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 48px 40px;
|
||||
color: var(--muted); font: 14px/1.7 var(--serif); }
|
||||
.context .page b { color: var(--fg); font-weight: 600; }
|
||||
.context .note { margin-top: 10px; font: 10px var(--mono); letter-spacing: .06em;
|
||||
text-transform: uppercase; opacity: .7; }
|
||||
|
||||
.stage { display: flex; flex-direction: column; border-left: 1px solid var(--border);
|
||||
border-right: 1px solid var(--border); background: var(--bg); }
|
||||
.tabs { display: flex; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--border);
|
||||
background: #1a1916; }
|
||||
.tabs button { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: rgba(250,249,243,.55); background: none; border: none;
|
||||
padding: 5px 9px; border-radius: 6px; cursor: pointer; }
|
||||
.tabs button.on { color: #faf9f3; background: rgba(250,249,243,.14); }
|
||||
|
||||
/* ===== the pane (the contract) ====================================== */
|
||||
.pane { width: 356px; flex: none; display: flex; flex-direction: column;
|
||||
height: calc(100vh - 37px); overflow: hidden; }
|
||||
.pane.g-surface { background: var(--surface); }
|
||||
.pane.g-bg { background: var(--bg); }
|
||||
|
||||
/* -- card fill ruling: what thinking/status/fix cards sit on.
|
||||
NOTE: ground + fill classes sit on the SAME pane element — compound
|
||||
selectors, not descendant chains (.g-bg .c-surface .card never matches). */
|
||||
.card { border-radius: var(--radius); }
|
||||
.pane.g-bg.c-surface .card { background: var(--surface); border: 1px solid var(--border); }
|
||||
.pane.g-surface.c-surface .card { background: var(--bg); border: 1px solid var(--border); }
|
||||
.pane.c-wash .card { background: var(--fg-soft); border: 1px solid transparent; }
|
||||
|
||||
/* -- header: 52pt pane-head law (serif 15 semibold, hairline base) -- */
|
||||
.pane-head { min-height: 52px; display: flex; align-items: center; gap: 10px;
|
||||
padding: 0 14px; border-bottom: 1px solid var(--border); }
|
||||
.pane-head h2 { font: 600 15px/1 var(--serif); margin: 0; }
|
||||
.ready { display: flex; align-items: center; gap: 5px; margin-left: 2px; }
|
||||
.ready .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
|
||||
.ready span { font: 10px var(--mono); color: var(--muted); }
|
||||
.session-chip { margin-left: auto; font: 10px var(--mono); color: var(--muted);
|
||||
opacity: .75; }
|
||||
|
||||
/* -- pass bar: selector + status line + description + actions -- */
|
||||
.pass-bar { padding: 12px 14px 12px; border-bottom: 1px solid var(--border); }
|
||||
.selector { display: flex; gap: 14px; margin-bottom: 9px; }
|
||||
.selector button { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
background: none; border: none; padding: 3px 0 5px; cursor: pointer;
|
||||
color: var(--muted); border-bottom: 2px solid transparent; }
|
||||
.selector button.on { color: var(--fg); border-bottom-color: var(--accent); }
|
||||
.status-line { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: var(--muted); margin-bottom: 5px; }
|
||||
.pass-desc { font: 11px/1.45 var(--sans); color: var(--muted); margin-bottom: 10px; }
|
||||
.pass-actions { display: flex; gap: 7px; }
|
||||
.btn { font: 11px var(--mono); height: 28px; padding: 0 13px; border-radius: 6px;
|
||||
cursor: pointer; border: 1px solid transparent; }
|
||||
.btn-primary { background: var(--accent); color: #fffefb; }
|
||||
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--fg); }
|
||||
.pane.g-surface .btn-secondary { background: var(--bg); }
|
||||
.btn-stop { background: none; border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* -- fix-cards row ruling: plain mono row vs inset card -- */
|
||||
.fixcards { margin: 10px 14px; }
|
||||
.fixcards.plain { margin: 10px 14px 0; display: flex; align-items: center; gap: 6px;
|
||||
font: 11px var(--mono); color: var(--muted); cursor: pointer;
|
||||
border: none; background: none; padding: 2px 0; width: fit-content; }
|
||||
.fixcards.plain:hover { color: var(--fg); }
|
||||
.fixcards.card { padding: 9px 12px; display: flex; align-items: center; gap: 8px;
|
||||
font: 11px var(--mono); color: var(--muted); cursor: pointer;
|
||||
width: fit-content; }
|
||||
|
||||
/* -- transcript: the Vivarium treatment, two-color voice -- */
|
||||
.transcript { flex: 1; overflow-y: auto; padding: 18px 16px 12px; }
|
||||
.turn { margin-bottom: 18px; }
|
||||
.agent { font: 15px/1.6 var(--serif); color: var(--fg);
|
||||
.md em { font-style: italic; } }
|
||||
.user { display: flex; justify-content: flex-end; }
|
||||
.bubble { font: 13px/1.5 var(--sans); color: var(--fg); padding: 12px 16px;
|
||||
border-radius: var(--capsule) var(--capsule) 2px var(--capsule);
|
||||
max-width: 85%; }
|
||||
.cap-70 .bubble { max-width: 70%; }
|
||||
.cap-accent .bubble { background: var(--accent-wash); }
|
||||
.cap-plain .bubble { background: var(--surface); border: 1px solid var(--border); }
|
||||
.pane.g-surface .cap-plain .bubble { background: var(--bg); }
|
||||
|
||||
/* thinking: mono toggle + serif-13 muted content on the card fill */
|
||||
.think { }
|
||||
.think > button { display: flex; align-items: center; gap: 6px; background: none;
|
||||
border: none; padding: 0; cursor: pointer;
|
||||
font: 11px var(--mono); color: var(--muted); }
|
||||
.think .body { font: 13px/1.6 var(--serif); color: var(--muted);
|
||||
padding: 12px 14px; margin-top: 8px; }
|
||||
.think.closed .body { display: none; }
|
||||
|
||||
/* inset status box — the quiet system voice, on the card fill */
|
||||
.status-box { font: 11px/1.5 var(--mono); color: var(--muted); padding: 10px 12px;
|
||||
width: fit-content; max-width: 100%; }
|
||||
|
||||
/* -- composer: input + Send/Stop + trailing debug toggle -- */
|
||||
.composer { border-top: 1px solid var(--border); padding: 12px 14px 10px;
|
||||
display: flex; flex-direction: column; gap: 8px; position: relative; }
|
||||
.composer .row { display: flex; align-items: flex-end; gap: 8px; }
|
||||
.input { flex: 1; font: 13px/1.45 var(--sans); color: var(--fg);
|
||||
background: var(--surface); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 8px 10px; min-height: 36px;
|
||||
resize: none; }
|
||||
.pane.g-surface .input { background: var(--bg); }
|
||||
.send { height: 30px; padding: 0 14px; }
|
||||
.debug { font: 10px var(--mono); letter-spacing: .04em; background: none; border: none;
|
||||
cursor: pointer; color: var(--muted); opacity: .65; padding: 4px 0 2px;
|
||||
align-self: flex-end; }
|
||||
.debug.on { color: var(--accent); opacity: 1; }
|
||||
|
||||
/* liveness ruling — shown ONLY while streaming (pane carries the state class) */
|
||||
.pane.st-streaming.live-inline .liveness-inline { display: flex; align-items: center; gap: 8px;
|
||||
font: 11px var(--sans); color: var(--muted); }
|
||||
.liveness-inline { display: none; }
|
||||
.liveness-float { display: none; }
|
||||
.pane.st-streaming.live-float .liveness-float { display: flex; position: absolute; top: -34px; left: 50%;
|
||||
transform: translateX(-50%); align-items: center; gap: 8px;
|
||||
font: 11px var(--sans); color: var(--muted);
|
||||
background: rgba(255,254,251,.82); backdrop-filter: blur(8px);
|
||||
border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
|
||||
pointer-events: none; z-index: 3; }
|
||||
.spinner { width: 11px; height: 11px; flex: none; border-radius: 50%;
|
||||
border: 1.5px solid var(--border); border-top-color: var(--muted);
|
||||
animation: spin .8s linear infinite; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
/* -- full-pane states -- */
|
||||
.state-card { flex: 1; display: flex; flex-direction: column; align-items: center;
|
||||
justify-content: center; gap: 10px; text-align: center; padding: 24px; }
|
||||
.state-card .tri { color: var(--accent); font-size: 24px; line-height: 1; }
|
||||
.state-card h3 { font: 600 14px var(--serif); margin: 0; }
|
||||
.state-card p { font: 12px/1.5 var(--sans); color: var(--muted); margin: 0; }
|
||||
|
||||
/* ===== rulings panel (demo chrome) ================================== */
|
||||
.rulings { width: 264px; flex: none; background: #1a1916; color: #faf9f3;
|
||||
padding: 14px 16px; overflow-y: auto; }
|
||||
.rulings h1 { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
margin: 0 0 4px; opacity: .9; }
|
||||
.rulings .sub { font: 10px/1.5 var(--mono); opacity: .55; margin: 0 0 14px; }
|
||||
.ruling { margin-bottom: 13px; }
|
||||
.ruling .name { font: 10px var(--mono); letter-spacing: .06em; text-transform: uppercase;
|
||||
opacity: .6; margin-bottom: 5px; display: flex; gap: 6px; }
|
||||
.ruling .name .rec { color: var(--accent); opacity: 1; }
|
||||
.ruling .opts { display: flex; flex-wrap: wrap; gap: 4px; }
|
||||
.ruling .opts button { font: 10px var(--mono); background: none; color: rgba(250,249,243,.6);
|
||||
border: 1px solid rgba(250,249,243,.25); border-radius: 6px;
|
||||
padding: 4px 8px; cursor: pointer; }
|
||||
.ruling .opts button.on { color: #1a1916; background: #faf9f3; border-color: #faf9f3; }
|
||||
.rulings .locked { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(250,249,243,.15);
|
||||
font: 10px/1.7 var(--mono); opacity: .55; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="harness">
|
||||
|
||||
<!-- left context: the editor column (surface page) — judges ground rulings -->
|
||||
<div class="context">
|
||||
<div class="page">
|
||||
<b>The expected value of showing up</b><br><br>
|
||||
The first concrete image lands in paragraph three, and everything before
|
||||
it is weather. Cut to the image — the reader was already there, waiting.
|
||||
</div>
|
||||
<div class="note">editor column · surface #FFFEFB — context only</div>
|
||||
</div>
|
||||
|
||||
<div class="stage">
|
||||
<div class="tabs" id="tabs">
|
||||
<button data-state="ready" class="on">ready</button>
|
||||
<button data-state="streaming">streaming</button>
|
||||
<button data-state="crashed">crashed</button>
|
||||
<button data-state="noengine">no engine</button>
|
||||
</div>
|
||||
|
||||
<div class="pane g-bg c-wash cap-accent cap-85 live-float" id="pane">
|
||||
|
||||
<!-- header: title + engine status + session chip (settled #5) -->
|
||||
<div class="pane-head">
|
||||
<h2>Mentor</h2>
|
||||
<div class="ready"><span class="dot"></span><span>ready</span></div>
|
||||
<span class="session-chip">session a1b2c3d4</span>
|
||||
</div>
|
||||
|
||||
<!-- pass bar: compact selector + status line (settled #4 — no segmented picker) -->
|
||||
<div class="pass-bar" data-only="ready">
|
||||
<div class="selector">
|
||||
<button class="on">Pass 1</button>
|
||||
<button>Pass 2</button>
|
||||
</div>
|
||||
<div class="status-line">Pass 1 · First Draft</div>
|
||||
<div class="pass-desc">Critiques structure and argument · ~4,200 tokens</div>
|
||||
<div class="pass-actions">
|
||||
<button class="btn btn-primary">Run Pass 1</button>
|
||||
<button class="btn btn-secondary">Blind read</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- fix-cards row: mono row vs inset card (ruling). Dead control in the
|
||||
mock — in the app it opens the Fix Cards palette window (out of scope). -->
|
||||
<button class="fixcards plain" id="fixcards" data-only="ready"
|
||||
title="In the app: opens the Fix Cards palette window (separate window — not part of this mock). This row's own styling is what the ruling flips.">
|
||||
<span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M4 17V5a1 1 0 0 1 1-1h9"/><path d="M20 4v6"/><path d="M20 14v6h-9"/><path d="M14.5 2.5l7 7"/><path d="M17 21.5v-5"/><path d="M20.5 21.5v-5"/></svg></span> Fix Cards · 3
|
||||
</button>
|
||||
|
||||
<!-- transcript -->
|
||||
<div class="transcript" data-only="ready streaming">
|
||||
<div class="turn"><div class="status-box card">No pass has run on this draft.</div></div>
|
||||
|
||||
<div class="turn user"><div class="bubble">Can you look at the opening? I think the scene starts too late.</div></div>
|
||||
|
||||
<div class="turn agent">The piece is ready when you are. Pass 1 looks at structure, argument, and flow — I will leave every word in your hands. The opening earns its place: the first concrete image lands in paragraph three, and everything before it is weather. Cut to the image.</div>
|
||||
|
||||
<div class="turn think closed" id="think1">
|
||||
<button onclick="this.parentNode.classList.toggle('closed')">
|
||||
<span>▸</span> Thinking…
|
||||
</button>
|
||||
<div class="body card">The draft opens with scene-setting that delays the first image. The writer's instinct is right — paragraph three carries the piece's first earned moment…</div>
|
||||
</div>
|
||||
|
||||
<div class="turn user"><div class="bubble">What would you cut first?</div></div>
|
||||
|
||||
<div class="turn agent">I would test that thought against the scene and keep the sentence that says it most plainly. Your draft stays yours.</div>
|
||||
|
||||
<!-- streaming-only rows -->
|
||||
<div class="turn think" data-only="streaming">
|
||||
<button onclick="this.parentNode.classList.toggle('closed')">
|
||||
<span class="spinner"></span> Thinking…
|
||||
</button>
|
||||
<div class="body card">Comparing the second scene against the outline's promise — the argument turns on the word “expected”, which is doing quiet work here…</div>
|
||||
</div>
|
||||
<div class="turn agent" data-only="streaming">The second scene undercuts the first unless the stakes rise. Two options: raise them, or cut the scene and let</div>
|
||||
</div>
|
||||
|
||||
<!-- full-pane states -->
|
||||
<div class="state-card" data-only="crashed" style="display:none">
|
||||
<div class="tri">⚠</div>
|
||||
<h3>The mentor engine stopped</h3>
|
||||
<p>Nothing is lost — the transcript stays, and the engine can be restarted.</p>
|
||||
<button class="btn btn-primary">Restart</button>
|
||||
</div>
|
||||
<div class="state-card" data-only="noengine" style="display:none">
|
||||
<div class="tri">⚠</div>
|
||||
<h3>The Hermes engine is missing</h3>
|
||||
<p>Install steps are one click away at the rail's status icon — the editor keeps working.</p>
|
||||
</div>
|
||||
|
||||
<!-- composer: input + Send/Stop + trailing debug (settled #5) -->
|
||||
<div class="composer">
|
||||
<div class="liveness-float"><span class="spinner"></span> Mentor is working — Stop to interrupt.</div>
|
||||
<div class="liveness-inline"><span class="spinner"></span> Mentor is working — Stop to interrupt.</div>
|
||||
<div class="row">
|
||||
<textarea class="input" rows="1" placeholder="Ask the mentor…">What would you cut first?</textarea>
|
||||
<button class="btn btn-primary send" id="sendBtn">Send</button>
|
||||
</div>
|
||||
<button class="debug">debug</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- rulings: the open calls, each with the recommendation marked ● -->
|
||||
<div class="rulings">
|
||||
<h1>Rulings</h1>
|
||||
<p class="sub">fog items from map #153 — pick per row; the pane updates live</p>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Pane ground <span class="rec">● background</span></div>
|
||||
<div class="opts" data-ruling="ground">
|
||||
<button data-v="g-bg" class="on">background #FAF9F3</button>
|
||||
<button data-v="g-surface">surface #FFFEFB</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Card fill <span class="rec">● fg-wash — ruled</span> <span style="opacity:.45">— thinking card · status box · inset fix row</span></div>
|
||||
<div class="opts" data-ruling="cardfill">
|
||||
<button data-v="c-surface">page fill + border</button>
|
||||
<button data-v="c-wash" class="on">fg-wash 6%</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Capsule fill <span class="rec">● accent wash</span></div>
|
||||
<div class="opts" data-ruling="capfill">
|
||||
<button data-v="cap-accent" class="on">terracotta 14%</button>
|
||||
<button data-v="cap-plain">page + border</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Capsule cap <span class="rec">● 85%</span></div>
|
||||
<div class="opts" data-ruling="cap">
|
||||
<button data-v="cap-85" class="on">85% of column</button>
|
||||
<button data-v="cap-70">70% of column</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Liveness <span class="rec">● floating chip</span></div>
|
||||
<div class="opts" data-ruling="live">
|
||||
<button data-v="live-float" class="on">floating chip</button>
|
||||
<button data-v="live-inline">inline row</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Fix-cards row <span class="rec">● plain row</span></div>
|
||||
<div class="opts" data-ruling="fix">
|
||||
<button data-v="plain" class="on">plain mono row</button>
|
||||
<button data-v="inset">inset card</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="locked">
|
||||
ruled 2026-11-03 (map #153):<br>
|
||||
· ground = background #FAF9F3<br>
|
||||
· cards = fg-wash 6% (ruled over page fill)<br>
|
||||
· capsule = terracotta wash 14% · 85% cap<br>
|
||||
· liveness = floating chip (streaming only)<br>
|
||||
· fix-cards row = plain mono row<br>
|
||||
locked (map settle + transpose):<br>
|
||||
· serif 15/1.6 agent prose<br>
|
||||
· capsule radius 12/12/2/12, sans 13<br>
|
||||
· thinking: mono 11 toggle, serif 13 muted<br>
|
||||
· chrome labels mono 10 · .08em · upper<br>
|
||||
· header 52px serif 15/600<br>
|
||||
· ready-dot #36664F (sole green)<br>
|
||||
· danger = terracotta<br>
|
||||
· turn rhythm 18px · pads 16/18
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
const pane = document.getElementById('pane');
|
||||
const GROUPS = { ground: ['g-bg','g-surface'], cardfill: ['c-surface','c-wash'],
|
||||
capfill: ['cap-accent','cap-plain'], cap: ['cap-85','cap-70'],
|
||||
live: ['live-float','live-inline'], fix: ['plain','inset'] };
|
||||
|
||||
// state tabs: show/hide [data-only] blocks + swap composer Send/Stop
|
||||
document.getElementById('tabs').addEventListener('click', e => {
|
||||
const btn = e.target.closest('button'); if (!btn) return;
|
||||
document.querySelectorAll('#tabs button').forEach(b => b.classList.toggle('on', b === btn));
|
||||
const st = btn.dataset.state;
|
||||
pane.classList.remove('st-ready', 'st-streaming', 'st-crashed', 'st-noengine');
|
||||
pane.classList.add('st-' + st);
|
||||
document.querySelectorAll('[data-only]').forEach(el => {
|
||||
el.style.display = el.dataset.only.split(' ').includes(st) ? '' : 'none';
|
||||
});
|
||||
const send = document.getElementById('sendBtn');
|
||||
send.textContent = st === 'streaming' ? 'Stop' : 'Send';
|
||||
send.className = 'btn send ' + (st === 'streaming' ? 'btn-stop' : 'btn-primary');
|
||||
document.querySelector('.ready span:last-child').textContent =
|
||||
st === 'crashed' || st === 'noengine' ? 'stopped' : 'ready';
|
||||
document.querySelector('.session-chip').style.visibility =
|
||||
st === 'crashed' || st === 'noengine' ? 'hidden' : 'visible';
|
||||
});
|
||||
|
||||
// fix-cards ruling needs class swap on the row itself
|
||||
function applyFix(v) {
|
||||
document.getElementById('fixcards').className =
|
||||
'fixcards ' + v + (v === 'inset' ? ' card' : '');
|
||||
}
|
||||
|
||||
document.querySelectorAll('.ruling .opts').forEach(group => {
|
||||
group.addEventListener('click', e => {
|
||||
const btn = e.target.closest('button'); if (!btn) return;
|
||||
group.querySelectorAll('button').forEach(b => b.classList.toggle('on', b === btn));
|
||||
const v = btn.dataset.v;
|
||||
if (group.dataset.ruling === 'fix') return applyFix(v);
|
||||
pane.classList.remove(...GROUPS[group.dataset.ruling]);
|
||||
pane.classList.add(v);
|
||||
});
|
||||
});
|
||||
|
||||
// pass selector is interactive chrome
|
||||
document.querySelector('.selector').addEventListener('click', e => {
|
||||
const btn = e.target.closest('button'); if (!btn) return;
|
||||
document.querySelectorAll('.selector button').forEach(b => b.classList.toggle('on', b === btn));
|
||||
document.querySelector('.status-line').textContent =
|
||||
`${btn.textContent} · First Draft`;
|
||||
document.querySelector('.pass-actions .btn-primary').textContent = `Run ${btn.textContent}`;
|
||||
});
|
||||
|
||||
document.querySelector('.debug').addEventListener('click', e =>
|
||||
e.target.classList.toggle('on'));
|
||||
|
||||
// initial visibility: ready state
|
||||
pane.classList.add('st-ready');
|
||||
document.querySelectorAll('[data-only]').forEach(el =>
|
||||
el.style.display = el.dataset.only.split(' ').includes('ready') ? '' : 'none');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user