Files
whynot-design/ir/exemplars/Sidebar.html
tegwick 0d688ca94a feat(designbook): technology-neutral IR + stack-adapter pipeline (WHYNOT-WP-0002 T01-T06)
Author the design language once in the canonical React designbook and project it
one-way onto each stack: React -> designbook/ -> ir/ -> adapters/<stack>/.

Phase 0 — contracts & governance (T01-T03):
- ir/SCHEMA.md + ir/schema/{component,tokens}.schema.json — neutral IR contract
  (W3C DTCG tokens; React prop -> HTML attribute mapping; non-portable props flagged).
- adapters/ADAPTER_CONTRACT.md — inputs, drift-report + parity-result shapes,
  idempotency rules, CI exit codes (0 ok / 2 usage / 3 drift / 4 parity / 5 internal).
- .claude/rules/designbook-propagation.md + DesignSystemIntroduction.md §5.1 —
  one-way directionality + drift-resolution workflow.

T04 — canonical React designbook + the missing pull tool:
- The bundled /design-sync skill only PUSHES repo->cloud; it cannot populate
  designbook/. Added scripts/designbook_pull.py + `make designbook-pull`, which drives
  the local claude binary headless (acceptEdits) so DesignSync fetch+write runs in a
  subprocess (contents never hit the orchestrator's context). Pulled 44 files;
  excludes the _whynot-design-seed/ self-copy. Corrected the docs that wrongly called
  /design-sync the pull.

T05 — IR extractor (scripts/ir-extract.mjs + `make ir`):
- ir/tokens.json (80 tokens, DTCG, var() -> {ref} alias resolution); ir/components/*.json
  (10 contracts parsed from .jsx signatures: enum/boolean/number inference, prop->attr
  map, style/callback marked non-portable); ir/exemplars/*.

T06 — Lit token adapter (adapters/lit/ + `make adapt-lit`):
- Full-gen tokens into src/styles/colors_and_type.css :root (marker-bounded, idempotent
  no-op on re-run; hand-authored type CSS preserved).

NOTE: token regen synced Lit to canonical React — fonts IBM Plex -> system stacks and 8
status tokens added. This is a VISUAL change: review and run `pnpm test:visual:update`
before merge. Remaining: T07 scaffold+drift, T08 parity, T09 runbook, T10 2nd-adapter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 12:36:24 +02:00

86 lines
5.2 KiB
HTML

<!doctype html>
<!-- @dsCard group="Components" name="Components · Left Navigation" subtitle="Grouped sidebar · active state · minimal variant" viewport="700x420" -->
<html><head>
<meta charset="utf-8"><title>Left Navigation</title>
<link rel="stylesheet" href="../colors_and_type.css">
<style>
body { margin: 0; padding: 20px; background: var(--paper); display: flex; gap: 28px; align-items: stretch; }
.frame { display: flex; flex-direction: column; gap: 8px; }
.frame > .cap { font: 500 10px/1 var(--ff-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); padding-left: 12px; }
.leftnav {
width: 220px; box-sizing: border-box;
display: flex; flex-direction: column; gap: 28px;
padding: 24px 8px 24px 12px;
border-right: 1px solid var(--line-soft);
min-height: 360px;
}
.brand { display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.brand img { width: 20px; height: 20px; }
.brand .nm { font: 500 14px var(--ff-sans); color: var(--fg-1); }
.brand .slug { font: 400 12px var(--ff-mono); color: var(--fg-3); }
.body { display: flex; flex-direction: column; gap: 28px; flex: 1; }
.section { display: flex; flex-direction: column; gap: 8px; }
.section .lbl { font: 500 11px/1 var(--ff-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); padding-left: 12px; opacity: 0.7; }
.items { display: flex; flex-direction: column; gap: 1px; }
.item {
display: flex; align-items: center; gap: 10px;
padding: 6px 10px; border-left: 2px solid transparent;
color: var(--fg-3); font: 400 13px var(--ff-sans); cursor: pointer;
text-decoration: none;
}
.item .ic { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; flex: none; }
.item .t { flex: 1; }
.item .n { margin-left: auto; font: 400 11px var(--ff-mono); color: var(--ink-5); }
.item.active { color: var(--fg-1); font-weight: 500; border-left-color: var(--ink); }
.item.active .n { color: var(--fg-3); }
.item.doc { font: 400 12px var(--ff-mono); }
.footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; font: 400 11px var(--ff-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.footer .dot { width: 5px; height: 5px; border-radius: 999px; background: var(--ink-4); }
</style></head>
<body>
<div class="frame">
<span class="cap">Default · grouped, with active state</span>
<nav class="leftnav">
<div class="brand"><img src="../assets/whynot-logo.png" alt=""><span class="nm">whynot</span><span class="slug">/ control</span></div>
<div class="body">
<div class="section">
<span class="lbl">Work</span>
<div class="items">
<a class="item"><svg class="ic" viewBox="0 0 24 24"><path d="M22 12h-6l-2 3h-4l-2-3H2"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/></svg><span class="t">Inbox</span><span class="n">7</span></a>
<a class="item active"><svg class="ic" viewBox="0 0 24 24"><path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"/><path d="M6.453 15h11.094"/><path d="M8.5 2h7"/></svg><span class="t">Prototypes</span><span class="n">4</span></a>
<a class="item"><svg class="ic" viewBox="0 0 24 24"><path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.5.5 0 0 1-.96 0L9.24 2.18a.5.5 0 0 0-.96 0l-2.35 8.36A2 2 0 0 1 4 12H2"/></svg><span class="t">Signals</span><span class="n">12</span></a>
<a class="item"><svg class="ic" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/><path d="M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"/></svg><span class="t">Betas</span><span class="n">1</span></a>
<a class="item"><svg class="ic" viewBox="0 0 24 24"><path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/></svg><span class="t">Decisions</span><span class="n">3</span></a>
</div>
</div>
<div class="section">
<span class="lbl">Control docs</span>
<div class="items">
<a class="item doc"><span class="t">INTENT.md</span></a>
<a class="item doc"><span class="t">SCOPE.md</span></a>
<a class="item doc"><span class="t">OPERATING_MODEL.md</span></a>
</div>
</div>
</div>
<div class="footer"><span class="dot"></span><span>A1 · Incubating</span></div>
</nav>
</div>
<div class="frame">
<span class="cap">Minimal · no brand, no icons</span>
<nav class="leftnav" style="min-height: 360px;">
<div class="body">
<div class="section">
<span class="lbl">Navigate</span>
<div class="items">
<a class="item active"><span class="t">Overview</span></a>
<a class="item"><span class="t">Prototypes</span><span class="n">4</span></a>
<a class="item"><span class="t">Signals</span><span class="n">12</span></a>
<a class="item"><span class="t">Settings</span></a>
</div>
</div>
</div>
</nav>
</div>
</body></html>