@filipgutica/design-system 1.0.36 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -364,7 +364,7 @@
364
364
  .dialog-body { min-height: 0; overflow: auto; padding: var(--space-4); }
365
365
  .dialog-foot { justify-content: flex-end; gap: var(--space-2); border-top: 1px solid var(--color-border-subtle); background: var(--color-surface); }
366
366
  /* The close button is a quiet action; this sets its size only. */
367
- .close { flex: none; width: var(--control-touch); min-height: var(--control-touch); padding: 0; color: var(--color-muted); }
367
+ .close { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; color: var(--color-muted); }
368
368
  .drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
369
369
  dialog.drawer { position: fixed; inset: 0 auto 0 0; height: 100dvh; max-height: none; margin: 0; }
370
370
  dialog.drawer::backdrop { background: var(--color-overlay); }
@@ -635,26 +635,40 @@
635
635
  .code-head b { font-weight: var(--weight-semibold); }
636
636
  .code-head .lang { color: var(--color-muted); }
637
637
  /* Copy is a quiet action; this sets its size and place. */
638
- .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-touch); min-height: var(--control-touch); margin-left: auto; padding: var(--space-1) 0.375rem; color: inherit; }
639
- /* Copy is muted at rest. The code block has its own palette, so on hover and while the tick shows it takes the block's text colour. */
640
- .code .copy { color: var(--color-muted); }
641
- .code .copy[data-copied] { color: var(--color-code-text); }
642
- .code .copy.is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
643
- @media (hover: hover) { .code .copy:hover:where(:not(:disabled)) { color: var(--color-code-text); } }
638
+ .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-md); min-height: var(--control-md); margin-left: auto; padding: 0 0.375rem; color: inherit; }
639
+ /* Copy and Wrap lines are muted at rest. The code block has its own palette, so on hover, while the tick
640
+ shows, and while Wrap lines is on they take the block's text colour. */
641
+ .code :is(.copy, .wrap-toggle) { color: var(--color-muted); }
642
+ .code :is(.copy[data-copied], .wrap-toggle[aria-pressed="true"]) { color: var(--color-code-text); }
643
+ .code :is(.copy, .wrap-toggle).is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
644
+ @media (hover: hover) { .code :is(.copy, .wrap-toggle):hover:where(:not(:disabled)) { color: var(--color-code-text); } }
645
+ /* The block's actions sit together at the end of the header, or in the corner beside the source. */
646
+ .code-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
647
+ .code-actions > .copy { margin-left: 0; }
648
+ /* Wrap lines is an icon-only quiet action and a toggle: while on it keeps the open-menu tint. */
649
+ .wrap-toggle { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; }
650
+ :where(.wrap-toggle[aria-pressed="true"]) { background: color-mix(in srgb, currentColor 6%, transparent); }
651
+ /* Forced colors: a Highlight border and icon mark it on, at rest and on hover. */
652
+ @media (forced-colors: active) { .code .wrap-toggle[aria-pressed="true"] { border-color: Highlight; } .wrap-toggle[aria-pressed="true"] .icon { color: Highlight; } }
644
653
  /* Inset: the code block clips its content. */
645
654
  .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
646
- .code .copy.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
655
+ .code :is(.copy, .wrap-toggle).quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
647
656
  /* The source is an inset panel. It sits --space-1 inside the frame, so its corners are concentric with the frame's. */
648
657
  .code pre { margin: 0; padding: var(--space-4); overflow: auto; max-height: 32rem; border: 1px solid transparent; border-radius: calc(var(--radius-panel) - var(--space-1)); background: var(--color-code); font-size: var(--text-code); line-height: 1.65; tab-size: 2; }
649
658
  /* Each line is a baseline-aligned row, so a prompt or line number sits on the text's baseline. */
650
659
  .code .line { display: flex; align-items: baseline; min-height: 1.65em; }
651
660
  .code .line > span { white-space: pre; }
661
+ /* With Wrap lines on, each line breaks inside the panel, long words and URLs included, and nothing scrolls
662
+ sideways. The line number stays on the first visual line. */
663
+ .code[data-wrap] .line > span:not(.ln) { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
652
664
  .code .ln { min-width: 2.5em; padding-right: 1em; flex: none; text-align: right; color: var(--color-muted); user-select: none; }
653
665
  .code .k { color: var(--color-syntax-keyword); } .code .s { color: var(--color-syntax-string); } .code .n { color: var(--color-syntax-number); } .code .c { color: var(--color-syntax-comment); }
654
666
  .code .f { color: var(--color-syntax-function); } .code .t { color: var(--color-syntax-type); } .code .v { color: var(--color-syntax-variable); } .code .o { color: var(--color-syntax-operator); } .code .p { color: var(--color-syntax-punctuation); } .code .g { color: var(--color-syntax-tag); } .code .a { color: var(--color-syntax-attribute); }
655
667
  /* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
656
668
  .code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
657
669
  .code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
670
+ /* Copy keeps its control height and centres on the panel's line. */
671
+ .code.compact > .copy { align-self: center; }
658
672
 
659
673
  /* Code block with a live example: a live stage over its source, in one frame. */
660
674
  .example { width: 100%; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-bg); }
@@ -665,7 +679,7 @@
665
679
  Copy comes first in DOM order and is placed in the source's top right corner. */
666
680
  .example > .code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; max-width: none; padding: 0; border-width: 1px 0 0; border-radius: 0; background: var(--color-code); box-shadow: none; }
667
681
  .example > .code > pre { grid-row: 1; grid-column: 1; border: 0; border-radius: 0; }
668
- .example > .code > .copy { grid-row: 1; grid-column: 2; margin: var(--space-1); }
682
+ .example > .code > :is(.copy, .code-actions) { grid-row: 1; grid-column: 2; margin: var(--space-1); }
669
683
 
670
684
  /* ================= Identity: terminal folio ================= */
671
685
 
@@ -689,9 +703,9 @@
689
703
  }
690
704
  .capture-head { display: flex; align-items: center; min-width: 0; }
691
705
  .capture .tablist { flex: 1; width: auto; padding-inline: var(--space-2); }
692
- .capture .tab { min-height: var(--control-touch); font-family: var(--font-mono); font-size: var(--text-sm); }
706
+ .capture .tab { font-family: var(--font-mono); font-size: var(--text-sm); }
693
707
  /* Full size is a quiet action; this sets its size and place. */
694
- .full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-touch); padding: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
708
+ .full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-md); padding: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
695
709
  /* Inset: the panel clips its content. */
696
710
  .capture .full.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
697
711
  .capture .tabpanel { padding-top: 0; color: inherit; }
@@ -736,7 +750,7 @@
736
750
  .site-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: var(--space-16); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-text); background: var(--color-bg); width: 100%; }
737
751
  .projects { position: relative; }
738
752
  /* The trigger is a quiet action; this sets its size and type. */
739
- .projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-touch); padding-inline: var(--space-3); border-radius: var(--radius-field); font-family: var(--font-mono); font-weight: var(--weight-semibold); list-style: none; user-select: none; }
753
+ .projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-md); padding-inline: var(--space-3); border-radius: var(--radius-field); font-family: var(--font-mono); font-weight: var(--weight-semibold); list-style: none; user-select: none; }
740
754
  .projects > summary::-webkit-details-marker { display: none; }
741
755
  /* The ~/ mark is decorative: the empty alternative text keeps it out of the name. */
742
756
  .projects > summary::before { content: "~/" / ""; color: var(--color-project); }
@@ -749,8 +763,8 @@
749
763
  /* Rows sit --space-1 inside the menu, so they are concentric with it, as select picker rows are. */
750
764
  .projects .navlist a { border-radius: calc(var(--radius-panel) - var(--space-1)); font-family: var(--font-mono); }
751
765
  .site-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin-left: auto; }
752
- /* The site links are a navigation strip at the header's 44px. */
753
- .site-links a { min-height: var(--control-touch); }
766
+ /* The site links are a navigation strip at the control height; they grow to --control-touch at tablet width. */
767
+ .site-links a { min-height: var(--control-md); }
754
768
 
755
769
  /* Page type and helpers */
756
770
  .folio-h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); letter-spacing: var(--tracking-tight); }
@@ -864,8 +878,8 @@
864
878
  .page-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-8); }
865
879
  .page-head > .strip { justify-self: start; }
866
880
  }
867
- /* Header links are navigation rows at the site header's 44px. */
868
- .page-head .strip a { min-height: var(--control-touch); }
881
+ /* Header links are navigation rows at the control height; they grow to --control-touch at tablet width. */
882
+ .page-head .strip a { min-height: var(--control-md); }
869
883
  .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
870
884
  /* One column that may shrink below its content, so a long title or specimen cannot widen the page.
871
885
  A short page, such as one left by a find with no matches, keeps its rows at the top. */
@@ -907,6 +921,8 @@
907
921
  .rail-specimen { display: grid; gap: var(--space-3); width: 240px; }
908
922
  .phone-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); width: min(100%, 360px); padding-block: var(--space-2); border-bottom: 1px solid var(--color-text); }
909
923
  .phone-head > .strip { flex-basis: 100%; margin-inline: -2px; }
924
+ /* The phone header samples show the touch size at every width. */
925
+ .phone-head .projects > summary, .phone-head > .strip a { min-height: var(--control-touch); }
910
926
  /* At 640px and narrower, one or two links stay on the switcher's row as plain text links, 12px apart:
911
927
  no row padding or hover fill, and the current page in the accent with no fill. The picker ends the row;
912
928
  where all of it does not fit, as at 320px, only the picker wraps. */
@@ -978,6 +994,11 @@
978
994
  .search { height: var(--control-touch); }
979
995
  .check:not([data-specimen="size"] *), .switch:not([data-specimen="size"] *), .toggle:not([data-specimen="size"] *) { min-height: var(--control-touch); }
980
996
  .copy-link { width: var(--control-touch); height: var(--control-touch); }
997
+ /* Quiet actions in docs components: 32px on desktop, 44px here. */
998
+ .close { width: var(--control-touch); }
999
+ .copy { min-width: var(--control-touch); }
1000
+ .wrap-toggle { width: var(--control-touch); }
1001
+ .close, .copy, .full, .projects > summary, .page-head .strip a, .wrap-toggle { min-height: var(--control-touch); }
981
1002
  .chip { min-height: var(--control-touch); }
982
1003
  /* Touch: the hover toolbar never shows; a tap opens the thread, whose header holds More. */
983
1004
  .msg-tools { display: none; }
@@ -1024,6 +1045,7 @@
1024
1045
  <symbol id="i-close" viewBox="0 0 16 16"><path d="M4 4l8 8M12 4l-8 8"/></symbol>
1025
1046
  <symbol id="i-plus" viewBox="0 0 16 16"><path d="M8 3.5v9M3.5 8h9"/></symbol>
1026
1047
  <symbol id="i-copy" viewBox="0 0 16 16"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 5.5V3.5a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2"/></symbol>
1048
+ <symbol id="i-wrap" viewBox="0 0 16 16"><path d="M2.5 4h11M2.5 8h9a2 2 0 0 1 0 4H8.5M10 10.5 8.5 12l1.5 1.5M2.5 12h3"/></symbol>
1027
1049
  <symbol id="i-chevron-down" viewBox="0 0 16 16"><path d="m4 6 4 4 4-4"/></symbol>
1028
1050
  <symbol id="i-help" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M6.6 6.4a1.5 1.5 0 1 1 2 1.4c-.4.2-.6.5-.6.9M8 10.8v.2"/></symbol>
1029
1051
  <symbol id="i-alert" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M8 5v3.5M8 10.8v.2"/></symbol>
@@ -1765,11 +1787,14 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
1765
1787
  <p class="purpose">Source code with an optional header and Copy, and a live example above it.</p>
1766
1788
  <dl class="guidance"><dt>Do</dt><dd>Use a code block for source with no live result. When the reader should see the result too, use the variant with a live example.</dd><dt>Don’t</dt><dd>The same language label on every block of a page. Put useful setup context above the block instead.</dd></dl>
1767
1789
  <div class="row"><h4>Source well</h4><div class="states">
1768
- <div class="state wide"><div class="code"><div class="code-head"><b>monitor.ts</b><span class="lang">TypeScript</span><button class="quiet-action copy" type="button" data-copy="code-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="monitor.ts"><code id="code-src"><span class="line"><span class="ln">1</span><span><span class="k">const</span> <span class="v">threshold</span> <span class="o">=</span> <span class="n">300</span> <span class="c">// ms at p95</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> <span class="v">name</span> <span class="o">=</span> <span class="s">'API p95 latency'</span></span></span><span class="line"><span class="ln">3</span><span><span class="k">export function</span> <span class="f">breached</span><span class="p">(</span><span class="v">p95</span><span class="p">:</span> <span class="t">number</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="v">p95</span> <span class="o">&gt;</span> <span class="v">threshold</span> <span class="p">}</span></span></span></code></pre></div><span class="caption">Header, line numbers, and Copy, live</span></div>
1790
+ <div class="state wide"><div class="code"><div class="code-head"><b>monitor.ts</b><span class="lang">TypeScript</span><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="code-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div></div><pre tabindex="0" role="region" aria-label="monitor.ts"><code id="code-src"><span class="line"><span class="ln">1</span><span><span class="k">const</span> <span class="v">threshold</span> <span class="o">=</span> <span class="n">300</span> <span class="c">// ms at p95</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> <span class="v">name</span> <span class="o">=</span> <span class="s">'API p95 latency'</span></span></span><span class="line"><span class="ln">3</span><span><span class="k">export function</span> <span class="f">breached</span><span class="p">(</span><span class="v">p95</span><span class="p">:</span> <span class="t">number</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="v">p95</span> <span class="o">&gt;</span> <span class="v">threshold</span> <span class="p">}</span></span></span></code></pre></div><span class="caption">Header, line numbers, and Copy, live</span></div>
1769
1791
  <div class="state wide" inert><div class="code compact"><pre><code><span class="line"><span>import { threshold } from './monitor'</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy import"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, with focus visible on Copy</span></div>
1770
1792
  </div></div>
1793
+ <div class="row"><h4>Wrap lines</h4><div class="states">
1794
+ <div class="state wide"><div class="code"><div class="code-head"><b>alert.ts</b><span class="lang">TypeScript</span><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="code-wrap-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div></div><pre tabindex="0" role="region" aria-label="alert.ts"><code id="code-wrap-src"><span class="line"><span class="ln">1</span><span><span class="k">export const</span> <span class="v">runbook</span> <span class="o">=</span> <span class="s">'https://docs.example.com/runbooks/api-latency/p95-breach-escalation-and-rollback-steps'</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> <span class="v">message</span> <span class="o">=</span> <span class="s">'API p95 latency stayed above the threshold for five minutes, so the on-call engineer is paged'</span></span></span></code></pre></div><span class="caption">Long lines, live: off by default, so they scroll; Wrap lines breaks them inside the panel</span></div>
1795
+ </div></div>
1771
1796
  <div class="row"><h4>With a live example</h4><div class="states">
1772
- <div class="state wide"><figure class="example"><div class="example-stage"><div style="display:flex;gap:var(--space-2);flex-wrap:wrap"><button class="btn secondary" type="button">Cancel</button><button class="btn" type="button">Save monitor</button></div></div><div class="code"><button class="quiet-action copy" type="button" data-copy="example-src" aria-label="Copy code" title="Copy code"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button><pre tabindex="0" role="region" aria-label="Example source"><code id="example-src"><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn secondary"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Cancel&lt;/<span class="g">button</span>&gt;</span></span><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Save monitor&lt;/<span class="g">button</span>&gt;</span></span></code></pre></div></figure><span class="caption">Live: the stage on the page background, the source below one hairline, and Copy in its corner</span></div>
1797
+ <div class="state wide"><figure class="example"><div class="example-stage"><div style="display:flex;gap:var(--space-2);flex-wrap:wrap"><button class="btn secondary" type="button">Cancel</button><button class="btn" type="button">Save monitor</button></div></div><div class="code"><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="example-src" aria-label="Copy code" title="Copy code"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><pre tabindex="0" role="region" aria-label="Example source"><code id="example-src"><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn secondary"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Cancel&lt;/<span class="g">button</span>&gt;</span></span><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Save monitor&lt;/<span class="g">button</span>&gt;</span></span></code></pre></div></figure><span class="caption">Live: the stage on the page background, the source below one hairline, and Copy in its corner</span></div>
1773
1798
  </div></div>
1774
1799
  <p class="sr-only" role="status" id="copy-status"></p>
1775
1800
  </section>
@@ -1785,7 +1810,7 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
1785
1810
  <dl class="guidance"><dt>Do</dt><dd>Use it for a shell command the reader runs, one command per line.</dd><dt>Don’t</dt><dd>A <code>$</code> typed into the command. CSS draws the prompt; a typed one is copied with the command.</dd></dl>
1786
1811
  <div class="row"><h4>Commands</h4><div class="states">
1787
1812
  <div class="state wide"><div class="code command compact"><pre tabindex="0" role="region" aria-label="Install command"><code id="cmd-install"><span class="line"><span>brew install filipgutica/tap/filip-stack</span></span></code></pre><button class="quiet-action copy" type="button" data-copy="cmd-install" aria-label="Copy install command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, live; the <code>$</code> is drawn by CSS</span></div>
1788
- <div class="state wide"><div class="code command"><div class="code-head"><b>Set up</b><button class="quiet-action copy" type="button" data-copy="cmd-setup"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="Set up commands"><code id="cmd-setup"><span class="line"><span>pnpm install --frozen-lockfile</span></span><span class="line"><span>pnpm check</span></span></code></pre></div><span class="caption">With a header, two lines</span></div>
1813
+ <div class="state wide"><div class="code command"><div class="code-head"><b>Set up</b><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="cmd-setup"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div></div><pre tabindex="0" role="region" aria-label="Set up commands"><code id="cmd-setup"><span class="line"><span>pnpm install --frozen-lockfile</span></span><span class="line"><span>pnpm check</span></span></code></pre></div><span class="caption">With a header, two lines</span></div>
1789
1814
  <div class="state wide" inert><div class="code command compact"><pre><code><span class="line"><span>filip-stack apply</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy apply command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Focus visible on Copy, in <code>--color-focus</code></span></div>
1790
1815
  </div></div>
1791
1816
  </section>
@@ -2101,6 +2126,12 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
2101
2126
  button.dataset.copied = '';
2102
2127
  ticks.set(button, setTimeout(restore, 1500));
2103
2128
  };
2129
+ // Wrap lines: a toggle on each multi-line code block. It keeps its name; aria-pressed carries the state.
2130
+ document.querySelectorAll('[data-wrap-toggle]').forEach((button) => button.addEventListener('click', () => {
2131
+ const on = button.getAttribute('aria-pressed') !== 'true';
2132
+ button.setAttribute('aria-pressed', String(on));
2133
+ button.closest('.code').toggleAttribute('data-wrap', on);
2134
+ }));
2104
2135
  document.querySelectorAll('[data-copy]').forEach((button) => button.addEventListener('click', async () => {
2105
2136
  const text = copyText(document.getElementById(button.dataset.copy));
2106
2137
  let ok = true;
@@ -72,7 +72,7 @@ Layer: Core.
72
72
 
73
73
  Layer: Core.
74
74
 
75
- - **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. The project trigger overrides the corner with `--radius-field`, because it opens a menu and does not act (see [Site header](#site-header)). The content is centred in the box. An icon-only action holds an SVG icon, never a text glyph such as ×, because a font draws a glyph's ink off the centre of its box. Give the shared recipe zero specificity (`:where()`), so each component sets the action's size, place, and resting colour.
75
+ - **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. The project trigger overrides the corner with `--radius-field`, because it opens a menu and does not act (see [Site header](#site-header)). The content is centred in the box. An icon-only action holds an SVG icon, never a text glyph such as ×, because a font draws a glyph's ink off the centre of its box. Give the shared recipe zero specificity (`:where()`), so each component sets the action's size, place, and resting colour. On a docs page, Copy, close, Full size, and the project trigger are `--control-md` (32px) tall, and `--control-touch` at tablet width.
76
76
  - **States.** Hover turns the text `--color-text` and fills `currentColor` at 6% over transparent, only where the pointer can hover (`@media (hover: hover)`). Pressed fills `currentColor` at 12%, with no sink. Focus-visible is the focus ring, inset where the parent clips. An open menu keeps its trigger at the 6% hover tint, below the press. The code block's Copy is `--color-muted` at rest and takes the block's text colour (`--color-code-text`) on hover and while its tick shows. A disabled quiet action follows the shared [disabled](#rules-for-every-control) rule.
77
77
  - **Do.** Use it for an action inside a component: Copy in a code block or command list, close in a dialog or drawer, Full size on a capture, the project trigger, and the overflow menu trigger. Use it too for any icon-only action that needs no fill at rest, such as the utilities in a sidebar footer or Help at the end of an action bar. In a row of controls it is a square at that row's control size, and it grows to `--control-touch` at tablet width.
78
78
  - **Don't.** A labelled action that stands on its own in the page, such as Save or Next. That is a button. A lone icon that needs a fill at rest, such as Send: that is an icon-only button, a circle.
@@ -301,7 +301,7 @@ Layer: Core.
301
301
 
302
302
  Layer: Core.
303
303
 
304
- - **Anatomy.** A floating layer centred on an `--color-overlay` backdrop, at most 512px wide and 672px tall. It has a header (title in 18px semibold with an optional muted description, and a 44px close button), a body that scrolls, and an optional footer on `--color-surface` with its actions at the end. Rules between the parts are `--color-border-subtle`. On phones it becomes a bottom sheet with rounded top corners.
304
+ - **Anatomy.** A floating layer centred on an `--color-overlay` backdrop, at most 512px wide and 672px tall. It has a header (title in 18px semibold with an optional muted description, and a 32px close button, `--control-touch` at tablet width), a body that scrolls, and an optional footer on `--color-surface` with its actions at the end. Rules between the parts are `--color-border-subtle`. On phones it becomes a bottom sheet with rounded top corners.
305
305
  - **Tokens.** `--color-surface-raised`, a transparent 1px border, `--radius-panel`, `--shadow-dialog`. The close button is a [quiet action](#quiet-action).
306
306
  - **States.** Closed and open. When focus lands on the dialog itself, it shows the focus ring.
307
307
  - **Do.** Use a dialog for a short task the reader must finish or cancel before the page continues, such as confirming a deletion. Title it with that task.
@@ -537,16 +537,17 @@ Layer: Core.
537
537
 
538
538
  - **Anatomy.** A frame that holds an optional header and the source panel.
539
539
  - **Frame.** `--color-surface-raised`, a 1px `--color-border-subtle` border, `--radius-panel`, and `--shadow-surface`. Its padding is `0 var(--space-1) var(--space-1)` under a header, and `var(--space-1)` on every side without one.
540
- - **Header.** At least 40px and `--text-xs`, on the frame with no fill and no rule below. It holds the title in semibold, the language in muted text, and a Copy button.
540
+ - **Header.** At least 40px and `--text-xs`, on the frame with no fill and no rule below. It holds the title in semibold, the language in muted text, and, at the end, Wrap lines then Copy, 4px (`--space-1`) apart.
541
541
  - **Source panel.** The `<pre>`: `--color-code`, a transparent 1px border, and `calc(var(--radius-panel) - var(--space-1))` corners (8px), so its curve is concentric with the frame's. It has `--space-4` padding, scrolls in both directions, is at most 32rem tall, and sets `--font-mono` at `--text-code` with a line height of 1.65. Line numbers are muted and right-aligned. Syntax uses the `--color-syntax-*` tokens.
542
- - **Compact.** The panel and the Copy button share one row, with no header, and a `--space-1` column gap. The panel fills the row's height, so it sits `--space-1` from the frame and from Copy on every side, and centres its line.
542
+ - **Compact.** The panel and the Copy button share one row, with no header, and a `--space-1` column gap. The panel fills the row's height, so it sits `--space-1` from the frame and from Copy on every side, and centres its line. Copy centres on the row.
543
+ - **Wrap lines.** Every block with a header, and every live example's source, has a Wrap lines toggle before Copy: an icon-only [quiet action](#quiet-action) (`#i-wrap`), 32×32 (`--control-md`) and 44×44 at tablet width, named "Wrap lines", with `aria-pressed` for its state; the name and title never change. It is off by default, so lines keep their shape and the panel scrolls sideways. On, the block takes `data-wrap`: each line's text breaks inside the panel (`white-space: pre-wrap`, `overflow-wrap: anywhere`, so long words and URLs break too), the line number stays on the first visual line, and Copy still copies the original lines. While on it takes `--color-code-text` and the quiet action's 6% open-menu tint; in forced colors a `Highlight` border and icon mark it, at rest and on hover. A compact block holds one line and has no toggle. The state is per block and is not saved.
543
544
  - **Phone text.** Set `text-size-adjust: 100%` (and `-webkit-text-size-adjust`) on the block, and align each line's items to the baseline, so iOS Safari does not enlarge one line.
544
- - **Copy.** Copies the code text only: no line numbers or prompts, and one line per row joined with newlines. A [quiet action](#quiet-action) at least 44×44 with an accessible name. It is `--color-muted` at rest (7.09:1 on the frame in light, 6.63:1 in dark), and `--color-code-text` on hover and while the tick shows, which the script marks with `data-copied`. Announce the result in a polite live region; in the compact variant the success message is visually hidden.
545
+ - **Copy.** Copies the code text only: no line numbers or prompts, and one line per row joined with newlines. A [quiet action](#quiet-action) at least 32×32 (`--control-md`), and 44×44 at tablet width, with an accessible name. It is `--color-muted` at rest (7.09:1 on the frame in light, 6.63:1 in dark), and `--color-code-text` on hover and while the tick shows, which the script marks with `data-copied`. Announce the result in a polite live region; in the compact variant the success message is visually hidden.
545
546
  - **Copy feedback.** This applies to every copy action: the code block's Copy, a token's Copy, and Copy link. On success, the icon turns into a plain tick (`#i-tick`) for 1.5s and then turns back. A second click within the 1.5s restarts the wait. The visible label, such as Copy, and the accessible name do not change, and no "Copied" text appears. The polite live region announces "Copied." or the failure. On failure, the icon does not change and the failure shows as before: a token's Copy shows "Copy failed" in place of its icon. Under reduced motion nothing changes, because the swap has no animation.
546
- - **States.** Rest, and focus-visible on Copy and on the `<pre>` when it scrolls. Copy takes the quiet action states, shows the tick after a copy, and announces "Copied." or a failure.
547
+ - **States.** Rest, Wrap lines on, and focus-visible on Copy, on Wrap lines, and on the `<pre>` when it scrolls. Copy takes the quiet action states, shows the tick after a copy, and announces "Copied." or a failure.
547
548
  - **Do.** Use a code block for source with no live result. When the reader should see the result too, use the variant with a live example.
548
549
  - **Don't.** The same language label on every block of a page. Put useful setup context above the block instead.
549
- - **Keyboard and screen reader.** The `<pre>` is focusable when it scrolls. Its focus ring and the Copy button's ring are inset, because the block clips its content. The `<pre>` ring follows the panel's 8px corners.
550
+ - **Keyboard and screen reader.** The `<pre>` is focusable when it scrolls. With a header, Tab order is Wrap lines, then Copy, then the `<pre>`; a compact block puts the `<pre>` before Copy. The focus rings on Wrap lines, Copy, and the `<pre>` are inset, because the block clips its content. The `<pre>` ring follows the panel's 8px corners.
550
551
  - **Motion.** None: the block is static, and Copy changes as a quiet action does.
551
552
  - **Forced colors.** The shadow drops, and the frame's border and the panel's transparent border draw as system edges. Syntax colours take the system text colour, so code reads as plain text.
552
553
 
@@ -556,9 +557,9 @@ Layer: Core.
556
557
  - **Tokens.** Frame edge `--color-border-subtle` and corners `--radius-panel`. Stage `--color-bg`. Hairline `--color-border-subtle`.
557
558
  - **Stage.** The stage sits on the page background, not in a well or a panel. This is a named exception to the container [depth](DESIGN.md#depth) tier: a preview shows each component on the surface it sits on in a page; see [decisions](decisions.md).
558
559
  - **Source.** Inside the frame the code block has no radius, border, padding, or shadow of its own, and it spans the frame's full width, not `--measure`. It takes `--color-code`, and its panel is flush with no corners, so the source fills the frame below the hairline.
559
- - **Copy.** Icon-only and named "Copy code", in the source's top right corner. It comes before the `<pre>` in DOM order, so the reader reaches it before the code.
560
+ - **Copy.** Icon-only and named "Copy code", in the source's top right corner, after Wrap lines. It comes before the `<pre>` in DOM order, so the reader reaches it before the code.
560
561
  - **States.** The frame has no states. Components on the stage show their own states.
561
- - **Keyboard and screen reader.** Tab order is the stage's controls, then Copy, then the `<pre>`. Name the `<pre>` for its role, for example "Example source", when it scrolls. Focus rings on Copy and the `<pre>` are inset, because the frame clips its content.
562
+ - **Keyboard and screen reader.** Tab order is the stage's controls, then Wrap lines, then Copy, then the `<pre>`. Name the `<pre>` for its role, for example "Example source", when it scrolls. Focus rings on Wrap lines, Copy, and the `<pre>` are inset, because the frame clips its content.
562
563
  - **Motion.** None of its own.
563
564
  - **Responsive.** The frame takes its container's width. The stage stays above the source at every width. On phones the stage padding is `--space-6` by `--space-4`. Wide content scrolls inside the stage or the `<pre>`, never the page.
564
565
  - **Forced colors.** The frame edge and the hairline draw in the system colour.
@@ -595,7 +596,7 @@ Layer: Identity.
595
596
 
596
597
  Layer: Identity.
597
598
 
598
- - **Anatomy.** A static header at least 64px tall on `--color-bg` with a solid 1px `--color-text` rule below it. At the start is the project switcher: a `<details>` whose summary, a [quiet action](#quiet-action), shows the mono, semibold project name after a `~/` mark in `--color-project` (drawn by CSS, so it is not read), then a chevron. It keeps the quiet-action tint, but it opens a menu and does not act, so it takes the 8px field corner (`--radius-field`), as a select does. Its menu is a floating layer, with the dialog's tokens, listing the shared project registry in the order it defines, as navigation rows with concentric 8px corners (`calc(var(--radius-panel) - var(--space-1))`), with the current project marked `aria-current="page"`. At the end are the site links and the appearance picker: an icon-only segmented control at `lg`. The site links are a [navigation strip](#navigation-list) of rows 44px tall (`--control-touch`). A link to a page inside the site takes `aria-current="page"` on that page, with the current-page recipe.
599
+ - **Anatomy.** A static header at least 64px tall on `--color-bg` with a solid 1px `--color-text` rule below it. At the start is the project switcher: a `<details>` whose summary, a [quiet action](#quiet-action), shows the mono, semibold project name after a `~/` mark in `--color-project` (drawn by CSS, so it is not read), then a chevron. It keeps the quiet-action tint, but it opens a menu and does not act, so it takes the 8px field corner (`--radius-field`), as a select does. Its menu is a floating layer, with the dialog's tokens, listing the shared project registry in the order it defines, as navigation rows with concentric 8px corners (`calc(var(--radius-panel) - var(--space-1))`), with the current project marked `aria-current="page"`. At the end are the site links and the appearance picker: an icon-only segmented control at `lg`. The site links are a [navigation strip](#navigation-list) of rows `--control-md` tall (32px), and `--control-touch` at tablet width. A link to a page inside the site takes `aria-current="page"` on that page, with the current-page recipe.
599
600
  - **Position.** Every family site, this design system's site included, starts its header with the project switcher. It is the same on every page: never a breadcrumb or a page title, which go above the page's h1 as [breadcrumbs](#breadcrumbs), and the first breadcrumb is the way back to the site's home page. The links sit at the same x on every page, and the current link is as wide as it is on other pages (see the [horizontal strip](#navigation-list)). A header that puts its links right after the switcher, as this design system's site does, is a grid at `min-width: 801px` (`auto minmax(0, 1fr) auto`), so where the links start never depends on the page.
600
601
  - **States.** The project menu is closed or open; while open, its summary keeps the quiet action's hover tint. Site links take the navigation row states.
601
602
  - **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
@@ -42,10 +42,11 @@ Each entry records a choice this language made, the options it rejected, and why
42
42
  | Tab glide | Core | The selected tab's fill is a `::before` layer that glides between tabs like the segmented thumb: `glide-left` and `glide-right`, 260ms leading and 300ms trailing, with CSS `ease`. No glide on first render or under reduced motion, and no layer in forced colors. The owner chose it at Gate M. | The fill jumping from tab to tab, unlike the segmented control beside it. | glide and reduced motion: `tests/catalogue/catalogue.spec.ts` "the tab fill glides to the new tab", "the tab fill moves at once" |
43
43
  | Segmented touch size | Core | At tablet width a segmented control of any size sets `--item` to `--control-touch` (unsized only until 2026-11-23). | Growing only the buttons' `min-height`: `--item` stayed at `--control-md`, so icon-only options were 36×44 ovals (found at Gate M). | No test yet |
44
44
  | Compact controls | Core | `--control-sm` is 28px (`1.75rem`), Astryx's small element height (`--size-element-sm`). Buttons pad `--space-2` (8px) at `sm` with a 6px icon gap, 10px at `md`, and `--space-3` at `lg`. Badges pad 2px by 6px with a 4px dot gap. A new [chip](components.md#chip) is 24px tall with `--space-2` padding. The owner chose this on 2026-11-22 from a rendered comparison of today's controls, the proposal, and Astryx, after finding the board busy. | Astryx's 12px button padding at every size: the owner asked for narrower controls, and the height cut alone left `sm` buttons as wide as before. Astryx's 12px `sm` label: personal work keeps IBM Plex at `--text-sm` (13px). Astryx's solid status badges: status surfaces are soft tints (DESIGN.md, Theme and color), and solid fills are louder than a busy screen can take. Astryx's semibold pressed option: the thumb and accent text already mark it, and a weight change needs a hidden copy of each label to stop the width from shifting. Astryx's 0.98 press scale: the 1px sink is part of quiet depth. | token value: `tests/token-values.test.mjs` "tokens.css preserves DS-1 values except …"; recipes: `tests/catalogue/catalogue.spec.ts` and the ui-sdk parity test `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" |
45
- | Control size scale | Core | `--control-sm`, `--control-md`, and `--control-lg` are 28px, 32px, and 36px (`1.75rem`, `2rem`, `2.25rem`), Astryx's element sizes (`--size-element-sm`, `-md`, `-lg`). A control with no size is `md`. A separate `--control-touch`, 44px (`2.75rem`), is what controls of every size grow to at tablet width, and it sizes the docs-site links and icon actions that were `--control-lg` at every width; only the catalogue's inert size specimens keep their sizes there. The owner chose this on 2026-11-23: 36px `md` felt big beside 28px `sm`. | The 28 / 36 / 44px scale (until 2026-11-23): `md` sat 8px above `sm`, so a medium control stood out in a dense screen, and `lg` doubled as the touch size. Astryx's 32px `md` and 36px `lg` were first rejected on 2026-11-22 because `md` would move every form and `lg` served touch; the owner's feedback on `md`, and a separate touch token, removed both reasons. Making `sm` the default: documentation and product pages would need `md` on every control, and the gap to `md` is now 4px. Growing only unsized controls at tablet width (the rule before): an application screen sets every control at `sm`, so its touch targets would stay 28px, and an explicit `lg` would drop from 44px to 36px. | token values: `tests/token-values.test.mjs` "tokens.css preserves DS-1 values except …"; rendered sizes and touch growth at 1280, 800, and 375px: `tests/catalogue/catalogue.spec.ts` "<page> renders control sizes at <width>px", and `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue at 375px" |
45
+ | Control size scale | Core | `--control-sm`, `--control-md`, and `--control-lg` are 28px, 32px, and 36px (`1.75rem`, `2rem`, `2.25rem`), Astryx's element sizes (`--size-element-sm`, `-md`, `-lg`). A control with no size is `md`. A separate `--control-touch`, 44px (`2.75rem`), is what controls of every size grow to at tablet width; only the catalogue's inert size specimens and the phone header samples keep their sizes there. On desktop, docs-site header links and quiet actions (Copy, close, Full size, the project trigger) are `--control-md`, and terminal-capture tabs take the tab box. The owner chose this on 2026-11-23: 36px `md` felt big beside 28px `sm`. On 2026-11-24 the owner found the 44px desktop links, tabs, and quiet actions too thick. | The 28 / 36 / 44px scale (until 2026-11-23): `md` sat 8px above `sm`, so a medium control stood out in a dense screen, and `lg` doubled as the touch size. Astryx's 32px `md` and 36px `lg` were first rejected on 2026-11-22 because `md` would move every form and `lg` served touch; the owner's feedback on `md`, and a separate touch token, removed both reasons. Making `sm` the default: documentation and product pages would need `md` on every control, and the gap to `md` is now 4px. Growing only unsized controls at tablet width (the rule before): an application screen sets every control at `sm`, so its touch targets would stay 28px, and an explicit `lg` would drop from 44px to 36px. `--control-touch` for docs-site links and icon actions at every width (2026-11-23 to 2026-11-24): on desktop they stood 12px taller than every 32px control beside them. | token values: `tests/token-values.test.mjs` "tokens.css preserves DS-1 values except …"; rendered sizes and touch growth at 1280, 800, and 375px: `tests/catalogue/catalogue.spec.ts` "<page> renders control sizes at <width>px", `tests/site/site.spec.ts` "links and icon actions keep their sizes and hit areas", and `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue at 375px" |
46
46
  | Segmented track inset | Core | The track is the control height and insets its options 2px from its outer edge (its 1px border and 1px of padding), with 2px between options, as Astryx's segmented control does (`SegmentedControl.tsx`: 2px padding and gap; `SegmentedControlItem.tsx`: item height the element height minus 4px, 8px padding at `sm`, 12px at `md` and `lg`). Each option is its own thumb, with `calc(var(--radius-control) - var(--inset))`, 6px, measured from the outer edge because the border is part of the track's visible curve: the one control corner below 8px, a named exception to the row corner. The owner asked for it on 2026-11-22 after the 28px `sm` filter's thumb looked off centre in its 30px track. Options set `line-height: 1`, so the label sits centred: the inherited 1.6 put IBM Plex 1.8px above centre in a 24px `sm` option (Chromium). | A thumb inset 2px inside each full-height option (the rule until 2026-11-22): the track was 2px taller than the control (34px beside a 32px button at `sm`, then 30px beside 28px), and the thumbs sat 4px apart. The mockups' nested 12px track around 8px rows: at 28px tall, a 4px inset leaves a 20px option, which is cramped. Measuring from the padding edge (7px): the visible curve is the border's, so 7px reads as a corner that does not follow the track. | thumb centred and track height equals the same-size button: `tests/catalogue/catalogue.spec.ts`; ui-sdk parity: `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" |
47
47
  | Application density | Core | In an application screen, buttons, fields, and segmented controls are `sm` (28px), the main action included, and chips stay 24px. The main action stands out by its primary fill. The owner dropped the `md` main action on 2026-11-23: `md` felt big beside `sm`. Rows are `--row` tall, with `--text-sm` body text and `--text-xs` metadata. Documentation and product pages keep `md`. At tablet width every touch target grows to `--control-touch`, at every size. The owner chose this on 2026-11-22 from the board mockups. | Toolbar controls alone at `sm`, the rule before: forms and actions inside a pane stayed `md`, so one screen mixed two heights. `md` everywhere: the board read as busy. One `md` main action per screen (the first version of this rule): it felt big next to `sm` controls. | No test yet |
48
48
  | Tab density | Core | A tab has the button's box: at least `--control-md` (32px) tall, 10px inline padding, no block padding, and line height 1; `data-size="sm"` tabs, for app screens, are 28px with 8px padding. Tabs grow to `--control-touch` at tablet width. The list keeps its 4px padding, which keeps the selected tab's shadow whole where the list clips. The owner asked for narrower tabs with less dead space on 2026-11-24. | The tab before: `--space-2` `--space-3` padding with line height 1.6 made a 38px tab, taller than every control beside it, and 84px wide for "Overview". 2px list padding: it clips the selected tab's `--shadow-nav-current`, which reaches 4px below the tab. | heights: `tests/catalogue/catalogue.spec.ts` "renders control sizes" (tabs at their exact control height) |
49
+ | Code wrap toggle | Core | Every multi-line code block (one with a header, or a live example's source) has a Wrap lines toggle before Copy: an icon-only quiet action with a fixed name and `aria-pressed`. It is off by default, per block, and not saved. Astryx offers wrapping only as a caller prop (`CodeBlock` spec: "optional wrapping"); this departs from it with a reader control, as T3 Code's code blocks have. The owner asked for it on 2026-11-24. | Wrapping by default: it would reflow every code block on the five sites, and the spec has the panel scroll. A name that flips between Enable and Disable line wrap, as T3 Code's tooltip does: with `aria-pressed` it would announce the state twice. Saving the choice: one more stored setting for a per-block reading aid. A toggle on compact blocks: they hold one line. | toggle, wrapping, and copy: `tests/catalogue/catalogue.spec.ts` "Wrap lines wraps a code block, and Copy still copies its lines" |
49
50
  | Astryx as the reference system | Core | When a value or behaviour is not decided here, start from Astryx's (`meta/astryx`, MIT, read at `7032abf`), and record any departure in this file. Take the idea and the values, never the code. The identity stays this system's: IBM Plex, the theme hues, quiet depth, and the forced-colors rules. The owner chose this on 2026-11-22 so the system stops re-deciding settled questions; the quiet action fill, the focus ring, field focus, the radius scale, and the compact controls already follow Astryx. React apps keep ui-sdk for behaviour: `ui-sdk.css` draws it. | Astryx's React components in React apps, themed with these tokens: it reverses the board's ui-sdk choice, and the Vue library could not use them. Making the design system a wrapper of ui-sdk: `@filipgutica/ui` (Vue) and the static sites use the design system, ui-sdk is React-only here and in beta, and `ui-sdk.css` already draws ui-sdk's parts. Deciding each value from scratch: it re-decided questions Astryx has answered, and the results drifted toward it anyway. | No test: a working rule for authors |
50
51
  | Conversation components | Core | Message row, message group, hover toolbar, thread panel, composer, tool-call disclosure, mention, and chip are specified here before any app builds them, so the board's React code and any later Vue component draw from one spec. They follow the board mockups (2026-11-22) and Slack, T3 Code, and ChatGPT patterns: flat rows with no bubble; one author's messages within about 5 minutes grouped under one avatar; actions in a hover toolbar that is one Tab stop (`role="toolbar"`, arrow keys between its actions) and never shown on touch; tool output collapsed to one line in a native `<details>`; a composer that is one field with an inline send button; a thread in a side pane, resizable from 20rem to 40rem by drag or arrow keys and full width at tablet width. Conversation sits after Navigation, because its parts reuse the selected row and the overflow menu. A message takes one tag style, `--color-nav-current-text` semibold, only on a message that needs the reader. A mention is static text, not a link. | Bubbles or cards around messages: the board read as busy, and Slack, T3 Code, and ChatGPT use flat rows. A row of buttons on every message: it repeats the same actions down the stream. A toolbar as a `role="group"`: three Tab stops for each message in a long stream. A thread in a dialog: it hides the channel the reader is replying about. Building the components in the board app first: the app's code would become the only definition. | rendered corners by role and the conversation keyboard paths: `tests/catalogue/catalogue.spec.ts`; parts, groups, and states agreement: `tests/component-parts.test.mjs` and `tests/design-foundations.test.mjs` |
51
52
  | Phone header | Core | The family shell, option A, which the owner chose on 2026-11-11: the site's header matches the other family sites. At tablet width the static header has two rows, the project switcher and the appearance control, then the Pages strip. Where both do not fit, as at 320px, the appearance control wraps to its own row at the start, as UiSiteHeader does on PluginBench and Filip Stack, and the project name never truncates. The rule below the header is the family's solid `--color-text` line. Just below it, at the start, the labelled trigger ("Components: By purpose") opens the drawer from the left, the side it sits on. The drawer is titled with the rail's name and holds Find and the rail's groups. `/` opens it with Find focused. Without JavaScript nothing moves. | The Gate M single sticky row with the site name, then icon-only Find and Menu buttons, with the pages and appearance in the Menu drawer: the site had no way to the other family sites, and the Menu button sat at the right while the drawer slid in from the left. Option B, keeping that row and sliding the drawer in from the right: it kept the site apart from the other seven family sites. Truncating the project name at 320px so both controls shared row 1: the family wraps the picker instead, and the name should never truncate. | `tests/site/site.spec.ts` "the switcher and appearance share the first row, then the pages, then the trigger", "the switcher and appearance take a row each, then the pages, then the trigger", "every clipped strip link shows at least 16px", "the trigger opens the drawer from the left edge, titled with the rail and holding Find and the rail only", "the trigger label follows the current section as the page scrolls"; `tests/catalogue/catalogue.spec.ts` "the trigger opens the drawer on the current row, and a link closes it and focuses the target" |
@@ -56,7 +57,7 @@ Each entry records a choice this language made, the options it rejected, and why
56
57
  | One pager per page | Core | One pager at the end of `main`, for the sequence of pages. | A pager per component: on one page with a sticky rail it adds 26 repeated blocks. | No test yet |
57
58
  | Header that stays still | Core | Option A: the design system's site header is the same on every page. The project switcher `~/ Design system` starts it, as on every family site; the Pages strip follows it, and Appearance, the icon-only segmented control, sits at the end. The first breadcrumb leads back to Overview. Until 2026-11-11 the start was the site name as a link to Overview. At `min-width: 801px` the header is a grid (`auto minmax(0, 1fr) auto`), so the links start at the same x on every page. Each strip link reserves its width at the current row's weight (a hidden `data-label` copy on the label's line), so becoming current moves nothing; under forced colors the current row's padding gives up 2px for its border. A link reached with Tab scrolls clear of the strip's fades. The owner chose it on 2026-11-11. | The flex row that centred the strip between the start item and Appearance: the start item was a breadcrumb that changed width from page to page, so the links started at x=674 on Overview and 451 to 465 elsewhere, and the current link's medium weight added 1–2px. Option B, the strip at the end beside Appearance: the owner chose A. A hidden copy in a 0-height block or a float: the block ended the label's text-box trim, so the label sat 3.4px high, and a float added its width to the label's. | `tests/site/site.spec.ts` "the header links sit at the same x on every page, and the current link keeps its width, with forced colors ${forcedColors}"; `tests/catalogue/catalogue.spec.ts` "a header link reached with Tab scrolls clear of the strip’s faded edges" |
58
59
  | Breadcrumb above the title | Core | Every site page but the home page has a breadcrumb right above its h1, and the header keeps the project switcher. Separators, and the phone back mark, are chevrons drawn with two borders of a turned box. The trail sits on its text line, level with the Find field at 1280px, and shows in full on phones when it has two crumbs, as in the approved mock. The owner chose it with header option A on 2026-11-11. | The breadcrumb as the header's start item: it read as the page title and moved the strip. The depth-3 rule it replaces kept trails off a two-level site, which then had only the header to show the way back. A `/` or `‹` glyph with empty alternative text: the owner chose chevrons, and a chevron drawn with borders holds no text in any engine. | `tests/site/site.spec.ts` "the breadcrumb sits above the h1 on every page but Overview, with no separator text", "the breadcrumb lines up with Find, and shows both crumbs on phones" |
59
- | Header current page | Core | Header links are navigation rows 44px tall, and a link to the current page takes `aria-current="page"` with the current-page recipe. | Muted text links with no current state: the header did not show which page the reader was on. | No test yet |
60
+ | Header current page | Core | Header links are navigation rows `--control-md` tall (32px), `--control-touch` at tablet width, and a link to the current page takes `aria-current="page"` with the current-page recipe. | Muted text links with no current state: the header did not show which page the reader was on. 44px rows at every width (until 2026-11-24): the owner found them too thick beside the 32px controls. | heights: `tests/site/site.spec.ts` "links and icon actions keep their sizes and hit areas" |
60
61
  | One scroll offset | Core | `html { scroll-padding-top }` is the only offset: any sticky bar plus `--space-4`. The location tracker reads the same value. | `scroll-margin-top` on each section: every page set its own value, and the tracker needs one inset to compare against. | No test yet |
61
62
  | Specimen captions | Core | Every catalogue specimen has a caption that names its state, such as "Disabled" or "Rest, live". The owner chose it at Gate M. | Captions only on some specimens: a disabled or static specimen with no caption could read as broken. | every specimen captioned: `tests/catalogue/catalogue.spec.ts` "every specimen has a caption" |
62
63
  | Focus ring | Core | One accent ring for every role but fields: `outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset)` (2px, 3px), with no glow, over the control's own shadow. Variants recolour it with `outline-color` only. `--color-focus` is `--color-accent`: 6.26:1 on the page, 5.72:1 on a surface, and 6.61:1 on a raised surface in light; 8.31:1, 7.85:1, and 7.39:1 in dark. Commands use the normal code block ring: the accent on `--color-code` (5.72:1 in light and 7.85:1 in dark). Terminal captures use `--color-project-dark`: 8.53:1 on the terminal plate. Inspired by Astryx `focusDefaults` (`utils/focusOutline.stylex.ts`), which writes the width, accent colour, and offset once from tokens. The user chose it from rendered demos and accepted an accent ring around primary, danger, and selected controls. | The neutral ink ring (`--color-focus: var(--color-text)`, offset 2px), the previous choice; the user preferred the accent ring with a 3px gap in rendered demos. Before that, an accent ring on controls and a `--color-link` ring on links, tabs, and navigation rows: two ring hues, cyan around the purple selected tab and current row. A ring in each control's own tone, such as `--color-error` around the danger button: every role needs its own ring rule, and the ring changes colour from control to control. A 2px ring with a 6px accent halo felt jarring, and a 1.5px ring was hard to see; Chromium drew it 1px at 1x. | one accent ring: `tests/design-foundations.test.mjs` "every focus ring is the one accent ring: no per-role ring colour or hand-written ring on any page or in tokens.css"; ring contrast: `tests/design-foundations.test.mjs` "the accent focus ring reaches 3:1 on --color-bg, --color-surface, and --color-surface-raised in both themes" |
@@ -12,7 +12,7 @@
12
12
  .header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
13
13
  .brand { color: var(--color-text); font-weight: var(--weight-semibold); }
14
14
  .header nav { display: flex; gap: var(--space-6); }
15
- .header a { display: inline-flex; align-items: center; min-height: var(--control-touch); font-size: var(--text-sm); }
15
+ .header a { display: inline-flex; align-items: center; min-height: var(--control-md); font-size: var(--text-sm); }
16
16
  .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
17
17
  .sidebar { position: sticky; top: var(--space-6); align-self: start; display: grid; gap: var(--space-1); padding-block: var(--space-6); }
18
18
  /* Navigation rows: components.html#navigation-list, unchanged. Only the rail's placement and spacing are local. */
@@ -42,15 +42,15 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
42
42
  /* Compact code block: components.html#code-block, unchanged. */
43
43
  .code { width: 100%; max-width: var(--measure); min-width: 0; overflow: hidden; padding: var(--space-1); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-surface-raised); color: var(--color-code-text); box-shadow: var(--shadow-surface); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
44
44
  /* Copy is a quiet action; this sets its size and place. */
45
- .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-touch); min-height: var(--control-touch); margin-left: auto; padding: var(--space-1) 0.375rem; color: inherit; }
45
+ .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-md); min-height: var(--control-md); margin-left: auto; padding: 0 0.375rem; color: inherit; }
46
46
  /* Copy is muted at rest. The code block has its own palette, so on hover and while the tick shows it takes the block's text colour. */
47
- .code .copy { color: var(--color-muted); }
48
- .code .copy[data-copied] { color: var(--color-code-text); }
49
- .code .copy.is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
50
- @media (hover: hover) { .code .copy:hover:where(:not(:disabled)) { color: var(--color-code-text); } }
47
+ .code :is(.copy, .wrap-toggle) { color: var(--color-muted); }
48
+ .code :is(.copy[data-copied], .wrap-toggle[aria-pressed="true"]) { color: var(--color-code-text); }
49
+ .code :is(.copy, .wrap-toggle).is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
50
+ @media (hover: hover) { .code :is(.copy, .wrap-toggle):hover:where(:not(:disabled)) { color: var(--color-code-text); } }
51
51
  /* Inset: the code block clips its content. */
52
52
  .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
53
- .code .copy.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
53
+ .code :is(.copy, .wrap-toggle).quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
54
54
  /* The source is an inset panel. It sits --space-1 inside the frame, so its corners are concentric with the frame's. */
55
55
  .code pre { margin: 0; padding: var(--space-4); overflow: auto; max-height: 32rem; border: 1px solid transparent; border-radius: calc(var(--radius-panel) - var(--space-1)); background: var(--color-code); font-size: var(--text-code); line-height: 1.65; tab-size: 2; }
56
56
  /* Each line is a baseline-aligned row, so a prompt or line number sits on the text's baseline. */
@@ -59,6 +59,8 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
59
59
  /* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
60
60
  .code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
61
61
  .code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
62
+ /* Copy keeps its control height and centres on the panel's line. */
63
+ .code.compact > .copy { align-self: center; }
62
64
 
63
65
  /* The prompt is drawn by CSS, so copied and spoken text omit it. */
64
66
  .code.command .line::before { content: "$ " / ""; flex: none; white-space: pre; color: var(--color-accent); user-select: none; }
@@ -73,7 +75,7 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
73
75
  .definitions dt { font-family: var(--font-mono); font-size: var(--text-sm); }
74
76
  .definitions dd { margin: 0; color: var(--color-muted); }
75
77
  footer { padding-block: var(--space-6); border-top: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-sm); }
76
- @media (max-width: 800px) { .navlist a { min-height: var(--control-touch); } .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .sidebar { position: static; display: flex; flex-wrap: wrap; gap: var(--space-2); padding-block: var(--space-3); border-bottom: 1px solid var(--color-border-subtle); } .sidebar a { padding-inline: var(--space-2); } main { padding-top: var(--space-6); } .definitions { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } .definitions dd { margin-bottom: var(--space-3); } }
78
+ @media (max-width: 800px) { .navlist a, .header a { min-height: var(--control-touch); } .copy { min-width: var(--control-touch); min-height: var(--control-touch); } .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .sidebar { position: static; display: flex; flex-wrap: wrap; gap: var(--space-2); padding-block: var(--space-3); border-bottom: 1px solid var(--color-border-subtle); } .sidebar a { padding-inline: var(--space-2); } main { padding-top: var(--space-6); } .definitions { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } .definitions dd { margin-bottom: var(--space-3); } }
77
79
  @media (max-width: 640px) { .frame { width: calc(100% - var(--space-8)); } main { gap: var(--space-8); } }
78
80
  </style>
79
81
  </head>
@@ -10,7 +10,7 @@
10
10
  .header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
11
11
  .brand { color: var(--color-text); font-weight: var(--weight-semibold); }
12
12
  .header nav { display: flex; gap: var(--space-6); }
13
- .header a { display: inline-flex; align-items: center; min-height: var(--control-touch); font-size: var(--text-sm); }
13
+ .header a { display: inline-flex; align-items: center; min-height: var(--control-md); font-size: var(--text-sm); }
14
14
  .hero { display: grid; gap: var(--space-8); padding-block: var(--space-12); }
15
15
  .copy { display: grid; justify-items: start; gap: var(--space-4); }
16
16
  h1, .workflow > h2 { font-family: var(--font-mono); }
@@ -25,7 +25,7 @@ h1 { max-width: 18ch; font-size: var(--text-display); letter-spacing: var(--trac
25
25
  .btn:not(.secondary, .ghost, .danger, .text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: var(--color-button-hover); }
26
26
  .btn:not(.text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { --depth: var(--shadow-sink); transform: translateY(1px); }
27
27
  a.btn { text-decoration: none; }
28
- .actions > a { min-height: var(--control-touch); display: inline-flex; align-items: center; }
28
+ .actions > a { min-height: var(--control-md); display: inline-flex; align-items: center; }
29
29
  figure { margin: 0; min-width: 0; }
30
30
  /* Product evidence sits in a well: one quiet frame, no frame around it. */
31
31
  .product-view { background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); overflow: hidden; }
@@ -56,7 +56,7 @@ figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(-
56
56
  .evidence-copy h3 { font-size: var(--text-lg); }
57
57
  .evidence-copy p { color: var(--color-muted); font-size: var(--text-reading); }
58
58
  footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-6); border-top: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-sm); }
59
- @media (max-width: 800px) { h1 { font-size: var(--text-display-sm); } .workflow > h2 { font-size: var(--text-2xl); } .hero { padding-block: var(--space-8); } .board { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); } .evidence { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } .checks { padding-inline: var(--space-4); } .workflow { padding-block: var(--space-8); } .view-header { padding: var(--space-4); } .btn:not([data-specimen="size"] *) { min-height: var(--control-touch); } }
59
+ @media (max-width: 800px) { h1 { font-size: var(--text-display-sm); } .workflow > h2 { font-size: var(--text-2xl); } .hero { padding-block: var(--space-8); } .board { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); } .evidence { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } .checks { padding-inline: var(--space-4); } .workflow { padding-block: var(--space-8); } .view-header { padding: var(--space-4); } .btn:not([data-specimen="size"] *), .header a, .actions > a { min-height: var(--control-touch); } }
60
60
  @media (max-width: 640px) { .frame { width: calc(100% - var(--space-8)); } }
61
61
  </style>
62
62
  </head>
@@ -288,25 +288,39 @@
288
288
  .code-head b { font-weight: var(--weight-semibold); }
289
289
  .code-head .lang { color: var(--color-muted); }
290
290
  /* Copy is a quiet action; this sets its size and place. */
291
- .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-touch); min-height: var(--control-touch); margin-left: auto; padding: var(--space-1) 0.375rem; color: inherit; }
292
- /* Copy is muted at rest. The code block has its own palette, so on hover and while the tick shows it takes the block's text colour. */
293
- .code .copy { color: var(--color-muted); }
294
- .code .copy[data-copied] { color: var(--color-code-text); }
295
- .code .copy.is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
296
- @media (hover: hover) { .code .copy:hover:where(:not(:disabled)) { color: var(--color-code-text); } }
291
+ .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-md); min-height: var(--control-md); margin-left: auto; padding: 0 0.375rem; color: inherit; }
292
+ /* Copy and Wrap lines are muted at rest. The code block has its own palette, so on hover, while the tick
293
+ shows, and while Wrap lines is on they take the block's text colour. */
294
+ .code :is(.copy, .wrap-toggle) { color: var(--color-muted); }
295
+ .code :is(.copy[data-copied], .wrap-toggle[aria-pressed="true"]) { color: var(--color-code-text); }
296
+ .code :is(.copy, .wrap-toggle).is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
297
+ @media (hover: hover) { .code :is(.copy, .wrap-toggle):hover:where(:not(:disabled)) { color: var(--color-code-text); } }
298
+ /* The block's actions sit together at the end of the header, or in the corner beside the source. */
299
+ .code-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
300
+ .code-actions > .copy { margin-left: 0; }
301
+ /* Wrap lines is an icon-only quiet action and a toggle: while on it keeps the open-menu tint. */
302
+ .wrap-toggle { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; }
303
+ :where(.wrap-toggle[aria-pressed="true"]) { background: color-mix(in srgb, currentColor 6%, transparent); }
304
+ /* Forced colors: a Highlight border and icon mark it on, at rest and on hover. */
305
+ @media (forced-colors: active) { .code .wrap-toggle[aria-pressed="true"] { border-color: Highlight; } .wrap-toggle[aria-pressed="true"] .icon { color: Highlight; } }
297
306
  /* Inset: the code block clips its content. */
298
307
  .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
299
- .code .copy.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
308
+ .code :is(.copy, .wrap-toggle).quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
300
309
  /* The source is an inset panel. It sits --space-1 inside the frame, so its corners are concentric with the frame's. */
301
310
  .code pre { margin: 0; padding: var(--space-4); overflow: auto; max-height: 32rem; border: 1px solid transparent; border-radius: calc(var(--radius-panel) - var(--space-1)); background: var(--color-code); font-size: var(--text-code); line-height: 1.65; tab-size: 2; }
302
311
  /* Each line is a baseline-aligned row, so a prompt or line number sits on the text's baseline. */
303
312
  .code .line { display: flex; align-items: baseline; min-height: 1.65em; }
304
313
  .code .line > span { white-space: pre; }
314
+ /* With Wrap lines on, each line breaks inside the panel, long words and URLs included, and nothing scrolls
315
+ sideways. The line number stays on the first visual line. */
316
+ .code[data-wrap] .line > span:not(.ln) { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
305
317
  .code .ln { min-width: 2.5em; padding-right: 1em; flex: none; text-align: right; color: var(--color-muted); user-select: none; }
306
318
  .code .k { color: var(--color-syntax-keyword); } .code .s { color: var(--color-syntax-string); } .code .n { color: var(--color-syntax-number); } .code .c { color: var(--color-syntax-comment); }
307
319
  /* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
308
320
  .code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
309
321
  .code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
322
+ /* Copy keeps its control height and centres on the panel's line. */
323
+ .code.compact > .copy { align-self: center; }
310
324
 
311
325
  /* Command plate: components.html#command-plate, unchanged. */
312
326
  /* The prompt is drawn by CSS, so copied and spoken text omit it. */
@@ -424,6 +438,8 @@
424
438
  .segmented button { min-width: calc(var(--item) - 2 * var(--inset)); }
425
439
  .btn:not([data-specimen="size"] *), .navlist a, .tab { min-height: var(--control-touch); }
426
440
  .search { height: var(--control-touch); }
441
+ .copy { min-width: var(--control-touch); min-height: var(--control-touch); }
442
+ .wrap-toggle { width: var(--control-touch); min-height: var(--control-touch); }
427
443
  .check:not([data-specimen="size"] *) { min-height: var(--control-touch); }
428
444
  .shell { grid-template-columns: minmax(0, 1fr); height: auto; }
429
445
  main { overflow: visible; }
@@ -469,6 +485,7 @@
469
485
  <symbol id="i-plus" viewBox="0 0 16 16"><path d="M8 3.5v9M3.5 8h9"/></symbol>
470
486
  <symbol id="i-play" viewBox="0 0 16 16"><path d="M5 3.5v9l7-4.5z"/></symbol>
471
487
  <symbol id="i-arrow-up" viewBox="0 0 16 16"><path d="M8 13V3M4 7l4-4 4 4"/></symbol>
488
+ <symbol id="i-wrap" viewBox="0 0 16 16"><path d="M2.5 4h11M2.5 8h9a2 2 0 0 1 0 4H8.5M10 10.5 8.5 12l1.5 1.5M2.5 12h3"/></symbol>
472
489
  <symbol id="i-copy" viewBox="0 0 16 16"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 5.5V3.5a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2"/></symbol>
473
490
  </svg>
474
491
 
@@ -721,7 +738,7 @@
721
738
  <li class="spec" data-token="--control-sm"><div class="spec-meta"><code>--control-sm</code><span class="value"></span></div><i class="height-bar" style="height:var(--control-sm)"></i></li>
722
739
  <li class="spec" data-token="--control-md"><div class="spec-meta"><code>--control-md</code><span class="value"></span></div><i class="height-bar" style="height:var(--control-md)"></i></li>
723
740
  <li class="spec" data-token="--control-lg"><div class="spec-meta"><code>--control-lg</code><span class="value"></span></div><i class="height-bar" style="height:var(--control-lg)"></i></li>
724
- <li class="spec" data-token="--control-touch"><div class="spec-meta"><code>--control-touch</code><span class="value"></span><span class="use">Touch targets: every control at tablet width, and docs-site links and icon actions</span></div><i class="height-bar" style="height:var(--control-touch)"></i></li>
741
+ <li class="spec" data-token="--control-touch"><div class="spec-meta"><code>--control-touch</code><span class="value"></span><span class="use">Touch targets: every control, navigation row, and quiet action at tablet width</span></div><i class="height-bar" style="height:var(--control-touch)"></i></li>
725
742
  </ul>
726
743
  </section>
727
744
 
@@ -938,7 +955,7 @@
938
955
  <dt>Metric</dt><dd class="mono">${m.metric}</dd>
939
956
  </dl>
940
957
  <div class="code">
941
- <div class="code-head"><b>Sample query</b><span class="lang">JSON</span><button class="quiet-action copy" type="button">${icon('i-copy')}<span>Copy</span></button></div>
958
+ <div class="code-head"><b>Sample query</b><span class="lang">JSON</span><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines">${icon('i-wrap')}</button><button class="quiet-action copy" type="button">${icon('i-copy')}<span>Copy</span></button></div></div>
942
959
  <pre tabindex="0" role="region" aria-label="Sample query"><code>${code.split('\n').map((line) => `<span class="line"><span>${highlight(line)}</span></span>`).join('')}</code></pre>
943
960
  </div>
944
961
  <div class="cluster"><button class="btn secondary" type="button" data-size="sm">Open in explorer</button><button class="btn ghost" type="button" data-size="sm">Mute</button></div>`;
@@ -958,6 +975,13 @@
958
975
  copy.dataset.copied = '';
959
976
  wait = setTimeout(restore, 1500);
960
977
  });
978
+ // Wrap lines keeps its name; aria-pressed carries the state.
979
+ const wrap = detail.querySelector('.wrap-toggle');
980
+ wrap.addEventListener('click', () => {
981
+ const on = wrap.getAttribute('aria-pressed') !== 'true';
982
+ wrap.setAttribute('aria-pressed', String(on));
983
+ wrap.closest('.code').toggleAttribute('data-wrap', on);
984
+ });
961
985
  };
962
986
 
963
987
  // The list is one Tab stop: only the selected row is tabbable (roving tabindex), and focus selects.
@@ -180,7 +180,7 @@
180
180
  [data-slot="dialog-title"] { margin: 0; font-size: 1.125rem; font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
181
181
  [data-slot="dialog-description"] { margin: var(--space-1) 0 0; color: var(--color-muted); }
182
182
  /* The header's close button, in a dialog or a drawer, is a quiet action. A Close rendered as a Button is drawn as that button. */
183
- :is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]) { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--control-touch); min-height: var(--control-touch); padding: 0; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-muted); font: inherit; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
183
+ :is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]) { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--control-md); min-height: var(--control-md); padding: 0; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-muted); font: inherit; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
184
184
  @media (hover: hover) {
185
185
  :is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]):hover { color: var(--color-text); background: color-mix(in srgb, currentColor 6%, transparent); }
186
186
  }
@@ -358,6 +358,7 @@
358
358
  [data-slot="segmented-control"][data-orientation="horizontal"]:is(:not([data-size]), [data-size]) { --item: var(--control-touch); }
359
359
  [data-slot="tabs-list"][data-orientation="horizontal"]:is(:not([data-size]), [data-size]) > [data-slot="tabs-tab"] { min-height: var(--control-touch); }
360
360
  [data-slot="slider"][data-orientation="horizontal"]:is(:not([data-size]), [data-size]) > [data-slot="slider-control"] { height: var(--control-touch); }
361
+ :is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]) { width: var(--control-touch); min-height: var(--control-touch); }
361
362
  }
362
363
 
363
364
  @media (forced-colors: active) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filipgutica/design-system",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Filip's design language, tokens, and component catalogue for any framework",
5
5
  "type": "module",
6
6
  "sideEffects": [